Skip to content

Commit

Permalink
Merge pull request #193 from jond01/task/replace-black-with-ruff
Browse files Browse the repository at this point in the history
Replace black with ruff formatter
  • Loading branch information
jond01 authored Apr 27, 2024
2 parents 814b3a7 + ba530bb commit 8bdb97c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
env:
CACHE_DIR: /opt/.cache
PRE_COMMIT_HOME: /opt/.cache/pre-commit
BLACK_CACHE_DIR: /opt/.cache/black
RUFF_CACHE_DIR: /opt/.cache/ruff
MYPY_CACHE_DIR: /opt/.cache/mypy
steps:
Expand Down
5 changes: 1 addition & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ repos:
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/psf/black
rev: 24.4.1
hooks:
- id: black
- id: ruff-format
- repo: local
hooks:
- id: mypy
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ You need to run this command only once.
Every time you commit, the pre-commit hooks will run and validate your code to make
sure it complies with the project's standards. The hooks include the following
checks:
- `black`: code formatting
- `ruff`: code linting and formatting
- `mypy`: type checking
- `pylint` and `ruff`: code quality
- `pylint`: code quality

The full list of hooks can be found in the `.pre-commit-config.yaml` file.

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/charliermarsh/ruff)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def test_something():
Based on:
https://github.com/best-doctor/pytest_network
"""

import socket
from collections.abc import Iterator
from typing import NoReturn
Expand Down

0 comments on commit 8bdb97c

Please sign in to comment.