Skip to content

Commit af13e95

Browse files
committed
In patch for issue jieter#687, clean up to pass flake8 and spell check.
1 parent a62227b commit af13e95

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

django_tables2/columns/base.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def __init__(self, url=None, accessor=None, attrs=None, reverse_args=None, query
7676
reverse_args (dict, tuple): Arguments to ``django.urls.reverse()``. If dict, the arguments
7777
are assumed to be keyword arguments to ``reverse()``, if tuple, a ``(viewname, args)``
7878
or ``(viewname, kwargs)``
79+
query (dict): If supplied, field-value pairs to be formatted into a query string.
80+
fragment (str): If supplied, value of URL fragment identifier (hash).
7981
"""
8082
self.url = url
8183
self.attrs = attrs
@@ -177,6 +179,7 @@ def callback(record, value, **kwargs):
177179

178180
return callback
179181

182+
180183
@library.register
181184
class Column:
182185
"""
@@ -235,8 +238,8 @@ class Column:
235238
- If `True`, the ``record.get_absolute_url()`` or the related model's
236239
`get_absolute_url()` is used.
237240
- If a callable is passed, the returned value is used, if it's not ``None``.
238-
- If a `dict` is passed, optional items named ``query`` (dict), and ``fragment`` (str),
239-
if present, specify the query string and fragment (hash) elements of the url.
241+
- If a `dict` is passed, optional items named ``query`` (dict), and ``fragment`` (str),
242+
if present, specify the query string and fragment (hash) elements of the URL.
240243
The remaining items are passed on to ``~django.urls.reverse`` as kwargs.
241244
- If a `tuple` is passed, it must be either a (viewname, args) or (viewname, kwargs)
242245
tuple, which is also passed to ``~django.urls.reverse``.
@@ -327,7 +330,7 @@ def __init__(
327330
link_kwargs = dict(reverse_args=linkify)
328331
elif isinstance(linkify, dict):
329332
# specific keys in linkify are understood to be link_kwargs, and the rest must be reverse_args
330-
link_kwargs = { name: linkify.pop(name) for name in ('query', 'fragment') if name in linkify }
333+
link_kwargs = {name: linkify.pop(name) for name in ('query', 'fragment') if name in linkify}
331334
link_kwargs['reverse_args'] = linkify
332335
elif linkify is True:
333336
link_kwargs = dict(accessor=self.accessor)

0 commit comments

Comments
 (0)