Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
iurisilvio committed Apr 11, 2022
1 parent 6593041 commit 0a116ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 6 additions & 3 deletions render_block/django.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from copy import copy

from django.conf import settings
from django.template import Context, RequestContext
from django.template.base import TextNode
from django.template.context import RenderContext
Expand Down Expand Up @@ -45,7 +44,9 @@ def django_render_block(template, block_name, context, request=None):
parent_template = _build_block_context(template, context_instance)

try:
node, render_context = _find_template_block(template, block_name, context_instance)
node, render_context = _find_template_block(
template, block_name, context_instance
)
except BlockNotFound:
# The block wasn't found in the current template.

Expand All @@ -54,7 +55,9 @@ def django_render_block(template, block_name, context, request=None):
raise

# Check the parent template for this block.
node, render_context = _find_template_block(parent_template, block_name, context_instance)
node, render_context = _find_template_block(
parent_template, block_name, context_instance
)

if not template.engine.debug:
_NODES_CACHE[cache_key] = node, render_context
Expand Down
1 change: 0 additions & 1 deletion tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ def test_node_cache(self):
self.assertEqual(result, "block1 from test1")



@override_settings(
TEMPLATES=[
{
Expand Down

0 comments on commit 0a116ea

Please sign in to comment.