style: format code with linter

This commit is contained in:
Paul Gauthier (aider) 2024-08-12 16:07:15 -07:00
parent 121dd908a6
commit 6ee8a74d47

View file

@ -1,8 +1,10 @@
import json
import uuid
from pathlib import Path
import json
from mixpanel import Mixpanel
class Analytics:
def __init__(self, project_token="3f9ad6b9d7b7e8e5a1a5a9a7b0b0b0b0"):
self.mp = Mixpanel(project_token) if project_token else None
@ -13,12 +15,12 @@ class Analytics:
uuid_file.parent.mkdir(parents=True, exist_ok=True)
if uuid_file.exists():
with open(uuid_file, 'r') as f:
return json.load(f)['uuid']
with open(uuid_file, "r") as f:
return json.load(f)["uuid"]
new_uuid = str(uuid.uuid4())
with open(uuid_file, 'w') as f:
json.dump({'uuid': new_uuid}, f)
with open(uuid_file, "w") as f:
json.dump({"uuid": new_uuid}, f)
return new_uuid