Skip to content

Commit

Permalink
remove redundant iterator implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
harkal committed Mar 5, 2024
1 parent 9d8c4bf commit c7489e2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions vyper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import time
import traceback
import warnings
from collections.abc import Iterator
from typing import Generic, List, TypeVar, Union

from vyper.exceptions import CompilerPanic, DecimalOverrideException, InvalidLiteral, VyperException
Expand Down Expand Up @@ -37,7 +36,7 @@ def get(self, *args, **kwargs):
raise RuntimeError("can't call get() on OrderedSet!")

def first(self):
return next(iter(self.keys()))
return next(iter(self))

def add(self, item: _T) -> None:
self[item] = None
Expand All @@ -62,9 +61,6 @@ def update(self, other):
def __or__(self, other):
return self.__class__(super().__or__(other))

def __iter__(self) -> Iterator[_T]:
return iter(self.keys())

def copy(self):
return self.__class__(super().copy())

Expand Down

0 comments on commit c7489e2

Please sign in to comment.