Skip to content

refactor: replace bare dict with dict[str, Any] in helper cache modules#35067

Merged
asukaminato0721 merged 1 commit intolanggenius:mainfrom
wdeveloper16:refactor/typed-dict-helper-caches
Apr 13, 2026
Merged

refactor: replace bare dict with dict[str, Any] in helper cache modules#35067
asukaminato0721 merged 1 commit intolanggenius:mainfrom
wdeveloper16:refactor/typed-dict-helper-caches

Conversation

@wdeveloper16
Copy link
Copy Markdown
Contributor

Summary

Replace bare dict in three sibling Redis-backed credential cache helpers:

  • core/helper/provider_cache.pyget on ProviderCredentialsCache and NoOpProviderCredentialCache (Any already imported)
  • core/helper/model_provider_cache.pyget and set(credentials)
  • core/helper/tool_parameter_cache.pyget and set(parameters)

All caches store JSON-serialized credentials / tool parameters with provider-defined keys, so dict[str, Any] is the correct shape.

No behavior change — types only.

Part of #22651.

Test plan

  • make lint passes
  • make type-check-core passes

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. refactor labels Apr 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

No changes detected.

@asukaminato0721 asukaminato0721 added this pull request to the merge queue Apr 13, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 13, 2026
Merged via the queue into langgenius:main with commit 2042ee4 Apr 13, 2026
28 checks passed
HanqingZ pushed a commit to HanqingZ/dify that referenced this pull request Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer refactor size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants