Skip to content

Commit

Permalink
Merge pull request #5361 from cclauss/move-more-config-to-pyproject.toml
Browse files Browse the repository at this point in the history
Migrate isort, mypy, and pytest config into pyproject.toml
  • Loading branch information
oz123 authored Sep 17, 2022
2 parents 9fe4b68 + 8043eca commit b434039
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 43 deletions.
46 changes: 46 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,52 @@ exclude = '''
)
'''

[tool.isort]
atomic = true
lines_after_imports = 2
lines_between_types = 1
multi_line_output = 5
line_length = 80
known_first_party = [
"pipenv",
"tests",
]

[tool.mypy]
ignore_missing_imports = true
follow_imports = "skip"
html_report = "mypyhtml"
python_version = "3.7"
mypy_path = "typeshed/pyi:typeshed/imports"

[tool.pytest.ini_options]
addopts = "-ra"
plugins = "xdist"
testpaths = ["tests"]
# Add vendor and patched in addition to the default list of ignored dirs
# Additionally, ignore tasks, news, test subdirectories and peeps directory
norecursedirs = [
".*", "build",
"dist",
"CVS",
"_darcs",
"{arch}",
"*.egg",
"vendor",
"patched",
"news",
"tasks",
"docs",
"tests/test_artifacts",
"tests/pytest-pypi",
"tests/pypi",
"peeps",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]

[tool.towncrier]
package = "pipenv"
filename = "CHANGELOG.rst"
Expand Down
44 changes: 1 addition & 43 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ long_description = file: README.md
license = MIT
license_files = LICENSE

# Currently flake8 does not support pyproject.toml
[flake8]
extend-exclude =
docs/,
Expand All @@ -26,49 +27,6 @@ ignore =
# W503: line break before binary operator
E402,E501,W503,E203

[isort]
atomic=true
lines_after_imports=2
lines_between_types=1
multi_line_output=5
line_length=80
known_first_party =
pipenv
tests

[mypy]
ignore_missing_imports=true
follow_imports=skip
html_report=mypyhtml
python_version=3.7
mypy_path=typeshed/pyi:typeshed/imports

[tool:pytest]
addopts = -ra
plugins = xdist
testpaths = tests
; Add vendor and patched in addition to the default list of ignored dirs
; Additionally, ignore tasks, news, test subdirectories and peeps directory
norecursedirs =
.* build
dist
CVS
_darcs
{arch}
*.egg
vendor
patched
news
tasks
docs
tests/test_artifacts
tests/pytest-pypi
tests/pypi
peeps
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning

[coverage:run]
parallel = true

Expand Down

0 comments on commit b434039

Please sign in to comment.