Skip to content

Commit 57b620b

Browse files
authored
Add linting via pre-commit (#2)
1 parent f0a08e8 commit 57b620b

File tree

6 files changed

+54
-2
lines changed

6 files changed

+54
-2
lines changed

.github/workflows/lint.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lint
2+
3+
on:
4+
# Trigger the workflow on push or pull request, but only on main branch
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
12+
permissions:
13+
contents: read # to fetch code
14+
15+
jobs:
16+
pre-commit:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up Python 3.12
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: 3.12
24+
- uses: pre-commit/action@v3.0.0

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.egg-info
2+
Pipfile

.pre-commit-config.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.6.0
4+
hooks:
5+
- id: check-ast
6+
- id: check-merge-conflict
7+
- id: check-toml
8+
- id: check-yaml
9+
- id: end-of-file-fixer
10+
- id: trailing-whitespace
11+
- id: debug-statements
12+
- repo: https://github.com/google/pyink
13+
rev: 24.3.0
14+
hooks:
15+
- id: pyink
16+
language_version: python3.12
17+
args: [
18+
"--line-length=80",
19+
"--preview",
20+
"--pyink-indentation=2",
21+
"--pyink-use-majority-quotes"
22+
]
23+
- repo: https://github.com/astral-sh/ruff-pre-commit
24+
rev: v0.6.1
25+
hooks:
26+
- id: ruff

LICENSE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,3 @@
200200
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201201
See the License for the specific language governing permissions and
202202
limitations under the License.
203-

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
This is a work-in-progress meta-package for the AI/ML stack built on top of the
44
[jax](http://github.com/google/jax/) package. It is intended as a location for
55
tests, documentation, and installation instructions that cover multiple
6-
packages in the JAX ecosystem.
6+
packages in the JAX ecosystem.

jax_ml_stack/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
"""jax_ml_stack metapackage."""
2+
23
__version__ = "0.0.1" # keep in sync with pyproject.toml

0 commit comments

Comments
 (0)