summaryrefslogtreecommitdiff
path: root/django/template
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-18 19:11:18 +0100
committerGitHub <noreply@github.com>2023-01-18 19:11:18 +0100
commit23e886886249ebe8f80a48b0d25fbb5308eeb06f (patch)
treeddd2eb220750704fa4fbfd8447654fc3d382bd10 /django/template
parentfd21f82aa82b0d75a161f618ef944ebe0923e0ab (diff)
Refs #34233 -- Used str.removeprefix()/removesuffix().
Diffstat (limited to 'django/template')
-rw-r--r--django/template/backends/django.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/backends/django.py b/django/template/backends/django.py
index 218e5e0bc1..98abf7ddb5 100644
--- a/django/template/backends/django.py
+++ b/django/template/backends/django.py
@@ -104,7 +104,7 @@ def get_template_tag_modules():
if hasattr(pkg, "__path__"):
for name in get_package_libraries(pkg):
- yield name[len(candidate) + 1 :], name
+ yield name.removeprefix(candidate).lstrip("."), name
def get_installed_libraries():