style: pylint (#3720)

* fix: add pylint and fix issue

* chore: add pylint to pre-commit

* fix: local variable warning surfaced mistake in intree
This commit is contained in:
Henry Schreiner
2022-02-15 17:48:33 -05:00
committed by GitHub
parent c14170a787
commit 4b42c37191
9 changed files with 126 additions and 35 deletions

View File

@@ -1,8 +1,13 @@
import os
import nox
nox.options.sessions = ["lint", "tests", "tests_packaging"]
PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
PYTHON_VERISONS = ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.7", "pypy3.8"]
if os.environ.get("CI", None):
nox.options.error_on_missing_interpreters = True
@nox.session(reuse_venv=True)
@@ -14,7 +19,7 @@ def lint(session: nox.Session) -> None:
session.run("pre-commit", "run", "-a")
@nox.session(python=PYTHON_VERSIONS)
@nox.session(python=PYTHON_VERISONS)
def tests(session: nox.Session) -> None:
"""
Run the tests (requires a compiler).