Skip to content

Commit

Permalink
Merge pull request #2153 from bjlittle/adopt-codespell
Browse files Browse the repository at this point in the history
pre-commit: adopt codespell hook
  • Loading branch information
dopplershift committed Mar 13, 2023
2 parents c3c6158 + 6dddb0b commit e413d2e
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# style: start of pre-commit and whitespace fixes
16aba40dd09fb95c85fac1a0bee0f795b9f8b5fe

# format: spell checking (#2153)
eb1dd508e087396948de5a3d20c5791500743ddf
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@ ci:
autoupdate_schedule: 'quarterly'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: "v4.0.1"
hooks:
- id: check-added-large-files
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
rev: "3.9.2"
hooks:
- id: flake8
- repo: https://github.com/codespell-project/codespell
rev: "v2.2.2"
hooks:
- id: codespell
types_or: [python, markdown, rst]
additional_dependencies: [tomli]
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ These packages are required for the full Cartopy test suite to run.
Python package for software testing.

**pytest-mpl** 0.11 or later (https://github.com/matplotlib/pytest-mpl)
Pytest plugin to faciliate image comparison for Matplotlib figures
Pytest plugin to facilitate image comparison for Matplotlib figures

**pep8** 1.3.3 or later (https://pypi.python.org/pypi/pep8)
Python package for software testing.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
# The format is a list of tuples containing the path and title.
# epub_pre_files = []

# HTML files shat should be inserted after the pages created by sphinx.
# HTML files that should be inserted after the pages created by sphinx.
# The format is a list of tuples containing the path and title.
# epub_post_files = []

Expand Down
2 changes: 1 addition & 1 deletion docs/source/whatsnew/v0.21.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Features

# set up coordinates in map projection space
map_coords = map_projection.transform_point(-175, -35, platecarree)
# Dont specifiy any args, default xycoords='data', transform=map projection
# Don't specify any args, default xycoords='data', transform=map projection
ax.annotate('default crs', map_coords, size=5)

# data in map projection using default transform, with
Expand Down
2 changes: 1 addition & 1 deletion lib/cartopy/mpl/geoaxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def set_path(self, path):
def _adjust_location(self):
if self.stale:
self.set_path(self._original_path.clip_to_bbox(self.axes.viewLim))
# Some places in matplotlib's tranform stack cache the actual
# Some places in matplotlib's transform stack cache the actual
# path so we trigger an update by invalidating the transform.
self._trans_wrap.invalidate()

Expand Down
4 changes: 2 additions & 2 deletions lib/cartopy/mpl/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def __init__(self, direction_label=True,
suitable for most use cases. To control the appearance of
tick labels use the *number_format* keyword.
dms: bool, optional
Wether or not formatting as degrees-minutes-seconds and not
Whether or not formatting as degrees-minutes-seconds and not
as decimal degrees.
minute_symbol: str, optional
The character(s) used to represent the minute symbol.
Expand Down Expand Up @@ -371,7 +371,7 @@ def __init__(self,
suitable for most use cases. To control the appearance of
tick labels use the *number_format* keyword.
dms: bool, optional
Wether or not formatting as degrees-minutes-seconds and not
Whether or not formatting as degrees-minutes-seconds and not
as decimal degrees.
minute_symbol: str, optional
The character(s) used to represent the minute symbol.
Expand Down
2 changes: 1 addition & 1 deletion lib/cartopy/tests/mpl/test_feature_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def mocked_axes(extent, projection=ccrs.PlateCarree()):
figure=mock.sentinel.figure)


# Need to initialize private renderer properties on the sentinal
# Need to initialize private renderer properties on the sentinel
mock.sentinel.renderer._raster_depth = 0
mock.sentinel.renderer._rasterizing = False

Expand Down
4 changes: 2 additions & 2 deletions lib/cartopy/tests/mpl/test_mpl_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ def test_streamplot():
@pytest.mark.natural_earth
@pytest.mark.mpl_image_compare()
def test_annotate():
""" test a variety of annotate options on mulitple projections
""" test a variety of annotate options on multiple projections
Annotate defaults to coords passed as if they're in map projection space.
`transform` or `xycoords` & `textcoords` control the marker and text offset
Expand Down Expand Up @@ -905,7 +905,7 @@ def test_annotate():

# set up coordinates in map projection space
map_coords = map_projection.transform_point(-175, -35, platecarree)
# Dont specifiy any args, default xycoords='data', transform=map projection
# Don't specify any args, default xycoords='data', transform=map projection
ax.annotate('default crs', map_coords, size=5)

# data in map projection using default transform, with
Expand Down
2 changes: 1 addition & 1 deletion lib/cartopy/tests/test_polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def _assert_bounds(self, bounds, x1, y1, x2, y2, delta=1):

class TestWrap(PolygonTests):
# Test that Plate Carree projection "does the right thing"(tm) with
# source data tha extends outside the [-180, 180] range.
# source data that extends outside the [-180, 180] range.
def test_plate_carree_no_wrap(self):
proj = ccrs.PlateCarree()
poly = sgeom.box(0, 0, 10, 10)
Expand Down
2 changes: 1 addition & 1 deletion lib/cartopy/tests/test_vector_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def test_with_scalar_field(self):

def test_with_scalar_field_non_ndarray_data(self):
# Transform and regrid vector (with no projection transform) with an
# additional scalar field wich is not a ndarray.
# additional scalar field which is not a ndarray.
expected_x_grid = np.array([[-10., -5., 0., 5., 10.],
[-10., -5., 0., 5., 10.],
[-10., -5., 0., 5., 10.]])
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ requires = [
"setuptools_scm >= 7.0.0",
]
build-backend = "setuptools.build_meta"

[tool.codespell]
ignore-words-list = "damon,koordinates,linz,slippy,subtiles,tring"
skip = "./.git,./docs/build,./docs/source/gallery,./docs/source/reference,*.cpp,*.css,*.examples,*.js,*.html,*.ipynb,*.pdf,*.rst.txt"

0 comments on commit e413d2e

Please sign in to comment.