The following issues were found
Lib/nturl2path.py
4 issues
Line: 17
Column: 5
# ///C:/foo/bar/spam.foo
# become
# C:\foo\bar\spam.foo
import string, urllib.parse
# Windows itself uses ":" even in URLs.
url = url.replace(':', '|')
if not '|' in url:
# No drive specifier, just convert slashes
if url[:4] == '////':
Reported by Pylint.
Line: 17
Column: 5
# ///C:/foo/bar/spam.foo
# become
# C:\foo\bar\spam.foo
import string, urllib.parse
# Windows itself uses ":" even in URLs.
url = url.replace(':', '|')
if not '|' in url:
# No drive specifier, just convert slashes
if url[:4] == '////':
Reported by Pylint.
Line: 45
Column: 1
path += '\\'
return path
def pathname2url(p):
"""OS-specific conversion from a file system path to a relative URL
of the 'file' scheme; not recommended for general use."""
# e.g.
# C:\foo\bar\spam.foo
# becomes
Reported by Pylint.
Line: 52
Column: 5
# C:\foo\bar\spam.foo
# becomes
# ///C:/foo/bar/spam.foo
import urllib.parse
# First, clean up some special forms. We are going to sacrifice
# the additional information anyway
if p[:4] == '\\\\?\\':
p = p[4:]
if p[:4].upper() == 'UNC\\':
Reported by Pylint.
Lib/test/test_frozen.py
4 issues
Line: 24
Column: 13
if name in sys.modules:
del sys.modules[name]
with captured_stdout() as out:
import __hello__
self.assertEqual(out.getvalue(), 'Hello world!\n')
if __name__ == '__main__':
unittest.main()
Reported by Pylint.
Line: 18
Column: 1
from test.support import captured_stdout
class TestFrozen(unittest.TestCase):
def test_frozen(self):
name = '__hello__'
if name in sys.modules:
del sys.modules[name]
with captured_stdout() as out:
Reported by Pylint.
Line: 19
Column: 5
class TestFrozen(unittest.TestCase):
def test_frozen(self):
name = '__hello__'
if name in sys.modules:
del sys.modules[name]
with captured_stdout() as out:
import __hello__
Reported by Pylint.
Line: 24
Column: 13
if name in sys.modules:
del sys.modules[name]
with captured_stdout() as out:
import __hello__
self.assertEqual(out.getvalue(), 'Hello world!\n')
if __name__ == '__main__':
unittest.main()
Reported by Pylint.
Lib/test/test_extcall.py
4 issues
Line: 468
Column: 1
>>> f(1, kw=3)
Traceback (most recent call last):
...
TypeError: f() takes 0 positional arguments but 1 positional argument (and 1 keyword-only argument) were given
>>> def f(*, kw, b): pass
>>> f(1, 2, 3, b=3, kw=3)
Traceback (most recent call last):
...
TypeError: f() takes 0 positional arguments but 3 positional arguments (and 2 keyword-only arguments) were given
Reported by Pylint.
Line: 473
Column: 1
>>> f(1, 2, 3, b=3, kw=3)
Traceback (most recent call last):
...
TypeError: f() takes 0 positional arguments but 3 positional arguments (and 2 keyword-only arguments) were given
>>> def f(a, b=2, *, kw): pass
>>> f(2, 3, 4, kw=4)
Traceback (most recent call last):
...
TypeError: f() takes from 1 to 2 positional arguments but 3 positional arguments (and 1 keyword-only argument) were given
Reported by Pylint.
Line: 478
Column: 1
>>> f(2, 3, 4, kw=4)
Traceback (most recent call last):
...
TypeError: f() takes from 1 to 2 positional arguments but 3 positional arguments (and 1 keyword-only argument) were given
Too few and missing arguments:
>>> def f(a): pass
>>> f()
Reported by Pylint.
Line: 526
Column: 1
import sys
from test import support
def test_main():
support.run_doctest(sys.modules[__name__], True)
if __name__ == '__main__':
test_main()
Reported by Pylint.
Lib/test/test_import/data/circular_imports/binding.py
4 issues
Line: 1
Column: 1
import test.test_import.data.circular_imports.binding2 as binding2
Reported by Pylint.
Line: 1
Column: 1
import test.test_import.data.circular_imports.binding2 as binding2
Reported by Pylint.
Line: 1
Column: 1
import test.test_import.data.circular_imports.binding2 as binding2
Reported by Pylint.
Line: 1
Column: 1
import test.test_import.data.circular_imports.binding2 as binding2
Reported by Pylint.
Lib/test/test_import/data/circular_imports/binding2.py
4 issues
Line: 1
Column: 1
import test.test_import.data.circular_imports.binding as binding
Reported by Pylint.
Line: 1
Column: 1
import test.test_import.data.circular_imports.binding as binding
Reported by Pylint.
Line: 1
Column: 1
import test.test_import.data.circular_imports.binding as binding
Reported by Pylint.
Line: 1
Column: 1
import test.test_import.data.circular_imports.binding as binding
Reported by Pylint.
Lib/test/test_import/data/circular_imports/from_cycle1.py
4 issues
Line: 1
Column: 1
from .from_cycle2 import a
b = 1
Reported by Pylint.
Line: 1
Column: 1
from .from_cycle2 import a
b = 1
Reported by Pylint.
Line: 1
Column: 1
from .from_cycle2 import a
b = 1
Reported by Pylint.
Line: 2
Column: 1
from .from_cycle2 import a
b = 1
Reported by Pylint.
Lib/test/test_import/data/circular_imports/from_cycle2.py
4 issues
Line: 1
Column: 1
from .from_cycle1 import b
a = 1
Reported by Pylint.
Line: 1
Column: 1
from .from_cycle1 import b
a = 1
Reported by Pylint.
Line: 1
Column: 1
from .from_cycle1 import b
a = 1
Reported by Pylint.
Line: 2
Column: 1
from .from_cycle1 import b
a = 1
Reported by Pylint.
Lib/test/test_import/data/circular_imports/indirect.py
4 issues
Line: 1
Column: 1
from . import basic, basic2
Reported by Pylint.
Line: 1
Column: 1
from . import basic, basic2
Reported by Pylint.
Line: 1
Column: 1
from . import basic, basic2
Reported by Pylint.
Line: 1
Column: 1
from . import basic, basic2
Reported by Pylint.
Lib/test/test_import/data/circular_imports/rebinding2.py
4 issues
Line: 1
Column: 1
from .subpkg import util
from . import rebinding
util = util.util
Reported by Pylint.
Line: 2
Column: 1
from .subpkg import util
from . import rebinding
util = util.util
Reported by Pylint.
Line: 2
Column: 1
from .subpkg import util
from . import rebinding
util = util.util
Reported by Pylint.
Line: 1
Column: 1
from .subpkg import util
from . import rebinding
util = util.util
Reported by Pylint.
Lib/test/test_import/data/package2/submodule1.py
4 issues
Line: 3
Column: 1
import sys
sys.modules.pop(__package__, None)
from . import submodule2
Reported by Pylint.
Line: 3
Column: 1
import sys
sys.modules.pop(__package__, None)
from . import submodule2
Reported by Pylint.
Line: 1
Column: 1
import sys
sys.modules.pop(__package__, None)
from . import submodule2
Reported by Pylint.
Line: 3
Column: 1
import sys
sys.modules.pop(__package__, None)
from . import submodule2
Reported by Pylint.