200 if os.path.exists(apisDir) and self.__lexer.language(): |
200 if os.path.exists(apisDir) and self.__lexer.language(): |
201 apiDir = os.path.join(apisDir, self.__lexer.language()) |
201 apiDir = os.path.join(apisDir, self.__lexer.language()) |
202 if not os.path.exists(apiDir): |
202 if not os.path.exists(apiDir): |
203 # use lower case language |
203 # use lower case language |
204 apiDir = os.path.join(apisDir, self.__lexer.language().lower()) |
204 apiDir = os.path.join(apisDir, self.__lexer.language().lower()) |
205 fnames = { |
205 fnames = {f for f in glob.glob(os.path.join(apiDir, "*.api"))} |
206 os.path.join(apiDir, f) for f in glob.glob("*.api", root_dir=apiDir) |
|
207 } |
|
208 # combine with the QScintilla standard behavior |
206 # combine with the QScintilla standard behavior |
209 fnames |= { |
207 fnames |= { |
210 os.path.join(apiDir, f) |
208 f |
211 for f in glob.glob( |
209 for f in glob.glob( |
212 "*.api", |
210 os.path.join(apisDir, self.__lexer.lexer(), "*.api") |
213 root_dir=os.path.join(apisDir, self.__lexer.lexer()), |
|
214 ) |
211 ) |
215 } |
212 } |
216 return sorted(fnames) |
213 return sorted(fnames) |
217 |
214 |
218 return [] |
215 return [] |