Skip to content

Remove distutils dependency#236

Closed
srswinde wants to merge 2 commits intotchellomello:masterfrom
srswinde:master
Closed

Remove distutils dependency#236
srswinde wants to merge 2 commits intotchellomello:masterfrom
srswinde:master

Conversation

@srswinde
Copy link
Copy Markdown

@srswinde srswinde commented Jun 1, 2024

The distutils module was deprecated in python 3.10 and is removed from 3.12. This pull request implements strtobool as a function following the description here.

elif s.lower() in ['no', 'false', 'f', 'n', '0']:
return False
else:
raise ValueError("Cannot convert {} to a bool".format(s))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

undefined name 's'

"""Convert string to boolean."""
if s.lower() in ['yes', 'true', 't', 'y', '1']:
return True
elif s.lower() in ['no', 'false', 'f', 'n', '0']:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

undefined name 's'


def strtobool(value: str) -> bool:
"""Convert string to boolean."""
if s.lower() in ['yes', 'true', 't', 'y', '1']:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

undefined name 's'


# pylint: disable=no-name-in-module
from distutils import util
#from distutils import util
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Black would make changes.
block comment should start with '# '

@maximvelichko
Copy link
Copy Markdown
Collaborator

Resolved by #239 partially, thank you for contribution.
If you still plan to make change to configure.ac, please update the PR and ping me

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants