Replace bandit, flake8, isort, and pyupgrade with ruff (#8178)
* Replace bandit, flake8, isort, and pyupgrade with ruff
* Comment on ruff rules
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@@ -14,17 +14,13 @@ class Point:
|
||||
|
||||
|
||||
def distance(a: Point, b: Point) -> float:
|
||||
return math.sqrt(abs((b.x - a.x) ** 2 + (b.y - a.y) ** 2 + (b.z - a.z) ** 2))
|
||||
|
||||
|
||||
def test_distance() -> None:
|
||||
"""
|
||||
>>> point1 = Point(2, -1, 7)
|
||||
>>> point2 = Point(1, -3, 5)
|
||||
>>> print(f"Distance from {point1} to {point2} is {distance(point1, point2)}")
|
||||
Distance from Point(2, -1, 7) to Point(1, -3, 5) is 3.0
|
||||
"""
|
||||
pass
|
||||
return math.sqrt(abs((b.x - a.x) ** 2 + (b.y - a.y) ** 2 + (b.z - a.z) ** 2))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user