rope.contrib.finderrors ======================= .. py:module:: rope.contrib.finderrors .. autoapi-nested-parse:: Finding bad name and attribute accesses `find_errors` function can be used to find possible bad name and attribute accesses. As an example:: errors = find_errors(project, project.get_resource('mod.py')) for error in errors: print('%s: %s' % (error.lineno, error.error)) prints possible errors for ``mod.py`` file. TODO: * use task handles * reporting names at most once * attributes of extension modules that don't appear in extension_modules project config can be ignored * not calling `PyScope.get_inner_scope_for_line()` if it is a bottleneck; needs profiling * not reporting occurrences where rope cannot infer the object * rope saves multiple objects for some of the names in its objectdb use all of them not to give false positives * ... ;-) Classes ------- .. autoapisummary:: rope.contrib.finderrors.Error Functions --------- .. autoapisummary:: rope.contrib.finderrors.find_errors Module Contents --------------- .. py:function:: find_errors(project, resource) Find possible bad name and attribute accesses It returns a list of `Error`. .. py:class:: Error(lineno, error) .. py:attribute:: lineno .. py:attribute:: error