Skip to content

Commit 0687080

Browse files
committed
build: fix several small issues
1 parent a9e34b2 commit 0687080

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pipeline {
7979
}
8080
}
8181
environment {
82-
PACKAGE_NAME = 'ingit'
82+
PACKAGE_NAME = 'version-query'
8383
VERSION = sh(script: 'python3 -m version_query --predict .', returnStdout: true).trim()
8484
PYPI_AUTH = credentials('mbdev-pypi-auth')
8585
TWINE_USERNAME = "${PYPI_AUTH_USR}"

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
include setup_boilerplate.py
21
include requirements.txt
32
include LICENSE
43
include NOTICE

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ requires = [
1010
max-line-length = 100
1111
max-doc-length = 100
1212

13+
[[tool.mypy.overrides]]
14+
module = [
15+
'semver'
16+
]
17+
ignore_missing_imports = true
18+
1319
[tool.pydocstyle]
1420
ignore = [
1521
'D102', 'D103', 'D105', 'D107',

requirements_ci.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ mypy ~= 1.5
66
pydocstyle ~= 6.3
77
pylint ~= 2.17
88
twine ~= 4.0
9+
types-setuptools >= 67.4

requirements_test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
-r requirements.txt
22
boilerplates[packaging_tests] ~= 0.1
33
colorlog ~= 6.7
4+
setuptools >= 67.4

version_query/git_query.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ def _latest_git_version_tag_on_branches(
4646
t.Optional[git.objects.Commit], t.Optional[git.TagReference], t.Optional[Version],
4747
int]]:
4848
_LOG.log(logging.NOTSET, 'entering %i branches...', len(commit.parents))
49-
results = []
49+
results: t.List[t.Tuple[
50+
t.Optional[git.objects.Commit], t.Optional[git.TagReference], Version, int]] = []
5051
main_commit_distance = None
5152
for parent in commit.parents:
5253
try:
@@ -57,7 +58,7 @@ def _latest_git_version_tag_on_branches(
5758
if main_commit_distance is None:
5859
main_commit_distance = result[3]
5960
if result[2] is not None:
60-
results.append(result)
61+
results.append(result) # type: ignore
6162
if not results:
6263
if main_commit_distance is None:
6364
raise ValueError(f'reached max commit distance {MAX_COMMIT_DISTANCE}'
@@ -73,8 +74,9 @@ def _latest_git_version_tag_on_branches(
7374

7475

7576
def _latest_git_version_tag(
76-
repo: git.Repo, assume_if_none: bool = False, base_commit: git.objects.Commit = None,
77-
commit_distance: int = 0, skip_commits: t.Set[git.objects.Commit] = None) -> t.Tuple[
77+
repo: git.Repo, assume_if_none: bool = False,
78+
base_commit: t.Optional[git.objects.Commit] = None, commit_distance: int = 0,
79+
skip_commits: t.Optional[t.Set[git.objects.Commit]] = None) -> t.Tuple[
7880
t.Optional[git.objects.Commit], t.Optional[git.TagReference], t.Optional[Version], int]:
7981
"""Return (commit, tag at that commit if any, latest version, distance from the version)."""
8082
version_tags = _git_version_tags(repo)

0 commit comments

Comments
 (0)