Skip to content

Conversation

@benjamb
Copy link
Contributor

@benjamb benjamb commented Jun 2, 2021

While this endpoint may be a little niche, it was useful for a project I was involved in recently.

@benjamb
Copy link
Contributor Author

benjamb commented Jun 2, 2021

On a somewhat unrelated note, is there a reason flake8 isn't included in the pre-commit config?

@codecov-commenter
Copy link

codecov-commenter commented Jun 2, 2021

Codecov Report

Merging #1490 (a81525a) into master (74f5e62) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1490      +/-   ##
==========================================
+ Coverage   91.01%   91.04%   +0.03%     
==========================================
  Files          73       74       +1     
  Lines        4128     4145      +17     
==========================================
+ Hits         3757     3774      +17     
  Misses        371      371              
Flag Coverage Δ
cli_func_v4 80.69% <64.70%> (-0.07%) ⬇️
py_func_v4 79.97% <94.11%> (+0.05%) ⬆️
unit 82.17% <100.00%> (+0.07%) ⬆️

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

Impacted Files Coverage Δ
gitlab/client.py 86.64% <100.00%> (+0.03%) ⬆️
gitlab/v4/objects/__init__.py 100.00% <100.00%> (ø)
gitlab/v4/objects/keys.py 100.00% <100.00%> (ø)

@JohnVillalovos
Copy link
Member

JohnVillalovos commented Jun 2, 2021

On a somewhat unrelated note, is there a reason flake8 isn't included in the pre-commit config?

Good catch. @nejch recently updated it to add isort and black. But likely we should add flake8 and mypy to it too.

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.

LGTM. Thanks!

I'd like @nejch and/or @max-wittig to also look.

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 a lot, looks great! Just 2 tiny comments :)

return super(KeyManager, self).get(id, **kwargs)

if "fingerprint" not in kwargs:
raise AttributeError("Missing attribute: fingerprint")
Copy link
Member

Choose a reason for hiding this comment

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

This should probably have both options:

Suggested change
raise AttributeError("Missing attribute: fingerprint")
raise AttributeError("Missing attribute: id or fingerprint")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@nejch
Copy link
Member

nejch commented Jun 2, 2021

On a somewhat unrelated note, is there a reason flake8 isn't included in the pre-commit config?

Good catch. @nejch recently updated it to add isort and black. But likely we should add flake8 and mypy to it too.

Yes, these were just very recent additions to CI checks but we should add pre-commit as well.

@nejch nejch merged commit d3fac50 into python-gitlab:master Jun 3, 2021
@benjamb benjamb deleted the benbrown/keys branch June 3, 2021 09:09
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.

4 participants