Skip to content

Commit c48621e

Browse files
committed
ignore generated proto while style check
1 parent 6cd5f69 commit c48621e

File tree

75 files changed

+151
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+151
-2
lines changed

generate_protoc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ def files_filter(dir, items: List[str]) -> List[str]:
1818
continue
1919
ignore.append(item)
2020

21-
print("items: ", items)
22-
print("ignore: ", ignore)
2321
return ignore
2422

2523

@@ -38,6 +36,8 @@ def remove_protos(rootdirpath: str):
3836

3937

4038
def fiximports(rootdir: str):
39+
flake_ignore_line = "# flake8: " + "noqa" # prevent ignore the file
40+
4141
for dirpath, _, fnames in os.walk(rootdir):
4242
for fname in fnames:
4343
if not fname.endswith(".py"):
@@ -46,6 +46,7 @@ def fiximports(rootdir: str):
4646
with open(os.path.join(dirpath, fname), 'r+t') as f:
4747
content = f.read()
4848
content = content.replace("from protos", "from ydb._grpc.protos")
49+
content += "\n" + flake_ignore_line + "\n"
4950
f.seek(0)
5051
f.write(content)
5152

ydb/_grpc/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
# flake8: noqa

ydb/_grpc/protos/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
# flake8: noqa
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
# flake8: noqa

ydb/_grpc/protos/annotations/validation_pb2_grpc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
44

5+
6+
# flake8: noqa

ydb/_grpc/protos/ydb_auth_pb2.py

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ydb/_grpc/protos/ydb_auth_pb2_grpc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
44

5+
6+
# flake8: noqa

ydb/_grpc/protos/ydb_cms_pb2.py

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ydb/_grpc/protos/ydb_cms_pb2_grpc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
44

5+
6+
# flake8: noqa

ydb/_grpc/protos/ydb_common_pb2.py

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)