Skip to content

Commit 50a9fc6

Browse files
chore: move coverage, flake8 and pylint configuration to pyproject.toml (e3nn#425)
1 parent a221b2a commit 50a9fc6

File tree

7 files changed

+68
-49
lines changed

7 files changed

+68
-49
lines changed

.coveragerc

-8
This file was deleted.

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
python-version: ${{ matrix.python-version }}
2727
- name: Install flake8
2828
run: |
29-
pip install flake8
29+
pip install flake8 Flake8-pyproject
3030
- name: Lint with flake8
3131
run: |
3232
# Stop the build if there are style issues, Python syntax errors, or undefined names

.pre-commit-config.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ repos:
4343
]
4444
exclude: *exclude_files
4545

46-
- repo: https://github.com/pycqa/flake8
47-
rev: '3.9.2'
46+
- repo: https://github.com/PyCQA/flake8
47+
rev: 6.1.0
4848
hooks:
49-
- id: flake8
49+
- id: flake8
50+
name: Check PEP8
51+
additional_dependencies: [Flake8-pyproject]

.pylintrc

-29
This file was deleted.

ChangeLog.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88
### Added
9+
- move `pylint`, `coverage` and `flake8` configuration to `pyproject.toml`
910
- Optional scalar bias term in `_batchnorm.py`
1011

1112
## [0.5.1] - 2022-12-12

pyproject.toml

+61
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,64 @@ exclude = '''
1515
| dist
1616
)/
1717
'''
18+
19+
[tool.flake8]
20+
max-line-length = 127
21+
max-complexity = 21
22+
select = ["B", "C", "E", "F", "W", "T4", "B9"]
23+
ignore = [
24+
"E741",
25+
"E203",
26+
"W503",
27+
"C901"
28+
]
29+
exclude = [
30+
".eggs",
31+
"*.egg",
32+
"build",
33+
"dist",
34+
"docs/_build",
35+
"notebook"
36+
]
37+
per-file-ignores = [
38+
"e3nn/o3/cartesian_spherical_harmonics.py: E226",
39+
]
40+
41+
[tool.coverage.run]
42+
source = ["e3nn"]
43+
44+
[tool.coverage.report]
45+
exclude_lines = [
46+
"pragma: no cover",
47+
"torch.jit.script",
48+
"raise",
49+
"except",
50+
]
51+
52+
[tool.pylint.typecheck]
53+
generated-members = "numpy.*,torch.*"
54+
55+
[tool.pylint."messages control"]
56+
disable = [
57+
"protected-access",
58+
"no-else-return",
59+
"raise-missing-from",
60+
"invalid-name",
61+
"duplicate-code",
62+
"import-outside-toplevel",
63+
"missing-docstring",
64+
"bad-continuation",
65+
"locally-disabled",
66+
"too-few-public-methods",
67+
"too-many-arguments",
68+
"too-many-instance-attributes",
69+
"too-many-local-variables",
70+
"too-many-locals",
71+
"too-many-branches",
72+
"too-many-statements",
73+
"too-many-return-statements",
74+
"redefined-builtin",
75+
"redefined-outer-name",
76+
"line-too-long",
77+
"fixme",
78+
]

setup.cfg

-8
This file was deleted.

0 commit comments

Comments
 (0)