fix: resolve all ruff lint errors and type checker warnings
- Use Annotated[str, Form()] for FastAPI dependencies (FAST002) - Add missing type annotations across src/ and tests/ (ANN001/003/201/202) - Reduce function arguments via request.form() reads (PLR0913) - Combine return paths to reduce return statements (PLR0911) - Use anyio.Path for async-safe filesystem operations (ASYNC240) - Extract constants, helpers, and dict comprehensions for clarity - Move inline imports to top-level (PLC0415) - Use raw strings for regex match patterns (RUF043) - Fix redundant get_session_user call in delete_user (not-iterable) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2b652ff603
commit
01e3382aaf
23 changed files with 258 additions and 214 deletions
|
|
@ -237,11 +237,11 @@ class TestPasswordSet:
|
|||
PasswordSet(password=long_pw, confirm=long_pw)
|
||||
|
||||
def test_weak_password_rejected(self) -> None:
|
||||
with pytest.raises(ValidationError, match="[Ww]eak\\b|[Ss]trength|easily guessed"):
|
||||
with pytest.raises(ValidationError, match=r"[Ww]eak\b|[Ss]trength|easily guessed"):
|
||||
PasswordSet(password="password", confirm="password")
|
||||
|
||||
def test_common_password_rejected(self) -> None:
|
||||
with pytest.raises(ValidationError, match="[Ww]eak\\b|[Ss]trength|easily guessed"):
|
||||
with pytest.raises(ValidationError, match=r"[Ww]eak\b|[Ss]trength|easily guessed"):
|
||||
PasswordSet(password="12345678", confirm="12345678")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue