Repository navigation
ci: consolidate workflows, pin pylint, test Python 3.7–3.14 and all crypto backends - #741
Merged
Merged
Conversation
…rypto backends - Fix Pylint failure: newer pylint reports the conditional pyaes import as possibly-used-before-assignment (E0606); extend the existing suppression. - Replace test.yml, contrib.yml and pylint.yml with a single ci.yml: lint once on Python 3.12 with pylint pinned in requirements-dev.txt, test on 3.7-3.14 (adds 3.13/3.14, compileall per version), run tests.py once per AES backend with only that backend installed, and build/twine check the package. - Upgrade CodeQL from the deprecated v1 action to v4 (build-mode none). - Add Dependabot for GitHub Actions and the pylint pin. - Update AGENTS.md and README badges to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The consolidated workflows are internally consistent and all newly introduced CI jobs pass.
0 open findings
What changed in this PR
Consolidates and modernizes CI while expanding Python and crypto-backend coverage.
Changes:
- Unifies linting, testing, crypto, and packaging checks in
ci.yml. - Updates CodeQL and adds Dependabot maintenance.
- Pins Pylint, resolves its false positive, and updates CI documentation/badges.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Adds consolidated CI coverage. |
.github/workflows/test.yml |
Removes superseded test workflow. |
.github/workflows/contrib.yml |
Removes superseded contrib workflow. |
.github/workflows/pylint.yml |
Removes superseded lint workflow. |
.github/workflows/codeql-analysis.yml |
Modernizes CodeQL configuration. |
.github/dependabot.yml |
Adds monthly dependency updates. |
requirements-dev.txt |
Pins Pylint for consistent linting. |
tinytuya/core/crypto_helper.py |
Suppresses the new false-positive diagnostic. |
README.md |
Updates the CI badge. |
tinytuya/Contrib/README.md |
Updates the CI badge. |
AGENTS.md |
Documents the expanded CI process. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Why
Pylint started failing on master after #740:
The Pylint workflow ran an unpinned
pip install pylintacross Python 3.8/3.9/3.10, so each job got a different pylint (3.2.7 on 3.8, 4.1.3 on 3.10). pylint 4.x reports the conditionalpyaesimport as E0606 instead of E0601, and the existing suppression only covered E0601. It's a false positive:_AESCipher_pyaesis only selected when the import succeeded.While auditing CI I also found that CodeQL was on the deprecated
codeql-action@v1(it logs an "no longer updated or supported" error but still shows green), the test matrix stopped at 3.12, and only thecryptographyAES backend was ever tested.Changes
crypto_helper.pytopossibly-used-before-assignment.ci.ymlreplacestest.yml,contrib.yml,pylint.yml:requirements-dev.txt(4.1.3).ubuntu-22.04). Each job runscompileall(catches too-new syntax in modules the tests don't import),tests.py, thetest.pyusage path, andtestcontrib.py. Invocations changed frompython -m test.pytopython test.py.tests.pyonce per backend (cryptography, pycryptodome, pycryptodomex, pyaes) with only that backend installed, assertingcrypto_helperactually selected it.python -m build,twine check --strict, install wheel and import.master(PRs still run), concurrency cancels superseded runs,permissions: contents: read,fail-fast: false.v1→v4,build-mode: none(no autobuild for Python), explicitsecurity-events: write.ci.yml.Testing
pylint -Epasses on pylint 3.2.3 and 4.1.3.python -m testspasses locally on 3.8, 3.10, 3.12, 3.13, and on 3.12 with each of the four backends (pyaes skips the GCM tests as expected).python -m build+twine check --strictpass.Note: the old workflow names/badges (Build Test, Contrib Test, Pylint) stop updating once merged. Master has no branch protection referencing them.
No library behavior changes, so no RELEASE.md entry.
🤖 Generated with Claude Code