Commit ced4c09
Update volume.py (#14291)
* Update volume.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor: remove unnecessary empty iterable in deque (RUF037)
Clean up trailing whitespace and empty list in deque initialization to satisfy Ruff linting rules.
* style: update valid_input to use Python 3.12 type parameters
Applied PEP 695 syntax to the valid_input function by moving the 'num' generic into brackets. This resolves the UP047 error in the machine_learning directory.
* style: update generic functions to Python 3.12 syntax (UP047)
Refactor jump_search to use PEP 695 type parameters [T] as required by the latest Ruff configuration.
* fix(types): add Comparable bound to jump_search type parameter
Updated the PEP 695 type parameter syntax to include the 'Comparable' bound. This resolves the Mypy error regarding unsupported left operand types for the '<' operator, ensuring that the generic type T supports comparisons.
* Apply batched suggestions from code review
Co-authored-by: Christian Clauss <cclauss@me.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>1 parent fff3acb commit ced4c09
1 file changed
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
513 | 539 | | |
514 | 540 | | |
515 | 541 | | |
| |||
560 | 586 | | |
561 | 587 | | |
562 | 588 | | |
| 589 | + | |
563 | 590 | | |
564 | 591 | | |
565 | 592 | | |
| |||
0 commit comments