Skip to content

Commit 960eac8

Browse files
committed
Make field arguments keyword-only and re-alphabetize them
1 parent 136267a commit 960eac8

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

src/django_nh3/forms.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,33 @@ class Nh3Field(forms.CharField):
1717

1818
def __init__(
1919
self,
20-
tags: set[str] | None = None,
21-
clean_content_tags: set[str] | None = None,
20+
*args: Any,
2221
attributes: dict[str, set[str]] | None = None,
2322
attribute_filter: Callable[[str, str, str], str] | None = None,
24-
strip_comments: bool = False,
25-
link_rel: str = "",
23+
clean_content_tags: set[str] | None = None,
24+
empty_value: Any | None = None,
2625
generic_attribute_prefixes: set[str] | None = None,
27-
tag_attribute_values: dict[str, dict[str, set[str]]] | None = None,
26+
link_rel: str = "",
2827
set_tag_attribute_values: dict[str, dict[str, str]] | None = None,
28+
strip_comments: bool = False,
29+
tags: set[str] | None = None,
30+
tag_attribute_values: dict[str, dict[str, set[str]]] | None = None,
2931
url_schemes: set[str] | None = None,
30-
empty_value: Any | None = None,
31-
*args: Any,
3232
**kwargs: dict[Any, Any],
3333
):
3434
super().__init__(*args, **kwargs)
3535

3636
self.empty_value = empty_value
3737
self.nh3_options = get_nh3_options(
38-
tags=tags,
39-
clean_content_tags=clean_content_tags,
4038
attributes=attributes,
4139
attribute_filter=attribute_filter,
42-
strip_comments=strip_comments,
43-
link_rel=link_rel,
40+
clean_content_tags=clean_content_tags,
4441
generic_attribute_prefixes=generic_attribute_prefixes,
45-
tag_attribute_values=tag_attribute_values,
42+
link_rel=link_rel,
4643
set_tag_attribute_values=set_tag_attribute_values,
44+
strip_comments=strip_comments,
45+
tags=tags,
46+
tag_attribute_values=tag_attribute_values,
4747
url_schemes=url_schemes,
4848
)
4949

src/django_nh3/models.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,31 @@
1717
class Nh3Field(models.TextField):
1818
def __init__(
1919
self,
20-
tags: set[str] | None = None,
21-
clean_content_tags: set[str] | None = None,
20+
*args: Any,
2221
attributes: dict[str, set[str]] | None = None,
2322
attribute_filter: Callable[[str, str, str], str] | None = None,
24-
strip_comments: bool = False,
25-
link_rel: str = "",
23+
clean_content_tags: set[str] | None = None,
2624
generic_attribute_prefixes: set[str] | None = None,
27-
tag_attribute_values: dict[str, dict[str, set[str]]] | None = None,
25+
link_rel: str = "",
2826
set_tag_attribute_values: dict[str, dict[str, str]] | None = None,
27+
strip_comments: bool = False,
28+
tags: set[str] | None = None,
29+
tag_attribute_values: dict[str, dict[str, set[str]]] | None = None,
2930
url_schemes: set[str] | None = None,
30-
*args: Any,
3131
**kwargs: Any,
3232
) -> None:
3333
super().__init__(*args, **kwargs)
3434

3535
self.nh3_options = get_nh3_options(
36-
tags=tags,
37-
clean_content_tags=clean_content_tags,
3836
attributes=attributes,
3937
attribute_filter=attribute_filter,
40-
strip_comments=strip_comments,
41-
link_rel=link_rel,
38+
clean_content_tags=clean_content_tags,
4239
generic_attribute_prefixes=generic_attribute_prefixes,
43-
tag_attribute_values=tag_attribute_values,
40+
link_rel=link_rel,
4441
set_tag_attribute_values=set_tag_attribute_values,
42+
strip_comments=strip_comments,
43+
tags=tags,
44+
tag_attribute_values=tag_attribute_values,
4545
url_schemes=url_schemes,
4646
)
4747

0 commit comments

Comments
 (0)