Closed alexkahan closed 2 years ago
Using the "-> None" hint in init is meaningless, since init always returns None and we can't use that anywhere.
The same goes for "-> str" in repr and str as we already deliberately know that these methods always return a string -> this is pointless
@JKearnsl i thought i was following pep 484 guidelines as well as what is found throughout the rest of the repo. __init__()
is receiving the None type hint throughout. happy to remove that and the __repr__
type hint though, if that is preferred (there is another __repr__
type hinted like this in another file, so i'll remove that one too).
We have already discussed about the None
hints in another issue, and agreed to keep them, since this seems to be the convention. I'm also not a big fan of them, but I won't go against the syntax conventions of type hints.
We have already discussed about the
None
hints in another issue, and agreed to keep them, since this seems to be the convention. I'm also not a big fan of them, but I won't go against the syntax conventions of type hints.
OK. I'm just going from the logical meaning of the clues, not from mindless beliefs.
Hi @alexkahan, can you look into the linter issues? Thanks.
Hi @alexkahan, can you look into the linter issues? Thanks.
Sorry for the delay. Should be fixed, seemed like it was having an issue with the List type hint
Add type hints to multiple design pattern examples
Related to https://github.com/faif/python-patterns/issues/373