Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ jobs:
python-version: '3.13'

- name: Install dependencies
run: python -m pip install --upgrade pip pylint

- name: Run Pylint
run: pylint --rcfile=tests/.pylintrc $(find tests -name "*.py")

run: |
python -m pip install --upgrade pip
pip install pylint

- name: Run Pylint on application code
run: pylint --rcfile=tests/.pylintrc endpoints/

- name: Run Pylint on tests
run: pylint --rcfile=tests/.pylintrc tests/


68 changes: 62 additions & 6 deletions tests/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
# Set the Python version
py-version=3.13

# Specify pickle analysis path
persistent=yes
limit-inference-results=100

# Add ability to load C extensions for analysis
extension-pkg-whitelist=boto3,psycopg

# Parallelize analysis for faster runs
jobs=0

[MESSAGES CONTROL]
disable=
invalid-name,
Expand All @@ -11,24 +21,70 @@ disable=
too-many-branches,
too-many-statements,
too-many-instance-attributes,
missing-module-docstring,
missing-function-docstring,
fixme,
line-too-long,

# Re-enable some important checks
enable=
unused-import,
unused-variable,
undefined-variable,
syntax-error,
dangerous-default-value

[BASIC]
good-names=i,j,k,x,y,z,_
# Good variable names which should always be accepted
good-names=i,j,k,x,y,z,e,_,id,db,fp,fn

# Regular expression which should match good variable names
variable-rgx=[a-z_][a-z0-9_]{0,30}$

# Regular expression which should match good class names
class-rgx=[A-Z_][a-zA-Z0-9_]+$

# Regular expression which should match good function names
function-rgx=[a-z_][a-z0-9_]{0,30}$

[FORMAT]
# Set max line length to a loose standard
max-line-length=200
max-line-length=100

# Check string quote consistency
string-quote=single
triple-quote=double
docstring-quote=double

[DESIGN]
# Allow higher complexity before warnings
max-attributes=10
max-attributes=12
max-args=10
max-locals=20
max-locals=25
max-returns=10
max-branches=15
max-statements=50
max-branches=20
max-statements=60
max-complexity=15

[TYPECHECK]
disable=
no-member,
no-self-use

# Generated members that we don't want to check
generated-members=REQUEST,acl_users,aq_parent,objects,DoesNotExist,id,pk

[SIMILARITIES]
# Minimum lines number of a similarity
min-similarity-lines=10

# Ignore imports when computing similarities
ignore-imports=yes

[LOGGING]
# Format style of string formatting
logging-format-style=new

[IMPORTS]
# Deprecated modules to warn about
deprecated-modules=optparse,tkinter.tix
Loading