Skip to content

Commit f236cad

Browse files
authored
Update deps - using ruff instead of black (#426)
* deps: Update * fmt: Applying ruff format instead of black. Updating deps. * fmt: Applying ruff format instead of black on CI. * deps: Upd deps for read the docs
1 parent 6d90d2e commit f236cad

41 files changed

Lines changed: 988 additions & 955 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/python-package.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
18+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
1919

2020
steps:
2121
- uses: actions/checkout@v3
@@ -46,18 +46,11 @@ jobs:
4646
# run ruff
4747
#----------------------------------------------
4848
- name: Linter with ruff
49-
if: matrix.python-version == 3.11
49+
if: matrix.python-version == 3.12
5050
run: |
5151
source .venv/bin/activate
52-
ruff .
53-
#----------------------------------------------
54-
# run black
55-
#----------------------------------------------
56-
- name: Linter with black
57-
if: matrix.python-version == 3.11
58-
run: |
59-
source .venv/bin/activate
60-
black . --check --diff
52+
ruff check .
53+
ruff format --check .
6154
#----------------------------------------------
6255
# run pytest
6356
#----------------------------------------------
@@ -71,7 +64,7 @@ jobs:
7164
#----------------------------------------------
7265
- name: Upload coverage to Codecov
7366
uses: codecov/codecov-action@v3
74-
if: matrix.python-version == 3.11
67+
if: matrix.python-version == 3.12
7568
with:
7669
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
7770
directory: .

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,4 @@ target/
7878
# Sphinx-galery
7979
docs/auto_examples/sg_execution_times.*
8080
docs/auto_examples/*.pickle
81+
docs/sg_execution_times.rst

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ repos:
99
exclude: docs/auto_examples
1010
- repo: https://github.com/charliermarsh/ruff-pre-commit
1111
# Ruff version.
12-
rev: 'v0.0.257'
12+
rev: v0.3.7
1313
hooks:
14+
# Run the linter.
1415
- id: ruff
15-
- repo: https://github.com/psf/black
16-
rev: 22.10.0
17-
hooks:
18-
- id: black
16+
args: [ --fix ]
17+
# Run the formatter.
18+
- id: ruff-format
1919

2020
- repo: local
2121
hooks:

.readthedocs.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,23 @@ version: 2
77

88
# Set the version of Python and other tools you might need
99
build:
10-
os: ubuntu-20.04
10+
os: ubuntu-22.04
1111
tools:
12-
python: "3.11"
12+
python: "3.12"
1313
apt_packages:
1414
- graphviz
1515
jobs:
1616
post_create_environment:
1717
# Install poetry
1818
# https://python-poetry.org/docs/#installing-manually
19-
- pip install poetry
19+
- python -m pip install poetry
2020
# Tell poetry to not use a virtual environment
2121
- poetry config virtualenvs.create false
22+
post_install:
2223
# Install dependencies with 'docs' dependency group
2324
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
24-
- poetry install --extras diagrams --with docs
25+
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --extras diagrams --with docs
2526

2627
# Build documentation in the docs/ directory with Sphinx
2728
sphinx:
2829
configuration: docs/conf.py
29-
30-
python:
31-
install:
32-
- requirements: docs/requirements.txt

docs/diagram.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ A handy shortcut to have the graph representation:
8787
8888
```py
8989
>>> machine._graph()
90-
<pydot.Dot ...
90+
<pydot.core.Dot ...
9191
9292
```
9393

-76 Bytes
Loading
2.73 KB
Loading
65 Bytes
Loading
46 Bytes
Loading

docs/requirements.txt

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

0 commit comments

Comments
 (0)