-
Notifications
You must be signed in to change notification settings - Fork 182
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
Minor changes #811
Minor changes #811
Conversation
37f45a5
to
1b8bc43
Compare
I converted this PR to a draft for now, until I have the tests running properly on my machine, so I can replicate what the CI is telling me :-) |
1b8bc43
to
756fda8
Compare
I've put the changes for pytest fixtures in a separate PR: #813 |
Current linting failures are due to a bug on mypy, which will mark code as unreachable if behind a boolean assert, like this: assert something is True
assert somethingelse # <-- this is considered unreachable I'm considering removing the |
ab68727
to
5e4f46f
Compare
I'd be more inclined to use |
5e4f46f
to
efb98cb
Compare
That's indeed a better solution :-) I've updated the branch accordingly, and force-pushed. |
6000913
to
f972917
Compare
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.
Thanks for the changes, they look good to me. I think once you rebase this PR on top of the main
branch, and all the tests pass, you can merge it.
f972917
to
8d6cc45
Compare
Just rebased this branch on top of latest |
6526560
to
a49e4e9
Compare
As detected by [ruff](https://github.com/astral-sh/ruff) Related to #254, although it doesn't provide the command to lint the codebase itself.
> f-strings are a convenient way to format strings, but they are not > necessary if there are no placeholder expressions to format. In this > case, a regular string should be used instead, as an f-string without > placeholders can be confusing for readers, who may expect such a > placeholder to be present. > > — [ruff docs](https://docs.astral.sh/ruff/rules/f-string-missing-placeholders/)
This commit removes code that's not being used, it can be exceptions with the `as e` where the exception itself is not used, the same with `with` statements, and some other parts where there were duplicated code.
A few minor changes about when to use `==` and when to use `is`. Basically, this uses `is` for booleans, and `==` for other values. With a few other changes about coding style which was enforced by `ruff`.
Bare excepts will catch keyboard-exit exceptions, system-exit etc. which is probably not what we want.
a49e4e9
to
d9d9ab9
Compare
A small pull request with changes I did while reading the current codebase.
I've added some comments directly on Github when it made sense.