Skip to content

Commit 1e9d253

Browse files
committed
code style
Signed-off-by: Kunz, Immanuel <immanuel.kunz@aisec.fraunhofer.de>
1 parent df2d2f6 commit 1e9d253

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/univers/version_range.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ def __contains__(self, version):
225225

226226
if self.version_class is AllVersion:
227227
return True
228-
228+
229229
if self.version_class is NoneVersion:
230230
return False
231-
231+
232232
if not isinstance(version, self.version_class):
233233
raise TypeError(
234234
f"{version!r} is not of expected type: {self.version_class!r}",

src/univers/versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class AllVersion(Version):
137137
@classmethod
138138
def is_valid(cls, string):
139139
return string == "vers:all/*"
140-
140+
141141

142142
class NoneVersion(Version):
143143
@classmethod

tests/test_version_range.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ def test_version_range_normalize_case3():
548548

549549
assert str(nvr) == "vers:pypi/>=1.0.0|<=1.3.0|3.0.0"
550550

551+
551552
def test_version_range_all():
552553
all_vers = VersionRange.from_string("vers:all/*")
553554
assert all_vers.contains(Version("1.2.3"))
@@ -558,8 +559,9 @@ def test_version_range_all():
558559
with pytest.raises(Exception):
559560
VersionRange.from_string("vers:all/*|>1.2.3")
560561

562+
561563
def test_version_range_none():
562-
none_vers = VersionRange.from_string("vers:none/*")
564+
none_vers = VersionRange.from_string("vers:none/*")
563565
assert not none_vers.contains(Version("1.2.3"))
564566
assert PypiVersion("2.0.3") not in none_vers
565567
# test for invalid all range specification

0 commit comments

Comments
 (0)