Compare commits

..

No commits in common. "b1907f90698792fcfa1bf0cae85fad0eb5d29651" and "8e51984b01ae2dc4790dcc067b817a132b68caea" have entirely different histories.

1 changed files with 1 additions and 16 deletions

View File

@ -1,5 +1,3 @@
import time
import re
from src.colors import RED, YELLOW, GREEN, CYAN , BLUE, PURPLE
@ -16,8 +14,6 @@ class NerdTreeFind(NerdTree):
self.item_name = ''
self.re_item_name = None
self.results = []
self.start_time = time.time()
self.end_time = None
## computed tree for find
self.json_tree_find = {}
self.find_opts = find_opts
@ -145,31 +141,20 @@ class NerdTreeFind(NerdTree):
raise Exception('Can\'t compile regexp %s, exit' % (new_item_name,))
self.json_tree_find = {}
def print_elapsed_time(self):
self.end_time = time.time()
self.elapsed_time = round(self.end_time - self.start_time,2)
print('\nElapsed Time: %s' % CYAN(self.elapsed_time))
def print(self, item_name='', opts={}):
if not item_name and not self.item_name:
print('Please use a valid search string')
return
if item_name != self.item_name or self.find_opts != opts:
self.reset(item_name, opts)
self.json_tree_find = self.find_tree_struct()
if not self.json_tree_find:
print('No results')
self.print_elapsed_time()
return
tree_res = self.tree_from_struct(self.json_tree_find)
print(tree_res)
self.print_elapsed_time()
print(self.tree_from_struct(self.json_tree_find))
def find(self, item_name, opts={}):
'''