OUDON / rmqrcode-python

Rectangular Micro QR Code (rMQR Code) Generator in Python
https://pypi.org/project/rmqrcode/
Other
155 stars 16 forks source link

Add type hints and Refactoring #57

Open tkamiya22 opened 1 month ago

tkamiya22 commented 1 month ago

resolve #38 Commits are separate for adding type hints and refactoring.

Type hints have been added to the following places:

For dicts, the element type has been made explicit with TypedDict.

tkamiya22 commented 1 month ago

I noticed that commit 69a040e contains changes which is not of type hint. It was added to prevent the variable type from becoming Unbound, but it affects when adding encoder types.

https://github.com/tkamiya22/rmqrcode-python/blob/69a040eb3e70adf733e8656f3784d9f574b94765/src/rmqrcode/segments.py#L166-L167

https://github.com/tkamiya22/rmqrcode-python/blob/69a040eb3e70adf733e8656f3784d9f574b94765/src/rmqrcode/segments.py#L188-L189