Skip to content

Commit

Permalink
ci: adopt ruff format for formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
roeap authored and wjones127 committed Nov 12, 2023
1 parent 1368a78 commit 2b913b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
8 changes: 4 additions & 4 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ format: ## Format the code
$(info --- Rust format ---)
cargo fmt
$(info --- Python format ---)
black .
ruff . --fix
ruff format .

.PHONY: check-rust
check-rust: ## Run check on Rust
Expand All @@ -65,9 +65,9 @@ check-rust: ## Run check on Rust

.PHONY: check-python
check-python: ## Run check on Python
$(info Check Python black)
black --check --diff .
$(info Check Python ruff)
$(info Check Python format)
ruff format --check --diff .
$(info Check Python linting)
ruff check .
$(info Check Python mypy)
mypy
Expand Down
3 changes: 1 addition & 2 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ pandas = [
]
devel = [
"mypy",
"black",
"ruff",
"ruff>=0.1.5",
"packaging>=20",
"pytest",
"pytest-mock",
Expand Down
4 changes: 1 addition & 3 deletions python/tests/test_table_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ def test_read_simple_table_file_sizes_failure():
x: [-1 for item in x] if x == "size_bytes" else y
for x, y in add_actions.items()
}
dt.get_add_actions = lambda: SimpleNamespace(
to_pydict=lambda: add_actions_modified
) # type:ignore
dt.get_add_actions = lambda: SimpleNamespace(to_pydict=lambda: add_actions_modified) # type:ignore

with pytest.raises(OSError, match="Cannot seek past end of file."):
dt.to_pyarrow_dataset().to_table().to_pydict()
Expand Down

0 comments on commit 2b913b3

Please sign in to comment.