File tree Expand file tree Collapse file tree 15 files changed +68
-61
lines changed
Expand file tree Collapse file tree 15 files changed +68
-61
lines changed Original file line number Diff line number Diff line change 5959 files : spelling_private_dict\.txt$
6060 - id : trailing-whitespace
6161 - repo : https://github.com/pre-commit/pygrep-hooks
62- rev : v1.10.0 # Use the ref you want to point at
62+ rev : v1.10.0
6363 hooks :
6464 - id : rst-directive-colons
6565 - id : rst-inline-touching-normal
@@ -84,6 +84,13 @@ repos:
8484 types_or : [yaml]
8585 additional_dependencies : ["uv"]
8686
87+ - id : docformatter
88+ name : docformatter
89+ entry : uv run --extra=dev -m docformatter
90+ language : python
91+ types_or : [python]
92+ additional_dependencies : ["uv"]
93+
8794 - id : shellcheck
8895 name : shellcheck
8996 entry : uv run --extra=dev shellcheck --shell=bash --exclude=SC1017
Original file line number Diff line number Diff line change 1- """Setup for Sybil."""
1+ """
2+ Setup for Sybil.
3+ """
24
35import io
46import uuid
@@ -31,8 +33,8 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None:
3133def fixture_make_image_file (
3234 high_quality_image : io .BytesIO ,
3335) -> Generator [None ]:
34- """
35- Make an image file available in the test directory.
36+ """Make an image file available in the test directory.
37+
3638 The path of this file matches the path in the documentation.
3739 """
3840 new_image = Path ("high_quality_image.jpg" )
@@ -46,8 +48,7 @@ def fixture_make_image_file(
4648def fixture_mock_vws (
4749 monkeypatch : pytest .MonkeyPatch ,
4850) -> Generator [None ]:
49- """
50- Yield a mock VWS.
51+ """Yield a mock VWS.
5152
5253 The keys used here match the keys in the documentation.
5354 """
Original file line number Diff line number Diff line change 1- """Documentation."""
1+ """
2+ Documentation.
3+ """
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ optional-dependencies.dev = [
4444 " deptry==0.20.0" ,
4545 " doc8==1.1.2" ,
4646 " doccmd==2024.10.8.12" ,
47+ " docformatter==1.7.5" ,
4748 " freezegun==1.5.1" ,
4849 " furo==2024.8.6" ,
4950 " interrogate==1.7.0" ,
@@ -258,6 +259,9 @@ spelling-private-dict-file = 'spelling_private_dict.txt'
258259# --spelling-private-dict-file option instead of raising a message.
259260spelling-store-unknown-words = ' no'
260261
262+ [tool .docformatter ]
263+ make-summary-multi-line = true
264+
261265[tool .check-manifest ]
262266
263267ignore = [
Original file line number Diff line number Diff line change @@ -32,8 +32,7 @@ def response(self) -> Response:
3232
3333@beartype
3434class VWSError (Exception ):
35- """
36- Base class for Vuforia Web Services errors.
35+ """Base class for Vuforia Web Services errors.
3736
3837 These errors are defined at
3938 https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#result-codes.
Original file line number Diff line number Diff line change 1111
1212@beartype
1313class OopsAnErrorOccurredPossiblyBadNameError (Exception ):
14- """
15- Exception raised when VWS returns an HTML page which says "Oops, an error
16- occurred".
14+ """Exception raised when VWS returns an HTML page which says "Oops, an
15+ error occurred".
1716
18- This has been seen to happen when the given name includes a bad character.
17+ This has been seen to happen when the given name includes a bad
18+ character.
1919 """
2020
2121 def __init__ (self , response : Response ) -> None :
Original file line number Diff line number Diff line change @@ -33,8 +33,7 @@ def target_id(self) -> str:
3333@beartype
3434class FailError (VWSError ):
3535 """
36- Exception raised when Vuforia returns a response with a result code
37- 'Fail'.
36+ Exception raised when Vuforia returns a response with a result code 'Fail'.
3837 """
3938
4039
Original file line number Diff line number Diff line change 3434
3535@beartype
3636def _get_image_data (image : _ImageType ) -> bytes :
37- """Get the data of an image file."""
37+ """
38+ Get the data of an image file.
39+ """
3840 original_tell = image .tell ()
3941 image .seek (0 )
4042 image_data = image .read ()
@@ -72,8 +74,7 @@ def query(
7274 CloudRecoIncludeTargetData .TOP
7375 ),
7476 ) -> list [QueryResult ]:
75- """
76- Use the Vuforia Web Query API to make an Image Recognition Query.
77+ """Use the Vuforia Web Query API to make an Image Recognition Query.
7778
7879 See
7980 https://developer.vuforia.com/library/web-api/vuforia-query-web-api
Original file line number Diff line number Diff line change 1212@beartype
1313@dataclass (frozen = True )
1414class DatabaseSummaryReport :
15- """
16- A database summary report.
15+ """A database summary report.
1716
1817 See
1918 https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report.
@@ -49,8 +48,7 @@ class TargetStatuses(Enum):
4948@beartype
5049@dataclass (frozen = True )
5150class TargetSummaryReport :
52- """
53- A target summary report.
51+ """A target summary report.
5452
5553 See
5654 https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#summary-report.
@@ -70,8 +68,7 @@ class TargetSummaryReport:
7068@beartype (conf = BeartypeConf (is_pep484_tower = True ))
7169@dataclass (frozen = True )
7270class TargetRecord :
73- """
74- A target record.
71+ """A target record.
7572
7673 See
7774 https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record.
@@ -100,8 +97,7 @@ class TargetData:
10097@beartype
10198@dataclass (frozen = True )
10299class QueryResult :
103- """
104- One query match result.
100+ """One query match result.
105101
106102 See
107103 https://developer.vuforia.com/library/web-api/vuforia-query-web-api.
@@ -114,8 +110,7 @@ class QueryResult:
114110@beartype
115111@dataclass (frozen = True )
116112class TargetStatusAndRecord :
117- """
118- The target status and a target record.
113+ """The target status and a target record.
119114
120115 See
121116 https://developer.vuforia.com/library/web-api/cloud-targets-web-services-api#target-record.
Original file line number Diff line number Diff line change 1- """Responses for requests to VWS and VWQ."""
1+ """
2+ Responses for requests to VWS and VWQ.
3+ """
24
35from dataclasses import dataclass
46
You can’t perform that action at this time.
0 commit comments