Skip to content

Commit

Permalink
Using pre-commit with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
alanwilter committed Oct 26, 2023
1 parent 5613599 commit 8448a9e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ repos:
rev: v0.1.2
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.2
hooks:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
[![PyPI](https://img.shields.io/pypi/v/acpype?style=plastic&logo=pypi)](https://pypi.org/project/acpype/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/acpype?style=plastic&logo=pypi)](https://pypi.org/project/acpype/#files)
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/alanwilter/acpype/.github%2Fworkflows%2Fcheck_acpype.yml?style=plastic)
[![Poetry](https://img.shields.io/endpoint?style=plastic&url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=plastic)](https://github.com/pre-commit/pre-commit)
[![Commits since release](https://img.shields.io/github/commits-since/alanwilter/acpype/2023.10.25/master?style=plastic)](https://github.com/alanwilter/acpype/commits/master)
[![Codecov](https://img.shields.io/codecov/c/github/alanwilter/acpype?style=plastic)](https://app.codecov.io/gh/alanwilter/acpype)
Expand Down
3 changes: 2 additions & 1 deletion acpype/amber_macos/dat/leap/parm/validate_torsions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
override generic torsions
"""
import os
import parmed as pmd
import sys

import parmed as pmd

if len(sys.argv) < 2:
sys.exit("%s <param_file> [<param_file> [<param_file> ...]]" % os.path.split(sys.argv[0])[1])

Expand Down
6 changes: 4 additions & 2 deletions legacy/CcpnToAcpype.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
import traceback
from shutil import rmtree

from ccpnmr.format.converters import Mol2Format # type: ignore
from ccpnmr.format.converters import PdbFormat # type: ignore
from ccpnmr.format.converters import (
Mol2Format, # type: ignore
PdbFormat, # type: ignore
)

from acpype.cli import ACTopol, elapsedTime, header

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ sphinx = ">=6"
[tool.ruff]
target-version = "py38"
line-length = 120
extend-select = ["E501", "UP", "RUF"]
extend-select = ["UP", "RUF", "I"] # "E501"
ignore = ['UP036']

[tool.pytest.ini_options]
Expand Down
2 changes: 1 addition & 1 deletion update_macos_bins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pre-commit run -a

tree -d $destination

find $destination | wc -l # 564 files, 16 dirs
find $destination | wc -l # 584 files, 16 dirs
# acpype/amber_linux
# ├── bin
# │ └── wrapped_progs
Expand Down

0 comments on commit 8448a9e

Please sign in to comment.