Willy-JL 1 éve
szülő
commit
ce5b5df1c0
38 módosított fájl, 880 hozzáadás és 797 törlés
  1. 3 3
      mp_flipper/application.fam
  2. 25 36
      mp_flipper/docs/pages/conf.py
  3. 5 5
      mp_flipper/examples/dict_test.py
  4. 11 11
      mp_flipper/examples/flipperzero_adc_test.py
  5. 19 15
      mp_flipper/examples/flipperzero_canvas_test.py
  6. 5 5
      mp_flipper/examples/flipperzero_dialog_message_test.py
  7. 10 6
      mp_flipper/examples/flipperzero_draw_on_input_test.py
  8. 7 5
      mp_flipper/examples/flipperzero_gpio_input_test.py
  9. 19 7
      mp_flipper/examples/flipperzero_gpio_interrupt_test.py
  10. 5 3
      mp_flipper/examples/flipperzero_input_test.py
  11. 7 7
      mp_flipper/examples/flipperzero_light_test.py
  12. 9 7
      mp_flipper/examples/flipperzero_speaker_note_test.py
  13. 9 7
      mp_flipper/examples/flipperzero_speaker_test.py
  14. 8 7
      mp_flipper/examples/greeter_test.py
  15. 1 1
      mp_flipper/examples/import_error_test.py
  16. 1 1
      mp_flipper/examples/import_test.py
  17. 56 53
      mp_flipper/examples/infrared_signal_viewer.py
  18. 5 5
      mp_flipper/examples/logger.py
  19. 3 3
      mp_flipper/examples/open.py
  20. 1 1
      mp_flipper/examples/overflow_test.py
  21. 1 1
      mp_flipper/examples/raise_test.py
  22. 3 3
      mp_flipper/examples/rand_test.py
  23. 60 55
      mp_flipper/examples/tic_tac_toe.py
  24. 2 2
      mp_flipper/examples/try_except_test.py
  25. 9 7
      mp_flipper/examples/uart.py
  26. 7 6
      mp_flipper/flipperzero/_adc.py
  27. 61 45
      mp_flipper/flipperzero/_canvas.py
  28. 11 8
      mp_flipper/flipperzero/_dialog.py
  29. 62 57
      mp_flipper/flipperzero/_gpio.py
  30. 20 11
      mp_flipper/flipperzero/_infrared.py
  31. 26 25
      mp_flipper/flipperzero/_input.py
  32. 24 20
      mp_flipper/flipperzero/_light.py
  33. 11 9
      mp_flipper/flipperzero/_pwm.py
  34. 224 223
      mp_flipper/flipperzero/_speaker.py
  35. 33 31
      mp_flipper/flipperzero/_uart.py
  36. 2 2
      mp_flipper/flipperzero/_vibro.py
  37. 77 74
      mp_flipper/flipperzero/io.py
  38. 38 30
      mp_flipper/flipperzero/logging.py

+ 3 - 3
mp_flipper/application.fam

@@ -40,7 +40,7 @@ App(
                 "-fsingle-precision-constant",
                 "-fsingle-precision-constant",
                 "-fno-math-errno",
                 "-fno-math-errno",
             ],
             ],
-            cincludes=["."]
+            cincludes=["."],
         ),
         ),
         Lib(
         Lib(
             name="micropython-port",
             name="micropython-port",
@@ -57,7 +57,7 @@ App(
                 "-fsingle-precision-constant",
                 "-fsingle-precision-constant",
                 "-fno-math-errno",
                 "-fno-math-errno",
             ],
             ],
-            cincludes=["."]
+            cincludes=["."],
         ),
         ),
-    ]
+    ],
 )
 )

+ 25 - 36
mp_flipper/docs/pages/conf.py

@@ -4,15 +4,17 @@ import sys
 
 
 base = pathlib.Path(__file__).parent.parent.parent
 base = pathlib.Path(__file__).parent.parent.parent
 root = base.__str__()
 root = base.__str__()
-flipperzero = base.joinpath('flipperzero').__str__()
+flipperzero = base.joinpath("flipperzero").__str__()
 
 
 sys.path.append(root)
 sys.path.append(root)
 sys.path.append(flipperzero)
 sys.path.append(flipperzero)
 
 
+
 def copy_dict(source, target):
 def copy_dict(source, target):
     for key, value in source.__dict__.items():
     for key, value in source.__dict__.items():
         target.__dict__[key] = value
         target.__dict__[key] = value
 
 
+
 import flipperzero.logging
 import flipperzero.logging
 import logging
 import logging
 
 
@@ -25,52 +27,39 @@ copy_dict(flipperzero.io, io)
 
 
 now = datetime.datetime.now()
 now = datetime.datetime.now()
 
 
-project = 'uPython'
-copyright = str(now.year) + ', Oliver Fabel'
-author = 'Oliver Fabel'
-release = '1.5.0'
-version = '1.5'
-language = 'en'
-
-extensions = [
-    'sphinx.ext.autodoc',
-    'myst_parser'
-]
-source_suffix = {
-    '.rst': 'restructuredtext',
-    '.md': 'markdown'
-}
+project = "uPython"
+copyright = str(now.year) + ", Oliver Fabel"
+author = "Oliver Fabel"
+release = "1.5.0"
+version = "1.5"
+language = "en"
 
 
-templates_path = [
-    'templates'
-]
+extensions = ["sphinx.ext.autodoc", "myst_parser"]
+source_suffix = {".rst": "restructuredtext", ".md": "markdown"}
+
+templates_path = ["templates"]
 exclude_patterns = []
 exclude_patterns = []
-include_patterns = [
-    '**'
-]
+include_patterns = ["**"]
 
 
-html_theme = 'alabaster'
+html_theme = "alabaster"
 html_theme_options = {
 html_theme_options = {
-    'show_powered_by': False,
-    'extra_nav_links': {
-        'Source Code': 'https://www.github.com/ofabel/mp-flipper',
-        'Bugtracker': 'https://www.github.com/ofabel/mp-flipper/issues',
-        'Releases': 'https://lab.flipper.net/apps/upython'
-
-    }
+    "show_powered_by": False,
+    "extra_nav_links": {
+        "Source Code": "https://www.github.com/ofabel/mp-flipper",
+        "Bugtracker": "https://www.github.com/ofabel/mp-flipper/issues",
+        "Releases": "https://lab.flipper.net/apps/upython",
+    },
 }
 }
 html_scaled_image_link = False
 html_scaled_image_link = False
 html_copy_source = False
 html_copy_source = False
 html_show_copyright = False
 html_show_copyright = False
 html_show_sphinx = False
 html_show_sphinx = False
-html_static_path = [
-    'static'
-]
-html_logo = 'assets/logo.png'
-html_favicon = 'assets/favicon.png'
+html_static_path = ["static"]
+html_logo = "assets/logo.png"
+html_favicon = "assets/favicon.png"
 
 
 autodoc_default_options = {
 autodoc_default_options = {
-    'member-order': 'bysource',
+    "member-order": "bysource",
 }
 }
 
 
 add_module_names = True
 add_module_names = True

+ 5 - 5
mp_flipper/examples/dict_test.py

@@ -1,9 +1,9 @@
 d = dict()
 d = dict()
 
 
-for i in range(1,100):
-  d[str(i)] = i
+for i in range(1, 100):
+    d[str(i)] = i
 
 
-for k,v in d.items():
-  val = '{0} = {1}'.format(k, v)
+for k, v in d.items():
+    val = "{0} = {1}".format(k, v)
 
 
-  print(val)
+    print(val)

+ 11 - 11
mp_flipper/examples/flipperzero_adc_test.py

@@ -3,18 +3,18 @@ import time
 
 
 f0.gpio_init_pin(f0.GPIO_PIN_PC1, f0.GPIO_MODE_ANALOG)
 f0.gpio_init_pin(f0.GPIO_PIN_PC1, f0.GPIO_MODE_ANALOG)
 
 
-for _ in range(1,1000):
-  raw_value = f0.adc_read_pin_value(f0.GPIO_PIN_PC1)
-  raw_voltage = f0.adc_read_pin_voltage(f0.GPIO_PIN_PC1)
-  
-  value = '{value} #'.format(value=raw_value)
-  voltage = '{value} mV'.format(value=raw_voltage)
+for _ in range(1, 1000):
+    raw_value = f0.adc_read_pin_value(f0.GPIO_PIN_PC1)
+    raw_voltage = f0.adc_read_pin_voltage(f0.GPIO_PIN_PC1)
 
 
-  f0.canvas_clear()
+    value = "{value} #".format(value=raw_value)
+    voltage = "{value} mV".format(value=raw_voltage)
 
 
-  f0.canvas_set_text(10, 32, value)
-  f0.canvas_set_text(70, 32, voltage)
+    f0.canvas_clear()
 
 
-  f0.canvas_update()
+    f0.canvas_set_text(10, 32, value)
+    f0.canvas_set_text(70, 32, voltage)
 
 
-  time.sleep_ms(10)
+    f0.canvas_update()
+
+    time.sleep_ms(10)

+ 19 - 15
mp_flipper/examples/flipperzero_canvas_test.py

@@ -3,31 +3,35 @@ import flipperzero
 
 
 color = False
 color = False
 
 
+
 def draw_action():
 def draw_action():
-  print('on draw')
+    print("on draw")
 
 
-  global color
+    global color
 
 
-  for x in range(0, 128):
-    color = not color
+    for x in range(0, 128):
+        color = not color
+
+        for y in range(0, 64):
+            flipperzero.canvas_set_color(
+                flipperzero.CANVAS_BLACK if color else flipperzero.CANVAS_WHITE
+            )
+            flipperzero.canvas_draw_dot(x, y)
 
 
-    for y in range(0, 64):
-      flipperzero.canvas_set_color(flipperzero.CANVAS_BLACK if color else flipperzero.CANVAS_WHITE)
-      flipperzero.canvas_draw_dot(x, y)
+            color = not color
+
+    color = not color
 
 
-      color = not color
-  
-  color = not color
+    flipperzero.canvas_set_text(64, 32, "Test")
 
 
-  flipperzero.canvas_set_text(64, 32, "Test")
+    flipperzero.canvas_update()
 
 
-  flipperzero.canvas_update()
 
 
-print('start')
+print("start")
 
 
 draw_action()
 draw_action()
 
 
 for _ in range(1, 5):
 for _ in range(1, 5):
-  time.sleep(1)
+    time.sleep(1)
 
 
-  draw_action()
+    draw_action()

+ 5 - 5
mp_flipper/examples/flipperzero_dialog_message_test.py

@@ -1,9 +1,9 @@
 import flipperzero as f0
 import flipperzero as f0
 
 
-f0.dialog_message_set_header('Important',64, 12)
-f0.dialog_message_set_text('Shutdown?', 64, 24)
-f0.dialog_message_set_button('Yes', f0.INPUT_BUTTON_LEFT)
-f0.dialog_message_set_button('No', f0.INPUT_BUTTON_RIGHT)
+f0.dialog_message_set_header("Important", 64, 12)
+f0.dialog_message_set_text("Shutdown?", 64, 24)
+f0.dialog_message_set_button("Yes", f0.INPUT_BUTTON_LEFT)
+f0.dialog_message_set_button("No", f0.INPUT_BUTTON_RIGHT)
 
 
 while f0.dialog_message_show() is not f0.INPUT_BUTTON_LEFT:
 while f0.dialog_message_show() is not f0.INPUT_BUTTON_LEFT:
-  pass
+    pass

+ 10 - 6
mp_flipper/examples/flipperzero_draw_on_input_test.py

@@ -1,12 +1,16 @@
 import time
 import time
 import flipperzero
 import flipperzero
 
 
+
 @flipperzero.on_input
 @flipperzero.on_input
 def on_input(button, type):
 def on_input(button, type):
-  flipperzero.canvas_clear()
-  flipperzero.canvas_set_color(flipperzero.CANVAS_BLACK)
-  flipperzero.canvas_set_text(64, 32, '{button} - {type}'.format(button=button, type=type))
-  flipperzero.canvas_update()
+    flipperzero.canvas_clear()
+    flipperzero.canvas_set_color(flipperzero.CANVAS_BLACK)
+    flipperzero.canvas_set_text(
+        64, 32, "{button} - {type}".format(button=button, type=type)
+    )
+    flipperzero.canvas_update()
+
 
 
-for _ in range(1,1000):
-  time.sleep_ms(10)
+for _ in range(1, 1000):
+    time.sleep_ms(10)

+ 7 - 5
mp_flipper/examples/flipperzero_gpio_input_test.py

@@ -2,11 +2,13 @@ import flipperzero as f0
 import time
 import time
 
 
 f0.gpio_init_pin(f0.GPIO_PIN_PA7, f0.GPIO_MODE_OUTPUT_PUSH_PULL)
 f0.gpio_init_pin(f0.GPIO_PIN_PA7, f0.GPIO_MODE_OUTPUT_PUSH_PULL)
-f0.gpio_init_pin(f0.GPIO_PIN_PC1, f0.GPIO_MODE_INPUT, f0.GPIO_PULL_UP, f0.GPIO_SPEED_HIGH)
+f0.gpio_init_pin(
+    f0.GPIO_PIN_PC1, f0.GPIO_MODE_INPUT, f0.GPIO_PULL_UP, f0.GPIO_SPEED_HIGH
+)
 
 
-for _ in range(0,15):
-  state = f0.gpio_get_pin(f0.GPIO_PIN_PC1)
+for _ in range(0, 15):
+    state = f0.gpio_get_pin(f0.GPIO_PIN_PC1)
 
 
-  f0.gpio_set_pin(f0.GPIO_PIN_PA7, state)
+    f0.gpio_set_pin(f0.GPIO_PIN_PA7, state)
 
 
-  time.sleep(1)
+    time.sleep(1)

+ 19 - 7
mp_flipper/examples/flipperzero_gpio_interrupt_test.py

@@ -3,18 +3,30 @@ import time
 
 
 # init pins
 # init pins
 f0.gpio_init_pin(f0.GPIO_PIN_PA7, f0.GPIO_MODE_OUTPUT_PUSH_PULL)
 f0.gpio_init_pin(f0.GPIO_PIN_PA7, f0.GPIO_MODE_OUTPUT_PUSH_PULL)
-f0.gpio_init_pin(f0.GPIO_PIN_PC0, f0.GPIO_MODE_INTERRUPT_RISE, f0.GPIO_PULL_UP, f0.GPIO_SPEED_VERY_HIGH)
-f0.gpio_init_pin(f0.GPIO_PIN_PC1, f0.GPIO_MODE_INTERRUPT_RISE, f0.GPIO_PULL_UP, f0.GPIO_SPEED_VERY_HIGH)
+f0.gpio_init_pin(
+    f0.GPIO_PIN_PC0,
+    f0.GPIO_MODE_INTERRUPT_RISE,
+    f0.GPIO_PULL_UP,
+    f0.GPIO_SPEED_VERY_HIGH,
+)
+f0.gpio_init_pin(
+    f0.GPIO_PIN_PC1,
+    f0.GPIO_MODE_INTERRUPT_RISE,
+    f0.GPIO_PULL_UP,
+    f0.GPIO_SPEED_VERY_HIGH,
+)
+
 
 
 @f0.on_gpio
 @f0.on_gpio
 def on_gpio(pin):
 def on_gpio(pin):
-  if pin == f0.GPIO_PIN_PC0:
-    f0.gpio_set_pin(f0.GPIO_PIN_PA7, True)
-  if pin == f0.GPIO_PIN_PC1:
-    f0.gpio_set_pin(f0.GPIO_PIN_PA7, False)
+    if pin == f0.GPIO_PIN_PC0:
+        f0.gpio_set_pin(f0.GPIO_PIN_PA7, True)
+    if pin == f0.GPIO_PIN_PC1:
+        f0.gpio_set_pin(f0.GPIO_PIN_PA7, False)
+
 
 
 for _ in range(1, 1500):
 for _ in range(1, 1500):
-  time.sleep_ms(10)
+    time.sleep_ms(10)
 
 
 # reset pins
 # reset pins
 f0.gpio_init_pin(f0.GPIO_PIN_PA7, f0.GPIO_MODE_ANALOG)
 f0.gpio_init_pin(f0.GPIO_PIN_PA7, f0.GPIO_MODE_ANALOG)

+ 5 - 3
mp_flipper/examples/flipperzero_input_test.py

@@ -1,9 +1,11 @@
 import time
 import time
 import flipperzero
 import flipperzero
 
 
+
 @flipperzero.on_input
 @flipperzero.on_input
 def on_input(button, type):
 def on_input(button, type):
-  print('{button} - {type}'.format(button=button, type=type))
+    print("{button} - {type}".format(button=button, type=type))
+
 
 
-for _ in range(1,1000):
-  time.sleep_ms(10)
+for _ in range(1, 1000):
+    time.sleep_ms(10)

+ 7 - 7
mp_flipper/examples/flipperzero_light_test.py

@@ -4,15 +4,15 @@ import flipperzero
 is_red = True
 is_red = True
 
 
 for i in range(0, 25, 1):
 for i in range(0, 25, 1):
-  brightness = i * 10
-  is_red = not is_red
+    brightness = i * 10
+    is_red = not is_red
 
 
-  flipperzero.light_set(flipperzero.LIGHT_RED, brightness if is_red else 0)
-  flipperzero.light_set(flipperzero.LIGHT_GREEN, brightness if not is_red else 0)
-  flipperzero.light_set(flipperzero.LIGHT_BLUE, 0)
-  flipperzero.light_set(flipperzero.LIGHT_BACKLIGHT, brightness)
+    flipperzero.light_set(flipperzero.LIGHT_RED, brightness if is_red else 0)
+    flipperzero.light_set(flipperzero.LIGHT_GREEN, brightness if not is_red else 0)
+    flipperzero.light_set(flipperzero.LIGHT_BLUE, 0)
+    flipperzero.light_set(flipperzero.LIGHT_BACKLIGHT, brightness)
 
 
-  time.sleep_ms(200)
+    time.sleep_ms(200)
 
 
 flipperzero.light_set(flipperzero.LIGHT_RED, 0)
 flipperzero.light_set(flipperzero.LIGHT_RED, 0)
 flipperzero.light_set(flipperzero.LIGHT_GREEN, 0)
 flipperzero.light_set(flipperzero.LIGHT_GREEN, 0)

+ 9 - 7
mp_flipper/examples/flipperzero_speaker_note_test.py

@@ -1,19 +1,21 @@
 import time
 import time
 import flipperzero as f0
 import flipperzero as f0
 
 
+
 def play_frequency(frequency: float):
 def play_frequency(frequency: float):
-  volume = 0.8
+    volume = 0.8
+
+    f0.speaker_start(frequency, volume)
 
 
-  f0.speaker_start(frequency, volume)
+    for _ in range(0, 150):
+        volume *= 0.9945679
 
 
-  for _ in range(0, 150):
-    volume *= 0.9945679
+        f0.speaker_set_volume(volume)
 
 
-    f0.speaker_set_volume(volume)
+        time.sleep_ms(1)
 
 
-    time.sleep_ms(1)
+    f0.speaker_stop()
 
 
-  f0.speaker_stop()
 
 
 play_frequency(f0.SPEAKER_NOTE_C5)
 play_frequency(f0.SPEAKER_NOTE_C5)
 play_frequency(f0.SPEAKER_NOTE_D5)
 play_frequency(f0.SPEAKER_NOTE_D5)

+ 9 - 7
mp_flipper/examples/flipperzero_speaker_test.py

@@ -1,19 +1,21 @@
 import time
 import time
 import flipperzero
 import flipperzero
 
 
+
 def play_frequency(frequency: float):
 def play_frequency(frequency: float):
-  volume = 0.8
+    volume = 0.8
+
+    flipperzero.speaker_start(frequency, volume)
 
 
-  flipperzero.speaker_start(frequency, volume)
+    for _ in range(0, 150):
+        volume *= 0.9945679
 
 
-  for _ in range(0, 150):
-    volume *= 0.9945679
+        flipperzero.speaker_set_volume(volume)
 
 
-    flipperzero.speaker_set_volume(volume)
+        time.sleep_ms(1)
 
 
-    time.sleep_ms(1)
+    flipperzero.speaker_stop()
 
 
-  flipperzero.speaker_stop()
 
 
 play_frequency(100.0)
 play_frequency(100.0)
 play_frequency(200.0)
 play_frequency(200.0)

+ 8 - 7
mp_flipper/examples/greeter_test.py

@@ -1,13 +1,14 @@
 class Greeter:
 class Greeter:
-  def __init__(self, name: str):
-    self._name = name
+    def __init__(self, name: str):
+        self._name = name
 
 
-  def __str__(self):
-    return 'hello {name}!'.format(name=self._name)
+    def __str__(self):
+        return "hello {name}!".format(name=self._name)
 
 
-  def __repr__(self):
-    return self.__str__()
+    def __repr__(self):
+        return self.__str__()
 
 
-world_greeter = Greeter('world')
+
+world_greeter = Greeter("world")
 
 
 print(world_greeter)
 print(world_greeter)

+ 1 - 1
mp_flipper/examples/import_error_test.py

@@ -1 +1 @@
-import unknown_module
+import unknown_module

+ 1 - 1
mp_flipper/examples/import_test.py

@@ -1,5 +1,5 @@
 from greeter_test import Greeter
 from greeter_test import Greeter
 
 
-buddy = Greeter('buddy')
+buddy = Greeter("buddy")
 
 
 print(buddy)
 print(buddy)

+ 56 - 53
mp_flipper/examples/infrared_signal_viewer.py

@@ -5,90 +5,93 @@ terminate = False
 index = 0
 index = 0
 signal = []
 signal = []
 
 
+
 def draw_signal():
 def draw_signal():
-  global index
-  global signal
+    global index
+    global signal
+
+    f0.canvas_clear()
 
 
-  f0.canvas_clear()
+    level = False if index % 2 else True
+    x = 0
+    y_low = 32
+    y_high = 40
+    y_level = y_low
 
 
-  level = False if index % 2 else True
-  x = 0
-  y_low = 32
-  y_high = 40
-  y_level = y_low
+    for i in range(100):
+        i += index
 
 
-  for i in range(100):
-    i += index
+        if i > len(signal):
+            break
 
 
-    if i > len(signal):
-      break
+        duration = int(signal[i] / 100)
 
 
-    duration = int(signal[i] / 100)
+        if level:
+            f0.canvas_draw_line(x, y_low, x, y_high)
+            y_level = y_high
+        else:
+            f0.canvas_draw_line(x, y_high, x, y_low)
+            y_level = y_low
 
 
-    if level:
-      f0.canvas_draw_line(x, y_low, x, y_high)
-      y_level = y_high
-    else:
-      f0.canvas_draw_line(x, y_high, x, y_low)
-      y_level = y_low
+        f0.canvas_draw_line(x, y_level, x + duration, y_level)
 
 
-    f0.canvas_draw_line(x, y_level, x + duration, y_level)
+        x += duration
 
 
-    x += duration
+        level = not level
 
 
-    level = not level
+        if x > f0.canvas_width():
+            break
 
 
-    if x > f0.canvas_width():
-      break
+    f0.canvas_update()
 
 
-  f0.canvas_update()
 
 
 @f0.on_input
 @f0.on_input
 def on_input(button, type):
 def on_input(button, type):
-  global terminate
-  global index
-  global signal
+    global terminate
+    global index
+    global signal
 
 
-  # terminate upon back button press
-  if button == f0.INPUT_BUTTON_BACK and type == f0.INPUT_TYPE_SHORT:
-    terminate = True
+    # terminate upon back button press
+    if button == f0.INPUT_BUTTON_BACK and type == f0.INPUT_TYPE_SHORT:
+        terminate = True
 
 
-    return
-  
-  # transmit signal upon ok button
-  if button == f0.INPUT_BUTTON_OK and type == f0.INPUT_TYPE_SHORT and len(signal) > 0:
-    f0.infrared_transmit(signal)
+        return
 
 
-    return
+    # transmit signal upon ok button
+    if button == f0.INPUT_BUTTON_OK and type == f0.INPUT_TYPE_SHORT and len(signal) > 0:
+        f0.infrared_transmit(signal)
 
 
-  # scroll left upon button left
-  if button == f0.INPUT_BUTTON_LEFT and type == f0.INPUT_TYPE_SHORT:
-    index -= 1 if index > 0 else 0
+        return
 
 
-    draw_signal()
+    # scroll left upon button left
+    if button == f0.INPUT_BUTTON_LEFT and type == f0.INPUT_TYPE_SHORT:
+        index -= 1 if index > 0 else 0
 
 
-    return
-  
-  # scroll right upon button left
-  if button == f0.INPUT_BUTTON_RIGHT and type == f0.INPUT_TYPE_SHORT:
-    index += 1
-    index %= len(signal)
+        draw_signal()
 
 
-    draw_signal()
+        return
 
 
-    return
+    # scroll right upon button left
+    if button == f0.INPUT_BUTTON_RIGHT and type == f0.INPUT_TYPE_SHORT:
+        index += 1
+        index %= len(signal)
 
 
-f0.canvas_set_text(10, 32, 'Waiting for IR signal ...')
+        draw_signal()
+
+        return
+
+
+f0.canvas_set_text(10, 32, "Waiting for IR signal ...")
 f0.canvas_update()
 f0.canvas_update()
 
 
 # receive signal
 # receive signal
 signal = f0.infrared_receive()
 signal = f0.infrared_receive()
 
 
 if len(signal):
 if len(signal):
-  draw_signal()
+    draw_signal()
 else:
 else:
-  terminate = True
+    terminate = True
 
 
 # wait upon termination
 # wait upon termination
 while not terminate:
 while not terminate:
-  time.sleep_ms(1)
+    time.sleep_ms(1)

+ 5 - 5
mp_flipper/examples/logger.py

@@ -2,11 +2,11 @@ import logging
 
 
 logging.setLevel(logging.TRACE)
 logging.setLevel(logging.TRACE)
 
 
-logging.trace('trace')
-logging.debug('debug %d %s',123,'message')
-logging.info('info %d %s',123,'message')
-logging.warn('warn %d %s',123,'message')
-logging.error('error %d %s',123,'message')
+logging.trace("trace")
+logging.debug("debug %d %s", 123, "message")
+logging.info("info %d %s", 123, "message")
+logging.warn("warn %d %s", 123, "message")
+logging.error("error %d %s", 123, "message")
 
 
 logging.log(logging.TRACE, "level: %d", logging.TRACE)
 logging.log(logging.TRACE, "level: %d", logging.TRACE)
 logging.log(logging.DEBUG, "level: %d", logging.DEBUG)
 logging.log(logging.DEBUG, "level: %d", logging.DEBUG)

+ 3 - 3
mp_flipper/examples/open.py

@@ -1,5 +1,5 @@
-fp = open('/ext/spam.txt', 'w')
+fp = open("/ext/spam.txt", "w")
 
 
-fp.write('Some spam')
+fp.write("Some spam")
 
 
-fp.close()
+fp.close()

+ 1 - 1
mp_flipper/examples/overflow_test.py

@@ -1 +1 @@
-data = list(range(0,9999))
+data = list(range(0, 9999))

+ 1 - 1
mp_flipper/examples/raise_test.py

@@ -1 +1 @@
-raise Exception('something went wrong')
+raise Exception("something went wrong")

+ 3 - 3
mp_flipper/examples/rand_test.py

@@ -2,6 +2,6 @@ from random import randint, seed
 
 
 seed(None)
 seed(None)
 
 
-for limit in range(2,100):
-  value = randint(2, limit)
-  print(value)
+for limit in range(2, 100):
+    value = randint(2, limit)
+    print(value)

+ 60 - 55
mp_flipper/examples/tic_tac_toe.py

@@ -1,12 +1,14 @@
 import time
 import time
 import flipperzero as f0
 import flipperzero as f0
 
 
+
 def init_grid():
 def init_grid():
-  return [
-    [' ', ' ', ' '],
-    [' ', ' ', ' '],
-    [' ', ' ', ' '],
-  ]
+    return [
+        [" ", " ", " "],
+        [" ", " ", " "],
+        [" ", " ", " "],
+    ]
+
 
 
 m_exit = False
 m_exit = False
 
 
@@ -17,59 +19,62 @@ m_y = 1
 
 
 m_is_cross = True
 m_is_cross = True
 
 
+
 @f0.on_input
 @f0.on_input
 def input_handler(button, type):
 def input_handler(button, type):
-  global m_exit
-  global m_grid
-  global m_x
-  global m_y
-  global m_is_cross
-
-  if button == f0.INPUT_BUTTON_BACK and type == f0.INPUT_TYPE_LONG:
-    m_exit = True
-  elif button == f0.INPUT_BUTTON_BACK and type == f0.INPUT_TYPE_SHORT:
-    m_grid = init_grid()
-  elif button == f0.INPUT_BUTTON_LEFT and type == f0.INPUT_TYPE_SHORT:
-    m_x = (m_x - 1) % 3
-  elif button == f0.INPUT_BUTTON_RIGHT and type == f0.INPUT_TYPE_SHORT:
-    m_x = (m_x + 1) % 3
-  elif button == f0.INPUT_BUTTON_UP and type == f0.INPUT_TYPE_SHORT:
-    m_y = (m_y - 1) % 3
-  elif button == f0.INPUT_BUTTON_DOWN and type == f0.INPUT_TYPE_SHORT:
-    m_y = (m_y + 1) % 3
-  elif button == f0.INPUT_BUTTON_OK and type == f0.INPUT_TYPE_SHORT:
-    m_grid[m_x][m_y] = 'X' if m_is_cross else 'O'
-    m_is_cross = not m_is_cross
+    global m_exit
+    global m_grid
+    global m_x
+    global m_y
+    global m_is_cross
+
+    if button == f0.INPUT_BUTTON_BACK and type == f0.INPUT_TYPE_LONG:
+        m_exit = True
+    elif button == f0.INPUT_BUTTON_BACK and type == f0.INPUT_TYPE_SHORT:
+        m_grid = init_grid()
+    elif button == f0.INPUT_BUTTON_LEFT and type == f0.INPUT_TYPE_SHORT:
+        m_x = (m_x - 1) % 3
+    elif button == f0.INPUT_BUTTON_RIGHT and type == f0.INPUT_TYPE_SHORT:
+        m_x = (m_x + 1) % 3
+    elif button == f0.INPUT_BUTTON_UP and type == f0.INPUT_TYPE_SHORT:
+        m_y = (m_y - 1) % 3
+    elif button == f0.INPUT_BUTTON_DOWN and type == f0.INPUT_TYPE_SHORT:
+        m_y = (m_y + 1) % 3
+    elif button == f0.INPUT_BUTTON_OK and type == f0.INPUT_TYPE_SHORT:
+        m_grid[m_x][m_y] = "X" if m_is_cross else "O"
+        m_is_cross = not m_is_cross
+
 
 
 def draw_grid():
 def draw_grid():
-  global m_grid
-  global m_x
-  global m_y
-
-  f0.canvas_clear()
-  f0.canvas_draw_frame(2, 2, 60, 60)
-  
-  f0.canvas_draw_line(22, 2, 22, 62)
-  f0.canvas_draw_line(42, 2, 42, 62)
-  
-  f0.canvas_draw_line(2, 22, 62, 22)
-  f0.canvas_draw_line(2, 42, 62, 42)
-
-  px = m_x * 20 + 4
-  py = m_y * 20 + 4
-
-  f0.canvas_draw_frame(px, py, 16, 16)
-  
-  f0.canvas_set_text_align(f0.ALIGN_CENTER, f0.ALIGN_CENTER)
-
-  for x in range(0, 3):
-    for y in range(0, 3):
-      px = x * 20 + 10 + 2
-      py = y * 20 + 10 + 2
-      f0.canvas_set_text(px, py, m_grid[x][y])
-  
-  f0.canvas_update()
+    global m_grid
+    global m_x
+    global m_y
+
+    f0.canvas_clear()
+    f0.canvas_draw_frame(2, 2, 60, 60)
+
+    f0.canvas_draw_line(22, 2, 22, 62)
+    f0.canvas_draw_line(42, 2, 42, 62)
+
+    f0.canvas_draw_line(2, 22, 62, 22)
+    f0.canvas_draw_line(2, 42, 62, 42)
+
+    px = m_x * 20 + 4
+    py = m_y * 20 + 4
+
+    f0.canvas_draw_frame(px, py, 16, 16)
+
+    f0.canvas_set_text_align(f0.ALIGN_CENTER, f0.ALIGN_CENTER)
+
+    for x in range(0, 3):
+        for y in range(0, 3):
+            px = x * 20 + 10 + 2
+            py = y * 20 + 10 + 2
+            f0.canvas_set_text(px, py, m_grid[x][y])
+
+    f0.canvas_update()
+
 
 
 while not m_exit:
 while not m_exit:
-  draw_grid()
-  time.sleep_ms(25)
+    draw_grid()
+    time.sleep_ms(25)

+ 2 - 2
mp_flipper/examples/try_except_test.py

@@ -1,4 +1,4 @@
 try:
 try:
-  raise Exception('something went wrong')
+    raise Exception("something went wrong")
 except Exception as e:
 except Exception as e:
-  print(e)
+    print(e)

+ 9 - 7
mp_flipper/examples/uart.py

@@ -1,16 +1,18 @@
 import time
 import time
 import flipperzero as f0
 import flipperzero as f0
 
 
+
 def read_from_uart():
 def read_from_uart():
-  with f0.uart_open(f0.UART_MODE_USART, 115200) as uart:
-    for _ in range(1000):
-      raw_data = uart.read()
+    with f0.uart_open(f0.UART_MODE_USART, 115200) as uart:
+        for _ in range(1000):
+            raw_data = uart.read()
+
+            if len(raw_data) > 0:
+                data = raw_data.decode()
 
 
-      if len(raw_data) > 0:
-        data = raw_data.decode()
+                print(data)
 
 
-        print(data)
+            time.sleep_ms(10)
 
 
-      time.sleep_ms(10)
 
 
 read_from_uart()
 read_from_uart()

+ 7 - 6
mp_flipper/flipperzero/_adc.py

@@ -1,29 +1,30 @@
 def adc_read_pin_value(pin: int) -> int:
 def adc_read_pin_value(pin: int) -> int:
-    '''
+    """
     Read the raw value from the ADC channel.
     Read the raw value from the ADC channel.
 
 
     :param pin: The pin to read (e.g. :const:`GPIO_PIN_PC1`).
     :param pin: The pin to read (e.g. :const:`GPIO_PIN_PC1`).
     :returns: The raw value between 0 and 4095.
     :returns: The raw value between 0 and 4095.
-    
+
     .. versionadded:: 1.3.0
     .. versionadded:: 1.3.0
 
 
     .. hint::
     .. hint::
 
 
         Don't forget to initialize the pin first.
         Don't forget to initialize the pin first.
-    '''
+    """
     pass
     pass
 
 
+
 def adc_read_pin_voltage(pin: int) -> float:
 def adc_read_pin_voltage(pin: int) -> float:
-    '''
+    """
     Read the voltage from the ADC channel.
     Read the voltage from the ADC channel.
 
 
     :param pin: The pin to read (e.g. :const:`GPIO_PIN_PC1`).
     :param pin: The pin to read (e.g. :const:`GPIO_PIN_PC1`).
     :returns: The voltage between 0 - 2.048 V with a precision of ~0.1%.
     :returns: The voltage between 0 - 2.048 V with a precision of ~0.1%.
-    
+
     .. versionadded:: 1.3.0
     .. versionadded:: 1.3.0
 
 
     .. hint::
     .. hint::
 
 
         Don't forget to initialize the pin first.
         Don't forget to initialize the pin first.
-    '''
+    """
     pass
     pass

+ 61 - 45
mp_flipper/flipperzero/_canvas.py

@@ -1,5 +1,5 @@
 def canvas_update() -> None:
 def canvas_update() -> None:
-    '''
+    """
     Updates the display buffer with your drawings from the canvas.
     Updates the display buffer with your drawings from the canvas.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
@@ -7,129 +7,139 @@ def canvas_update() -> None:
     .. note::
     .. note::
 
 
         Your drawings will only appear on the display after this function call.
         Your drawings will only appear on the display after this function call.
-    '''
+    """
     pass
     pass
 
 
+
 def canvas_clear() -> None:
 def canvas_clear() -> None:
-    '''
+    """
     Clear the whole canvas. This does not affect the current display buffer.
     Clear the whole canvas. This does not affect the current display buffer.
     You need to call :func:`canvas_update` to reveal your changes.
     You need to call :func:`canvas_update` to reveal your changes.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass
 
 
+
 def canvas_width() -> int:
 def canvas_width() -> int:
-    '''
+    """
     Get the canvas width in pixels.
     Get the canvas width in pixels.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
 
 
     :returns: The canvas width.
     :returns: The canvas width.
-    '''
+    """
     pass
     pass
 
 
+
 def canvas_height() -> int:
 def canvas_height() -> int:
-    '''
+    """
     Get the canvas height in pixels.
     Get the canvas height in pixels.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
 
 
     :returns: The canvas height.
     :returns: The canvas height.
-    '''
+    """
     pass
     pass
 
 
+
 COLOR_BLACK: int
 COLOR_BLACK: int
-'''
+"""
 Constant value for the color `black`.
 Constant value for the color `black`.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 COLOR_WHITE: int
 COLOR_WHITE: int
-'''
+"""
 Constant value for the color `white`.
 Constant value for the color `white`.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
+
 
 
 def canvas_set_color(color: int) -> None:
 def canvas_set_color(color: int) -> None:
-    '''
+    """
     Set the color to use when drawing or writing on the canvas.
     Set the color to use when drawing or writing on the canvas.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
 
 
     :param color: The color to use.
     :param color: The color to use.
-    '''
+    """
     pass
     pass
 
 
+
 ALIGN_BEGIN: int
 ALIGN_BEGIN: int
-'''
+"""
 Align element at `begin` (horizontal or vertical, depends on the context).
 Align element at `begin` (horizontal or vertical, depends on the context).
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 ALIGN_END: int
 ALIGN_END: int
-'''
+"""
 Align element at `end` (horizontal or vertical, depends on the context).
 Align element at `end` (horizontal or vertical, depends on the context).
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 ALIGN_CENTER: int
 ALIGN_CENTER: int
-'''
+"""
 Align element at `center` (horizontal or vertical, depends on the context).
 Align element at `center` (horizontal or vertical, depends on the context).
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
+
 
 
 def canvas_set_text_align(x: int, y: int) -> None:
 def canvas_set_text_align(x: int, y: int) -> None:
-    '''
-    Define how the text should be aligned in relation to the ``x`` and ``y`` coordinates 
+    """
+    Define how the text should be aligned in relation to the ``x`` and ``y`` coordinates
     when writing on the canvas, using the :func:`canvas_set_text` function.
     when writing on the canvas, using the :func:`canvas_set_text` function.
 
 
     :param x: The horizontal alignment.
     :param x: The horizontal alignment.
     :param y: The vertical alignment.
     :param y: The vertical alignment.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass
 
 
+
 FONT_PRIMARY: int
 FONT_PRIMARY: int
-'''
+"""
 Constant value for the primary font.
 Constant value for the primary font.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 FONT_SECONDARY: int
 FONT_SECONDARY: int
-'''
+"""
 Constant value for the secondary font.
 Constant value for the secondary font.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
+
 
 
 def canvas_set_font(font: int) -> None:
 def canvas_set_font(font: int) -> None:
-    '''
+    """
     Change the font to use when writing on the canvas using the :func:`canvas_set_text` function.
     Change the font to use when writing on the canvas using the :func:`canvas_set_text` function.
 
 
     :param font: The font to use.
     :param font: The font to use.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass
 
 
+
 def canvas_set_text(x: int, y: int, text: str) -> None:
 def canvas_set_text(x: int, y: int, text: str) -> None:
-    '''
+    """
     Write text on the canvas at the position of ``x`` and ``y`` by using the currently active color, font and alignment settings.
     Write text on the canvas at the position of ``x`` and ``y`` by using the currently active color, font and alignment settings.
-    
+
     :param x: The horizontal position.
     :param x: The horizontal position.
     :param y: The vertical position.
     :param y: The vertical position.
     :param text: The text to write.
     :param text: The text to write.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    
+
     .. code-block::
     .. code-block::
 
 
         import flipperzero as f0
         import flipperzero as f0
@@ -144,22 +154,24 @@ def canvas_set_text(x: int, y: int, text: str) -> None:
         * :func:`canvas_set_color` to change the canvas color.
         * :func:`canvas_set_color` to change the canvas color.
         * :func:`canvas_set_text_align` to change the alignment settings.
         * :func:`canvas_set_text_align` to change the alignment settings.
         * :func:`canvas_set_font` to change the current font.
         * :func:`canvas_set_font` to change the current font.
-    '''
+    """
     pass
     pass
 
 
+
 def canvas_draw_dot(x: int, y: int) -> None:
 def canvas_draw_dot(x: int, y: int) -> None:
-    '''
+    """
     Draw a dot on the canvas by using the currently active color settings.
     Draw a dot on the canvas by using the currently active color settings.
 
 
     :param x: The horizontal position.
     :param x: The horizontal position.
     :param y: The vertical position.
     :param y: The vertical position.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass
 
 
+
 def canvas_draw_box(x: int, y: int, w: int, h: int, r: int) -> None:
 def canvas_draw_box(x: int, y: int, w: int, h: int, r: int) -> None:
-    '''
+    """
     Draw a box on the canvas. The fill color is defined by the currently active color settings.
     Draw a box on the canvas. The fill color is defined by the currently active color settings.
     Set the corner radius to zero to draw a rectangle without rounded corners.
     Set the corner radius to zero to draw a rectangle without rounded corners.
 
 
@@ -170,11 +182,12 @@ def canvas_draw_box(x: int, y: int, w: int, h: int, r: int) -> None:
     :param r: The corner radius to use.
     :param r: The corner radius to use.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass
 
 
+
 def canvas_draw_frame(x: int, y: int, w: int, h: int, r: int) -> None:
 def canvas_draw_frame(x: int, y: int, w: int, h: int, r: int) -> None:
-    '''
+    """
     Draw a frame on the canvas. The border color is defined by the currently active color settings.
     Draw a frame on the canvas. The border color is defined by the currently active color settings.
     Set the corner radius to zero to draw a rectangle without rounded corners.
     Set the corner radius to zero to draw a rectangle without rounded corners.
 
 
@@ -185,11 +198,12 @@ def canvas_draw_frame(x: int, y: int, w: int, h: int, r: int) -> None:
     :param r: The corner radius to use.
     :param r: The corner radius to use.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass
 
 
+
 def canvas_draw_line(x0: int, y0: int, x1: int, y1: int) -> None:
 def canvas_draw_line(x0: int, y0: int, x1: int, y1: int) -> None:
-    '''
+    """
     Draw a line on the canvas. The color is defined by the currently active color settings.
     Draw a line on the canvas. The color is defined by the currently active color settings.
 
 
     :param x0: The horizontal start position.
     :param x0: The horizontal start position.
@@ -198,11 +212,12 @@ def canvas_draw_line(x0: int, y0: int, x1: int, y1: int) -> None:
     :param y1: The vertical end sposition.
     :param y1: The vertical end sposition.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass
 
 
+
 def canvas_draw_circle(x: int, y: int, r: int) -> None:
 def canvas_draw_circle(x: int, y: int, r: int) -> None:
-    '''
+    """
     Draw a circle on the canvas. The border color is defined by the currently active color settings.
     Draw a circle on the canvas. The border color is defined by the currently active color settings.
 
 
     :param x: The horizontal position.
     :param x: The horizontal position.
@@ -210,11 +225,12 @@ def canvas_draw_circle(x: int, y: int, r: int) -> None:
     :param r: The radius to use.
     :param r: The radius to use.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass
 
 
+
 def canvas_draw_disc(x: int, y: int, r: int) -> None:
 def canvas_draw_disc(x: int, y: int, r: int) -> None:
-    '''
+    """
     Draw a disc on the canvas. The fill color is defined by the currently active color settings.
     Draw a disc on the canvas. The fill color is defined by the currently active color settings.
 
 
     :param x: The horizontal position.
     :param x: The horizontal position.
@@ -222,5 +238,5 @@ def canvas_draw_disc(x: int, y: int, r: int) -> None:
     :param r: The radius to use.
     :param r: The radius to use.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass

+ 11 - 8
mp_flipper/flipperzero/_dialog.py

@@ -1,5 +1,5 @@
 def dialog_message_set_header(text: str, x: int, y: int, h: int, v: int) -> None:
 def dialog_message_set_header(text: str, x: int, y: int, h: int, v: int) -> None:
-    '''
+    """
     Set a header text on the dialog box.
     Set a header text on the dialog box.
 
 
     :param text: The text to set.
     :param text: The text to set.
@@ -9,11 +9,12 @@ def dialog_message_set_header(text: str, x: int, y: int, h: int, v: int) -> None
     :param v: The vertical alignment.
     :param v: The vertical alignment.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass
 
 
+
 def dialog_message_set_text(text: str, x: int, y: int, h: int, v: int) -> None:
 def dialog_message_set_text(text: str, x: int, y: int, h: int, v: int) -> None:
-    '''
+    """
     Set a text on the dialog box.
     Set a text on the dialog box.
 
 
     :param text: The text to set.
     :param text: The text to set.
@@ -23,22 +24,24 @@ def dialog_message_set_text(text: str, x: int, y: int, h: int, v: int) -> None:
     :param v: The vertical alignment.
     :param v: The vertical alignment.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass
 
 
+
 def dialog_message_set_button(text: str, button: int) -> None:
 def dialog_message_set_button(text: str, button: int) -> None:
-    '''
+    """
     Set the text of a dialog box button.
     Set the text of a dialog box button.
 
 
     :param text: The text to set.
     :param text: The text to set.
     :param button: The button to use (e.g. :const:`INPUT_BUTTON_UP`).
     :param button: The button to use (e.g. :const:`INPUT_BUTTON_UP`).
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass
 
 
+
 def dialog_message_show() -> int:
 def dialog_message_show() -> int:
-    '''
+    """
     Display the dialog box with the configured settings.
     Display the dialog box with the configured settings.
     This function is blocking.
     This function is blocking.
 
 
@@ -57,5 +60,5 @@ def dialog_message_show() -> int:
 
 
         while f0.dialog_message_show() is not f0.INPUT_BUTTON_LEFT:
         while f0.dialog_message_show() is not f0.INPUT_BUTTON_LEFT:
             pass
             pass
-    '''
+    """
     pass
     pass

+ 62 - 57
mp_flipper/flipperzero/_gpio.py

@@ -1,67 +1,67 @@
 from typing import Callable
 from typing import Callable
 
 
 GPIO_PIN_PC0: int
 GPIO_PIN_PC0: int
-'''
+"""
 Constant identifier for GPIO pin PC0.
 Constant identifier for GPIO pin PC0.
 
 
 * This pin can be used as ADC input.
 * This pin can be used as ADC input.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_PIN_PC1: int
 GPIO_PIN_PC1: int
-'''
+"""
 Constant identifier for GPIO pin PC1.
 Constant identifier for GPIO pin PC1.
 
 
 * This pin can be used as ADC input.
 * This pin can be used as ADC input.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_PIN_PC3: int
 GPIO_PIN_PC3: int
-'''
+"""
 Constant identifier for GPIO pin PC3.
 Constant identifier for GPIO pin PC3.
 
 
 * This pin can be used as ADC input.
 * This pin can be used as ADC input.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_PIN_PB2: int
 GPIO_PIN_PB2: int
-'''
+"""
 Constant identifier for GPIO pin PB2.
 Constant identifier for GPIO pin PB2.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_PIN_PB3: int
 GPIO_PIN_PB3: int
-'''
+"""
 Constant identifier for GPIO pin PB3.
 Constant identifier for GPIO pin PB3.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_PIN_PA4: int
 GPIO_PIN_PA4: int
-'''
+"""
 Constant identifier for GPIO pin PA4.
 Constant identifier for GPIO pin PA4.
 
 
 * This pin can be used as ADC input.
 * This pin can be used as ADC input.
 * This pin can be used as PWM output.
 * This pin can be used as PWM output.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_PIN_PA6: int
 GPIO_PIN_PA6: int
-'''
+"""
 Constant identifier for GPIO pin PA6.
 Constant identifier for GPIO pin PA6.
 
 
 * This pin can be used as ADC input.
 * This pin can be used as ADC input.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_PIN_PA7: int
 GPIO_PIN_PA7: int
-'''
+"""
 Constant identifier for GPIO pin PA7.
 Constant identifier for GPIO pin PA7.
 
 
 * This pin can be used as ADC input.
 * This pin can be used as ADC input.
@@ -70,101 +70,102 @@ Constant identifier for GPIO pin PA7.
 
 
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_MODE_INPUT: int
 GPIO_MODE_INPUT: int
-'''
+"""
 Constant configuration value for the GPIO input mode.
 Constant configuration value for the GPIO input mode.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_MODE_OUTPUT_PUSH_PULL: int
 GPIO_MODE_OUTPUT_PUSH_PULL: int
-'''
+"""
 Constant configuration value for the GPIO output as push-pull mode.
 Constant configuration value for the GPIO output as push-pull mode.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_MODE_OUTPUT_OPEN_DRAIN: int
 GPIO_MODE_OUTPUT_OPEN_DRAIN: int
-'''
+"""
 Constant configuration value for the GPIO output as open-drain mode.
 Constant configuration value for the GPIO output as open-drain mode.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_MODE_ANALOG: int
 GPIO_MODE_ANALOG: int
-'''
+"""
 Constant configuration value for the GPIO analog mode.
 Constant configuration value for the GPIO analog mode.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_MODE_INTERRUPT_RISE: int
 GPIO_MODE_INTERRUPT_RISE: int
-'''
+"""
 Constant configuration value for the GPIO interrupt on rising edges mode.
 Constant configuration value for the GPIO interrupt on rising edges mode.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_MODE_INTERRUPT_FALL: int
 GPIO_MODE_INTERRUPT_FALL: int
-'''
+"""
 Constant configuration value for the GPIO interrupt on falling edges mode.
 Constant configuration value for the GPIO interrupt on falling edges mode.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_PULL_NO: int
 GPIO_PULL_NO: int
-'''
+"""
 Constant configuration value for the GPIO internal pull resistor disabled.
 Constant configuration value for the GPIO internal pull resistor disabled.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_PULL_UP: int
 GPIO_PULL_UP: int
-'''
+"""
 Constant configuration value for the GPIO internal pull-up resistor enabled.
 Constant configuration value for the GPIO internal pull-up resistor enabled.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_PULL_DOWN: int
 GPIO_PULL_DOWN: int
-'''
+"""
 Constant configuration value for the GPIO internal pull-down resistor enabled.
 Constant configuration value for the GPIO internal pull-down resistor enabled.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_SPEED_LOW: int
 GPIO_SPEED_LOW: int
-'''
+"""
 Constant configuration value for the GPIO in low speed.
 Constant configuration value for the GPIO in low speed.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_SPEED_MEDIUM: int
 GPIO_SPEED_MEDIUM: int
-'''
+"""
 Constant configuration value for the GPIO in medium speed.
 Constant configuration value for the GPIO in medium speed.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_SPEED_HIGH: int
 GPIO_SPEED_HIGH: int
-'''
+"""
 Constant configuration value for the GPIO in high speed.
 Constant configuration value for the GPIO in high speed.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
 
 
 GPIO_SPEED_VERY_HIGH: int
 GPIO_SPEED_VERY_HIGH: int
-'''
+"""
 Constant configuration value for the GPIO in very high speed.
 Constant configuration value for the GPIO in very high speed.
     
     
 .. versionadded:: 1.2.0
 .. versionadded:: 1.2.0
-'''
+"""
+
 
 
 def gpio_init_pin(pin: int, mode: int, pull: int = None, speed: int = None) -> bool:
 def gpio_init_pin(pin: int, mode: int, pull: int = None, speed: int = None) -> bool:
-    '''
+    """
     Initialize a GPIO pin.
     Initialize a GPIO pin.
 
 
     :param pin: The pin to initialize (e.g. :const:`GPIO_PIN_PA4`).
     :param pin: The pin to initialize (e.g. :const:`GPIO_PIN_PA4`).
@@ -172,7 +173,7 @@ def gpio_init_pin(pin: int, mode: int, pull: int = None, speed: int = None) -> b
     :param pull: The pull resistor to use. Default is :const:`GPIO_PULL_NO`.
     :param pull: The pull resistor to use. Default is :const:`GPIO_PULL_NO`.
     :param speed: The speed to use. Default is :const:`GPIO_SPEED_LOW`.
     :param speed: The speed to use. Default is :const:`GPIO_SPEED_LOW`.
     :returns: :const:`True` on success, :const:`False` otherwise.
     :returns: :const:`True` on success, :const:`False` otherwise.
-    
+
     .. versionadded:: 1.2.0
     .. versionadded:: 1.2.0
     .. versionchanged:: 1.3.0
     .. versionchanged:: 1.3.0
        The return value changed from ``None`` to ``bool``.
        The return value changed from ``None`` to ``bool``.
@@ -181,55 +182,59 @@ def gpio_init_pin(pin: int, mode: int, pull: int = None, speed: int = None) -> b
 
 
         The interrupt modes :const:`GPIO_MODE_INTERRUPT_RISE` and :const:`GPIO_MODE_INTERRUPT_FALL` can be combined using bitwise OR.
         The interrupt modes :const:`GPIO_MODE_INTERRUPT_RISE` and :const:`GPIO_MODE_INTERRUPT_FALL` can be combined using bitwise OR.
         This allows you to handle rising `and` falling edges.
         This allows you to handle rising `and` falling edges.
-    '''
+    """
     pass
     pass
 
 
+
 def gpio_deinit_pin(pin: int) -> None:
 def gpio_deinit_pin(pin: int) -> None:
-    '''
+    """
     Deinitialize a GPIO pin.
     Deinitialize a GPIO pin.
 
 
     :param pin: The pin to deinitialize (e.g. :const:`GPIO_PIN_PA4`).
     :param pin: The pin to deinitialize (e.g. :const:`GPIO_PIN_PA4`).
-    
+
     .. versionadded:: 1.3.0
     .. versionadded:: 1.3.0
 
 
     .. note::
     .. note::
 
 
         It's not strictly necessary to deinitialize your GPIO pins upon script termination, this is already covered by the interpreter.
         It's not strictly necessary to deinitialize your GPIO pins upon script termination, this is already covered by the interpreter.
-    '''
+    """
     pass
     pass
 
 
+
 def gpio_set_pin(pin: int, state: bool) -> None:
 def gpio_set_pin(pin: int, state: bool) -> None:
-    '''
+    """
     Set the state of an output pin.
     Set the state of an output pin.
 
 
     :param pin: The pin to set (e.g. :const:`GPIO_PIN_PA4`).
     :param pin: The pin to set (e.g. :const:`GPIO_PIN_PA4`).
     :param state: The state to set.
     :param state: The state to set.
-    
+
     .. versionadded:: 1.2.0
     .. versionadded:: 1.2.0
 
 
     .. hint::
     .. hint::
 
 
         Don't forget to initialize the pin first.
         Don't forget to initialize the pin first.
-    '''
+    """
     pass
     pass
 
 
+
 def gpio_get_pin(pin: int) -> bool:
 def gpio_get_pin(pin: int) -> bool:
-    '''
+    """
     Read the state of an input pin.
     Read the state of an input pin.
 
 
     :param pin: The pin to read (e.g. :const:`GPIO_PIN_PA4`).
     :param pin: The pin to read (e.g. :const:`GPIO_PIN_PA4`).
     :returns: :const:`True` if the pin is high, :const:`False` on a low signal.
     :returns: :const:`True` if the pin is high, :const:`False` on a low signal.
-    
+
     .. versionadded:: 1.2.0
     .. versionadded:: 1.2.0
 
 
     .. hint::
     .. hint::
 
 
         Don't forget to initialize the pin first.
         Don't forget to initialize the pin first.
-    '''
+    """
     pass
     pass
 
 
+
 def on_gpio() -> Callable[[int], None]:
 def on_gpio() -> Callable[[int], None]:
-    '''
+    """
     Decorate a function to be used as GPIO interrupt handler. The decorated function will be invoked upon a GPIO interrupt.
     Decorate a function to be used as GPIO interrupt handler. The decorated function will be invoked upon a GPIO interrupt.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
@@ -244,9 +249,9 @@ def on_gpio() -> Callable[[int], None]:
         def interrupt_handler(pin):
         def interrupt_handler(pin):
             if pin == f0.GPIO_PIN_PC0:
             if pin == f0.GPIO_PIN_PC0:
                 ...
                 ...
-    
+
     .. warning::
     .. warning::
 
 
         You can only decorate one function per application.
         You can only decorate one function per application.
-    '''
+    """
     pass
     pass

+ 20 - 11
mp_flipper/flipperzero/_infrared.py

@@ -1,23 +1,31 @@
 from typing import List
 from typing import List
 
 
+
 def infrared_receive(timeout: int = 1000000) -> List[int]:
 def infrared_receive(timeout: int = 1000000) -> List[int]:
-    '''
+    """
     Receive an infrared signal. This is a blocking method.
     Receive an infrared signal. This is a blocking method.
     The method blocks until a timeout occurs or the internal
     The method blocks until a timeout occurs or the internal
     signal buffer (capacity is 1024 timings) is filled.
     signal buffer (capacity is 1024 timings) is filled.
 
 
     :param timeout: The timeout to use in microseconds.
     :param timeout: The timeout to use in microseconds.
     :returns: A list of timings in microseconds, starting with high.
     :returns: A list of timings in microseconds, starting with high.
-    
+
     .. versionadded:: 1.3.0
     .. versionadded:: 1.3.0
-    '''
+    """
     pass
     pass
 
 
-def infrared_transmit(signal: List[int], repeat: int = 1, use_external_pin: bool = False, frequency: int = 38000, duty: float = 0.33) -> bool:
-    '''
+
+def infrared_transmit(
+    signal: List[int],
+    repeat: int = 1,
+    use_external_pin: bool = False,
+    frequency: int = 38000,
+    duty: float = 0.33,
+) -> bool:
+    """
     Transmit an infrared signal. This is a blocking method.
     Transmit an infrared signal. This is a blocking method.
     The method blocks until the whole signal is sent.
     The method blocks until the whole signal is sent.
-    The signal list has the same format as the return value 
+    The signal list has the same format as the return value
     of :func:`infrared_receive`. Hence you can directly re-send
     of :func:`infrared_receive`. Hence you can directly re-send
     a received signal without any further processing.
     a received signal without any further processing.
 
 
@@ -27,17 +35,18 @@ def infrared_transmit(signal: List[int], repeat: int = 1, use_external_pin: bool
     :param frequency: The frequency to use for the PWM signal.
     :param frequency: The frequency to use for the PWM signal.
     :param duty: The duty cycle to use for the PWM signal.
     :param duty: The duty cycle to use for the PWM signal.
     :returns: :const:`True` on success, :const:`False` otherwise.
     :returns: :const:`True` on success, :const:`False` otherwise.
-    
+
     .. versionadded:: 1.3.0
     .. versionadded:: 1.3.0
-    '''
+    """
     pass
     pass
 
 
+
 def infrared_is_busy() -> bool:
 def infrared_is_busy() -> bool:
-    '''
+    """
     Check if the infrared subsystem is busy.
     Check if the infrared subsystem is busy.
 
 
     :returns: :const:`True` if occupied, :const:`False` otherwise.
     :returns: :const:`True` if occupied, :const:`False` otherwise.
-    
+
     .. versionadded:: 1.3.0
     .. versionadded:: 1.3.0
-    '''
+    """
     pass
     pass

+ 26 - 25
mp_flipper/flipperzero/_input.py

@@ -1,84 +1,85 @@
 from typing import Callable
 from typing import Callable
 
 
 INPUT_BUTTON_UP: int
 INPUT_BUTTON_UP: int
-'''
+"""
 Constant value for the `up` button.
 Constant value for the `up` button.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 INPUT_BUTTON_DOWN: int
 INPUT_BUTTON_DOWN: int
-'''
+"""
 Constant value for the `down` button.
 Constant value for the `down` button.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 INPUT_BUTTON_RIGHT: int
 INPUT_BUTTON_RIGHT: int
-'''
+"""
 Constant value for the `right` button.
 Constant value for the `right` button.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 INPUT_BUTTON_LEFT: int
 INPUT_BUTTON_LEFT: int
-'''
+"""
 Constant value for the `left` button.
 Constant value for the `left` button.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 INPUT_BUTTON_OK: int
 INPUT_BUTTON_OK: int
-'''
+"""
 Constant value for the `ok` button.
 Constant value for the `ok` button.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 INPUT_BUTTON_BACK: int
 INPUT_BUTTON_BACK: int
-'''
+"""
 Constant value for the `back` button.
 Constant value for the `back` button.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 INPUT_TYPE_PRESS: int
 INPUT_TYPE_PRESS: int
-'''
+"""
 Constant value for the `press` event of a button.
 Constant value for the `press` event of a button.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 INPUT_TYPE_RELEASE: int
 INPUT_TYPE_RELEASE: int
-'''
+"""
 Constant value for the `release` event of a button.
 Constant value for the `release` event of a button.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 INPUT_TYPE_SHORT: int
 INPUT_TYPE_SHORT: int
-'''
+"""
 Constant value for the `short` press event of a button.
 Constant value for the `short` press event of a button.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 INPUT_TYPE_LONG: int
 INPUT_TYPE_LONG: int
-'''
+"""
 Constant value for the `long` press event of a button.
 Constant value for the `long` press event of a button.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 INPUT_TYPE_REPEAT: int
 INPUT_TYPE_REPEAT: int
-'''
+"""
 Constant value for the `repeat` press event of a button.
 Constant value for the `repeat` press event of a button.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
+
 
 
 def on_input() -> Callable[[int, int], None]:
 def on_input() -> Callable[[int, int], None]:
-    '''
+    """
     Decorate a function to be used as input handler. The decorated function will be invoked upon interaction with one of the buttons on the Flipper.
     Decorate a function to be used as input handler. The decorated function will be invoked upon interaction with one of the buttons on the Flipper.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
@@ -92,9 +93,9 @@ def on_input() -> Callable[[int, int], None]:
             if button == f0.INPUT_BUTTON_BACK:
             if button == f0.INPUT_BUTTON_BACK:
                 if type == f0.INPUT_TYPE_LONG:
                 if type == f0.INPUT_TYPE_LONG:
                     ...
                     ...
-    
+
     .. warning::
     .. warning::
 
 
         You can only decorate one function per application.
         You can only decorate one function per application.
-    '''
+    """
     pass
     pass

+ 24 - 20
mp_flipper/flipperzero/_light.py

@@ -1,35 +1,36 @@
 from typing import Callable
 from typing import Callable
 
 
 LIGHT_RED: int
 LIGHT_RED: int
-'''
+"""
 Constant value for the red LED light.
 Constant value for the red LED light.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 LIGHT_GREEN: int
 LIGHT_GREEN: int
-'''
+"""
 Constant value for the green LED light.
 Constant value for the green LED light.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 LIGHT_BLUE: int
 LIGHT_BLUE: int
-'''
+"""
 Constant value for the blue LED light.
 Constant value for the blue LED light.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
 
 
 LIGHT_BACKLIGHT: int
 LIGHT_BACKLIGHT: int
-'''
+"""
 Constant value for the display backlight.
 Constant value for the display backlight.
 
 
 .. versionadded:: 1.0.0
 .. versionadded:: 1.0.0
-'''
+"""
+
 
 
 def light_set(light: int, brightness: int) -> None:
 def light_set(light: int, brightness: int) -> None:
-    '''
+    """
     Control the RGB LED on your Flipper. You can also set the brightness of multiple channels at once using bitwise operations.
     Control the RGB LED on your Flipper. You can also set the brightness of multiple channels at once using bitwise operations.
     The ``brightness`` parameter accepts values from 0 (light off) to 255 (very bright).
     The ``brightness`` parameter accepts values from 0 (light off) to 255 (very bright).
 
 
@@ -39,19 +40,20 @@ def light_set(light: int, brightness: int) -> None:
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
 
 
     .. code-block::
     .. code-block::
-    
+
         import flipperzero as f0
         import flipperzero as f0
-        
+
         f0.light_set(f0.LIGHT_RED | f0.LIGHT_GREEN, 250)
         f0.light_set(f0.LIGHT_RED | f0.LIGHT_GREEN, 250)
 
 
     .. tip::
     .. tip::
 
 
         You can use  up to seven colors using `additive mixing <https://en.wikipedia.org/wiki/Additive_color>`_.
         You can use  up to seven colors using `additive mixing <https://en.wikipedia.org/wiki/Additive_color>`_.
-    '''
+    """
     pass
     pass
 
 
+
 def light_blink_start(light: int, brightness: int, on_time: int, period: int) -> None:
 def light_blink_start(light: int, brightness: int, on_time: int, period: int) -> None:
-    '''
+    """
     Let the RGB LED blink. You can define the total duration of a blink period and the duration, the LED is active during a blink period.
     Let the RGB LED blink. You can define the total duration of a blink period and the duration, the LED is active during a blink period.
     Hence, ``on_time`` must be smaller than ``period``. This is a non-blocking operation. The LED will continue to blink until you call :func:`light_blink_stop`.
     Hence, ``on_time`` must be smaller than ``period``. This is a non-blocking operation. The LED will continue to blink until you call :func:`light_blink_stop`.
 
 
@@ -63,15 +65,16 @@ def light_blink_start(light: int, brightness: int, on_time: int, period: int) ->
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
 
 
     .. code-block::
     .. code-block::
-    
+
         import flipperzero as f0
         import flipperzero as f0
-        
+
         f0.light_blink_start(f0.LIGHT_RED, 150, 100, 200)
         f0.light_blink_start(f0.LIGHT_RED, 150, 100, 200)
-    '''
+    """
     pass
     pass
 
 
+
 def light_blink_set_color(light: int) -> None:
 def light_blink_set_color(light: int) -> None:
-    '''
+    """
     Change the RGB LED's color while blinking. This is a non-blocking operation.
     Change the RGB LED's color while blinking. This is a non-blocking operation.
     Be aware, that you must start the blinking procedure first by using the :func:`light_blink_start` function.
     Be aware, that you must start the blinking procedure first by using the :func:`light_blink_start` function.
     Call the :func:`light_blink_stop` function to stop the blinking LED.
     Call the :func:`light_blink_stop` function to stop the blinking LED.
@@ -79,13 +82,14 @@ def light_blink_set_color(light: int) -> None:
     :param light: The RGB channels to set.
     :param light: The RGB channels to set.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass
 
 
+
 def light_blink_stop() -> None:
 def light_blink_stop() -> None:
-    '''
+    """
     Stop the blinking LED.
     Stop the blinking LED.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass

+ 11 - 9
mp_flipper/flipperzero/_pwm.py

@@ -1,37 +1,39 @@
 def pwm_start(pin: int, frequency: int, duty: int) -> bool:
 def pwm_start(pin: int, frequency: int, duty: int) -> bool:
-    '''
+    """
     Start or change the PWM signal on the corresponding GPIO pin.
     Start or change the PWM signal on the corresponding GPIO pin.
 
 
     :param pin: The pin to read (e.g. :const:`GPIO_PIN_PA7`).
     :param pin: The pin to read (e.g. :const:`GPIO_PIN_PA7`).
     :param frequency: The frequency to set in Hz.
     :param frequency: The frequency to set in Hz.
     :param duty: The duty cycle per period in percent.
     :param duty: The duty cycle per period in percent.
     :returns: :const:`True` on success, :const:`False` otherwise.
     :returns: :const:`True` on success, :const:`False` otherwise.
-    
+
     .. versionadded:: 1.3.0
     .. versionadded:: 1.3.0
 
 
     .. warning::
     .. warning::
 
 
         You don't have to initialize the pin first.
         You don't have to initialize the pin first.
-    '''
+    """
     pass
     pass
 
 
+
 def pwm_stop(pin: int) -> None:
 def pwm_stop(pin: int) -> None:
-    '''
+    """
     Stop the PWM signal on the corresponding GPIO pin.
     Stop the PWM signal on the corresponding GPIO pin.
 
 
     :param pin: The pin to use (e.g. :const:`GPIO_PIN_PA7`).
     :param pin: The pin to use (e.g. :const:`GPIO_PIN_PA7`).
-    
+
     .. versionadded:: 1.3.0
     .. versionadded:: 1.3.0
-    '''
+    """
     pass
     pass
 
 
+
 def pwm_is_running(pin: int) -> bool:
 def pwm_is_running(pin: int) -> bool:
-    '''
+    """
     Check if the corresponding GPIO pin has a PWM signal output.
     Check if the corresponding GPIO pin has a PWM signal output.
 
 
     :param pin: The pin to check (e.g. :const:`GPIO_PIN_PA7`).
     :param pin: The pin to check (e.g. :const:`GPIO_PIN_PA7`).
     :returns: :const:`True` on success, :const:`False` otherwise.
     :returns: :const:`True` on success, :const:`False` otherwise.
-    
+
     .. versionadded:: 1.3.0
     .. versionadded:: 1.3.0
-    '''
+    """
     pass
     pass

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 224 - 223
mp_flipper/flipperzero/_speaker.py


+ 33 - 31
mp_flipper/flipperzero/_uart.py

@@ -1,21 +1,22 @@
 from typing import List
 from typing import List
 
 
 UART_MODE_LPUART: int
 UART_MODE_LPUART: int
-'''
+"""
 Constant value for the low power UART mode.
 Constant value for the low power UART mode.
 
 
 .. versionadded:: 1.5.0
 .. versionadded:: 1.5.0
-'''
+"""
 
 
 UART_MODE_USART: int
 UART_MODE_USART: int
-'''
+"""
 Constant value for the USART mode.
 Constant value for the USART mode.
 
 
 .. versionadded:: 1.5.0
 .. versionadded:: 1.5.0
-'''
+"""
+
 
 
 class UART:
 class UART:
-    '''
+    """
     This represents an UART connection.
     This represents an UART connection.
     The class has no :const:`__init__` method, use :func:`uart_open` to start an UART connection and receive an instance.
     The class has no :const:`__init__` method, use :func:`uart_open` to start an UART connection and receive an instance.
 
 
@@ -29,7 +30,7 @@ class UART:
 
 
         with f0.open(f0.UART_MODE_USART, 115200) as uart:
         with f0.open(f0.UART_MODE_USART, 115200) as uart:
             lines = [line for line in uart]
             lines = [line for line in uart]
-    
+
     An :class:`UART` instance can be used with a `context manager <https://docs.python.org/3/reference/datamodel.html#with-statement-context-managers>`_:
     An :class:`UART` instance can be used with a `context manager <https://docs.python.org/3/reference/datamodel.html#with-statement-context-managers>`_:
 
 
     .. code-block::
     .. code-block::
@@ -44,11 +45,11 @@ class UART:
         The read and write methods are non-blocking in terms of data availability.
         The read and write methods are non-blocking in terms of data availability.
         They don't block code execution upon data is available.
         They don't block code execution upon data is available.
         Just an empty result will be returned.
         Just an empty result will be returned.
-    '''
+    """
 
 
     def read(self, size: int = -1) -> bytes:
     def read(self, size: int = -1) -> bytes:
-        '''
-        Read from the connection. 
+        """
+        Read from the connection.
         The method will read up to ``size`` bytes and return them.
         The method will read up to ``size`` bytes and return them.
         If ``size`` is not specified, all available data will be returned.
         If ``size`` is not specified, all available data will be returned.
         The method will return zero bytes, if no data is available.
         The method will return zero bytes, if no data is available.
@@ -57,11 +58,11 @@ class UART:
         :returns: Up to ``size`` bytes.
         :returns: Up to ``size`` bytes.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def readline(self, size: int = -1) -> bytes:
     def readline(self, size: int = -1) -> bytes:
-        '''
+        """
         Read and return one line from the connection.
         Read and return one line from the connection.
         If ``size`` is specified, at most ``size`` bytes will be read.
         If ``size`` is specified, at most ``size`` bytes will be read.
         The line terminator is always ``b'\\n'``.
         The line terminator is always ``b'\\n'``.
@@ -70,22 +71,22 @@ class UART:
         :returns: Up to ``size`` bytes.
         :returns: Up to ``size`` bytes.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def readlines(self) -> List[bytes]:
     def readlines(self) -> List[bytes]:
-        '''
+        """
         Read and return a list of lines from the connection.
         Read and return a list of lines from the connection.
         The line terminator is always ``b'\\n'``.
         The line terminator is always ``b'\\n'``.
 
 
         :returns: A list of bytes.
         :returns: A list of bytes.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def write(self, data: bytes) -> int:
     def write(self, data: bytes) -> int:
-        '''
+        """
         Write the given bytes to the connection stream.
         Write the given bytes to the connection stream.
         The number of written bytes will be returned.
         The number of written bytes will be returned.
         This can be less than the length of the provided data.
         This can be less than the length of the provided data.
@@ -96,56 +97,57 @@ class UART:
         :returns: The number of bytes sent.
         :returns: The number of bytes sent.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def flush(self) -> None:
     def flush(self) -> None:
-        '''
+        """
         Flush the transmission buffer to the underlying UART connection.
         Flush the transmission buffer to the underlying UART connection.
         This method blocks until all data is sent.
         This method blocks until all data is sent.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def close(self) -> None:
     def close(self) -> None:
-        '''
+        """
         Close the UART connection.
         Close the UART connection.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
-    def __enter__(self) -> 'UART':
-        '''
+    def __enter__(self) -> "UART":
+        """
         This method is invoked, when the instance enters a runtime context.
         This method is invoked, when the instance enters a runtime context.
 
 
         :returns: The :class:`UART` connection.
         :returns: The :class:`UART` connection.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def __exit__(self, *args, **kwargs) -> None:
     def __exit__(self, *args, **kwargs) -> None:
-        '''
+        """
         This method is invoked, when the instance leavs a runtime context.
         This method is invoked, when the instance leavs a runtime context.
         This basically calls :meth:`close` on the instance.
         This basically calls :meth:`close` on the instance.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def __del__(self) -> None:
     def __del__(self) -> None:
-        '''
+        """
         This method is invoked, when the garbage collector removes the object.
         This method is invoked, when the garbage collector removes the object.
         This basically calls :meth:`close` on the instance.
         This basically calls :meth:`close` on the instance.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
+
 def uart_open(mode: int, baud_rate: int) -> UART:
 def uart_open(mode: int, baud_rate: int) -> UART:
-    '''
+    """
     Open a connection to an UART enabled device by using the specified mode and baud rate.
     Open a connection to an UART enabled device by using the specified mode and baud rate.
 
 
     :param mode: The mode to use, either :const:`UART_MODE_LPUART` or :const:`UART_MODE_USART`.
     :param mode: The mode to use, either :const:`UART_MODE_LPUART` or :const:`UART_MODE_USART`.
@@ -155,10 +157,10 @@ def uart_open(mode: int, baud_rate: int) -> UART:
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
 
 
     .. code-block::
     .. code-block::
-    
+
         import flipperzero as f0
         import flipperzero as f0
-        
+
         with f0.uart_open(f0.UART_MODE_USART, 115200) as uart:
         with f0.uart_open(f0.UART_MODE_USART, 115200) as uart:
             ...
             ...
-    '''
+    """
     pass
     pass

+ 2 - 2
mp_flipper/flipperzero/_vibro.py

@@ -1,10 +1,10 @@
 def vibro_set(state: bool) -> bool:
 def vibro_set(state: bool) -> bool:
-    '''
+    """
     Turn vibration on or off. This is a non-blocking operation. The vibration motor will continue to run until you stop it.
     Turn vibration on or off. This is a non-blocking operation. The vibration motor will continue to run until you stop it.
 
 
     :param state: :const:`True` to turn on vibration.
     :param state: :const:`True` to turn on vibration.
     :returns: :const:`True` if vibration is on.
     :returns: :const:`True` if vibration is on.
 
 
     .. versionadded:: 1.0.0
     .. versionadded:: 1.0.0
-    '''
+    """
     pass
     pass

+ 77 - 74
mp_flipper/flipperzero/io.py

@@ -4,57 +4,58 @@ import io
 _open = io.open
 _open = io.open
 
 
 SEEK_SET: int = 0
 SEEK_SET: int = 0
-'''
+"""
 Set the pointer position relative to the beginning of the stream.
 Set the pointer position relative to the beginning of the stream.
 
 
 .. versionadded:: 1.5.0
 .. versionadded:: 1.5.0
-'''
+"""
 
 
 SEEK_CUR: int = 1
 SEEK_CUR: int = 1
-'''
+"""
 Set the pointer position relative to the current position.
 Set the pointer position relative to the current position.
 
 
 .. versionadded:: 1.5.0
 .. versionadded:: 1.5.0
-'''
+"""
 
 
 SEEK_END: int = 2
 SEEK_END: int = 2
-'''
+"""
 Set the pointer position relative to the end of the stream.
 Set the pointer position relative to the end of the stream.
 
 
 .. versionadded:: 1.5.0
 .. versionadded:: 1.5.0
-'''
+"""
+
 
 
 class BinaryFileIO:
 class BinaryFileIO:
-    '''
+    """
     Represents a file, opened in binary mode.
     Represents a file, opened in binary mode.
 
 
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
 
 
     name: str
     name: str
-    '''
+    """
     The name of the file.
     The name of the file.
 
 
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
 
 
     readable: bool
     readable: bool
-    '''
+    """
     Read-only attribute, indicating if the file is readable.
     Read-only attribute, indicating if the file is readable.
     
     
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
 
 
     writable: bool
     writable: bool
-    '''
+    """
     Read-only attribute, indicating if the file is writable.
     Read-only attribute, indicating if the file is writable.
     
     
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
 
 
     def read(self, size: int = -1) -> bytes:
     def read(self, size: int = -1) -> bytes:
-        '''
-        Read from the file. 
+        """
+        Read from the file.
         The method will read up to ``size`` bytes and return them.
         The method will read up to ``size`` bytes and return them.
         If ``size`` is not specified, all content up to EOF will be returned.
         If ``size`` is not specified, all content up to EOF will be returned.
         If the internal pointer is already at EOF, an empty byte string ``b''`` will be returned.
         If the internal pointer is already at EOF, an empty byte string ``b''`` will be returned.
@@ -63,11 +64,11 @@ class BinaryFileIO:
         :returns: Up to ``size`` bytes.
         :returns: Up to ``size`` bytes.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def readline(self, size: int = -1) -> bytes:
     def readline(self, size: int = -1) -> bytes:
-        '''
+        """
         Read and return one line from the file.
         Read and return one line from the file.
         If ``size`` is specified, at most ``size`` bytes will be read.
         If ``size`` is specified, at most ``size`` bytes will be read.
         The line terminator is defined as ``b'\\n'``.
         The line terminator is defined as ``b'\\n'``.
@@ -78,11 +79,11 @@ class BinaryFileIO:
         :returns: Up to ``size`` bytes.
         :returns: Up to ``size`` bytes.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def readlines(self) -> typing.List[bytes]:
     def readlines(self) -> typing.List[bytes]:
-        '''
+        """
         Read and return a list of lines from the file.
         Read and return a list of lines from the file.
         The line terminator is defined as ``b'\\n'``.
         The line terminator is defined as ``b'\\n'``.
         The new line character is included in the return value.
         The new line character is included in the return value.
@@ -91,11 +92,11 @@ class BinaryFileIO:
         :returns: A list of bytes.
         :returns: A list of bytes.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def write(self, data: bytes) -> int:
     def write(self, data: bytes) -> int:
-        '''
+        """
         Write the given bytes to the file.
         Write the given bytes to the file.
         The number of written bytes will be returned.
         The number of written bytes will be returned.
         This can be less than the length of the provided data.
         This can be less than the length of the provided data.
@@ -104,19 +105,19 @@ class BinaryFileIO:
         :returns: The number of bytes written.
         :returns: The number of bytes written.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def flush(self) -> None:
     def flush(self) -> None:
-        '''
+        """
         Write the contents of the file buffer to the file on the SD card.
         Write the contents of the file buffer to the file on the SD card.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def seek(self, offset: int, whence: int = SEEK_SET) -> int:
     def seek(self, offset: int, whence: int = SEEK_SET) -> int:
-        '''
+        """
         Set the pointer position by the given ``offset``, relative to the position indicated by ``whence``.
         Set the pointer position by the given ``offset``, relative to the position indicated by ``whence``.
         The new absolute position will be returned.
         The new absolute position will be returned.
 
 
@@ -125,86 +126,87 @@ class BinaryFileIO:
         :returns: The new absolute position.
         :returns: The new absolute position.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def tell(self) -> int:
     def tell(self) -> int:
-        '''
+        """
         Get the current pointer position.
         Get the current pointer position.
 
 
         :returns: The absolute position of the pointer.
         :returns: The absolute position of the pointer.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def close(self) -> None:
     def close(self) -> None:
-        '''
+        """
         Close the file handle.
         Close the file handle.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
-    def __enter__(self) -> 'BinaryFileIO':
-        '''
+    def __enter__(self) -> "BinaryFileIO":
+        """
         This method is invoked, when the instance enters a runtime context.
         This method is invoked, when the instance enters a runtime context.
 
 
         :returns: The :class:`BinaryFileIO` instance.
         :returns: The :class:`BinaryFileIO` instance.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def __exit__(self, *args, **kwargs) -> None:
     def __exit__(self, *args, **kwargs) -> None:
-        '''
+        """
         This method is invoked, when the instance leavs a runtime context.
         This method is invoked, when the instance leavs a runtime context.
         This basically calls :meth:`close` on the instance.
         This basically calls :meth:`close` on the instance.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def __del__(self) -> None:
     def __del__(self) -> None:
-        '''
+        """
         This method is invoked, when the garbage collector removes the object.
         This method is invoked, when the garbage collector removes the object.
         This basically calls :meth:`close` on the instance.
         This basically calls :meth:`close` on the instance.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
+
 class TextFileIO:
 class TextFileIO:
-    '''
+    """
     Represents a file, opened in text mode.
     Represents a file, opened in text mode.
 
 
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
 
 
     name: str
     name: str
-    '''
+    """
     The name of the file.
     The name of the file.
 
 
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
 
 
     readable: bool
     readable: bool
-    '''
+    """
     Read-only attribute, indicating if the file is readable.
     Read-only attribute, indicating if the file is readable.
     
     
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
 
 
     writable: bool
     writable: bool
-    '''
+    """
     Read-only attribute, indicating if the file is writable.
     Read-only attribute, indicating if the file is writable.
     
     
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
 
 
     def read(self, size: int = -1) -> str:
     def read(self, size: int = -1) -> str:
-        '''
-        Read from the file. 
+        """
+        Read from the file.
         The method will read up to ``size`` characters and return them.
         The method will read up to ``size`` characters and return them.
         If ``size`` is not specified, all content up to EOF will be returned.
         If ``size`` is not specified, all content up to EOF will be returned.
         If the internal pointer is already at EOF, an empty string will be returned.
         If the internal pointer is already at EOF, an empty string will be returned.
@@ -213,11 +215,11 @@ class TextFileIO:
         :returns: Up to ``size`` characters.
         :returns: Up to ``size`` characters.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def readline(self, size: int = -1) -> str:
     def readline(self, size: int = -1) -> str:
-        '''
+        """
         Read and return one line from the file.
         Read and return one line from the file.
         If ``size`` is specified, at most ``size`` characters will be read.
         If ``size`` is specified, at most ``size`` characters will be read.
         The line terminator is defined as ``'\\n'``.
         The line terminator is defined as ``'\\n'``.
@@ -228,11 +230,11 @@ class TextFileIO:
         :returns: Up to ``size`` characters.
         :returns: Up to ``size`` characters.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def readlines(self) -> typing.List[str]:
     def readlines(self) -> typing.List[str]:
-        '''
+        """
         Read and return a list of lines from the file.
         Read and return a list of lines from the file.
         The line terminator is defined as ``'\\n'``.
         The line terminator is defined as ``'\\n'``.
         The new line character is included in the return value.
         The new line character is included in the return value.
@@ -241,11 +243,11 @@ class TextFileIO:
         :returns: A list of strings.
         :returns: A list of strings.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def write(self, data: str) -> int:
     def write(self, data: str) -> int:
-        '''
+        """
         Write the given string to the file.
         Write the given string to the file.
         The number of written characters will be returned.
         The number of written characters will be returned.
         This can be less than the length of the provided data.
         This can be less than the length of the provided data.
@@ -254,19 +256,19 @@ class TextFileIO:
         :returns: The number of characters written.
         :returns: The number of characters written.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def flush(self) -> None:
     def flush(self) -> None:
-        '''
+        """
         Write the contents of the file buffer to the file on the SD card.
         Write the contents of the file buffer to the file on the SD card.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def seek(self, offset: int, whence: int = SEEK_SET) -> int:
     def seek(self, offset: int, whence: int = SEEK_SET) -> int:
-        '''
+        """
         Set the pointer position by the given ``offset``, relative to the position indicated by ``whence``.
         Set the pointer position by the given ``offset``, relative to the position indicated by ``whence``.
         The new absolute position will be returned.
         The new absolute position will be returned.
 
 
@@ -275,57 +277,58 @@ class TextFileIO:
         :returns: The new absolute position.
         :returns: The new absolute position.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def tell(self) -> int:
     def tell(self) -> int:
-        '''
+        """
         Get the current pointer position.
         Get the current pointer position.
 
 
         :returns: The absolute position of the pointer.
         :returns: The absolute position of the pointer.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def close(self) -> None:
     def close(self) -> None:
-        '''
+        """
         Close the file handle.
         Close the file handle.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
-    def __enter__(self) -> 'TextFileIO':
-        '''
+    def __enter__(self) -> "TextFileIO":
+        """
         This method is invoked, when the instance enters a runtime context.
         This method is invoked, when the instance enters a runtime context.
 
 
         :returns: The :class:`BinaryFileIO` instance.
         :returns: The :class:`BinaryFileIO` instance.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def __exit__(self, *args, **kwargs) -> None:
     def __exit__(self, *args, **kwargs) -> None:
-        '''
+        """
         This method is invoked, when the instance leavs a runtime context.
         This method is invoked, when the instance leavs a runtime context.
         This basically calls :meth:`close` on the instance.
         This basically calls :meth:`close` on the instance.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
     def __del__(self) -> None:
     def __del__(self) -> None:
-        '''
+        """
         This method is invoked, when the garbage collector removes the object.
         This method is invoked, when the garbage collector removes the object.
         This basically calls :meth:`close` on the instance.
         This basically calls :meth:`close` on the instance.
 
 
         .. versionadded:: 1.5.0
         .. versionadded:: 1.5.0
-        '''
+        """
         pass
         pass
 
 
+
 def open(path: str, mode: str, *args, **kwargs) -> BinaryFileIO | TextFileIO:
 def open(path: str, mode: str, *args, **kwargs) -> BinaryFileIO | TextFileIO:
-    '''
+    """
     Open a file on the file system with the specified mode.
     Open a file on the file system with the specified mode.
     The file path must always be absolute, beginning with ``/ext``.
     The file path must always be absolute, beginning with ``/ext``.
     The following modifiers are available:
     The following modifiers are available:
@@ -343,7 +346,7 @@ def open(path: str, mode: str, *args, **kwargs) -> BinaryFileIO | TextFileIO:
         * - ``'w'``
         * - ``'w'``
           - Open for writing, truncating an existing file first.
           - Open for writing, truncating an existing file first.
         * - ``'b'``
         * - ``'b'``
-          - Open the file in binary mode. 
+          - Open the file in binary mode.
             The return value will be a :class:`BinaryFileIO` instance.
             The return value will be a :class:`BinaryFileIO` instance.
         * - ``'t'``
         * - ``'t'``
           - Open the in text mode.
           - Open the in text mode.
@@ -353,7 +356,7 @@ def open(path: str, mode: str, *args, **kwargs) -> BinaryFileIO | TextFileIO:
           - Open for reading and writing.
           - Open for reading and writing.
             Will create the file, if it not exists.
             Will create the file, if it not exists.
             The pointer will be placed at the end of the file.
             The pointer will be placed at the end of the file.
-    
+
     The modifiers can be combined, e.g. ``'rb+'`` would open a file for reading and writing in binary mode.
     The modifiers can be combined, e.g. ``'rb+'`` would open a file for reading and writing in binary mode.
 
 
     :param path: The path to the file to open.
     :param path: The path to the file to open.
@@ -362,5 +365,5 @@ def open(path: str, mode: str, *args, **kwargs) -> BinaryFileIO | TextFileIO:
     :param kwargs: Is ignored at the moment.
     :param kwargs: Is ignored at the moment.
 
 
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
     return io._open(path, mode, *args, **kwargs)
     return io._open(path, mode, *args, **kwargs)

+ 38 - 30
mp_flipper/flipperzero/logging.py

@@ -1,49 +1,49 @@
 import typing
 import typing
 
 
 TRACE: int = 6
 TRACE: int = 6
-'''
+"""
 Constant value for the `trace` log level.
 Constant value for the `trace` log level.
 
 
 .. versionadded:: 1.5.0
 .. versionadded:: 1.5.0
-'''
+"""
 
 
 DEBUG: int = 5
 DEBUG: int = 5
-'''
+"""
 Constant value for the `debug` log level.
 Constant value for the `debug` log level.
 
 
 .. versionadded:: 1.5.0
 .. versionadded:: 1.5.0
-'''
+"""
 
 
 INFO: int = 4
 INFO: int = 4
-'''
+"""
 Constant value for the `info` log level.
 Constant value for the `info` log level.
 
 
 .. versionadded:: 1.5.0
 .. versionadded:: 1.5.0
-'''
+"""
 
 
 WARN: int = 3
 WARN: int = 3
-'''
+"""
 Constant value for the `warn` log level.
 Constant value for the `warn` log level.
 
 
 .. versionadded:: 1.5.0
 .. versionadded:: 1.5.0
-'''
+"""
 
 
 ERROR: int = 2
 ERROR: int = 2
-'''
+"""
 Constant value for the `error` log level.
 Constant value for the `error` log level.
 
 
 .. versionadded:: 1.5.0
 .. versionadded:: 1.5.0
-'''
+"""
 
 
 NONE: int = 1
 NONE: int = 1
-'''
+"""
 Constant value for logging disabled.
 Constant value for logging disabled.
 
 
 .. versionadded:: 1.5.0
 .. versionadded:: 1.5.0
-'''
+"""
 
 
 level: int
 level: int
-'''
+"""
 The threshold log level, as set by the :func:`setLevel` function.
 The threshold log level, as set by the :func:`setLevel` function.
 The initial value is set to the :const:`INFO` level.
 The initial value is set to the :const:`INFO` level.
 
 
@@ -52,10 +52,11 @@ The initial value is set to the :const:`INFO` level.
 .. hint::
 .. hint::
 
 
     Don't change the value of this variable, use :func:`setLevel` instead.
     Don't change the value of this variable, use :func:`setLevel` instead.
-'''
+"""
+
 
 
 def setLevel(level: int) -> None:
 def setLevel(level: int) -> None:
-    '''
+    """
     Set the current log level of the application.
     Set the current log level of the application.
 
 
     :param level: The log level to set (e.g. :const:`INFO`).
     :param level: The log level to set (e.g. :const:`INFO`).
@@ -66,21 +67,23 @@ def setLevel(level: int) -> None:
 
 
         This doesn't change the Flipper's effective log level settings.
         This doesn't change the Flipper's effective log level settings.
         Check out the Flipper's `documentation <https://docs.flipper.net/basics/settings#d5TAt>`_ for details on this topic.
         Check out the Flipper's `documentation <https://docs.flipper.net/basics/settings#d5TAt>`_ for details on this topic.
-    '''
+    """
     pass
     pass
 
 
+
 def getEffectiveLevel() -> int:
 def getEffectiveLevel() -> int:
-    '''
+    """
     Get the effective log level from the Flipper's settings.
     Get the effective log level from the Flipper's settings.
 
 
     :returns: The effective log level.
     :returns: The effective log level.
 
 
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
     pass
     pass
 
 
+
 def trace(message: str, *args) -> None:
 def trace(message: str, *args) -> None:
-    '''
+    """
     Log a message with level :const:`TRACE`.
     Log a message with level :const:`TRACE`.
     The ``message`` argument can be a format string with ``%`` placeholders.
     The ``message`` argument can be a format string with ``%`` placeholders.
     No % formatting operation is performed when ``args`` is empty.
     No % formatting operation is performed when ``args`` is empty.
@@ -97,11 +100,12 @@ def trace(message: str, *args) -> None:
         value = 42
         value = 42
 
 
         logging.trace('value is %d', value)
         logging.trace('value is %d', value)
-    '''
+    """
     pass
     pass
 
 
+
 def debug(message: str, *args) -> None:
 def debug(message: str, *args) -> None:
-    '''
+    """
     Log a message with level :const:`DEBUG`.
     Log a message with level :const:`DEBUG`.
     See :func:`trace` for details on the usage.
     See :func:`trace` for details on the usage.
 
 
@@ -109,11 +113,12 @@ def debug(message: str, *args) -> None:
     :param args: Values for the % formatting.
     :param args: Values for the % formatting.
 
 
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
     pass
     pass
 
 
+
 def info(message: str, *args) -> None:
 def info(message: str, *args) -> None:
-    '''
+    """
     Log a message with level :const:`INFO`.
     Log a message with level :const:`INFO`.
     See :func:`trace` for details on the usage.
     See :func:`trace` for details on the usage.
 
 
@@ -121,11 +126,12 @@ def info(message: str, *args) -> None:
     :param args: Values for the % formatting.
     :param args: Values for the % formatting.
 
 
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
     pass
     pass
 
 
+
 def warn(message: str, *args) -> None:
 def warn(message: str, *args) -> None:
-    '''
+    """
     Log a message with level :const:`WARN`.
     Log a message with level :const:`WARN`.
     See :func:`trace` for details on the usage.
     See :func:`trace` for details on the usage.
 
 
@@ -133,11 +139,12 @@ def warn(message: str, *args) -> None:
     :param args: Values for the % formatting.
     :param args: Values for the % formatting.
 
 
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
     pass
     pass
 
 
+
 def error(message: str, *args) -> None:
 def error(message: str, *args) -> None:
-    '''
+    """
     Log a message with level :const:`ERROR`.
     Log a message with level :const:`ERROR`.
     See :func:`trace` for details on the usage.
     See :func:`trace` for details on the usage.
 
 
@@ -145,11 +152,12 @@ def error(message: str, *args) -> None:
     :param args: Values for the % formatting.
     :param args: Values for the % formatting.
 
 
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
     pass
     pass
 
 
+
 def log(level: int, message: str, *args) -> None:
 def log(level: int, message: str, *args) -> None:
-    '''
+    """
     Log a message with the given log level.
     Log a message with the given log level.
     See :func:`trace` for details on the usage.
     See :func:`trace` for details on the usage.
 
 
@@ -158,5 +166,5 @@ def log(level: int, message: str, *args) -> None:
     :param args: Values for the % formatting.
     :param args: Values for the % formatting.
 
 
     .. versionadded:: 1.5.0
     .. versionadded:: 1.5.0
-    '''
+    """
     pass
     pass

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott