mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 10:45:00 +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
|
import uuid
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import json
|
|
||||||
from mixpanel import Mixpanel
|
from mixpanel import Mixpanel
|
||||||
|
|
||||||
|
|
||||||
class Analytics:
|
class Analytics:
|
||||||
def __init__(self, project_token="3f9ad6b9d7b7e8e5a1a5a9a7b0b0b0b0"):
|
def __init__(self, project_token="3f9ad6b9d7b7e8e5a1a5a9a7b0b0b0b0"):
|
||||||
self.mp = Mixpanel(project_token) if project_token else None
|
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)
|
uuid_file.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
if uuid_file.exists():
|
if uuid_file.exists():
|
||||||
with open(uuid_file, 'r') as f:
|
with open(uuid_file, "r") as f:
|
||||||
return json.load(f)['uuid']
|
return json.load(f)["uuid"]
|
||||||
|
|
||||||
new_uuid = str(uuid.uuid4())
|
new_uuid = str(uuid.uuid4())
|
||||||
with open(uuid_file, 'w') as f:
|
with open(uuid_file, "w") as f:
|
||||||
json.dump({'uuid': new_uuid}, f)
|
json.dump({"uuid": new_uuid}, f)
|
||||||
|
|
||||||
return new_uuid
|
return new_uuid
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue