Skip to content
This repository was archived by the owner on Jun 7, 2022. It is now read-only.

Commit 918c956

Browse files
committed
bump 1.0.1
1 parent 7a419c4 commit 918c956

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

pyshorteners/__init__.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import pkgutil
44

55
logger = logging.getLogger(__name__)
6-
__version__ = '1.0.0'
7-
__author__ = 'Ellison Leão'
8-
__email__ = 'ellisonleao@gmail.com'
9-
__license__ = 'GPLv3'
6+
__version__ = "1.0.1"
7+
__author__ = "Ellison Leão"
8+
__email__ = "ellisonleao@gmail.com"
9+
__license__ = "GPLv3"
1010

1111

1212
class Shortener(object):
@@ -26,21 +26,22 @@ class Shortener(object):
2626
def __init__(self, **kwargs):
2727
self.kwargs = kwargs
2828
# validate some required fields
29-
self.kwargs['debug'] = bool(kwargs.pop('debug', False))
30-
self.kwargs['timeout'] = int(kwargs.pop('timeout', 2))
31-
self.kwargs['verify'] = bool(kwargs.pop('verify', True))
32-
module = importlib.import_module('pyshorteners.shorteners')
33-
self.available_shorteners = [i.name for i in
34-
pkgutil.iter_modules(module.__path__)]
29+
self.kwargs["debug"] = bool(kwargs.pop("debug", False))
30+
self.kwargs["timeout"] = int(kwargs.pop("timeout", 2))
31+
self.kwargs["verify"] = bool(kwargs.pop("verify", True))
32+
module = importlib.import_module("pyshorteners.shorteners")
33+
self.available_shorteners = [
34+
i.name for i in pkgutil.iter_modules(module.__path__)
35+
]
3536

3637
def __getattr__(self, attr):
3738
if attr not in self.available_shorteners:
3839
return self.__getattribute__(attr)
3940

4041
# get instance of shortener class
4142
short_module = importlib.import_module(
42-
'{}.{}'.format('pyshorteners.shorteners', attr)
43+
"{}.{}".format("pyshorteners.shorteners", attr)
4344
)
44-
instance = getattr(short_module, 'Shortener')(**self.kwargs)
45+
instance = getattr(short_module, "Shortener")(**self.kwargs)
4546

4647
return instance

0 commit comments

Comments
 (0)