You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regarding to the PEP8 namely conventions, method names and instance variables shall pass the function naming rules (lowercase with words separated by underscore): https://peps.python.org/pep-0008/#method-names-and-instance-variables
Therefore, it would be beneficial to regard this in pep8-naming by adding an naming rule for instance variables, similar to N806.
I believe this has been discussed in depth before. The short answer as to why this is hard is that subclassing something using camelcase variables then will cause pep8-naming to flag that usage as well as it's indistinguishable from the example you gave. The rate of false positives would be too high and we don't execute code to be able to determine if an instance attribute is defined for the first time in the scope we see it or if it comes from a parent
Regarding PEP8 conventions, using CamelCase for variables in a parent class would also not be correct.
Therefore, it would be consistent to mark it as an error if it were used in a child class. If it is implemented as an individual naming rule, the user can suppress this if necessary.
Otherwise, the non-use of "lower_case_with_underscores" will not be sanctioned and will continue in the future.
Regarding to the PEP8 namely conventions, method names and instance variables shall pass the function naming rules (lowercase with words separated by underscore): https://peps.python.org/pep-0008/#method-names-and-instance-variables
Therefore, it would be beneficial to regard this in pep8-naming by adding an naming rule for instance variables, similar to N806.
For example,
self._fooVariable
inshould be reported.
The text was updated successfully, but these errors were encountered: