Skip to content

chore: update type-hints return signature for GetWithoutIdMixin methods #2036

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
May 30, 2022

Conversation

JohnVillalovos
Copy link
Member

Commit f0152dc removed situation
where get() in a GetWithoutIdMixin based class could return None

Update the type-hints to no longer return Optional AKA None

Commit f0152dc removed situation
where `get()` in a `GetWithoutIdMixin` based class could return `None`

Update the type-hints to no longer return `Optional` AKA `None`
@JohnVillalovos JohnVillalovos requested a review from nejch May 30, 2022 17:11
@codecov-commenter
Copy link

Codecov Report

Merging #2036 (aa972d4) into main (b2e6f3b) will not change coverage.
The diff coverage is 79.31%.

@@           Coverage Diff           @@
##             main    #2036   +/-   ##
=======================================
  Coverage   93.72%   93.72%           
=======================================
  Files          78       78           
  Lines        4941     4941           
=======================================
  Hits         4631     4631           
  Misses        310      310           
Flag Coverage Δ
cli_func_v4 81.64% <27.58%> (ø)
py_func_v4 80.51% <48.27%> (ø)
unit 84.98% <62.06%> (ø)

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

Impacted Files Coverage Δ
gitlab/mixins.py 92.51% <ø> (ø)
gitlab/v4/objects/push_rules.py 92.85% <0.00%> (ø)
gitlab/v4/objects/merge_request_approvals.py 90.58% <33.33%> (ø)
gitlab/v4/objects/notification_settings.py 96.42% <66.66%> (ø)
gitlab/v4/objects/export_import.py 94.59% <75.00%> (ø)
gitlab/v4/objects/appearance.py 100.00% <100.00%> (ø)
gitlab/v4/objects/pipelines.py 94.39% <100.00%> (ø)
gitlab/v4/objects/projects.py 89.89% <100.00%> (ø)
gitlab/v4/objects/settings.py 95.45% <100.00%> (ø)
gitlab/v4/objects/statistics.py 100.00% <100.00%> (ø)
... and 1 more

Copy link
Member

@nejch nejch left a comment

Choose a reason for hiding this comment

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

Thanks @JohnVillalovos lgtm, just a quick question. There's another quirk with GetWithoutIdMixin I'll open a follow-up for.

@nejch nejch merged commit 1f17349 into main May 30, 2022
@nejch nejch deleted the jlvillal/get_not_none branch May 30, 2022 20:33
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.

3 participants