Skip to content

Commit

Permalink
fix custom graphs not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Shom770 committed Feb 14, 2024
1 parent 6bca543 commit eaa0898
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/page_managers/custom_graphs_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def generate_input_section(self) -> list[list, list, Callable, str]:
names_to_methods = {
name.replace("_", " ").capitalize(): method
for name, method in inspect.getmembers(self.calculated_stats, predicate=inspect.ismethod)
if not name.startswith("__") and "(ignore)" not in method.__doc__
if method.__doc__ and not name.startswith("__") and "(ignore)" not in method.__doc__
}

st.write("#### 📈 Data to Display")
Expand Down
2 changes: 1 addition & 1 deletion src/utils/calculated_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def average_cycles(self, team_number: int, mode: str = None) -> float:
:param mode: The mode to calculate said cycles for (Auto/Teleop)
:return: A float representing the average cycles for said team in the mode specified.
"""
if mode:
if mode is not None:
return self.cycles_by_match(team_number, mode).mean()
else:
return (self.cycles_by_match(team_number, Queries.AUTO) + self.cycles_by_match(team_number, Queries.TELEOP)).mean()
Expand Down

0 comments on commit eaa0898

Please sign in to comment.