Skip to content

Commit

Permalink
style: run ruff format on the whole project
Browse files Browse the repository at this point in the history
  • Loading branch information
aarcex3 committed Sep 10, 2024
1 parent ef05377 commit eb577a9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Variables
PYTHON := pdm run python
PYTEST := pdm run pytest
BLACK := pdm run black
RUFF := pdm run ruff format
FIND := find

# Directories
Expand All @@ -14,7 +14,8 @@ TEST_DIR := tests

#Format the files
format:
$(BLACK) $(SRC_DIR)
$(RUFF) $(SRC_DIR)
$(RUFF) $(TEST_DIR)

# Clean target to delete __pycache__ directories
clean:
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ lint.ignore = [
"PT",
"TD",
"PERF203", # ignore for now; investigate
"COM812",
"ISC001"
]
lint.select = ["ALL"]
# Allow unused variables when underscore-prefixed.
Expand Down
1 change: 0 additions & 1 deletion tests/test_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def runner() -> CliRunner:


def create_mock_project_structure(temp_path: Path) -> Path:

ctx = RenderingContext(app_name="app_name")
_render_jinja_dir(TEMPLATE_DIR, temp_path, ctx)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_venv_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_pip_venv_builder() -> None:
with TempDirectory() as t:
temp_path = t.as_path()
builder = PipVenvBuilder(nopip=True)
builder.install_packages = MagicMock() # type: ignore[method-assign]
builder.install_packages = MagicMock() # type: ignore[method-assign]
init_venv(temp_path, builder, ["litestar"])

assert builder.venv_path is not None
Expand Down

0 comments on commit eb577a9

Please sign in to comment.