Skip to content

Commit

Permalink
Merge pull request #65 from hartwork/migrate-from-yapf-to-ruff-format
Browse files Browse the repository at this point in the history
Migrate from yapf to ruff format
  • Loading branch information
hartwork authored Oct 19, 2024
2 parents 0d6a169 + 1149727 commit 3f31b67
Show file tree
Hide file tree
Showing 7 changed files with 329 additions and 288 deletions.
2 changes: 0 additions & 2 deletions .flake8

This file was deleted.

2 changes: 0 additions & 2 deletions .isort.cfg

This file was deleted.

27 changes: 6 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
# with sandwine. If not, see <https://www.gnu.org/licenses/>.

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.18.0
hooks:
- id: pyupgrade
args: ['--py39-plus']

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
Expand All @@ -31,19 +25,10 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/google/yapf
rev: v0.40.2
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
hooks:
- id: yapf
additional_dependencies:
- toml
- id: ruff
args:
- --fix
- id: ruff-format
6 changes: 0 additions & 6 deletions .style.yapf

This file was deleted.

12 changes: 12 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
indent-width = 4
line-length = 100
target-version = "py39"

[lint]
select = [
"E", # pycodestyle
"F", # Pyflakes + flake8
"I", # isort
"UP", # pyupgrade
"W", # pycodestyle
]
Loading

0 comments on commit 3f31b67

Please sign in to comment.