Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ce0a09a

Browse files
Disable pycharm warning on uvicorn.run(), not accurate.
1 parent 4b4909a commit ce0a09a

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

‎ch03-first-api/main.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,7 @@ def calculate(x: int, y: int, z: Optional[int] = None):
4040
}
4141

4242

43+
# uvicorn was updated, and it's type definitions don't match FastAPI,
44+
# but the server and code still work fine. So ignore PyCharm's warning:
45+
# noinspection PyTypeChecker
4346
uvicorn.run(api, port=8000, host="127.0.0.1")

‎ch05-a-realistic-api/main.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ def configure_routing():
3636

3737
if __name__ == '__main__':
3838
configure()
39+
# uvicorn was updated, and it's type definitions don't match FastAPI,
40+
# but the server and code still work fine. So ignore PyCharm's warning:
41+
# noinspection PyTypeChecker
3942
uvicorn.run(api, port=8000, host='127.0.0.1')
4043
else:
4144
configure()

‎ch06-error-handling-and-perf/main.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ def configure_routing():
3636

3737
if __name__ == '__main__':
3838
configure()
39+
# uvicorn was updated, and it's type definitions don't match FastAPI,
40+
# but the server and code still work fine. So ignore PyCharm's warning:
41+
# noinspection PyTypeChecker
3942
uvicorn.run(api, port=8000, host='127.0.0.1')
4043
else:
4144
configure()

‎ch07-inbound-data/main.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ def configure_fake_data():
6464

6565
if __name__ == '__main__':
6666
configure()
67+
# uvicorn was updated, and it's type definitions don't match FastAPI,
68+
# but the server and code still work fine. So ignore PyCharm's warning:
69+
# noinspection PyTypeChecker
6770
uvicorn.run(api, port=8000, host='127.0.0.1')
6871
else:
6972
configure()

‎ch08-deployment/main.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ def configure_fake_data():
5050

5151
if __name__ == '__main__':
5252
configure()
53+
# uvicorn was updated, and it's type definitions don't match FastAPI,
54+
# but the server and code still work fine. So ignore PyCharm's warning:
5355
# noinspection PyTypeChecker
5456
uvicorn.run(api, port=8000, host='127.0.0.1')
5557
else:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /