mesonlib: fix annotation of OrderedSet.difference

Any iterable is acceptable, not just Set | OrderedSet
pull/10473/head
Dylan Baker 3 years ago committed by Jussi Pakkanen
parent c51639b4ff
commit fb83223af9
  1. 2
      mesonbuild/mesonlib/universal.py

@ -1764,7 +1764,7 @@ class OrderedSet(T.MutableSet[_T]):
for item in iterable:
self.__container[item] = None
def difference(self, set_: T.Union[T.Set[_T], 'OrderedSet[_T]']) -> 'OrderedSet[_T]':
def difference(self, set_: T.Iterable[_T]) -> 'OrderedSet[_T]':
return type(self)(e for e in self if e not in set_)
def difference_update(self, iterable: T.Iterable[_T]) -> None:

Loading…
Cancel
Save