Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit autoupdate #62

Merged
merged 4 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
rev: v0.6.2
hooks:
# Run the linter.
- id: ruff
Expand All @@ -27,7 +27,7 @@ repos:
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.10.0"
rev: "v1.11.2"
hooks:
- id: mypy
exclude: docs/conf.py
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies = [
"ipywidgets>=7.5",
"loguru>=0.6",
"netcdf4>=1.6.3",
"numba>=0.50",
"numba>=0.50.1",
"numpy-stl>=2.16.3",
"numpy>=1.22",
"pandas>=1.1",
Expand Down Expand Up @@ -119,7 +119,6 @@ version-file = "xcompact3d_toolbox/_version.py"

[tool.hatch.envs.default]
description = "Base development environment"
installer = "uv"
dependencies = [
"coverage[toml]>=7.5.3",
"hypothesis>=6.103.1",
Expand Down Expand Up @@ -154,7 +153,6 @@ description = "Documentation environment"
features = ["visu"]
template = "docs"
install = true
installer = "uv"
python = "3.12"
dependencies = [
"docutils==0.20.1",
Expand Down
18 changes: 8 additions & 10 deletions ruff_defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ select = [
"ARG004",
"ARG005",
"ASYNC100",
"ASYNC101",
"ASYNC102",
"ASYNC105",
"ASYNC109",
"ASYNC110",
"ASYNC115",
"ASYNC220",
"ASYNC221",
"ASYNC230",
"ASYNC251",
"B002",
"B003",
"B004",
Expand Down Expand Up @@ -98,7 +104,6 @@ select = [
"E742",
"E743",
"E902",
"E999",
"EM101",
"EM102",
"EM103",
Expand Down Expand Up @@ -242,7 +247,6 @@ select = [
"PLR0133",
"PLR0206",
"PLR0402",
"PLR1701",
"PLR1711",
"PLR1714",
"PLR1722",
Expand Down Expand Up @@ -463,11 +467,6 @@ select = [
"TID251",
"TID252",
"TID253",
"TRIO100",
"TRIO105",
"TRIO109",
"TRIO110",
"TRIO115",
"TRY002",
"TRY003",
"TRY004",
Expand Down Expand Up @@ -501,7 +500,6 @@ select = [
"UP024",
"UP025",
"UP026",
"UP027",
"UP028",
"UP029",
"UP030",
Expand Down
4 changes: 1 addition & 3 deletions xcompact3d_toolbox/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,9 +696,7 @@ def is_scalar(name):
return False
if not name.startswith(prefix):
return False
if not name[len(prefix) :].isdigit():
return False
return True
return name[len(prefix) :].isdigit()

def is_velocity(name):
return name in {"ux", "uy", "uz"}
Expand Down
4 changes: 1 addition & 3 deletions xcompact3d_toolbox/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,7 @@ def _validate_grid_size(grid_size, is_periodic):
else:
break

if size != 1:
return False
return True
return size == 1


def _get_possible_grid_values(start: int = 0, end: int = 9002, *, is_periodic: bool) -> list:
Expand Down