-
Notifications
You must be signed in to change notification settings - Fork 18.8k
chore(cli): add mypy strict checking #32386
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
The latest updates on your projects. Learn more about Vercel for GitHub. |
CodSpeed WallTime Performance ReportMerging #32386 will not alter performanceComparing
|
CodSpeed Instrumentation Performance ReportMerging #32386 will not alter performanceComparing Summary
|
8e3f9c4
to
dcd201e
Compare
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.
Pull Request Overview
This PR enables strict mypy type checking for the CLI package by updating the mypy configuration and fixing type annotations throughout the codebase.
- Enables strict mypy checking with additional error codes and warnings
- Fixes generic type annotations to be more specific (e.g.,
dict
→dict[str, Any]
) - Adds missing return type annotations and improves type import handling
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
libs/cli/pyproject.toml |
Enables strict mypy checking and updates mypy version constraint |
libs/cli/tests/unit_tests/test_utils.py |
Fixes generic dict type annotation and adds Any import |
libs/cli/scripts/generate_migrations.py |
Makes output parameter optional in function signature |
libs/cli/langchain_cli/utils/git.py |
Specifies dict type with string keys and Any values |
libs/cli/langchain_cli/project_template/app/server.py |
Adds return type annotation to async function |
libs/cli/langchain_cli/namespaces/migrate/main.py |
Updates type ignore comment for untyped import |
libs/cli/langchain_cli/namespaces/migrate/generate/utils.py |
Specifies list type annotation for imports attribute |
libs/cli/pyproject.toml
Outdated
strict = "True" | ||
strict_bytes = "True" | ||
enable_error_code = "deprecated" | ||
warn_unreachable = "True" |
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.
Boolean values in TOML should be unquoted. Use strict = true
instead of strict = "True"
.
warn_unreachable = "True" | |
strict = true | |
strict_bytes = true | |
enable_error_code = "deprecated" | |
warn_unreachable = true |
Copilot uses AI. Check for mistakes.
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.
done
dcd201e
to
d2126d2
Compare
d2126d2
to
0ccbb2e
Compare
No description provided.