faif / python-patterns

A collection of design patterns/idioms in Python
40.56k stars 6.94k forks source link

No return value expected #377

Closed g-paras closed 3 years ago

g-paras commented 3 years ago

https://github.com/faif/python-patterns/blob/5f47b07dbf2867b0b35866301573439b4e8e37ae/patterns/creational/prototype.py#L32-L38

According to type hint None type should be returned but obj of type Prototype is returned.

faif commented 3 years ago

You are right, that was introduced in https://github.com/faif/python-patterns/commit/a12ad8e7dc00572ba09bcacddb4862cc8cbdba4d#diff-292e21ea71bfaa9c4ecf149a183f5080c973cf7b22bb080b7b520e5875476c0dR29. Feel free to submit a fix