Results 70 comments of Vasily Zakharov

Here's what looks like one more example of the same issue, out in the wild: `test.py`: ```python3 from typeguard import install_import_hook with install_import_hook(('A', 'urllib3',)): import A ``` `A.py`: ```python3 from...

This problem is still actual for `typeguard` 4.3.0 and Python 3.12.3. The error message is a bit different, though: `NameError: name 'E' is not defined. Did you mean: 'self.E'?`

For the existing API it should be rather simple, like this: ```python # Stubs for netifaces (Python 3) from typing import Any, Mapping, Sequence, Tuple, Union AF_APPLETALK: int AF_ASH: int...

This stub could be added as `__init__.pyi` to the library package together with the `netifaces.*.so` file and empty `py.typed` file to mark the package as static-typed (per PEP 561).

The alternative would be to donate this stub file to [`python/typeshed`](https://github.com/python/typeshed). I could do it if you approve.

My condolences. Shit happens, indeed. Static typing is for checking the code is okay, not for guaranteeing it would work correctly. So it's better to have unavailable constants defined in...

For example, see [`typeshed/blob/master/stdlib/3/os/__init__.pyi`](https://github.com/python/typeshed/blob/master/stdlib/3/os/__init__.pyi) using `if sys.platform != 'win32'` for a similar purpose.

@jstasiak Sure no problem.

I'm not sure why `for` loop is used, probably it should have been `while (!source.AnyRetrievable())` ?