Skip to content

Commit

Permalink
Add docstring.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehpor committed Sep 9, 2024
1 parent a0a5824 commit 2460bb7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions catkit2/testbed/testbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@
SERVICE_LIVELINESS = 5

def get_unused_port(num_ports=1):
'''Get port numbers that are unused.
Parameters
----------
num_ports : int, optional
The number of port numbers to return. By default 1.
Returns
-------
int or list of ints
The port numbers. If only a single port was requested, an
integer will be returned. Otherwise a list of integers.
'''
ports = []

with contextlib.ExitStack() as stack:
Expand Down

0 comments on commit 2460bb7

Please sign in to comment.