Skip to content

Commit

Permalink
Fix lint and format issues
Browse files Browse the repository at this point in the history
  • Loading branch information
openhands-agent committed Dec 16, 2024
1 parent 5237f78 commit 99f87ab
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 5 deletions.
61 changes: 59 additions & 2 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ dependencies = [
"aiofile>=3.9.0",
"sentry-sdk>=2.18.0",
"aiocache[redis]>=0.12.3",
"black>=24.10.0",
]
requires-python = "==3.12.*"
readme = "README.md"
Expand Down
8 changes: 5 additions & 3 deletions src/config/bot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import contextlib
import os
from collections import defaultdict
from typing import Any

import orjson
Expand Down Expand Up @@ -59,14 +60,15 @@ def load_json_recursive(data: dict[str, Any]) -> dict[str, Any]:
elif os.path.exists("config.yml"):
path = "config.yml"

from collections import defaultdict
def merge_dicts(dct, merge_dct):

def merge_dicts(dct: dict, merge_dct: dict) -> None:
for k, v in merge_dct.items():
if (isinstance(dct.get(k), dict) and isinstance(v, dict)):
if isinstance(dct.get(k), dict) and isinstance(v, dict):
merge_dicts(dct[k], v)
else:
dct[k] = v


config: dict[str, dict[str, Any]] = defaultdict(dict)
if path:
with open(path, encoding="utf-8") as f:
Expand Down

0 comments on commit 99f87ab

Please sign in to comment.