Skip to content

Commit 25c7356

Browse files
fix: 🐛 Fix potential warning in factory.py (#455)
Use ellipsis replace pass to avoid potential warning: ``` "resource": "/d:/Github/Python/python-patterns/patterns/creational/factory.py", "owner": "pylance4", "value": "reportReturnType", "path": "/microsoft/pylance-release/blob/main/docs/diagnostics/reportReturnType.md", "severity": 8, "message": "Function with declared return type \"str\" must return value on all code paths\n  \"None\" is not assignable to \"str\"", "source": "Pylance", "startLineNumber": 29, "startColumn": 37, "endLineNumber": 29, "endColumn": 40, "origin": "extHost1" }] ``` Using VS Code with Pylance, Python debugger, and Black Formatter.
1 parent ef74d59 commit 25c7356

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

patterns/creational/factory.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626

2727

2828
class Localizer(Protocol):
29-
def localize(self, msg: str) -> str:
30-
pass
29+
def localize(self, msg: str) -> str: ...
3130

3231

3332
class GreekLocalizer:

0 commit comments

Comments
 (0)