Skip to content

Commit

Permalink
Move configs into pyproject.toml or setup.cfg(flake8) (#484)
Browse files Browse the repository at this point in the history
* Move configs into pyproject.toml or setup.cfg(flake8)

* Drop redundant isort multi-line-output setting
  • Loading branch information
FollowTheProcess committed Sep 25, 2021
1 parent 7f63350 commit e679b77
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 20 deletions.
10 changes: 0 additions & 10 deletions .coveragerc

This file was deleted.

6 changes: 0 additions & 6 deletions .flake8

This file was deleted.

2 changes: 0 additions & 2 deletions .isort.cfg

This file was deleted.

4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def tests(session):
"pytest",
"--cov=nox",
"--cov-config",
".coveragerc",
"pyproject.toml",
"--cov-report=",
*tests,
env={"COVERAGE_FILE": f".coverage.{session.python}"},
Expand Down Expand Up @@ -79,7 +79,7 @@ def cover(session):
if py_version.major == 3 and py_version.minor == 10:
fail_under = 99

session.install("coverage")
session.install("coverage[toml]")
session.run("coverage", "combine")
session.run("coverage", "report", f"--fail-under={fail_under}", "--show-missing")
session.run("coverage", "erase")
Expand Down
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ requires = [
]
build-backend = "setuptools.build_meta"

[tool.isort]
profile = "black"

[tool.coverage.run]
branch = true
omit = [
"nox/_typing.py",
]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if _typing.TYPE_CHECKING:",
"@overload",
]

[tool.mypy]
files = ["nox"]
Expand Down
7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,10 @@ tox_to_nox =

[options.package_data]
nox = py.typed

[flake8]
# Ignore black styles.
ignore = E501, W503, E203
# Imports
import-order-style = google
application-import-names = nox,tests

0 comments on commit e679b77

Please sign in to comment.