Skip to content
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

feat(bindings/python): add ruff as linter #4135

Merged
merged 10 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/bindings_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Ruff Check
working-directory: "bindings/python"
run: |
pip install ruff
ruff check .
- uses: PyO3/maturin-action@v1
with:
working-directory: "bindings/python"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,17 @@

import greenify

greenify.greenify()

from gevent import monkey

monkey.patch_all()

import timeit

import gevent
from boto3 import client as boto3_client
from mypy_boto3_s3 import S3Client
from pydantic import BaseSettings

greenify.greenify()

monkey.patch_all()

class Config(BaseSettings):
aws_region: str
Expand Down
4 changes: 4 additions & 0 deletions bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ benchmark = [
]
docs = ["pdoc"]
test = ["pytest", "python-dotenv", "pytest-asyncio"]
lint = ["ruff"]

[project.urls]
Documentation = "https://opendal.apache.org/docs/python/opendal.html"
Expand All @@ -52,3 +53,6 @@ Repository = "https://github.com/apache/opendal"
features = ["pyo3/extension-module"]
module-name = "opendal._opendal"
python-source = "python"

[tool.ruff.lint]
ignore = ["F403", "F405"]
Loading