Skip to content

Commit

Permalink
Use ruff for lint
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Jan 31, 2024
1 parent d3f5ab2 commit b6a98bf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 23 deletions.
34 changes: 13 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: check-json
- id: trailing-whitespace
exclude: README.md

- repo: https://github.com/ambv/black
rev: 23.12.0
hooks:
- id: black
name: Blacken

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args: [--count, --show-source, --statistics]
additional_dependencies:
- flake8-bugbear==22.7.1
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: check-json
- id: trailing-whitespace
exclude: README.md

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.11
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
2 changes: 1 addition & 1 deletion src/ipyoptimade/subwidgets/filter_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def nelements(

@staticmethod
def elements(
value: Tuple[bool, Dict[str, int]]
value: Tuple[bool, Dict[str, int]],
) -> Tuple[Union[List[str], List[Tuple[str]]], List[str]]:
"""Extract included and excluded elements"""
use_all = value[0]
Expand Down
2 changes: 1 addition & 1 deletion src/ipyoptimade/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def fetch_providers(providers_urls: Union[str, List[str]] = None) -> list:


def get_versioned_base_url( # pylint: disable=too-many-branches
base_url: Union[str, dict, Link, AnyUrl]
base_url: Union[str, dict, Link, AnyUrl],
) -> str:
"""Retrieve the versioned base URL
Expand Down

0 comments on commit b6a98bf

Please sign in to comment.