mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 11:14:59 +00:00
style: Run linter
This commit is contained in:
parent
5473d99e13
commit
29bb70d407
1 changed files with 2 additions and 4 deletions
|
@ -4,13 +4,13 @@ import json
|
||||||
import math
|
import math
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import requests
|
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
from dataclasses import dataclass, fields
|
from dataclasses import dataclass, fields
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
import requests
|
||||||
import yaml
|
import yaml
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
|
@ -440,9 +440,7 @@ def get_model_info(model):
|
||||||
cache_dir.mkdir(parents=True, exist_ok=True)
|
cache_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
current_time = time.time()
|
current_time = time.time()
|
||||||
cache_age = (
|
cache_age = current_time - cache_file.stat().st_mtime if cache_file.exists() else float("inf")
|
||||||
current_time - cache_file.stat().st_mtime if cache_file.exists() else float("inf")
|
|
||||||
)
|
|
||||||
|
|
||||||
if cache_file.exists() and cache_age < 86400: # 86400 seconds = 1 day
|
if cache_file.exists() and cache_age < 86400: # 86400 seconds = 1 day
|
||||||
content = safe_read_json(cache_file)
|
content = safe_read_json(cache_file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue