ci(devtool): Add mypy and pytest to devtool#6770
Draft
danieljanes wants to merge 1 commit intoadd-tooling-to-devtoolfrom
Draft
ci(devtool): Add mypy and pytest to devtool#6770danieljanes wants to merge 1 commit intoadd-tooling-to-devtoolfrom
danieljanes wants to merge 1 commit intoadd-tooling-to-devtoolfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the devtool developer tooling package and its CI wiring by adding new lint dependencies/configuration, introducing dedicated devtool format/test scripts, and adjusting several existing devtool Python utilities and bootstrap scripts.
Changes:
- Add
tomli(Py<3.11 fallback) andpylinttodevtool, update relateduv.lockfiles, and configure isort/black/pylint indev/pyproject.toml. - Add
dev/test-devtool.sh+dev/format-devtool.shand a new GitHub Actions workflow to lintdevtoolon PRs/pushes. - Refactor various
devtoolPython scripts for argument validation and minor style/robustness tweaks (e.g.,tomllibfallback, encoding).
Reviewed changes
Copilot reviewed 15 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
framework/uv.lock |
Propagates updated editable devtool deps (e.g., tomli, pylint) into framework lock metadata. |
dev/venv-reset.sh |
Makes paths robust via SCRIPT_DIR/REPO_ROOT/FRAMEWORK_ROOT and uses absolute script paths. |
dev/uv.lock |
Updates devtool environment lock (resolution markers, adds pylint dependency tree, tomli markers). |
dev/test-devtool.sh |
Adds dedicated devtool lint script (isort/black/pylint). |
dev/pyproject.toml |
Adds tomli + pylint, updates isort/black targets, and configures pylint disables. |
dev/format-devtool.sh |
Adds dedicated devtool formatter script (isort/black). |
dev/devtool/init_py_fix.py |
Updates CLI arg validation and adjusts unused return handling. |
dev/devtool/init_py_check.py |
Updates CLI arg validation. |
dev/devtool/fix_copyright.py |
Updates CLI arg validation and adjusts unused return handling. |
dev/devtool/check_pr_title.py |
Adds tomllib/tomli fallback and minor control-flow/docstring improvements. |
dev/devtool/check_copyright.py |
Simplifies regex definition, updates CLI arg validation and adjusts unused return handling. |
dev/devtool/build_example_docs.py |
Refactors constants/naming, improves formatting, and uses explicit UTF-8 encoding for file IO. |
dev/changelog_config.toml |
Allows devtool as a valid <PR_PROJECT> in PR title checks. |
dev/bootstrap.sh |
Makes paths robust and ensures operations run relative to the framework directory. |
dev/bootstrap-uv.sh |
Makes paths robust and ensures uv sync runs from the framework directory. |
dev/README.md |
Documents the new devtool-only test/format scripts. |
datasets/uv.lock |
Propagates updated editable devtool deps (e.g., tomli, pylint) into datasets lock metadata. |
.gitignore |
Ignores local pylint cache directory .pylint.d/. |
.github/workflows/devtool-test.yml |
Adds CI workflow to lint devtool across Python 3.10–3.13 using uv. |
Comments suppressed due to low confidence (1)
dev/devtool/init_py_check.py:125
- The CLI arg loop iterates over sys.argv (including argv[0], the script/module name). Given the "len(sys.argv) < 2" validation, this should iterate over sys.argv[1:] to avoid treating the module name as a path.
if __name__ == "__main__":
if len(sys.argv) < 2:
raise ValueError(
"Please provide at least one directory path relative "
"to your current working directory."
)
for i, _ in enumerate(sys.argv):
abs_path: str = os.path.abspath(os.path.join(os.getcwd(), sys.argv[i]))
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
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.
Merge after #6768
This PR
devtoolto comply with mypy strict mode