Flake8: Drop ignore of issue A003 (#7949)

* Flake8: Drop ignore of issue A003

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Christian Clauss
2022-11-02 19:20:45 +01:00
committed by GitHub
parent 598f6a26a1
commit 45b3383c39
9 changed files with 42 additions and 62 deletions

View File

@ -40,7 +40,6 @@ class Vector:
__sub__(other: Vector): vector subtraction
__mul__(other: float): scalar multiplication
__mul__(other: Vector): dot product
set(components: Collection[float]): changes the vector components
copy(): copies this vector and returns it
component(i): gets the i-th component (0-indexed)
change_component(pos: int, value: float): changes specified component
@ -119,17 +118,6 @@ class Vector:
else: # error case
raise Exception("invalid operand!")
def set(self, components: Collection[float]) -> None:
"""
input: new components
changes the components of the vector.
replaces the components with newer one.
"""
if len(components) > 0:
self.__components = list(components)
else:
raise Exception("please give any vector")
def copy(self) -> Vector:
"""
copies this vector and returns it.