-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyrightconfig.json
More file actions
82 lines (79 loc) · 3.24 KB
/
pyrightconfig.json
File metadata and controls
82 lines (79 loc) · 3.24 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
{
"typeCheckingMode": "strict",
"reportPrivateUsage": "none",
"reportMissingModuleSource": "none", // erroneously generated for imports from `gi.repository`
"reportMissingTypeStubs": "none",
// I want to be conservative with the versions of Python I am targetting for
// my scripts, so that they are usable even on older versions of distros like
// Ubuntu or Debian, which one can still come by on remote servers or inside
// containers. However, static typing in Python has evolved a lot over the
// last few years and gained lots of important features, which I don't want to
// miss out on by targetting some ancient release of the language, so I have
// to keep some balance with the choice of the minimal supported version.
// Here's a short summary of major static typing-related features introduced
// in recent Python updates:
//
// * Python 3.0 (2008) - syntax for annotating function parameters and return
// values is first added (PEP 3107)
// * Python 3.5 (2015) - the built-in `typing` module is introduced (PEP 484)
// * Python 3.6 (2016) - syntax for type annotations for variables and class
// fields (PEP 526)
// * Python 3.8 (2019) - `Protocol` and structural subtyping is added to the
// built-in `typing` (PEP 544)
// * Python 3.9 (2020) - generics can now be used on built-in types like
// `list` or `dict`, without requiring the use of `typing.List` and such
// (PEP 585)
// * Python 3.10 (2021) - union types can be written as `X | Y` (PEP 604)
// * Python 3.11 (2022) - the `Self` type and literal string types
// * Python 3.12 (2023) - syntax for defining generics on classes and
// functions, also `type` keyword for defining type aliases (PEP 695)
//
// See also:
// <https://typing.python.org/en/latest/guides/modernizing.html>
// <https://typing.python.org/en/latest/spec/historical.html>
//
// Support status of Python versions: <https://devguide.python.org/versions/>.
// As of writing (2025-12-25), 3.9 is the release that has reached EOL most recently.
"pythonVersion": "3.8",
// Scripts without the `.py` extension must be included explicitly. This
// command may be used to regenerate this list:
// $ rg -l '^#!.*python' --glob='!*.py' | jq -nR '["."] + ([inputs] | map("./" + .) | sort)'
"include": [
".",
"./scripts/=",
"./scripts/colortest",
"./scripts/colortest2",
"./scripts/copy-crosscode-emoji-url",
"./scripts/crosscode-saved",
"./scripts/discord-snowflake",
"./scripts/discord-stream-desktop-audio",
"./scripts/discord-whois",
"./scripts/factorio-dump-blueprint",
"./scripts/factorio-dump-mod-settings",
"./scripts/factorio-make-blueprint",
"./scripts/fancy-man-pager",
"./scripts/icat",
"./scripts/leveldb-dump",
"./scripts/mark-as-recently-used",
"./scripts/mediawiki-preview",
"./scripts/onscreen-message",
"./scripts/playerctl-simple-menu",
"./scripts/query-bookmarks",
"./scripts/random-local-ipv4",
"./scripts/random-unused-port",
"./scripts/welcome"
],
"executionEnvironments": [
{
"root": "./scripts"
},
{
"root": "./colorschemes",
"pythonVersion": "3.12"
},
{
"root": "./misc/ranger",
"extraPaths": ["./scripts"]
}
]
}