Errors detected in .deepsource.toml
.
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
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':
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:
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)
Defining a local variable or function with the same name as a built-in object makes the built-in object unusable within the current scope and makes the code prone to bugs.
dict = {} # dict is a Python builtin!
for idx, student in enumerate(students):
dict[student] = idx
roll_number = {}
for idx, student in enumerate(students):
roll_number[student] = idx