Add flynt and --cov-report=term-missing

This commit is contained in:
P. Sai Vinay 2021-09-21 21:48:01 +05:30 committed by GitHub
parent 7aabc88e4a
commit f241ae971a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 9 deletions

View File

@ -889,10 +889,7 @@ class DataFrame(NDFrame):
counts = self.count()
if len(cols) != len(counts): # pragma: no cover
raise AssertionError(
"Columns must equal counts "
"({cols:d} != {counts:d})".format(
cols=len(cols), counts=len(counts)
)
f"Columns must equal counts ({len(cols):d} != {len(counts):d})"
)
count_header = "Non-Null Count"
len_count = len(count_header)

View File

@ -55,10 +55,11 @@ TYPED_FILES = (
@nox.session(reuse_venv=True)
def format(session):
session.install("black", "isort")
session.install("black", "isort", "flynt")
session.run("python", "utils/license-headers.py", "fix", *SOURCE_FILES)
session.run("flynt", *SOURCE_FILES)
session.run("black", "--target-version=py37", *SOURCE_FILES)
session.run("isort", *SOURCE_FILES)
session.run("isort", "--profile=black", *SOURCE_FILES)
lint(session)
@ -70,7 +71,7 @@ def lint(session):
session.install("--pre", "elasticsearch")
session.run("python", "utils/license-headers.py", "check", *SOURCE_FILES)
session.run("black", "--check", "--target-version=py37", *SOURCE_FILES)
session.run("isort", "--check", *SOURCE_FILES)
session.run("isort", "--check", "--profile=black", *SOURCE_FILES)
session.run("flake8", "--ignore=E501,W503,E402,E712,E203", *SOURCE_FILES)
# TODO: When all files are typed we can change this to .run("mypy", "--strict", "eland/")
@ -107,8 +108,7 @@ def test(session, pandas_version: str):
"python",
"-m",
"pytest",
"--cov-report",
"term-missing",
"--cov-report=term-missing",
"--cov=eland/",
"--cov-config=setup.cfg",
"--doctest-modules",

View File

@ -6,3 +6,4 @@ plugins = numpy.typing.mypy_plugin
exclude_lines=
@abstractmethod
if TYPE_CHECKING:
raise NotImplementedError*