-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
222 lines (199 loc) · 5.22 KB
/
Copy pathpyproject.toml
File metadata and controls
222 lines (199 loc) · 5.22 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
[build-system]
requires = ["setuptools~=80.9", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "askOpenRouter"
dynamic = ["version"]
description = "This add-on for the NVDA screen reader allows you to ask questions to free AI models through the OpenRouter platform."
maintainers = [
{name = "Abdelkrim BENSAÏD", email = "abdelkrim.bensaid@gmail.com"},
]
requires-python = ">=3.13,<3.14"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Topic :: Accessibility",
]
readme = "readme.md"
license = {file = "COPYING.TXT"}
dependencies = [
# Build add-on
"scons==4.10.1",
"Markdown==3.10",
# Translations management
"nh3==0.3.2",
"crowdin-api-client==1.24.1",
"lxml==6.1.0",
"mdx_truly_sane_lists==1.3",
"markdown-link-attr-modifier==0.2.1",
"mdx-gh-links==0.4",
# Lint
"uv==0.11.6",
"ruff==0.14.5",
"pre-commit==4.2.0",
"pyright[nodejs]==1.1.411",
"wxpython>=4.2.5",
]
[project.urls]
Repository = "https://github.com/abdel792/askOpenRouter"
[tool.ruff]
line-length = 110
builtins = [
# translation lookup
"_",
# translation lookup
"ngettext",
# translation lookup
"pgettext",
# translation lookup
"npgettext",
]
include = [
"*.py",
"sconstruct",
]
exclude = [
".git",
"__pycache__",
".venv",
"buildVars.py",
]
[tool.ruff.format]
indent-style = "tab"
line-ending = "lf"
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint]
ignore = [
# indentation contains tabs
"W191",
]
logger-objects = ["logHandler.log"]
[tool.ruff.lint.per-file-ignores]
# sconscripts contains many inbuilt functions not recognised by the lint,
# so ignore F821.
"sconstruct" = ["F821"]
[tool.pyright]
venvPath = ".venv"
venv = "."
pythonPlatform = "Windows"
typeCheckingMode = "strict"
include = [
"**/*.py",
]
exclude = [
"sconstruct",
".git",
"__pycache__",
".venv",
"site_scons",
".github/scripts",
]
# Tell pyright where to load python code from
extraPaths = [
"./addon",
"../nvda/source",
]
# General config
analyzeUnannotatedFunctions = true
deprecateTypingAliases = true
# Stricter typing
strictParameterNoneValue = true
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
# Compliant rules
reportAssertAlwaysTrue = true
reportAssertTypeFailure = true
reportDuplicateImport = true
reportIncompleteStub = true
reportInconsistentOverload = true
reportInconsistentConstructor = true
reportInvalidStringEscapeSequence = true
reportInvalidStubStatement = true
reportInvalidTypeVarUse = true
reportMatchNotExhaustive = true
reportMissingModuleSource = true
reportMissingImports = true
reportNoOverloadImplementation = true
reportOptionalContextManager = true
reportOverlappingOverload = true
reportPrivateImportUsage = true
reportPropertyTypeMismatch = true
reportSelfClsParameterName = true
reportTypeCommentUsage = true
reportTypedDictNotRequiredAccess = true
reportUndefinedVariable = true
reportUnusedExpression = true
reportUnboundVariable = true
reportUnhashable = true
reportUnnecessaryCast = true
reportUnnecessaryContains = true
reportUnnecessaryTypeIgnoreComment = true
reportUntypedClassDecorator = true
reportUntypedFunctionDecorator = true
reportUnusedClass = true
reportUnusedCoroutine = true
reportUnusedExcept = true
# Should switch to true when possible
reportDeprecated = false
# Can be enabled by generating type stubs for modules via pyright CLI
reportMissingTypeStubs = false
# Bad rules
# These are roughly sorted by compliance to make it easier for devs to focus on enabling them.
# 1-50 errors
reportUnsupportedDunderAll = false
reportAbstractUsage = false
reportUntypedBaseClass = false
reportOptionalIterable = false
reportCallInDefaultInitializer = false
reportInvalidTypeArguments = false
reportUntypedNamedTuple = false
reportRedeclaration = false
reportOptionalCall = false
reportConstantRedefinition = false
reportWildcardImportFromLibrary = false
reportIncompatibleVariableOverride = false
reportInvalidTypeForm = false
# 50-100 errors
reportGeneralTypeIssues = false
reportOptionalOperand = false
reportUnnecessaryComparison = false
reportFunctionMemberAccess = false
reportUnnecessaryIsInstance = false
reportUnusedFunction = false
reportImportCycles = false
reportUnusedImport = false
reportUnusedVariable = false
# 100-1000 errors
reportOperatorIssue = false
reportAssignmentType = false
reportReturnType = false
reportPossiblyUnboundVariable = false
reportMissingSuperCall = false
reportUninitializedInstanceVariable = false
reportUnknownLambdaType = false
reportMissingTypeArgument = false
reportImplicitStringConcatenation = false
reportIncompatibleMethodOverride = false
reportPrivateUsage = false
# 1000+ errors
reportUnusedCallResult = false
reportOptionalSubscript = false
reportCallIssue = false
reportOptionalMemberAccess = false
reportImplicitOverride = false
reportIndexIssue = false
reportAttributeAccessIssue = false
reportArgumentType = false
reportUnknownParameterType = false
reportMissingParameterType = false
reportUnknownVariableType = false
reportUnknownArgumentType = false
reportUnknownMemberType = false
[tool.mypy]
warn_unused_configs = true
ignore_missing_imports = true