Skip to content

Commit 3b5ade3

Browse files
Add a spellchecker (#328)
* Add a spellchecker * Reduce diff in pre-commit config file
1 parent fa4581c commit 3b5ade3

File tree

7 files changed

+18
-9
lines changed

7 files changed

+18
-9
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ repos:
1414
- id: ruff
1515
args: ["--fix"]
1616
- id: ruff-format
17+
- repo: https://github.com/codespell-project/codespell
18+
rev: v2.4.1
19+
hooks:
20+
- id: codespell
21+
additional_dependencies:
22+
- tomli

docs/customize-pins-metadata.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Create consistent metadata for pins
33
jupyter: python3
44
---
55

6-
The `metadata` argument in pins is flexible and can hold any kind of metadata that you can formulate as a `dict` (convertable to JSON).
6+
The `metadata` argument in pins is flexible and can hold any kind of metadata that you can formulate as a `dict` (convertible to JSON).
77
In some situations, you may want to read and write with _consistent_ customized metadata;
88
you can create functions to wrap [](`~pins.boards.BaseBoard.pin_write`) and [](`~pins.boards.BaseBoard.pin_read`) for your particular use case.
99

pins/boards.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def pin_read(self, name, version: str | None = None, hash: str | None = None):
196196
A specific pin version to retrieve.
197197
hash:
198198
A hash used to validate the retrieved pin data. If specified, it is
199-
compared against the `pin_hash` field retrived by [](`~pins.boards.BaseBoard.pin_meta`).
199+
compared against the `pin_hash` field retrieved by [](`~pins.boards.BaseBoard.pin_meta`).
200200
201201
"""
202202
meta = self.pin_fetch(name, version)
@@ -260,7 +260,7 @@ def _pin_store(
260260

261261
pin_name = self.path_to_pin(name)
262262

263-
# Pre-emptively fetch the most recent pin's meta if it exists - this is used
263+
# Preemptively fetch the most recent pin's meta if it exists - this is used
264264
# for the force_identical_write check
265265
abort_if_identical = not force_identical_write and self.pin_exists(name)
266266
if abort_if_identical:
@@ -415,7 +415,7 @@ def pin_download(self, name, version=None, hash=None) -> Sequence[str]:
415415
A specific pin version to retrieve.
416416
hash:
417417
A hash used to validate the retrieved pin data. If specified, it is
418-
compared against the `pin_hash` field retrived by [](`~pins.boards.BaseBoard.pin_meta`).
418+
compared against the `pin_hash` field retrieved by [](`~pins.boards.BaseBoard.pin_meta`).
419419
420420
"""
421421

pins/rsconnect/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def delete_content_item(self, guid: str) -> None:
335335
Note that this method returns None if successful. Otherwise, it raises an error.
336336
"""
337337

338-
# if deletion is sucessful, then it will return an empty body, so we
338+
# if deletion is successful, then it will return an empty body, so we
339339
# need to check the response manually.
340340
r = self.query_v1(f"content/{guid}", "DELETE", return_request=True)
341341

pins/rsconnect/fs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
def _not_impl_args_kwargs(args, kwargs):
2828
return NotImplementedError(
29-
"Additional args and kwargs not supported." f"\nArgs: {args}\nKwargs: {kwargs}"
29+
f"Additional args and kwargs not supported.\nArgs: {args}\nKwargs: {kwargs}"
3030
)
3131

3232

@@ -209,7 +209,7 @@ def put(
209209

210210
if not (Path(lpath) / "manifest.json").exists():
211211
# TODO(question): does R pins copy content to tmp directory, or
212-
# insert mainfest.json into the source directory?
212+
# insert manifest.json into the source directory?
213213
cls_manifest.add_manifest_to_directory(lpath)
214214

215215
bundle = self.api.post_content_bundle(content["guid"], lpath)

pins/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def http_example_board_path():
4141
# backend = BoardBuilder("s3")
4242
# yield backend.create_tmp_board(str(PATH_TO_EXAMPLE_BOARD.absolute())).board
4343
# backend.teardown()
44-
# TODO: could putting it in a publically available bucket folder
44+
# TODO: could putting it in a publicly available bucket folder
4545
return (
4646
"https://raw.githubusercontent.com/machow/pins-python/main/pins/tests/pins-compat"
4747
)

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ universal = 1
8181
[tool.pytest.ini_options]
8282
markers = [
8383
"fs_file: mark test to only run on local filesystem",
84-
"fs_s3: mark test to only run on AWS S3 bucket filesytem",
84+
"fs_s3: mark test to only run on AWS S3 bucket filesystem",
8585
"fs_gcs: mark test to only run on Google Cloud Storage bucket filesystem",
8686
"fs_abfs: mark test to only run on Azure Datalake filesystem",
8787
"fs_rsc: mark test to only run on Posit Connect filesystem",
@@ -127,3 +127,6 @@ ignore = [
127127
"E501", # Line too long
128128
"A002", # The pins interface includes builtin names in args, e.g. hash, id, etc.
129129
]
130+
131+
[tool.codespell]
132+
skip = ["*.js"]

0 commit comments

Comments
 (0)