Skip to content

Commit

Permalink
PPF-779: fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
chinapandaman committed Dec 23, 2024
1 parent 2bea890 commit a8e6c32
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion PyPDFForm/middleware/radio.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def __init__(
def schema_definition(self) -> dict:
"""Json schema definition of the radiobutton."""

return {"maximum": self.number_of_options - 1, **super().schema_definition, "type": "integer"}
return {"maximum": self.number_of_options - 1,
**super().schema_definition, "type": "integer"}

@property
def sample_value(self) -> int:
Expand Down
12 changes: 6 additions & 6 deletions tests/scenario/test_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,16 +308,16 @@ def test_get_desc_in_schema(issue_pdf_directory):

assert (
obj.schema["properties"]["P1_checkbox4[0]"]["description"]
== "Part 1. Information About You. Your Full Name. 4. Has your name legally changed since the issuance of your Permanent Resident Card? Select Yes. (Proceed to Item Numbers 5. A. through 5. C.)."
) # noqa
== "Part 1. Information About You. Your Full Name. 4. Has your name legally changed since the issuance of your Permanent Resident Card? Select Yes. (Proceed to Item Numbers 5. A. through 5. C.)." # noqa
)
assert (
obj.schema["properties"]["P1_checkbox4[1]"]["description"]
== "Part 1. Information About You. Your Full Name. 4. Has your name legally changed since the issuance of your Permanent Resident Card? Select No (Proceed to Item Numbers 6. A. through 6. I.)."
) # noqa
== "Part 1. Information About You. Your Full Name. 4. Has your name legally changed since the issuance of your Permanent Resident Card? Select No (Proceed to Item Numbers 6. A. through 6. I.)." # noqa
)
assert (
obj.schema["properties"]["P1_checkbox4[2]"]["description"]
== "Part 1. Information About You. Your Full Name. 4. Has your name legally changed since the issuance of your Permanent Resident Card? Select Not Applicable - I never received my previous card. (Proceed to Item Numbers 6. A. through 6. I.)."
) # noqa
== "Part 1. Information About You. Your Full Name. 4. Has your name legally changed since the issuance of your Permanent Resident Card? Select Not Applicable - I never received my previous card. (Proceed to Item Numbers 6. A. through 6. I.)." # noqa
)


def test_get_desc_in_schema_radio(issue_pdf_directory):
Expand Down

0 comments on commit a8e6c32

Please sign in to comment.