From 88dc1c63fda8f37641c00397d6c54162ef15f787 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Sat, 17 Aug 2024 06:24:23 -0700 Subject: [PATCH] fix: init `map_processing_time` to 0 in __init__; move time import to top of file --- aider/repomap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/repomap.py b/aider/repomap.py index 298aa40db..5b260f057 100644 --- a/aider/repomap.py +++ b/aider/repomap.py @@ -3,6 +3,7 @@ import math import os import random import sys +import time import warnings from collections import Counter, defaultdict, namedtuple from importlib import resources @@ -65,6 +66,7 @@ class RepoMap: self.tree_cache = {} self.tree_context_cache = {} self.map_cache = {} + self.map_processing_time = 0 def token_count(self, text): len_text = len(text) @@ -422,8 +424,6 @@ class RepoMap: return self.map_cache[cache_key] # If not in cache, generate the map - import time - start_time = time.time() result = self.get_ranked_tags_map_uncached( chat_fnames, other_fnames, max_map_tokens, mentioned_fnames, mentioned_idents