Skip to content

Commit

Permalink
Remove some hardcoded modules from `generate_known_standard_library.p…
Browse files Browse the repository at this point in the history
…y` (#11409)

See feedback in: #11374
  • Loading branch information
charliermarsh committed May 13, 2024
1 parent c3c87e8 commit dc5c44c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion crates/ruff_python_stdlib/src/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ pub fn is_known_standard_library(minor_version: u8, module: &str) -> bool {
| "socketserver"
| "spwd"
| "sqlite3"
| "sre"
| "sre_compile"
| "sre_constants"
| "sre_parse"
Expand Down
12 changes: 2 additions & 10 deletions scripts/generate_known_standard_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,10 @@
modules_by_version = {}

for major_version, minor_version in VERSIONS:
modules = {
"_ast",
"posixpath",
"ntpath",
"sre_constants",
"sre_parse",
"sre_compile",
"sre",
}
modules = set()

for module in stdlib_module_names(f"{major_version}.{minor_version}"):
if module not in ["__future__", "__main__"]:
if module != "__future__":
modules.add(module)

modules_by_version[minor_version] = modules
Expand Down

0 comments on commit dc5c44c

Please sign in to comment.