Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ __pycache__
/env*/
docs/build/
docs/source/_build
mypyc/doc/_build
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the default directory generated from running make html inside mypyc/doc/.

*.iml
/out/
.venv*/
Expand Down
2 changes: 2 additions & 0 deletions mypyc/doc/dict_operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Methods
* ``d.keys()``
* ``d.values()``
* ``d.items()``
* ``d.copy()``
* ``d.clear()``
* ``d1.update(d2: dict)``
* ``d.update(x: Iterable)``

Expand Down
4 changes: 2 additions & 2 deletions mypyc/doc/native_classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ can be assigned to (similar to using ``__slots__``)::
def method(self) -> None:
self.z = "x"

o = Cls()
o = Cls(0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allowed this piece of code to compile for me (__init__ is expecting one non-self argument).

print(o.x, o.y) # OK
o.z = "y" # OK
o.extra = 3 # Error: no attribute "extra"
Expand Down Expand Up @@ -90,7 +90,7 @@ You need to install ``mypy-extensions`` to use ``@mypyc_attr``:
Class variables
---------------

Class variables much be explicitly declared using ``attr: ClassVar``
Class variables must be explicitly declared using ``attr: ClassVar``
or ``attr: ClassVar[<type>]``. You can't assign to a class variable
through an instance. Example::

Expand Down
2 changes: 2 additions & 0 deletions mypyc/doc/str_operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Methods

* ``s1.endswith(s2: str)``
* ``s.join(x: Iterable)``
* ``s.replace(old: str, new: str)``
* ``s.replace(old: str, new: str, count: int)``
* ``s.split()``
* ``s.split(sep: str)``
* ``s.split(sep: str, maxsplit: int)``
Expand Down