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
17 changes: 17 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI

on:
pull_request:
branches: [ main ]

jobs:
Code-Quality-Checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Run linter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've also used pydocstyle during development which enforces PEP357 (docstring validations). AFAIK pylint does not support that one so we need to run both tools in the linter, one for coding style and one for docstrings.

Also I'm okay with us switching to pylint but then you need to remove the pycodestyle dependency since it does the same thing essentially.

run: bash run_linter.sh
84 changes: 84 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[MESSAGES CONTROL]

disable=apply-builtin,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our maximum line length setting is 120 characters since 80 is too restrictive, can you also disable the 80 character check?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That standard is a carry-over from dependency analytics btw.

backtick,
bad-continuation,
bad-inline-option,
basestring-builtin,
buffer-builtin,
cmp-builtin,
cmp-method,
coerce-builtin,
coerce-method,
comprehension-escape,
delslice-method,
deprecated-itertools-function,
deprecated-operator-function,
deprecated-pragma,
deprecated-str-translate-call,
deprecated-string-function,
deprecated-sys-function,
deprecated-types-field,
deprecated-urllib-function,
dict-items-not-iterating,
dict-iter-method,
dict-keys-not-iterating,
dict-values-not-iterating,
dict-view-method,
div-method,
exception-message-attribute,
execfile-builtin,
file-builtin,
file-ignored,
filter-builtin-not-iterating,
getslice-method,
hex-method,
idiv-method,
import-error,
import-star-module-level,
indexing-exception,
input-builtin,
intern-builtin,
invalid-str-codec,
locally-disabled,
long-builtin,
long-suffix,
map-builtin-not-iterating,
metaclass-assignment,
next-method-called,
next-method-defined,
no-absolute-import,
no-member,
non-ascii-bytes-literal,
nonzero-method,
oct-method,
old-division,
old-ne-operator,
old-octal-literal,
old-raise-syntax,
parameter-unpacking,
raising-string,
range-builtin-not-iterating,
raw-checker-failed,
raw_input-builtin,
rdiv-method,
reduce-builtin,
reload-builtin,
round-builtin,
setslice-method,
standarderror-builtin,
suppressed-message,
sys-max-int,
too-few-public-methods,
unichr-builtin,
unicode-builtin,
unpacking-in-except,
use-symbolic-message-instead,
useless-suppression,
using-cmp-argument,
wrong-import-order,
xrange-builtin,
xreadlines-attribute,
zip-builtin-not-iterating


1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pydocstyle = "*"
pycodestyle = "*"
pytest-mock = "*"
pytest-cov = "*"
pylint = "*"

[requires]
python_version = "3.8"
Loading