Skip to content

Commit fffb059

Browse files
committed
fix: resolve mixed import style warning in test_pypi_version_validation.py
Remove 'from py7zz.version import ...' statement and use consistent 'py7zz.version.*' notation throughout the file. This resolves CodeQL alert #21 about mixed import styles while maintaining code functionality and improving readability by clearly showing function origins.
1 parent 8a5838a commit fffb059

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

tests/test_pypi_version_validation.py

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -265,25 +265,16 @@ def test_version_type_identification(self):
265265
assert parsed["version_type"] in ["stable", "alpha", "beta", "rc", "dev"]
266266

267267
# Test version type functions
268-
from py7zz.version import (
269-
get_version_type,
270-
is_alpha_version,
271-
is_beta_version,
272-
is_dev_version,
273-
is_rc_version,
274-
is_stable_version,
275-
)
276-
277-
version_type = get_version_type(version)
268+
version_type = py7zz.version.get_version_type(version)
278269
assert version_type in ["stable", "alpha", "beta", "rc", "dev"]
279270

280271
# Test that exactly one version type function returns True
281272
type_checks = [
282-
is_stable_version(version),
283-
is_alpha_version(version),
284-
is_beta_version(version),
285-
is_rc_version(version),
286-
is_dev_version(version),
273+
py7zz.version.is_stable_version(version),
274+
py7zz.version.is_alpha_version(version),
275+
py7zz.version.is_beta_version(version),
276+
py7zz.version.is_rc_version(version),
277+
py7zz.version.is_dev_version(version),
287278
]
288279
assert sum(type_checks) == 1, "Exactly one version type should be True"
289280

0 commit comments

Comments
 (0)