Ar-Kareem / pdf-mobile-integration

Flask backend with angular frontend to be able to easily browse pdf files on the phone without the need to download the pdf file.
MIT License
0 stars 0 forks source link

fix Pylance error in teardown_appcontext #22

Open Ar-Kareem opened 2 years ago

Ar-Kareem commented 2 years ago

https://github.com/Ar-Kareem/pdf-mobile-integration/blob/bc630edb346fdad8945e535a5978e25d14409904/backend/app/base/appSetup.py#L121

Pylance showing error:

Argument of type "(_: BaseException | None) -> None" cannot be assigned to parameter "f" of type "TeardownCallable" in function "teardown_appcontext"
  Type "(_: BaseException | None) -> None" cannot be assigned to type "TeardownCallable"
    Function return type "None" is incompatible with type "Response"
      Type "None" cannot be assigned to type "Response"PylancereportGeneralTypeIssues
Ar-Kareem commented 2 years ago

The lambda apperantly show return a Response object whatever that is, should search what teardown_appcontext accepts as input and how that might change the behaviour