docs: docstring formatting

Let's use the pythonic indenting, quoting and structure in general as
specified in PEP 0257.

Change-Id: Icd0b4fbd94dabd9a163ae3f6887b236e76c486ab
This commit is contained in:
Jan Kundrát
2023-04-18 01:32:47 +02:00
parent 2a07eec966
commit 76e9146043
25 changed files with 228 additions and 277 deletions

View File

@@ -23,7 +23,7 @@ TEST_DIR = Path(__file__).parent
def test_fiber():
""" Test the accuracy of propagating the Fiber."""
"""Test the accuracy of propagating the Fiber."""
fiber = Fiber(**load_json(TEST_DIR / 'data' / 'test_science_utils_fiber_config.json'))
# fix grid spectral information generation
@@ -65,7 +65,7 @@ def test_fiber():
@pytest.mark.usefixtures('set_sim_params')
def test_raman_fiber():
""" Test the accuracy of propagating the RamanFiber."""
"""Test the accuracy of propagating the RamanFiber."""
# spectral information generation
spectral_info_input = create_input_spectral_information(f_min=191.3e12, f_max=196.1e12, roll_off=0.15,
baud_rate=32e9, power=1e-3, spacing=50e9, tx_osnr=40.0,
@@ -92,7 +92,7 @@ def test_raman_fiber():
(0.5, 81, "Lumped loss positions must be between 0 and the fiber length (80.0 km), boundaries excluded.")))
@pytest.mark.usefixtures('set_sim_params')
def test_fiber_lumped_losses(loss, position, errmsg, set_sim_params):
""" Lumped losses length sanity checking."""
"""Lumped losses length sanity checking."""
SimParams.set_params(load_json(TEST_DIR / 'data' / 'sim_params.json'))
fiber_dict = load_json(TEST_DIR / 'data' / 'test_lumped_losses_raman_fiber_config.json')
fiber_dict['params']['lumped_losses'] = [{'position': position, 'loss': loss}]
@@ -103,7 +103,7 @@ def test_fiber_lumped_losses(loss, position, errmsg, set_sim_params):
@pytest.mark.usefixtures('set_sim_params')
def test_fiber_lumped_losses_srs(set_sim_params):
""" Test the accuracy of Fiber with lumped losses propagation."""
"""Test the accuracy of Fiber with lumped losses propagation."""
# spectral information generation
spectral_info_input = create_input_spectral_information(f_min=191.3e12, f_max=196.1e12, roll_off=0.15,
baud_rate=32e9, power=1e-3, spacing=50e9, tx_osnr=40.0,