Skip to content

Commit 83fdeaf

Browse files
committed
Update Linter and nox formatter to exclude grpc/ directory
1 parent a427f15 commit 83fdeaf

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/linters/.ruff.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ exclude = [
8282
"venv",
8383
"*/migrations/*",
8484
"noxfile.py",
85-
"src/a2a/grpc/*.*",
85+
"src/a2a/grpc/**",
8686
]
8787

8888
[lint.isort]
@@ -140,7 +140,10 @@ inline-quotes = "single"
140140
"types.py" = ["D", "E501", "N815"] # Ignore docstring and annotation issues in types.py
141141

142142
[format]
143-
exclude = ["types.py", "src/a2a/grpc/**"]
143+
exclude = [
144+
"types.py",
145+
"src/a2a/grpc/**",
146+
]
144147
docstring-code-format = true
145148
docstring-code-line-length = "dynamic" # Or set to 80
146149
quote-style = "single"

.github/workflows/linter.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,5 @@ jobs:
6464
VALIDATE_GIT_COMMITLINT: false
6565
PYTHON_MYPY_CONFIG_FILE: .mypy.ini
6666
FILTER_REGEX_INCLUDE: ".*src/**/*"
67+
FILTER_REGEX_EXCLUDE: ".*src/a2a/grpc/**/*"
6768
PYTHON_RUFF_CONFIG_FILE: .ruff.toml

noxfile.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,17 @@ def format(session) -> None:
103103
}
104104
)
105105

106-
lint_paths_py = [f for f in changed_files if f.endswith('.py')]
106+
lint_paths_py = [
107+
f for f in changed_files if f.endswith('.py') and 'grpc/' not in f
108+
]
107109

108110
if not lint_paths_py:
109111
session.log('No changed Python files to lint.')
110112
return
111113

112114
session.install(
113115
'types-requests',
116+
'types-protobuf',
114117
'pyupgrade',
115118
'autoflake',
116119
'ruff',

0 commit comments

Comments
 (0)