Skip to content

StructlogFormatter conforms to structlog.typing.Processor - #147

Open
AWhetter wants to merge 2 commits into
elastic:mainfrom
AWhetter:gh-146
Open

StructlogFormatter conforms to structlog.typing.Processor#147
AWhetter wants to merge 2 commits into
elastic:mainfrom
AWhetter:gh-146

Conversation

@AWhetter

Copy link
Copy Markdown

This changes the function signature of StructlogProcessor.__call__ so that's it's compatible with structlog.typing.Processor.

I've also removed the need for mypy to be run with --no-warn-unused-ignores. The test was requiring this to be set, and therefore users would need to as well. With this change, users can run mypy with --strict and without needing to turn any other checks off.

Closes #146

@cla-checker-service

cla-checker-service Bot commented Oct 24, 2024

Copy link
Copy Markdown

💚 CLA has been signed

@AWhetter

Copy link
Copy Markdown
Author

Is there anything that I can do to help move this forwards?

@AWhetter

Copy link
Copy Markdown
Author

I've updated this to address the latest merge conflicts, so this is ready to review again.

@xrmx xrmx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We run mypy in pre-commit, so instead of adding these tests and adding mypy as dev dependency we should update the mypy configuration in .pre-commit-config.yaml.

@xrmx

xrmx commented Sep 2, 2026

Copy link
Copy Markdown
Member

Sorry missed that the purpose of the typing test are testing the example. I guess that's fine then.

@AWhetter

AWhetter commented Sep 3, 2026

Copy link
Copy Markdown
Author

I implemented it this way based on your comment here, but I wasn't sure if I'm interpreting what you meant correctly.
I could move the running of mypy into the "test" nox session if you prefer? Or I could separate the running of mypy out into a new nox session and execute that in the github actions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StructlogProcessor fails typechecking

2 participants