Skip to content

Commit d5686b4

Browse files
Remove dead code
1 parent 4a37e20 commit d5686b4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/usethis/_integrations/file/pyproject_toml/requires_python.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ def get_required_minor_python_versions() -> list[PythonVersion]:
7676
# We don't bother grouping the minor versions by major version since we almost
7777
# always deal with just major version 3 in practice.
7878
min_minor_in_spec = min(all_minors)
79-
max_minor_in_spec = max(all_minors)
8079

8180
supported_versions = []
8281
# Generate all major.minor combinations in range
@@ -93,7 +92,8 @@ def get_required_minor_python_versions() -> list[PythonVersion]:
9392
elif major == max_version[0]:
9493
max_minor = max_version[1]
9594
else:
96-
max_minor = max_minor_in_spec
95+
# Unreachable by definition of max_version and loop range
96+
raise AssertionError
9797

9898
for minor in range(min_minor, max_minor + 1):
9999
version = PythonVersion(major=str(major), minor=str(minor), patch=None)

0 commit comments

Comments
 (0)