doc: spelling fixes

This commit is contained in:
purarue 2024-11-20 00:03:40 -08:00
parent ad55c5c345
commit 023074b9d3
22 changed files with 27 additions and 27 deletions

View file

@ -136,7 +136,7 @@ if TYPE_CHECKING:
CC = Callable[P, R] # need to give it a name, if inlined into bound=, mypy runs in a bug
PathProvider = Union[PathIsh, Callable[P, PathIsh]]
# NOTE: in cachew, HashFunction type returns str
# however in practice, cachew alwasy calls str for its result
# however in practice, cachew always calls str for its result
# so perhaps better to switch it to Any in cachew as well
HashFunction = Callable[P, Any]

View file

@ -236,7 +236,7 @@ def test_zoom() -> None:
# - very flexible, easy to adjust behaviour
# - cons:
# - can forget to assert about extra entities etc, so error prone
# - if we do something like =assert j.pop('status') == 200, j=, by the time assert happens we already popped item -- makes erro handling harder
# - if we do something like =assert j.pop('status') == 200, j=, by the time assert happens we already popped item -- makes error handling harder
# - a bit verbose.. so probably requires some helper functions though (could be much leaner than current konsume though)
# - if we assert, then terminates parsing too early, if we're defensive then inflates the code a lot with if statements
# - TODO perhaps combine warnings somehow or at least only emit once per module?

View file

@ -250,7 +250,7 @@ if __name__ == '__main__':
test()
## legacy/deprecated methods for backwards compatilibity
## legacy/deprecated methods for backwards compatibility
if not TYPE_CHECKING:
from .compat import deprecated

View file

@ -12,7 +12,7 @@ def _init_default_config() -> None:
def test_tmp_config() -> None:
## ugh. ideally this would be on the top level (would be a better test)
## but pytest imports eveything first, executes hooks, and some reset_modules() fictures mess stuff up
## but pytest imports everything first, executes hooks, and some reset_modules() fictures mess stuff up
## later would be nice to be a bit more careful about them
_init_default_config()
from my.simple import items

View file

@ -321,7 +321,7 @@ _UET = TypeVar('_UET')
_UEU = TypeVar('_UEU')
# NOTE: for historic reasons, this function had to accept Callable that retuns iterator
# NOTE: for historic reasons, this function had to accept Callable that returns iterator
# instead of just iterator
# TODO maybe deprecated Callable support? not sure
def unique_everseen(
@ -358,7 +358,7 @@ def test_unique_everseen() -> None:
assert list(unique_everseen(fun_good)) == [123]
with pytest.raises(Exception):
# since function retuns a list rather than iterator, check happens immediately
# since function returns a list rather than iterator, check happens immediately
# , even without advancing the iterator
unique_everseen(fun_bad)