Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ci:
- check-manifest
- deptry
- doc8
- docformatter
- pydocstringformatter
- docs
- interrogate
- interrogate-docs
Expand Down Expand Up @@ -104,9 +104,9 @@ repos:
additional_dependencies: [uv==0.9.5]
stages: [pre-commit]

- id: docformatter
name: docformatter
entry: uv run --extra=dev -m docformatter --in-place
- id: pydocstringformatter
name: pydocstringformatter
entry: uv run --extra=dev pydocstringformatter
language: python
types_or: [python]
additional_dependencies: [uv==0.9.5]
Expand Down
8 changes: 2 additions & 6 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
Setup for Sybil.
"""
"""Setup for Sybil."""

import io
import uuid
Expand All @@ -21,9 +19,7 @@


def pytest_collection_modifyitems(items: list[pytest.Item]) -> None:
"""
Apply the beartype decorator to all collected test functions.
"""
"""Apply the beartype decorator to all collected test functions."""
for item in items:
if isinstance(item, pytest.Function):
item.obj = beartype(obj=item.obj)
Expand Down
4 changes: 1 addition & 3 deletions docs/source/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
"""
Documentation.
"""
"""Documentation."""
4 changes: 1 addition & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env python3
"""
Configuration for Sphinx.
"""
"""Configuration for Sphinx."""

import importlib.metadata
from pathlib import Path
Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ optional-dependencies.dev = [
"deptry==0.24.0",
"doc8==2.0.0",
"doccmd==2026.1.3.2",
"docformatter==1.7.7",
"freezegun==1.5.5",
"furo==2025.12.19",
"interrogate==1.7.0",
"mypy[faster-cache]==1.19.1",
"mypy-strict-kwargs==2026.1.12",
"prek==0.2.27",
"pydocstringformatter==0.7.3",
"pydocstyle==6.3",
"pygments==2.19.2",
"pylint[spelling]==4.0.4",
Expand Down Expand Up @@ -274,9 +274,6 @@ spelling-private-dict-file = 'spelling_private_dict.txt'
# --spelling-private-dict-file option instead of raising a message.
spelling-store-unknown-words = 'no'

[tool.docformatter]
make-summary-multi-line = true

[tool.check-manifest]

ignore = [
Expand Down Expand Up @@ -346,6 +343,10 @@ enableTypeIgnoreComments = false
reportUnnecessaryTypeIgnoreComment = true
typeCheckingMode = "strict"

[tool.pydocstringformatter]
write = true
split-summary-body = false

[tool.interrogate]
fail-under = 100
omit-covered-files = true
Expand Down
4 changes: 1 addition & 3 deletions src/vws/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
A library for Vuforia Web Services.
"""
"""A library for Vuforia Web Services."""

from .query import CloudRecoService
from .vws import VWS
Expand Down
4 changes: 1 addition & 3 deletions src/vws/exceptions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
"""
Custom exceptions raised by this package.
"""
"""Custom exceptions raised by this package."""
12 changes: 3 additions & 9 deletions src/vws/exceptions/base_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

@beartype
class CloudRecoError(Exception):
"""
Base class for Vuforia Cloud Recognition Web API exceptions.
"""
"""Base class for Vuforia Cloud Recognition Web API exceptions."""

def __init__(self, response: Response) -> None:
"""
Expand All @@ -24,9 +22,7 @@ def __init__(self, response: Response) -> None:

@property
def response(self) -> Response:
"""
The response returned by Vuforia which included this error.
"""
"""The response returned by Vuforia which included this error."""
return self._response


Expand All @@ -48,7 +44,5 @@ def __init__(self, response: Response) -> None:

@property
def response(self) -> Response:
"""
The response returned by Vuforia which included this error.
"""
"""The response returned by Vuforia which included this error."""
return self._response
16 changes: 5 additions & 11 deletions src/vws/exceptions/cloud_reco_exceptions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
Exceptions which match errors raised by the Vuforia Cloud Recognition Web APIs.
"""
"""Exceptions which match errors raised by the Vuforia Cloud Recognition Web APIs."""

from beartype import beartype

Expand All @@ -17,31 +15,27 @@ class MaxNumResultsOutOfRangeError(CloudRecoError):

@beartype
class InactiveProjectError(CloudRecoError):
"""
Exception raised when Vuforia returns a response with a result code
"""Exception raised when Vuforia returns a response with a result code
'InactiveProject'.
"""


@beartype
class BadImageError(CloudRecoError):
"""
Exception raised when Vuforia returns a response with a result code
"""Exception raised when Vuforia returns a response with a result code
'BadImage'.
"""


@beartype
class AuthenticationFailureError(CloudRecoError):
"""
Exception raised when Vuforia returns a response with a result code
"""Exception raised when Vuforia returns a response with a result code
'AuthenticationFailure'.
"""


@beartype
class RequestTimeTooSkewedError(CloudRecoError):
"""
Exception raised when Vuforia returns a response with a result code
"""Exception raised when Vuforia returns a response with a result code
'RequestTimeTooSkewed'.
"""
20 changes: 5 additions & 15 deletions src/vws/exceptions/custom_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

@beartype
class RequestEntityTooLargeError(Exception):
"""
Exception raised when the given image is too large.
"""
"""Exception raised when the given image is too large."""

def __init__(self, response: Response) -> None:
"""
Expand All @@ -25,24 +23,18 @@ def __init__(self, response: Response) -> None:

@property
def response(self) -> Response:
"""
The response returned by Vuforia which included this error.
"""
"""The response returned by Vuforia which included this error."""
return self._response


@beartype
class TargetProcessingTimeoutError(Exception):
"""
Exception raised when waiting for a target to be processed times out.
"""
"""Exception raised when waiting for a target to be processed times out."""


@beartype
class ServerError(Exception): # pragma: no cover
"""
Exception raised when VWS returns a server error.
"""
"""Exception raised when VWS returns a server error."""

def __init__(self, response: Response) -> None:
"""
Expand All @@ -54,7 +46,5 @@ def __init__(self, response: Response) -> None:

@property
def response(self) -> Response:
"""
The response returned by Vuforia which included this error.
"""
"""The response returned by Vuforia which included this error."""
return self._response
Loading
Loading