Skip to content

Commit

Permalink
types: Don't allow setting Array members
Browse files Browse the repository at this point in the history
Setting an array member directly is almost certainly a mistake. Remove
the __setitem__ methods.

Signed-off-by: Sean Anderson <[email protected]>
  • Loading branch information
Forty-Bot committed Nov 22, 2023
1 parent bb4d3a3 commit 11cda2b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions mpmetrics/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,6 @@ def __len__(self):
def __getitem__(self, key):
return self._vals[key]

def __setitem__(self, key, value):
self._vals[key] = value

def __iter__(self):
return iter(self._vals)

Expand Down

0 comments on commit 11cda2b

Please sign in to comment.