Skip to content

Commit

Permalink
Fix remaining flake8 references
Browse files Browse the repository at this point in the history
  • Loading branch information
ndevenish committed Jun 7, 2024
1 parent 211a2ba commit 13cc831
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .azure-pipelines/lint-validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

failures = 0
try:
flake8 = subprocess.run(
process = subprocess.run(
[
"ruff",
"check",
Expand All @@ -18,14 +18,14 @@
)
except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as e:
print(
"##vso[task.logissue type=error;]flake8 validation failed with",
"##vso[task.logissue type=error;]Ruff validation failed with",
str(e.__class__.__name__),
)
print(e.stdout)
print(e.stderr)
print("##vso[task.complete result=Failed;]flake8 validation failed")
print("##vso[task.complete result=Failed;]Ruff validation failed")
exit()
for line in flake8.stdout.split("\n"):
for line in process.stdout.split("\n"):
if ":" not in line:
continue
filename, lineno, column, error = line.split(":", maxsplit=3)
Expand All @@ -38,5 +38,5 @@
)

if failures:
print(f"##vso[task.logissue type=warning]Found {failures} flake8 violation(s)")
print(f"##vso[task.complete result=Failed;]Found {failures} flake8 violation(s)")
print(f"##vso[task.logissue type=warning]Found {failures} Ruff violation(s)")
print(f"##vso[task.complete result=Failed;]Found {failures} Ruff violation(s)")

0 comments on commit 13cc831

Please sign in to comment.