mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 04:19:18 +00:00

## Summary Now that 3.13.0 b1 is out some of the stdlib modules have changed names. ## Test Plan Wait for CI to run, expected to be pretty safe.
585 lines
16 KiB
Rust
585 lines
16 KiB
Rust
//! This file is generated by `scripts/generate_known_standard_library.py`
|
|
|
|
pub fn is_known_standard_library(minor_version: u8, module: &str) -> bool {
|
|
matches!(
|
|
(minor_version, module),
|
|
(
|
|
_,
|
|
"__hello__"
|
|
| "__phello__"
|
|
| "_abc"
|
|
| "_ast"
|
|
| "_asyncio"
|
|
| "_bisect"
|
|
| "_blake2"
|
|
| "_bz2"
|
|
| "_codecs"
|
|
| "_codecs_cn"
|
|
| "_codecs_hk"
|
|
| "_codecs_iso2022"
|
|
| "_codecs_jp"
|
|
| "_codecs_kr"
|
|
| "_codecs_tw"
|
|
| "_collections"
|
|
| "_collections_abc"
|
|
| "_compat_pickle"
|
|
| "_compression"
|
|
| "_contextvars"
|
|
| "_csv"
|
|
| "_ctypes"
|
|
| "_ctypes_test"
|
|
| "_curses"
|
|
| "_curses_panel"
|
|
| "_datetime"
|
|
| "_dbm"
|
|
| "_decimal"
|
|
| "_elementtree"
|
|
| "_frozen_importlib"
|
|
| "_frozen_importlib_external"
|
|
| "_functools"
|
|
| "_gdbm"
|
|
| "_hashlib"
|
|
| "_heapq"
|
|
| "_imp"
|
|
| "_io"
|
|
| "_json"
|
|
| "_locale"
|
|
| "_lsprof"
|
|
| "_lzma"
|
|
| "_markupbase"
|
|
| "_md5"
|
|
| "_multibytecodec"
|
|
| "_multiprocessing"
|
|
| "_opcode"
|
|
| "_operator"
|
|
| "_osx_support"
|
|
| "_overlapped"
|
|
| "_pickle"
|
|
| "_posixsubprocess"
|
|
| "_py_abc"
|
|
| "_pydecimal"
|
|
| "_pyio"
|
|
| "_queue"
|
|
| "_random"
|
|
| "_scproxy"
|
|
| "_sha1"
|
|
| "_sha3"
|
|
| "_signal"
|
|
| "_sitebuiltins"
|
|
| "_socket"
|
|
| "_sqlite3"
|
|
| "_sre"
|
|
| "_ssl"
|
|
| "_stat"
|
|
| "_string"
|
|
| "_strptime"
|
|
| "_struct"
|
|
| "_symtable"
|
|
| "_testbuffer"
|
|
| "_testcapi"
|
|
| "_testconsole"
|
|
| "_testimportmultiple"
|
|
| "_testmultiphase"
|
|
| "_thread"
|
|
| "_threading_local"
|
|
| "_tkinter"
|
|
| "_tracemalloc"
|
|
| "_uuid"
|
|
| "_warnings"
|
|
| "_weakref"
|
|
| "_weakrefset"
|
|
| "_winapi"
|
|
| "_xxtestfuzz"
|
|
| "abc"
|
|
| "antigravity"
|
|
| "argparse"
|
|
| "array"
|
|
| "ast"
|
|
| "asyncio"
|
|
| "atexit"
|
|
| "base64"
|
|
| "bdb"
|
|
| "binascii"
|
|
| "bisect"
|
|
| "builtins"
|
|
| "bz2"
|
|
| "cProfile"
|
|
| "calendar"
|
|
| "cmath"
|
|
| "cmd"
|
|
| "code"
|
|
| "codecs"
|
|
| "codeop"
|
|
| "collections"
|
|
| "colorsys"
|
|
| "compileall"
|
|
| "concurrent"
|
|
| "configparser"
|
|
| "contextlib"
|
|
| "contextvars"
|
|
| "copy"
|
|
| "copyreg"
|
|
| "csv"
|
|
| "ctypes"
|
|
| "curses"
|
|
| "dataclasses"
|
|
| "datetime"
|
|
| "dbm"
|
|
| "decimal"
|
|
| "difflib"
|
|
| "dis"
|
|
| "doctest"
|
|
| "email"
|
|
| "encodings"
|
|
| "ensurepip"
|
|
| "enum"
|
|
| "errno"
|
|
| "faulthandler"
|
|
| "fcntl"
|
|
| "filecmp"
|
|
| "fileinput"
|
|
| "fnmatch"
|
|
| "fractions"
|
|
| "ftplib"
|
|
| "functools"
|
|
| "gc"
|
|
| "genericpath"
|
|
| "getopt"
|
|
| "getpass"
|
|
| "gettext"
|
|
| "glob"
|
|
| "grp"
|
|
| "gzip"
|
|
| "hashlib"
|
|
| "heapq"
|
|
| "hmac"
|
|
| "html"
|
|
| "http"
|
|
| "idlelib"
|
|
| "imaplib"
|
|
| "importlib"
|
|
| "inspect"
|
|
| "io"
|
|
| "ipaddress"
|
|
| "itertools"
|
|
| "json"
|
|
| "keyword"
|
|
| "linecache"
|
|
| "locale"
|
|
| "logging"
|
|
| "lzma"
|
|
| "mailbox"
|
|
| "marshal"
|
|
| "math"
|
|
| "mimetypes"
|
|
| "mmap"
|
|
| "modulefinder"
|
|
| "msvcrt"
|
|
| "multiprocessing"
|
|
| "netrc"
|
|
| "nt"
|
|
| "ntpath"
|
|
| "nturl2path"
|
|
| "numbers"
|
|
| "opcode"
|
|
| "operator"
|
|
| "optparse"
|
|
| "os"
|
|
| "pathlib"
|
|
| "pdb"
|
|
| "pickle"
|
|
| "pickletools"
|
|
| "pkgutil"
|
|
| "platform"
|
|
| "plistlib"
|
|
| "poplib"
|
|
| "posix"
|
|
| "posixpath"
|
|
| "pprint"
|
|
| "profile"
|
|
| "pstats"
|
|
| "pty"
|
|
| "pwd"
|
|
| "py_compile"
|
|
| "pyclbr"
|
|
| "pydoc"
|
|
| "pydoc_data"
|
|
| "pyexpat"
|
|
| "queue"
|
|
| "quopri"
|
|
| "random"
|
|
| "re"
|
|
| "readline"
|
|
| "reprlib"
|
|
| "resource"
|
|
| "rlcompleter"
|
|
| "runpy"
|
|
| "sched"
|
|
| "secrets"
|
|
| "select"
|
|
| "selectors"
|
|
| "shelve"
|
|
| "shlex"
|
|
| "shutil"
|
|
| "signal"
|
|
| "site"
|
|
| "smtplib"
|
|
| "socket"
|
|
| "socketserver"
|
|
| "sqlite3"
|
|
| "sre_compile"
|
|
| "sre_constants"
|
|
| "sre_parse"
|
|
| "ssl"
|
|
| "stat"
|
|
| "statistics"
|
|
| "string"
|
|
| "stringprep"
|
|
| "struct"
|
|
| "subprocess"
|
|
| "symtable"
|
|
| "sys"
|
|
| "sysconfig"
|
|
| "syslog"
|
|
| "tabnanny"
|
|
| "tarfile"
|
|
| "tempfile"
|
|
| "termios"
|
|
| "textwrap"
|
|
| "this"
|
|
| "threading"
|
|
| "time"
|
|
| "timeit"
|
|
| "tkinter"
|
|
| "token"
|
|
| "tokenize"
|
|
| "trace"
|
|
| "traceback"
|
|
| "tracemalloc"
|
|
| "tty"
|
|
| "turtle"
|
|
| "turtledemo"
|
|
| "types"
|
|
| "typing"
|
|
| "unicodedata"
|
|
| "unittest"
|
|
| "urllib"
|
|
| "uuid"
|
|
| "venv"
|
|
| "warnings"
|
|
| "wave"
|
|
| "weakref"
|
|
| "webbrowser"
|
|
| "winreg"
|
|
| "winsound"
|
|
| "wsgiref"
|
|
| "xml"
|
|
| "xmlrpc"
|
|
| "xx"
|
|
| "xxlimited"
|
|
| "xxsubtype"
|
|
| "zipapp"
|
|
| "zipfile"
|
|
| "zipimport"
|
|
| "zlib"
|
|
) | (
|
|
7,
|
|
"_bootlocale"
|
|
| "_crypt"
|
|
| "_dummy_thread"
|
|
| "_msi"
|
|
| "_sha256"
|
|
| "_sha512"
|
|
| "aifc"
|
|
| "asynchat"
|
|
| "asyncore"
|
|
| "audioop"
|
|
| "binhex"
|
|
| "cgi"
|
|
| "cgitb"
|
|
| "chunk"
|
|
| "crypt"
|
|
| "distutils"
|
|
| "dummy_threading"
|
|
| "formatter"
|
|
| "imghdr"
|
|
| "imp"
|
|
| "lib2to3"
|
|
| "macpath"
|
|
| "mailcap"
|
|
| "msilib"
|
|
| "nis"
|
|
| "nntplib"
|
|
| "ossaudiodev"
|
|
| "parser"
|
|
| "pipes"
|
|
| "smtpd"
|
|
| "sndhdr"
|
|
| "spwd"
|
|
| "sunau"
|
|
| "symbol"
|
|
| "telnetlib"
|
|
| "uu"
|
|
| "xdrlib"
|
|
) | (
|
|
8,
|
|
"_bootlocale"
|
|
| "_crypt"
|
|
| "_dummy_thread"
|
|
| "_msi"
|
|
| "_posixshmem"
|
|
| "_sha256"
|
|
| "_sha512"
|
|
| "_statistics"
|
|
| "_testinternalcapi"
|
|
| "_xxsubinterpreters"
|
|
| "aifc"
|
|
| "asynchat"
|
|
| "asyncore"
|
|
| "audioop"
|
|
| "binhex"
|
|
| "cgi"
|
|
| "cgitb"
|
|
| "chunk"
|
|
| "crypt"
|
|
| "distutils"
|
|
| "dummy_threading"
|
|
| "formatter"
|
|
| "imghdr"
|
|
| "imp"
|
|
| "lib2to3"
|
|
| "mailcap"
|
|
| "msilib"
|
|
| "nis"
|
|
| "nntplib"
|
|
| "ossaudiodev"
|
|
| "parser"
|
|
| "pipes"
|
|
| "smtpd"
|
|
| "sndhdr"
|
|
| "spwd"
|
|
| "sunau"
|
|
| "symbol"
|
|
| "telnetlib"
|
|
| "uu"
|
|
| "xdrlib"
|
|
) | (
|
|
9,
|
|
"_aix_support"
|
|
| "_bootlocale"
|
|
| "_bootsubprocess"
|
|
| "_crypt"
|
|
| "_msi"
|
|
| "_peg_parser"
|
|
| "_posixshmem"
|
|
| "_sha256"
|
|
| "_sha512"
|
|
| "_statistics"
|
|
| "_testinternalcapi"
|
|
| "_xxsubinterpreters"
|
|
| "_zoneinfo"
|
|
| "aifc"
|
|
| "asynchat"
|
|
| "asyncore"
|
|
| "audioop"
|
|
| "binhex"
|
|
| "cgi"
|
|
| "cgitb"
|
|
| "chunk"
|
|
| "crypt"
|
|
| "distutils"
|
|
| "formatter"
|
|
| "graphlib"
|
|
| "imghdr"
|
|
| "imp"
|
|
| "lib2to3"
|
|
| "mailcap"
|
|
| "msilib"
|
|
| "nis"
|
|
| "nntplib"
|
|
| "ossaudiodev"
|
|
| "parser"
|
|
| "peg_parser"
|
|
| "pipes"
|
|
| "smtpd"
|
|
| "sndhdr"
|
|
| "spwd"
|
|
| "sunau"
|
|
| "symbol"
|
|
| "telnetlib"
|
|
| "uu"
|
|
| "xdrlib"
|
|
| "zoneinfo"
|
|
) | (
|
|
10,
|
|
"_aix_support"
|
|
| "_bootsubprocess"
|
|
| "_crypt"
|
|
| "_msi"
|
|
| "_posixshmem"
|
|
| "_sha256"
|
|
| "_sha512"
|
|
| "_statistics"
|
|
| "_testclinic"
|
|
| "_testinternalcapi"
|
|
| "_xxsubinterpreters"
|
|
| "_zoneinfo"
|
|
| "aifc"
|
|
| "asynchat"
|
|
| "asyncore"
|
|
| "audioop"
|
|
| "binhex"
|
|
| "cgi"
|
|
| "cgitb"
|
|
| "chunk"
|
|
| "crypt"
|
|
| "distutils"
|
|
| "graphlib"
|
|
| "imghdr"
|
|
| "imp"
|
|
| "lib2to3"
|
|
| "mailcap"
|
|
| "msilib"
|
|
| "nis"
|
|
| "nntplib"
|
|
| "ossaudiodev"
|
|
| "pipes"
|
|
| "smtpd"
|
|
| "sndhdr"
|
|
| "spwd"
|
|
| "sunau"
|
|
| "telnetlib"
|
|
| "uu"
|
|
| "xdrlib"
|
|
| "xxlimited_35"
|
|
| "zoneinfo"
|
|
) | (
|
|
11,
|
|
"__hello_alias__"
|
|
| "__hello_only__"
|
|
| "__phello_alias__"
|
|
| "_aix_support"
|
|
| "_bootsubprocess"
|
|
| "_crypt"
|
|
| "_msi"
|
|
| "_posixshmem"
|
|
| "_sha256"
|
|
| "_sha512"
|
|
| "_statistics"
|
|
| "_testclinic"
|
|
| "_testinternalcapi"
|
|
| "_tokenize"
|
|
| "_typing"
|
|
| "_xxsubinterpreters"
|
|
| "_zoneinfo"
|
|
| "aifc"
|
|
| "asynchat"
|
|
| "asyncore"
|
|
| "audioop"
|
|
| "cgi"
|
|
| "cgitb"
|
|
| "chunk"
|
|
| "crypt"
|
|
| "distutils"
|
|
| "graphlib"
|
|
| "imghdr"
|
|
| "imp"
|
|
| "lib2to3"
|
|
| "mailcap"
|
|
| "msilib"
|
|
| "nis"
|
|
| "nntplib"
|
|
| "ossaudiodev"
|
|
| "pipes"
|
|
| "smtpd"
|
|
| "sndhdr"
|
|
| "spwd"
|
|
| "sunau"
|
|
| "telnetlib"
|
|
| "tomllib"
|
|
| "uu"
|
|
| "xdrlib"
|
|
| "xxlimited_35"
|
|
| "zoneinfo"
|
|
) | (
|
|
12,
|
|
"__hello_alias__"
|
|
| "__hello_only__"
|
|
| "__phello_alias__"
|
|
| "_aix_support"
|
|
| "_crypt"
|
|
| "_msi"
|
|
| "_posixshmem"
|
|
| "_pydatetime"
|
|
| "_pylong"
|
|
| "_sha2"
|
|
| "_statistics"
|
|
| "_testclinic"
|
|
| "_testinternalcapi"
|
|
| "_testsinglephase"
|
|
| "_tokenize"
|
|
| "_typing"
|
|
| "_xxinterpchannels"
|
|
| "_xxsubinterpreters"
|
|
| "_zoneinfo"
|
|
| "aifc"
|
|
| "audioop"
|
|
| "cgi"
|
|
| "cgitb"
|
|
| "chunk"
|
|
| "crypt"
|
|
| "graphlib"
|
|
| "imghdr"
|
|
| "lib2to3"
|
|
| "mailcap"
|
|
| "msilib"
|
|
| "nis"
|
|
| "nntplib"
|
|
| "ossaudiodev"
|
|
| "pipes"
|
|
| "sndhdr"
|
|
| "spwd"
|
|
| "sunau"
|
|
| "telnetlib"
|
|
| "tomllib"
|
|
| "uu"
|
|
| "xdrlib"
|
|
| "xxlimited_35"
|
|
| "zoneinfo"
|
|
) | (
|
|
13,
|
|
"__hello_alias__"
|
|
| "__hello_only__"
|
|
| "__phello_alias__"
|
|
| "_aix_support"
|
|
| "_android_support"
|
|
| "_colorize"
|
|
| "_interpchannels"
|
|
| "_interpqueues"
|
|
| "_interpreters"
|
|
| "_ios_support"
|
|
| "_opcode_metadata"
|
|
| "_posixshmem"
|
|
| "_pydatetime"
|
|
| "_pylong"
|
|
| "_pyrepl"
|
|
| "_sha2"
|
|
| "_statistics"
|
|
| "_suggestions"
|
|
| "_sysconfig"
|
|
| "_testclinic"
|
|
| "_testclinic_limited"
|
|
| "_testexternalinspection"
|
|
| "_testinternalcapi"
|
|
| "_testlimitedcapi"
|
|
| "_testsinglephase"
|
|
| "_tokenize"
|
|
| "_typing"
|
|
| "_zoneinfo"
|
|
| "graphlib"
|
|
| "tomllib"
|
|
| "xxlimited_35"
|
|
| "zoneinfo"
|
|
)
|
|
)
|
|
}
|