Skip to content

Commit 7c4e881

Browse files
Add Ruff Linter (#20)
1 parent 8985da2 commit 7c4e881

19 files changed

+471
-383
lines changed

CLAUDE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ mkdocs serve # Start local docs server
6666
mkdocs build # Build static documentation
6767
```
6868

69+
### Code Formatting
70+
This project uses [Ruff](https://github.com/astral-sh/ruff) for code formatting and linting.
71+
72+
```bash
73+
poetry run ruff format . # Format code
74+
poetry run ruff check . # Run linter
75+
poetry run ruff check . --fix # Run linter with auto-fix
76+
```
77+
6978
### Package Management
7079
Please refer to RELEASE.md for more details.
7180
```bash

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# PySpark Data Sources
22

33
[![pypi](https://img.shields.io/pypi/v/pyspark-data-sources.svg?color=blue)](https://pypi.org/project/pyspark-data-sources/)
4+
[![code style: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
45

56
This repository showcases custom Spark data sources built using the new [**Python Data Source API**](https://spark.apache.org/docs/4.0.0/api/python/tutorial/sql/python_data_source.html) introduced in Apache Spark 4.0.
67
For an in-depth understanding of the API, please refer to the [API source code](https://github.com/apache/spark/blob/master/python/pyspark/sql/datasource.py).
@@ -100,3 +101,17 @@ poetry env activate
100101
```
101102
mkdocs serve
102103
```
104+
105+
### Code Formatting
106+
This project uses [Ruff](https://github.com/astral-sh/ruff) for code formatting and linting.
107+
108+
```bash
109+
# Format code
110+
poetry run ruff format .
111+
112+
# Run linter
113+
poetry run ruff check .
114+
115+
# Run linter with auto-fix
116+
poetry run ruff check . --fix
117+
```

0 commit comments

Comments
 (0)