Skip to content

Commit

Permalink
docs: adding spellchecking to docs (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Feb 21, 2023
1 parent 538b280 commit aecc202
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/API/throttler.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ called; it is useful when the callback is expensive.
*Debouncing* means waiting
for a period of time to pass *before* calling the callback; it is useful when
you'd like to wait a moment to see if a user might do additional actions (say,
moving a slider or typing in a text field) before "comitting" to calling the
moving a slider or typing in a text field) before "committing" to calling the
callback.

::: psygnal.throttled
Expand Down
4 changes: 2 additions & 2 deletions docs/dataclasses.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ print(john) # prints: Person(name='John', age=30)

### ... in third-party libraries

There are multiple hird-party libraries that also implement this pattern, or
There are multiple third-party libraries that also implement this pattern, or
something similar:

- [pydantic](https://pydantic-docs.helpmanual.io/) provides a
Expand Down Expand Up @@ -268,7 +268,7 @@ john.age = 31 # prints: John's age changed to 31.
```

You can also connect to the `SignalGroup` itself to listen to *any*
changes on the obect:
changes on the object:

```python
from psygnal import EmissionInfo
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ In addition to the `Signal` object, psygnal contains:
- an ["evented" pydantic model](API/model.md) that emits signals whenever a model field changes
- [throttling/debouncing](API/throttler.md) decorators
- an experimental ["evented object proxy"](API/proxy.md)
- a few other [utilties](API/utilities.md) for dealing with events.
- a few other [utilities](API/utilities.md) for dealing with events.

## Installation

Expand Down
11 changes: 9 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,17 @@ plugins:
# show_bases: true
# group_by_category: true
# heading_level: 2
members_order: alphabetical # alphabetical/source
members_order: alphabetical # alphabetical/source

## experimental
# separate_signature: false
# line_length: 60
# show_submodules: true
docstring_section_style: list # or table/list/spacy
docstring_section_style: list # or table/list/spacy
- spellcheck:
backends: # the backends you want to use
- codespell: # or nested configs
dictionaries: [clear, rare]

# known_words can also be a list of words
# known_words: known_words.txt
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ docs = [
"mkdocs==1.4.2",
"mkdocstrings-python==0.8.3",
"mkdocstrings==0.20.0",
"mkdocs-spellcheck[all]"
]
proxy = ["wrapt"]
pydantic = ["pydantic"]
Expand Down
12 changes: 6 additions & 6 deletions src/psygnal/_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Signal:
This is class implements the [descriptor
protocol](https://docs.python.org/3/howto/descriptor.html#descriptorhowto)
and is designed to be used as a class attribute, with the supported signature types
provided in the contructor:
provided in the constructor:
```python
from psygnal import Signal
Expand Down Expand Up @@ -265,7 +265,7 @@ class Emitter:
signature : Optional[inspect.Signature]
The signature that this signal accepts and will emit, by default `Signature()`.
instance : Optional[Any]
An object to which this signal is bound. Normally this will be provied by the
An object to which this signal is bound. Normally this will be provided by the
`Signal.__get__` method (see above). However, an unbound `SignalInstance`
may also be created directly. by default `None`.
name : Optional[str]
Expand Down Expand Up @@ -847,7 +847,7 @@ def emit(
These arguments will be passed when calling each slot (unless the slot
accepts fewer arguments, in which case extra args will be discarded.)
check_nargs : Optional[bool]
If `False` and the provided arguments cannot be successfuly bound to the
If `False` and the provided arguments cannot be successfully bound to the
signature of this Signal, raise `TypeError`. Incurs some overhead.
by default False.
check_types : Optional[bool]
Expand Down Expand Up @@ -1004,7 +1004,7 @@ def resume(self, reducer: ReducerFunc | None = None, initial: Any = _NULL) -> No
follows: `self.emit(*functools.reduce(reducer, [(1,), (1,), (1,)]))`
initial: any, optional
intial value to pass to `functools.reduce`
initial value to pass to `functools.reduce`
Examples
--------
Expand Down Expand Up @@ -1037,7 +1037,7 @@ def resume(self, reducer: ReducerFunc | None = None, initial: Any = _NULL) -> No
def paused(
self, reducer: ReducerFunc | None = None, initial: Any = _NULL
) -> ContextManager[None]:
"""Context manager to temporarly pause this signal.
"""Context manager to temporarily pause this signal.
Parameters
----------
Expand All @@ -1050,7 +1050,7 @@ def paused(
For example, three `emit(1)` events would be reduced and re-emitted as
follows: `self.emit(*functools.reduce(reducer, [(1,), (1,), (1,)]))`
initial: any, optional
intial value to pass to `functools.reduce`
initial value to pass to `functools.reduce`
Examples
--------
Expand Down

0 comments on commit aecc202

Please sign in to comment.