Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(client): fix mypy lint #3097

Merged
merged 1 commit into from
Dec 27, 2023
Merged

Conversation

jialeicui
Copy link
Contributor

@jialeicui jialeicui commented Dec 27, 2023

Description

https://github.com/star-whale/starwhale/actions/runs/7334596840/job/19971841957?pr=3093

mypy . ../example/mnist ../scripts/client_test --show-traceback
starwhale/web/server.py:37:28: error: Argument 2 to "add_route" of "Starlette" has incompatible type "Callable[[], FileResponse]"; expected "Callable[[Request], Union[Awaitable[Response], Response]]"  [arg-type]
starwhale/web/server.py:45:40: error: Argument 2 to "add_exception_handler" of "Starlette" has incompatible type "Callable[[Request, HTTPException], FileResponse]"; expected "Union[Callable[[Request, Exception], Union[Response, Awaitable[Response]]], Callable[[WebSocket, Exception], Awaitable[None]]]"  [arg-type]
Found 2 errors in 1 file (checked 201 source files)
make: *** [Makefile:52: ci-mypy] Error 1

Modules

  • UI
  • Controller
  • Agent
  • Client
  • Python-SDK
  • Others

Checklist

  • run code format and lint check
  • add unit test
  • add necessary doc

Copy link

codecov bot commented Dec 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b7524b5) 82.68% compared to head (4af060b) 91.85%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3097      +/-   ##
============================================
+ Coverage     82.68%   91.85%   +9.16%     
============================================
  Files           573      137     -436     
  Lines         31970    16125   -15845     
  Branches       1865        0    -1865     
============================================
- Hits          26435    14811   -11624     
+ Misses         4709     1314    -3395     
+ Partials        826        0     -826     
Flag Coverage Δ
console ?
controller ?
standalone 91.85% <100.00%> (-0.04%) ⬇️
unittests 91.85% <100.00%> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tianweidut tianweidut merged commit cf58e90 into star-whale:main Dec 27, 2023
38 checks passed
@jialeicui jialeicui deleted the fix-lint branch December 27, 2023 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants