Skip to content

Commit

Permalink
Switch from pylava to flake8+pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-k committed Jul 16, 2021
1 parent a936014 commit c0c0252
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
ignore = E501,W503
exclude = build
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ jobs:
- name: Check types
run: |
python -m mypy rohrpost
- name: Check code style
- name: Check code with flake8
run: |
python -m pylava .
python -m flake8
- name: Check code with pylint
run: |
python -m pytest --pylint --pylint-rcfile=$(pwd)/pyproject.toml --pylint-jobs=0
- name: Check manifest
run: |
python -m check_manifest
Expand Down
9 changes: 5 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ Daphne_, Django_ and so on. ::

Run tests and style checks in this directory::

py.test
pylava
isort .
black rohrpost tests
python -m pytest
python -m isort .
python -m black rohrpost tests
python -m flake8
python -m pytest --pylint --pylint-rcfile=$(pwd)/pyproject.toml --pylint-jobs=0


.. _ASGI: https://channels.readthedocs.io/en/latest/asgi.html
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

# General information about the project.
project = 'rohrpost'
copyright = '2017, AX semantics'
copyright = '2017, AX semantics' # noqa: A001 # pylint: disable=redefined-builtin
author = 'AX semantics'

# The version info for the project you're documenting, acts as replacement for
Expand Down
3 changes: 0 additions & 3 deletions pylava.ini

This file was deleted.

25 changes: 24 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"

[tool.check-manifest]
ignore = [
".flake8",
"CHANGELOG.rst",
"check_version.sh",
"mypy.ini",
"pylava.ini",
"doc/*",
"requirements/*",
"tests/*",
Expand All @@ -16,3 +16,26 @@ ignore = [
[tool.isort]
balanced_wrapping = true
profile = "black"


[tool.pylint."messages control"]
disable = [
"access-member-before-definition",
"arguments-differ",
"arguments-renamed",
"attribute-defined-outside-init",
"import-outside-toplevel",
"inconsistent-return-statements",
"invalid-name",
"line-too-long",
"missing-docstring",
"missing-format-attribute",
"no-member",
"no-self-use",
"too-few-public-methods",
"too-many-ancestors",
"unnecessary-pass",
"unused-argument",
"unused-import",
"useless-super-delegation",
]
7 changes: 6 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
black>=21.6b0
channels>=3.0
check-manifest>=0.46
flake8~=3.9
flake8-annotations-complexity>=0.0.6
flake8-builtins>=1.5.3
flake8-comprehensions>=3.5.0
isort~=5.9
mypy>=0.910
Pygments~=2.9
pylava~=0.3.0
pylint~=2.9
pytest~=6.2
pytest-cov~=2.12
pytest-pylint>=0.18
types-setuptools>=57.0.0

0 comments on commit c0c0252

Please sign in to comment.