fix the repr for OrderedSet to actually execute correctly

Old:
```
OrderedSet("'foo'", "'bar'", "'baz'")
```

New:
```
OrderedSet(['foo', 'bar', 'baz'])
```

The old one looked nasty *and* was totally non-functional.
pull/12064/merge
Eli Schwartz 2 years ago committed by Xavier Claessens
parent 34ac2e4af6
commit ae7a9b0f44
  1. 4
      mesonbuild/utils/universal.py

@ -1886,8 +1886,8 @@ class OrderedSet(T.MutableSet[_T]):
def __repr__(self) -> str:
# Don't print 'OrderedSet("")' for an empty set.
if self.__container:
return 'OrderedSet("{}")'.format(
'", "'.join(repr(e) for e in self.__container.keys()))
return 'OrderedSet([{}])'.format(
', '.join(repr(e) for e in self.__container.keys()))
return 'OrderedSet()'
def __reversed__(self) -> T.Iterator[_T]:

Loading…
Cancel
Save