Skip to content

Commit

Permalink
alternative Self import
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Sep 30, 2024
1 parent 225cecd commit 1c4f3e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rich/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
else:
from typing_extensions import Literal # pragma: no cover

if sys.version_info >= (3, 11):
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from typing import Self
else:
from typing_extensions import Self # pragma: no cover

from . import filesize, get_console
from .console import Console, Group, JustifyMethod, RenderableType
Expand Down Expand Up @@ -1175,7 +1175,7 @@ def stop(self) -> None:
if not self.console.is_interactive and not self.console.is_jupyter:
self.console.print()

def __enter__(self) -> Self:
def __enter__(self) -> "Self":
self.start()
return self

Expand Down

0 comments on commit 1c4f3e9

Please sign in to comment.