← Back to issue list

lint: fix for pyright 1.1.312

View original Github issue

Metadata

Project
snapcraft
Number
#4205
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Merged #4205 (commit 6b94548db), fixing login argument typing for Pyright 1.1.312 so lint passes.

Resolution: closed resolved

Reason: PR #4205 was approved and merged into main as merge commit 8542f8e. Commit 6b94548db resolves the new Pyright kwargs type-checking errors.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [X] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [X] Have you successfully run `make lint`? - [ ] Have you successfully run `pytest tests/unit`? ----- [Pyright 1.1.312](https://github.com/microsoft/pyright/releases/tag/1.1.312) now type-checks `kwargs`. This started causing the following error: ```shell lint-pyright: commands[0]> pyright added 1 package, and audited 2 packages in 2s found 0 vulnerabilities /home/developer/dev/snapcraft/snapcraft/commands/account.py /home/developer/dev/snapcraft/snapcraft/commands/account.py:215:68 - error: Argument of type "str | int" cannot be assigned to parameter "ttl" of type "int" in function "login"   Type "str | int" cannot be assigned to type "int"     "str" is incompatible with "int" (reportGeneralTypeIssues) /home/developer/dev/snapcraft/snapcraft/commands/account.py:215:68 - error: Argument of type "str | int" cannot be assigned to parameter "acls" of type "Sequence[str] | None" in function "login"   Type "str | int" cannot be assigned to type "Sequence[str] | None"     Type "int" cannot be assigned to type "Sequence[str] | None"       "int" is incompatible with "Sequence[str]"       Type cannot be assigned to type "None" (reportGeneralTypeIssues) /home/developer/dev/snapcraft/snapcraft/commands/account.py:215:68 - error: Argument of type "str | int" cannot be assigned to parameter "packages" of type "Sequence[str] | None" in function "login"   Type "str | int" cannot be assigned to type "Sequence[str] | None"     Type "int" cannot be assigned to type "Sequence[str] | None"       "int" is incompatible with "Sequence[str]"       Type cannot be assigned to type "None" (reportGeneralTypeIssues) /home/developer/dev/snapcraft/snapcraft/commands/account.py:215:68 - error: Argument of type "str | int" cannot be assigned to parameter "channels" of type "Sequence[str] | None" in function "login"   Type "str | int" cannot be assigned to type "Sequence[str] | None"     Type "int" cannot be assigned to type "Sequence[str] | None"       "int" is incompatible with "Sequence[str]"       Type cannot be assigned to type "None" (reportGeneralTypeIssues) 4 errors, 0 warnings, 0 informations ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged #4205 (commit 6b94548db), fixing login argument typing for Pyright 1.1.312 so lint passes.
stealth/space-bunny-alpha — closed resolved Merged #4205 (commit 4ce377ce8), fixing Pyright 1.1.312 kwargs type errors in account.py with a two-line typing adjustment.
qwen/qwen3.6-35b-a3b — — Merged a fix for type errors in account.py triggered by Pyright 1.1.312's stricter kwargs validation. The change corrects type annotations, passes CI, and was approved by a reviewer.
qwen3.6-35b-a3b-mtp-q6 — — Merged a fix for pyright 1.1.312 type errors in account.py. Resolved kwargs type mismatches for ttl, acls, packages, and channels. Maintainer mr-cal merged the change, achieving 100% diff coverage with no overall coverage impact.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#58 lint: fix typing issues with updated pyright craft-archives merged Merged PR #58 as commit 7983916, fixing typing issues across seven files after Pyright was updated.
77%
#701 build(deps): update pyright to 1.1.358 craft-parts merged Merged the Pyright 1.1.358 dependency update in #701 as commit 9a30c724; follow-up lint issues were fixed by #702.
75%
#4080 lint: initialize retcode to satisfy pyright snapcraft merged Merged #4080 as commit 7ca78d626, initializing the CLI return code to satisfy Pyright.
73%
#4485 style(lint): fix pyright errors snapcraft merged Merged PR #4485, fixing Pyright lint errors across nine files with three reviewer approvals.
72%
#531 lint: update and freeze pyright craft-parts merged Merged in PR #531 as commit 2a4e7f2e, updating and freezing the Pyright version for reproducible linting.
71%
#177 linting: address pyright issues craft-parts merged Merged in craft-parts#177: updated type declarations for Pyright 1.1.225, added Optional for arguments that may be None, and fixed callback annotation typos.
70%
#613 build(deps): update pyright to 1.1.373 craft-providers merged Merged PR #613 updated pyright to 1.1.373 in commit 0f8df4f.
70%
#342 type: fix pyright possibly-unbound error rockcraft merged Merged PR #342 fixed a Pyright possibly-unbound diagnostic with a small one-file change, landing as commit 06629929.
70%