From 458b6aa8561cd34fe8d8be886439b614dfa7a808 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 02:50:07 +0000 Subject: [PATCH 1/6] build(deps): update mypy requirement from ~=1.5 to ~=2.1 Updates the requirements on [mypy](https://github.com/python/mypy) to permit the latest version. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.5.0...v2.1.0) --- updated-dependencies: - dependency-name: mypy dependency-version: 2.1.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements_ci.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_ci.txt b/requirements_ci.txt index 87be616..3057029 100644 --- a/requirements_ci.txt +++ b/requirements_ci.txt @@ -3,7 +3,7 @@ boilerplates[setup] ~= 1.2 codecov ~= 2.1 coverage ~= 7.2 flake518 ~= 1.6 -mypy ~= 1.5 +mypy ~= 2.1 pydocstyle ~= 6.3 pylint ~= 3.3; python_version < '3.10' pylint ~= 4.0; python_version >= '3.10' From 4e95d77f35ae3a021cc731c03aa30129a38374d7 Mon Sep 17 00:00:00 2001 From: Mateusz Bysiek <1270332+mbdevpl@users.noreply.github.com> Date: Tue, 2 Jun 2026 14:59:20 +0900 Subject: [PATCH 2/6] build: take into account Python 3.9 --- requirements_ci.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements_ci.txt b/requirements_ci.txt index 3057029..553ca44 100644 --- a/requirements_ci.txt +++ b/requirements_ci.txt @@ -3,7 +3,8 @@ boilerplates[setup] ~= 1.2 codecov ~= 2.1 coverage ~= 7.2 flake518 ~= 1.6 -mypy ~= 2.1 +mypy ~= 1.19; python_version < '3.10' +mypy ~= 2.1; python_version >= '3.10' pydocstyle ~= 6.3 pylint ~= 3.3; python_version < '3.10' pylint ~= 4.0; python_version >= '3.10' From 07694e6e21b2f5803171191d08a8c141ac943cb2 Mon Sep 17 00:00:00 2001 From: Mateusz Bysiek <1270332+mbdevpl@users.noreply.github.com> Date: Tue, 2 Jun 2026 15:06:09 +0900 Subject: [PATCH 3/6] fix: address mypy issues in setup boilerplate --- boilerplates/setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/boilerplates/setup.py b/boilerplates/setup.py index 0bfab7a..7eb1c7e 100644 --- a/boilerplates/setup.py +++ b/boilerplates/setup.py @@ -290,7 +290,7 @@ class Package: install_requires: t.Optional[t.List[str]] = None """If None, determined using requirements.txt.""" - extras_require: t.Mapping[str, t.List[str]] = {} + extras_require: t.Dict[str, t.List[str]] = {} """A dictionary containing entries of type 'some_feature': ['requirement1', 'requirement2'].""" python_requires: t.Optional[str] = None @@ -383,6 +383,7 @@ def setup(cls) -> None: packages=cls.packages, package_dir={'': cls.root_directory}, include_package_data=True, package_data=cls.package_data, exclude_package_data=cls.exclude_package_data, - install_requires=cls.install_requires, extras_require=cls.extras_require, + install_requires=[] if cls.install_requires is None else cls.install_requires, + extras_require=cls.extras_require, python_requires=cls.python_requires, entry_points=cls.entry_points) From 3170154583420414f6c80002b6ebc915ccbe971a Mon Sep 17 00:00:00 2001 From: Mateusz Bysiek <1270332+mbdevpl@users.noreply.github.com> Date: Tue, 2 Jun 2026 15:22:26 +0900 Subject: [PATCH 4/6] fix: address mypy issues in git_repo_tests boilerplate --- boilerplates/git_repo_tests.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/boilerplates/git_repo_tests.py b/boilerplates/git_repo_tests.py index 26c0c3b..bf703b7 100644 --- a/boilerplates/git_repo_tests.py +++ b/boilerplates/git_repo_tests.py @@ -13,8 +13,8 @@ class GitRepoTests(unittest.TestCase): """Provide several utility properties and methods named repo_* and git_*.""" - repo = None # type: git.Repo - repo_path = None # type: pathlib.Path + repo: git.Repo | None = None + repo_path: pathlib.Path | None = None def setUp(self): self._tmpdir = tempfile.TemporaryDirectory() # pylint: disable = consider-using-with @@ -36,12 +36,13 @@ def tearDown(self): @property def repo_head_hexsha(self) -> str: + self.assertIsInstance(self.repo, git.Repo) + assert isinstance(self.repo, git.Repo), type(self.repo) return self.repo.head.commit.hexsha[:8] def git_init(self) -> git.Repo: """Initialize a git repository in the temporary folder.""" self.repo = git.Repo.init(str(self.repo_path)) - self.assertIsInstance(self.repo, git.Repo) self.repo.git.config('user.email', 'you@example.com') self.repo.git.config('user.name', 'Your Name') return self.repo @@ -59,6 +60,8 @@ def git_commit_new_file(self) -> pathlib.Path: with tempfile.NamedTemporaryFile('w', dir=str(self.repo_path), delete=False) as repo_file: repo_file.write('spam spam lovely spam\n') path = pathlib.Path(repo_file.name) + self.assertIsInstance(self.repo, git.Repo) + assert isinstance(self.repo, git.Repo), type(self.repo) self.repo.index.add([path.name]) self.repo.index.commit(f'created file {path}') _LOG.debug('commited file %s as %s', path, self.repo_head_hexsha) @@ -68,6 +71,7 @@ def git_commit_new_file(self) -> pathlib.Path: def git_modify_file(self, path: pathlib.Path, add: bool = False, commit: bool = False) -> None: """Modify an existing file.""" self.assertIsInstance(self.repo, git.Repo) + assert isinstance(self.repo, git.Repo), type(self.repo) self.assertIsInstance(path, pathlib.Path) self.assertTrue(path.is_file()) with path.open('a') as repo_file: From ffa88f6e0473d6f9a361c4ea4ae6d1c33fb70d60 Mon Sep 17 00:00:00 2001 From: Mateusz Bysiek <1270332+mbdevpl@users.noreply.github.com> Date: Tue, 2 Jun 2026 15:25:31 +0900 Subject: [PATCH 5/6] build: macos-13 is not available anymore --- .github/workflows/python.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index b15cb21..616e417 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -18,11 +18,6 @@ jobs: python-version: '3.9' - os: macos-latest python-version: '3.10' - include: - - os: macos-13 - python-version: '3.9' - - os: macos-13 - python-version: '3.10' steps: - uses: actions/checkout@v6 with: From 560ad5c2a9d74f44ca0222930c5660b68a11685d Mon Sep 17 00:00:00 2001 From: Mateusz Bysiek <1270332+mbdevpl@users.noreply.github.com> Date: Tue, 2 Jun 2026 15:27:15 +0900 Subject: [PATCH 6/6] fix: remove syntax unsupported in Python 3.9 --- boilerplates/git_repo_tests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/boilerplates/git_repo_tests.py b/boilerplates/git_repo_tests.py index bf703b7..fc83b31 100644 --- a/boilerplates/git_repo_tests.py +++ b/boilerplates/git_repo_tests.py @@ -3,6 +3,7 @@ import logging import pathlib import tempfile +import typing as t import unittest import git @@ -13,8 +14,8 @@ class GitRepoTests(unittest.TestCase): """Provide several utility properties and methods named repo_* and git_*.""" - repo: git.Repo | None = None - repo_path: pathlib.Path | None = None + repo: t.Optional[git.Repo] = None + repo_path: t.Optional[pathlib.Path] = None def setUp(self): self._tmpdir = tempfile.TemporaryDirectory() # pylint: disable = consider-using-with