mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
style: format code with linter
This commit is contained in:
parent
121dd908a6
commit
6ee8a74d47
1 changed files with 7 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue