Skip to content

Commit 9cac48c

Browse files
authored
Module template retrofit: Update Python project metadata and tool configuration (#146)
1 parent f39068a commit 9cac48c

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
requires = ["setuptools>=39.2.0", "wheel"]
33
build-backend = "setuptools.build_meta"
44

5+
[tool.isort]
6+
profile = "black"
7+
known_first_party = [
8+
"ldap_auth_provider",
9+
"tests"
10+
]
11+
512
[tool.check-manifest]
613
ignore = [
714
"scripts-dev/lint.sh"

setup.cfg

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,35 @@ install_requires =
1414
Twisted>=15.1.0
1515
ldap3>=2.8
1616
service_identity
17+
1718
py_modules = ldap_auth_provider
1819

20+
# TODO We can't enable this until we remove the BuildKite CI, which currently
21+
# uses Python 3.5 for tests.
22+
#python_requires = >= 3.7
23+
24+
[options.extras_require]
25+
dev =
26+
# for tests
27+
matrix-synapse
28+
tox
29+
30+
# for type checking
31+
mypy == 0.910
32+
types-mock
33+
types-setuptools
34+
35+
# for linting
36+
black == 21.9b0
37+
flake8 == 4.0.1
38+
isort == 5.9.3
39+
1940
[flake8]
20-
max-line-length = 90
21-
# W503 requires that binary operators be at the end, not start, of lines. Erik doesn't like it.
22-
ignore = W503
41+
# see https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
42+
# for error codes. The ones we ignore are:
43+
# W503: line break before binary operator
44+
# W504: line break after binary operator
45+
# E203: whitespace before ':' (which is contrary to pep8?)
46+
# E501: Line too long (black enforces this for us)
47+
# (this is a subset of those ignored in Synapse)
48+
ignore=W503,W504,E203,E501

0 commit comments

Comments
 (0)