308 |
308 |
309 @param module name of the Ruby file |
309 @param module name of the Ruby file |
310 @type str |
310 @type str |
311 @param searchPath path the file should be searched in |
311 @param searchPath path the file should be searched in |
312 @type list of str |
312 @type list of str |
313 @param isTypeFile flag indicating a file of this type |
313 @param isTypeFile flag indicating a file of this type (unused) |
314 @type bool |
314 @type bool |
315 @return the resulting dictionary |
315 @return the resulting dictionary |
316 @rtype dict |
316 @rtype dict |
317 """ |
317 """ |
318 fsInterface = ericApp().getObject("EricServer").getServiceInterface("FileSystem") |
318 fsInterface = ericApp().getObject("EricServer").getServiceInterface("FileSystem") |
321 sourceType = ClassBrowsers.determineSourceType(module) |
321 sourceType = ClassBrowsers.determineSourceType(module) |
322 file = fsInterface.join(searchPath[0], module) |
322 file = fsInterface.join(searchPath[0], module) |
323 else: |
323 else: |
324 # search the path for the module |
324 # search the path for the module |
325 fullpath = [] if searchPath is None else searchPath[:] |
325 fullpath = [] if searchPath is None else searchPath[:] |
326 f, file, (suff, mode, sourceType) = ClassBrowsers.find_module(module, fullpath) |
326 f, file, (_suff, _mode, sourceType) = ClassBrowsers.find_module( |
|
327 module, fullpath |
|
328 ) |
327 if f: |
329 if f: |
328 f.close() |
330 f.close() |
329 |
331 |
330 if sourceType not in SUPPORTED_TYPES: |
332 if sourceType not in SUPPORTED_TYPES: |
331 # not Ruby source, can't do anything with this module |
333 # not Ruby source, can't do anything with this module |