feat(plugin): 支持在运行时读取插件类的泛型参数以获取初始化状态和插件配置类 #103
Workflow file for this run
This file contains 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
name: Lint | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "**.py" | |
pull_request: | |
paths: | |
- "**.py" | |
workflow_dispatch: | |
jobs: | |
black: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: psf/black@stable | |
ruff: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: chartboost/ruff-action@v1 | |
pylint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pdm-project/setup-pdm@v3 | |
name: Setup PDM | |
with: | |
python-version: 3.9 | |
cache: true | |
- name: Install dependencies | |
run: pdm install -G dev -G lint | |
- run: | | |
eval $(pdm venv activate) | |
pylint alicebot packages/* | |
pyright: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pdm-project/setup-pdm@v3 | |
name: Setup PDM | |
with: | |
python-version: 3.9 | |
cache: true | |
- name: Install dependencies | |
run: pdm install -G dev -G lint -G typing -G test | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: ^6.10.0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "16" | |
cache: "pnpm" | |
- run: pnpm install | |
shell: bash | |
- run: | | |
eval $(pdm venv activate) | |
pnpm run pyright | |
mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pdm-project/setup-pdm@v3 | |
name: Setup PDM | |
with: | |
python-version: 3.9 | |
cache: true | |
- name: Install dependencies | |
run: pdm install -G dev -G lint -G typing -G test | |
- run: | | |
eval $(pdm venv activate) | |
mypy . |