Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7f4e266

Browse files
committed
Pet to type[Pet]
1 parent 871fd8a commit 7f4e266

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎patterns/creational/abstract_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def main() -> None:
9191

9292
if __name__ == "__main__":
9393
animals = ['dog', 'cat']
94-
random_animal: Pet = random.choice(animals)
94+
random_animal: type[Pet] = random.choice(animals)
9595

9696
shop = PetShop(random_animal)
9797
import doctest

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /