Skip to content

Replace Pylint with Ruff for Python linting #1079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

edespino
Copy link
Contributor

  • Remove Pylint installation, configuration, and invocation from the Makefile.

  • Remove the GPL-licensed tarball: gpMgmt/bin/pythonSrc/ext/pylint-0.21.0.tar.gz

  • Remove the old Pylint configuration file (.rcfile) since it is no longer relevant.

  • Introduce Ruff installation via the official installation script.

  • Dynamically install Ruff instead of storing tarballs or source files.

  • Update checkcode target to run Ruff instead of Pylint.

  • Clean up references to Pylint tarballs in the clean/distclean target.

  • Update LICENSE and add license/LICENSE-ruff.txt

  • Add new pyproject.toml file to configure Ruff:

    [tool.ruff] line-length = 88

    [tool.ruff.lint] select = ["E", "F", "W"]

Note: Ruff installation requires internet access during the first run.

Note: The removal of the Pylint .rcfile requires eventual replacement with
corresponding Ruff configuration enhancements if more complex rules
are needed in the future.

This change only introduces Ruff into the workflow. It does not attempt to fix or address any issues that Ruff may report.

@edespino edespino requested a review from tuhaihe April 29, 2025 08:12
@edespino edespino mentioned this pull request Apr 29, 2025
12 tasks
- Remove Pylint installation, configuration, and invocation from the Makefile.
- Remove the GPL-licensed tarball:
  gpMgmt/bin/pythonSrc/ext/pylint-0.21.0.tar.gz
- Remove the old Pylint configuration file (.rcfile) since it is no longer
  relevant.
- Introduce Ruff installation via the official installation script.
- Dynamically install Ruff instead of storing tarballs or source files.
- Update checkcode target to run Ruff instead of Pylint.
- Clean up references to Pylint tarballs in the clean/distclean target.
- Add new pyproject.toml file to configure Ruff:

  [tool.ruff]
  line-length = 88

  [tool.ruff.lint]
  select = ["E", "F", "W"]

Note: Ruff installation requires internet access during the first run.

Note: The removal of the Pylint .rcfile requires eventual replacement with
      corresponding Ruff configuration enhancements if more complex rules
      are needed in the future.

This change only introduces Ruff into the workflow. It does not attempt
to fix or address any issues that Ruff may report.
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.

2 participants