Skip to content

Commit

Permalink
Use Optional for param
Browse files Browse the repository at this point in the history
  • Loading branch information
devonh committed Jun 10, 2024
1 parent ad6fbe1 commit a4797c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sygnal/gcmpushkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def __init__(self, name: str, sygnal: "Sygnal", config: Dict[str, Any]) -> None:
"Config field fcm_options, if set, must be a dictionary of options"
)

def _load_credentials(self, proxy_url: str | None) -> None:
def _load_credentials(self, proxy_url: Optional[str]) -> None:
self.credentials: Optional[Credentials] = None

if self.api_version is APIVersion.V1:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_gcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import json
from typing import TYPE_CHECKING, Any, AnyStr, Dict, List, Tuple
from typing import TYPE_CHECKING, Any, AnyStr, Dict, List, Optional, Tuple
from unittest.mock import MagicMock

from sygnal.gcmpushkin import APIVersion, GcmPushkin
Expand Down Expand Up @@ -117,7 +117,7 @@ def preload_with_response(
self.preloaded_response = DummyResponse(code)
self.preloaded_response_payload = response_payload

def _load_credentials(self, proxy_url: str | None) -> None:
def _load_credentials(self, proxy_url: Optional[str]) -> None:
if self.api_version is APIVersion.V1:
self.credentials = TestCredentials() # type: ignore[assignment]
self.google_auth_request = None # type: ignore[assignment]
Expand Down

0 comments on commit a4797c3

Please sign in to comment.