Skip to content

Commit 3636a33

Browse files
committed
Use workaround for typing.Self missing in older Python versions
1 parent 2e28788 commit 3636a33

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

gvm/http/core/headers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
"""
88

99
from dataclasses import dataclass
10-
from typing import Dict, Optional, Self
10+
from typing import Dict, Optional, TypeVar
11+
12+
13+
Self = TypeVar("Self", bound="ContentType")
1114

1215

1316
@dataclass

gvm/http/core/response.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
"""
88

99
from dataclasses import dataclass
10-
from typing import Any, Dict, Optional, Self
10+
from typing import Any, Dict, Optional, TypeVar
1111

1212
from requests import Response
1313

1414
from gvm.http.core.headers import ContentType
1515

1616

17+
Self = TypeVar("Self", bound="HttpResponse")
18+
19+
1720
@dataclass
1821
class HttpResponse:
1922
"""

0 commit comments

Comments
 (0)