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

chore: update ruff for v0.8.0 #1225

Merged
merged 2 commits into from
Nov 25, 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
8 changes: 1 addition & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ repos:
- id: blacken-docs
additional_dependencies: [black==24.*]

- repo: https://github.com/aio-libs/sort-all
rev: "v1.3.0"
hooks:
- id: sort-all
types: [file, python]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.4"
rev: "v0.8.0"
hooks:
- id: ruff
types: [file, python]
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions changelog/1225.contributor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Dropped `sort-all <https://github.com/aio-libs/sort-all>`__ ``pre-commit`` hook, as
`ruff 0.8.0 <https://github.com/astral-sh/ruff/releases/tag/0.8.0>`__ stabilized the
`unsorted-dunder-all <https://docs.astral.sh/ruff/rules/unsorted-dunder-all/>`__
(``RUF022``) preview rule. (:user:`bjlittle`)
5 changes: 0 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,6 @@ preview = false
# Allow information-source (U+2139) which could be confused for "i".
allowed-confusables = ["ℹ"]
ignore = [
# flake8-annotations (ANN)
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN101", # Missing type annotation for 'self' in method.
"ANN102", # Missing type annotation for 'cls' in classmethod.
bjlittle marked this conversation as resolved.
Show resolved Hide resolved

# flake8-commas (COM)
# https://docs.astral.sh/ruff/rules/#flake8-commas-com
"COM812", # Trailing comma missing.
Expand Down
2 changes: 1 addition & 1 deletion src/geovista/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"BRIDGE_CLEAN",
"NAME_CELLS",
"NAME_POINTS",
"PathLike",
"RIO_SIEVE_SIZE",
"PathLike",
"Shape",
"Transform",
]
Expand Down
4 changes: 2 additions & 2 deletions src/geovista/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@
"GV_REMESH_POINT_IDS",
"JUPYTER_BACKEND",
"LRU_CACHE_SIZE",
"MixinStrEnum",
"PERIOD",
"Preference",
"RADIUS",
"REMESH_JOIN",
"REMESH_SEAM",
Expand All @@ -58,6 +56,8 @@
"WRAP_RTOL",
"ZLEVEL_SCALE",
"ZTRANSFORM_FACTOR",
"MixinStrEnum",
"Preference",
"active_kernel",
"cast_UnstructuredGrid_to_PolyData",
"distance",
Expand Down
2 changes: 1 addition & 1 deletion src/geovista/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@

__all__ = [
"CUT_OFFSET",
"MeridianSlice",
"SPLINE_N_POINTS",
"MeridianSlice",
"SliceBias",
"add_texture_coords",
"combine",
Expand Down
2 changes: 1 addition & 1 deletion src/geovista/crs.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
np = lazy.load("numpy")

__all__ = [
"WGS84",
"CRSLike",
"PlateCarree",
"WGS84",
"from_wkt",
"get_central_meridian",
"has_wkt",
Expand Down
6 changes: 3 additions & 3 deletions src/geovista/geodesic.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@
"BBOX_C",
"BBOX_RADIUS_RATIO",
"BBOX_TOLERANCE",
"BBox",
"Corners",
"ELLIPSE",
"EnclosedPreference",
"GEODESIC_NPTS",
"N_PANELS",
"PANEL_BBOX_BY_IDX",
"PANEL_IDX_BY_NAME",
"PANEL_NAME_BY_IDX",
"PREFERENCE",
"BBox",
"Corners",
"EnclosedPreference",
"line",
"npoints",
"npoints_by_idx",
Expand Down
2 changes: 1 addition & 1 deletion src/geovista/geoplotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
"COASTLINES_RTOL",
"GRATICULE_LABEL_FONT_SIZE",
"GRATICULE_SHOW_LABELS",
"OPACITY_BLACKLIST",
"GeoPlotter",
"GeoPlotterBase",
"OPACITY_BLACKLIST",
]

ADD_POINTS_STYLE: list[str, str] = ["points", "points_gaussian"]
Expand Down
2 changes: 1 addition & 1 deletion src/geovista/gridlines.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
__all__ = [
"GRATICULE_CLOSED_INTERVAL",
"GRATICULE_ZLEVEL",
"GraticuleGrid",
"LABEL_DEGREE",
"LABEL_EAST",
"LABEL_NORTH",
Expand All @@ -59,6 +58,7 @@
"LONGITUDE_STEP",
"LONGITUDE_STEP_PERIOD",
"LONGITUDE_STOP",
"GraticuleGrid",
"create_meridian_labels",
"create_meridians",
"create_parallel_labels",
Expand Down
2 changes: 1 addition & 1 deletion src/geovista/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"NCOL",
"PACKAGES_CORE",
"PACKAGES_OPTIONAL",
"TEXT_WIDTH",
"PackageLike",
"Report",
"TEXT_WIDTH",
]

# type aliases
Expand Down
6 changes: 3 additions & 3 deletions tests/core/test_slice_lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,6 @@ def test_field_data(coastlines):
metadata = dict(coastlines.field_data.items())
result = slice_lines(coastlines)
assert set(result.field_data.keys()) == set(metadata.keys())
for key in metadata:
assert id(result.field_data[key]) != id(metadata[key])
np.testing.assert_array_equal(result.field_data[key], metadata[key])
for key, value in metadata.items():
assert id(result.field_data[key]) != id(value)
np.testing.assert_array_equal(result.field_data[key], value)
Loading