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

Format using Ruff instead of Black. #2988

Closed Fuyukai closed 2 months ago

Fuyukai commented 2 months ago

Removes a dependency, which is always good.

Apparently it's meant to be drop-in compatible, but clearly not.

Most of the test code relating to Black has been removed, because that entire area is an atrocity and needs to be vaporised.

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 99.63%. Comparing base (e87dc46) to head (e8314b2).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2988 +/- ## ========================================== - Coverage 99.63% 99.63% -0.01% ========================================== Files 117 117 Lines 17598 17581 -17 Branches 3171 3169 -2 ========================================== - Hits 17533 17516 -17 Misses 46 46 Partials 19 19 ``` | [Files](https://app.codecov.io/gh/python-trio/trio/pull/2988?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio) | Coverage Δ | | |---|---|---| | [src/trio/\_\_init\_\_.py](https://app.codecov.io/gh/python-trio/trio/pull/2988?src=pr&el=tree&filepath=src%2Ftrio%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX19pbml0X18ucHk=) | `100.00% <ø> (ø)` | | | [src/trio/\_channel.py](https://app.codecov.io/gh/python-trio/trio/pull/2988?src=pr&el=tree&filepath=src%2Ftrio%2F_channel.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX2NoYW5uZWwucHk=) | `100.00% <ø> (ø)` | | | [src/trio/\_core/\_parking\_lot.py](https://app.codecov.io/gh/python-trio/trio/pull/2988?src=pr&el=tree&filepath=src%2Ftrio%2F_core%2F_parking_lot.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX2NvcmUvX3BhcmtpbmdfbG90LnB5) | `100.00% <ø> (ø)` | | | [src/trio/\_core/\_traps.py](https://app.codecov.io/gh/python-trio/trio/pull/2988?src=pr&el=tree&filepath=src%2Ftrio%2F_core%2F_traps.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX2NvcmUvX3RyYXBzLnB5) | `100.00% <ø> (ø)` | | | [src/trio/\_highlevel\_open\_tcp\_stream.py](https://app.codecov.io/gh/python-trio/trio/pull/2988?src=pr&el=tree&filepath=src%2Ftrio%2F_highlevel_open_tcp_stream.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX2hpZ2hsZXZlbF9vcGVuX3RjcF9zdHJlYW0ucHk=) | `100.00% <ø> (ø)` | | | [src/trio/\_path.py](https://app.codecov.io/gh/python-trio/trio/pull/2988?src=pr&el=tree&filepath=src%2Ftrio%2F_path.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX3BhdGgucHk=) | `100.00% <ø> (ø)` | | | [src/trio/\_tests/test\_highlevel\_open\_tcp\_stream.py](https://app.codecov.io/gh/python-trio/trio/pull/2988?src=pr&el=tree&filepath=src%2Ftrio%2F_tests%2Ftest_highlevel_open_tcp_stream.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX3Rlc3RzL3Rlc3RfaGlnaGxldmVsX29wZW5fdGNwX3N0cmVhbS5weQ==) | `100.00% <100.00%> (ø)` | | | [src/trio/\_tests/test\_socket.py](https://app.codecov.io/gh/python-trio/trio/pull/2988?src=pr&el=tree&filepath=src%2Ftrio%2F_tests%2Ftest_socket.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX3Rlc3RzL3Rlc3Rfc29ja2V0LnB5) | `100.00% <ø> (ø)` | | | [src/trio/\_tests/test\_ssl.py](https://app.codecov.io/gh/python-trio/trio/pull/2988?src=pr&el=tree&filepath=src%2Ftrio%2F_tests%2Ftest_ssl.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX3Rlc3RzL3Rlc3Rfc3NsLnB5) | `99.85% <100.00%> (ø)` | | | [src/trio/\_tests/test\_testing.py](https://app.codecov.io/gh/python-trio/trio/pull/2988?src=pr&el=tree&filepath=src%2Ftrio%2F_tests%2Ftest_testing.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio#diff-c3JjL3RyaW8vX3Rlc3RzL3Rlc3RfdGVzdGluZy5weQ==) | `100.00% <100.00%> (ø)` | | | ... and [4 more](https://app.codecov.io/gh/python-trio/trio/pull/2988?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-trio) | |
Fuyukai commented 2 months ago

I'd like to get this PR approved and merged as soon as possible so I can base my next PR off of it. I can't really imagine anything objectionable here.

jakkdl commented 2 months ago

Not finding the exact issue atm, but e.g. psf/black#4123 has very long and incredibly in-the-weed discussion about type hints.

No that was the issue I was thinking about, it's linked at https://docs.astral.sh/ruff/formatter/black/#parenthesizing-long-nested-expressions

Fuyukai commented 2 months ago

Guess this ain't gonna happen.