forked from ktbyers/netmiko
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
137 lines (120 loc) · 3.65 KB
/
Copy pathpyproject.toml
File metadata and controls
137 lines (120 loc) · 3.65 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
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
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "netmiko"
version = "4.7.0"
description = "Multi-vendor library to simplify legacy CLI connections to network devices"
authors = ["Kirk Byers <ktbyers@twb-tech.com>"]
license = "MIT"
readme = "README.md"
include = [
"netmiko/py.typed",
"LICENSE"
]
repository = "https://github.com/ktbyers/netmiko"
classifiers = [
"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",
]
[tool.poetry.dependencies]
python = ">=3.10,<4.0"
paramiko = ">=3.5.0,<5.0"
scp = ">=0.13.6"
pyyaml = ">=6.0.2"
textfsm = ">=1.1.3"
ntc-templates = ">=3.1.0"
pyserial = ">=3.3"
rich = ">=13.8"
"ruamel.yaml" = ">=0.17"
[tool.poetry.group.dev.dependencies]
ruff = "0.15.5"
mypy = "1.19.1"
mypy-extensions = "1.0.0"
pytest = "8.3.3"
twine = "6.2.0"
docutils = "0.22.4"
# genie (parsers group) requires exactly pysnmp 6.1.4 (latest 6.1.x, disallows >=6.2)
# pysnmp 7.x is excluded as it is a completely different async library incompatible with Netmiko
pysnmp = ">=6.1.4,<7"
pdoc3 = "0.11.6"
types-paramiko = "4.0.0.20250822"
types-PyYAML = "6.0.12.20250915"
[tool.poetry.group.parsers]
optional = true
[tool.poetry.group.parsers.dependencies]
# pyats 26.4 did not distribute cp311 linux x86_64 wheels
pyats = ">=26.2,!=26.4,!=26.4.*"
genie = ">=26.2,!=26.4,!=26.4.*"
ttp = ">=0.9.5"
[tool.poetry.scripts]
"netmiko-grep" = "netmiko.cli_tools.netmiko_grep:main_ep"
"netmiko-show" = "netmiko.cli_tools.netmiko_show:main_ep"
"netmiko-cfg" = "netmiko.cli_tools.netmiko_cfg:main_ep"
"netmiko-encrypt" = "netmiko.cli_tools.netmiko_encrypt:main_ep"
"netmiko-bulk-encrypt" = "netmiko.cli_tools.netmiko_bulk_encrypt:main_ep"
[tool.ruff]
line-length = 100
# Specify your floor Python version (i.e. minimum version Netmiko supports)
target-version = "py310"
# Files or directories to exclude from linting and formatting
exclude = [
".git",
".venv",
"__pycache__",
"build",
"dist",
"netmiko/_telnetlib",
]
[tool.ruff.lint]
# Enable these rule sets for a modern, clean codebase
# E/W = pycodestyle, F = Pyflakes, I = isort, UP = pyupgrade, B = bugbear
# select = ["E", "F", "W", "I", "UP", "B"]
# If you want to be extra strict about line length in the linter:
# extend-select = ["E501"]
[tool.ruff.format]
# Matches Black's style but honors the 100 char limit
quote-style = "double"
indent-style = "space"
# Optional: Formats code snippets inside docstrings!
docstring-code-format = true
docstring-code-line-length = 80
[tool.mypy]
python_version = "3.13"
exclude = "telnetlib.py"
check_untyped_defs = true
disallow_any_generics = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
ignore_errors = false
ignore_missing_imports = true
strict_optional = true
warn_unused_configs = true
warn_unused_ignores = true
warn_return_any = true
warn_redundant_casts = true
# Module-specific overrides
[[tool.mypy.overrides]]
module = "netmiko.base_connection"
warn_unused_ignores = false
[[tool.mypy.overrides]]
module = [
"netmiko.cli_tools.netmiko_grep",
"netmiko.cli_tools.netmiko_cfg",
"netmiko.cli_tools.netmiko_show",
"netmiko.cli_tools.helpers",
"netmiko.cli_tools.outputters",
"netmiko.cli_tools.argument_handling",
"netmiko.cli_tools.netmiko_encrypt",
"netmiko.cli_tools.netmiko_bulk_encrypt",
"netmiko._telnetlib.telnetlib"
]
ignore_errors = true
[tool.pytest.ini_options]
addopts = "-rs"
testpaths = ["tests"]