Skip to content

Conversation

@asukaminato0721
Copy link
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

fix #22591

Screenshots

Before After
... ...

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 dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@asukaminato0721 asukaminato0721 marked this pull request as ready for review November 1, 2025 12:56
Copilot AI review requested due to automatic review settings November 1, 2025 12:56
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. 💪 enhancement New feature or request labels Nov 1, 2025
@asukaminato0721
Copy link
Contributor Author

/gemini review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the ty type checker with pyrefly for static type analysis in the API codebase. The change includes removing the ty dependency and adding configuration for the new pyrefly tool.

Key changes:

  • Removed the ty package dependency from dev dependencies
  • Added pyrefly.toml configuration file with project-specific exclusions and settings
  • Updated CI workflow to enforce pyrefly checks (removed || true fallback)
  • Added type annotation to beat_schedule variable in ext_celery.py

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
api/uv.lock Removed ty package entries and updated lock file
api/pyproject.toml Removed ty~=0.0.1a19 from dev dependencies
api/pyrefly.toml Added configuration for pyrefly type checker with exclusions
api/extensions/ext_celery.py Added explicit type annotation for beat_schedule variable
.github/workflows/api-tests.yml Removed `

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adapts the project for pyrefly, a static analysis tool, by adding its configuration and removing the ty dependency. The changes are mostly configuration-related. I've found a few areas for improvement, mainly regarding a missing import for a new type hint and some redundancies in the new pyrefly.toml configuration file that could be cleaned up for better maintainability.

@asukaminato0721 asukaminato0721 deleted the try-pyrefly branch November 6, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💪 enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use ty or pyrefly to do type check

1 participant