-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Code style enhancements and less sphinx warnings #1570
Conversation
Mostly grep -Er '[=!]= (None|True|False)'
also reduced redundant characters at line ends
@@ -97,11 +97,11 @@ def yesno(prompt, default=None): | |||
cur = default | |||
while True: | |||
k = term.key.get() | |||
if k in ('y', 'Y', '<left>') and cur != True: | |||
if k in ('y', 'Y', '<left>') and cur is not True: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should likely be not cur
or similar. We should generally not check for is True
or is False
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping @Arusekk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the value can be either of three: True
, False
or None
. You are probably right, if you prefer so, you can commit this further change.
This is several code style fixes, described in detail in this PR's commit messages.