Skip to content

Commit 06921a6

Browse files
committed
chore: use def import_module from importlib
There is no reason to implement it.
1 parent 89718cd commit 06921a6

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

social_core/utils.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import hmac
66
import logging
77
import re
8-
import sys
98
import time
109
import unicodedata
10+
from importlib import import_module
1111
from typing import TYPE_CHECKING, Any
1212
from urllib.parse import parse_qs as battery_parse_qs
1313
from urllib.parse import unquote, urlencode, urlparse, urlunparse
@@ -36,11 +36,6 @@
3636
social_logger = logging.getLogger("social")
3737

3838

39-
def import_module(name):
40-
__import__(name)
41-
return sys.modules[name]
42-
43-
4439
def module_member(name):
4540
mod, member = name.rsplit(".", 1)
4641
module = import_module(mod)

0 commit comments

Comments
 (0)