Skip to content

Conversation

@soulee-dev
Copy link
Contributor

Description

This PR addresses the use of the super() function in the classes. Starting with Python 3, super() can be called without arguments in instance methods, automatically determining the class and self. This PR applies this simplification, enhancing the code's readability and maintainability.

Changes

  • Replaced all occurrences of super(ClassName, self).__init__ with the simplified super().__init__ in the classes.

Before

super(ClassName, self).__init__(from_packet, event_size, table_map) ...

After

super().__init__(from_packet, event_size, table_map) ...

Benefits

  • Readability: The new syntax is cleaner and more in line with modern Python practices.
  • Maintainability: If the class name changes in the future, there's no need to update the call to super().

Related Issue

Fixed: #432

@dongwook-chan
Copy link
Collaborator

The modifications have greatly boosted the readability of the code. It's not just clearer but also more concise.

@julien-duponchelle
Copy link
Owner

Great

@julien-duponchelle julien-duponchelle merged commit 07ad978 into julien-duponchelle:main Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants