Skip to content

Commit

Permalink
rename is_truthy_str arg
Browse files Browse the repository at this point in the history
  • Loading branch information
pmcollins committed Jan 23, 2024
1 parent 80fe258 commit 3f8bc61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions splunk_otel/profiling/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions splunk_otel/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3f8bc61

Please sign in to comment.