Skip to content

Commit

Permalink
Merge pull request #70 from ghazi-git/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
ghazi-git authored Mar 24, 2024
2 parents 7727a0d + e78171f commit 54fcca9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: check-yaml

- repo: https://github.com/Zac-HD/shed
rev: 2024.1.1
rev: 2024.3.1
hooks:
- id: shed
additional_dependencies: [ 'black~=24.3' ]
Expand Down
8 changes: 3 additions & 5 deletions drf_standardized_errors/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,9 @@ def _should_add_validation_error_response(self) -> bool:
OpenApiFilterExtension.get_match(backend) for backend in filter_backends
]
has_filters = any(
[
filter_extension.get_schema_operation_parameters(self)
for filter_extension in filter_extensions
if filter_extension
]
filter_extension.get_schema_operation_parameters(self)
for filter_extension in filter_extensions
if filter_extension
)
has_extra_validation_errors = bool(self._get_extra_validation_errors())
return has_request_body or has_filters or has_extra_validation_errors
Expand Down

0 comments on commit 54fcca9

Please sign in to comment.