geometry: Working table display.

This commit is contained in:
Pierre-Antoine Rouby committed 2023-04-12 17:14:54 +02:00
1 parent d4ce6ce83d
commit af4832a134
2 files changed
+7 -20

No files matched your search

+1 -14
View File
@@ -34,7 +34,7 @@ class Reach:
Returns:
The profile at index i
"""
if i in self._profiles:
if i < len(self._profiles):
return self._profiles[i]
return None
@@ -62,19 +62,6 @@ class Reach:
"""
return self._profiles
def get_profile_i(self, i: int) -> Profile:
"""
Args:
i: Index
Returns:
The profile at index i.
"""
try:
return self._profiles[i]
except IndexError:
raise IndexError(f"Invalid profile index: {i}")
def add_profile(self, index):
"""Add a new profile at the end of profiles list