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
Some minor bug fixes / updates #764
base: master
Are you sure you want to change the base?
Conversation
Updated where appropriate, changing % and format strings to f-strings
To at least have an Exception declared
Execution/evaluation order is clear
can be simplified to just not list
Python implicitly returns None
After lint failure
Lines 62 to 77 in 0b67153
|
E722 was for bare excepts in flake8, can be removed PLC1901 added
% |
I think there may still be a ruff failiure in the next run, but it's not appearing locally for me, so just working out the difference. |
You can install pre-commit locally and then do: |
@@ -2,7 +2,7 @@ | |||
|
|||
|
|||
def test_group(): | |||
assert list(utils.group([], 2)) == [] | |||
assert not list(utils.group([], 2)) |
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.
Please revert. ALL falsey values would pass this test including None, False, 0, 0.0, {}, set(), (,).
We are asserting that the result is an empty list, not any of these other values.
Repeat below. https://docs.astral.sh/ruff/rules/compare-to-empty-string/#known-problems
Replacing strings with f-strings
Fixing bare exceptions
Cleaning whitespace/brackets
conditions on empty lists
reorder exceptions where one is an ancestor exception
remove useless return
update getName() to name ala python 3.11 requirements