_setmode = None
import io
-from io import (__all__, SEEK_SET, SEEK_CUR, SEEK_END)
+from io import (__all__, SEEK_SET, SEEK_CUR, SEEK_END) # noqa: F401
valid_seek_flags = {0, 1, 2} # Hardwired values
if hasattr(os, 'SEEK_HOLE') :
console.raw_input = readfunc
else:
try:
- import readline
+ import readline # noqa: F401
except ImportError:
pass
console.interact(banner, exitmsg)
# package
_false = 0
if _false:
- import encodings
+ import encodings # noqa: F401
_collections_abc.MutableSequence.register(deque)
try:
- from _collections import _deque_iterator
+ # Expose _deque_iterator to support pickling deque iterators
+ from _collections import _deque_iterator # noqa: F401
except ImportError:
pass
raise NotImplementedError(_system_limited)
_system_limits_checked = True
try:
- import multiprocessing.synchronize
+ import multiprocessing.synchronize # noqa: F401
except ImportError:
_system_limited = (
"This Python build lacks multiprocessing.synchronize, usually due "
try:
has_key
except NameError:
- from .has_key import has_key
+ from .has_key import has_key # noqa: F401
# Wrapper for the entire curses-based application. Runs a function which
# should be the rest of your curses-based application. If the application
try:
from _datetime import *
- from _datetime import __doc__
+ from _datetime import __doc__ # noqa: F401
except ImportError:
from _pydatetime import *
- from _pydatetime import __doc__
+ from _pydatetime import __doc__ # noqa: F401
__all__ = ("date", "datetime", "time", "timedelta", "timezone", "tzinfo",
"MINYEAR", "MAXYEAR", "UTC")
try:
from _decimal import *
- from _decimal import __version__
- from _decimal import __libmpdec_version__
+ from _decimal import __version__ # noqa: F401
+ from _decimal import __libmpdec_version__ # noqa: F401
except ImportError:
from _pydecimal import *
- from _pydecimal import __version__
- from _pydecimal import __libmpdec_version__
+ from _pydecimal import __version__ # noqa: F401
+ from _pydecimal import __libmpdec_version__ # noqa: F401
try:
# OpenSSL's scrypt requires OpenSSL 1.1+
- from _hashlib import scrypt
+ from _hashlib import scrypt # noqa: F401
except ImportError:
pass
import io
import os
from _lzma import *
-from _lzma import _encode_filter_properties, _decode_filter_properties
+from _lzma import _encode_filter_properties, _decode_filter_properties # noqa: F401
import _compression
'''
# This is undocumented. In previous versions of multiprocessing
# its only effect was to make socket objects inheritable on Windows.
- from . import connection
+ from . import connection # noqa: F401
def set_executable(self, executable):
'''Sets the path to a python.exe or pythonw.exe binary used to run
import atexit
import threading # we want threading to install it's
# cleanup function before multiprocessing does
-from subprocess import _args_from_interpreter_flags
+from subprocess import _args_from_interpreter_flags # noqa: F401
from . import process
import _opcode
from _opcode import stack_effect
-from _opcode_metadata import (_specializations, _specialized_opmap, opmap,
- HAVE_ARGUMENT, MIN_INSTRUMENTED_OPCODE)
+from _opcode_metadata import (_specializations, _specialized_opmap, opmap, # noqa: F401
+ HAVE_ARGUMENT, MIN_INSTRUMENTED_OPCODE) # noqa: F401
EXTENDED_ARG = opmap['EXTENDED_ARG']
opname = ['<%r>' % (op,) for op in range(max(opmap.values()) + 1)]
except ImportError:
pass
else:
- from _operator import __doc__
+ from _operator import __doc__ # noqa: F401
# All of these "__func__ = func" assignments have to happen after importing
# from _operator to make sure they're set to the right function
warnings._deprecated('java_ver', remove=(3, 15))
# Import the needed APIs
try:
- import java.lang
+ import java.lang # noqa: F401
except ImportError:
return release, vendor, vminfo, osinfo
if __name__ == '__main__':
import cmd
try:
- import readline
+ import readline # noqa: F401
except ImportError:
pass
from reprlib import Repr
from traceback import format_exception_only
-from _pyrepl.pager import (get_pager, plain, pipe_pager,
+from _pyrepl.pager import (get_pager, pipe_pager,
plain_pager, tempfile_pager, tty_pager)
+# Expose plain() as pydoc.plain()
+from _pyrepl.pager import plain # noqa: F401
+
# --------------------------------------------------------- old names
MAGIC = 20230612
-from _sre import MAXREPEAT, MAXGROUPS
+from _sre import MAXREPEAT, MAXGROUPS # noqa: F401
# SRE standard exception (access as sre.error)
# should this really be here?
import atexit
try:
import readline
- import rlcompleter
+ import rlcompleter # noqa: F401
import _pyrepl.readline
import _pyrepl.unix_console
except ImportError:
"""Run custom site specific code, if available."""
try:
try:
- import sitecustomize
+ import sitecustomize # noqa: F401
except ImportError as exc:
if exc.name == 'sitecustomize':
pass
"""Run custom user specific code, if available."""
try:
try:
- import usercustomize
+ import usercustomize # noqa: F401
except ImportError as exc:
if exc.name == 'usercustomize':
pass
# No SQL provided; start the REPL.
console = SqliteInteractiveConsole(con)
try:
- import readline
+ import readline # noqa: F401
except ImportError:
pass
console.interact(banner, exitmsg="")
]
from _struct import *
-from _struct import _clearcache
-from _struct import __doc__
+from _struct import _clearcache # noqa: F401
+from _struct import __doc__ # noqa: F401
import _symtable
from _symtable import (
USE,
- DEF_GLOBAL, DEF_NONLOCAL, DEF_LOCAL,
- DEF_PARAM, DEF_TYPE_PARAM,
- DEF_FREE_CLASS,
+ DEF_GLOBAL, # noqa: F401
+ DEF_NONLOCAL, DEF_LOCAL,
+ DEF_PARAM, DEF_TYPE_PARAM, DEF_FREE_CLASS,
DEF_IMPORT, DEF_BOUND, DEF_ANNOT,
DEF_COMP_ITER, DEF_COMP_CELL,
SCOPE_OFF, SCOPE_MASK,
from .case import (addModuleCleanup, TestCase, FunctionTestCase, SkipTest, skip,
skipIf, skipUnless, expectedFailure, doModuleCleanups,
enterModuleContext)
-from .suite import BaseTestSuite, TestSuite
+from .suite import BaseTestSuite, TestSuite # noqa: F401
from .loader import TestLoader, defaultTestLoader
-from .main import TestProgram, main
+from .main import TestProgram, main # noqa: F401
from .runner import TextTestRunner, TextTestResult
from .signals import installHandler, registerResult, removeResult, removeHandler
# IsolatedAsyncioTestCase will be imported lazily.
# check for SSL
try:
- import ssl
+ import ssl # noqa: F401
except ImportError:
_have_ssl = False
else:
EMPTY_NAMESPACE = None
EMPTY_PREFIX = None
-from .domreg import getDOMImplementation, registerDOMImplementation
+from .domreg import getDOMImplementation, registerDOMImplementation # noqa: F401