Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/test-prep/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ runs:
using: "composite"
steps:
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.10"
- name: Install test dependencies
Expand All @@ -18,7 +18,7 @@ runs:
shell: bash
run: sudo iptables -I DOCKER-USER -j ACCEPT
- name: Fetch snap
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: microk8s.snap
path: build
4 changes: 2 additions & 2 deletions .github/workflows/build-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.8
python-version: "3.10"
- name: Install Python requirements
run: python -m pip install -r ../requirements.txt
- name: Build exe
Expand Down
2 changes: 1 addition & 1 deletion installer/common/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
logger = logging.getLogger(__name__)


def _file_reader_iter(path: str, block_size=2 ** 20):
def _file_reader_iter(path: str, block_size=2**20):
with open(path, "rb") as f:
block = f.read(block_size)
while len(block) > 0:
Expand Down
3 changes: 1 addition & 2 deletions installer/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ progressbar33==2.4
psutil==5.9.0
requests==2.32.2
requests_unixsocket==0.1.5
pysha3==1.0.2; python_version < '3.6'
simplejson==3.8.2
toml==0.10.0
certifi==2024.7.4
chardet==3.0.4
idna==3.7
pyinstaller
https://pyyaml.org/download/pyyaml/PyYAML-5.3.1-cp38-cp38-win_amd64.whl; sys_platform == 'win32'
PyYAML==6.0.2; sys_platform == 'win32'
4 changes: 2 additions & 2 deletions installer/vm_providers/_multipass/_multipass_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def launch(
mem: str = None,
disk: str = None,
remote: str = None,
cloud_init: str = None
cloud_init: str = None,
) -> None:
"""Passthrough for running multipass launch.

Expand Down Expand Up @@ -259,7 +259,7 @@ def mount(
source: str,
target: str,
uid_map: Dict[str, str] = None,
gid_map: Dict[str, str] = None
gid_map: Dict[str, str] = None,
) -> None:
"""Passthrough for running multipass mount.

Expand Down
18 changes: 9 additions & 9 deletions installer/vm_providers/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def __init__(
provider_name: str,
action: str,
error_message: Optional[str] = None,
exit_code: Optional[int] = None
exit_code: Optional[int] = None,
) -> None:
if exit_code is not None and error_message is not None:
fmt = self._FMT_ERROR_MESSAGE_AND_EXIT_CODE
Expand Down Expand Up @@ -118,7 +118,7 @@ def __init__(
*,
provider_name: str,
error_message: Optional[str] = None,
exit_code: Optional[int] = None
exit_code: Optional[int] = None,
) -> None:
super().__init__(
action="launch",
Expand All @@ -134,7 +134,7 @@ def __init__(
*,
provider_name: str,
error_message: Optional[str] = None,
exit_code: Optional[int] = None
exit_code: Optional[int] = None,
) -> None:
super().__init__(
action="start",
Expand All @@ -150,7 +150,7 @@ def __init__(
*,
provider_name: str,
error_message: Optional[str] = None,
exit_code: Optional[int] = None
exit_code: Optional[int] = None,
) -> None:
super().__init__(
action="stop",
Expand All @@ -166,7 +166,7 @@ def __init__(
*,
provider_name: str,
error_message: Optional[str] = None,
exit_code: Optional[int] = None
exit_code: Optional[int] = None,
) -> None:
super().__init__(
action="delete",
Expand Down Expand Up @@ -199,7 +199,7 @@ def __init__(
*,
provider_name: str,
error_message: Optional[str] = None,
exit_code: Optional[int] = None
exit_code: Optional[int] = None,
) -> None:
super().__init__(
action="shell",
Expand All @@ -215,7 +215,7 @@ def __init__(
*,
provider_name: str,
error_message: Optional[str] = None,
exit_code: Optional[int] = None
exit_code: Optional[int] = None,
) -> None:
super().__init__(
action="mount",
Expand All @@ -231,7 +231,7 @@ def __init__(
*,
provider_name: str,
error_message: Optional[str] = None,
exit_code: Optional[int] = None
exit_code: Optional[int] = None,
) -> None:
super().__init__(
action="unmount",
Expand All @@ -247,7 +247,7 @@ def __init__(
*,
provider_name: str,
error_message: Optional[str] = None,
exit_code: Optional[int] = None
exit_code: Optional[int] = None,
) -> None:
super().__init__(
action="copy files",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[tool.black]
line-length = 100
target-version = ['py35']
target-version = ['py310']
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ envdir = {toxinidir}/.tox_env
passenv =
MK8S_*
deps =
black ==21.4b2
click==7.1.2
black ==24.10.0
flake8
flake8-colors
pep8-naming
Expand All @@ -21,7 +20,7 @@ deps =
commands =
flake8 --max-line-length=120 --ignore=C901,N801,N802,N803,N806,N816,W503,E203
codespell --ignore-words-list="aks,ccompiler,NotIn" --quiet-level=2 --skip="*.patch,*.spec,.tox_env,.git,*.nsi"
black --diff --check --exclude "/(\.eggs|\.git|\.tox|\.venv|\.build|dist|charmhelpers|mod)/" .
black --diff --check --exclude "/(\.eggs|\.git|\.tox|\.tox_env|\.venv|\.build|dist|charmhelpers|mod)/" .

[testenv:scripts]
setenv = PYTHONPATH={toxinidir}/scripts
Expand Down
Loading