Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix Python 3.10 execution by addressing: DeprecationWarning: Using or…
… importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  • Loading branch information
hvmptydvmpty committed Feb 24, 2023
commit 304e527a3edf05d47166d34dbf36822336fa54fb
4 changes: 2 additions & 2 deletions src/main/resources/mcpi/api/python/modded/mcpi/util.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import collections
import typing

def flatten(l):
for e in l:
if isinstance(e, collections.Iterable) and not isinstance(e, str):
if isinstance(e, typing.Iterable) and not isinstance(e, str):
for ee in flatten(e): yield ee
else: yield e