Skip to content

Commit 532288f

Browse files
committed
ignore lint errors in new script from upstream
1 parent a3c2773 commit 532288f

File tree

7 files changed

+217
-28
lines changed

7 files changed

+217
-28
lines changed

.basedpyright/baseline.json

Lines changed: 208 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
{
22
"files": {
3+
"./build/py3_8/generate_docstubs.py": [
4+
{
5+
"code": "reportUnusedCallResult",
6+
"range": {
7+
"startColumn": 8,
8+
"endColumn": 71,
9+
"lineCount": 1
10+
}
11+
},
12+
{
13+
"code": "reportUnusedCallResult",
14+
"range": {
15+
"startColumn": 8,
16+
"endColumn": 70,
17+
"lineCount": 1
18+
}
19+
}
20+
],
321
"./build/py_latest/docs_macros.py": [
422
{
523
"code": "reportAny",
@@ -10,7 +28,49 @@
1028
}
1129
}
1230
],
13-
"./build/py_latest/generateUnicodeTables.py": [
31+
"./build/py_latest/localization_helper.py": [
32+
{
33+
"code": "reportDeprecated",
34+
"range": {
35+
"startColumn": 44,
36+
"endColumn": 48,
37+
"lineCount": 1
38+
}
39+
},
40+
{
41+
"code": "reportDeprecated",
42+
"range": {
43+
"startColumn": 61,
44+
"endColumn": 66,
45+
"lineCount": 1
46+
}
47+
},
48+
{
49+
"code": "reportDeprecated",
50+
"range": {
51+
"startColumn": 14,
52+
"endColumn": 18,
53+
"lineCount": 1
54+
}
55+
},
56+
{
57+
"code": "reportDeprecated",
58+
"range": {
59+
"startColumn": 24,
60+
"endColumn": 29,
61+
"lineCount": 1
62+
}
63+
},
64+
{
65+
"code": "reportIncompatibleUnannotatedOverride",
66+
"range": {
67+
"startColumn": 13,
68+
"endColumn": 22,
69+
"lineCount": 1
70+
}
71+
}
72+
],
73+
"./build/py_latest/upstream/generateUnicodeTables.py": [
1474
{
1575
"code": "reportUnusedCallResult",
1676
"range": {
@@ -124,62 +184,188 @@
124184
}
125185
}
126186
],
127-
"./build/py_latest/localization_helper.py": [
187+
"./build/py_latest/upstream/updateTypeshed.py": [
128188
{
129-
"code": "reportDeprecated",
189+
"code": "reportUnusedImport",
130190
"range": {
131-
"startColumn": 44,
132-
"endColumn": 48,
191+
"startColumn": 7,
192+
"endColumn": 9,
133193
"lineCount": 1
134194
}
135195
},
136196
{
137-
"code": "reportDeprecated",
197+
"code": "reportUnknownParameterType",
138198
"range": {
139-
"startColumn": 61,
140-
"endColumn": 66,
199+
"startColumn": 4,
200+
"endColumn": 19,
141201
"lineCount": 1
142202
}
143203
},
144204
{
145-
"code": "reportDeprecated",
205+
"code": "reportMissingTypeArgument",
146206
"range": {
147-
"startColumn": 14,
148-
"endColumn": 18,
207+
"startColumn": 51,
208+
"endColumn": 78,
149209
"lineCount": 1
150210
}
151211
},
152212
{
153-
"code": "reportDeprecated",
213+
"code": "reportUnusedCallResult",
154214
"range": {
155-
"startColumn": 24,
156-
"endColumn": 29,
215+
"startColumn": 8,
216+
"endColumn": 88,
157217
"lineCount": 1
158218
}
159219
},
160220
{
161-
"code": "reportIncompatibleUnannotatedOverride",
221+
"code": "reportUnusedCallResult",
162222
"range": {
163-
"startColumn": 13,
164-
"endColumn": 22,
223+
"startColumn": 8,
224+
"endColumn": 61,
165225
"lineCount": 1
166226
}
167-
}
168-
],
169-
"./build/py3_8/generate_docstubs.py": [
227+
},
170228
{
171229
"code": "reportUnusedCallResult",
172230
"range": {
173231
"startColumn": 8,
174-
"endColumn": 71,
232+
"endColumn": 104,
233+
"lineCount": 1
234+
}
235+
},
236+
{
237+
"code": "reportUnknownVariableType",
238+
"range": {
239+
"startColumn": 4,
240+
"endColumn": 10,
241+
"lineCount": 1
242+
}
243+
},
244+
{
245+
"code": "reportUnknownVariableType",
246+
"range": {
247+
"startColumn": 4,
248+
"endColumn": 15,
249+
"lineCount": 1
250+
}
251+
},
252+
{
253+
"code": "reportUnknownMemberType",
254+
"range": {
255+
"startColumn": 18,
256+
"endColumn": 31,
257+
"lineCount": 1
258+
}
259+
},
260+
{
261+
"code": "reportUnknownMemberType",
262+
"range": {
263+
"startColumn": 18,
264+
"endColumn": 37,
265+
"lineCount": 1
266+
}
267+
},
268+
{
269+
"code": "reportUnknownVariableType",
270+
"range": {
271+
"startColumn": 11,
272+
"endColumn": 22,
273+
"lineCount": 1
274+
}
275+
},
276+
{
277+
"code": "reportUnusedCallResult",
278+
"range": {
279+
"startColumn": 12,
280+
"endColumn": 44,
175281
"lineCount": 1
176282
}
177283
},
178284
{
179285
"code": "reportUnusedCallResult",
180286
"range": {
181287
"startColumn": 8,
182-
"endColumn": 70,
288+
"endColumn": 40,
289+
"lineCount": 1
290+
}
291+
},
292+
{
293+
"code": "reportUnusedCallResult",
294+
"range": {
295+
"startColumn": 4,
296+
"endColumn": 46,
297+
"lineCount": 1
298+
}
299+
},
300+
{
301+
"code": "reportUnusedCallResult",
302+
"range": {
303+
"startColumn": 4,
304+
"endColumn": 5,
305+
"lineCount": 7
306+
}
307+
},
308+
{
309+
"code": "reportUnusedCallResult",
310+
"range": {
311+
"startColumn": 4,
312+
"endColumn": 5,
313+
"lineCount": 6
314+
}
315+
},
316+
{
317+
"code": "reportAny",
318+
"range": {
319+
"startColumn": 7,
320+
"endColumn": 19,
321+
"lineCount": 1
322+
}
323+
},
324+
{
325+
"code": "reportAny",
326+
"range": {
327+
"startColumn": 11,
328+
"endColumn": 22,
329+
"lineCount": 1
330+
}
331+
},
332+
{
333+
"code": "reportAny",
334+
"range": {
335+
"startColumn": 43,
336+
"endColumn": 54,
337+
"lineCount": 1
338+
}
339+
},
340+
{
341+
"code": "reportAny",
342+
"range": {
343+
"startColumn": 61,
344+
"endColumn": 72,
345+
"lineCount": 1
346+
}
347+
},
348+
{
349+
"code": "reportAny",
350+
"range": {
351+
"startColumn": 61,
352+
"endColumn": 72,
353+
"lineCount": 1
354+
}
355+
},
356+
{
357+
"code": "reportAny",
358+
"range": {
359+
"startColumn": 29,
360+
"endColumn": 37,
361+
"lineCount": 1
362+
}
363+
},
364+
{
365+
"code": "reportAny",
366+
"range": {
367+
"startColumn": 29,
368+
"endColumn": 37,
183369
"lineCount": 1
184370
}
185371
}

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@
7171
"pylint.ignorePatterns": [
7272
"**/pyright-internal/src/tests/samples/*",
7373
"**/pyright-internal/typeshed-fallback/*",
74-
"**/docstubs/*"
74+
"**/docstubs/*",
75+
"**/build/py_latest/upstream/*",
7576
],
7677
// even though python.terminal.activateEnvInCurrentTerminal is enabled, we still need to add the venv's script folder to the PATH
7778
// because vscode's npm tasks do not run with the activated venv
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
scripts that come from upstream that we don't care about. they are only used by pyright maintainers so we never need to use them
3+
4+
we only keep these scripts to reduce upstream conflicts.
5+
"""

build/py_latest/generateUnicodeTables.py renamed to build/py_latest/upstream/generateUnicodeTables.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
# Generates the content of unicode.ts based on the official Unicode
66
# character database.
77

8-
# this file comes from upstream and we don't use it so we disable the linters & baseline its basedpyright errors
9-
# pylint: skip-file
10-
118
import sys
129
import urllib.request
1310
from io import TextIOWrapper
File renamed without changes.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"typecheck-python": "uv run --no-sync basedpyright",
2424
"ruff-check": "uv run --no-sync ruff check --no-cache && uv run --no-sync ruff format --check --diff",
2525
"ruff-fix": "uv run --no-sync ruff check --no-cache --fix && uv run --no-sync ruff format",
26-
"pylint": "uv run --no-sync pylint basedpyright build pdm_build.py",
26+
"pylint": "uv run --no-sync pylint basedpyright build pdm_build.py --ignore-paths build/py_latest/upstream",
2727
"test-python": "uv run --no-sync pytest tests",
2828
"generate-docstubs": "uv run --no-sync build/py3_8/generate_docstubs.py",
2929
"localization-helper": "uv run --no-sync build/py_latest/localization_helper.py",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ extend-exclude = [
218218
"packages/pyright-internal/typeshed-fallback",
219219
"docstubs",
220220
"packages/pyright-internal/src/tests/samples",
221-
"build/py_latest/generateUnicodeTables.py", # comes from upstream
221+
"build/py_latest/upstream",
222222
]
223223

224224
[tool.ruff.lint]

0 commit comments

Comments
 (0)