mirror of https://github.com/wanadev/yoga.git
Updates Black and Flake8 config
This commit is contained in:
parent
583217064e
commit
4fe8d8a75d
|
@ -15,3 +15,4 @@ _*.c*
|
|||
*.dylib
|
||||
.vscode
|
||||
.pytest_cache/
|
||||
*.tags
|
||||
|
|
|
@ -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(".")
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[tool.black]
|
||||
line-length = 79
|
||||
target-version = ['py27']
|
Loading…
Reference in New Issue