Fix typos (#9424)
This commit is contained in:
@@ -895,7 +895,7 @@ class FormattedExcinfo:
|
||||
max_frames=max_frames,
|
||||
total=len(traceback),
|
||||
)
|
||||
# Type ignored because adding two instaces of a List subtype
|
||||
# Type ignored because adding two instances of a List subtype
|
||||
# currently incorrectly has type List instead of the subtype.
|
||||
traceback = traceback[:max_frames] + traceback[-max_frames:] # type: ignore
|
||||
else:
|
||||
|
||||
@@ -513,7 +513,7 @@ def _call_assertion_pass(lineno: int, orig: str, expl: str) -> None:
|
||||
|
||||
def _check_if_assertion_pass_impl() -> bool:
|
||||
"""Check if any plugins implement the pytest_assertion_pass hook
|
||||
in order not to generate explanation unecessarily (might be expensive)."""
|
||||
in order not to generate explanation unnecessarily (might be expensive)."""
|
||||
return True if util._assertion_pass else False
|
||||
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ def has_default_eq(
|
||||
|
||||
First, we check if the object's __eq__ attribute has __code__,
|
||||
if so, we check the equally of the method code filename (__code__.co_filename)
|
||||
to the default onces generated by the dataclass and attr module
|
||||
to the default one generated by the dataclass and attr module
|
||||
for dataclasses the default co_filename is <string>, for attrs class, the __eq__ should contain "attrs eq generated"
|
||||
"""
|
||||
# inspired from https://github.com/willmcgugan/rich/blob/07d51ffc1aee6f16bd2e5a25b4e82850fb9ed778/rich/pretty.py#L68
|
||||
|
||||
@@ -970,7 +970,7 @@ class Config:
|
||||
|
||||
def add_cleanup(self, func: Callable[[], None]) -> None:
|
||||
"""Add a function to be called when the config object gets out of
|
||||
use (usually coninciding with pytest_unconfigure)."""
|
||||
use (usually coinciding with pytest_unconfigure)."""
|
||||
self._cleanup.append(func)
|
||||
|
||||
def _do_configure(self) -> None:
|
||||
|
||||
@@ -23,7 +23,7 @@ class PathAwareHookProxy:
|
||||
this helper wraps around hook callers
|
||||
until pluggy supports fixingcalls, this one will do
|
||||
|
||||
it currently doesnt return full hook caller proxies for fixed hooks,
|
||||
it currently doesn't return full hook caller proxies for fixed hooks,
|
||||
this may have to be changed later depending on bugs
|
||||
"""
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ class _NodeReporter:
|
||||
def finalize(self) -> None:
|
||||
data = self.to_xml()
|
||||
self.__dict__.clear()
|
||||
# Type ignored becuase mypy doesn't like overriding a method.
|
||||
# Type ignored because mypy doesn't like overriding a method.
|
||||
# Also the return value doesn't match...
|
||||
self.to_xml = lambda: data # type: ignore[assignment]
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ class MatcherAdapter(Mapping[str, bool]):
|
||||
class Expression:
|
||||
"""A compiled match expression as used by -k and -m.
|
||||
|
||||
The expression can be evaulated against different matchers.
|
||||
The expression can be evaluated against different matchers.
|
||||
"""
|
||||
|
||||
__slots__ = ("code",)
|
||||
|
||||
@@ -1288,7 +1288,7 @@ class Pytester:
|
||||
) -> Optional[Union[Item, Collector]]:
|
||||
"""Return the collection node for name from the module collection.
|
||||
|
||||
Searchs a module collection node for a collection node matching the
|
||||
Searches a module collection node for a collection node matching the
|
||||
given name.
|
||||
|
||||
:param modcol: A module collection node; see :py:meth:`getmodulecol`.
|
||||
|
||||
@@ -1655,7 +1655,7 @@ class Function(PyobjMixin, nodes.Item):
|
||||
# this will be redeemed later
|
||||
for mark in callspec.marks:
|
||||
# feel free to cry, this was broken for years before
|
||||
# and keywords cant fix it per design
|
||||
# and keywords can't fix it per design
|
||||
self.keywords[mark.name] = mark
|
||||
self.own_markers.extend(normalize_mark_list(callspec.marks))
|
||||
if keywords:
|
||||
|
||||
Reference in New Issue
Block a user