Skip to content

Commit 6c21d2f

Browse files
committed
Fix for python3.9
1 parent 1ee6faa commit 6c21d2f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

babel/util.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,9 @@ def _split(self, text):
218218
# There are no file names which contain spaces, fallback to the default implementation
219219
return super()._split(text)
220220

221+
super_ = super() # Python 3.9 fix, super() does not work in list comprehension
221222
chunks = re.split(self._enclosed_filename_re, text)
222-
chunks = [[c] if c.startswith(enclosed_filename_start) else super()._split(c) for c in chunks]
223+
chunks = [[c] if c.startswith(enclosed_filename_start) else super_._split(c) for c in chunks]
223224
chunks = [c for c in chain.from_iterable(chunks) if c]
224225
return chunks
225226

0 commit comments

Comments
 (0)