-
Notifications
You must be signed in to change notification settings - Fork 189
/
pyproject.toml
122 lines (107 loc) · 3.59 KB
/
pyproject.toml
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
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "ulauncher"
description = "Application launcher for Linux"
readme = "README.md"
requires-python = ">=3.7"
license = {text = "GPL-3"}
authors = [
{name = "Aleksandr Gornostal"},
{name = "Albin Larsson"},
{name = "Troy Curtis"},
]
urls.Homepage = "http://ulauncher.io/"
urls.Documentation = "https://docs.ulauncher.io/"
urls.Repository = "https://github.com/Ulauncher/Ulauncher.git"
urls.Issues = "https://github.com/Ulauncher/Ulauncher/issues"
keywords = [ "linux", "desktop", "application", "launcher", "gtk" ]
dependencies = [ "PyGObject", "pycairo", "python-xlib" ]
dynamic = ["version"]
[tool.setuptools.dynamic]
version = {attr = "ulauncher.version"}
[tool.black]
line-length = 120
[tool.mypy]
python_version = "3.8"
strict = true
disable_error_code = "import-untyped"
implicit_reexport = true
disallow_untyped_calls = false
[tool.pylint.MASTER]
ignore-patterns="ulauncher,docs,data,scripts,tests"
[tool.pylint."MESSAGES CONTROL"]
disable="all"
[tool.typos.default]
extend-ignore-re = [
# prevent correcting gir to git
"gir1.2",
]
[tool.typos.files]
extend-exclude = ["preferences-src/static"]
[tool.ruff]
line-length = 120
target-version = "py37" # py37 is the lowest supported option
lint.ignore = [
"A003", # Allow using same names as python internals for class methods that doesn't shadow global scope
"RUF012", # Mostly false positives because we're deep cloning class vars when creating instances in our custom data class
"TCH001", "TCH002", "TCH003", # Performance best practice that does nothing for our use
"TD002", "TD003" # Allow TODOs and FIXMEs without author and link
]
lint.select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
# "DTZ", # flake8-datetimez (too focused on enforcing time zone argument, which we don't need)
"E", # pycodestyle errors
"EM", # flake8-errmsg
"ERA", # eradicate (commented-out-code)
"EXE", # flake8-executable
"FA", # flake8-future-annotations
"FLY", # flynt
"F", # pyflakes
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420 (ban implicit namespace packages without __init__.py)
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint (same as PLC+PLE+PLR+PLW)
"PT", # flake8-pytest-style
# "PTH", # flake8-use-pathlib (pathlib isn't always better imo)
"PYI", # flake8-pyi
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"SLF", # flake8-self
"SIM", # flake8-simplify
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"TD", # flake8-todos
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warnings
"Q", # flake8-quotes
]
# Relax some linting rules for tests
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"PLR2004", # Allow direct comparison with integers (magic-value)
"SLF001", # Allow accessing private members (obj._hello)
"T201", # Allow print statements
]
[tool.ruff.lint.pylint]
max-args = 10
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = ["id"]
[tool.pytest.ini_options]
log_cli = true