Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#10)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.10.1 → 24.1.1](psf/black@23.10.1...24.1.1)
- [github.com/astral-sh/ruff-pre-commit: v0.1.3 → v0.1.14](astral-sh/ruff-pre-commit@v0.1.3...v0.1.14)

* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Feb 1, 2024
1 parent 4b5e483 commit 9fec487
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ repos:
# - --remove-header

- repo: https://github.com/psf/black
rev: 23.10.1
rev: 24.1.1
hooks:
- id: black
additional_dependencies: ["typer==0.7.0"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
rev: v0.1.14
hooks:
# Simulate isort via (the much faster) ruff
- id: ruff
Expand Down
1 change: 0 additions & 1 deletion src/argilla_server/daos/backend/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def __init__(self, origin_error: Exception):

@dataclasses.dataclass
class BackendErrorHandler(ABC):

"""Implements the error handler base class"""

RequestError: Type[Exception]
Expand Down
24 changes: 13 additions & 11 deletions src/argilla_server/daos/backend/search/query_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,17 +285,19 @@ def _to_es_query(cls, query: BackendRecordsQuery) -> Dict[str, Any]:

boolean_filter_query = filters.boolean_filter(
must_query=query_text or filters.match_all(),
filter_query=filters.boolean_filter(
should_filters=all_filters,
minimum_should_match=len(all_filters),
)
if all_filters
else None,
must_not_query=filters.boolean_filter(
should_filters=[filters.text_query(q) for q in query.uncovered_by_rules]
)
if hasattr(query, "uncovered_by_rules") and query.uncovered_by_rules
else None,
filter_query=(
filters.boolean_filter(
should_filters=all_filters,
minimum_should_match=len(all_filters),
)
if all_filters
else None
),
must_not_query=(
filters.boolean_filter(should_filters=[filters.text_query(q) for q in query.uncovered_by_rules])
if hasattr(query, "uncovered_by_rules") and query.uncovered_by_rules
else None
),
)

return boolean_filter_query
Expand Down
1 change: 0 additions & 1 deletion src/argilla_server/security/auth_provider/db/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


class Settings(BaseSettings):

"""
Attributes
----------
Expand Down

0 comments on commit 9fec487

Please sign in to comment.