Feature/ci and build#1
Merged
Merged
Conversation
added 2 commits
March 16, 2026 08:48
- GitHub Actions CI workflow with two jobs: - lint: flake8 + pylint static code analysis - build: PyInstaller .exe generation (runs after lint passes) - .flake8 config with max-line-length=120 - requirements.txt for runtime dependencies - requirements-build.txt for build dependencies (PyInstaller) - stm32_easy_flash.spec for PyInstaller one-file console .exe - .gitignore: exclude *.spec but keep stm32_easy_flash.spec
- Fix import order: stdlib before third-party (keyboard) - Add module docstring - Add function docstring for flash_mcu() - Replace bare Exception catch with OSError - Use 'with' statement for subprocess.Popen - Remove trailing whitespace and fix blank lines - pylint score: 10.00/10, flake8: 0 warnings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces automated CI for linting and building, adds configuration files for code quality, and improves the structure and reliability of the
stm32_easy_flash.pyscript and its build process. The most important changes are grouped below:Continuous Integration & Automation:
.github/workflows/ci.yml) to automatically lint (flake8,pylint) and build the project executable on Windows, uploading the artifact for download.Build System & Dependencies:
stm32_easy_flash.specfile for PyInstaller to define how the executable is built, including hidden imports forkeyboard.requirements-build.txtfile listing build dependencies (keyboard,pyinstaller).Code Quality & Linting:
.flake8configuration file to set line length and exclude certain directories from linting.Codebase Improvements:
stm32_easy_flash.py, added error handling forOSError, and used a context manager (with) for running the subprocess, ensuring better resource management. [1] [2] [3]