Skip to content

Commit d64633d

Browse files
committed
chore: fix mypy and linting issues
1 parent eb82ba9 commit d64633d

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,14 @@ disallow_untyped_calls = false
191191
module = ["tests.transactions.test_transaction_composer"]
192192
disable_error_code = ["call-overload", "union-attr"]
193193

194+
[[tool.mypy.overrides]]
195+
module = ["algokit_utils.clients._algokit_core_bridge"]
196+
disable_error_code = ["attr-defined", "no-untyped-def", "no-untyped-call"]
197+
198+
[[tool.mypy.overrides]]
199+
module = ["algokit_utils.transactions._algokit_core_bridge"]
200+
disable_error_code = ["attr-defined", "no-untyped-def", "no-any-return"]
201+
194202
[tool.semantic_release]
195203
version_toml = "pyproject.toml:tool.poetry.version"
196204
remove_dist = false

src/algokit_utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import importlib.util
1313

14-
_EXPERIMENTAL_DEPENDENCIES_INSTALLED = importlib.util.find_spec("algokit_algod_api") is not None
14+
_EXPERIMENTAL_DEPENDENCIES_INSTALLED: bool | None = importlib.util.find_spec("algokit_algod_api") is not None
1515

1616
# Core types and utilities that are commonly used
1717
from algokit_utils.applications import * # noqa: F403

src/algokit_utils/clients/client_manager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ def __init__(self, clients_or_configs: AlgoClientConfigs | AlgoSdkClients, algor
120120
if clients_or_configs.kmd_config
121121
else None,
122122
)
123-
if _EXPERIMENTAL_DEPENDENCIES_INSTALLED:
123+
if not _EXPERIMENTAL_DEPENDENCIES_INSTALLED:
124+
self._algod = _clients.algod
125+
else:
124126
from algokit_utils.clients._algokit_core_bridge import AlgodClientWithCore
125127

126-
self._algod = AlgodClientWithCore(_clients.algod)
127-
else:
128-
self._algod = _clients.algod
128+
self._algod = AlgodClientWithCore(_clients.algod) # type: ignore[assignment]
129129
self._indexer = _clients.indexer
130130
self._kmd = _clients.kmd
131131
self._algorand = algorand_client

0 commit comments

Comments
 (0)