Skip to content

ci: add python linters to cover future python code#225

Open
dmcilvaney wants to merge 1 commit into
microsoft:mainfrom
dmcilvaney:damcilva/add_python_linters
Open

ci: add python linters to cover future python code#225
dmcilvaney wants to merge 1 commit into
microsoft:mainfrom
dmcilvaney:damcilva/add_python_linters

Conversation

@dmcilvaney
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 3, 2026 20:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces Python linting/formatting (ruff) and type-checking (pyright) to ensure embedded (and future) Python code is held to consistent quality standards across local development (Mage), CI, and the devcontainer/editor setup.

Changes:

  • Add repository-wide ruff and pyright configurations (ruff.toml, pyrightconfig.json).
  • Extend Mage targets to support mage check python / mage fix python and include them in check all.
  • Add a dedicated GitHub Actions workflow and update developer docs/devcontainer/VS Code recommendations to support the new Python tooling.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ruff.toml Adds ruff lint/format configuration for Python code.
pyrightconfig.json Adds pyright type-check configuration and exclusions.
magefiles/magecheckfix/checkfix.go Adds check/fix python Mage targets and wires them into existing meta-targets.
internal/app/azldev/core/sources/render_process.py Updates embedded Python script to satisfy new linting/typing expectations (pathlib, typing, lint pragmas).
docs/developer/reference/coding-standards.md Documents the new Python lint/type-check standards and Mage commands.
docs/developer/how-to/get-started.md Adds developer onboarding guidance for installing ruff/pyright.
.vscode/settings.json Adds VS Code Python formatting/linting/type-check settings aligned with ruff/pyright.
.vscode/extensions.json Recommends VS Code extensions for Python linting/type-checking and EditorConfig.
.github/workflows/python.yml Adds CI workflow to run mage check python on PRs, pushes, and schedule.
.devcontainer/README.md Notes Python tooling availability in the devcontainer and installed extensions.
.devcontainer/Dockerfile.AZL-3.0 Installs Python/Node and ruff/pyright in the devcontainer image.
.devcontainer/devcontainer.json Adds Python-related VS Code extensions to devcontainer customization.

Comment thread magefiles/magecheckfix/checkfix.go
Comment thread ruff.toml
Copy link
Copy Markdown
Contributor

@Tonisal-byte Tonisal-byte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be very helpful (painful) for when I add azlpkg to the repo, approved!

branches: [main]
workflow_dispatch:
schedule:
# Run every night at 3:15am PST (11:15am UTC)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, why do we need the linters to run on as schedule? Is it not enough to have them run on push?

Copy link
Copy Markdown
Contributor Author

@dmcilvaney dmcilvaney Jun 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have it on the others, but probably don't truly need it. Mostly it catches if the linters themselves change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants