Move flake8 config from toml to .flake8 as flake8 does not play nice with pyproject.toml and add pre-commit hook for flake8

This commit is contained in:
Cosmin Ciocan
2024-01-12 17:45:37 +01:00
parent ee68b4025b
commit 182e3519ad
9 changed files with 31 additions and 33 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
from .plugin import NVCCPlugin, load_ipython_extension
from .plugin import NVCCPlugin, load_ipython_extension # noqa: F401
__version__ = "1.0.2"
+4 -4
View File
@@ -5,7 +5,7 @@ def get_parser_cuda() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
description=(
"%%cuda magic that compiles and runs CUDA C++ code in this cell."
" See https://nvcc4jupyter.readthedocs.io/en/latest/magics.html#cuda"
" See https://nvcc4jupyter.readthedocs.io/en/latest/magics.html#cuda" # noqa: E501
" for usage details."
)
)
@@ -20,7 +20,7 @@ def get_parser_cuda_group_run() -> argparse.ArgumentParser:
parser.description = (
"%%cuda_group_run magic that compiles and runs source files in a given"
" group. See"
" https://nvcc4jupyter.readthedocs.io/en/latest/magics.html#cuda-group-run"
" https://nvcc4jupyter.readthedocs.io/en/latest/magics.html#cuda-group-run" # noqa: E501
" for usage details."
)
parser.add_argument("-g", "--group", type=str, required=True)
@@ -32,7 +32,7 @@ def get_parser_cuda_group_save() -> argparse.ArgumentParser:
description=(
"%%cuda_group_save magic that saves CUDA C++ code in this cell for"
" later compilation and execution with possibly more source files."
" See https://nvcc4jupyter.readthedocs.io/en/latest/magics.html#cuda-group-save"
" See https://nvcc4jupyter.readthedocs.io/en/latest/magics.html#cuda-group-save" # noqa: E501
" for usage details."
)
)
@@ -45,7 +45,7 @@ def get_parser_cuda_group_delete() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
description=(
"%%cuda_group_delete magic that deletes all files in a group. See"
" https://nvcc4jupyter.readthedocs.io/en/latest/magics.html#cuda-group-delete"
" https://nvcc4jupyter.readthedocs.io/en/latest/magics.html#cuda-group-delete" # noqa: E501
" for usage details."
)
)
+2 -2
View File
@@ -17,8 +17,8 @@ SHARED_GROUP_NAME = "shared"
def print_out(out: str):
for l in out.split("\n"):
print(l)
for line in out.split("\n"):
print(line)
@magics_class