pywinrt / python-winsdk

Python package with bindings for Windows SDK
https://python-winsdk.readthedocs.io
MIT License
77 stars 8 forks source link

Errors when interacting with mypy #4

Closed DatGuy1 closed 2 years ago

DatGuy1 commented 2 years ago

There are a few issues when running mypy on stub files importing winsdk, but I'm not sure how feasible fixing them would be.

First type of error:

from winsdk.windows.data.xml.dom import IXmlNode, XmlDocument
error: Module "winsdk.windows.data.xml.dom" has no attribute "IXmlNode"
error: Module "winsdk.windows.data.xml.dom" has no attribute "XmlDocument"

Second type, when adding ignore missing winsdk imports to a configuration file:

winsdk\windows\devices\sms\__init__.pyi:140: error: invalid syntax

Which seems to be because of https://github.com/pywinrt/python-winsdk/blob/main/pywinrt/winsdk/windows/devices/sms/__init__.pyi#L140 using the reserved 'from' keyword

dlech commented 2 years ago

using the reserved 'from' keyword

Related issue: https://github.com/pywinrt/pywinrt/issues/6

dlech commented 2 years ago

This should be fixed in v1.0.0-beta.3.