-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pep8 violation in the code #101
Comments
yes you are right this change should be made, I created a linked branch. |
Sure thing, will raise PR for you, do you want me to change things in more places as well? Or as little as possible? |
if you want throughout the project. the important thing is that you test that everything works. For dowload the project: https://github.com/DRincs-Productions/NQTR-System?tab=readme-ov-file#to-download-this-test-project |
Sure thing, I will work on it either tomorrow or Wednesday. Will use black or some other linter to check all the python code. |
FYI: class Button(DisabledClass):
def __init__(self):
self.align = None
@property
def align(self) -> Optional[tuple[Union[int, float], Union[int, float]]]:
"""X align"""
return self._align Is incorrect. It works by accident, you change align first to be None and then you change it to be property by side effect of calling this: |
I wrote this simple test to showcase it:
|
In some places, you have syntax like this:
It's actually against Python coding standard -> https://stackoverflow.com/questions/14247373/python-none-comparison-should-i-use-is-or
Use either:
or
Statement:
Is a double whammy as it's using a double negation, and it's hard to follow when it's True and when it's False, imagine those cases:
So perhaps simpler:
would suffice?
The text was updated successfully, but these errors were encountered: