Josverl / micropython-stubber

Generate and maintain stubs for different MicroPython ports to use with VSCode and Pylance, PyRight, Thonny, PyCharm or MyPy
https://micropython-stubber.readthedocs.io
Other
172 stars 14 forks source link

mypy updates fail to create stubs of (older) uasyncio version #364

Closed Josverl closed 9 months ago

Josverl commented 1 year ago

mypy.stubgen versions newer than 0.991 fail to create stubs for files / modules that have errors

https://pypi.org/project/mypy/0.991/#history

Steps to reproduce the behavior:

  1. run stubber -v -v get-frozen --version v1.17 --black
  2. watch for the warning
  3. 2023-03-26 23:19:03.041 | WARNING | stubber.utils.stubmaker:generate_pyi_from_file:49 - Critical error during semantic analysis: repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\funcs.py:15: error: "await" outside coroutine ("async def")

Also less stubs are created ( the usual workarounds / retries do not appear to work)

Expected

all stubs to be created

logs

2023-03-26 23:19:01.758 | DEBUG    | stubber.utils.stubmaker:generate_pyi_from_file:40 - Calling stubgen on repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\funcs.py
Processing 1 files...
2023-03-26 23:19:03.041 | WARNING  | stubber.utils.stubmaker:generate_pyi_from_file:49 - Critical error during semantic analysis: repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\funcs.py:15: error: "await" outside coroutine ("async def")
2023-03-26 23:19:03.043 | DEBUG    | stubber.utils.stubmaker:generate_pyi_from_file:40 - Calling stubgen on repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\lock.py
Processing 1 files...
Processing uasyncio.lock
Created repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio/lock.pyi
Processed 1 modules
Generated repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio/lock.pyi
2023-03-26 23:19:04.235 | DEBUG    | stubber.utils.stubmaker:generate_pyi_from_file:40 - Calling stubgen on repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\stream.py
Processing 1 files...
Processing uasyncio.stream
Created repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio/stream.pyi
Processed 1 modules
Generated repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio/stream.pyi
2023-03-26 23:19:05.580 | DEBUG    | stubber.utils.stubmaker:generate_pyi_from_file:40 - Calling stubgen on repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\task.py
Processing 1 files...
Processing uasyncio.task
Created repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio/task.pyi
Processed 1 modules
Generated repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio/task.pyi
2023-03-26 23:19:07.957 | DEBUG    | stubber.utils.stubmaker:generate_pyi_from_file:40 - Calling stubgen on repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\__init__.py
Processing 1 files...
Processing uasyncio
Created repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio/__init__.pyi
Processed 1 modules
Generated repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio/__init__.pyi
2023-03-26 23:19:09.359 | DEBUG    | stubber.utils.stubmaker:generate_pyi_files:110 - no matching py for : repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio\core.pyi
2023-03-26 23:19:09.361 | DEBUG    | stubber.utils.stubmaker:generate_pyi_files:110 - no matching py for : repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio\event.pyi
2023-03-26 23:19:09.364 | DEBUG    | stubber.utils.stubmaker:generate_pyi_files:110 - no matching py for : repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio\lock.pyi
2023-03-26 23:19:09.366 | DEBUG    | stubber.utils.stubmaker:generate_pyi_files:110 - no matching py for : repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio\stream.pyi
2023-03-26 23:19:09.368 | DEBUG    | stubber.utils.stubmaker:generate_pyi_files:110 - no matching py for : repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio\task.pyi
2023-03-26 23:19:09.371 | DEBUG    | stubber.utils.stubmaker:generate_pyi_files:110 - no matching py for : repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio\__init__.pyi
2023-03-26 23:19:09.375 | DEBUG    | stubber.utils.stubmaker:generate_pyi_from_file:40 - Calling stubgen on repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\core.py
Processing 1 files...
Processing uasyncio.core
Created repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio/core.pyi
Processed 1 modules
Generated repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio/core.pyi
2023-03-26 23:19:11.121 | DEBUG    | stubber.utils.stubmaker:generate_pyi_from_file:40 - Calling stubgen on repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\event.py
Processing 1 files...
Processing uasyncio.event
Created repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio/event.pyi
Processed 1 modules
Generated repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\uasyncio/event.pyi
2023-03-26 23:19:12.955 | DEBUG    | stubber.utils.stubmaker:generate_pyi_from_file:40 - Calling stubgen on repos\micropython-stubs\stubs\micropython-v1_17-frozen\esp32\GENERIC\uasyncio\funcs.py
Processing 1 files...
Josverl commented 9 months ago

will not fix