-
Notifications
You must be signed in to change notification settings - Fork 66
chore: remove jedi typing (FXC-4160) #3006
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
Conversation
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.
1 file reviewed, 1 comment
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
dd01845 to
4f67393
Compare
|
@greptile reevaluate |
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.
Looking at the diff, I need to reevaluate my previous assessment. The changes show that the PR actually fixes the incorrect import issue rather than adding jedi as a dependency to work around it.
Corrected Analysis
What the PR actually does:
- ✅ Fixes the root cause: Changes the incorrect import from
from jedi.inference.gradual.typing import Callableto the correctfrom typing import Callable - ✅ Removes the problematic dependency: By fixing the import, jedi is no longer needed
My previous assessment was wrong - I incorrectly stated that the PR adds jedi as a dependency. Looking at the actual diff, it does the opposite: it fixes the import to use the standard library instead of jedi's internal API.
Updated Evaluation
This is actually a good fix that:
- Uses the correct, standard library import (
typing.Callable) - Removes dependency on jedi's internal APIs (which are not meant for external use)
- Eliminates the need for jedi as a dependency
- Follows Python best practices
The PR title mentions "include jedi dependency" but the actual changes do the opposite - they remove the need for jedi by fixing the import. The title appears to be misleading or outdated.
Recommendation: Approve - This properly fixes the import issue by using the standard library instead of relying on jedi's internal implementation details.
momchil-flex
left a comment
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 that makes a lot more sense. :D
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changes
Summary
|
Greptile Summary
jedias a required dependency to fix an import error intidy3d/web/core/http_util.py:12Callablefromjedi.inference.gradual.typing(an internal jedi API) instead of from the standard librarytyping.Callabletyping.Callableand jedi removed from required dependenciesConfidence Score: 3/5
Callablefrom an internal jedi module (jedi.inference.gradual.typing) instead of from Python's standard library (typing), which is incorrect and adds bloat to the dependency treeImportant Files Changed
jedi = "^0.19"as a required dependency (line 44) to fix import error in tidy3d/web/core/http_util.py:12, but the root cause should be addressedSequence Diagram
sequenceDiagram participant Dev as "Developer" participant PR as "This PR" participant Deps as "Dependencies" participant Code as "http_util.py" Dev->>Code: "Import Callable from jedi (incorrect)" Code->>Deps: "Requires jedi package" Deps-->>Code: "Error: jedi not installed" Dev->>PR: "Add jedi to pyproject.toml" PR->>Deps: "Install jedi as required dependency" Deps-->>Code: "jedi now available" Code->>Code: "Import works (but still incorrect)"