-
Notifications
You must be signed in to change notification settings - Fork 31
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
base: master
Are you sure you want to change the base?
Conversation
Thank you! I'll have a look when I have a chance. |
@@ -0,0 +1,35 @@ | |||
repos: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
json_log_formatter/__init__.py
Outdated
@@ -1,33 +1,37 @@ | |||
from __future__ import annotations # backward compatibility |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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...
OK, sure I will do that
…On Fri, Feb 28, 2025 at 4:06 AM Marsel Mavletkulov ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In json_log_formatter/__init__.py
<#38 (comment)>
:
> @@ -1,33 +1,37 @@
+from __future__ import annotations # backward compatibility
I've deprecated Python < v3.9, could you please rebase? I wonder if we
still need from __future__ import annotations.
—
Reply to this email directly, view it on GitHub
<#38 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZTUVVKMKIITKPI3SJ5DBPL2R6VPZAVCNFSM6AAAAABWERCQYKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMNBZGQYDGMZYGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I've added type checker(compatible with
mypy
) to your project, I hope that finds you well