Skip to content

Commit f588236

Browse files
Merge pull request #132 from yarikoptic/enh-codespell
Add codespell support with configuration and fixes
2 parents ced800e + 7fcbdf0 commit f588236

File tree

4 files changed

+34
-7
lines changed

4 files changed

+34
-7
lines changed

.github/workflows/codespell.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Codespell configuration is within pyproject.toml
2+
---
3+
name: Codespell
4+
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
codespell:
16+
name: Check for spelling errors
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Codespell
23+
uses: codespell-project/actions-codespell@v2

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,9 @@ exclude = [ "**/__pycache__",
9191
# test, it adds the tests/ directory to sys.path)
9292
extraPaths = ['test']
9393

94+
[tool.codespell]
95+
skip = '.git,*.html,developer-notes/'
96+
ignore-words-list = 're-use,re-used'
97+
9498
[tool.ruff.format]
9599
quote-style = "preserve"

src/pyfuse3/__init__.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def syncfs(path):
557557
'''Sync filesystem mounted at *path*
558558
559559
This is a Python interface to the syncfs(2) system call. There is no
560-
particular relation to libfuse, it is provided by pyfuse3 as a convience.
560+
particular relation to libfuse, it is provided by pyfuse3 as a convenience.
561561
'''
562562

563563
cdef int ret
@@ -791,7 +791,7 @@ def terminate():
791791
792792
When called by a thread different from the one that runs the main loop, the call must
793793
be wrapped with `trio.from_thread.run_sync`. The necessary *trio_token* argument can
794-
(for convience) be retrieved from the `trio_token` module attribute.
794+
(for convenience) be retrieved from the `trio_token` module attribute.
795795
'''
796796

797797
fuse_session_exit(session)
@@ -801,7 +801,7 @@ def terminate():
801801
def close(unmount=True):
802802
'''Clean up and ensure filesystem is unmounted
803803
804-
If *unmount* is False, only clean up operations are peformed, but the file
804+
If *unmount* is False, only clean up operations are performed, but the file
805805
system is not explicitly unmounted.
806806
807807
Normally, the filesystem is unmounted by the user calling umount(8) or

src/pyfuse3/_pyfuse3.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ async def unlink(self, parent_inode: InodeT, name: FileNameT, ctx: "RequestConte
240240
'''Remove a (possibly special) file.
241241
242242
This method must remove the (special or regular) file *name* from the
243-
direcory with inode *parent_inode*. *ctx* will be a `RequestContext`
243+
directory with inode *parent_inode*. *ctx* will be a `RequestContext`
244244
instance.
245245
246246
If the inode associated with *file* (i.e., not the *parent_inode*) has a
@@ -260,7 +260,7 @@ async def unlink(self, parent_inode: InodeT, name: FileNameT, ctx: "RequestConte
260260
async def rmdir(self, parent_inode: InodeT, name: FileNameT, ctx: "RequestContext") -> None:
261261
'''Remove directory *name*.
262262
263-
This method must remove the directory *name* from the direcory with
263+
This method must remove the directory *name* from the directory with
264264
inode *parent_inode*. *ctx* will be a `RequestContext` instance. If
265265
there are still entries in the directory, the method should raise
266266
``FUSEError(errno.ENOTEMPTY)``.
@@ -275,7 +275,7 @@ async def rmdir(self, parent_inode: InodeT, name: FileNameT, ctx: "RequestContex
275275
276276
(Since hard links to directories are not allowed by POSIX, this method
277277
is not required to check if there are still other directory entries
278-
refering to the same inode. This conveniently avoids the ambigiouties
278+
referring to the same inode. This conveniently avoids the ambiguities
279279
associated with the ``.`` and ``..`` entries).
280280
'''
281281

@@ -350,7 +350,7 @@ async def link(
350350
new_name: FileNameT,
351351
ctx: "RequestContext",
352352
) -> "EntryAttributes":
353-
'''Create directory entry *name* in *parent_inode* refering to *inode*.
353+
'''Create directory entry *name* in *parent_inode* referring to *inode*.
354354
355355
*ctx* will be a `RequestContext` instance.
356356

0 commit comments

Comments
 (0)