api position objects now implements __str__ and __repr__
This commit is contained in:
parent
08675bdc5c
commit
a7d1fca14a
4 changed files with 10 additions and 4 deletions
|
@ -65,6 +65,12 @@ class Position:
|
|||
self.y = y
|
||||
self.degrees = degrees
|
||||
|
||||
def __repr__(self):
|
||||
return f"Position(x={self.x}, y={self.y}, degrees={self.degrees})"
|
||||
|
||||
def __str__(self):
|
||||
return f"Position(x={round(self.x, 5)}, y={round(self.y, 5)}, degrees={round(self.degrees, 5)})"
|
||||
|
||||
|
||||
class DoubleElim:
|
||||
"""Class used for communicating with double elimination api
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
__version__ = "0.1.0-0"
|
||||
__version__ = "0.1.0-3"
|
||||
|
||||
import compLib.LogstashLogging
|
||||
import logging
|
||||
|
@ -8,7 +8,7 @@ try:
|
|||
__versions = apt.Cache()["python3-complib"].versions
|
||||
if len(__versions) != 1:
|
||||
print(f"Starting compLib! \033[91mVersion: {__version__} is outdated\033[0m\n"
|
||||
f"\033[92m[!] run the command 'apt update && apt install python3-complib' to install the newest version\033[0m")
|
||||
f"\033[92m[!] run the command 'sudo apt update && sudo apt install python3-complib' to install the newest version\033[0m")
|
||||
else:
|
||||
print(f"Starting compLib! \033[92mVersion: {__version__} is up to date\033[0m")
|
||||
except Exception as e:
|
||||
|
|
Reference in a new issue