Skip to content

Commit 8a702e6

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 0086023 commit 8a702e6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pylint/reporters/sarif_reporter.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,18 @@ def serialize(message: pylint.message.Message) -> Result:
129129

130130

131131
def path_to_uri(path: str) -> str:
132-
"""Converts a relative FS path to a relative URI. Does not check the
132+
"""Converts a relative FS path to a relative URI.
133+
134+
Does not check the
133135
validity of the path.
134136
135137
An alternative would be to use `Path.as_uri` (on concrete path) on both the
136138
artifact path and a reference path, then create a relative URI from this.
137139
"""
138140
if os.path.altsep:
139-
path = path.replace(os.path.altsep, '/')
140-
if os.path.sep != '/':
141-
path = path.replace(os.path.sep, '/')
141+
path = path.replace(os.path.altsep, "/")
142+
if os.path.sep != "/":
143+
path = path.replace(os.path.sep, "/")
142144
return quote(path)
143145

144146

0 commit comments

Comments
 (0)