Skip to content

chore: have EncodedId creation always return EncodedId #2040

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 31, 2022

Conversation

JohnVillalovos
Copy link
Member

There is no reason to return an int as we can always return a str
version of the int

Change EncodedId to always return an EncodedId. This removes the
need to have mypy ignore the error raised.

@codecov-commenter
Copy link

codecov-commenter commented May 31, 2022

Codecov Report

Merging #2040 (a1a246f) into main (3fa330c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2040   +/-   ##
=======================================
  Coverage   93.68%   93.68%           
=======================================
  Files          78       78           
  Lines        4985     4986    +1     
=======================================
+ Hits         4670     4671    +1     
  Misses        315      315           
Flag Coverage Δ
cli_func_v4 81.78% <100.00%> (-0.02%) ⬇️
py_func_v4 80.68% <100.00%> (+<0.01%) ⬆️
unit 85.01% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
gitlab/utils.py 93.24% <100.00%> (+0.09%) ⬆️

@JohnVillalovos JohnVillalovos marked this pull request as draft May 31, 2022 19:17
@JohnVillalovos JohnVillalovos marked this pull request as ready for review May 31, 2022 19:40
@JohnVillalovos JohnVillalovos requested a review from nejch May 31, 2022 19:40
@JohnVillalovos JohnVillalovos marked this pull request as draft May 31, 2022 19:52
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.

LGTM just one question :)

There is no reason to return an `int` as we can always return a `str`
version of the `int`

Change `EncodedId` to always return an `EncodedId`. This removes the
need to have `mypy` ignore the error raised.
@JohnVillalovos JohnVillalovos marked this pull request as ready for review May 31, 2022 23:09
@JohnVillalovos JohnVillalovos requested a review from nejch May 31, 2022 23:14
@nejch nejch merged commit dea9435 into main May 31, 2022
@nejch nejch deleted the jlvillal/type_alias branch May 31, 2022 23:19
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