Skip to content
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

add 'flake-future-annotations' lint group #1506

Merged
merged 4 commits into from
Feb 22, 2024

Conversation

danieleades
Copy link
Contributor

allows using more modern typing syntax without sacrificing compatibility

@danieleades
Copy link
Contributor Author

i've removed some type aliases on the basis that (especially with the modern syntax allowed by the from __future__ annotations import) they are:

  • needless indirection
  • no shorter or more readable than the explicit types
  • not used consistently throughout the codebase anyway

personally i'm inclined to remove the 'sequence' type aliases as well but thought that might be ever so slightly more controversial

@danieleades
Copy link
Contributor Author

i've gone ahead and removed the Sequence aliases, but it's in a separate commit for ease of review. That can be thrown away if it's not of interest

Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

Lovely, thanks! ❤️

@yajo
Copy link
Member

yajo commented Feb 11, 2024

It seems there are test failures, could you fix them please?

@danieleades
Copy link
Contributor Author

danieleades commented Feb 11, 2024

It seems there are test failures, could you fix them please?

hmm this is a bug i've not run into before. The from __future__ import annotations line in copier.cli causes the errors. I suspect that the @decorator decorator isn't playing nicely with it

it would be nice to remove decorator because it confounds type checking by mypy anyway

@danieleades
Copy link
Contributor Author

@yajo could you rerun the CI for me?
I think i've resolved the issues by rebasing on #1513

Copy link
Member

@sisp sisp left a comment

Choose a reason for hiding this comment

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

@danieleades Would you mind addressing #1513 (review) and then rebasing this PR first?

@danieleades
Copy link
Contributor Author

@danieleades Would you mind addressing #1513 (review) and then rebasing this PR first?

i've addressed that comment. I'll rebase this PR once that's merged

@danieleades danieleades marked this pull request as draft February 11, 2024 10:57
Copy link

codecov bot commented Feb 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6b878c8) 97.46% compared to head (0cff91b) 97.34%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1506      +/-   ##
==========================================
- Coverage   97.46%   97.34%   -0.13%     
==========================================
  Files          48       48              
  Lines        4543     4557      +14     
==========================================
+ Hits         4428     4436       +8     
- Misses        115      121       +6     
Flag Coverage Δ
unittests 97.34% <100.00%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danieleades danieleades marked this pull request as ready for review February 19, 2024 15:36
@danieleades
Copy link
Contributor Author

note for reviewers- I haven't been able to get the Nix environment working, so i'm not running the same ruff version locally and have avoided formatting, however i suspect that this PR should be formatted. I'm at an impasse.
Can a reviewer check this out and apply formatting using the Nix environment?

I take it the CI isn't checking the formatting? That would solve this problem for me- I could manually apply the changes if the CI showed a diff

pyproject.toml Show resolved Hide resolved
@yajo yajo merged commit 878c4d4 into copier-org:master Feb 22, 2024
20 of 21 checks passed
@danieleades danieleades deleted the ruff-future-annotations branch April 2, 2024 08:53
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.

None yet

3 participants