langgenius/dify

improve dict check in py

Geschlossen

#22.651 geöffnet am 18.07.2025

 (15 Kommentare) (2 Reaktionen) (2 zugewiesene Personen)TypeScript (22.210 Forks)batch import
good first issueno-issue-activity💪 enhancement

Repository-Metriken

Stars
 (141.412 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 1T 21h) (579 gemergte PRs in 30 T)

Beschreibung

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

now a lot of type is bare dict

rg ": dict\)" --glob "*.py" | wc -l
165

use pydantic can reduce many dup pattern like

if not field:
    raise ValueError...

example #24837

2. Additional context or comments

https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/

3. Can you help us with this feature?

  • I am interested in contributing to this feature.

Contributor Guide