Skip to content

Commit

Permalink
Fix importing override for Python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
tuokri committed Jan 25, 2025
1 parent 71bd132 commit 751fbc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bobuild/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from typing import Literal
from typing import Protocol
from typing import TypeVar
from typing import override

import watchdog.events
from hachiko import AIOEventHandler
Expand All @@ -23,6 +22,7 @@
from bobuild.log import logger
from bobuild.multiconfig import MultiConfigParser
from bobuild.typing_bo import overload
from bobuild.typing_bo import override
from bobuild.utils import asyncio_run
from bobuild.utils import kill_process_tree

Expand Down
3 changes: 3 additions & 0 deletions bobuild/typing_bo.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
try:
from typing import overload
from typing import override
except ImportError:
from typing_extensions import overload
from typing_extensions import override

__all__ = [
"overload",
"override",
]

0 comments on commit 751fbc2

Please sign in to comment.