Skip to content

Commit 0ef9e80

Browse files
committed
Change string literals to class name. [PEP-0563]
1 parent d752949 commit 0ef9e80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

patterns/creational/prototype.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*TL;DR
2121
Creates new object instances by cloning prototype.
2222
"""
23+
from __future__ import annotations
2324

2425
from typing import Any, Dict
2526

@@ -29,7 +30,7 @@ def __init__(self, value: str = "default", **attrs: Any) -> None:
2930
self.value = value
3031
self.__dict__.update(attrs)
3132

32-
def clone(self, **attrs: Any) -> "Prototype":
33+
def clone(self, **attrs: Any) -> Prototype:
3334
"""Clone a prototype and update inner attributes dictionary"""
3435
# Python in Practice, Mark Summerfield
3536
# copy.deepcopy can be used instead of next line.

0 commit comments

Comments
 (0)