Skip to content

Commit

Permalink
Merge pull request #99 from brews/black_ruff
Browse files Browse the repository at this point in the history
Replace black with ruff for format checks
  • Loading branch information
brews authored Jan 4, 2024
2 parents 2fbdb6b + eed80a0 commit cd0f4fd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
- name: Install package
run: |
pip install .
- name: Format check with black
run: |
black --check .
- name: Format check with ruff
run: |
ruff check .
ruff format --diff
- name: Lint check with ruff
run: |
ruff check
- name: Type check with mypy
run: |
mypy src/dearprudence
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Check code format with `ruff` instead of `black`.

## [1.1.0] - 2023-07-25
### Changed
Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ catalog = [
"intake_esm",
]
test = [
"black",
"mypy",
"pytest",
"pytest-cov",
"ruff",
"ruff>=0.1.7",
]

[tool.hatch.version]
Expand All @@ -57,10 +56,8 @@ exclude = [
".eggs",
]
# E402: module level import not at top of file
# E501: line too long - let black worry about that
ignore = [
"E402",
"E501",
]
select = [
# Pyflakes
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
black==23.12.1
intake_esm==2023.11.10
mypy==1.8.0
pytest==7.4.4
Expand Down
2 changes: 1 addition & 1 deletion src/dearprudence/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SimpleRunMapping(TypedDict):


def _load_paramfile(
urlpath: Union[str, Union[TextIO, BinaryIO]]
urlpath: Union[str, Union[TextIO, BinaryIO]],
) -> Sequence[SimpleRunMapping]:
# First readline() to pop-off and discard the first yaml bit of
# the file, then load as JSON str. Keeps us from depending
Expand Down

0 comments on commit cd0f4fd

Please sign in to comment.