Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor: explicitly import gitlab.const values into top-level namespace#1694

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 3 commits intomainfromjlvillal/const_explicit
Dec 1, 2021

Conversation

JohnVillalovos
Copy link
Member

We are planning on adding enumerated constants into gitlab/const.py,
but if we do that than they will end up being added to the top-level
gitlab namespace. We really want to get users to start using
gitlab.const. to access the constant values in the future.

Explicitly add the current values defined in gitlab.const into the
top-level namespace and stop using the previous
'from gitlab.const import *' method.

@JohnVillalovosJohnVillalovosforce-pushed thejlvillal/const_explicit branch 2 times, most recently fromfd04824 toba3b38aCompareNovember 17, 2021 00:44
@JohnVillalovosJohnVillalovos changed the titleExplcitly import gitlab.const values into top-level namespacerefactor: explicitly import gitlab.const values into top-level namespaceNov 17, 2021
@codecov-commenter
Copy link

codecov-commenter commentedNov 17, 2021
edited
Loading

Codecov Report

Merging#1694 (b3b0b5f) intomain (09a973e) willincrease coverage by0.01%.
The diff coverage is100.00%.

@@            Coverage Diff             @@##             main    #1694      +/-   ##==========================================+ Coverage   92.01%   92.02%   +0.01%==========================================  Files          75       75                Lines        4670     4676       +6     ==========================================+ Hits         4297     4303       +6  Misses        373      373
FlagCoverage Δ
cli_func_v481.41% <71.42%> (-0.02%)⬇️
py_func_v481.07% <71.42%> (-0.02%)⬇️
unit83.19% <100.00%> (+0.02%)⬆️

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

Impacted FilesCoverage Δ
gitlab/mixins.py91.54% <ø> (ø)
gitlab/__init__.py100.00% <100.00%> (ø)
gitlab/const.py100.00% <100.00%> (ø)

We are planning on adding enumerated constants into gitlab/const.py,but if we do that than they will end up being added to the top-levelgitlab namespace. We really want to get users to start using`gitlab.const.` to access the constant values in the future.Add the currently defined constants to a list that should not change.Use a module level __getattr__ function so that we can deprecateaccess to the top-level constants.Add a unit test which verifies we generate a warning when accessingthe top-level constants.
Have code use constants from the gitlab.const module instead of fromthe top-level gitlab module.
Update the docs to use gitlab.const to access constants.
@nejchnejch merged commite6582a3 intomainDec 1, 2021
@nejchnejch deleted the jlvillal/const_explicit branchDecember 1, 2021 00:13
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nejchnejchAwaiting requested review from nejch

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@JohnVillalovos@codecov-commenter@nejch

[8]ページ先頭

©2009-2025 Movatter.jp