From df5eb499af8b80bbc1a960ef807681e8003a96e4 Mon Sep 17 00:00:00 2001 From: krateng Date: Sun, 10 Apr 2022 17:41:37 +0200 Subject: [PATCH] Added lint configuration and reorganized gitignore --- .gitignore | 18 +++++++++--------- pylintrc | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 9 deletions(-) create mode 100644 pylintrc diff --git a/.gitignore b/.gitignore index efc76ff..7e6010c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,14 @@ -# generic temporary / dev files +# temporary / generated files *.pyc -*.note -*.xcf -/nohup.out -*-old -/pylintrc -.venv/* -/testdata* -# build +# environments / builds +.venv/* +testdata* /dist /build /*.egg-info + +# dev files +*.xcf +*.note +*-old diff --git a/pylintrc b/pylintrc new file mode 100644 index 0000000..a2596b8 --- /dev/null +++ b/pylintrc @@ -0,0 +1,41 @@ +# no linting is currently enforced, this is just for reference +[MASTER] +disable=C0114,C0115,C0116, # docstrings + W0703, # broad exception catching + W1514, # open without encoding + +[VARIABLES] +allow-global-unused-variables=no + +[BASIC] +argument-naming-style=snake_case +attr-naming-style=snake_case +class-naming-style=PascalCase +const-naming-style=UPPER_CASE +function-naming-style=snake_case +variable-naming-style=snake_case +indent-string='\t' +good-names=i,j,k, # loops + x,y, # dimensions + e # exceptions + +max-line-length=200 +max-module-lines=1000 + +[DESIGN] + +max-args=8 +max-attributes=7 +max-bool-expr=5 +max-branches=12 +max-locals=15 +max-parents=7 +max-public-methods=20 +max-returns=6 +max-statements=50 +min-public-methods=2 + +[EXCEPTIONS] + +overgeneral-exceptions=BaseException, + Exception