srijan-deepsource / readthedocs.org

Errors detected in .deepsource.toml.

Re-definition found for builtin function PYL-W0622
Anti-pattern
Minor
4 years ago4 years old
Redefining built-in 'type'
 7DATA_TYPES_VALUES = ['title'] + SECTION_FIELDS + DOMAIN_FIELDS
 8
 9
10def get_search_query_from_project_file(project_slug, page_num=0, field='title', type=None):11    """
12    Return search query from the project's page file.
13
Redefining built-in 'type'
102
103        return results, facets
104
105    def _get_highlight(self, result, field, type=None):106        # if query is from page title,
107        # highlighted title is present in 'result.meta.highlight.title'
108        if not type and field == 'title':
Redefining built-in 'type'
132    @pytest.mark.parametrize('page_num', [0, 1])
133    def test_file_search(self, client, project, data_type, page_num):
134        data_type = data_type.split('.')
135        type, field = None, None136        if len(data_type) < 2:
137            field = data_type[0]
138        else:
Redefining built-in 'type'
230
231        It tests with uppercase, lowercase and camelcase.
232        """
233        type, field = None, None234        data_type = data_type.split('.')
235        if len(data_type) < 2:
236            field = data_type[0]
27            name='A testing project',
28            description='Just another project',
29        )
30        id = project.id31
32        # Check initial values
33        result = ProjectDocument.get(id=id)