Skip to content

Commit b4a910e

Browse files
doc : docstrings updated
1 parent f87a936 commit b4a910e

File tree

5 files changed

+19
-17
lines changed

5 files changed

+19
-17
lines changed

orangetool/orangetool_display.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ def hdmi_size(v=None, h=None, debug=False):
5353
Change hdmi display resolution (need sudo -s) (if call without any argument return current resolution).
5454
5555
:param v: vertical line
56+
:type v : int
5657
:param h: horizontal line
58+
:type h: int
5759
:param debug: flag for using debug mode
58-
:type v : int
59-
:type h:int
6060
:type debug:bool
6161
:return: bool
6262
"""

orangetool/orangetool_ip.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ def internet(host="8.8.8.8", port=53, timeout=3):
1414
Check internet connections.
1515
1616
:param host: the host that check connection to
17-
:param port: port that check connection with
18-
:param timeout: times that check the connection
1917
:type host:str
18+
:param port: port that check connection with
2019
:type port:int
20+
:param timeout: times that check the connection
2121
:type timeout:int
2222
:return bool: True if Connection is Stable
2323
>>> internet() # if there is stable internet connection
@@ -89,12 +89,12 @@ def set_ip(ip, restart=False, device="eth0", debug=False):
8989
"""
9090
Set static ip in interfaces file (need sudo).
9191
92+
:param ip: static ip
93+
:type ip :str
9294
:param restart : restart flag
9395
:type restart : bool
9496
:param device: network device name
9597
:type device:str
96-
:param ip: static ip
97-
:type ip :str
9898
:param debug: flag for using debug mode
9999
:type debug:bool
100100
:return: True in successful
@@ -133,10 +133,10 @@ def ping(ip, packet_number=3, debug=False):
133133
Ping ip and return True if this ip is available and False otherwise.
134134
135135
:param ip: target ip
136-
:param packet_number: number of packet to size
137-
:param debug: flag for using debug mode
138136
:type ip :str
137+
:param packet_number: number of packet to size
139138
:type packet_number:int
139+
:param debug: flag for using debug mode
140140
:type debug:bool
141141
:return: a boolean value (True if ip is available and False otherwise)
142142
"""

orangetool/orangetool_ram.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def ram_percent():
6969
"""
7070
Return available ram percentage.
7171
72-
:return: availabe ram percentage as string with %
72+
:return: available ram percentage as string with %
7373
"""
7474
response = list(psutil.virtual_memory())
7575
return str(response[2]) + " %"
@@ -81,7 +81,7 @@ def freeup(debug=False):
8181
8282
:param debug: flag for using debug mode
8383
:type debug:bool
84-
:return: Amount of freeuped ram as string and converted by convert_bytes()
84+
:return: amount of freeuped ram as string and converted by convert_bytes()
8585
"""
8686
try:
8787
RAM_before = int(ram_free(convert=False))

orangetool/orangetool_storage.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ def mount_status(device_name, debug=False):
1010
"""
1111
Return addresses of mounted memory devices in dev by device name.
1212
13+
:param device_name: name of device
14+
:type device_name: str
1315
:param debug: flag for using debug mode
1416
:type debug:bool
1517
:return: list of memory devices
@@ -124,10 +126,10 @@ def mount(device_name, mount_address=None, debug=False):
124126
Mount memory devices by addresses.
125127
126128
:param device_name: name of device for mounted example = sda1
127-
:param mount_address: address for mounting device example = /mnt/usb , default value is None in this case function generate random number for mount folder name
128-
:param debug: flag for using debug mode
129129
:type device_name:str
130+
:param mount_address: address for mounting device example = /mnt/usb , default value is None in this case function generate random number for mount folder name
130131
:type mount_address:str
132+
:param debug: flag for using debug mode
131133
:type debug:bool
132134
:return: True if device mount correctly and False other wise
133135
"""

orangetool/orangetool_system.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ def get_temp(zone=0, debug=False):
3232
"""
3333
Read cpu temperature.
3434
35-
:param debug : flag for using debug mode
3635
:param zone : thermal zone index
37-
:type debug:bool
3836
:type zone:int
37+
:param debug : flag for using debug mode
38+
:type debug:bool
3939
:return: board temp as string in celsius
4040
"""
4141
try:
@@ -137,12 +137,12 @@ def wakeup(day=0, hour=0, minute=0, debug=False):
137137
Set wakeup time for kernel RTC (need sudo).
138138
139139
:param day: days for wakeup
140-
:param hour: hout for wakeup
141-
:param minute: minute for wakeup
142-
:param debug: flag for using debug mode
143140
:type day:int
141+
:param hour: hour for wakeup
144142
:type hour:int
143+
:param minute: minute for wakeup
145144
:type minute:int
145+
:param debug: flag for using debug mode
146146
:type debug:bool
147147
:return: bool
148148
"""

0 commit comments

Comments
 (0)