Skip to content

chore(api): Suppress unknown contract checks by default - #36969

Merged
asukaminato0721 merged 2 commits into
langgenius:mainfrom
cqjjjzr:refac-basemodel-retchk
Jun 9, 2026
Merged

chore(api): Suppress unknown contract checks by default#36969
asukaminato0721 merged 2 commits into
langgenius:mainfrom
cqjjjzr:refac-basemodel-retchk

Conversation

@cqjjjzr

@cqjjjzr cqjjjzr commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

The contract lint is too noisy. Don't output unknown entries by default.

Part of #36444 .

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@cqjjjzr
cqjjjzr requested a review from a team June 2, 2026 18:47
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 2, 2026
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 47.25% 47.25% +0.00%
Strict coverage 46.75% 46.75% +0.00%
Typed symbols 26,549 26,553 +4
Untyped symbols 29,960 29,961 +1
Modules 2853 2853 0

@autofix-ci
autofix-ci Bot requested a review from crazywoola as a code owner June 2, 2026 18:50
Comment thread api/tests/unit_tests/commands/test_lint_response_contracts.py Outdated
@asukaminato0721
asukaminato0721 removed the request for review from a team June 3, 2026 05:43
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-06-03 06:54:50.072067983 +0000
+++ /tmp/pyrefly_pr.txt	2026-06-03 06:54:36.052972422 +0000
@@ -1972,6 +1972,8 @@
     --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1226:44
 ERROR Argument `SimpleNamespace` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
     --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1250:57
+ERROR Could not find name `pytest` [unknown-name]
+   --> tests/unit_tests/commands/test_lint_response_contracts.py:140:77
 ERROR Expected a callable, got `None` [not-callable]
   --> tests/unit_tests/commands/test_reset_encrypt_key_pair.py:18:9
 ERROR Object of class `ModuleType` has no attribute `upgrade` [missing-attribute]

@cqjjjzr
cqjjjzr force-pushed the refac-basemodel-retchk branch from 47583e9 to fc67431 Compare June 3, 2026 07:37
@cqjjjzr
cqjjjzr requested a review from asukaminato0721 June 4, 2026 05:51
@cqjjjzr
cqjjjzr force-pushed the refac-basemodel-retchk branch from d9ec871 to 3c22029 Compare June 9, 2026 07:40
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 9, 2026
@asukaminato0721
asukaminato0721 added this pull request to the merge queue Jun 9, 2026
Merged via the queue into langgenius:main with commit c88a38b Jun 9, 2026
31 checks passed
lyzno1 pushed a commit that referenced this pull request Jun 10, 2026
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Ssazurov pushed a commit to Ssazurov/dify that referenced this pull request Aug 8, 2026
…6969)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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 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