File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Typed errors thrown by this library."""
22
3- from typing import Optional
3+ from __future__ import annotations
44
55
66class MinFraudError (RuntimeError ):
@@ -22,21 +22,21 @@ class HTTPError(MinFraudError):
2222 :py:exc:`MinFraudError` and adds attributes of its own.
2323 """
2424
25- http_status : Optional [ int ]
25+ http_status : int | None
2626 """The HTTP status code returned"""
2727
28- uri : Optional [ str ]
28+ uri : str | None
2929 """The URI queried"""
3030
31- decoded_content : Optional [ str ]
31+ decoded_content : str | None
3232 """The decoded response content"""
3333
3434 def __init__ (
3535 self ,
3636 message : str ,
37- http_status : Optional [ int ] = None ,
38- uri : Optional [ str ] = None ,
39- decoded_content : Optional [ str ] = None ,
37+ http_status : int | None = None ,
38+ uri : str | None = None ,
39+ decoded_content : str | None = None ,
4040 ) -> None :
4141 """Initialize an HTTPError instance."""
4242 super ().__init__ (message )
You can’t perform that action at this time.
0 commit comments