mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Ruff pandas vet (#10281)
* Python linting: Add ruff rules for Pandas-vet and Pytest-style * updating DIRECTORY.md --------- Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -83,7 +83,8 @@ def extended_gcd(a: int, b: int) -> tuple[int, int, int]:
|
||||
(1, -2, 3)
|
||||
|
||||
"""
|
||||
assert a >= 0 and b >= 0
|
||||
assert a >= 0
|
||||
assert b >= 0
|
||||
|
||||
if b == 0:
|
||||
d, x, y = a, 1, 0
|
||||
@ -92,7 +93,8 @@ def extended_gcd(a: int, b: int) -> tuple[int, int, int]:
|
||||
x = q
|
||||
y = p - q * (a // b)
|
||||
|
||||
assert a % d == 0 and b % d == 0
|
||||
assert a % d == 0
|
||||
assert b % d == 0
|
||||
assert d == a * x + b * y
|
||||
|
||||
return (d, x, y)
|
||||
|
Reference in New Issue
Block a user