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
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,16 @@ repos:
stages: [pre-commit]
require_serial: true

- id: no-defaults
name: no-defaults
entry: uv run --extra=dev no-defaults
language: python
types_or: [python]
additional_dependencies:
- *uv_version
stages: [pre-commit]
require_serial: true

- id: doc8
name: doc8
entry: uv run --extra=dev -m doc8
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ optional-dependencies.dev = [
"interrogate==1.7.0",
"mypy[faster-cache]==2.3.0",
"mypy-strict-kwargs==2026.7.19.1",
"no-defaults==1.0.1",
"prek==0.4.11",
"pydocstringformatter==1.0.0",
"pydocstyle==6.3",
Expand Down Expand Up @@ -194,6 +195,7 @@ lint.per-file-ignores."tests/**" = [
lint.unfixable = [
"ERA001",
]
lint.external = [ "NOD" ]
lint.flake8-tidy-imports.banned-api."typing.cast".msg = "typing.cast is banned: use explicit type narrowing or a typed variable instead."
lint.pydocstyle.convention = "google"

Expand Down Expand Up @@ -525,3 +527,7 @@ ignore_path = [
[tool.yamlfix]
section_whitelines = 1
whitelines = 1

[tool.no_defaults]
private_only = true
per_file_enforcement."tests/**" = "all"
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class RequestRateLimiter:
def __init__(
self,
*,
time_function: Callable[[], float] = time.monotonic,
time_function: Callable[[], float] = time.monotonic, # noqa: NOD001
) -> None:
"""Initialize an empty rate limiter."""
self._request_times: dict[str, deque[float]] = {}
Expand Down
26 changes: 13 additions & 13 deletions src/mock_vws/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,23 @@ class MockVWS(ContextDecorator):
def __init__(
self,
*,
base_vws_url: str = "https://vws.vuforia.com",
base_vwq_url: str = "https://cloudreco.vuforia.com",
cloud_query_failure_response: CloudQueryFailureResponse | None = None,
duplicate_match_checker: ImageMatcher = _STRUCTURAL_SIMILARITY_MATCHER,
query_match_checker: ImageMatcher = _STRUCTURAL_SIMILARITY_MATCHER,
processing_time_seconds: float = 2.0,
base_vws_url: str = "https://vws.vuforia.com", # noqa: NOD001
base_vwq_url: str = "https://cloudreco.vuforia.com", # noqa: NOD001
cloud_query_failure_response: CloudQueryFailureResponse | None = None, # noqa: NOD001
duplicate_match_checker: ImageMatcher = _STRUCTURAL_SIMILARITY_MATCHER, # noqa: NOD001
query_match_checker: ImageMatcher = _STRUCTURAL_SIMILARITY_MATCHER, # noqa: NOD001
processing_time_seconds: float = 2.0, # noqa: NOD001
model_target_generation_failure: (
ModelTargetGenerationFailure | None
) = None,
) = None, # noqa: NOD001
model_target_generation_warning: (
ModelTargetGenerationWarning | None
) = None,
target_tracking_rater: TargetTrackingRater = _BRISQUE_TRACKING_RATER,
real_http: bool = False,
response_delay_seconds: float = 0.0,
sleep_fn: Callable[[float], None] = time.sleep,
vumark_generation_failure: VuMarkGenerationFailure | None = None,
) = None, # noqa: NOD001
target_tracking_rater: TargetTrackingRater = _BRISQUE_TRACKING_RATER, # noqa: NOD001
real_http: bool = False, # noqa: NOD001
response_delay_seconds: float = 0.0, # noqa: NOD001
sleep_fn: Callable[[float], None] = time.sleep, # noqa: NOD001
vumark_generation_failure: VuMarkGenerationFailure | None = None, # noqa: NOD001
) -> None:
"""Route requests to Vuforia's Web Service APIs to fakes of those
APIs.
Expand Down
Loading