Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
97 lines (86 loc) · 2.66 KB
/
Copy pathpyproject.toml
File metadata and controls
97 lines (86 loc) · 2.66 KB
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
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "netbox-cable-labels"
dynamic = ["version"]
description = "NetBox plugin for automatic cable label generation"
readme = "README.md"
authors = [
{name = "Jonathan Senecal", email = "contact@jonathansenecal.com"}
]
license = "Apache-2.0"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Plugins",
"Framework :: Django",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: System :: Networking",
]
keywords = ["netbox", "netbox-plugin", "cable-management", "labeling"]
dependencies = []
[project.urls]
Homepage = "https://github.com/jsenecal/netbox-cable-labels"
Repository = "https://github.com/jsenecal/netbox-cable-labels.git"
Issues = "https://github.com/jsenecal/netbox-cable-labels/issues"
[tool.setuptools.packages.find]
include = ["netbox_cable_labels*"]
[tool.setuptools.dynamic]
version = {attr = "netbox_cable_labels.__version__"}
[tool.ruff]
target-version = "py312"
line-length = 120
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"PL", # pylint
]
ignore = [
"E501", # line too long (handled by formatter)
"E731", # lambda assignment
"PLR0913", # too many arguments
"PLR2004", # magic value comparison
"PLC0415", # import not at top-level (needed for Django plugin pattern)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # unused imports in __init__ files
"**/tests/*" = ["ARG", "PLR", "F403"] # relax rules for tests
".devcontainer/*" = ["PLW1508"] # env var defaults in devcontainer config
[tool.ruff.lint.isort]
known-third-party = ["django", "netbox", "dcim", "utilities"]
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "netbox.settings"
python_files = ["test_*.py"]
addopts = "-vv --tb=short"
testpaths = ["netbox_cable_labels/tests"]
[tool.coverage.run]
source = ["netbox_cable_labels"]
omit = [
"*/tests/*",
"*/migrations/*",
"*/__init__.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]