Skip to content

Commit

Permalink
Update requirements (#1012)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyve authored Aug 11, 2024
1 parent a6565be commit 82aba09
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx==7.3.7
myst-parser==2.0.0
furo==2024.1.29
sphinx==8.0.2
myst-parser==4.0.0
furo==2024.8.6
5 changes: 3 additions & 2 deletions example/app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ class PaginationView(TemplateView):

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
num_lines = 200
lines = []
for i in range(200):
lines.append("Line %s" % (i + 1))
for i in range(1, num_lines + 1):
lines.append(f"Line {i}")
paginator = Paginator(lines, 10)
page = self.request.GET.get("page")
try:
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-r requirements-test.txt
-r docs/requirements.txt
twine==5.0.0
twine==5.1.1
build==1.2.1
setuptools==69.5.1
setuptools==72.1.0
check-manifest==0.49
pyroma==4.2
check-wheel-contents==0.6.0
6 changes: 3 additions & 3 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tox==4.14.2
coverage==7.4.4
ruff==0.4.1
tox==4.17.1
coverage==7.6.1
ruff==0.5.7
2 changes: 1 addition & 1 deletion src/bootstrap3/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def parse_size(self, size):
return "large"
if size in ("md", "medium", ""):
return "medium"
raise BootstrapError('Invalid value "%s" for parameter "size" (expected "sm", "md", "lg" or "").' % size)
raise BootstrapError(f'Invalid value "{size}" for parameter "size" (expected "sm", "md", "lg" or "").')

def get_size_class(self, prefix="input"):
if self.size == "small":
Expand Down
2 changes: 1 addition & 1 deletion tests/app/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def render_form(form=None, context=None):

def render_form_field(field, context=None):
"""Create a template that renders a field."""
form_field = "form.%s" % field
form_field = f"form.{field}"
return render_template_with_form("{% bootstrap_field " + form_field + " %}", context)


Expand Down
2 changes: 1 addition & 1 deletion tests/test_templatetags.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_field_names(self):
self.assertIn('name="datetime_0"', res)
self.assertIn('name="datetime_1"', res)
else:
self.assertIn('name="%s"' % field.name, res)
self.assertIn(f'name="{field.name}"', res)

def test_field_addons(self):
form = TestForm()
Expand Down

0 comments on commit 82aba09

Please sign in to comment.