Skip to content

Commit 22bf764

Browse files
committed
Modern linting and packaging tooling and config
1 parent 90d6658 commit 22bf764

File tree

5 files changed

+62
-59
lines changed

5 files changed

+62
-59
lines changed

.github/workflows/testing.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ jobs:
1515
uses: actions/setup-python@v4
1616
with:
1717
python-version: 3.11
18-
- name: Install ruff
18+
- name: Install pre-commit
1919
shell: bash
2020
run: |
2121
python -V
22-
python -m pip install ruff
23-
- name: Run ruff
22+
python -m pip install pre-commit
23+
- name: Run pre-commit linters
2424
shell: bash
2525
run: |
26-
ruff .
26+
pre-commit run --files *
2727
2828
build:
2929
strategy:

.pre-commit-config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- repo: https://github.com/psf/black
9+
rev: 23.9.1
10+
hooks:
11+
- id: black
12+
- repo: https://github.com/astral-sh/ruff-pre-commit
13+
rev: v0.0.292
14+
hooks:
15+
- id: ruff
16+
args: ["--fix", "--show-source"]

dev-requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# Dependencies for running the tests with pytest
1+
# Linting tools
22
ruff
3+
pre-commit
4+
# Dependencies for running the tests with pytest
35
pytest
46
pytest-cov
57
psutil

pyproject.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[build-system]
2+
requires = ["flit_core"]
3+
build-backend = "flit_core.buildapi"
4+
5+
[tool.flit.metadata]
6+
module = "cloudpickle"
7+
author = "The cloudpickle developer team"
8+
author-email='[email protected]'
9+
home-page = "https://github.com/cloudpipe/cloudpickle"
10+
description-file = "README.md"
11+
requires-python = ">=3.8"
12+
license = "BSD-3-Clause"
13+
classifiers = [
14+
'Development Status :: 5 - Production/Stable',
15+
'Intended Audience :: Developers',
16+
'License :: OSI Approved :: BSD License',
17+
'Operating System :: POSIX',
18+
'Operating System :: Microsoft :: Windows',
19+
'Operating System :: MacOS :: MacOS X',
20+
'Programming Language :: Python :: 3.8',
21+
'Programming Language :: Python :: 3.9',
22+
'Programming Language :: Python :: 3.10',
23+
'Programming Language :: Python :: 3.11',
24+
'Programming Language :: Python :: 3.12',
25+
'Programming Language :: Python :: Implementation :: CPython',
26+
'Programming Language :: Python :: Implementation :: PyPy',
27+
'Topic :: Software Development :: Libraries :: Python Modules',
28+
'Topic :: Scientific/Engineering',
29+
'Topic :: System :: Distributed Computing',
30+
]
31+
32+
[tool.black]
33+
line-length = 88
34+
target_version = ['py38', 'py39', 'py310', 'py311', 'py312']
35+
preview = true
36+
37+
[tool.ruff]
38+
line-length = 88
39+
target-version = "py38"

setup.py

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)