https://github.com/josverl/hashable
Just for reproduction of a bug
https://github.com/josverl/hashable
Last synced: 5 months ago
JSON representation
Just for reproduction of a bug
- Host: GitHub
- URL: https://github.com/josverl/hashable
- Owner: Josverl
- Created: 2023-09-04T21:39:43.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-04T21:47:47.000Z (about 2 years ago)
- Last Synced: 2025-05-12T02:11:36.821Z (5 months ago)
- Language: Python
- Homepage:
- Size: 227 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# to reproduce
```
pip install micropython-esp32-stubs --target typings --no-userpython -m venv .venv
.\.venv\Scripts\activate.ps1
pip install pyright
```then run
```bash
pyright -t typings .\src\validate_hasable.py
```See Error
D:\repos\Stubber-test-repos\hashable\src\validate_hasable.py:6:6 - error: Dictionary key must be hashable
peix per type for :
- int, str ....
- strFixed by full update of stdlib to 3.11+ ,
and then removing the bulk of features not supported in Micropython ( Manual labor )-:Some modules are available on two levels and with multiple names
- `typings/os.pyi`
- `typings/uos.pyi`
- `typings/stdlib/os/__init__.pyi`
- `typings/io.pyi`
- `typings/uio.pyi`
- `typings/stdlib/io.pyi`Solution
* import everthing from the stdlib modules in the micropython module level modules
File`typings/os.pyi`
`from stdlib.os import * `this needs an update in stubber to add addtional glue imports to these modules
and exposed a limitation of libcst which does not copy over `from foo import *` by default1. os/uos
2. io/uio
3. socket
4. sysinstall from branch & folder
```
pip install git+https://github.com/josverl/micropython-stubs.git@stdlib-updates#subdirectory=publish/micropython-stdlib-stubs --target typings --no-user
pip install git+https://github.com/josverl/micropython-stubs.git@stdlib-updates#subdirectory=publish/micropython-v1_20_0-esp32-stubs --target typings --no-user
```## other issues
##### stdlib/_typeshed - outdated - errors
1. update the _typeshed folder from (pylances copy ot) Typeshed
2. added / updated a series of other modules to resolve as much errors as possible
3.FIXED