-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Enable 'strict' Mypy linting #1527
Conversation
|
remaining errors:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1527 +/- ##
==========================================
+ Coverage 97.30% 97.47% +0.17%
==========================================
Files 48 48
Lines 4594 4603 +9
==========================================
+ Hits 4470 4487 +17
+ Misses 124 116 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
e700f44
to
8954196
Compare
1acf0c4
to
5da66c0
Compare
Co-authored-by: Timothée Mazzucotelli <dev@pawamoy.fr>
4bb60cc
to
c4085a4
Compare
@pawamoy i could probably just keep tinkering with this for ever, but i think this is a place where I can draw a line under it. This is now ready for review |
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.
IMO it looks good, except for the style changes in cli.py. I'll revert them and push a fixup.
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.
Fantastic work, @danieleades! 👌 Just a few minor remarks from my side.
copier/main.py
Outdated
@@ -1,4 +1,5 @@ | |||
"""Main functions and classes, used to generate or update projects.""" | |||
|
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.
Those empty lines were introduced by Ruff v0.3.0 (IIRC). Would you mind reverting those (and the other occurences), too? They aren't related to this PR.
what's causing those test failures? |
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.
The style changes in cli.py
are still present (cc @pawamoy) and also the introduced empty line between a module doctstring and the first import, which is not needed by the Ruff version locked via Nix (IIRC).
Reverted style changes in cli.py. Will now revert blank lines at the top of modules. Race to the finish! |
Done. |
I suspect that postponed annotations don't play well with Plumbum in |
strange. i've not made any changes since these tests were last passing |
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.
LGTM
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.
LGTM, too! 🎉 Thanks for the fantastic work, @danieleades and @pawamoy! 🙏
Resolves #1441. |
enables strict mypy linting
note that i've suppressed and allow-listed some existing errors.
This allow-list should not be allowed to grow over time, and ideally would be incrementally shrunk until it can be removed entirely.
The error suppressions can be resolved by refactoring, and by creating upstream type stubs for third-party libraries that are untyped in typeshed (out of scope of this PR!)