-
## Description
Extra parentheses in code can be removed for improved readability. In the examples below, the first example is more readable than the second one. Preferred: ```python if len(some_varia…
-
## Description
Variable that are not defined but they are being used in the code. This would give a potential errors that may break the code. It might have happen due to mistype of the variable name.…
-
## Description
Variable that are not defined but they are being used in the code. This would give a potential errors that may break the code. It might have happen due to mistype of the variable name.…
-
## Description
Comparisons to the singleton objects, like `True`, `False`, and `None`, should be done with identity, not equality. Use `is` or `is not`. <!--more--> Identity checks are faster t…
-
## Description
When a loop specifies no break statement, the else clause will always execute when the loop sequence is empty, thus making it useless. It is recommended to have the statements under el…
-
## Description
A module or an import name is reimported multiple times. This can be confusing and should be fixed. Please refer to the occurrence message to see the reimported name and the line numbe…
-
## Description
The `pass` statement used here is not necessary. You can safely remove this. #### Not Preferred: ```python class Docstring: '''This is a dummy class with docstring.'…
-
## Description
`return` statement causes the control flow to be disrupted, making the `else` / `elif` block here unnecessary. This doesn't mean you can not use it, but it is recommended to refac…
-
## Description
Assigning to an attribute which is not defined in the class slots will raise an error. It is recommended to add the name in the class slots. Not preferred: ```python class E: __slots__…
-
## Description
Assigning to an attribute which is not defined in the class slots will raise an error. It is recommended to add the name in the class slots. Not preferred: ```python class E: __slots__…