-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
146 lines (133 loc) · 3.76 KB
/
pyproject.toml
File metadata and controls
146 lines (133 loc) · 3.76 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
138
139
140
141
142
143
144
145
146
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "tmux4ssh"
version = "0.1.0"
description = "Execute remote commands via SSH in tmux sessions with real-time output streaming"
readme = "README.md"
license = {text = "Apache 2.0"}
requires-python = ">=3.10"
authors = [{ name = "Gaofeng Fan" }]
keywords = ["ssh", "tmux", "remote", "command", "automation"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: System :: Systems Administration",
]
dependencies = [
"paramiko>=3.0.0",
"keyring>=24.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"pytest-cov>=4.0.0",
"pytest-mock>=3.12.0",
"ruff>=0.1.0",
"mypy>=1.8.0",
"pre-commit>=3.6.0",
"types-paramiko>=3.0.0",
]
[project.scripts]
tmux4ssh = "tmux_ssh.cli:main"
[project.urls]
Homepage = "https://github.com/circuitmuggle/tmux4ssh"
Repository = "https://github.com/circuitmuggle/tmux4ssh"
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = [
"-v",
]
markers = [
"integration: marks tests as integration tests (require live SSH connection)",
"unit: marks tests as unit tests (mocked, no network required)",
]
filterwarnings = [
"ignore::DeprecationWarning",
]
[tool.coverage.run]
source = ["src/tmux_ssh"]
branch = true
omit = ["*/tests/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"raise NotImplementedError",
]
[tool.ruff]
target-version = "py310"
line-length = 88
src = ["src", "tests"]
exclude = [
"tmux_ssh.py", # prototype file
"tmux_ssh_cmd.py", # prototype file
"tmux_ssh_cp.py", # prototype file
]
[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
"TCH", # flake8-type-checking
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PL", # pylint
"RUF", # Ruff-specific rules
]
ignore = [
"PLR0913", # Too many arguments
"PLR2004", # Magic value comparison
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0915", # Too many statements
"E501", # Line too long (let formatter handle it)
"E722", # Bare except (acceptable in some cases)
"ARG001", # Unused function argument
"ARG002", # Unused method argument
"ARG005", # Unused lambda argument
"PTH110", # os.path.exists -> Path.exists
"PTH111", # os.path.expanduser -> Path.expanduser
"PTH107", # os.remove -> Path.unlink
"PTH123", # open() -> Path.open()
"SIM117", # Nested with statements
"RUF009", # Function call in dataclass defaults
"TCH003", # Type checking imports
"E731", # Lambda assignment
]
[tool.ruff.lint.isort]
known-first-party = ["tmux_ssh"]
[tool.mypy]
python_version = "3.10"
strict = true
warn_return_any = true
warn_unused_ignores = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
files = ["src/tmux_ssh", "tests"]
exclude = [
"tmux_ssh.py",
"tmux_ssh_cmd.py",
"tmux_ssh_cp.py",
]
[[tool.mypy.overrides]]
module = ["keyring.*", "paramiko.*"]
ignore_missing_imports = true