-
Notifications
You must be signed in to change notification settings - Fork 8
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
Migrate to __future__.annotations
#347
Conversation
2740a62
to
ccfa20d
Compare
I've been looking at this too, and somewhere the changes in Also, if you haven't run |
Is that due to the fact that the |
There have been issues relating to that, which may not be completely solved (fastapi/typer#802), but this seems to be from |
We can add exceptions to the CLI files noting the issue, I guess. |
ccfa20d
to
51c298a
Compare
We have a bit of a choice. Do we want file-level disabling of I002, FA100 (not importing future annotations) #ruff: #noqa: I002, FA100 at the top of each CLI file or do we want a pyproject.toml level disable? [tool.ruff.lint.per-file-ignores]
# Ignore __future__ annotations import in CLI folder.
"janus-core/cli/**.py" = ["I002", "FA100"] |
b478201
to
7bcce64
Compare
So actually I think typer itself may not actually to blame. It seems to be specifically caused by
which I think means the custom info isn't copied properly.
|
I don't mind too much, but being explicit per file is maybe a bit clearer, so I'm happy with the current form. Only thing left is I think the explanations should be updated. I should probably open an issue in typer-config, which we can reference? (I was going to do a PR too to set |
7bcce64
to
5466dde
Compare
Following discussion quick migration to future annotations and
|
union syntax globally.N.B. Does not update doc labels.