Skip to content

Conversation

@crusaderky
Copy link
Contributor

@crusaderky crusaderky commented Nov 27, 2025

Upgrade black, isort, and flake8.
Run more flake8 checks in CI.

Out of scope: mypy is quite red, both with the old version pinned by the project and the latest. Fixing all the errors it highlights woud require substantially more effort.

run: |
python -m pip install flake8 -c requirements.txt
python -m flake8 confection --count --select=E901,E999,F821,F822,F823,W605 --show-source --statistics
python -m flake8 confection --show-source --statistics
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use setup.cfg

Copy link

@lysnikolaou lysnikolaou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

One thing I tend to do in these types of PRs is separate configuration changes and actual formatting changes / linting in different commits to make the review slightly easier.

return create_model(f"{reg_name} {func_name} model", __config__=model_config, **fields) # type: ignore
return create_model(
f"{reg_name} {func_name} model", __config__=model_config, **fields
) # type: ignore

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know mypy is out of scope but this type: ignore will not ignore what was being ignored before. Maybe something for when/if mypy is in scopy.

@crusaderky crusaderky merged commit ab9ec43 into explosion:main Nov 27, 2025
30 checks passed
@crusaderky crusaderky deleted the linters branch November 27, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants