style: Remove redundant whitespaces from docstrings and comments

Cleaned up excessive indentation and unnecessary spacing in docstrings
and comments across multiple files to improve code readability and
maintain consistency.

Signed-off-by: Sven Sager <akira@narux.de>
This commit is contained in:
2026-02-12 13:57:21 +01:00
parent c338069833
commit cd64dbcd1b
3 changed files with 46 additions and 49 deletions

View File

@@ -520,9 +520,6 @@ class Device(object):
"""
Read all inputs for this device from process image.
Same see
:return: True if successfully executed
:ref: :func:`revpimodio2.modio.RevPiModIO.readprocimg()`
"""
@@ -746,7 +743,7 @@ class ModularBase(Base):
"""
Sets RS485 ErrorLimit1 to new value.
:param value: Neuer ErrorLimit1 value
:param value: New ErrorLimit1 value
"""
if self._slc_errorlimit1 is None:
raise RuntimeError("selected core item in piCtory does not support errorlimit1")
@@ -771,7 +768,7 @@ class ModularBase(Base):
"""
Sets RS485 ErrorLimit2 to new value.
:param value: Neuer ErrorLimit2 value
:param value: New ErrorLimit2 value
"""
if self._slc_errorlimit2 is None:
raise RuntimeError("selected core item in piCtory does not support errorlimit2")
@@ -1192,7 +1189,6 @@ class ModularBaseConnect_4_5(ModularBase):
exp_a5blue = exp_a1red
# Create actual IOs
"""LED A1 red."""
self.a1red = IOBase(
self,
["core.a1red", 0, 1, self._slc_led.start, exp_a1red, None, "LED_A1_RED", "0"],
@@ -1511,7 +1507,7 @@ class Compact(Base):
Class for the RevPi Compact.
Provides functions for the LEDs. IOs are accessed via the .io
object zugegriffen.
object.
"""
__slots__ = (
@@ -1536,7 +1532,7 @@ class Compact(Base):
"""Prepare Core class."""
super()._devconfigure()
# Statische IO Verknüpfungen of the Compacts
# Link static IOs of the Compact
self._slc_led = slice(23, 24)
self._slc_temperature = slice(0, 1)
self._slc_frequency = slice(1, 2)

View File

@@ -34,7 +34,7 @@ class EventCallback(Thread):
is called on the thread.
while not th.exit.is_set():
# IO-Arbeiten
# Work with IOs
th.exit.wait(0.5)
"""
@@ -45,7 +45,7 @@ class EventCallback(Thread):
Init EventCallback class.
:param func: Function that should be called at startup
:param name: IO-Name
:param name: IO name
:param value: IO value at the time of the event
"""
super().__init__()
@@ -612,7 +612,7 @@ class ProcimgWriter(Thread):
else:
self.__dict_delay[tup_fire] -= 1
if self.__dict_delay[tup_fire] <= 0:
# Accept and delete delayed event
# Put event to queue and delete delayed event
if tup_fire[0].as_thread:
self._eventqth.put(tup_fire, False)
else:

View File

@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
"""RevPiModIO main class for network access."""
__author__ = "Sven Sager"
__copyright__ = "Copyright (C) 2023 Sven Sager"
@@ -644,9 +645,9 @@ class NetFH(Thread):
def tell(self) -> int:
"""
Returns aktuelle Position.
Returns actual position in file.
:return: Aktuelle Position
:return: Actual position in file
"""
if self.__config_changed:
raise ConfigChanged("configuration on revolution pi was changed")