Skip to content

Syntax review#446

Merged
robin-nitrokey merged 1 commit into
Nitrokey:mainfrom
ABuljko:syntax-review
Jun 30, 2026
Merged

Syntax review#446
robin-nitrokey merged 1 commit into
Nitrokey:mainfrom
ABuljko:syntax-review

Conversation

@ABuljko

@ABuljko ABuljko commented Jun 26, 2026

Copy link
Copy Markdown
Contributor
  • Python 3.11 syntax modernization across 28 files (X | None, list[X], collections.abc imports)
  • Unused and redundant code removed (dead assignments, duplicate methods, simplified functions)
  • Legacy files deleted (exceptions.py, windows_notification.py)
  • Suggestions implemented (Qt6 enums, _set_password_visibility helper, Version.from_v_str)
  • pyproject.toml and poetry.lock updated to require Python >=3.11
  • CI/CD workflows updated to Python 3.11 (Linux containers + macOS brew)
  • Code style fixed (ruff format + ruff check --fix)

@ABuljko ABuljko requested a review from a team as a code owner June 26, 2026 23:24
@ABuljko ABuljko requested review from daringer, james-knippes, mmerklinger, robin-nitrokey and sosthene-nitrokey and removed request for a team June 26, 2026 23:24
@ABuljko

ABuljko commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@robin-nitrokey should I ignore the errors for now since they are appearing because the GitHub Actions environment doesn't have Python 3.11+ installed 🤔 👀

Should I put it back to 3.10?

Comment thread nitrokeyapp/welcome_tab.py Outdated

@robin-nitrokey robin-nitrokey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I ignore the errors for now since they are appearing because the GitHub Actions environment doesn't have Python 3.11+ installed 🤔 👀

You can update the container used in the CI from python:3.10-slim to python:3.11-slim.

Comment thread nitrokeyapp/settings_tab/__init__.py Outdated
Comment thread nitrokeyapp/settings_tab/__init__.py Outdated
@ABuljko ABuljko requested a review from robin-nitrokey June 29, 2026 09:36
@robin-nitrokey

Copy link
Copy Markdown
Member

Thanks for the fixes! Please rebase onto main and squash the changes into one commit with a descriptive commit message.

@ABuljko

ABuljko commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

How do I fix this BTW
I personally do not know :( (it happens when one of my PR gets merged and the Active PRs become outdated)
image

@robin-nitrokey

Copy link
Copy Markdown
Member

You can fix it by rebasing your PR branch on the latest main.

@ABuljko

ABuljko commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Updated the description

Comment thread .github/workflows/cd-macos-arm64.yaml Outdated
@robin-nitrokey

Copy link
Copy Markdown
Member

Thanks. Please squash the changes into one commit and update its description.

@ABuljko

ABuljko commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. Please squash the changes into one commit and update its description.

Done ❤️ 🍀

- Modernize type hints: `X | None`, `list[X]`, `collections.abc` imports across 28 files
- Remove unused code: dead assignments, duplicate methods, legacy files (`exceptions.py`, `windows_notification.py`)
- Apply reviewer suggestions: Qt6 enums, `_set_password_visibility` helper, `Version.from_v_str`
- Bump `pyproject.toml` to `requires-python = ">=3.11"`, regenerate `poetry.lock`
- Update CI/CD workflows to Python 3.11 (Linux containers + macOS brew with `--overwrite`)
- Fix code style: `ruff format` + `ruff check --fix`
@robin-nitrokey robin-nitrokey merged commit 2798e25 into Nitrokey:main Jun 30, 2026
32 checks passed
@robin-nitrokey

Copy link
Copy Markdown
Member

Thanks, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants