mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
4a54f393ad
* refactor: extra `BaseConfig` and `Extra` in dedicated `config` module * refactor: clean useless `#noqa: F401` * refactor: clean useless `#noqa: F811` * refactor: replace enum check Error with 3.10 > DeprecationWarning: accessing one member from another is not supported * refactor: avoid using `distutils` directly error with python 3.10 > DeprecationWarning: The distutils package is deprecated and slated > for removal in Python 3.12. > Use setuptools or check PEP 632 for potential alternatives * fix: `__annotations__` always exists * fix: origin of `typing.Hashable` is not `None` * ci: add run with 3.10.0b2 * docs: add 3.10 * feat: support `|` union operator properly `|` operator has origin `types.Union` (and not `typing.Union`) * fix: enum repr is different with 3.10+ * fix: error message changed a bit change from basic `__init__` to `test_hashable_required.<locals>.MyDataclass.__init__()` (with `__qualname__`) * fix: always exists and is not inherited anymore * fix: avoid calling `asyncio.get_event_loop` directly With python 3.10, calling it results in > DeprecationWarning: There is no current event loop * fix(ci): do not run 3.10 on linux for now For now it can not be compiled. Let's just skip the check on linux for now instead of tuning the CI pipeline * fix(ci): ignore DeprecationWarning raised by `mypy` on windows * docs: add change file
78 lines
1.9 KiB
INI
78 lines
1.9 KiB
INI
[tool:pytest]
|
|
testpaths = tests
|
|
addopts = -p no:hypothesispytest
|
|
filterwarnings =
|
|
error
|
|
ignore::DeprecationWarning:distutils
|
|
ignore::DeprecationWarning:Cython
|
|
# for python 3.10+: mypy still relies on distutils on windows. We hence ignore those warnings
|
|
ignore:The distutils package is deprecated and slated for removal in Python 3.12:DeprecationWarning
|
|
ignore:The distutils.sysconfig module is deprecated, use sysconfig instead:DeprecationWarning
|
|
|
|
[flake8]
|
|
max-line-length = 120
|
|
max-complexity = 14
|
|
inline-quotes = single
|
|
multiline-quotes = double
|
|
ignore = E203, W503
|
|
per-file-ignores =
|
|
docs/examples/schema_unenforced_constraints.py: F811
|
|
docs/examples/validation_decorator_async.py: E402
|
|
docs/examples/types_constrained.py: F722
|
|
|
|
[coverage:run]
|
|
source = pydantic
|
|
branch = True
|
|
context = ${CONTEXT}
|
|
|
|
[coverage:report]
|
|
precision = 2
|
|
exclude_lines =
|
|
pragma: no cover
|
|
raise NotImplementedError
|
|
raise NotImplemented
|
|
if TYPE_CHECKING:
|
|
@overload
|
|
|
|
[coverage:paths]
|
|
source =
|
|
pydantic/
|
|
/Users/runner/work/pydantic/pydantic/pydantic/
|
|
D:\a\pydantic\pydantic\pydantic
|
|
|
|
[isort]
|
|
line_length=120
|
|
known_first_party=pydantic
|
|
multi_line_output=3
|
|
include_trailing_comma=True
|
|
force_grid_wrap=0
|
|
combine_as_imports=True
|
|
|
|
[mypy]
|
|
show_error_codes = True
|
|
follow_imports = silent
|
|
strict_optional = True
|
|
warn_redundant_casts = True
|
|
warn_unused_ignores = True
|
|
disallow_any_generics = True
|
|
check_untyped_defs = True
|
|
no_implicit_reexport = True
|
|
warn_unused_configs = True
|
|
disallow_subclassing_any = True
|
|
disallow_incomplete_defs = True
|
|
disallow_untyped_decorators = True
|
|
disallow_untyped_calls = True
|
|
|
|
# for strict mypy: (this is the tricky one :-))
|
|
disallow_untyped_defs = True
|
|
|
|
# remaining arguments from `mypy --strict` which cause errors
|
|
;no_implicit_optional = True
|
|
;warn_return_any = True
|
|
|
|
[mypy-email_validator]
|
|
ignore_missing_imports = true
|
|
|
|
[mypy-dotenv]
|
|
ignore_missing_imports = true
|