We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 19b1966 + 062aaf6 commit 34de3a0Copy full SHA for 34de3a0
README.md
@@ -509,6 +509,30 @@ Note that `if` blocks without an `else` will not be rewritten as it could introd
509
handle_error()
510
```
511
512
+### `TimeoutError` aliases
513
+
514
+Availability:
515
+- `--py310-plus` for `socket.timeout`
516
+- `--py311-plus` for `asyncio.Timeout`
517
518
+```diff
519
520
+ def throw(a):
521
+ if a:
522
+- raise asyncio.TimeoutError('boom')
523
++ raise TimeoutError('boom')
524
+ else:
525
+- raise socket.timeout('boom')
526
527
528
+ def catch(a):
529
+ try:
530
+ throw(a)
531
+- except (asyncio.TimeoutError, socket.timeout):
532
++ except TimeoutError:
533
+ handle_error()
534
+```
535
536
### `typing.Text` str alias
537
538
```diff
0 commit comments