MCPcopy
hub / github.com/django/django / check

Method check

django/urls/resolvers.py:348–363  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

346 return None
347
348 def check(self):
349 warnings = [
350 *self._check_pattern_startswith_slash(),
351 *self._check_pattern_unmatched_angle_brackets(),
352 ]
353 route = self._route
354 if "(?P<" in route or route.startswith("^") or route.endswith("$"):
355 warnings.append(
356 Warning(
357 "Your URL pattern {} has a route that contains '(?P<', begins "
358 "with a '^', or ends with a '$'. This was likely an oversight "
359 "when migrating to django.urls.path().".format(self.describe()),
360 id="2_0.W001",
361 )
362 )
363 return warnings
364
365 def _check_pattern_unmatched_angle_brackets(self):
366 warnings = []

Callers

nothing calls this directly

Calls 6

WarningClass · 0.90
appendMethod · 0.45
formatMethod · 0.45
describeMethod · 0.45

Tested by

no test coverage detected