-
Notifications
You must be signed in to change notification settings - Fork 0
[Chore] Make Linting great again #118
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
- Auto-fixed 190 linting issues with ruff --fix - Mainly import block sorting (I001) and unused imports (F401)
- CLI handlers and commands now use logger instead of print - Environment variables loading uses debug level logging - Debug utilities use info level for user-visible debug info
- Prefix unused arguments with underscore to indicate intentional non-use - Signal handler frame parameter, method args/kwargs, debug config port
- Add 'from e' to exception raises for proper exception chaining (B904) - Remove return from finally block to prevent exception silencing (B012)
- Replace bare except with Exception (E722) - Fix unused loop variable in notebook by using actual event_message - Replace blind Exception assert with specific exceptions (B017)
- Updated temporal ACP template to use logger instead of print for debug output - This will fix generated files to have proper logging practices
- Deprecated functions, framework callbacks, future extension parameters - Fixed import type checking issue by moving import out of TYPE_CHECKING - Added noqa comments for legitimate unused parameters
- Configure pyproject.toml to ignore print statements in tutorials, tests, and dev tools - Add file-level noqa for temporal workflow interface arguments - Add inline noqa for unused provider parameters and framework callbacks - Disable ARG001/ARG002/ARG005 for test patterns in pyproject.toml
- Fix import sorting issue in debug handlers - Add file-level noqa for remaining test files - Add specific ipynb file patterns to pyproject.toml for notebook linting
- File should remain local only for PR discussion reference
…_header_forwarding
…ecessary isinstance calls
- Suppress reportUnknownMemberType, reportUnknownVariableType, reportUnknownParameterType - Suppress reportUnknownArgumentType, reportMissingParameterType - Reduces typing errors from 1959 to 659 (1300+ errors suppressed)
- Use basic type checking as default (for generated SDK code) - Enable strict type checking only for src/agentex/lib, examples, tests - Reduces errors from 2000 to 406 while maintaining strict checking where needed - No global ignore rules - cleaner approach
- Add null checks for task_state access - Fix safe content extraction patterns - Add null checks for span.output assignments - Addresses reportOptionalMemberAccess errors in tutorials
- Add missing RetryPolicy parameters with reasonable defaults - Fix missing Agent created_at/updated_at timestamps in test fixtures - Add type ignore for intentional test error case - Provide missing temporal_address parameter in test
- Add safe content extraction patterns for TaskMessageContent unions - Replace direct .content access with hasattr/getattr patterns - Addresses str | List[str] | Unknown | object | None type errors
- Add type: ignore[arg-type] for handoffs, model_settings, tools, tool_use_behavior - Add ignores for input_guardrails, output_guardrails parameter types - Addresses Agent generic type vs Temporal specific type incompatibilities
- Fix optional parameter type annotations (str = None -> str | None = None) - Fix temporal client function signatures - Fix workflow parameter optional type annotations - Addresses Expression of type None assignment errors
|
First of all thanks so much for getting this PR out Prass! |
Resolved conflicts: - deploy_handlers.py: kept logger.info with plugin support from main - temporal_client.py: merged plugin support with client property validation - utils.py: integrated plugin validation from main - worker.py: combined plugin support with existing code - fastacp.py: merged plugin parameter handling - temporal_acp.py: integrated plugin support in create method - fastacp.py types: added plugin validation All files formatted with rye run format
Document that the type ignore comment in _typing.py will be overwritten by Stainless generator. This needs to be addressed either by updating the Stainless config or moving the utility to lib/
34680eb to
f96d492
Compare
ec89167 to
c698a6a
Compare
|
@RoxyFarhad + @smoreinis - fixed a few bugs during tutorial level testing with
Last two are slightly out of scope, but I thought I'd fix it as a part of testing this PR |
RoxyFarhad
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.
mainly comments about why we have ignores everywhere
No description provided.