Skip to content

Commit

Permalink
Rely on type checking for, well, type checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyandrewmeyer committed Feb 27, 2024
1 parent 03e22b6 commit 20ffba3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions ops/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1550,8 +1550,6 @@ def __iter__(self):
return iter(self._data)

def __getitem__(self, key: Union['Unit', 'Application']):
if not isinstance(key, (Unit, Application)):
raise KeyError('Can only index relation data with a Unit or Application')
return self._data[key]

def __repr__(self):
Expand Down

0 comments on commit 20ffba3

Please sign in to comment.