Skip to content

Commit

Permalink
add types to modal_version and modal_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
savarin committed Feb 20, 2024
1 parent f3f2baf commit 158366c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modal/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ async def _stream_function_call_data(
while True:
req = api_pb2.FunctionCallGetDataRequest(function_call_id=function_call_id, last_index=last_index)
try:
async for chunk in unary_stream(stub_fn, req):
async for chunk in unary_stream(stub_fn, req): # type: ignore[var-annotated]
if chunk.index <= last_index:
continue
last_index = chunk.index
Expand Down
12 changes: 12 additions & 0 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ def lint(ctx):
def mypy(ctx):
mypy_allowlist = [
"modal/functions.py",
"modal_utils/__init__.py",
"modal_utils/app_utils.py",
"modal_utils/async_utils.py",
"modal_utils/grpc_testing.py",
"modal_utils/grpc_utils.py",
"modal_utils/hash_utils.py",
"modal_utils/http_utils.py",
"modal_utils/logger.py",
"modal_utils/package_utils.py",
"modal_utils/rand_pb_testing.py",
"modal_version/__init__.py",
"modal_version/_version_generated.py",
]

ctx.run("mypy .", pty=True)
Expand Down

0 comments on commit 158366c

Please sign in to comment.