Skip to content

Commit 010971e

Browse files
committed
chore: initialize project for configuration file typecheck
typecheck codemcp/config.py ```git-revs b64ed56 (Base revision) HEAD Fix type error by adding explicit type annotation for nested dictionary value ``` codemcp-id: 223-chore-initialize-project-for-configuration-file-ty ghstack-source-id: 2543da9 Pull-Request-resolved: #214
1 parent 670050a commit 010971e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

codemcp/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ def _merge_configs(base: dict[str, Any], override: dict[str, Any]) -> None:
9898
"""
9999
for key, value in override.items():
100100
if key in base and isinstance(base[key], dict) and isinstance(value, dict):
101-
_merge_configs(base[key], value)
101+
# Type annotation to help the type checker understand that value is dict[str, Any]
102+
nested_value: dict[str, Any] = value
103+
_merge_configs(base[key], nested_value)
102104
else:
103105
base[key] = value
104106

0 commit comments

Comments
 (0)