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

Bump ruff from 0.1.13 to 0.1.14 #8

Merged
merged 5 commits into from
Jan 25, 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
16 changes: 16 additions & 0 deletions .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Auto Author Assign

on:
pull_request_target:
types: [ opened, reopened ]

permissions:
pull-requests: write

jobs:
assign-author:
runs-on: [self-hosted, small]
timeout-minutes: 30
if: ${{ !github.event.pull_request.assignee }}
steps:
- uses: toshimaru/[email protected]
43 changes: 43 additions & 0 deletions .github/workflows/auto-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Format code
on:
pull_request:
push:
branches:
- 'master'

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
format_backend:
name: Format with ruff
runs-on: [ self-hosted, small ]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Install Poetry
run: pipx install poetry==$(head -n 1 .poetry-version)

- uses: actions/setup-python@v5
with:
python-version-file: '.python-version'
cache: 'poetry'

- name: Install dependencies
run: poetry install --only main,dev --no-interaction --no-ansi

- run: poetry run ruff --fix --unsafe-fixes --preview --exit-zero .
- run: poetry run ruff format .

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
fetch: false
default_author: github_actions
message: 'Backend: Auto format'
add: '.'
39 changes: 20 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ structlog = ">=23.1.0"
voluptuous = "^0.14.1"

[tool.poetry.group.dev.dependencies]
black = "^23.3.0"
mypy = "^1.4.1"
ruff = "^0.1.13"
ruff = "^0.1.14"
types-pytz = ">=2023.3.0.0"

[build-system]
Expand Down
4 changes: 2 additions & 2 deletions stepic_plugins/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
)

__all__ = [
"PluginError",
"FormatError",
"PluginError",
"PluginTimeoutError",
"QuizSetUpError",
"UnknownPluginError",
"PluginTimeoutError",
]
2 changes: 1 addition & 1 deletion stepik_plugins_client/rpcapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import oslo_messaging as messaging
from oslo_config import cfg
from oslo_messaging.rpc.client import _client_opts
from oslo_messaging.rpc.client import _client_opts # noqa: PLC2701

from stepik_plugins_client.schema import RPCSerializer

Expand Down