From 29bb70d407dc5b674f545f29dfd4c3391afaf454 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Sun, 25 Aug 2024 08:19:19 -0700 Subject: [PATCH] style: Run linter --- aider/models.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/aider/models.py b/aider/models.py index 9c34af09b..22bf4d6c2 100644 --- a/aider/models.py +++ b/aider/models.py @@ -4,13 +4,13 @@ import json import math import os import platform -import requests import sys import time from dataclasses import dataclass, fields from pathlib import Path from typing import Optional +import requests import yaml from PIL import Image @@ -440,9 +440,7 @@ def get_model_info(model): cache_dir.mkdir(parents=True, exist_ok=True) current_time = time.time() - cache_age = ( - current_time - cache_file.stat().st_mtime if cache_file.exists() else float("inf") - ) + cache_age = 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 content = safe_read_json(cache_file)