Replaced importing the "typing" module as "t" with importing the individual names in the "typing" module. Since Python 3.9 introduced type hinting generics in standard collections, we do not have as many names to import now. This is also to be consistent with the practices of most major and standard packages and examples.

This commit is contained in:
2023-04-26 18:22:45 +08:00
parent ee5b447c23
commit cda9e4e3c6
25 changed files with 116 additions and 113 deletions

View File

@@ -18,8 +18,8 @@
"""
import os
import typing as t
from secrets import token_urlsafe
from typing import Type
from click.testing import Result
from flask import Flask, Blueprint, render_template, redirect, Response, \
@@ -94,7 +94,7 @@ def create_app(is_testing: bool = False) -> Flask:
return redirect(append_next(url_for("auth.login-form")))
@property
def cls(self) -> t.Type[auth.User]:
def cls(self) -> Type[auth.User]:
return auth.User
@property