Skip to content

Conversation

@prassanna-ravishankar
Copy link
Member

No description provided.

- 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
- 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
@smoreinis
Copy link
Contributor

smoreinis commented Sep 30, 2025

First of all thanks so much for getting this PR out Prass!
I got through like the first half of these - I feel like if we could get imports sorted again the amount of changes here would be even less.
I saw that the examples were actually excluded here so also curious if that means there are any example changes needed here or if it means it's possible for us to get examples to lint e.g. in a follow up PR (the changes do all look sensible though, although I wonder if there's anything better we can do to avoid folks having to use the getattr pattern since that could be annoying).
I will try to finish looking at the rest of the files either this evening or tomorrow. Fingers crossed our testing coverage is good enough that it should let us know if anything breaking were to creep in :)

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/
@prassanna-ravishankar
Copy link
Member Author

@RoxyFarhad + @smoreinis - fixed a few bugs during tutorial level testing with ./launch_tutorials.sh in examples/.

  • ec9aeac : Fixed a circular import due to import re-ordering. Fixed this by inline ignores, but exposes a deeper code smell. Out of scope of this PR if you agree.
  • abec38f There was a legacy bug in the tutorials, fixed that
  • c842473 temporal agents handled .envs differently, so made a nifty little addition to the launch

Last two are slightly out of scope, but I thought I'd fix it as a part of testing this PR

@prassanna-ravishankar prassanna-ravishankar enabled auto-merge (squash) October 1, 2025 17:04
Copy link
Collaborator

@RoxyFarhad RoxyFarhad left a 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

@prassanna-ravishankar prassanna-ravishankar merged commit efce531 into main Oct 1, 2025
10 checks passed
@prassanna-ravishankar prassanna-ravishankar deleted the fix/linting-issues branch October 1, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants