1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
|
[build-system]
requires = ['hatchling']
build-backend = 'hatchling.build'
[tool.hatch.version]
path = 'pydantic_extra_types/__init__.py'
[project]
name = 'pydantic-extra-types'
description = 'Extra Pydantic types.'
authors = [
{ name = 'Samuel Colvin', email = 's@muelcolvin.com' },
{ name = 'Yasser Tahiri', email = 'hello@yezz.me' },
]
license = 'MIT'
readme = 'README.md'
classifiers = [
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: Unix',
'Operating System :: POSIX :: Linux',
'Environment :: Console',
'Environment :: MacOS X',
'Framework :: Pydantic',
'Framework :: Pydantic :: 2',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Internet',
]
requires-python = '>=3.9'
dependencies = ['pydantic>=2.5.2','typing-extensions']
dynamic = ['version']
[project.optional-dependencies]
all = [
'phonenumbers>=8,<10',
'pycountry>=23',
'semver>=3.0.2',
'python-ulid>=1,<2; python_version<"3.9"',
'python-ulid>=1,<4; python_version>="3.9"',
'pendulum>=3.0.0,<4.0.0',
'pymongo>=4.0.0,<5.0.0',
'pytz>=2024.1',
'semver~=3.0.2',
'tzdata>=2024.1',
"cron-converter>=1.2.2",
]
phonenumbers = ['phonenumbers>=8,<10']
pycountry = ['pycountry>=23']
semver = ['semver>=3.0.2']
python_ulid = [
'python-ulid>=1,<2; python_version<"3.9"',
'python-ulid>=1,<4; python_version>="3.9"',
]
pendulum = ['pendulum>=3.0.0,<4.0.0']
cron = ['cron-converter>=1.2.2']
[dependency-groups]
dev = [
"coverage[toml]>=7.6.1",
"pytest-pretty>=1.2.0",
"dirty-equals>=0.7.1",
"pytest>=8.3.2",
]
lint = [
"ruff>=0.7.4",
"mypy>=0.910",
"annotated-types>=0.7.0",
"types-pytz>=2024.1.0.20240417",
]
extra = [
{ include-group = 'dev' },
{ include-group = 'lint' },
]
[project.urls]
Homepage = 'https://github.com/pydantic/pydantic-extra-types'
Source = 'https://github.com/pydantic/pydantic-extra-types'
Changelog = 'https://github.com/pydantic/pydantic-extra-types/releases'
Documentation = 'https://docs.pydantic.dev/latest/'
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
[tool.ruff]
line-length = 120
target-version = 'py39'
[tool.ruff.lint]
extend-select = [
"Q",
"RUF100",
"C90",
"UP",
"I",
]
flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'double' }
isort = {known-first-party = ['pydantic_extra_types', 'tests'] }
mccabe = { max-complexity = 14 }
pydocstyle = { convention = 'google' }
[tool.ruff.format]
docstring-code-format = true
quote-style = "single"
[tool.ruff.lint.per-file-ignores]
'pydantic_extra_types/color.py' = ['E741']
[tool.coverage.run]
source = ['pydantic_extra_types']
branch = true
context = '${CONTEXT}'
[tool.coverage.paths]
source = [
'pydantic_extra_types/',
'/Users/runner/work/pydantic-extra-types/pydantic-extra-types/pydantic_extra_types/',
'D:\a\pydantic-extra-types\pydantic-extra-types\pydantic_extra_types',
]
[tool.coverage.report]
precision = 2
fail_under = 100
show_missing = true
skip_covered = true
exclude_lines = [
'pragma: no cover',
'raise NotImplementedError',
'if TYPE_CHECKING:',
'@overload',
]
[tool.mypy]
strict = true
plugins = 'pydantic.mypy'
[tool.pytest.ini_options]
filterwarnings = [
'error',
# This ignore will be removed when pycountry will drop py36 & support py311
'ignore:::pkg_resources',
# This ignore will be removed when pendulum fixes https://github.com/sdispater/pendulum/issues/834
'ignore:datetime.datetime.utcfromtimestamp.*:DeprecationWarning',
' ignore:Use from pydantic_extra_types.semver import SemanticVersion instead. Will be removed in 3.0.0.:DeprecationWarning',
# pydantic-core >= 2.34.0
'ignore:The `field_name` argument on `with_info_after_validator_function` is deprecated:DeprecationWarning',
]
# configuring https://github.com/pydantic/hooky
[tool.hooky]
reviewers = ['yezz123', 'Kludex']
require_change_file = false
|