Skip to content

refactor: use more python3.9 syntax #3010

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

Merged
merged 1 commit into from
Feb 5, 2025
Merged

refactor: use more python3.9 syntax #3010

merged 1 commit into from
Feb 5, 2025

Conversation

nejch
Copy link
Member

@nejch nejch commented Oct 8, 2024

Follow-up to #3005

Mostly done with pyupgrade --py39-plus and some manual cleanup.

@nejch nejch marked this pull request as draft October 8, 2024 15:49
@JohnVillalovos
Copy link
Member

JohnVillalovos commented Oct 8, 2024

Cool! I was thinking about this too 🙂 Well thinking of stopping the use of List[] type annotations and instead use list[] style type annotations.

Thanks for doing this!

Once we (in reality you) get this done, we should do a follow-up adding the commit to .git-blame-ignore-revs which I'm sure you have already thought of.

@nejch
Copy link
Member Author

nejch commented Oct 8, 2024

Once we (in reality you) get this done, we should do a follow-up adding the commit to .git-blame-ignore-revs which I'm sure you have already thought of.

I was thinking of that as well, especially now that I see how big the diff is 😅 Maybe after this PR in case there's more rebasing etc.

I'll just need to tweak the type hint tests for this now.

@nejch
Copy link
Member Author

nejch commented Jan 27, 2025

I'll rebase this after #3083 to avoid too many conflicts there, and that will likely fix the typing issues altogether.

@nejch nejch marked this pull request as ready for review February 5, 2025 18:27
@nejch nejch requested a review from JohnVillalovos February 5, 2025 18:27
@nejch
Copy link
Member Author

nejch commented Feb 5, 2025

@JohnVillalovos this one's a chunky one now, but mostly auto-generated 😅

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 99.71910% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.28%. Comparing base (91c4f18) to head (49107f5).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
gitlab/v4/objects/merge_requests.py 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3010      +/-   ##
==========================================
+ Coverage   97.25%   97.28%   +0.03%     
==========================================
  Files          97       97              
  Lines        5932     5975      +43     
==========================================
+ Hits         5769     5813      +44     
+ Misses        163      162       -1     
Flag Coverage Δ
api_func_v4 83.48% <95.22%> (+0.06%) ⬆️
cli_func_v4 84.50% <98.03%> (+0.12%) ⬆️
unit 90.07% <97.75%> (+0.07%) ⬆️

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

Files with missing lines Coverage Δ
gitlab/__init__.py 100.00% <ø> (ø)
gitlab/_backends/protocol.py 100.00% <100.00%> (+7.14%) ⬆️
gitlab/_backends/requests_backend.py 98.80% <100.00%> (ø)
gitlab/base.py 100.00% <100.00%> (ø)
gitlab/cli.py 100.00% <100.00%> (ø)
gitlab/client.py 98.73% <100.00%> (ø)
gitlab/config.py 100.00% <100.00%> (ø)
gitlab/exceptions.py 100.00% <100.00%> (ø)
gitlab/mixins.py 91.34% <100.00%> (+0.04%) ⬆️
gitlab/types.py 98.24% <100.00%> (+0.03%) ⬆️
... and 38 more

Copy link
Member

@JohnVillalovos JohnVillalovos left a comment

Choose a reason for hiding this comment

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

Thanks @nejch

A lot of work there.

@JohnVillalovos JohnVillalovos merged commit 4e90c11 into main Feb 5, 2025
18 checks passed
@JohnVillalovos JohnVillalovos deleted the refactor/py39 branch February 5, 2025 22:05
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