Skip to content

Commit

Permalink
Merge 33aab6a into f77df98
Browse files Browse the repository at this point in the history
  • Loading branch information
jace committed Dec 26, 2023
2 parents f77df98 + 33aab6a commit 37139ed
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/baseframe/forms/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ def _value(self) -> str:
"""
Render the internal Python value as a JSON string.
Specialcase `None` to return an empty string instead of a JSON ``null``.
Special-case `None` to return an empty string instead of a JSON ``null``.
"""
if self.raw_data:
# If we've received data from a form, render it as is. This allows
Expand Down
2 changes: 1 addition & 1 deletion src/baseframe/forms/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def strip_each_inner(


def none_if_empty() -> t.Callable[[t.Any], t.Optional[t.Any]]:
"""If data is empty or evalues to boolean false, replace with None."""
"""If data is empty or evaluates to boolean false, replace with None."""

def none_if_empty_inner(value: t.Any) -> t.Optional[t.Any]:
return value if value else None
Expand Down
4 changes: 2 additions & 2 deletions src/baseframe/forms/parsleyjs.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"""
WTForms fields and widgets with ParsleyJS headers.
This is a fork of wtforms-parsleyjs based on
This is a fork of WTForms-ParsleyJS based on
https://github.com/johannes-gehrs/wtforms-parsleyjs and
https://github.com/fuhrysteve/wtforms-parsleyjs. We've forked it into Baseframe because
the upstream repositories appear unmaintained, and from past experience, we'll have
trouble getting patches accepted every time WTForms or ParsleyJS has an update. This
works best for us if we maintain our own fork.
wtforms-parsleysj is MIT licensed, while the rest of Baseframe is either BSD (our code)
WTForms-ParsleyJS is MIT licensed, while the rest of Baseframe is either BSD (our code)
or various other open source licenses (other third party code).
"""

Expand Down
2 changes: 1 addition & 1 deletion tests/baseframe_tests/forms/fields_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def test_escaped_label_text() -> None:
],
)
def test_date_time_field(test_input, expected_naive, expected_aware) -> None:
"""Assert various datetime inputs are recogized and processed accurately."""
"""Assert various datetime inputs are recognized and processed accurately."""
form = DateTimeForm(meta={'csrf': False})
form.process(
formdata=MultiDict(
Expand Down

0 comments on commit 37139ed

Please sign in to comment.