Skip to content

Commit cfdcb44

Browse files
authored
Merge pull request #140 from dreadnode/chore/update-dev-dep-versions
chore: updated dev deps
2 parents 0cf4776 + 525fed8 commit cfdcb44

File tree

23 files changed

+102
-100
lines changed

23 files changed

+102
-100
lines changed

.hooks/generate_docs.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
PythonHandler,
1212
)
1313

14-
# ruff: noqa: T201
15-
1614

1715
class CustomMarkdownConverter(MarkdownConverter): # type: ignore[misc]
1816
# Strip extra whitespace from code blocks

dreadnode/agent/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class TaskAgent(Agent):
259259
"""
260260

261261
def model_post_init(self, _: t.Any) -> None:
262-
from dreadnode.agent.tools import finish_task, update_todo
262+
from dreadnode.agent.tools import finish_task, update_todo # noqa: PLC0415
263263

264264
if not any(tool for tool in self.tools if tool.name == "finish_task"):
265265
self.tools.append(finish_task)

dreadnode/agent/events.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ class AgentEnd(Event):
108108

109109

110110
def rebuild_event_models() -> None:
111-
from dreadnode.agent.agent import Agent # noqa: F401
112-
from dreadnode.agent.reactions import Reaction # noqa: F401
113-
from dreadnode.agent.result import AgentResult # noqa: F401
114-
from dreadnode.agent.thread import Thread # noqa: F401
111+
from dreadnode.agent.agent import Agent # noqa: F401,PLC0415
112+
from dreadnode.agent.reactions import Reaction # noqa: F401,PLC0415
113+
from dreadnode.agent.result import AgentResult # noqa: F401,PLC0415
114+
from dreadnode.agent.thread import Thread # noqa: F401,PLC0415
115115

116116
rebuild_dataclass(Event) # type: ignore[arg-type]
117117
rebuild_dataclass(AgentStart) # type: ignore[arg-type]

dreadnode/agent/hooks/summarize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
def _is_context_length_error(error: Exception) -> bool:
2424
"""Checks if an exception is likely due to exceeding the context window."""
2525
with contextlib.suppress(ImportError):
26-
from litellm.exceptions import ContextWindowExceededError
26+
from litellm.exceptions import ContextWindowExceededError # noqa: PLC0415
2727

2828
if isinstance(error, ContextWindowExceededError):
2929
return True

dreadnode/api/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def export_runs(
393393
Returns:
394394
A DataFrame containing the exported run data.
395395
"""
396-
import pandas as pd
396+
import pandas as pd # noqa: PLC0415
397397

398398
response = self.request(
399399
"GET",
@@ -430,7 +430,7 @@ def export_metrics(
430430
Returns:
431431
A DataFrame containing the exported metric data.
432432
"""
433-
import pandas as pd
433+
import pandas as pd # noqa: PLC0415
434434

435435
response = self.request(
436436
"GET",
@@ -470,7 +470,7 @@ def export_parameters(
470470
Returns:
471471
A DataFrame containing the exported parameter data.
472472
"""
473-
import pandas as pd
473+
import pandas as pd # noqa: PLC0415
474474

475475
response = self.request(
476476
"GET",
@@ -511,7 +511,7 @@ def export_timeseries(
511511
Returns:
512512
A DataFrame containing the exported timeseries data.
513513
"""
514-
import pandas as pd
514+
import pandas as pd # noqa: PLC0415
515515

516516
response = self.request(
517517
"GET",

dreadnode/cli/agent/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async def run(
9999
config_default = None
100100
with contextlib.suppress(Exception):
101101
config_default = config_model()
102-
config_parameter = t.Optional[config_parameter] # type: ignore [assignment] # noqa: UP007
102+
config_parameter = config_parameter | None # type: ignore [assignment]
103103

104104
async def agent_cli(*, config: t.Any = config_default) -> None:
105105
agent = hydrate_agent(agent_blueprint, config)

dreadnode/cli/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ def clone(
202202

203203
@cli.command(help="Show versions and exit.", group="Meta")
204204
def version() -> None:
205-
import importlib.metadata
206-
import platform
207-
import sys
205+
import importlib.metadata # noqa: PLC0415
206+
import platform # noqa: PLC0415
207+
import sys # noqa: PLC0415
208208

209209
version = importlib.metadata.version("dreadnode")
210210
python_version = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"

dreadnode/cli/profile/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def switch(
5959

6060
# If no profile provided, prompt user to choose
6161
if profile is None:
62-
from rich.prompt import Prompt
62+
from rich.prompt import Prompt # noqa: PLC0415
6363

6464
profiles = list(config.servers.keys())
6565
rich.print("\nAvailable profiles:")

dreadnode/convert.py

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

99
def run_span_to_graph(run: "RunSpan") -> "nx.DiGraph":
1010
try:
11-
import networkx as nx
11+
import networkx as nx # noqa: PLC0415 # pyright: ignore[reportMissingModuleSource]
1212
except ImportError as e:
1313
raise RuntimeError("The `networkx` package is required for graph conversion") from e
1414

dreadnode/data_types/audio.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
def check_imports() -> None:
1212
try:
13-
import soundfile as sf # type: ignore[import-untyped,unused-ignore] # noqa: F401
13+
import soundfile as sf # type: ignore[import-untyped,unused-ignore] # noqa: F401,PLC0415
1414
except ImportError as e:
1515
raise ImportError(
1616
"Audio processing requires `soundfile`. Install with: pip install dreadnode[multimodal]"
1717
) from e
1818

1919
try:
20-
import numpy as np # type: ignore[import-untyped,unused-ignore] # noqa: F401
20+
import numpy as np # type: ignore[import-untyped,unused-ignore] # noqa: F401,PLC0415
2121
except ImportError as e:
2222
raise ImportError(
2323
"Audio processing requires `numpy`. Install with: pip install dreadnode[multimodal]"
@@ -78,7 +78,7 @@ def _process_audio_data(self) -> tuple[bytes, str, int | None, float | None]:
7878
Returns:
7979
A tuple of (audio_bytes, format_name, sample_rate, duration)
8080
"""
81-
import numpy as np
81+
import numpy as np # noqa: PLC0415
8282

8383
if isinstance(self._data, str | Path) and Path(self._data).exists():
8484
return self._process_file_path()
@@ -94,7 +94,7 @@ def _process_file_path(self) -> tuple[bytes, str, int | None, float | None]:
9494
Returns:
9595
A tuple of (audio_bytes, format_name, sample_rate, duration)
9696
"""
97-
import soundfile as sf # type: ignore[import-not-found,unused-ignore]
97+
import soundfile as sf # type: ignore[import-not-found,unused-ignore] # noqa: PLC0415
9898

9999
path_str = str(self._data)
100100
audio_bytes = Path(path_str).read_bytes()
@@ -113,8 +113,8 @@ def _process_numpy_array(self) -> tuple[bytes, str, int | None, float | None]:
113113
Returns:
114114
A tuple of (audio_bytes, format_name, sample_rate, duration)
115115
"""
116-
import numpy as np # type: ignore[import-not-found,unused-ignore]
117-
import soundfile as sf # type: ignore[import-not-found,unused-ignore]
116+
import numpy as np # type: ignore[import-not-found,unused-ignore] # noqa: PLC0415
117+
import soundfile as sf # type: ignore[import-not-found,unused-ignore] # noqa: PLC0415
118118

119119
if self._sample_rate is None:
120120
raise ValueError('Argument "sample_rate" is required when using numpy arrays.')
@@ -151,7 +151,7 @@ def _generate_metadata(
151151
Returns:
152152
A dictionary of metadata
153153
"""
154-
import numpy as np # type: ignore[import-not-found,unused-ignore]
154+
import numpy as np # type: ignore[import-not-found,unused-ignore] # noqa: PLC0415
155155

156156
metadata: dict[str, str | int | float | None] = {
157157
"extension": format_name.lower(),

0 commit comments

Comments
 (0)