-
Notifications
You must be signed in to change notification settings - Fork 28
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
fix import in script for use by typer #982
fix import in script for use by typer #982
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #982 +/- ##
==========================================
- Coverage 71.08% 71.07% -0.01%
==========================================
Files 104 104
Lines 7006 7005 -1
==========================================
- Hits 4980 4979 -1
Misses 2026 2026
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
romancal/scripts/static_preview.py
Outdated
|
||
def command(): | ||
from typing_extensions import Annotated |
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.
If this is supposed to be available at runtime then you must include this as one of the listed dependencies.
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.
good point; it looks like typer
brings it in, so should it be an explicit dependency?
❯ pipdeptree --packages typing-extensions --reverse
typing-extensions==4.8.0
└── typer==0.9.0 [requires: typing-extensions>=3.7.4.3]
└── stpreview==0.5.1 [requires: typer]
I'll move it to the try
block
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.
Its probably fine, especially in a try block. I'm just thinking about what would happen if typer dropped the dependency, which it probably will do eventually.
This PR addresses an issue from #977 where the script doesn't have access to
typing_extensions.Annotated
at runtimeChecklist
added entry inCHANGES.rst
under the corresponding subsectionupdated relevant testsupdated relevant documentationran regression tests, post a link to the Jenkins job below. How to run regression tests on a PR