Skip to content

Commit ac3eddc

Browse files
committed
Use stricter lint rules
1 parent b40fad7 commit ac3eddc

File tree

7 files changed

+6
-9
lines changed

7 files changed

+6
-9
lines changed

coagent/agents/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: F401
12
from .chat_agent import ChatAgent, confirm, RunContext, tool
23
from .dynamic_triage import DynamicTriage
34
from .messages import ChatHistory, ChatMessage

coagent/agents/chat_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def __init__(
130130

131131
tools = tools or []
132132
methods = inspect.getmembers(self, predicate=inspect.ismethod)
133-
for name, meth in methods:
133+
for _name, meth in methods:
134134
if getattr(meth, "is_tool", False):
135135
tools.append(meth)
136136

coagent/agents/util.py

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

55
from coagent.core import logger
66

7-
from .messages import ChatMessage, ChatHistory
7+
from .messages import ChatMessage
88
from .model_client import default_model_client, ModelClient
99

1010

coagent/core/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: F401
12
from .agent import (
23
BaseAgent,
34
Context,

coagent/core/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def direct_values(self, prefix: str) -> list[Any]:
4545
def get_func_args(func) -> set[str]:
4646
hints = get_type_hints(func)
4747
hints.pop("return", None) # Ignore the return type.
48-
return set(name for name in hints)
48+
return set(hints.keys())
4949

5050

5151
async def clear_queue(queue: asyncio.Queue) -> None:

coagent/runtimes/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: F401
12
from .http_runtime import HTTPRuntime, HTTPChannelBackend
23
from .local_runtime import LocalRuntime, LocalChannel
34
from .nats_runtime import NATSRuntime, NATSChannel

pyproject.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,10 @@ select = [
5656
'PYI066', # flake8-pyi
5757
]
5858
ignore = [
59-
'B007',
60-
'B008',
61-
'B011',
6259
'B012',
63-
'B028',
6460
'B904',
65-
'C401',
6661
'C408',
6762
'E501',
68-
'F401',
6963
'F841',
7064
]
7165

0 commit comments

Comments
 (0)