-
Notifications
You must be signed in to change notification settings - Fork 10
Modernise and type-hint str2bool #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
pyproject.toml
Outdated
|
|
||
| [project.urls] | ||
| Homepage = "https://github.com/symonsoft/str2bool" | ||
| Download = "https://github.com/symonsoft/str2bool/tarball/1.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.2?
| Returns: | ||
| Optional[bool]: The converted boolean value, or None if the string cannot be converted and raise_exc is False. | ||
| """ | ||
| if isinstance(value, str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ain't we loosing some backward compatibility?
pyproject.toml
Outdated
| "License :: OSI Approved :: BSD License", | ||
| "Operating System :: OS Independent", | ||
| "Programming Language :: Python :: 2", | ||
| "Programming Language :: Python :: 2.7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the lower version
|
@symonsoft thanks a lot for the review. I've had another go at this and finally realised that the type hints break python 2 compatibility! As a result I've updated the pyproject and code to reflect this. Python 3.7 is the oldest version I was able to run the test suite with so used this as base version. Let me know if there's anything else that needs improvement. |
This modernises str2bool, adds tests and type hints. Also migrates from setup.* to UV.