Skip to content

Commit

Permalink
Use Python 3.8 compatible type syntax for str | None
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinevg committed Feb 26, 2024
1 parent 1621cbe commit 8e902fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion luna/gateware/platform/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import importlib
import importlib.util

from typing import Optional

from amaranth import Record

from .core import NullPin, LUNAPlatform
Expand Down Expand Up @@ -66,7 +68,7 @@ def get_appropriate_platform() -> LUNAPlatform:
return platform


def get_apollo_platform() -> str | None:
def get_apollo_platform() -> Optional[str]:
""" Attempts to return a platform string for a connected Apollo-based device. """

# Try to import Apollo.
Expand Down

0 comments on commit 8e902fc

Please sign in to comment.