Files
neutron-lib/pyproject.toml
Brian Haley 9b573f2b4a Bump pre-commit-config versions
Bumped hacking, etc, versions in .pre-commit-config.yaml

Added some additional checks and fixed any complaints
they found.

Also enabled flake8-logging-format (G) rules and fixed
issues it found.

TrivialFix

Change-Id: I2b807e553a1ca312371e573941d71366a717b50a
Signed-off-by: Brian Haley <haleyb.dev@gmail.com>
2026-02-17 13:16:19 -05:00

88 lines
2.8 KiB
TOML

[build-system]
requires = ["pbr>=6.1.1"]
build-backend = "pbr.build"
[project]
name = "neutron-lib"
description = "Neutron shared routines and utilities"
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 = [
"Development Status :: 5 - Production/Stable",
"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",
"Programming Language :: Python :: 3 :: Only",
]
[project.optional-dependencies]
osprofiler = [
"osprofiler>=1.4.0", # Apache-2.0
]
[project.urls]
"Bug Tracker" = "https://bugs.launchpad.net/neutron"
"Documentation" = "https://docs.openstack.org/neutron-lib"
"Source Code" = "https://opendev.org/openstack/neutron-lib"
[project.entry-points."oslo.policy.enforcer"]
neutron_lib = "neutron_lib._policy:get_enforcer"
[project.entry-points."oslo.policy.policies"]
neutron_lib = "neutron_lib._policy:list_rules"
[project.entry-points."flake8.extension"]
N521 = "neutron_lib.hacking.checks:use_jsonutils"
N524 = "neutron_lib.hacking.checks:check_no_contextlib_nested"
N529 = "neutron_lib.hacking.checks:no_mutable_default_args"
N530 = "neutron_lib.hacking.checks:check_neutron_namespace_imports"
N532 = "neutron_lib.hacking.translation_checks:check_log_warn_deprecated"
N534 = "neutron_lib.hacking.translation_checks:check_raised_localized_exceptions"
N536 = "neutron_lib.hacking.checks:assert_equal_none"
N537 = "neutron_lib.hacking.translation_checks:no_translate_logs"
N535 = "neutron_lib.hacking.checks:check_no_eventlet_imports"
[tool.setuptools]
packages = [
"neutron_lib"
]
[tool.mypy]
incremental = true
pretty = true
show_error_context = true
show_column_numbers = true
warn_unused_ignores = true
# remove gradually as progress is made
disable_error_code = "import-untyped,var-annotated,import-not-found"
# honor excludes by not following there through imports
follow_imports = "silent"
files = "neutron_lib"
[tool.ruff]
line-length = 79
[tool.ruff.lint]
select = ["E4", "E5", "E7", "E9", "F", "G", "S", "UP"]
ignore = [
"S104", # Possible binding to all interfaces
"S311", # Suspicious non-cryptographic random usage
"UP031", # Use format specifiers instead of percent format
]
[tool.ruff.lint.per-file-ignores]
"neutron_lib/tests/*" = ["S"]