1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-05 18:31:10 +01:00

Fix compatibility with Python > 3.5

This commit is contained in:
DJ Stomp 2024-10-02 01:35:08 -05:00
parent c7e7e1d884
commit 7c9dd44c32

View File

@ -14,8 +14,10 @@ try:
module_spec.loader.exec_module(module)
return module
except ImportError:
from imp import load_source
try:
from importlib.machinery import SourceFileLoader as load_source # Fix compat with Python 3.5+
except ImportError: # Fallback for really old (< 3.3) Python versions
from imp import load_source # type: ignore
class Settings(dict):
def __getattr__(self, item):