Skip to content

Commit

Permalink
chore: some cleanup (#237)
Browse files Browse the repository at this point in the history
* chore: some cleanup

Signed-off-by: Henry Schreiner <[email protected]>

* style: pre-commit fixes

* chore: bump ruff

Signed-off-by: Henry Schreiner <[email protected]>

* fix: encodings and ignore

Signed-off-by: Henry Schreiner <[email protected]>

---------

Signed-off-by: Henry Schreiner <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
henryiii and pre-commit-ci[bot] authored Aug 19, 2024
1 parent 7033441 commit f00f826
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
additional_dependencies: [black==23.*]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.6"
rev: "v0.6.1"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand Down
10 changes: 5 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
content="initial-scale=1, width=device-width"
/>
<script
src="https://cdn.jsdelivr.net/pyodide/v0.25.1/full/pyodide.js"
src="https://cdn.jsdelivr.net/pyodide/v0.26.2/full/pyodide.js"
crossorigin
></script>
<!-- Production -->
Expand All @@ -19,7 +19,7 @@
crossorigin
></script>
<script
src="https://unpkg.com/@mui/material@v5.15.16/umd/material-ui.production.min.js"
src="https://unpkg.com/@mui/material@v5.16.7/umd/material-ui.production.min.js"
crossorigin
></script>
<!-- Development
Expand All @@ -32,7 +32,7 @@
crossorigin
></script>
<script
src="https://unpkg.com/@mui/material@v5.15.16/umd/material-ui.development.js"
src="https://unpkg.com/@mui/material@v5.16.7/umd/material-ui.development.js"
crossorigin
></script>
-->
Expand Down Expand Up @@ -66,8 +66,8 @@
deps={[
"repo-review~=0.11.0",
"sp-repo-review==2024.04.23",
"validate-pyproject-schema-store==2024.07.29",
"validate-pyproject[all]~=0.18.0",
"validate-pyproject-schema-store== 2024.08.19",
"validate-pyproject[all]~=0.19.0",
]}
/>,
);
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_has_tool_ruff(tmp_path: Path) -> None:
# In this example, tool.ruff is required to be present by this plugin
d = tmp_path / "some_package"
d.mkdir()
d.joinpath("pyproject.toml").write_text("[tool.ruff]")
d.joinpath("pyproject.toml").write_text("[tool.ruff]", encoding="utf-8")
processed = repo_review_processor.process(d)
assert all(r.result for r in processed.results), f"{processed.results}"
```
Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cli = [
]
test = [
"pytest >=7",
"sp-repo-review >=2023.12.21",
"sp-repo-review >=2024.04.23",
"validate-pyproject >=0.14",
]
dev = [
Expand Down Expand Up @@ -92,7 +92,6 @@ installer = "uv"
features = ["test", "cli"]
env-vars.PYTHONWARNDEFAULTENCODING = "1"


[tool.hatch.envs.lint]
dependencies = ["pre-commit"]
skip-install = true
Expand Down Expand Up @@ -181,9 +180,6 @@ messages_control.disable = [
]


[tool.ruff]
src = ["src"]

[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
Expand Down Expand Up @@ -227,3 +223,6 @@ typing-modules = ["repo_review._compat.typing"]
[tool.ruff.lint.per-file-ignores]
"src/repo_review/_compat/**.py" = ["TID251"]
"src/**/__main__.py" = ["T20"]

[tool.repo-review]
ignore = ["RF003"] # Will be flipped in next release
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def nocolor(monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.delenv("FORCE_COLOR", raising=False)


@pytest.fixture()
@pytest.fixture
def no_entry_points(monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setattr(
importlib.metadata,
Expand All @@ -18,7 +18,7 @@ def no_entry_points(monkeypatch: pytest.MonkeyPatch) -> None:
)


@pytest.fixture()
@pytest.fixture
def local_entry_points(monkeypatch: pytest.MonkeyPatch) -> None:
orig_ep = importlib.metadata.entry_points
ep1 = importlib.metadata.EntryPoint(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from repo_review.__main__ import main


@pytest.fixture()
@pytest.fixture
def multiple_packages(tmp_path: Path) -> tuple[str, str]:
packages = (tmp_path / "package_1", tmp_path / "package_2")

Expand Down
6 changes: 4 additions & 2 deletions tests/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def test_broken_validate_pyproject_object(tmp_path: Path) -> None:
[tool.repo-review.ignore]
a2 = "some message"
"""
)
),
encoding="utf-8",
)

results = process(tmp_path)
Expand All @@ -73,7 +74,8 @@ def test_working_validate_pyproject_object(tmp_path: Path) -> None:
[tool.repo-review.ignore]
PP102 = "some message"
"""
)
),
encoding="utf-8",
)

results = process(tmp_path)
Expand Down

0 comments on commit f00f826

Please sign in to comment.