Repository navigation
refactor(parser): add from __future__ import annotations - #4983
Merged
Merged
Conversation
and update code according to ruff rules TCH, UP006, UP007, UP037 and FA100.
ericbn
commented
Aug 15, 2024
Contributor
Author
|
The code in this PR most probably fails in Python 3.8/3.9, like we saw with #4990. EDIT: Added a new commit to fix it. |
TypeError: You have a type annotation 'str | None' which makes use
of newer typing features than are supported in your version of Python.
To handle this error, you should either remove the use of new syntax
or install the `eval_type_backport` package.
leandrodamascena
requested changes
Aug 16, 2024
leandrodamascena
left a comment
Contributor
There was a problem hiding this comment.
Hi @ericbn! I left a comment to improve the overall experience and make Ruff avoid FA100 in all files under the models directory.
Configure lint.per-file-ignores in ruff.toml instead of adding a
# ruff: noqa: FA100
line to each file.
|
1 of 2 tasks
leandrodamascena
self-requested a review
August 18, 2024 21:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issue number: #5013
Summary
Changes
Add
from __future__ import annotationsto parser packageUser experience
Discussed in #4607
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.