Files
oslo.cache/pyproject.toml
Stephen Finucane 2b6936444d Add mypy
Now that we have typing in-tree.

Change-Id: I58d782041fda54fd7b7089abba93f2bdae79493f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-10-09 11:20:43 +00:00

109 lines
2.8 KiB
TOML

[build-system]
requires = ["pbr>=6.1.1"]
build-backend = "pbr.build"
[project]
name = "oslo.cache"
description = "Cache storage for OpenStack projects."
authors = [
{name = "OpenStack", email = "openstack-discuss@lists.openstack.org"},
]
readme = {file = "README.rst", content-type = "text/x-rst"}
license = {text = "Apache-2.0"}
dynamic = ["version", "dependencies"]
requires-python = ">=3.10"
classifiers = [
"Environment :: OpenStack",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[project.urls]
Homepage = "https://docs.openstack.org/oslo.cache"
Repository = "https://opendev.org/openstack/oslo.cache"
[project.optional-dependencies]
dogpile = [
"python-memcached>=1.56", # PSF
"pymemcache>=3.5.0", # Apache-2.0
"python-binary-memcached>=0.29.0", # MIT
"redis>=3.0.0", # MIT
]
etcd3gw = [
"etcd3gw>=0.2.0", # Apache-2.0
]
[project.entry-points."oslo.config.opts"]
"oslo.cache" = "oslo_cache._opts:list_opts"
[project.entry-points."dogpile.cache"]
"oslo_cache.memcache_pool" = "oslo_cache.backends.memcache_pool:PooledMemcachedBackend"
"oslo_cache.dict" = "oslo_cache.backends.dictionary:DictCacheBackend"
"oslo_cache.etcd3gw" = "oslo_cache.backends.etcd3gw:Etcd3gwCacheBackend"
[tool.setuptools]
packages = [
"oslo_cache"
]
[tool.ruff]
line-length = 79
[tool.ruff.format]
quote-style = "preserve"
docstring-code-format = true
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "S", "U"]
ignore = [
"S101", # asserts are only used for type narrowing
]
[tool.ruff.lint.per-file-ignores]
"oslo_cache/tests/*" = ["S"]
[tool.mypy]
python_version = "3.10"
show_column_numbers = true
show_error_context = true
ignore_missing_imports = true
follow_imports = "normal"
check_untyped_defs = true
warn_unused_ignores = false
warn_return_any = true
warn_unused_configs = true
warn_redundant_casts = true
strict_equality = true
disallow_untyped_decorators = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_reexport = true
extra_checks = true
# keep this in-sync with 'mypy.exclude' in '.pre-commit-config.yaml'
exclude = '''
(?x)(
doc
| releasenotes
)
'''
[[tool.mypy.overrides]]
module = ["oslo_cache.tests.*"]
warn_return_any = false
disallow_untyped_decorators = false
disallow_any_generics = false
disallow_subclassing_any = false
disallow_untyped_calls = false
disallow_untyped_defs = false