Skip to content

Commit b41d4e7

Browse files
committed
fix: remove unsupported stroke_width parameter and update preset values
- Removed appearance_stroke_width from test as it's not supported by API - Updated preset values to camelCase format (socialSecurityNumber, etc.) - Updated documentation to reflect correct preset format These changes should resolve integration test failures related to invalid parameters and incorrect preset formatting.
1 parent 79b945a commit b41d4e7

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/nutrient_dws/api/direct.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,10 @@ def create_redactions_preset(
295295
Args:
296296
input_file: Input PDF file.
297297
preset: Preset pattern to use. Common options include:
298-
- "social-security-number": US SSN pattern
299-
- "credit-card-number": Credit card numbers
298+
- "socialSecurityNumber": US SSN pattern
299+
- "creditCardNumber": Credit card numbers
300300
- "email": Email addresses
301-
- "phone-number": Phone numbers
301+
- "phoneNumber": Phone numbers
302302
- "date": Date patterns
303303
- "currency": Currency amounts
304304
output_path: Optional path to save the output file.

tests/integration/test_new_tools_integration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def sample_pdf_with_sensitive_data(self, tmp_path):
6262
def test_create_redactions_preset_ssn(self, client, sample_pdf_with_sensitive_data):
6363
"""Test creating redactions with SSN preset."""
6464
result = client.create_redactions_preset(
65-
sample_pdf_with_sensitive_data, preset="social-security-number"
65+
sample_pdf_with_sensitive_data, preset="socialSecurityNumber"
6666
)
6767
assert_is_pdf(result)
6868
assert len(result) > 0
@@ -104,7 +104,6 @@ def test_create_redactions_with_appearance(self, client, sample_pdf_with_sensiti
104104
case_sensitive=False,
105105
appearance_fill_color="#FF0000",
106106
appearance_stroke_color="#000000",
107-
appearance_stroke_width=2,
108107
)
109108
assert_is_pdf(result)
110109
assert len(result) > 0

0 commit comments

Comments
 (0)