Skip to content

Conversation

@VeckoTheGecko
Copy link
Contributor

@VeckoTheGecko VeckoTheGecko commented Jul 31, 2024

Contributes to #1620

@VeckoTheGecko
Copy link
Contributor Author

To see all of the explicit imports from standard libraries, one can use the following regex:

from (encodings|shutil|winreg|smtplib|enum|termios|getopt|turtle|statistics|atexit|copy|functools|sunau|test|typing|codeop|math|netrc|http|syslog|msvcrt|itertools|tokenize|socket|tracemalloc|configparser|msilib|runpy|ctypes|types|concurrent|select|readline|sqlite3|xmlrpc|gzip|logging|telnetlib|base64|csv|tempfile|pwd|xdrlib|threading|contextvars|os|uu|fractions|hmac|keyword|stringprep|zipfile|mimetypes|ftplib|fcntl|shelve|traceback|graphlib|tty|timeit|spwd|gc|textwrap|string|errno|poplib|abc|calendar|pstats|tomllib|wave|resource|mmap|quopri|webbrowser|idlelib|locale|usercustomize|argparse|cmd|mailbox|grp|hashlib|pkgutil|importlib|sched|xml|optparse|imaplib|socketserver|ipaddress|contextlib|random|plistlib|zipapp|builtins|zipimport|cProfile|decimal|heapq|queue|fileinput|zlib|audioop|colorsys|bdb|collections|nntplib|ensurepip|re|difflib|crypt|wsgiref|profile|trace|stat|pprint|site|cmath|io|gettext|sysconfig|pipes|time|dataclasses|inspect|selectors|unittest|asyncio|shlex|ossaudiodev|ssl|pickle|posix|fnmatch|operator|warnings|turtledemo|reprlib|imghdr|array|cgitb|glob|signal|lib2to3|platform|linecache|json|code|pathlib|pdb|chunk|sitecustomize|datetime|zoneinfo|pty|cgi|unicodedata|email|tabnanny|secrets|py_compile|tkinter|sys|token|mailcap|venv|ast|marshal|urllib|symtable|lzma|pyclbr|rlcompleter|weakref|struct|dbm|multiprocessing|html|bisect|binascii|aifc|codecs|pydoc|uuid|modulefinder|pickletools|sndhdr|bz2|doctest|copyreg|dis|faulthandler|filecmp|curses|compileall|tarfile|winsound|getpass|nis|subprocess|numbers)

I think the other ones are good, it was just the os, sys and ast ones that I thought led to confusion :)

@VeckoTheGecko VeckoTheGecko changed the title Update standard library (ast, os, sys) import mechanism Update ast, os, sys import mechanism, minor code refactoring Jul 31, 2024
@VeckoTheGecko VeckoTheGecko marked this pull request as draft August 1, 2024 07:03
@VeckoTheGecko VeckoTheGecko changed the title Update ast, os, sys import mechanism, minor code refactoring Update ast, os, sys import mechanism to module imports Aug 1, 2024
@VeckoTheGecko VeckoTheGecko marked this pull request as ready for review August 1, 2024 07:40
@VeckoTheGecko VeckoTheGecko merged commit 13bcc14 into master Aug 1, 2024
@VeckoTheGecko VeckoTheGecko deleted the v/st-lib-imports branch August 9, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants