Errors detected in .deepsource.toml
.
209 cmd = ['git', 'ls-remote', self.repo_url]
210
211 self.check_working_dir()
212 code, stdout, stderr = self.run(*cmd)213 if code != 0:
214 raise RepositoryError
215
47 # Create a project in bn and add it as a translation
48 G(Project, language='bn', name=project.name)
49
50 results, facets = self._get_search_result( 51 url=self.url,
52 client=client,
53 search_params={ 'q': project.name },
64 def test_search_project_filter_language(self, client, project):
65 """Test that searching project filtered according to language."""
66 # Create a project in bn and add it as a translation
67 translate = G(Project, language='bn', name=project.name) 68 search_params = { 'q': project.name, 'language': 'bn' }
69
70 results, facets = self._get_search_result(
360 assert len(results) >= 1
361
362 version_facets = facets['version']
363 version_facets_str = [facet[0] for facet in version_facets]364 # There should be total 4 versions
365 # one is latest, and other 3 that we created above
366 assert len(version_facets) == 4
364 try:
365 body = HTMLParser(data['body'])
366 sections = list(self._parse_sections(title=title, body=body.body))
367 except Exception as e:368 log.info('Unable to index sections for: %s', fjson_path)
369
370 try:
An unused variable takes up space in the code, and can lead to confusion, and it should be removed. If this variable is necessary, name the variable _
to indicate that it will be unused, or start the name with unused
or _unused
.
def update():
for i in range(10): # Usused variable `i`
time.sleep(0.01)
display_result()
def update():
for _ in range(10):
time.sleep(0.01)
display_result()