Skip to content

Commit 434b7fa

Browse files
Update .ruff.toml to exclude a few rules for a few files
1 parent a44ab73 commit 434b7fa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/linters/.ruff.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ inline-quotes = "single"
138138
"SLF001",
139139
]
140140
"types.py" = ["D", "E501", "N815"] # Ignore docstring and annotation issues in types.py
141-
"proto_utils.py" = ["D102"]
141+
"proto_utils.py" = ["D102", "PLR0911"]
142+
"helpers.py" = ["ANN001"]
142143

143144
[format]
144145
exclude = [

src/a2a/utils/proto_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def task_status(cls, status: types.TaskStatus) -> a2a_pb2.TaskStatus:
103103
)
104104

105105
@classmethod
106-
def task_state(cls, state: types.TaskState) -> a2a_pb2.TaskState: # ruff: noqa: PLR0911
106+
def task_state(cls, state: types.TaskState) -> a2a_pb2.TaskState:
107107
match state:
108108
case types.TaskState.submitted:
109109
return a2a_pb2.TaskState.TASK_STATE_SUBMITTED
@@ -488,7 +488,7 @@ def task_status(cls, status: a2a_pb2.TaskStatus) -> types.TaskStatus:
488488
)
489489

490490
@classmethod
491-
def task_state(cls, state: a2a_pb2.TaskState) -> types.TaskState: # ruff: noqa: PLR0911
491+
def task_state(cls, state: a2a_pb2.TaskState) -> types.TaskState:
492492
match state:
493493
case a2a_pb2.TaskState.TASK_STATE_SUBMITTED:
494494
return types.TaskState.submitted

0 commit comments

Comments
 (0)