Commit c83b07e
committed
chore(ruff): Manual fixes
docs/conf.py:191:9: PERF203 `try`-`except` within a loop incurs performance overhead
src/libtmux/_internal/query_list.py:62:9: TRY300 Consider moving this statement to an `else` block
src/libtmux/_internal/query_list.py:297:19: TRY002 Create your own exception
src/libtmux/_internal/query_list.py:297:19: TRY003 Avoid specifying long messages outside the exception class
src/libtmux/_internal/query_list.py:337:25: TRY301 Abstract `raise` to an inner function
src/libtmux/_internal/query_list.py:337:31: TRY003 Avoid specifying long messages outside the exception class
src/libtmux/common.py:154:23: TRY003 Avoid specifying long messages outside the exception class
src/libtmux/common.py:191:23: TRY003 Avoid specifying long messages outside the exception class
src/libtmux/common.py:246:13: TRY400 Use `logging.exception` instead of `logging.error`
src/libtmux/neo.py:243:15: TRY003 Avoid specifying long messages outside the exception class
src/libtmux/pane.py:293:19: TRY003 Avoid specifying long messages outside the exception class
src/libtmux/pane.py:439:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/pane.py:446:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/pytest_plugin.py:230:5: TRY302 Remove exception handler; error is immediately re-raised
src/libtmux/server.py:146:13: TRY300 Consider moving this statement to an `else` block
src/libtmux/server.py:210:23: TRY003 Avoid specifying long messages outside the exception class
src/libtmux/server.py:241:13: TRY300 Consider moving this statement to an `else` block
src/libtmux/server.py:515:17: PERF401 Use a list comprehension to create a transformed list
src/libtmux/server.py:535:13: PERF401 Use a list comprehension to create a transformed list
src/libtmux/server.py:553:13: PERF401 Use a list comprehension to create a transformed list
src/libtmux/server.py:591:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/server.py:604:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/server.py:612:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/server.py:619:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/server.py:629:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/server.py:642:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/server.py:650:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/server.py:660:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/server.py:667:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/server.py:679:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/server.py:688:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/session.py:111:17: PERF401 Use a list comprehension to create a transformed list
src/libtmux/session.py:130:17: PERF401 Use a list comprehension to create a transformed list
src/libtmux/session.py:361:17: PERF401 Use a list comprehension to create a transformed list
src/libtmux/session.py:366:19: TRY003 Avoid specifying long messages outside the exception class
src/libtmux/session.py:373:19: TRY003 Avoid specifying long messages outside the exception class
src/libtmux/session.py:487:31: PTH111 `os.path.expanduser()` should be replaced by `Path.expanduser()`
src/libtmux/session.py:602:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/session.py:609:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/session.py:616:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/session.py:623:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/session.py:633:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/session.py:640:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/session.py:649:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/session.py:657:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/session.py:666:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/test.py:50:15: PTH100 `os.path.abspath()` should be replaced by `Path.resolve()`
src/libtmux/test.py:50:31: PTH120 `os.path.dirname()` should be replaced by `Path.parent`
src/libtmux/test.py:51:15: PTH100 `os.path.abspath()` should be replaced by `Path.resolve()`
src/libtmux/test.py:51:31: PTH118 `os.path.join()` should be replaced by `Path` with `/` operator
src/libtmux/test.py:52:33: PTH118 `os.path.join()` should be replaced by `Path` with `/` operator
src/libtmux/window.py:123:17: PERF401 Use a list comprehension to create a transformed list
src/libtmux/window.py:245:31: PTH111 `os.path.expanduser()` should be replaced by `Path.expanduser()`
src/libtmux/window.py:473:13: TRY400 Use `logging.exception` instead of `logging.error`
src/libtmux/window.py:633:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/window.py:640:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/window.py:647:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/window.py:654:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/window.py:664:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/window.py:671:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/window.py:680:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/window.py:688:9: B028 No explicit `stacklevel` keyword argument found
src/libtmux/window.py:697:9: B028 No explicit `stacklevel` keyword argument found
tests/legacy_api/test_common.py:34:18: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
tests/legacy_api/test_common.py:54:18: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
tests/legacy_api/test_common.py:70:18: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
tests/legacy_api/test_common.py:87:18: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
tests/legacy_api/test_server.py:152:10: B017 `pytest.raises(Exception)` should be considered evil
tests/test_common.py:33:18: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
tests/test_common.py:53:18: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
tests/test_common.py:69:18: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
tests/test_common.py:86:18: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
tests/test_server.py:169:10: B017 `pytest.raises(Exception)` should be considered evil
tests/test_window.py:206:5: B018 Found useless expression. Either assign it to a variable or remove it.1 parent fd54fa1 commit c83b07e
File tree
14 files changed
+124
-120
lines changed- docs
- src/libtmux
- tests
- legacy_api
14 files changed
+124
-120
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
246 | | - | |
| 245 | + | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
240 | 239 | | |
241 | 240 | | |
242 | 241 | | |
243 | | - | |
244 | | - | |
245 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
| 293 | + | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
| 439 | + | |
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
| 446 | + | |
447 | 447 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
| 228 | + | |
232 | 229 | | |
233 | 230 | | |
234 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | 146 | | |
148 | 147 | | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | 241 | | |
243 | 242 | | |
| 243 | + | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | | - | |
| 515 | + | |
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
| |||
544 | 545 | | |
545 | 546 | | |
546 | 547 | | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
554 | 556 | | |
555 | 557 | | |
556 | 558 | | |
| |||
588 | 590 | | |
589 | 591 | | |
590 | 592 | | |
591 | | - | |
| 593 | + | |
592 | 594 | | |
593 | 595 | | |
594 | 596 | | |
| |||
601 | 603 | | |
602 | 604 | | |
603 | 605 | | |
604 | | - | |
| 606 | + | |
605 | 607 | | |
606 | 608 | | |
607 | 609 | | |
608 | 610 | | |
609 | 611 | | |
610 | 612 | | |
611 | 613 | | |
612 | | - | |
| 614 | + | |
613 | 615 | | |
614 | 616 | | |
615 | 617 | | |
616 | 618 | | |
617 | 619 | | |
618 | 620 | | |
619 | | - | |
| 621 | + | |
620 | 622 | | |
621 | 623 | | |
622 | 624 | | |
| |||
626 | 628 | | |
627 | 629 | | |
628 | 630 | | |
629 | | - | |
| 631 | + | |
630 | 632 | | |
631 | 633 | | |
632 | 634 | | |
| |||
639 | 641 | | |
640 | 642 | | |
641 | 643 | | |
642 | | - | |
| 644 | + | |
643 | 645 | | |
644 | 646 | | |
645 | 647 | | |
646 | 648 | | |
647 | 649 | | |
648 | 650 | | |
649 | 651 | | |
650 | | - | |
| 652 | + | |
651 | 653 | | |
652 | 654 | | |
653 | 655 | | |
| |||
657 | 659 | | |
658 | 660 | | |
659 | 661 | | |
660 | | - | |
| 662 | + | |
661 | 663 | | |
662 | 664 | | |
663 | 665 | | |
664 | 666 | | |
665 | 667 | | |
666 | 668 | | |
667 | | - | |
| 669 | + | |
668 | 670 | | |
669 | 671 | | |
670 | 672 | | |
| |||
676 | 678 | | |
677 | 679 | | |
678 | 680 | | |
679 | | - | |
| 681 | + | |
680 | 682 | | |
681 | 683 | | |
682 | 684 | | |
| |||
685 | 687 | | |
686 | 688 | | |
687 | 689 | | |
688 | | - | |
| 690 | + | |
689 | 691 | | |
0 commit comments