forked from python-trio/trio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request python-trio#246 from njsmith/hide-SocketType
Hide the trio.socket.SocketType class
- Loading branch information
Showing
7 changed files
with
161 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from docutils.parsers.rst import directives | ||
from sphinx import addnodes | ||
from sphinx.domains.python import PyClasslike | ||
from sphinx.ext.autodoc import ( | ||
FunctionDocumenter, MethodDocumenter, ClassLevelDocumenter, Options, | ||
) | ||
|
||
""" | ||
.. interface:: The nursery interface | ||
.. attribute:: blahblah | ||
""" | ||
|
||
class Interface(PyClasslike): | ||
def handle_signature(self, sig, signode): | ||
signode += addnodes.desc_name(sig, sig) | ||
return sig, "" | ||
|
||
def get_index_text(self, modname, name_cls): | ||
return "{} (interface in {})".format(name_cls[0], modname) | ||
|
||
def setup(app): | ||
app.add_directive_to_domain("py", "interface", Interface) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.