-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PythonStandalone Package 0.29.9 stubs errors #1942
Comments
…faults for Box#enlarge and Box#enlarged (bonus)
Ah, well that was a stupid typo that was not covered by tests :( But as a bonus I added defaults for "Box#enlarge" and "Box#enlarged" which makes a lot of sense to me:
|
Sorry, did not want to close this issue. It happened automatically when I merged the PR. One question: is there an easy way to test .pyi files? I mean in a sense of syntax correctness. Matthias |
Oh, i guess I found it:
If does not give syntax errors anymore, but a lot of warnings - mainly because it does not understand how the overload inference works inside KLayout ... Matthias |
I think so. You can install the package with python and install mypy and then runn So mypy is a static type checker and will check all the type hints for correctness. Similar to pylance etc |
This works (probably also works with stubtests):
Might be worth to fix some of the errors (like unused ignore redef etc, or at least to have a look at them and then use ignore commands selectively) |
Hi Matthias,
I think my request for the
Point.move(d)
confused your autogeneration script for the stubs 🫣In the
dbcode.pyi
at line 704 there is a syntax error:The
dx, 0: int,
should bedx: int = 0
I think. Also, I don't thinkdy: Optional[int] = ...
is valid, I would assume it should bemoved(dx: int = 0, dy: Optional[int] = None)
Hopefully this is just some minor tweak to fix it.
If you would want help with this, as always, I'd be happy to help.
Best,
Sebastian
(mypy found that error when I tried to type check kfactory as pre-commit 😄 )
The text was updated successfully, but these errors were encountered: