Fix CI failures: validate_file return type, missing SPDX headers, test arg typo#23
Merged
bashandbone merged 2 commits intomainfrom Mar 27, 2026
Merged
Conversation
…ent typo Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> Agent-Logs-Url: https://github.com/knitli/exportify/sessions/3d21c435-34ca-46c3-a023-3e53e610b0e2
Copilot
AI
changed the title
[WIP] Fix CI test failures
Fix CI failures: validate_file return type, missing SPDX headers, test arg typo
Mar 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes CI failures across tests and reuse lint by aligning APIs with their declared signatures and ensuring SPDX/REUSE compliance for non-code files.
Changes:
- Fix
LateImportValidator.validate_file()to return the full metrics tuple as declared (issues, lateimport count, AST). - Add missing SPDX headers to
CHANGELOG.mdandcliff.tomlto satisfyreuse lint. - Fix a unit test calling
ASTParser.parse_file()with an invalid extra argument.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/test_ast_parser.py |
Removes an invalid extra argument to parse_file() so the test matches the parser API. |
src/exportify/validator/validator.py |
Makes validate_file() actually return the declared 3-tuple to prevent unpacking errors in callers/tests. |
cliff.toml |
Adds SPDX header for REUSE compliance. |
CHANGELOG.md |
Adds SPDX header (HTML comment style) for REUSE compliance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Three independent bugs were causing CI to fail across lint and all test matrix entries.
Changes
validator.py—validate_file()return value (root cause of 24 test failures): Method signature declared-> tuple[list[...], int, ast.AST | None]but the body unpacked_validate_file_with_metrics()and returned onlyissues. Every caller (tests +validate_files()) destructured the result asissues, _, _ = validator.validate_file(...), producingValueError: not enough values to unpack.CHANGELOG.md,cliff.toml— missing SPDX headers:reuse lintfailed because these two files had no copyright/license information. Added standard SPDX headers matching the rest of the repo.test_ast_parser.py— spurious argument in one test:test_annotated_assignment_attribute_targetcalledparser.parse_file(file_path, "test.module")butparse_fileonly acceptsfile_path. Removed the extra argument.Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.