-
Notifications
You must be signed in to change notification settings - Fork 799
/
pyrightconfig.json
54 lines (54 loc) · 2.33 KB
/
pyrightconfig.json
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
{
"typeCheckingMode": "basic",
// Target the oldest supported version in editors and default CLI
"pythonVersion": "3.8",
// Keep it simple for now by allowing both mypy and pyright to use `type: ignore`
"enableTypeIgnoreComments": true,
// Exclude from scanning when running pyright
"exclude": [
".git/",
"build/",
// Vendored
"Pythonwin/Scintilla/",
// Forked IDLE extensions predating Python 2.3. They now live in idlelib in https://github.com/python/cpython/tree/main/Lib/idlelib
"Pythonwin/pywin/idle/",
// Ignoring non-public apis for now
"**/Test/",
"**/test/",
"**/Demos/",
"**/demo/",
],
// Packages that will be accessible globally.
// Setting this makes pyright use the repo's code for those modules instead of typeshed or pywin32 in site-packages
"extraPaths": [
"com",
"win32/Lib",
"Pythonwin",
],
// TODO: For now this allows us to at least put pyright in place by massively reducing checked code
// it also reduces issues with the shipped types-pywin32 from typeshed
"reportGeneralTypeIssues": "none",
"reportArgumentType": "none",
"reportAttributeAccessIssue": "none",
// FIXE: These all need to be fixed first and turned back to error
// some of the fixes need to be done in types-pywin32 from typeshed
"reportCallIssue": "warning",
"reportOperatorIssue": "warning",
"reportOptionalCall": "warning",
"reportOptionalIterable": "warning",
"reportOptionalMemberAccess": "warning",
"reportOptionalSubscript": "warning",
// Needs fixes in types-pywin32 and requires Python 3.8 to annotate ambiguous global variables
"reportUnnecessaryComparison": "warning",
// Too many dynamically generated modules. This will require type stubs to properly fix.
"reportMissingImports": "warning",
// IDEM, but happens when pywin32 is not in site-packages but module is found from typeshed.
// TODO: Is intended to be fixed with an editable install
// Since we're a library, and not user code, we care less about forgetting to install a dependency,
// as long as we have its stubs. So just disabling for now is fine.
"reportMissingModuleSource": "none",
// External type stubs may not be completable, and this will require type stubs for dynamic modules.
"reportMissingTypeStubs": "information",
// Use Flake8/Pycln/Ruff instead
"reportUnusedImport": "none",
}