Skip to content

Commit

Permalink
replace distutils for python 3.12 (#470)
Browse files Browse the repository at this point in the history
* replace distutils for python 3.12

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
branchvincent and pre-commit-ci[bot] authored Dec 6, 2024
1 parent 080b2a8 commit f97e7c7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions notifiers/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import os
from pathlib import Path

from distutils.util import strtobool

log = logging.getLogger("notifiers")


Expand All @@ -14,7 +12,7 @@ def text_to_bool(value: str) -> bool:
:param value: Value to check
"""
try:
return bool(strtobool(value))
return value.lower() in {"y", "yes", "t", "true", "on", "1"}
except (ValueError, AttributeError):
return value is not None

Expand Down

0 comments on commit f97e7c7

Please sign in to comment.