From 3f8bc61cca9c7bef6cbb8590ad205733ddb449fd Mon Sep 17 00:00:00 2001 From: Pablo Collins Date: Mon, 22 Jan 2024 19:23:50 -0800 Subject: [PATCH] rename is_truthy_str arg --- splunk_otel/profiling/__init__.py | 4 +--- splunk_otel/util.py | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/splunk_otel/profiling/__init__.py b/splunk_otel/profiling/__init__.py index 202fc3ca..31669b1c 100644 --- a/splunk_otel/profiling/__init__.py +++ b/splunk_otel/profiling/__init__.py @@ -410,9 +410,7 @@ def start_profiling( endpoint: Optional[str] = None, call_stack_interval_millis: Optional[int] = None, ): - resource = _create_resource( - service_name, resource_attributes - ) + resource = _create_resource(service_name, resource_attributes) opts = _Options(resource, endpoint, call_stack_interval_millis) _start_profiling(opts) diff --git a/splunk_otel/util.py b/splunk_otel/util.py index beef35a1..a2d5a312 100644 --- a/splunk_otel/util.py +++ b/splunk_otel/util.py @@ -43,11 +43,11 @@ def _is_truthy(value: Any) -> bool: return value in [True, 1, "true", "yes"] -def _is_truthy_str(s: Optional[str]) -> bool: - if not s: +def _is_truthy_str(value: Optional[str]) -> bool: + if not value: return False - return s.strip().lower() not in ( + return value.strip().lower() not in ( "false", "no", "f",