Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

docs(attachment): Document attachment parameters #3342

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

szokeasaurusrex
Copy link
Member

@szokeasaurusrex szokeasaurusrex commented Jul 25, 2024

Document parameters to sentry_sdk.Scope.add_attachment and sentry_sdk.attachments.Attachment.

Also, update add_attachment's type hint to match the Attachment constructor's hint.

Fixes: #3340
Related: getsentry/sentry-docs#10844

Copy link

codecov bot commented Jul 25, 2024

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 12464 tests with 1 failed, 10849 passed and 1614 skipped.

View the full list of failed tests

py3.9-aws_lambda

  • Class name: tests.integrations.aws_lambda.test_aws
    Test name: test_non_dict_event[python3.9-\n [\n {"good dog": "Maisey"},\n {"good dog": "Charlie"},\n {"good dog": "Cory"},\n {"good dog": "Bodhi"}\n ]\n -False-4]

    .../integrations/aws_lambda/test_aws.py:509: in test_non_dict_event
    (
    E ValueError: not enough values to unpack (expected 2, got 1)

@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/attachment-docs branch 2 times, most recently from 1700596 to bd917b6 Compare July 25, 2024 11:20
@szokeasaurusrex szokeasaurusrex marked this pull request as ready for review July 25, 2024 11:20
Update the type hint to clarify that `add_attachment`'s `bytes`
parameter can also accept `Callable[[], bytes]` values, since it
gets passed through to the `Attachment` constructor, which accepts
such values.
Document parameters to `sentry_sdk.Scope.add_attachment` and
`sentry_sdk.attachments.Attachment`.

Fixes: #3340
Related: getsentry/sentry-docs#10844
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/attachment-docs branch from bd917b6 to 088589a Compare July 25, 2024 11:23
@szokeasaurusrex szokeasaurusrex merged commit 088589a into master Jul 25, 2024
124 checks passed
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/attachment-docs branch July 25, 2024 12:06
szokeasaurusrex added a commit to getsentry/sentry-docs that referenced this pull request Jul 25, 2024
Update attachment docs to reflect new API added in Python SDK 2.0.0,
and introduce other general improvements to the page.

Depends on getsentry/sentry-python#3342, which
adds parameter documentation to the API Docs.

Fixes: #10844
Related: getsentry/sentry-python#3340
arjennienhuis pushed a commit to arjennienhuis/sentry-python that referenced this pull request Sep 30, 2024
Update the type hint to clarify that `add_attachment`'s `bytes`
parameter can also accept `Callable[[], bytes]` values, since it
gets passed through to the `Attachment` constructor, which accepts
such values.
arjennienhuis pushed a commit to arjennienhuis/sentry-python that referenced this pull request Sep 30, 2024
Document parameters to `sentry_sdk.Scope.add_attachment` and
`sentry_sdk.attachments.Attachment`.

Fixes: getsentry#3340
Related: getsentry/sentry-docs#10844
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix apidocs for 2.x
2 participants