Skip to content

Commit 06d6bdb

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent 87794eb commit 06d6bdb

18 files changed

+139
-249
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ci:
1010
- check-manifest
1111
- deptry
1212
- doc8
13-
- docformatter
13+
- pydocstringformatter
1414
- docs
1515
- interrogate
1616
- interrogate-docs
@@ -128,9 +128,9 @@ repos:
128128
additional_dependencies: [uv==0.9.5]
129129
stages: [pre-commit]
130130

131-
- id: docformatter
132-
name: docformatter
133-
entry: uv run --extra=dev -m docformatter --in-place
131+
- id: pydocstringformatter
132+
name: pydocstringformatter
133+
entry: uv run --extra=dev pydocstringformatter
134134
language: python
135135
types_or: [python]
136136
# We exclude this file to avoid https://github.com/PyCQA/docformatter/issues/291.

docs/source/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
"""
2-
Documentation.
3-
"""
1+
"""Documentation."""

docs/source/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env python3
2-
"""
3-
Configuration for Sphinx.
4-
"""
2+
"""Configuration for Sphinx."""
53

64
# pylint: disable=invalid-name
75

src/vws_cli/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""
2-
A CLI for Vuforia Web Services.
3-
"""
1+
"""A CLI for Vuforia Web Services."""
42

53
from importlib.metadata import PackageNotFoundError, version
64

@@ -38,9 +36,7 @@
3836
@click.version_option(version=__version__)
3937
@beartype
4038
def vws_group() -> None:
41-
"""
42-
Manage a Vuforia Web Services cloud database.
43-
"""
39+
"""Manage a Vuforia Web Services cloud database."""
4440

4541

4642
vws_group.add_command(cmd=add_target)

src/vws_cli/commands.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,9 @@ def wait_for_target_processed(
456456
base_vws_url: str,
457457
timeout_seconds: float,
458458
) -> None:
459-
"""Wait for a target to be "processed". This is done by polling the VWS API."""
459+
"""Wait for a target to be "processed". This is done by polling the VWS
460+
API.
461+
"""
460462
vws_client = VWS(
461463
server_access_key=server_access_key,
462464
server_secret_key=server_secret_key,

src/vws_cli/options/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
"""
2-
Options for the VWS CLI commands.
3-
"""
1+
"""Options for the VWS CLI commands."""

src/vws_cli/options/credentials.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""
2-
``click`` options regarding credentials.
3-
"""
1+
"""``click`` options regarding credentials."""
42

53
from collections.abc import Callable
64
from typing import Any
@@ -13,9 +11,7 @@
1311
def server_access_key_option(
1412
command: Callable[..., Any],
1513
) -> Callable[..., Any]:
16-
"""
17-
An option decorator for the Vuforia server access key.
18-
"""
14+
"""An option decorator for the Vuforia server access key."""
1915
return click.option(
2016
"--server-access-key",
2117
type=str,
@@ -33,9 +29,7 @@ def server_access_key_option(
3329
def server_secret_key_option(
3430
command: Callable[..., Any],
3531
) -> Callable[..., Any]:
36-
"""
37-
An option decorator for the Vuforia server secret key.
38-
"""
32+
"""An option decorator for the Vuforia server secret key."""
3933
return click.option(
4034
"--server-secret-key",
4135
type=str,
@@ -53,9 +47,7 @@ def server_secret_key_option(
5347
def client_access_key_option(
5448
command: Callable[..., Any],
5549
) -> Callable[..., Any]:
56-
"""
57-
An option decorator for the Vuforia client access key.
58-
"""
50+
"""An option decorator for the Vuforia client access key."""
5951
return click.option(
6052
"--client-access-key",
6153
type=str,
@@ -73,9 +65,7 @@ def client_access_key_option(
7365
def client_secret_key_option(
7466
command: Callable[..., Any],
7567
) -> Callable[..., Any]:
76-
"""
77-
An option decorator for the Vuforia client secret key.
78-
"""
68+
"""An option decorator for the Vuforia client secret key."""
7969
return click.option(
8070
"--client-secret-key",
8171
type=str,

src/vws_cli/options/targets.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""
2-
``click`` options regarding targets.
3-
"""
1+
"""``click`` options regarding targets."""
42

53
from collections.abc import Callable
64
from enum import Enum, unique
@@ -20,9 +18,7 @@
2018

2119
@beartype
2220
def target_name_option(*, required: bool) -> Callable[..., Any]:
23-
"""
24-
An option decorator for choosing a target name.
25-
"""
21+
"""An option decorator for choosing a target name."""
2622
return click.option(
2723
"--name",
2824
type=str,
@@ -33,9 +29,7 @@ def target_name_option(*, required: bool) -> Callable[..., Any]:
3329

3430
@beartype
3531
def target_width_option(*, required: bool) -> Callable[..., Any]:
36-
"""
37-
An option decorator for choosing a target width.
38-
"""
32+
"""An option decorator for choosing a target width."""
3933
option: Callable[..., Any] = click.option(
4034
"--width",
4135
type=float,
@@ -47,9 +41,7 @@ def target_width_option(*, required: bool) -> Callable[..., Any]:
4741

4842
@beartype
4943
def target_image_option(*, required: bool) -> Callable[..., Any]:
50-
"""
51-
An option decorator for choosing a target image.
52-
"""
44+
"""An option decorator for choosing a target image."""
5345
return click.option(
5446
"--image",
5547
"image_file_path",
@@ -66,9 +58,7 @@ def target_image_option(*, required: bool) -> Callable[..., Any]:
6658

6759
@unique
6860
class ActiveFlagChoice(Enum):
69-
"""
70-
Choices for active flag.
71-
"""
61+
"""Choices for active flag."""
7262

7363
TRUE = "true"
7464
FALSE = "false"
@@ -78,9 +68,7 @@ def active_flag_option(
7868
*,
7969
allow_none: bool,
8070
) -> Callable[..., Any]:
81-
"""
82-
An option decorator for setting a target's active flag.
83-
"""
71+
"""An option decorator for setting a target's active flag."""
8472
if allow_none:
8573
default = None
8674
show_default = False

src/vws_cli/query.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""
2-
A CLI for the Vuforia Cloud Recognition Service API.
3-
"""
1+
"""A CLI for the Vuforia Cloud Recognition Service API."""
42

53
import contextlib
64
import dataclasses
@@ -34,9 +32,7 @@
3432
@beartype
3533
@contextlib.contextmanager
3634
def _handle_vwq_exceptions() -> Iterator[None]:
37-
"""
38-
Show error messages and catch exceptions from ``VWS-Python``.
39-
"""
35+
"""Show error messages and catch exceptions from ``VWS-Python``."""
4036
try:
4137
yield
4238
except BadImageError:
@@ -136,9 +132,7 @@ def vuforia_cloud_reco(
136132
include_target_data: CloudRecoIncludeTargetData,
137133
base_vwq_url: str,
138134
) -> None:
139-
"""
140-
Make a request to the Vuforia Cloud Recognition Service API.
141-
"""
135+
"""Make a request to the Vuforia Cloud Recognition Service API."""
142136
client = CloudRecoService(
143137
client_access_key=client_access_key,
144138
client_secret_key=client_secret_key,

tests/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
"""
2-
Tests for the VWS CLI.
3-
"""
1+
"""Tests for the VWS CLI."""

0 commit comments

Comments
 (0)