Skip to content

Commit

Permalink
Replace multiple == checks with in (#167)
Browse files Browse the repository at this point in the history
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
deepsource-autofix[bot] committed Jan 12, 2022
1 parent b25f57c commit bd2fb05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gradsflow/models/tracker.py
Expand Up @@ -42,7 +42,7 @@ def __getitem__(self, key: str): # skipcq: PYL-R1705
Returns:
`TrackingValues` or a Dictionary
"""
if key == "train" or key == "val":
if key in ("train", "val"):
return self.mode(key)
elif key == "metrics":
return {"train": self.train_metrics, "val": self.val_metrics}
Expand Down

0 comments on commit bd2fb05

Please sign in to comment.