Skip to content

Commit 2434b9c

Browse files
committed
Update
1 parent f012bb1 commit 2434b9c

8 files changed

Lines changed: 27 additions & 112 deletions

File tree

.github/workflows/cd-linux-arm64.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
version-check:
1616
name: Check versioning
1717
runs-on: ubuntu-24.04-arm
18-
container: python:3.10-slim-trixie
18+
container: python:3.11-slim-trixie
1919
if: github.event_name == 'release'
2020
steps:
2121
- name: Checkout repository
@@ -41,7 +41,7 @@ jobs:
4141
build-onefile:
4242
name: Build onefile
4343
runs-on: ubuntu-24.04-arm
44-
container: python:3.10-slim-trixie
44+
container: python:3.11-slim-trixie
4545
steps:
4646
- name: Checkout repository
4747
uses: actions/checkout@v6
@@ -80,7 +80,7 @@ jobs:
8080
publish-binary:
8181
name: Publish binary
8282
runs-on: ubuntu-24.04-arm
83-
container: python:3.10-slim-trixie
83+
container: python:3.11-slim-trixie
8484
needs: [build-onefile, version-check]
8585
if: github.event_name == 'release'
8686
permissions:

.github/workflows/cd-linux-x64.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
version-check:
1616
name: Check versioning
1717
runs-on: ubuntu-latest
18-
container: python:3.10-slim-bookworm
18+
container: python:3.11-slim-bookworm
1919
if: github.event_name == 'release'
2020
steps:
2121
- name: Checkout repository
@@ -41,7 +41,7 @@ jobs:
4141
build-onefile:
4242
name: Build onefile
4343
runs-on: ubuntu-latest
44-
container: python:3.10-slim-bookworm
44+
container: python:3.11-slim-bookworm
4545
steps:
4646
- name: Checkout repository
4747
uses: actions/checkout@v6
@@ -80,7 +80,7 @@ jobs:
8080
publish-binary:
8181
name: Publish binary
8282
runs-on: ubuntu-latest
83-
container: python:3.10-slim-bookworm
83+
container: python:3.11-slim-bookworm
8484
needs: [build-onefile, version-check]
8585
if: github.event_name == 'release'
8686
permissions:

.github/workflows/cd-pypi.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
check-package-version:
1616
name: Check package version
1717
runs-on: ubuntu-latest
18-
container: python:3.10-slim
18+
container: python:3.11-slim
1919
steps:
2020
- name: Checkout repository
2121
uses: actions/checkout@v6
@@ -30,7 +30,7 @@ jobs:
3030
check-tag-version:
3131
name: Check tag version
3232
runs-on: ubuntu-latest
33-
container: python:3.10-slim
33+
container: python:3.11-slim
3434
if: github.event_name == 'release'
3535
steps:
3636
- name: Checkout repository
@@ -48,7 +48,7 @@ jobs:
4848
build:
4949
name: Build
5050
runs-on: ubuntu-latest
51-
container: python:3.10-slim
51+
container: python:3.11-slim
5252
needs: check-package-version
5353
steps:
5454
- name: Checkout repository

.github/workflows/ci.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
pyproject-lock-file-check:
1515
name: Check pyproject syntax
1616
runs-on: ubuntu-latest
17-
container: python:3.10-slim
17+
container: python:3.11-slim
1818
steps:
1919
- name: Checkout repository
2020
uses: actions/checkout@v6
@@ -25,7 +25,7 @@ jobs:
2525
format-code:
2626
name: Check code format
2727
runs-on: ubuntu-latest
28-
container: python:3.10-slim
28+
container: python:3.11-slim
2929
steps:
3030
- name: Checkout repository
3131
uses: actions/checkout@v6
@@ -41,7 +41,7 @@ jobs:
4141
lint-style:
4242
name: Check code style
4343
runs-on: ubuntu-latest
44-
container: python:3.10-slim
44+
container: python:3.11-slim
4545
steps:
4646
- name: Checkout repository
4747
uses: actions/checkout@v6
@@ -57,7 +57,7 @@ jobs:
5757
lint-typing:
5858
name: Check static typing
5959
runs-on: ubuntu-latest
60-
container: python:3.10-slim
60+
container: python:3.11-slim
6161
steps:
6262
- name: Checkout repository
6363
uses: actions/checkout@v6
@@ -84,7 +84,7 @@ jobs:
8484
check-version-accordance-flatpak-metadata:
8585
name: Check for version accordance with Flatpak metadata file
8686
runs-on: ubuntu-latest
87-
container: python:3.10-slim
87+
container: python:3.11-slim
8888
steps:
8989
- name: Checkout repository
9090
uses: actions/checkout@v6

nitrokeyapp/exceptions.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

nitrokeyapp/settings_tab/__init__.py

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,19 @@ def field_btn(self) -> None:
196196

197197
loc = QLineEdit.ActionPosition.TrailingPosition
198198
self.action_current_password_show = self.ui.current_password.addAction(icon_visibility, loc)
199-
self.action_current_password_show.triggered.connect(self.act_current_password_show)
200-
201199
self.action_new_password_show = self.ui.new_password.addAction(icon_visibility, loc)
202-
self.action_new_password_show.triggered.connect(self.act_new_password_show)
203-
204200
self.action_repeat_password_show = self.ui.repeat_password.addAction(icon_visibility, loc)
205-
self.action_repeat_password_show.triggered.connect(self.act_repeat_password_show)
201+
202+
for field, action in [
203+
(self.ui.current_password, self.action_current_password_show),
204+
(self.ui.new_password, self.action_new_password_show),
205+
(self.ui.repeat_password, self.action_repeat_password_show),
206+
]:
207+
action.triggered.connect(
208+
lambda f=field, a=action: self._set_password_visibility(
209+
f, a, f.echoMode() == QLineEdit.EchoMode.Password
210+
)
211+
)
206212

207213
self.show_current_password_check = self.ui.current_password.addAction(icon_check, loc)
208214
self.show_current_password_false = self.ui.current_password.addAction(icon_false, loc)
@@ -388,30 +394,11 @@ def reset_action(self) -> None:
388394

389395
def _set_password_visibility(self, field: QLineEdit, action: QAction, show: bool) -> None:
390396
icon = SHOW_ICON if show else HIDE_ICON
391-
mode = QLineEdit.Normal if show else QLineEdit.Password # type: ignore [attr-defined]
397+
mode = QLineEdit.EchoMode.Normal if show else QLineEdit.EchoMode.Password
392398
field.setEchoMode(mode)
393399
action.setIcon(icon)
394400

395-
def act_current_password_show(self) -> None:
396-
show = self.ui.current_password.echoMode() == QLineEdit.Password # type: ignore [attr-defined]
397-
self._set_password_visibility(self.ui.current_password, self.action_current_password_show, show)
398-
399-
def act_new_password_show(self) -> None:
400-
show = self.ui.new_password.echoMode() == QLineEdit.Password # type: ignore [attr-defined]
401-
self._set_password_visibility(self.ui.new_password, self.action_new_password_show, show)
402-
403-
def act_repeat_password_show(self) -> None:
404-
show = self.ui.repeat_password.echoMode() == QLineEdit.Password # type: ignore [attr-defined]
405-
self._set_password_visibility(self.ui.repeat_password, self.action_repeat_password_show, show)
406-
407-
def set_current_password_show(self, show: bool = True) -> None:
408-
self._set_password_visibility(self.ui.current_password, self.action_current_password_show, show)
409-
410-
def set_new_password_show(self, show: bool = True) -> None:
411-
self._set_password_visibility(self.ui.new_password, self.action_new_password_show, show)
412401

413-
def set_repeat_password_show(self, show: bool = True) -> None:
414-
self._set_password_visibility(self.ui.repeat_password, self.action_repeat_password_show, show)
415402

416403
def set_device_data(
417404
self, path: str, uuid: str, version: str, variant: str, init_status: str

nitrokeyapp/welcome_tab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def check_update(self) -> None:
3535
return
3636

3737
current = Version.from_str(__version__)
38-
latest = Version.from_str(str(release)[1:])
38+
latest = Version.from_v_str(release.tag)
3939

4040
if current < latest:
4141
self.ui.CheckUpdate.setText("update available")

nitrokeyapp/windows_notification.py

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)