From 960ab543cf3c6c2cffc587da8bbe3f25515c9abe Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Tue, 18 Apr 2023 05:12:58 -0400 Subject: [PATCH] style: add format checker config that matches FRR style standards Also move .dir-locals.el to a sample file. This file should not be in the repository as it affects the user's ability to modify it. Signed-off-by: Christian Hopps --- .flake8 | 3 +++ .gitignore | 1 + .isort.cfg | 2 ++ .pylintrc | 3 +++ .dir-locals.el => tools/emacs.dir-locals.el | 0 5 files changed, 9 insertions(+) create mode 100644 .flake8 create mode 100644 .isort.cfg rename .dir-locals.el => tools/emacs.dir-locals.el (100%) diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000000..e0ea542fd2 --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 88 +extend-ignore = E203 \ No newline at end of file diff --git a/.gitignore b/.gitignore index fb40ee52fe..3dd6a44409 100644 --- a/.gitignore +++ b/.gitignore @@ -87,6 +87,7 @@ {arch} build .cache +.dir-locals.el .msg .rebase-* *~ diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 0000000000..f238bf7ea1 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,2 @@ +[settings] +profile = black diff --git a/.pylintrc b/.pylintrc index 83a7197481..ba9430ba6b 100644 --- a/.pylintrc +++ b/.pylintrc @@ -2,5 +2,8 @@ init-hook="import sys; sys.path.insert(0, '..')" signature-mutators=common_config.retry,retry +[FORMAT] +max-line-length = 88 + [MESSAGES CONTROL] disable=I,C,R,W diff --git a/.dir-locals.el b/tools/emacs.dir-locals.el similarity index 100% rename from .dir-locals.el rename to tools/emacs.dir-locals.el