srijan-deepsource / readthedocs.org

Errors detected in .deepsource.toml.

Consider decorating method with @staticmethod PYL-R0201
Performance
Major
4 years ago4 years old
111        super().checkout()
112        return self.co(identifier)
113
114    def get_url(self, base_url, identifier):115        base = base_url.rstrip('/')
116        tag = identifier.lstrip('/')
117        url = '{}/{}'.format(base, tag)
Method could be a function
 80            }
 81        }
 82
 83    def show_debug_toolbar(request): 84        from django.conf import settings
 85        return settings.DEBUG
 86
Method could be a function
455        'readthedocs/build:testing': DOCKER_IMAGE_SETTINGS.get('readthedocs/build:7.0'),
456    })
457
458    def _get_docker_memory_limit(self):459        try:
460            total_memory = int(subprocess.check_output(
461                "free -m | awk '/^Mem:/{print $2}'",
Method could be a function
 55        project = get_object_or_404(queryset, slug=project_slug)
 56        return project
 57
 58    def _get_project_data(self, project, version_slug): 59        version_doctype = (
 60            project.versions
 61            .values_list('documentation_type', flat=True)
Method could be a function
 7@pytest.mark.search
 8class TestXSS:
 9
10    def test_facted_page_xss(self, client, project):11        query = '"XSS"'
12        page_search = PageSearch(query=query)
13        results = page_search.execute()