Updates Black and Flake8 config

This commit is contained in:
Fabien LOISON 2021-04-06 15:58:23 +02:00
parent 583217064e
commit 4fe8d8a75d
No known key found for this signature in database
GPG Key ID: FF90CA148348048E
4 changed files with 10 additions and 3 deletions

3
.flake8 Normal file
View File

@ -0,0 +1,3 @@
[flake8]
ignore = E203, E241, W503, E501

1
.gitignore vendored
View File

@ -15,3 +15,4 @@ _*.c*
*.dylib
.vscode
.pytest_cache/
*.tags

View File

@ -9,21 +9,21 @@ PYTHON_FILES = [
]
@nox.session
@nox.session(reuse_venv=True)
def lint(session):
session.install("flake8", "black")
session.run("flake8", *PYTHON_FILES)
session.run("black", "--line-length=79", "--check", *PYTHON_FILES)
@nox.session(python=["2.7", "3.7", "3.8", "3.9"])
@nox.session(python=["2.7", "3.7", "3.8", "3.9"], reuse_venv=True)
def test(session):
session.install("pytest")
session.install(".")
session.run("pytest", "-v", "test")
@nox.session
@nox.session(reuse_venv=True)
def gendoc(session):
session.install("sphinx", "sphinx-rtd-theme")
session.install(".")

3
pyproject.toml Normal file
View File

@ -0,0 +1,3 @@
[tool.black]
line-length = 79
target-version = ['py27']