-
Notifications
You must be signed in to change notification settings - Fork 212
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
Simplify code with ruff --fix #583
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.
Why not add to pre-commit so it's fixed automatically from now on ?
Adding none return annotations to untyped code seems like noise |
I find I can revert if that is the consensus. Or perhaps at line 34, we should:
and then dedent the next ~25 lines of code. |
The return that was added is great The type annotations for only the return type none are noise, I'd strongly prefer to have those be added as part of full annotation at a later point |
@@ -31,36 +31,34 @@ def init(): | |||
cov_branch = True if os.environ.get('COV_CORE_BRANCH') == 'enabled' else None | |||
cov_context = os.environ.get('COV_CORE_CONTEXT') | |||
|
|||
if cov_datafile: |
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.
I don't like this change. I think it makes this block of hairy code worse:
- harder to git blame
- conditions are harder to read
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.
ruff --select=B009,RET503,ANN204,SIM108,SIM201 --fix .