Replace pylint with ruff (#5987)

This commit is contained in:
Chenlei Hu 2024-12-09 19:04:23 -08:00 committed by GitHub
parent 23827ca312
commit a220d11e6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 339 additions and 335 deletions

View File

@ -3,8 +3,8 @@ name: Python Linting
on: [push, pull_request]
jobs:
pylint:
name: Run Pylint
ruff:
name: Run Ruff
runs-on: ubuntu-latest
steps:
@ -16,8 +16,8 @@ jobs:
with:
python-version: 3.x
- name: Install Pylint
run: pip install pylint
- name: Install Ruff
run: pip install ruff
- name: Run Pylint
run: pylint --rcfile=.pylintrc $(find . -type f -name "*.py")
- name: Run Ruff
run: ruff check .

View File

@ -1,3 +0,0 @@
[MESSAGES CONTROL]
disable=all
enable=eval-used, unused-import

View File

@ -19,7 +19,6 @@
"source": [
"#@title Environment Setup\n",
"\n",
"from pathlib import Path\n",
"\n",
"OPTIONS = {}\n",
"\n",

8
ruff.toml Normal file
View File

@ -0,0 +1,8 @@
# Disable all rules by default
lint.ignore = ["ALL"]
# Enable specific rules
lint.select = [
"S307", # suspicious-eval-usage
"F401", # unused-import
]