Skip to content

Commit

Permalink
🚨 add ruff linter
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Feb 12, 2024
1 parent 31ecc7b commit d9ef936
Show file tree
Hide file tree
Showing 5 changed files with 377 additions and 403 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Ruff Lint

on:
push:
branches:
- master
pull_request:

jobs:
ruff:
name: Ruff Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run Ruff Lint
uses: chartboost/ruff-action@v1
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ ci:
autoupdate_schedule: monthly
autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks"
repos:
- repo: https://github.com/hadialqattan/pycln
rev: v2.4.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.0
hooks:
- id: pycln
args: [--config, pyproject.toml]
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
stages: [commit]

- repo: https://github.com/pycqa/isort
Expand Down
4 changes: 2 additions & 2 deletions nonebot_plugin_apscheduler/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import logging

from nonebot import get_driver
from nonebot.plugin import PluginMetadata
from nonebot.log import LoguruHandler, logger
from nonebot import get_driver, get_plugin_config
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from nonebot.plugin import PluginMetadata, get_plugin_config

from .config import Config

Expand Down
Loading

0 comments on commit d9ef936

Please sign in to comment.