python-trio / trio

Trio – a friendly Python library for async concurrency and I/O
https://trio.readthedocs.io
Other
5.98k stars 325 forks source link

change all instances of 'import typing as ...' to 'from typing import ...' #2935

Closed jakkdl closed 5 months ago

jakkdl commented 5 months ago

Noticed this when reviewing #2932. For context, from typing import is what's used everywhere else, with 110 matches in the repository when greping.

also one instance of import typing_extensions, where statistics are similar.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (0204d04) 99.64% compared to head (08ab36a) 99.64%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2935 +/- ## ======================================= Coverage 99.64% 99.64% ======================================= Files 116 116 Lines 17503 17503 Branches 3148 3148 ======================================= Hits 17441 17441 Misses 43 43 Partials 19 19 ``` | [Files](https://app.codecov.io/gh/python-trio/trio/pull/2935?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio) | Coverage Δ | | |---|---|---| | [src/trio/\_util.py](https://app.codecov.io/gh/python-trio/trio/pull/2935?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX3V0aWwucHk=) | `100.00% <100.00%> (ø)` | | | [src/trio/lowlevel.py](https://app.codecov.io/gh/python-trio/trio/pull/2935?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vbG93bGV2ZWwucHk=) | `100.00% <ø> (ø)` | | | [src/trio/socket.py](https://app.codecov.io/gh/python-trio/trio/pull/2935?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vc29ja2V0LnB5) | `100.00% <ø> (ø)` | |
jakkdl commented 5 months ago

right, ofc there are export/visibility reasons for the leading underscore... why didn't we simply settle on using __all__ like everybody else 🙃