-
-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathpyproject.toml
More file actions
116 lines (105 loc) · 5.03 KB
/
pyproject.toml
File metadata and controls
116 lines (105 loc) · 5.03 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
[project]
authors = [
{name = "Ashish Bhatia", email="ashishb@ashishb.net"},
]
name = "adb-enhanced"
# Ref: https://pypi.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Intended Audience :: Developers",
"Operating System :: Android",
]
keywords=["Android ADB developer"]
version = "2.8.0" # For now, this is duplicated in adbe/version.txt as well
description = "ADB-Enhanced is a Swiss army knife for Android testing and development"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.10"
dependencies = [
"docopt==0.6.2",
"psutil==7.2.2",
]
[project.scripts]
adbe = "adbe.main:main"
[dependency-groups]
dev = [
"pytest==9.0.3",
"ruff==0.15.10",
"setuptools==82.0.1",
"twine==6.2.0",
"types-docopt==0.6.11.20241107",
"types-psutil==7.2.2.20260408",
"wheel==0.46.3",
]
[tool.ruff]
# Same as Black.
line-length = 170
[tool.ruff.lint]
# Enable the pycodestyle (`E`) and Pyflakes (`F`) rules by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["C", "W", "E", "F"]
ignore = [
"ANN401", # https://docs.astral.sh/ruff/rules/any-type/ is not avoidable
"PLR2004", # https://docs.astral.sh/ruff/rules/magic-value-comparison/ - too much work to fix this
"S101", # False positive in test code
"T201", # https://docs.astral.sh/ruff/rules/print/ is unavoidable for a CLI tool
# subprocess is required for CLI
"S105", # false positive in this case
"S404", # https://docs.astral.sh/ruff/rules/suspicious-subprocess-import/
"S602", # https://docs.astral.sh/ruff/rules/subprocess-popen-with-shell-equals-true/
"S607", # https://docs.astral.sh/ruff/rules/start-process-with-partial-path/ is not a concern
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
per-file-ignores = { }
extend-select = [
"A", # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
"ANN", # https://docs.astral.sh/ruff/rules/#flake8-annotations-ann - eventually enable this
"ARG", # https://docs.astral.sh/ruff/rules/#flake8-unused-arguments-arg
"ASYNC", # https://docs.astral.sh/ruff/rules/#flake8-async-async
"B", # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"C4", # https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
"C90", # https://docs.astral.sh/ruff/rules/#mccabe-c90
"COM", # https://docs.astral.sh/ruff/rules/#flake8-commas-com
"DTZ", # https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
"E", # https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
"EXE", # https://docs.astral.sh/ruff/rules/#flake8-executable-exe
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
"FAST", # https://docs.astral.sh/ruff/rules/#fastapi-fast
# "FBT", # https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt - eventually enable this
"FLY", # https://docs.astral.sh/ruff/rules/#flynt-fly
"FURB", # https://docs.astral.sh/ruff/rules/#refurb-furb
"G", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
"I", # https://docs.astral.sh/ruff/rules/#isort-i
"ICN", # https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn
"INP", # https://docs.astral.sh/ruff/rules/#flake8-no-pep420-inp
"ISC", # https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc
"LOG", # https://docs.astral.sh/ruff/rules/#flake8-logging-log
"N", # https://docs.astral.sh/ruff/rules/#pep8-naming-n
"NPY", # https://docs.astral.sh/ruff/rules/#numpy-specific-rules-npy
"PD", # https://docs.astral.sh/ruff/rules/#pandas-vet-pd
"PERF", # https://docs.astral.sh/ruff/rules/#perflint-perf
"PIE", # https://docs.astral.sh/ruff/rules/#flake8-pie-pie
# "PL", # https://docs.astral.sh/ruff/rules/#pylint-pl - eventually enable this
"PT", # https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
"PTH", # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
"PYI", # https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi
"Q", # https://docs.astral.sh/ruff/rules/#flake8-quotes-q
"RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret
"RSE", # https://docs.astral.sh/ruff/rules/#flake8-raise-rse
"RUF", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
"S", # https://docs.astral.sh/ruff/rules/#flake8-bandit-s
"SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
"SLF", # https://docs.astral.sh/ruff/rules/#flake8-self-slf
"SLOT", # https://docs.astral.sh/ruff/rules/#flake8-slots-slot
"T10", # https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
"T20", # https://docs.astral.sh/ruff/rules/#flake8-print-t20
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
"W", # https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
]
[tool.ruff.lint.isort]
combine-as-imports = true # Optional: combine 'as' imports on a single line
[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 12
max-complexity = 12