Skip to content

Commit c17240b

Browse files
committed
fix lint
Signed-off-by: Javan lacerda <[email protected]>
1 parent 858baea commit c17240b

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

tests/unit/packaging/test_models.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -669,14 +669,14 @@ def test_trusted_published_all(self, db_session):
669669
assert release.trusted_published
670670

671671
@pytest.mark.parametrize(
672-
"url, expected",
673-
[
674-
("xpto.com", False),
675-
("https://fake/", False),
676-
("https://fake/url", True),
677-
("https://fake/url/something.md", True),
678-
]
679-
)
672+
"url, expected",
673+
[
674+
("xpto.com", False),
675+
("https://fake/", False),
676+
("https://fake/url", True),
677+
("https://fake/url/something.md", True),
678+
]
679+
)
680680
def test_is_url_verified(self, db_session, url, expected):
681681
project = DBProjectFactory.create()
682682
release = DBReleaseFactory.create(project=project)

warehouse/packaging/models.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -402,19 +402,21 @@ def latest_version(self):
402402

403403
def is_verified_url(self, url: str) -> bool:
404404
return (
405-
orm.object_session(self)
406-
.query(File.Event)
407-
.join(File)
408-
.join(Release)
409-
.join(Project)
410-
.filter(Project.id == self.id)
411-
.filter(
412-
literal(url).ilike(File.Event.additional.op("->>")("publisher_url")+"%")
405+
orm.object_session(self)
406+
.query(File.Event)
407+
.join(File)
408+
.join(Release)
409+
.join(Project)
410+
.filter(Project.id == self.id)
411+
.filter(
412+
literal(url).ilike(
413+
File.Event.additional.op("->>")("publisher_url") + "%"
413414
)
414-
.scalar()
415+
)
416+
.scalar()
415417
) is not None
416-
417-
418+
419+
418420
class DependencyKind(enum.IntEnum):
419421
requires = 1
420422
provides = 2

0 commit comments

Comments
 (0)