The following issues were found
tests/import/pkg3/mod2.py
3 issues
Line: 1
Column: 1
print("mod2 __name__:", __name__)
print("in mod2")
def foo():
print("mod2.foo()")
Reported by Pylint.
Line: 5
Column: 1
print("in mod2")
def foo():
print("mod2.foo()")
Reported by Pylint.
Line: 5
Column: 1
print("in mod2")
def foo():
print("mod2.foo()")
Reported by Pylint.
tests/cpydiff/core_locals.py
3 issues
Line: 10
Column: 5
def test():
val = 2
print(locals())
test()
Reported by Pylint.
Line: 4
Column: 1
"""
categories: Core,Runtime
description: Local variables aren't included in locals() result
cause: MicroPython doesn't maintain symbolic local environment, it is optimized to an array of slots. Thus, local variables can't be accessed by a name.
workaround: Unknown
"""
def test():
Reported by Pylint.
Line: 9
Column: 1
"""
def test():
val = 2
print(locals())
test()
Reported by Pylint.
tests/net_inet/uasyncio_open_connection.py
3 issues
Line: 10
Column: 9
import asyncio
except ImportError:
print("SKIP")
raise SystemExit
async def http_get(url):
reader, writer = await asyncio.open_connection(url, 80)
Reported by Pylint.
Line: 1
Column: 1
# Test simple HTTP request with uasyncio.open_connection()
try:
import uasyncio as asyncio
except ImportError:
try:
import asyncio
except ImportError:
print("SKIP")
Reported by Pylint.
Line: 13
Column: 1
raise SystemExit
async def http_get(url):
reader, writer = await asyncio.open_connection(url, 80)
print("write GET")
writer.write(b"GET / HTTP/1.0\r\n\r\n")
await writer.drain()
Reported by Pylint.
tests/cpydiff/core_import_path.py
3 issues
Line: 3
Column: 1
"""
categories: Core,import
description: __path__ attribute of a package has a different type (single string instead of list of strings) in MicroPython
cause: MicroPython does't support namespace packages split across filesystem. Beyond that, MicroPython's import system is highly optimized for minimal memory usage.
workaround: Details of import handling is inherently implementation dependent. Don't rely on such details in portable applications.
"""
import modules
print(modules.__path__)
Reported by Pylint.
Line: 4
Column: 1
"""
categories: Core,import
description: __path__ attribute of a package has a different type (single string instead of list of strings) in MicroPython
cause: MicroPython does't support namespace packages split across filesystem. Beyond that, MicroPython's import system is highly optimized for minimal memory usage.
workaround: Details of import handling is inherently implementation dependent. Don't rely on such details in portable applications.
"""
import modules
print(modules.__path__)
Reported by Pylint.
Line: 5
Column: 1
categories: Core,import
description: __path__ attribute of a package has a different type (single string instead of list of strings) in MicroPython
cause: MicroPython does't support namespace packages split across filesystem. Beyond that, MicroPython's import system is highly optimized for minimal memory usage.
workaround: Details of import handling is inherently implementation dependent. Don't rely on such details in portable applications.
"""
import modules
print(modules.__path__)
Reported by Pylint.
tests/cpydiff/core_import_all.py
3 issues
Line: 9
Column: 1
"""
from modules3 import *
foo.hello()
Reported by Pylint.
Line: 7
Column: 1
cause: Not implemented.
workaround: Manually import the sub-modules directly in __init__.py using ``from . import foo, bar``.
"""
from modules3 import *
foo.hello()
Reported by Pylint.
Line: 5
Column: 1
categories: Core,import
description: __all__ is unsupported in __init__.py in MicroPython.
cause: Not implemented.
workaround: Manually import the sub-modules directly in __init__.py using ``from . import foo, bar``.
"""
from modules3 import *
foo.hello()
Reported by Pylint.
tests/extmod/uasyncio_get_event_loop.py
3 issues
Line: 10
Column: 9
import asyncio
except ImportError:
print("SKIP")
raise SystemExit
async def main():
print("start")
await asyncio.sleep(0.01)
Reported by Pylint.
Line: 1
Column: 1
# Test get_event_loop()
try:
import uasyncio as asyncio
except ImportError:
try:
import asyncio
except ImportError:
print("SKIP")
Reported by Pylint.
Line: 13
Column: 1
raise SystemExit
async def main():
print("start")
await asyncio.sleep(0.01)
print("end")
Reported by Pylint.
tests/net_inet/uasyncio_tcp_read_headers.py
3 issues
Line: 10
Column: 9
import asyncio
except ImportError:
print("SKIP")
raise SystemExit
async def http_get_headers(url):
reader, writer = await asyncio.open_connection(url, 80)
Reported by Pylint.
Line: 1
Column: 1
# Test uasyncio.open_connection() and stream readline()
try:
import uasyncio as asyncio
except ImportError:
try:
import asyncio
except ImportError:
print("SKIP")
Reported by Pylint.
Line: 13
Column: 1
raise SystemExit
async def http_get_headers(url):
reader, writer = await asyncio.open_connection(url, 80)
print("write GET")
writer.write(b"GET / HTTP/1.0\r\n\r\n")
await writer.drain()
Reported by Pylint.
tests/basics/int_big_and3.py
3 issues
Line: 1
Column: 1
# test - +
print( -97989513389222316022151446562729620153292831887555425160965597396
& 23716683549865351578586448630079789776107310103486834795830390982)
print( -53817081128841898634258263553430908085326601592682411889506742059
& 37042558948907407488299113387826240429667200950043601129661240876)
print( -26167512042587370698808974207700979337713004510730289760097826496
Reported by Pylint.
Line: 1
Column: 11
# test - +
print( -97989513389222316022151446562729620153292831887555425160965597396
& 23716683549865351578586448630079789776107310103486834795830390982)
print( -53817081128841898634258263553430908085326601592682411889506742059
& 37042558948907407488299113387826240429667200950043601129661240876)
print( -26167512042587370698808974207700979337713004510730289760097826496
Reported by Pylint.
Line: 27
Column: 11
print( -40019818573920230246248826511203818792007462193311949166285967147
& 9487909752)
# test + -
print( 97989513389222316022151446562729620153292831887555425160965597396
& -23716683549865351578586448630079789776107310103486834795830390982)
print( 53817081128841898634258263553430908085326601592682411889506742059
Reported by Pylint.
tests/import/pkg7/subpkg1/subpkg2/mod3.py
3 issues
Line: 1
Column: 1
from ... import mod1
from ...mod2 import bar
print(mod1.foo)
print(bar)
# attempted relative import beyond top-level package
try:
from .... import mod1
Reported by Pylint.
Line: 2
Column: 1
from ... import mod1
from ...mod2 import bar
print(mod1.foo)
print(bar)
# attempted relative import beyond top-level package
try:
from .... import mod1
Reported by Pylint.
Line: 1
Column: 1
from ... import mod1
from ...mod2 import bar
print(mod1.foo)
print(bar)
# attempted relative import beyond top-level package
try:
from .... import mod1
Reported by Pylint.
tests/internal_bench/loop_count-3-while_up.py
3 issues
Line: 1
Column: 1
import bench
def test(num):
i = 0
while i < num:
i += 1
Reported by Pylint.
Line: 1
Column: 1
import bench
def test(num):
i = 0
while i < num:
i += 1
Reported by Pylint.
Line: 4
Column: 1
import bench
def test(num):
i = 0
while i < num:
i += 1
Reported by Pylint.