Skip to content

Commit

Permalink
Simplify function calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed Feb 25, 2025
1 parent cd8b4eb commit 739bf82
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions comfy_cli/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@

@app.command()
def enable():
set_tracking_enabled(True)
init_tracking(True)

Check warning on line 33 in comfy_cli/tracking.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/tracking.py#L33

Added line #L33 was not covered by tests
typer.echo(f"Tracking is now {'enabled'}.")
init_tracking(True)


@app.command()
def disable():
set_tracking_enabled(False)
init_tracking(False)

Check warning on line 40 in comfy_cli/tracking.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/tracking.py#L40

Added line #L40 was not covered by tests
typer.echo(f"Tracking is now {'disabled'}.")


Expand Down Expand Up @@ -116,8 +116,3 @@ def init_tracking(enable_tracking: bool):
logging.debug("Tracking install event.")
config_manager.set(constants.CONFIG_KEY_INSTALL_EVENT_TRIGGERED, "True")
track_event("install")


def set_tracking_enabled(enabled: bool):
config_manager.set(constants.CONFIG_KEY_ENABLE_TRACKING, str(enabled))
return enabled

0 comments on commit 739bf82

Please sign in to comment.