-
Notifications
You must be signed in to change notification settings - Fork 15
chore: Code quality improvements #103
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
Conversation
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.
LGTM
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.
Cool!
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.
What about adding the flake8_simplify
package to the dev dependencies?
Yeah, I though about it. It reports some stuff that I didn't want to change :D (specifically, using context managers for files - we have code that does |
Added |
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.
Yeah, I though about it. It reports some stuff that I didn't want to change :D (specifically, using context managers for files - we have code that does open(..).close() which is shorter than using a context manager.
I'd use #noqa
for such cases, up to you, both variants LGTM.
I just did the suggested change, it's better than noqa or adding the rule to flake ignores |
I used https://pypi.org/project/flake8_simplify/ to get some insights and improved the code a bit