srijan-deepsource / readthedocs.org

Errors detected in .deepsource.toml.

Re-defined variable from outer scope PYL-W0621
Anti-pattern
Major
4 years ago4 years old
Redefining name 'push' from outer scope (line 49)
64
65
66@task
67def docs(ctx, regenerate_config=False, push=False):68    """Pull and push translations to Transifex for our docs"""
69    with ctx.cd(os.path.join(ROOT_PATH, 'docs')):
70        # Update our tanslations
Redefining name 'serializers' from outer scope (line 16)
113
114    def get_blocks(self, obj):
115        """Combine and sort inner results (domains and sections)."""
116        serializers = {117            'domain': DomainSearchSerializer,
118            'section': SectionSearchSerializer,
119        }
Redefining name 'mock' from outer scope (line 3)
 94            except RuntimeError:
 95                pass
 96
 97    def configure_mock(self, mock, kwargs): 98        """Configure object mocks."""
 99        self.mocks[mock].configure_mock(**kwargs)
100
Redefining name 'comparable_version' from outer scope (line 51)
107    # have an impact when the project has lot of tags)
108    for version_obj in version_list.iterator():
109        version_slug = version_obj.verbose_name
110        comparable_version = parse_version_failsafe(version_slug)111        if comparable_version:
112            versions.append((version_obj, comparable_version))
113
Redefining name 'slug' from outer scope (line 25)
73            else:
74                print('Cached top_lang: %s' % top_lang)
75            if top_lang in PL_DICT:
76                slug = PL_DICT[top_lang]77                print('Setting {} to {}'.format(repo_url, slug))
78                Project.objects.filter(
79                    pk=project.pk,