Skip to content

Commit 8be96ab

Browse files
committed
Review doc
1 parent b8deded commit 8be96ab

File tree

8 files changed

+49
-22
lines changed

8 files changed

+49
-22
lines changed

docs/bot.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ Bot
77
:ignore-module-all:
88

99
.. autoclass:: Bot
10-
10+
.. autoclass:: BotCommand
11+
.. autoexception:: WrongArg
12+
.. autofunction:: check_args
13+
.. autofunction:: convert
14+
.. autofunction:: parse

docs/commands.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
Commands
55
--------
66
.. automodule:: irc_api.commands
7-
:members:
8-
:undoc-members:
9-
:show-inheritance:
7+
:ignore-module-all:
8+
9+
.. autodecorator:: command
10+
.. autodecorator:: channel
11+
.. autodecorator:: every
12+
.. autodecorator:: on
13+
.. autodecorator:: user
14+
.. autofunction:: auto_help
1015

docs/history.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
History
55
-------
66
.. automodule:: irc_api.history
7-
:members:
8-
:undoc-members:
9-
:show-inheritance:
7+
:ignore-module-all:
8+
9+
.. autoclass:: History

docs/irc.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
IRC
55
---
66
.. automodule:: irc_api.irc
7-
:members:
8-
:undoc-members:
9-
:show-inheritance:
7+
:ignore-module-all:
8+
9+
.. autoclass:: IRC
1010

docs/message.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
Message
55
-------
66
.. automodule:: irc_api.message
7-
:members:
8-
:undoc-members:
9-
:show-inheritance:
7+
:ignore-module-all:
8+
9+
.. autoclass:: Message

src/irc_api/bot.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ class Bot:
3535
Methods
3636
-------
3737
.. automethod:: __init__
38-
.. automethod:: start
39-
.. automethod:: send
4038
.. automethod:: add_command
39+
.. automethod:: add_commands
40+
.. automethod:: add_commands_module
41+
.. automethod:: remove_commands
42+
.. automethod:: send
43+
.. automethod:: start
4144
4245
Examples
4346
--------
@@ -232,9 +235,9 @@ class BotCommand:
232235
The description of the BotCommand. By default, the function's docstring is used.
233236
cmnd_type : int, public
234237
The type of the command.
235-
- if ``cmnd_type = 0``, the command is triggered on an event.
236-
- if ``cmnd_type = 1``, the command is a named command.
237-
- if ``cmnd_type = 2``, the command is a routine automatically triggered.
238+
* if ``cmnd_type = 0``, the command is triggered on an event.
239+
* if ``cmnd_type = 1``, the command is a named command.
240+
* if ``cmnd_type = 2``, the command is a routine automatically triggered.
238241
bot : irc_api.bot.Bot, public
239242
The bot the command belongs to.
240243
"""
@@ -253,9 +256,9 @@ def __init__(self, name: str, func, events: list, desc: str, cmnd_type: int):
253256
The description of the BotCommand. By default, the function's docstring is used.
254257
cmnd_type : int
255258
The type of the command.
256-
- if ``cmnd_type = 0``, the command is triggered on an event.
257-
- if ``cmnd_type = 1``, the command is a named command.
258-
- if ``cmnd_type = 2``, the command is a routine automatically triggered.
259+
* if ``cmnd_type = 0``, the command is triggered on an event.
260+
* if ``cmnd_type = 1``, the command is a named command.
261+
* if ``cmnd_type = 2``, the command is a routine automatically triggered.
259262
"""
260263
self.name = name
261264
self.func = func

src/irc_api/history.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ class History:
99
The content of the History.
1010
limit : int, private
1111
The maximum number of messages that the History stored.
12+
13+
Methods
14+
-------
15+
.. automethod:: add
16+
.. automethod:: get
1217
"""
1318
def __init__(self, limit: int):
1419
"""Constructor method."""

src/irc_api/irc.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,17 @@ class IRC:
2121
The IRC's socket.
2222
inbox : Queue, private
2323
Queue of the incomming messages.
24-
handler : Thread, private
24+
handler : Thread, private
25+
26+
Methods
27+
-------
28+
.. automethod:: __init__
29+
.. automethod:: connection
30+
.. automethod:: join
31+
.. automethod:: receive
32+
.. automethod:: send
33+
.. automethod:: waitfor
34+
2535
"""
2636
def __init__(self, host: str, port: int):
2737
"""Initialize an IRC wrapper.

0 commit comments

Comments
 (0)