Skip to content

Commit

Permalink
Bump the development-dependencies group with 9 updates (#693)
Browse files Browse the repository at this point in the history
* Bump the development-dependencies group with 9 updates

Bumps the development-dependencies group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [black](https://github.com/psf/black) | `23.12.1` | `24.1.1` |
| [coverage](https://github.com/nedbat/coveragepy) | `7.4.0` | `7.4.1` |
| [pytest](https://github.com/pytest-dev/pytest) | `7.4.4` | `8.0.0` |
| [ruff](https://github.com/astral-sh/ruff) | `0.1.14` | `0.2.0` |
| [types-pillow](https://github.com/python/typeshed) | `10.2.0.20240111` | `10.2.0.20240125` |
| [types-setuptools](https://github.com/python/typeshed) | `69.0.0.20240115` | `69.0.0.20240125` |
| [furo](https://github.com/pradyunsg/furo) | `2023.9.10` | `2024.1.29` |
| [sphinx-autobuild](https://github.com/sphinx-doc/sphinx-autobuild) | `2021.3.14` | `2024.2.4` |
| [sphinx-autodoc-typehints](https://github.com/tox-dev/sphinx-autodoc-typehints) | `1.25.2` | `1.25.3` |


Updates `black` from 23.12.1 to 24.1.1
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@23.12.1...24.1.1)

Updates `coverage` from 7.4.0 to 7.4.1
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](nedbat/coveragepy@7.4.0...7.4.1)

Updates `pytest` from 7.4.4 to 8.0.0
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@7.4.4...8.0.0)

Updates `ruff` from 0.1.14 to 0.2.0
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@v0.1.14...v0.2.0)

Updates `types-pillow` from 10.2.0.20240111 to 10.2.0.20240125
- [Commits](https://github.com/python/typeshed/commits)

Updates `types-setuptools` from 69.0.0.20240115 to 69.0.0.20240125
- [Commits](https://github.com/python/typeshed/commits)

Updates `furo` from 2023.9.10 to 2024.1.29
- [Release notes](https://github.com/pradyunsg/furo/releases)
- [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
- [Commits](pradyunsg/furo@2023.09.10...2024.01.29)

Updates `sphinx-autobuild` from 2021.3.14 to 2024.2.4
- [Release notes](https://github.com/sphinx-doc/sphinx-autobuild/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx-autobuild/blob/main/NEWS.rst)
- [Commits](sphinx-doc/sphinx-autobuild@2021.03.14...2024.02.04)

Updates `sphinx-autodoc-typehints` from 1.25.2 to 1.25.3
- [Release notes](https://github.com/tox-dev/sphinx-autodoc-typehints/releases)
- [Changelog](https://github.com/tox-dev/sphinx-autodoc-typehints/blob/main/CHANGELOG.md)
- [Commits](tox-dev/sphinx-autodoc-typehints@1.25.2...1.25.3)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: development-dependencies
- dependency-name: coverage
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: development-dependencies
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: types-pillow
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
- dependency-name: types-setuptools
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
- dependency-name: furo
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: development-dependencies
- dependency-name: sphinx-autobuild
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: development-dependencies
- dependency-name: sphinx-autodoc-typehints
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fixed pyproject.toml for ruff 0.2

* Fixed black styling + fixed CI/justfile

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Antoine Beyeler <[email protected]>
  • Loading branch information
dependabot[bot] and abey79 authored Feb 10, 2024
1 parent 634608c commit 15c0c6c
Show file tree
Hide file tree
Showing 15 changed files with 155 additions and 143 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-lint-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Lint and static analysis
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' # no need to run that 9x
run: |
poetry run ruff check --show-source vpype vpype_cli vpype_viewer tests
poetry run ruff check --output-format=full vpype vpype_cli vpype_viewer tests
poetry run black --check --diff vpype vpype_cli vpype_viewer tests
poetry run mypy
# needed for tests to work on ubuntu (libEGL.so.1)
Expand Down
3 changes: 2 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ test:

lint:
mypy
ruff check vpype vpype_cli vpype_viewer tests
ruff check --output-format=full vpype vpype_cli vpype_viewer tests
black --check --diff vpype vpype_cli vpype_viewer tests

# run previously failed tests
test-failed:
Expand Down
236 changes: 118 additions & 118 deletions poetry.lock

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ target-version = ["py39", "py310", "py311"]
[tool.ruff]
line-length = 95
target-version = "py39"
exclude = ["examples", "scripts"]

[tool.ruff.lint]
select = [
"D",
"E",
Expand All @@ -145,7 +148,6 @@ select = [
"W",
"UP",
]
exclude = ["examples", "scripts"]
ignore = [
"D1", # TODO: this should be applied on `vpype`

Expand All @@ -157,13 +159,14 @@ ignore = [
"D415",
]

[tool.ruff.isort]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F402", "F403"]
"docs/conf.py" = ["D100", "D103"]
"tests/*.py" = ["D209"]

[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.per-file-ignores]
"__init__.py" = ["F401", "F402", "F403"]
"docs/conf.py" = ["D100", "D103"]
"tests/*.py" = ["D209"]
6 changes: 2 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ def _make_config_file(text: str) -> str:
class LineCollectionMaker(Protocol):
def __call__(
self, line_count: int | None = ..., with_metadata: bool = ...
) -> vp.LineCollection:
...
) -> vp.LineCollection: ...


@pytest.fixture
Expand Down Expand Up @@ -95,8 +94,7 @@ def _make_line_collection(


class DocumentMaker(Protocol):
def __call__(self, layer_count: int = ...) -> vp.Document:
...
def __call__(self, layer_count: int = ...) -> vp.Document: ...


@pytest.fixture
Expand Down
1 change: 1 addition & 0 deletions tests/test_files.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Run a bunch of tests on the svg collection."""

from __future__ import annotations

import difflib
Expand Down
1 change: 1 addition & 0 deletions vpype/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module contains vpype core and its API."""

from __future__ import annotations

from .config import *
Expand Down
18 changes: 9 additions & 9 deletions vpype/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ class PaperConfig:
] #: location on paper of the (0, 0) plotter unit coordinates

paper_size: tuple[float, float] | None = None #: X/Y axis convention of the plotter
paper_orientation: None | (
str
) = None #: orientation of the plotter coordinate system on paper
paper_orientation: None | (str) = (
None #: orientation of the plotter coordinate system on paper
)
x_range: tuple[int, int] | None = None #: admissible range of X coordinates
y_range: tuple[int, int] | None = None #: admissible range of Y coordinates
origin_location_reference: str | None = "topleft" #: reference for ``origin_location``

info: str = "" #: information printed to the user when paper is used
rotate_180: bool = False #: if True, the geometries are rotated by 180 degrees on the page
set_ps: int | None = None #: if not None, call PS with corresponding value
final_pu_params: None | (
str
) = None #: if not None, these params are added to the final PU command
final_pu_params: None | (str) = (
None #: if not None, these params are added to the final PU command
)
aka_names: list[str] = dataclasses.field(
default_factory=list
) #: alternative paper names (will be found by :func:`paper_config`
Expand All @@ -74,9 +74,9 @@ def from_config(cls, data: dict[str, Any]) -> PaperConfig:
name=data["name"],
y_axis_up=data["y_axis_up"],
origin_location=_convert_length_pair(data["origin_location"]),
paper_size=_convert_length_pair(data["paper_size"])
if "paper_size" in data
else None,
paper_size=(
_convert_length_pair(data["paper_size"]) if "paper_size" in data else None
),
paper_orientation=data.get("paper_orientation", None),
x_range=(data["x_range"][0], data["x_range"][1]) if "x_range" in data else None,
y_range=(data["y_range"][0], data["y_range"][1]) if "y_range" in data else None,
Expand Down
1 change: 1 addition & 0 deletions vpype/model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Implementation of vpype's data model."""

from __future__ import annotations

import math
Expand Down
8 changes: 5 additions & 3 deletions vpype/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,11 @@ def measure(txt):
lines = _word_wrap(paragraph, width, hyphenate, measure)

lc_arr = [
_justify_text(line, font, width)
if justify and not line.endswith("\n")
else _text_line(line, font)
(
_justify_text(line, font, width)
if justify and not line.endswith("\n")
else _text_line(line, font)
)
for line in lines
]

Expand Down
1 change: 1 addition & 0 deletions vpype_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""This module implements vpype's CLI interface and the :func:`execute() <vpype_cli.execute>`
function.
"""

# register all commands
from __future__ import annotations

Expand Down
1 change: 1 addition & 0 deletions vpype_cli/debug.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Hidden debug commands to help testing."""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions vpype_viewer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
rendering of :class:`vpype.Document` instances. It includes a Qt-based interactive backend as
well as a Pillow-based offscreen rendering backend.
"""

from __future__ import annotations

from ._scales import DEFAULT_SCALE_SPEC, UnitType
Expand Down
1 change: 1 addition & 0 deletions vpype_viewer/engine.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Generic viewer."""

from __future__ import annotations

import enum
Expand Down
1 change: 1 addition & 0 deletions vpype_viewer/qtviewer/viewer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Qt Viewer."""

from __future__ import annotations

import functools
Expand Down

0 comments on commit 15c0c6c

Please sign in to comment.