Skip to content

Commit

Permalink
Bump black from 22.8.0 to 24.3.0 in /python/web (#1444)
Browse files Browse the repository at this point in the history
* Bump black from 22.8.0 to 24.3.0 in /python/web

Bumps [black](https://github.com/psf/black) from 22.8.0 to 24.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@22.8.0...24.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>

* Github CI: Backend web test runner use python 3.9.19

* Reformat python sources with black

* Docker: Bump to python 3.9-slim image for pytest

* Bump pytest version to 8.1.1

* Bump more library versions, and freeze them

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Markstedt <[email protected]>
  • Loading branch information
dependabot[bot] and rdmark authored Mar 22, 2024
1 parent dd9a329 commit 52e4a92
Show file tree
Hide file tree
Showing 30 changed files with 54 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: 3.7.15
python-version: 3.9.19
cache: 'pip'

- run: pip install -r web/requirements-dev.txt
Expand Down
2 changes: 1 addition & 1 deletion docker/pytest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-slim
FROM python:3.9-slim
ENV DOCKER=1

WORKDIR /src
Expand Down
6 changes: 3 additions & 3 deletions python/common/src/piscsi/piscsi_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ def list_images(self):
if PurePath(member["path"]).suffix.lower()[1:] == PROPERTIES_SUFFIX:
member["is_properties_file"] = True
elif f"{member['path']}.{PROPERTIES_SUFFIX}" in properties_files:
member[
"related_properties_file"
] = f"{member['path']}.{PROPERTIES_SUFFIX}"
member["related_properties_file"] = (
f"{member['path']}.{PROPERTIES_SUFFIX}"
)

archive_contents.append(member)
except (unarchiver.LsarCommandError, unarchiver.LsarOutputError):
Expand Down
1 change: 1 addition & 0 deletions python/common/src/piscsi/sys_cmds.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module with methods that interact with the Pi system
"""

import subprocess
import logging
import sys
Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module for central PiSCSI control board configuration parameters
"""

from ctrlboard_hw.ctrlboard_hw_constants import CtrlBoardHardwareConstants


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for interfacing between the menu controller and the PiSCSI Control Board hardware"""

import logging
from typing import Optional

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for test printing events when buttons from the PiSCSI Control Board are pressed"""

import observer
from ctrlboard_hw.hardware_button import HardwareButton
from ctrlboard_hw.encoder import Encoder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module providing the profile cycler class for the PiSCSI Control Board UI"""

from ctrlboard_menu_builder import CtrlBoardMenuBuilder
from menu.cycler import Cycler

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module providing the shutdown cycler for the PiSCSI Control Board UI """

from menu.cycler import Cycler


Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/ctrlboard_hw/ctrlboard_hw.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module providing the interface to the PiSCSI Control Board hardware"""

# noinspection PyUnresolvedReferences
import logging
import time
Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/ctrlboard_hw/encoder.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Module containing an implementation for reading the rotary encoder directions through
the i2c multiplexer + interrupt"""

from ctrlboard_hw.hardware_button import HardwareButton


Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/ctrlboard_hw/pca9554multiplexer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module for interfacting with the pca9554 multiplexer
"""

# pylint: disable=c-extension-no-member
import logging
import smbus
Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/ctrlboard_menu_builder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for building the control board UI specific menus"""

import logging

from menu.menu import Menu
Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module is the entry point for the PiSCSI Control Board UI"""

import argparse
import sys
import logging
Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/menu/blank_screensaver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module implementing a blank screensaver"""

from menu.screensaver import ScreenSaver


Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/menu/cycler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module that implements a button cycling functionality"""

from abc import abstractmethod
from menu.timer import Timer
from piscsi.file_cmds import FileCmds
Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/menu/menu.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for creating a menu"""

from typing import List


Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/menu/menu_builder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for creating menus"""

from abc import ABC, abstractmethod
from menu.menu import Menu

Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/menu/menu_controller.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module providing the menu controller."""

import time
import importlib
from typing import Dict, Optional
Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/menu/menu_renderer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module provides the abstract menu renderer class"""

import time
import math
import itertools
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module providing the Adafruit SSD1306 menu renderer class"""

# pylint: disable=import-error
from board import SCL, SDA
import busio
Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/menu/menu_renderer_luma_oled.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module providing the luma oled menu renderer class"""

from luma.core.interface.serial import i2c
from menu.menu_renderer import MenuRenderer

Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/menu/screensaver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module providing the menu screensaver class"""

from abc import abstractmethod
from menu.timer import Timer

Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/menu/timer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module providing a timer class"""

import time


Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/menu/transition.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module providing implementations for menu transitions."""

from abc import abstractmethod
from PIL import Image

Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/observable.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for Observable part of the Observer pattern functionality"""

from typing import List
from observer import Observer

Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/observer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module implementing the Observer part of the Observer pattern"""

from abc import ABC, abstractmethod


Expand Down
1 change: 1 addition & 0 deletions python/ctrlboard/src/piscsi_menu_controller.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module implementing the PiSCSI Control Board UI specific menu controller"""

from ctrlboard_menu_builder import CtrlBoardMenuBuilder
from menu.menu_builder import MenuBuilder
from menu.menu_controller import MenuController
Expand Down
1 change: 1 addition & 0 deletions python/oled/src/interrupt_handler.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Linux interrupt handling module
"""

import signal


Expand Down
27 changes: 23 additions & 4 deletions python/web/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
pytest==7.1.3
pytest-httpserver==1.0.6
black==22.8.0
attrs==23.2.0
black==24.3.0
certifi==2024.2.2
charset-normalizer==3.3.2
click==8.1.7
flake8==5.0.4
watchdog==2.1.9
idna==3.6
iniconfig==2.0.0
MarkupSafe==2.1.5
mccabe==0.7.0
mypy-extensions==1.0.0
packaging==24.0
pathspec==0.12.1
platformdirs==4.2.0
pluggy==1.4.0
py==1.11.0
pycodestyle==2.9.1
pyflakes==2.5.0
pytest==8.1.1
pytest_httpserver==1.0.10
requests==2.31.0
tomli==2.0.1
urllib3==2.2.1
vcgencmd==0.1.1
watchdog==4.0.0
Werkzeug==3.0.1

0 comments on commit 52e4a92

Please sign in to comment.