Skip to content

Commit fc600e1

Browse files
committed
Fix that bitproto may break on bitproto -q -c options
1 parent f10ca61 commit fc600e1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

compiler/bitproto/_main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ def main(
137137
fatal(str(error))
138138

139139
# Lint
140+
lint_warnings = 0
140141
if not disable_linter:
141142
lint_warnings = lint(proto)
142143

compiler/bitproto/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
Any,
99
Callable,
1010
List,
11+
NoReturn,
1112
Optional,
1213
Type as T,
1314
TypeVar,
@@ -292,7 +293,7 @@ def write_stderr(s: str) -> None:
292293
sys.stderr.write(s + "\n")
293294

294295

295-
def fatal(s: str = "", code: int = 1) -> None:
296+
def fatal(s: str = "", code: int = 1) -> NoReturn:
296297
"""Exit the whole program with given code and message."""
297298
if s:
298299
write_stderr(s)

0 commit comments

Comments
 (0)