Skip to content

Commit 5f442f0

Browse files
fixup! Reformat files
Signed-off-by: JafarAkhondali <jafar.akhoondali@gmail.com>
1 parent 9c564db commit 5f442f0

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

docs/source/contributing.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,9 @@ Improver
454454
^^^^^^^^^
455455

456456
All the Improvers must inherit from ``Improver`` superclass and implement the
457-
``interesting_advisories`` property and the ``get_inferences`` method, unless they are not improving advisory data.
458-
In this case they should override ``is_custom_improver`` property to True and implement the ``run`` method.
457+
``interesting_advisories`` property and the ``get_inferences`` method,
458+
unless they are not improving advisory data. In this case they should override
459+
``is_custom_improver`` property to True and implement the ``run`` method.
459460

460461

461462
Writing an improver

vulnerabilities/improver.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ class Improver:
120120
def is_custom_improver(cls):
121121
return False
122122

123-
124123
@classproperty
125124
def qualified_name(cls):
126125
"""

vulnerabilities/improvers/add_commit_ref.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class CommitRelationImprover(Improver):
2727
"""
2828
Detect related commits to an advisory by applying a REGEX.
2929
"""
30+
3031
def __init__(self):
3132
# using cached insertion for memory efficiency
3233
self.insert_chunk_size = 500
@@ -48,12 +49,12 @@ def interesting_references(self) -> QuerySet:
4849
)
4950

5051
def __generate_instance(self):
51-
commit_pattern = r'(((?P<repo>(https|http):\/\/(bitbucket|github|gitlab)\.(org|com)\/(?P<owner>[^\/]+)\/(?P<project>[^\/]*))\/(commit|commits)\/(?P<hash>\w+)#?)+)'
52+
commit_pattern = r"(((?P<repo>(https|http):\/\/(bitbucket|github|gitlab)\.(org|com)\/(?P<owner>[^\/]+)\/(?P<project>[^\/]*))\/(commit|commits)\/(?P<hash>\w+)#?)+)"
5253
for ref in self.interesting_references:
5354
commit_groups = re.search(commit_pattern, ref.url)
5455
yield Commit(
5556
reference=ref,
56-
hash=commit_groups.group('hash'),
57+
hash=commit_groups.group("hash"),
5758
)
5859

5960
def __insert_bulk(self) -> None:

vulnerabilities/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ class Commit(models.Model):
907907
chain_urls = models.JSONField(
908908
default=list,
909909
help_text="List of URLS used to reach the commit",
910-
blank = True,
910+
blank=True,
911911
)
912912

913913
class Meta:

0 commit comments

Comments
 (0)