fix: flake8

This commit is contained in:
debugtalk
2021-12-28 14:58:22 +08:00
parent 3b13f0b6db
commit 7d8234d7c8
2 changed files with 4 additions and 4 deletions

View File

@@ -450,4 +450,4 @@ def convert_relative_project_root_dir(abs_path: Text) -> Text:
f"project_meta.RootDir: {_project_meta.RootDir}"
)
return abs_path[len(_project_meta.RootDir) + 1 :]
return abs_path[len(_project_meta.RootDir) + 1:]

View File

@@ -80,10 +80,10 @@ if __name__ == "__main__":
def __ensure_absolute(path: Text) -> Text:
if path.startswith("./"):
# Linux/Darwin, hrun ./test.yml
path = path[len("./") :]
path = path[len("./"):]
elif path.startswith(".\\"):
# Windows, hrun .\\test.yml
path = path[len(".\\") :]
path = path[len(".\\"):]
path = ensure_path_sep(path)
project_meta = load_project_meta(path)
@@ -173,7 +173,7 @@ def format_pytest_with_black(*python_paths: Text) -> NoReturn:
subprocess.run(["black", *python_paths])
else:
logger.warning(
f"this system does not support multiprocessing well, format files one by one ..."
"this system does not support multiprocessing well, format files one by one ..."
)
[subprocess.run(["black", path]) for path in python_paths]
except subprocess.CalledProcessError as ex: