mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
style: Apply linter fixes
This commit is contained in:
parent
9a770eeae9
commit
64fa058bc7
1 changed files with 5 additions and 4 deletions
|
@ -14,10 +14,10 @@ from aider.dump import dump # noqa: F401
|
||||||
|
|
||||||
def compute_hex_threshold(percent):
|
def compute_hex_threshold(percent):
|
||||||
"""Convert percentage to 6-digit hex threshold.
|
"""Convert percentage to 6-digit hex threshold.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
percent: Percentage threshold (0-100)
|
percent: Percentage threshold (0-100)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
str: 6-digit hex threshold
|
str: 6-digit hex threshold
|
||||||
"""
|
"""
|
||||||
|
@ -47,6 +47,8 @@ def is_uuid_in_percentage(uuid_str, percent):
|
||||||
|
|
||||||
threshold = compute_hex_threshold(percent)
|
threshold = compute_hex_threshold(percent)
|
||||||
return uuid_str[:6] <= threshold
|
return uuid_str[:6] <= threshold
|
||||||
|
|
||||||
|
|
||||||
from aider.models import model_info_manager
|
from aider.models import model_info_manager
|
||||||
|
|
||||||
mixpanel_project_token = "6da9a43058a5d1b9f3353153921fb04d"
|
mixpanel_project_token = "6da9a43058a5d1b9f3353153921fb04d"
|
||||||
|
@ -124,7 +126,6 @@ class Analytics:
|
||||||
PERCENT = 5
|
PERCENT = 5
|
||||||
return is_uuid_in_percentage(self.user_id, PERCENT)
|
return is_uuid_in_percentage(self.user_id, PERCENT)
|
||||||
|
|
||||||
|
|
||||||
def get_data_file_path(self):
|
def get_data_file_path(self):
|
||||||
try:
|
try:
|
||||||
data_file = Path.home() / ".aider" / "analytics.json"
|
data_file = Path.home() / ".aider" / "analytics.json"
|
||||||
|
@ -245,7 +246,7 @@ class Analytics:
|
||||||
pass # Ignore OS errors when writing to logfile
|
pass # Ignore OS errors when writing to logfile
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == "__main__":
|
||||||
a = Analytics()
|
a = Analytics()
|
||||||
dump(a.user_id)
|
dump(a.user_id)
|
||||||
a.is_uuid_in_percentage(a.user_id, 5)
|
a.is_uuid_in_percentage(a.user_id, 5)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue