Skip to content

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

Open
cqjjjzr wants to merge 2 commits into
langgenius:mainfrom
cqjjjzr:refac-basemodel-retchk
Open

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

Conversation

@cqjjjzr
Copy link
Copy Markdown
Contributor

@cqjjjzr cqjjjzr commented Jun 2, 2026

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
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 46.13% 46.13% +0.00%
Strict coverage 45.62% 45.62% +0.00%
Typed symbols 25,064 25,068 +4
Untyped symbols 29,599 29,600 +1
Modules 2790 2790 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
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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