Errors detected in .deepsource.toml
.
@staticmethod
PYL-R0201111 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)
80 }
81 }
82
83 def show_debug_toolbar(request): 84 from django.conf import settings
85 return settings.DEBUG
86
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}'",
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)
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()
The method doesn't use its bound instance. Decorate this method with @staticmethod
decorator, so that Python does not have to instantiate a bound method for every instance of this class thereby saving memory and computation. Read more about staticmethods here.