-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
43 lines (40 loc) · 1.23 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# import sys
# import inspect
# import pkgutil
# from pathlib import Path
# from importlib import import_module
from ._checker import UpstreamChecker, NO_VERSION
from .github import GitHubChecker
from .gitlab import GitLabChecker
from .bitbucket import BitbucketChecker
from .pypi import PypiChecker
from .debian import DebianChecker
from .alpine import AlpineChecker
from .didierstevens import DidierStevensChecker
classmap = {
"github": GitHubChecker,
"gitlab": GitLabChecker,
"bitbucket": BitbucketChecker,
"pypi": PypiChecker,
"debian": DebianChecker,
"alpine": AlpineChecker,
"didierstevens@github": DidierStevensChecker,
}
__all__ = [
"GitHubChecker",
"GitLabChecker",
"BitbucketChecker",
"PypiChecker",
"DebianChecker",
"AlpineChecker",
"DidierStevensChecker",
"UpstreamChecker",
"classmap",
"NO_VERSION"
]
# for (_, name, _) in pkgutil.iter_modules([Path(__file__).parent]):
# imported_module = import_module("." + name, package=__name__)
# for i in dir(imported_module):
# attribute = getattr(imported_module, i)
# if inspect.isclass(attribute) and issubclass(attribute, UpstreamChecker):
# setattr(sys.modules[__name__], name, attribute)