8000 chore: rename `gitlab/__version__.py` -> `gitlab/version.py` · python-gitlab/python-gitlab@d9dfb5b · GitHub
[go: up one dir, main page]

Skip to content

Commit d9dfb5b

Browse files
chore: rename gitlab/__version__.py -> gitlab/version.py
It is confusing to have a `gitlab/__version__.py` because we also create a variable `gitlab.__version__` which can conflict with `gitlab/__version__.py`. To reduce confusion make the name of the version file `gitlab/version.py`.
1 parent cbbe7ce commit d9dfb5b

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

gitlab/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
from typing import Any
2121

2222
import gitlab.config # noqa: F401
23-
from gitlab.__version__ import ( # noqa: F401
23+
from gitlab.client import Gitlab, GitlabList # noqa: F401
24+
from gitlab.exceptions import * # noqa: F401,F403
25+
from gitlab.version import ( # noqa: F401
2426
__author__,
2527
__copyright__,
2628
__email__,
2729
__license__,
2830
__title__,
2931
__version__,
3032
)
31-
from gitlab.client import Gitlab, GitlabList # noqa: F401
32-
from gitlab.exceptions import * # noqa: F401,F403
3333

3434
warnings.filterwarnings("default", category=DeprecationWarning, module="^gitlab")
3535

gitlab/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# You should have received a copy of the GNU Lesser General Public License
1616
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1717

18-
from gitlab.__version__ import __title__, __version__
18+
from gitlab.version import __title__, __version__
1919

2020
# NOTE(jlvillal): '_DEPRECATED' only affects users accessing constants via the
2121
# top-level gitlab.* namespace. See 'gitlab/__init__.py:__getattr__()' for the
File renamed without changes.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ignore_errors = true
3838

3939
[tool.semantic_release]
4040
branch = "main"
41-
version_variable = "gitlab/__version__.py:__version__"
41+
version_variable = "gitlab/version.py:__version__"
4242
commit_subject = "chore: release v{version}"
4343
commit_message = ""
4444

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
def get_version() -> str:
88
version = ""
9-
with open("gitlab/__version__.py") as f:
9+
with open("gitlab/version.py") as f:
1010
for line in f:
1111
if line.startswith("__version__"):
1212
version = eval(line.split("=")[-1])

0 commit comments

Comments
 (0)
0