Skip to content

Commit

Permalink
Self is not available in types in 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien Coelho committed Sep 15, 2024
1 parent 128c37a commit f228b7e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions FlaskTester.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import os
import io
import re
from typing import Any, Callable, Self
# Python >= 3.11: Self
from typing import Any, Callable
import importlib
import logging
import pytest # for explicit fail calls, see _pytestFail
Expand Down Expand Up @@ -309,7 +310,8 @@ class Client:
"""

# client login/pass hook (with mypy workaround)
AuthHook = Callable[[Self, str, str|None], None] # type: ignore
# Python >= 3.11: Self
AuthHook = Callable[[Any, str, str|None], None] # type: ignore

def __init__(self, auth: Authenticator, default_login: str|None = None):
self._auth = auth
Expand Down

0 comments on commit f228b7e

Please sign in to comment.