Skip to content

Commit

Permalink
Prefer T | None over Optional[T]
Browse files Browse the repository at this point in the history
  • Loading branch information
robertknight committed Mar 12, 2024
1 parent c84042d commit b4d92d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lms/services/canvas_studio.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Literal, Optional, TypedDict
from typing import Literal, TypedDict
from urllib.parse import urlencode, urlunparse

from marshmallow import EXCLUDE, Schema, fields, post_load
Expand Down Expand Up @@ -61,7 +61,7 @@ class File(TypedDict):
display_name: str
updated_at: str

contents: Optional[APICallInfo]
contents: APICallInfo | None
"""API call to use to fetch contents of a folder."""


Expand Down
6 changes: 2 additions & 4 deletions lms/services/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from typing import Optional

from lms.models.oauth2_token import Service


Expand Down Expand Up @@ -48,8 +46,8 @@ def __init__(
response=None,
validation_errors=None,
refreshable=False,
refresh_route: Optional[str] = None,
refresh_service: Optional[Service] = None,
refresh_route: str | None = None,
refresh_service: Service | None = None,
): # pylint: disable=too-many-arguments
super().__init__()
self.message = message
Expand Down

0 comments on commit b4d92d1

Please sign in to comment.