Skip to content

Commit 1c6a6a8

Browse files
authored
Merge pull request #3186 from CoolCat467/export-version
Publically re-export `__version__`
2 parents 5ca9662 + 379d9ce commit 1c6a6a8

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

newsfragments/3186.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Publicly re-export ``__version__`` for type checking purposes.

src/trio/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@
104104
sleep_forever as sleep_forever,
105105
sleep_until as sleep_until,
106106
)
107-
108-
# pyright explicitly does not care about `__version__`
109-
# see https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#type-completeness
110-
from ._version import __version__
107+
from ._version import __version__ as __version__
111108

112109
# Not imported by default, but mentioned here so static analysis tools like
113110
# pylint will know that it exists.

0 commit comments

Comments
 (0)