Fix typos (#899)
This commit is contained in:
parent
19dd02314e
commit
7cfa3b68c5
|
@ -596,7 +596,7 @@ Changes
|
|||
`#349 <https://github.com/python-attrs/attrs/issues/349>`_
|
||||
- The order of attributes that are passed into ``attr.make_class()`` or the *these* argument of ``@attr.s()`` is now retained if the dictionary is ordered (i.e. ``dict`` on Python 3.6 and later, ``collections.OrderedDict`` otherwise).
|
||||
|
||||
Before, the order was always determined by the order in which the attributes have been defined which may not be desirable when creating classes programatically.
|
||||
Before, the order was always determined by the order in which the attributes have been defined which may not be desirable when creating classes programmatically.
|
||||
|
||||
`#300 <https://github.com/python-attrs/attrs/issues/300>`_,
|
||||
`#339 <https://github.com/python-attrs/attrs/issues/339>`_,
|
||||
|
@ -608,7 +608,7 @@ Changes
|
|||
- Setting the cell type is now completely best effort.
|
||||
This fixes ``attrs`` on Jython.
|
||||
|
||||
We cannot make any guarantees regarding Jython though, because our test suite cannot run due to dependency incompatabilities.
|
||||
We cannot make any guarantees regarding Jython though, because our test suite cannot run due to dependency incompatibilities.
|
||||
|
||||
`#321 <https://github.com/python-attrs/attrs/issues/321>`_,
|
||||
`#334 <https://github.com/python-attrs/attrs/issues/334>`_
|
||||
|
|
|
@ -54,7 +54,7 @@ Because according to the definition_ from the official Python docs, the returned
|
|||
|
||||
#. The hash of an object **must not** change.
|
||||
|
||||
If you create a class with ``@attr.s(frozen=True)`` this is fullfilled by definition, therefore ``attrs`` will write a ``__hash__`` function for you automatically.
|
||||
If you create a class with ``@attr.s(frozen=True)`` this is fulfilled by definition, therefore ``attrs`` will write a ``__hash__`` function for you automatically.
|
||||
You can also force it to write one with ``hash=True`` but then it's *your* responsibility to make sure that the object is not mutated.
|
||||
|
||||
This point is the reason why mutable structures like lists, dictionaries, or sets aren't hashable while immutable ones like tuples or frozensets are:
|
||||
|
|
|
@ -345,7 +345,7 @@ And for that ``attrs`` offers three means:
|
|||
Pre Init
|
||||
~~~~~~~~
|
||||
|
||||
The sole reason for the existance of ``__attrs_pre_init__`` is to give users the chance to call ``super().__init__()``, because some subclassing-based APIs require that.
|
||||
The sole reason for the existence of ``__attrs_pre_init__`` is to give users the chance to call ``super().__init__()``, because some subclassing-based APIs require that.
|
||||
|
||||
.. doctest::
|
||||
|
||||
|
|
|
@ -868,7 +868,7 @@ class _ClassBuilder(object):
|
|||
slot_names = [name for name in names if name not in base_names]
|
||||
# There are slots for attributes from current class
|
||||
# that are defined in parent classes.
|
||||
# As their descriptors may be overriden by a child class,
|
||||
# As their descriptors may be overridden by a child class,
|
||||
# we collect them here and update the class dict
|
||||
reused_slots = {
|
||||
slot: slot_descriptor
|
||||
|
|
|
@ -235,7 +235,7 @@ class TestTransformAttrs(object):
|
|||
"""
|
||||
Converts all attributes, including base class' attributes, if `kw_only`
|
||||
is provided. Therefore, `kw_only` allows attributes with defaults to
|
||||
preceed mandatory attributes.
|
||||
precede mandatory attributes.
|
||||
|
||||
Updates in the subclass *don't* affect the base class attributes.
|
||||
"""
|
||||
|
|
|
@ -490,7 +490,7 @@ class TestClosureCellRewriting(object):
|
|||
def test_code_hack_failure(self, monkeypatch):
|
||||
"""
|
||||
Keeps working if function/code object introspection doesn't work
|
||||
on this (nonstandard) interpeter.
|
||||
on this (nonstandard) interpreter.
|
||||
|
||||
A warning is emitted that points to the actual code.
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue