Skip to content

Commit 0c3cc75

Browse files
authored
chore: ignore cls type annotations on linter (GoogleCloudPlatform#12428)
1 parent 6d2cb2f commit 0c3cc75

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

noxfile-template.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,21 +124,24 @@ def _determine_local_import_names(start_dir: str) -> list[str]:
124124
# Linting with flake8.
125125
#
126126
# We ignore the following rules:
127-
# ANN101: missing type annotation for self in method
127+
# ANN101: missing type annotation for `self` in method
128+
# ANN102: missing type annotation for `cls` in method
128129
# E203: whitespace before ‘:’
129130
# E266: too many leading ‘#’ for block comment
130131
# E501: line too long
131132
# I202: Additional newline in a section of imports
132133
#
133134
# We also need to specify the rules which are ignored by default:
134135
# ['E226', 'W504', 'E126', 'E123', 'W503', 'E24', 'E704', 'E121']
136+
#
137+
# For more information see: https://pypi.org/project/flake8-annotations
135138
FLAKE8_COMMON_ARGS = [
136139
"--show-source",
137140
"--builtin=gettext",
138141
"--max-complexity=20",
139142
"--import-order-style=google",
140143
"--exclude=.nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py",
141-
"--ignore=ANN101,E121,E123,E126,E203,E226,E24,E266,E501,E704,W503,W504,I202",
144+
"--ignore=ANN101,ANN102,E121,E123,E126,E203,E226,E24,E266,E501,E704,W503,W504,I202",
142145
"--max-line-length=88",
143146
]
144147

0 commit comments

Comments
 (0)