Commit 61fb0e01 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Correct Container subclass context type

parent df6b082d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -185,6 +185,8 @@ class Container(Item):
	exiting the context.
	"""

	T = TypeVar('T', bound='Container')

	DEFAULT_ALIASES = tuple[str]()

	def __init__(
@@ -213,7 +215,7 @@ class Container(Item):
		if network:
			self.connect(network, *self.DEFAULT_ALIASES)

	def __enter__(self) -> Container:
	def __enter__(self: T) -> T:
		return self

	def __exit__(self, etype: type[BaseException], exc: BaseException, tb: TracebackType) -> None: