Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: reformat Python code via ruff #33

Merged
merged 3 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# introduced `ruff format`
e36601b92ad2354ade13​4288d9e097a098513a64
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ concurrency:
cancel-in-progress: true

jobs:

format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
args: 'format --check'

tests:
name: "Python ${{ matrix.python }} on ${{ matrix.os }}"
runs-on: "${{ matrix.os }}-${{ matrix.os-version || 'latest' }}"
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
hooks:
- id: ruff-format
6 changes: 3 additions & 3 deletions cogapp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
""" Cog content generation tool.
http://nedbatchelder.com/code/cog
"""Cog content generation tool.
http://nedbatchelder.com/code/cog

Copyright 2004-2024, Ned Batchelder.
Copyright 2004-2024, Ned Batchelder.
"""

from .cogapp import Cog, CogUsageError, main
Loading
Loading