The following issues were found
Lib/test/_typed_dict_helper.py
3 issues
Line: 17
Column: 1
OptionalIntType = Optional[int]
class Foo(TypedDict):
a: OptionalIntType
Reported by Pylint.
Line: 17
Column: 1
OptionalIntType = Optional[int]
class Foo(TypedDict):
a: OptionalIntType
Reported by Pylint.
Line: 17
Column: 1
OptionalIntType = Optional[int]
class Foo(TypedDict):
a: OptionalIntType
Reported by Pylint.
Lib/test/test_distutils.py
3 issues
Line: 8
Column: 1
be run.
"""
import warnings
from test import support
from test.support import warnings_helper
with warnings_helper.check_warnings(
("The distutils package is deprecated", DeprecationWarning), quiet=True):
Reported by Pylint.
Line: 18
Column: 1
import distutils.tests
def test_main():
# used by regrtest
support.run_unittest(distutils.tests.test_suite())
support.reap_children()
Reported by Pylint.
Line: 24
Column: 1
support.reap_children()
def load_tests(*_):
# used by unittest
return distutils.tests.test_suite()
if __name__ == "__main__":
Reported by Pylint.
Lib/test/bad_getattr2.py
3 issues
Line: 6
Column: 13
x = 1
def __dir__(bad_sig):
return []
Reported by Pylint.
Line: 1
Column: 1
def __getattr__():
"Bad one"
x = 1
def __dir__(bad_sig):
return []
Reported by Pylint.
Line: 4
Column: 1
def __getattr__():
"Bad one"
x = 1
def __dir__(bad_sig):
return []
Reported by Pylint.
Lib/test/test_import/data/circular_imports/subpkg/subpackage2.py
3 issues
Line: 2
Column: 1
#from .util import util
from .. import subpackage
Reported by Pylint.
Line: 2
Column: 1
#from .util import util
from .. import subpackage
Reported by Pylint.
Line: 1
Column: 1
#from .util import util
from .. import subpackage
Reported by Pylint.
Lib/test/test_import/data/circular_imports/subpkg2/parent/__init__.py
3 issues
Line: 1
Column: 1
import test.test_import.data.circular_imports.subpkg2.parent.child
Reported by Pylint.
Line: 1
Column: 1
import test.test_import.data.circular_imports.subpkg2.parent.child
Reported by Pylint.
Line: 1
Column: 1
import test.test_import.data.circular_imports.subpkg2.parent.child
Reported by Pylint.
Lib/struct.py
3 issues
Line: 13
Column: 1
'error'
]
from _struct import *
from _struct import _clearcache
from _struct import __doc__
Reported by Pylint.
Line: 14
Column: 1
]
from _struct import *
from _struct import _clearcache
from _struct import __doc__
Reported by Pylint.
Line: 1
Column: 1
__all__ = [
# Functions
'calcsize', 'pack', 'pack_into', 'unpack', 'unpack_from',
'iter_unpack',
# Classes
'Struct',
# Exceptions
Reported by Pylint.
Lib/test/crashers/gc_inspection.py
3 issues
Line: 23
Column: 1
import gc
def g():
marker = object()
yield marker
# now the marker is in the tuple being constructed
[tup] = [x for x in gc.get_referrers(marker) if type(x) is tuple]
print(tup)
Reported by Pylint.
Line: 23
Column: 1
import gc
def g():
marker = object()
yield marker
# now the marker is in the tuple being constructed
[tup] = [x for x in gc.get_referrers(marker) if type(x) is tuple]
print(tup)
Reported by Pylint.
Line: 27
Column: 53
marker = object()
yield marker
# now the marker is in the tuple being constructed
[tup] = [x for x in gc.get_referrers(marker) if type(x) is tuple]
print(tup)
print(tup[1])
tuple(g())
Reported by Pylint.
Doc/includes/email-headers.py
3 issues
Line: 2
Column: 1
# Import the email modules we'll need
from email.parser import BytesParser, Parser
from email.policy import default
# If the e-mail headers are in a file, uncomment these two lines:
# with open(messagefile, 'rb') as fp:
# headers = BytesParser(policy=default).parse(fp)
# Or for parsing headers in a string (this is an uncommon operation), use:
Reported by Pylint.
Line: 1
Column: 1
# Import the email modules we'll need
from email.parser import BytesParser, Parser
from email.policy import default
# If the e-mail headers are in a file, uncomment these two lines:
# with open(messagefile, 'rb') as fp:
# headers = BytesParser(policy=default).parse(fp)
# Or for parsing headers in a string (this is an uncommon operation), use:
Reported by Pylint.
Line: 1
Column: 1
# Import the email modules we'll need
from email.parser import BytesParser, Parser
from email.policy import default
# If the e-mail headers are in a file, uncomment these two lines:
# with open(messagefile, 'rb') as fp:
# headers = BytesParser(policy=default).parse(fp)
# Or for parsing headers in a string (this is an uncommon operation), use:
Reported by Pylint.
Lib/importlib/resources.py
3 issues
Line: 3
Column: 1
"""Read resources contained within a package."""
from ._common import (
as_file,
files,
Package,
Resource,
)
Reported by Pylint.
Line: 10
Column: 1
Resource,
)
from ._legacy import (
contents,
open_binary,
read_binary,
open_text,
read_text,
Reported by Pylint.
Line: 20
Column: 1
path,
)
from importlib.abc import ResourceReader
__all__ = [
'Package',
'Resource',
Reported by Pylint.
Doc/includes/sqlite3/row_factory.py
3 issues
Line: 1
Column: 1
import sqlite3
def dict_factory(cursor, row):
d = {}
for idx, col in enumerate(cursor.description):
d[col[0]] = row[idx]
return d
con = sqlite3.connect(":memory:")
Reported by Pylint.
Line: 3
Column: 1
import sqlite3
def dict_factory(cursor, row):
d = {}
for idx, col in enumerate(cursor.description):
d[col[0]] = row[idx]
return d
con = sqlite3.connect(":memory:")
Reported by Pylint.
Line: 4
Column: 5
import sqlite3
def dict_factory(cursor, row):
d = {}
for idx, col in enumerate(cursor.description):
d[col[0]] = row[idx]
return d
con = sqlite3.connect(":memory:")
Reported by Pylint.