Skip to content

chore: remove usage of 'from ... import *' in client.py #1318

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 22, 2021
Merged

chore: remove usage of 'from ... import *' in client.py #1318

merged 1 commit into from
Feb 22, 2021

Conversation

JohnVillalovos
Copy link
Member

@JohnVillalovos JohnVillalovos commented Feb 22, 2021

In gitlab/client.py remove usage of:
  * from gitlab.const import *
  * from gitlab.exceptions import *

Change them to:
  * import gitlab.const
  * import gitlab.exceptions

Update code to explicitly reference things in gitlab.const and
gitlab.exceptions

A flake8 run no longer lists any undefined variables. Before it listed
possible undefined variables.

@JohnVillalovos JohnVillalovos marked this pull request as draft February 22, 2021 21:49
@codecov-io
Copy link

codecov-io commented Feb 22, 2021

Codecov Report

Merging #1318 (5165354) into master (3aef19c) will decrease coverage by 0.03%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1318      +/-   ##
==========================================
- Coverage   80.76%   80.72%   -0.04%     
==========================================
  Files          69       69              
  Lines        3623     3627       +4     
==========================================
+ Hits         2926     2928       +2     
- Misses        697      699       +2     
Flag Coverage Δ
unit 80.72% <75.00%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
gitlab/client.py 80.00% <75.00%> (-0.35%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3aef19c...5165354. Read the comment docs.

In gitlab/client.py remove usage of:
  * from gitlab.const import *
  * from gitlab.exceptions import *

Change them to:
  * import gitlab.const
  * import gitlab.exceptions

Update code to explicitly reference things in gitlab.const and
gitlab.exceptions

A flake8 run no longer lists any undefined variables. Before it listed
possible undefined variables.
@JohnVillalovos JohnVillalovos changed the title Testing... chore: remove usage of 'from ... import *' in client.py Feb 22, 2021
@JohnVillalovos JohnVillalovos marked this pull request as ready for review February 22, 2021 22:17
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! Would make sense to get rid of these blanket imports even in init but there are many things advertised publicly from that namespace even in docs (https://python-gitlab.readthedocs.io/en/stable/search.html?q=constants).

@nejch nejch merged commit d9fdf1d into python-gitlab:master Feb 22, 2021
@JohnVillalovos JohnVillalovos deleted the jlvillal/testing branch February 24, 2021 01: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.

3 participants