mypy: Fix disallow_untyped_calls check fallout
Add return type annotations and parameter type hints to previously untyped functions, preparing for disallow_untyped_calls enforcement: - ArgsContainer.py: keys() -> Iterable[str] - Object.py: Object.__init__() -> None - ShuntingYard.py: tokenize(), infix_to_postfix(), __init__(), add_operator(), Stack methods, debug(), Calculator/Matcher.__init__() - ShellCmd.py: __exec(), __cleanup(), init(), cleanup(), __init__() - Auth.py: __bind() -> Connection, import Connection - TableIoHandler.py: _check_non_nullable() -> None, buf annotation - Queries.py: _add() -> None - rows.py: __equal(), rows_duplicates(), rows_check_not_null(), rows_dump(), rows_dumps() with proper type signatures - CompositeForeignKey.py: __table() -> Table - EventRouter.py: iter_peers() -> Iterator[tuple[str, Any]] - MapAttr2Shape.py: __value(), __add_key_nodegraphics() - ldap.py: __search() -> str, collect() -> set[str] - multi_key_dict.py: has_key(), get_other_keys(), iterkeys(), get_values_from_str(), test_multi_key_dict(), __init__(), items_dict annotation Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v0.82.0 Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
ec342ba172
commit
e014a9251f
1 changed files with 76 additions and 66 deletions
|
|
@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, override
|
|||
|
||||
import ldap # type: ignore[import-untyped]
|
||||
|
||||
from ...ldap import bind
|
||||
from ...ldap import bind, Connection
|
||||
from ...log import DEBUG, ERR, WARNING, slog
|
||||
from ..Auth import Access
|
||||
from ..Auth import Auth as AuthBase
|
||||
|
|
@ -81,7 +81,7 @@ class Auth(AuthBase): # export
|
|||
self.__conn = self.__bind()
|
||||
self.__dummy = AuthBase.load(conf, tp = 'dummy')
|
||||
|
||||
def __bind(self):
|
||||
def __bind(self) -> Connection:
|
||||
return bind(self.conf)
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Reference in a new issue