Skip to content

Commit 1e3c0a5

Browse files
committed
fix linting errors is tasks.py
Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
1 parent 452bca6 commit 1e3c0a5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tests/RobotFramework/tasks.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
import subprocess
1111
import time
1212
import datetime
13+
from typing import Any
1314

1415
import invoke
15-
from invoke import task
16+
from invoke.tasks import task
1617
from dotenv import load_dotenv
1718

1819

19-
def using_buildx(c: any, binary: str) -> bool:
20+
def using_buildx(c: Any, binary: str) -> bool:
2021
"""Detect if docker buildx is being used
2122
2223
Args:
@@ -40,14 +41,14 @@ class ColourFormatter(logging.Formatter):
4041
red = "\x1b[31;20m"
4142
bold_red = "\x1b[31;1m"
4243
reset = "\x1b[0m"
43-
format = "%(levelname)-8s %(message)s (%(filename)s:%(lineno)d)"
44+
template = "%(levelname)-8s %(message)s (%(filename)s:%(lineno)d)"
4445

4546
FORMATS = {
46-
logging.DEBUG: grey + format + reset,
47-
logging.INFO: grey + format + reset,
48-
logging.WARNING: yellow + format + reset,
49-
logging.ERROR: red + format + reset,
50-
logging.CRITICAL: bold_red + format + reset,
47+
logging.DEBUG: grey + template + reset,
48+
logging.INFO: grey + template + reset,
49+
logging.WARNING: yellow + template + reset,
50+
logging.ERROR: red + template + reset,
51+
logging.CRITICAL: bold_red + template + reset,
5152
}
5253

5354
def format(self, record):
@@ -397,8 +398,7 @@ def flake_finder(
397398

398399
if os.path.exists(outputdir):
399400
if not clean:
400-
# sys.exit(1)
401-
raise invoke.Exit(
401+
raise invoke.exceptions.Exit(
402402
(
403403
"ERROR: Output directory already exists. "
404404
f"Please use --clean if you want to remove it. dir={outputdir}"
@@ -428,7 +428,7 @@ def flake_finder(
428428
exclude=exclude,
429429
)
430430
passed.append(i)
431-
except invoke.exceptions.Failure as ex:
431+
except invoke.exceptions.Failure:
432432
failed.append(i)
433433

434434
duration_sec = time.monotonic() - duration_start

0 commit comments

Comments
 (0)