Add basedpyright type checking infrastructure to dify-official-plugins#1792
Closed
Add basedpyright type checking infrastructure to dify-official-plugins#1792
Conversation
Co-authored-by: asukaminato0721 <30024051+asukaminato0721@users.noreply.github.com>
… script Co-authored-by: asukaminato0721 <30024051+asukaminato0721@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] add basedpyright to do type check
Add basedpyright type checking infrastructure to dify-official-plugins
Sep 30, 2025
Contributor
|
/gemini review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements comprehensive type checking infrastructure using
basedpyrightfor the dify-official-plugins repository, mirroring the type checking setup from the main Dify repository.Overview
Adds static type checking capabilities to improve code quality and catch type-related bugs during development and CI/CD processes.
Changes Made
Core Infrastructure
pyproject.toml- Root configuration with basedpyright development dependencypyrightconfig.json- Type checking configuration optimized for plugin developmentdev/basedpyright-check- Cross-platform executable script supporting bothuvand direct Python executionMakefile- Development targets for type checking, linting, and other common tasksCI/CD Integration
.github/workflows/type-check.yml- Dedicated type checking workflow.github/workflows/pre-check-plugin.yaml- Integrated type checking into existing plugin validationDocumentation
DEVELOPMENT.md- Comprehensive development guide covering type checking, setup, and best practicesREADME.md- Added development section with quick start commands.gitignore- Excludes type checking artifactsKey Features
Flexible Execution
The type checking infrastructure works in multiple environments:
Sensible Configuration
The pyrightconfig.json is tuned for plugin development:
CI Integration
Type checking automatically runs on:
Testing
The implementation has been verified with existing plugins:
Benefits
Usage for Developers
Quick start:
This implementation follows the same patterns and configuration philosophy as the main Dify repository, ensuring consistency across the ecosystem while being tailored for the unique requirements of plugin development.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
astral.shcurl -LsSf REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.