mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
CI: add type checking (#10997)
* Set up type checking with mypy. * Make mypy pass. * Use list() instead of sorted().
This commit is contained in:
@@ -53,7 +53,7 @@ __all__ = [
|
||||
]
|
||||
|
||||
|
||||
_singletons = {}
|
||||
_singletons: dict[str, object] = {}
|
||||
|
||||
|
||||
def ldap_module():
|
||||
@@ -61,7 +61,7 @@ def ldap_module():
|
||||
return orig_ldap
|
||||
|
||||
|
||||
def _singleton(name, constructor):
|
||||
def _singleton(name: str, constructor):
|
||||
if name in _singletons:
|
||||
return _singletons[name]
|
||||
_singletons[name] = constructor()
|
||||
|
||||
Reference in New Issue
Block a user