File: keyword.pyi

package info (click to toggle)
typeshed 0.0~git20241223.ea91db2-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 28,756 kB
  • sloc: python: 7,741; makefile: 20; sh: 18
file content (21 lines) | stat: -rw-r--r-- 571 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import sys
from collections.abc import Sequence
from typing import Final

if sys.version_info >= (3, 9):
    __all__ = ["iskeyword", "issoftkeyword", "kwlist", "softkwlist"]
else:
    __all__ = ["iskeyword", "kwlist"]

def iskeyword(s: str, /) -> bool: ...

# a list at runtime, but you're not meant to mutate it;
# type it as a sequence
kwlist: Final[Sequence[str]]

if sys.version_info >= (3, 9):
    def issoftkeyword(s: str, /) -> bool: ...

    # a list at runtime, but you're not meant to mutate it;
    # type it as a sequence
    softkwlist: Final[Sequence[str]]