Skip to content

Commit

Permalink
[doc] fix some docstrings
Browse files Browse the repository at this point in the history
Fixes #114
  • Loading branch information
lukasjuhrich committed Jul 7, 2022
1 parent 08942d3 commit d8a48d4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/hades/bin/dhcp_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def generate_leasefile_lines(
) -> str:
"""
Generate lines in dnsmasq leasefile format from an iterable.
:param leases: An iterable that yields (ExpiresAt, MAC, IPAddress,
Hostname, ClientID)-tuples
:return: An iterable of strings
Expand Down
1 change: 1 addition & 0 deletions src/hades/common/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def setup_cli_logging(program, args):
Flask and Celery are quite opinionated about logging, so this function
should probably not be called in their launchers.
:param program: The name of the program
:param args: The parsed arguments of the program with :data:`parser` or a
subparser.
Expand Down
1 change: 1 addition & 0 deletions src/hades/config/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def decorate(cls, f):
Functions are automatically decorated with :class:`classmethod`, if they
are not already an instance of :class:`classmethod` or
:class:`staticmethod`.
:param f: The function
"""
# Ensure that we have a static or class method
Expand Down
2 changes: 2 additions & 0 deletions src/hades/deputy/dhcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def send_dhcp_packet(
If no interface or IP address to send the packet from is specified, the
operating system will choose one.
:param server_ip: IP address of server.
:param packet: DHCP packet
:param from_interface: Interface to send the packet from (optional)
Expand Down Expand Up @@ -164,6 +165,7 @@ def release_dhcp_lease(
client_ip and client_mac.
An optional client identifier may also be specified.
:param server_ip: IP address of the DHCP server
:param client_ip: IP address of the DHCP client
:param client_mac: MAC address of the DHCP client
Expand Down
8 changes: 7 additions & 1 deletion src/hades/deputy/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ class HadesDeputyService(object):
"""
dbus = pkg_resources.resource_string(
__package__, 'interface.xml').decode('utf-8')
"""DBus object introspection specification"""
"""DBus object introspection specification
:meta hide-value:
"""

def __init__(self, bus: Bus, config: Config):
"""
Expand Down Expand Up @@ -331,6 +334,7 @@ def _release_dhcp_lease(
) -> str:
"""
Release an auth or unauth DHCP lease
:return:
"""
try:
Expand All @@ -349,6 +353,7 @@ def _release_dhcp_lease(
def ReleaseAuthDhcpLease(self, client_ip: str) -> str:
"""
Release an auth DHCP lease
:return:
"""
logger.info("Releasing auth DHCP lease for client %s", client_ip)
Expand All @@ -359,6 +364,7 @@ def ReleaseAuthDhcpLease(self, client_ip: str) -> str:
def ReleaseUnauthDhcpLease(self, client_ip: str) -> str:
"""
Release an auth DHCP lease
:return:
"""
logger.info("Releasing unauth DHCP lease for client %s", client_ip)
Expand Down

0 comments on commit d8a48d4

Please sign in to comment.