Skip to content

feature/type-checker-compatible-with-mypy #38

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Sooshiance
Copy link

I've added type checker(compatible with mypy) to your project, I hope that finds you well

@marselester
Copy link
Owner

Thank you! I'll have a look when I have a chance.

@@ -0,0 +1,35 @@
repos:
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think we need pre commit hooks.

Copy link
Author

Choose a reason for hiding this comment

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

Will do

@@ -0,0 +1,14 @@
[mypy]
Copy link
Owner

Choose a reason for hiding this comment

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

Could you please move this into pyproject.toml, e.g., https://mypy.readthedocs.io/en/stable/config_file.html#example-pyproject-toml?

Copy link
Author

Choose a reason for hiding this comment

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

OK

@@ -0,0 +1,14 @@
[mypy]
python_version = 3.11
Copy link
Owner

Choose a reason for hiding this comment

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

I guess python_version is not necessary, for instance, I don't see it in the https://github.com/fastapi/fastapi/blob/master/pyproject.toml#L125.

Copy link
Author

Choose a reason for hiding this comment

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

Ok, I will task it as an important notice.

logger.addHandler(json_handler)
logger.setLevel(logging.DEBUG)
logging.propagate = False
# This should be logger, not logging or use `type: ignore` instead
logger.propagate = False
Copy link
Owner

Choose a reason for hiding this comment

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

Nice catch 👍. Let's remove the This should be logger ... comment.

@@ -1,33 +1,37 @@
from __future__ import annotations # backward compatibility
Copy link
Owner

Choose a reason for hiding this comment

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

I've deprecated Python < v3.9, could you please rebase? I wonder if we still need from __future__ import annotations.

Copy link
Author

Choose a reason for hiding this comment

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

Ok, sorry for late responding...

@Sooshiance
Copy link
Author

Sooshiance commented Feb 28, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants