We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83ff7b8 commit 11628f2Copy full SHA for 11628f2
pylsp/_utils.py
@@ -416,3 +416,9 @@ def get_eol_chars(text):
416
if match:
417
return match.group(0)
418
return None
419
+
420
+def flatten(lst: Iterable[Iterable[Any]]) -> List[Any] | None:
421
+ """Flatten a iterable of iterables into a single list."""
422
+ if not lst:
423
+ return None
424
+ return [i for sublst in lst for i in sublst]
0 commit comments