Skip to content
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

Update __init__.py to remove distutils deprecated dependence #70

Merged
merged 2 commits into from
May 10, 2024
Merged

Update __init__.py to remove distutils deprecated dependence #70

merged 2 commits into from
May 10, 2024

Conversation

x86-69
Copy link
Contributor

@x86-69 x86-69 commented May 8, 2024

Removed deprecated strtobool import and added own implementation stated on #61.

@zerwes zerwes self-assigned this May 10, 2024
Copy link
Owner

@zerwes zerwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @itachi-cracker and thank you for your PR and help

could you please fix my draft of the strtobool function:

 def strtobool(val):
+    """
+    minimal implementation of the strtobool function (replaces deprecated distutils)
+    """
     val = val.lower()
     if val in ("y", "yes", "t", "true", "on", "1"):
         return 1
-    elif val in ("n", "no", "f", "false", "off", "0"):
+    if val in ("n", "no", "f", "false", "off", "0"):
         return 0
-    else:
-        raise ValueError("invalid truth value %r" % (val,))
+    raise ValueError("invalid truth value %r" % (val,))

@x86-69 x86-69 requested a review from zerwes May 10, 2024 12:31
Copy link
Owner

@zerwes zerwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; thx

@zerwes zerwes merged commit ad96434 into zerwes:main May 10, 2024
5 checks passed
@zerwes
Copy link
Owner

zerwes commented May 11, 2024

release 0.5.6 including the fixes has been released. thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants