mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 03:56:54 +00:00
15 lines
281 B
Python
15 lines
281 B
Python
from __future__ import annotations
|
|
|
|
import importlib
|
|
|
|
try:
|
|
import importlib.util
|
|
except ImportError:
|
|
pass
|
|
|
|
|
|
try:
|
|
module_from_spec = importlib.util.module_from_spec
|
|
except AttributeError:
|
|
def module_from_spec(spec):
|
|
return spec.loader.load_module(spec.name)
|