gofeco commited on
Commit
ef89b98
1 Parent(s): 3382eca

Update nand.py

Browse files
Files changed (1) hide show
  1. nand.py +4 -2
nand.py CHANGED
@@ -80,7 +80,8 @@ def process_query(iniquery, para):
80
  otherfile = re.sub("\.\d+", "", otherfile)
81
  if not otherfile in allapis:
82
  allapis.append(otherfile)
83
- apisize = os.path.getsize(otherfile)
 
84
  accu += apisize
85
  print(f"INST: {instname} SCORE: {instscore} API-size: {apisize} Accu: {accu}")
86
 
@@ -127,7 +128,8 @@ def process_query(iniquery, para):
127
  if len(allapis):
128
  context += scriptExamples()
129
  for oneapi in allapis:
130
- cont = GetContent(oneapi)
 
131
  cont = re.sub("</h3>", " API Detail:", cont)
132
  cont = re.sub('<.*?>', '', cont)
133
  cont = re.sub('Examples:.*', '', cont, flags=re.DOTALL)
 
80
  otherfile = re.sub("\.\d+", "", otherfile)
81
  if not otherfile in allapis:
82
  allapis.append(otherfile)
83
+ modfile = otherfile.replace("\\", "/")
84
+ apisize = os.path.getsize(modfile)
85
  accu += apisize
86
  print(f"INST: {instname} SCORE: {instscore} API-size: {apisize} Accu: {accu}")
87
 
 
128
  if len(allapis):
129
  context += scriptExamples()
130
  for oneapi in allapis:
131
+ modfile = oneapi.replace("\\", "/")
132
+ cont = GetContent(modfile)
133
  cont = re.sub("</h3>", " API Detail:", cont)
134
  cont = re.sub('<.*?>', '', cont)
135
  cont = re.sub('Examples:.*', '', cont, flags=re.DOTALL)