chore: bump style, more in pyproject.toml
This commit is contained in:
+18
-7
@@ -14,7 +14,7 @@ repos:
|
|||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
|
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v2.19.1
|
rev: v2.19.4
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
name: PyUpgrade 3.6+
|
name: PyUpgrade 3.6+
|
||||||
@@ -31,7 +31,7 @@ repos:
|
|||||||
- id: isort
|
- id: isort
|
||||||
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 21.5b2
|
rev: 21.6b0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
|
|
||||||
@@ -42,17 +42,28 @@ repos:
|
|||||||
stages: [manual]
|
stages: [manual]
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
rev: v0.812
|
rev: v0.902
|
||||||
hooks:
|
hooks:
|
||||||
- id: mypy
|
- id: mypy
|
||||||
exclude: ^(bin/|cibuildwheel/resources/).*py$
|
exclude: ^(bin/|cibuildwheel/resources/).*py$
|
||||||
additional_dependencies: [packaging]
|
args: ["--python-version=3.6", "--scripts-are-modules"]
|
||||||
args: ["--python-version=3.6", "--ignore-missing-imports", "--scripts-are-modules"]
|
additional_dependencies:
|
||||||
|
- packaging
|
||||||
|
- types-jinja2
|
||||||
|
- types-certifi
|
||||||
|
- types-toml
|
||||||
- id: mypy
|
- id: mypy
|
||||||
name: mypy 3.7+ on bin/
|
name: mypy 3.7+ on bin/
|
||||||
files: ^bin/.*py$
|
files: ^bin/.*py$
|
||||||
additional_dependencies: [packaging]
|
args: ["--python-version=3.7", "--scripts-are-modules"]
|
||||||
args: ["--python-version=3.7", "--ignore-missing-imports", "--scripts-are-modules"]
|
additional_dependencies:
|
||||||
|
- packaging
|
||||||
|
- rich
|
||||||
|
- types-jinja2
|
||||||
|
- types-pyyaml
|
||||||
|
- types-click
|
||||||
|
- types-requests
|
||||||
|
- types-toml
|
||||||
|
|
||||||
- repo: https://github.com/PyCQA/flake8
|
- repo: https://github.com/PyCQA/flake8
|
||||||
rev: 3.9.2
|
rev: 3.9.2
|
||||||
|
|||||||
@@ -6,6 +6,66 @@ requires = [
|
|||||||
|
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
|
||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 100
|
line-length = 100
|
||||||
target-version = ['py36', 'py37', 'py38', 'py39']
|
target-version = ['py36', 'py37', 'py38', 'py39']
|
||||||
|
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
profile = "black"
|
||||||
|
multi_line_output = 3
|
||||||
|
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
junit_family = "xunit2"
|
||||||
|
testpaths = [
|
||||||
|
"test",
|
||||||
|
"unit_test",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
[tool.mypy]
|
||||||
|
minversion = 6.0
|
||||||
|
python_version = 3.7
|
||||||
|
files = [
|
||||||
|
"cibuildwheel/*.py",
|
||||||
|
"test/**/*.py",
|
||||||
|
"unit_test/**/*.py",
|
||||||
|
"bin/*.py"
|
||||||
|
]
|
||||||
|
warn_unused_configs = true
|
||||||
|
warn_redundant_casts = true
|
||||||
|
|
||||||
|
# Don't require typed functions for tests
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = ["test", "unit_test"]
|
||||||
|
check_untyped_defs = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = "cibuildwheel"
|
||||||
|
disallow_any_generics = true
|
||||||
|
disallow_subclassing_any = true
|
||||||
|
disallow_untyped_calls = true
|
||||||
|
disallow_untyped_defs = true
|
||||||
|
disallow_incomplete_defs = true
|
||||||
|
check_untyped_defs = true
|
||||||
|
disallow_untyped_decorators = true
|
||||||
|
no_implicit_optional = true
|
||||||
|
warn_unused_ignores = true
|
||||||
|
warn_return_any = true
|
||||||
|
no_implicit_reexport = true
|
||||||
|
strict_equality = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = [
|
||||||
|
"setuptools",
|
||||||
|
"pytest", # ignored in pre-commit to speed up check
|
||||||
|
"bashlex",
|
||||||
|
"toml.encoder", # missing from stub package
|
||||||
|
"bracex",
|
||||||
|
"importlib_resources",
|
||||||
|
"nox",
|
||||||
|
"github",
|
||||||
|
]
|
||||||
|
ignore_missing_imports = true
|
||||||
|
|||||||
@@ -65,57 +65,3 @@ exclude =
|
|||||||
env??/,
|
env??/,
|
||||||
.venv/,
|
.venv/,
|
||||||
site/
|
site/
|
||||||
|
|
||||||
[tool:pytest]
|
|
||||||
junit_family = xunit2
|
|
||||||
testpaths =
|
|
||||||
test
|
|
||||||
unit_test
|
|
||||||
|
|
||||||
[mypy]
|
|
||||||
python_version = 3.7
|
|
||||||
files = cibuildwheel/*.py,test/**/*.py,unit_test/**/*.py,bin/*.py
|
|
||||||
warn_unused_configs = True
|
|
||||||
warn_redundant_casts = True
|
|
||||||
|
|
||||||
[mypy-test.*,mypy-unit_test.*]
|
|
||||||
check_untyped_defs = True
|
|
||||||
|
|
||||||
[mypy-cibuildwheel.*]
|
|
||||||
disallow_any_generics = True
|
|
||||||
disallow_subclassing_any = True
|
|
||||||
disallow_untyped_calls = True
|
|
||||||
disallow_untyped_defs = True
|
|
||||||
disallow_incomplete_defs = True
|
|
||||||
check_untyped_defs = True
|
|
||||||
disallow_untyped_decorators = True
|
|
||||||
no_implicit_optional = True
|
|
||||||
warn_unused_ignores = True
|
|
||||||
warn_return_any = True
|
|
||||||
no_implicit_reexport = True
|
|
||||||
strict_equality = True
|
|
||||||
|
|
||||||
[mypy-setuptools.*]
|
|
||||||
ignore_missing_imports = True
|
|
||||||
|
|
||||||
# Ignored for pre-commit to speed up check
|
|
||||||
# Not ignored if manually running and pytest installed
|
|
||||||
[mypy-pytest.*]
|
|
||||||
ignore_missing_imports = True
|
|
||||||
|
|
||||||
[mypy-bashlex.*]
|
|
||||||
ignore_missing_imports = True
|
|
||||||
|
|
||||||
# Has type stubs, but no pyproject.toml or .pyi files in the wheel.
|
|
||||||
[mypy-toml.*]
|
|
||||||
ignore_missing_imports = True
|
|
||||||
|
|
||||||
[mypy-bracex.*]
|
|
||||||
ignore_missing_imports = True
|
|
||||||
|
|
||||||
[mypy-importlib_resources.*]
|
|
||||||
ignore_missing_imports = True
|
|
||||||
|
|
||||||
[tool:isort]
|
|
||||||
profile = black
|
|
||||||
multi_line_output = 3
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ extras = {
|
|||||||
],
|
],
|
||||||
"test": [
|
"test": [
|
||||||
"jinja2",
|
"jinja2",
|
||||||
"pytest>=4",
|
"pytest>=6",
|
||||||
"pytest-timeout",
|
"pytest-timeout",
|
||||||
],
|
],
|
||||||
"bin": [
|
"bin": [
|
||||||
@@ -24,7 +24,7 @@ extras = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extras["dev"] = [
|
extras["dev"] = [
|
||||||
"mypy>=0.800",
|
"mypy>=0.901",
|
||||||
*extras["test"],
|
*extras["test"],
|
||||||
*extras["bin"],
|
*extras["bin"],
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user