Skip to content

Linters refresh#71

Merged
crusaderky merged 1 commit into
explosion:mainfrom
crusaderky:linters
Nov 27, 2025
Merged

Linters refresh#71
crusaderky merged 1 commit into
explosion:mainfrom
crusaderky:linters

Conversation

@crusaderky

@crusaderky crusaderky commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

@lysnikolaou lysnikolaou left a comment

Copy link
Copy Markdown

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.

Comment thread confection/_registry.py
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

Copy link
Copy Markdown

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