Skip to content

Commit

Permalink
docs: fix typo (#2179)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianmtr committed Mar 16, 2021
1 parent ef155a3 commit 3bf8c15
Show file tree
Hide file tree
Showing 17 changed files with 55 additions and 55 deletions.
12 changes: 6 additions & 6 deletions jina/drivers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ class DriverType(type(JAMLCompatible), type):
def __new__(cls, *args, **kwargs):
"""Create and register a new class with this meta class.
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
:return: the newly registered class
"""
_cls = super().__new__(cls, *args, **kwargs)
Expand Down Expand Up @@ -407,8 +407,8 @@ def __init__(self, traversal_paths: Tuple[str] = ('c', 'r'), *args, **kwargs):
"""Initialize a :class:`BaseRecursiveDriver`
:param traversal_paths: Describes the leaves of the document tree on which _apply_all are called
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""
super().__init__(*args, **kwargs)
self._traversal_paths = [path.lower() for path in traversal_paths]
Expand All @@ -434,8 +434,8 @@ def __init__(
:param executor: the name of the sub-executor, only necessary when :class:`jina.executors.compound.CompoundExecutor` is used
:param method: the function name of the executor that the driver feeds to
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""
super().__init__(*args, **kwargs)
self._executor_name = executor
Expand Down
8 changes: 4 additions & 4 deletions jina/drivers/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class BaseCacheDriver(BaseIndexDriver):
"""A driver related to :class:`BaseCache`.
:param with_serialization: feed serialized Document to the CacheIndexer
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(self, with_serialization: bool = False, *args, **kwargs):
Expand Down Expand Up @@ -79,8 +79,8 @@ def __init__(self, tags: Dict, *args, **kwargs):
"""Create a new TaggingCacheDriver.
:param tags: the tags to be updated on hit docs
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""
super().__init__(*args, **kwargs)
self._tags = tags
Expand Down
12 changes: 6 additions & 6 deletions jina/drivers/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class LogInfoDriver(BaseControlDriver):
:param key: (str) that represents a first level or nested key in the dict
:param json: (bool) indicating if the log output should be formatted as json
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(self, key: str = 'request', json: bool = True, *args, **kwargs):
Expand Down Expand Up @@ -99,8 +99,8 @@ class RouteDriver(ControlReqDriver):
mark it in the envelope if it is a control request in
:param raise_no_dealer: raise a RuntimeError when no available dealer
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(self, raise_no_dealer: bool = False, *args, **kwargs):
Expand All @@ -112,8 +112,8 @@ def __init__(self, raise_no_dealer: bool = False, *args, **kwargs):
def __call__(self, *args, **kwargs):
"""Perform the routing.
:param args: additional positional arguments wich are just used for calling the parent
:param kwargs: additional key value arguments wich are just used for calling the parent
:param args: additional positional arguments which are just used for calling the parent
:param kwargs: additional key value arguments which are just used for calling the parent
.. # noqa: DAR401
Expand Down
2 changes: 1 addition & 1 deletion jina/drivers/convertdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ConvertDriver(FlatRecursiveMixin, BaseRecursiveDriver):
def __init__(self, convert_fn: str, *args, **kwargs):
"""
:param convert_fn: the method name from `:class:`Document` to be applied
:param args: additional positional arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: the set of named arguments to be passed to `convert_fn`
"""
super().__init__(*args, **kwargs)
Expand Down
12 changes: 6 additions & 6 deletions jina/drivers/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class BaseEvaluateDriver(BaseExecutableDriver):
:param executor: the name of the sub-executor, only necessary when :class:`jina.executors.compound.CompoundExecutor` is used
:param method: the function name of the executor that the driver feeds to
:param running_avg: always return running average instead of value of the current run
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(
Expand Down Expand Up @@ -93,8 +93,8 @@ class FieldEvaluateDriver(BaseEvaluateDriver):
Evaluate on the values from certain field, the extraction is implemented with :meth:`dunder_get`.
:param field: the field name to be extracted from the Protobuf.
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(self, field: str, *args, **kwargs):
Expand All @@ -120,8 +120,8 @@ class RankEvaluateDriver(BaseEvaluateDriver):
The differences with `:class:FieldEvaluateDriver` are:
- More than one field is allowed. For instance, for NDCGComputation you may need to have both `ID` and `Relevance` information.
- The fields are extracted from the `matches` of the `Documents` and the `Groundtruth` so it returns a sequence of values.
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

@deprecated_alias(field=('fields', 0))
Expand Down
12 changes: 6 additions & 6 deletions jina/drivers/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class BasePredictDriver(FlatRecursiveMixin, BaseExecutableDriver):
"""Drivers inherited from :class:`BasePredictDriver` will bind :meth:`predict` by default
:param fields: name of fields to be used to predict tags, default "embeddings"
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(
Expand All @@ -33,8 +33,8 @@ class BaseLabelPredictDriver(BasePredictDriver):
"""Base class of a Driver for label prediction.
:param output_tag: output label will be written to ``doc.tags``
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(self, output_tag: str = 'prediction', *args, **kwargs):
Expand Down Expand Up @@ -88,8 +88,8 @@ class BinaryPredictDriver(BaseLabelPredictDriver):
:param one_label: label when prediction is one
:param zero_label: label when prediction is zero
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(self, one_label: str = 'yes', zero_label: str = 'no', *args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions jina/drivers/querylang/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class FilterQL(QuerySetReader, ContextAwareRecursiveMixin, BaseRecursiveDriver):
:param lookups: (dict) a dictionary where keys are interpreted by ``:class:`LookupLeaf`` to form a
an evaluation function. For instance, a dictionary ``{ modality__in: [mode1, mode2] }``, would create
an evaluation function that will check if the field `modality` is found in `[mode1, mode2]`
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(self, lookups: Dict[str, Any], *args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions jina/drivers/querylang/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class ExcludeQL(QuerySetReader, FlatRecursiveMixin, BaseRecursiveDriver):
:param fields: the pruned field names in tuple
:param traversal_paths: the traversal paths
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(
Expand Down
4 changes: 2 additions & 2 deletions jina/drivers/querylang/slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class SliceQL(QuerySetReader, ContextAwareRecursiveMixin, BaseRecursiveDriver):
:param end: Zero-based index before which to end extraction.
slice extracts up to but not including end. For example, take(1,4) extracts
the second element through the fourth element (elements indexed 1, 2, and 3).
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(self, start: int, end: Optional[int] = None, *args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions jina/drivers/querylang/sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class SortQL(QuerySetReader, ContextAwareRecursiveMixin, BaseRecursiveDriver):
:param field: the value of the field drives the sort of the iterable docs
:param reverse: sort the value from big to small
:param traversal_paths: the traversal paths
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(
Expand Down
4 changes: 2 additions & 2 deletions jina/drivers/rank/aggregate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class BaseAggregateMatchesRankerDriver(BaseRankDriver):
:param keep_source_matches_as_chunks: A flag to indicate if the driver must return the old matches of the query or its chunks
(at a greater granularity level (k + 1)) as the chunks of the new computed `matches` (at granularity level k)
Set it to `True` when keeping track of the chunks that lead to a retrieved result.
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
.. note::
When set `keep_source_matches_as_chunks=True`, the chunks of the match contains **ONLY** the chunks leading
Expand Down
8 changes: 4 additions & 4 deletions jina/drivers/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class KVSearchDriver(ContextAwareRecursiveMixin, BaseSearchDriver):
:param is_update: when set to true the retrieved docs are merged into current message;
otherwise, the retrieved Document overrides the existing Document
:param traversal_paths: traversal paths for the driver
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(
Expand Down Expand Up @@ -113,8 +113,8 @@ class VectorSearchDriver(FlatRecursiveMixin, QuerySetReader, BaseSearchDriver):
:param top_k: top-k document ids to retrieve
:param fill_embedding: fill in the embedding of the corresponding doc,
this requires the executor to implement :meth:`query_by_key`
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization"""
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization"""

def __init__(self, top_k: int = 50, fill_embedding: bool = False, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand Down
4 changes: 2 additions & 2 deletions jina/executors/crafters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class BaseCrafter(BaseExecutor):
transformations to single documents.
The apply function is :func:`craft`, where the name of the arguments will be used as keys of the content.
:param args: Additional positional arguments wich are just used for the parent initialization
:param kwargs: Additional keyword arguments wich are just used for the parent initialization
:param args: Additional positional arguments which are just used for the parent initialization
:param kwargs: Additional keyword arguments which are just used for the parent initialization
"""

def __init__(self, *args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions jina/executors/indexers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class BaseIndexer(BaseExecutor):
So that it can safely save the data. Or you have to manually call `b.close()` to close the indexer safely.
:param index_filename: the name of the file for storing the index, when not given metas.name is used.
:param args: Additional positional arguments wich are just used for the parent initialization
:param kwargs: Additional keyword arguments wich are just used for the parent initialization
:param args: Additional positional arguments which are just used for the parent initialization
:param kwargs: Additional keyword arguments which are just used for the parent initialization
"""

def __init__(
Expand Down
8 changes: 4 additions & 4 deletions jina/executors/indexers/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class BaseCache(BaseKVIndexer):
The difference between a cache and a :class:`BaseKVIndexer` is the ``handler_mutex`` is released in cache,
this allows one to query-while-indexing.
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

def __init__(self, *args, **kwargs):
Expand All @@ -41,8 +41,8 @@ class DocCache(BaseCache):
:param index_filename: file name for storing the cache data
:param fields: fields to cache on (of Document)
:param args: additional positional arguments wich are just used for the parent initialization
:param kwargs: additional key value arguments wich are just used for the parent initialization
:param args: additional positional arguments which are just used for the parent initialization
:param kwargs: additional key value arguments which are just used for the parent initialization
"""

class CacheHandler:
Expand Down
4 changes: 2 additions & 2 deletions jina/types/message/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class ControlMessage(Message):
:param command: Command with string content. (e.g. 'IDLE', 'TERMINATE', 'STATUS')
:param pod_name: Name of the current pod.
:param identity: The identity of the current pod
:param args: Additional positional arguments wich are just used for the parent initialization
:param kwargs: Additional keyword arguments wich are just used for the parent initialization
:param args: Additional positional arguments which are just used for the parent initialization
:param kwargs: Additional keyword arguments which are just used for the parent initialization
"""

def __init__(
Expand Down
4 changes: 2 additions & 2 deletions jina/types/ndarray/dense/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class DenseNdArray(BaseDenseNdArray):
:param proto: the protobuf message, when not given then create a new one
:param quantize: the quantization method used when converting to protobuf.
:param args: Additional positional arguments wich are just used for the parent initialization
:param kwargs: Additional keyword arguments wich are just used for the parent initialization
:param args: Additional positional arguments which are just used for the parent initialization
:param kwargs: Additional keyword arguments which are just used for the parent initialization
Availables are ``fp16``, ``uint8``, default is None.
.. note::
Expand Down

0 comments on commit 3bf8c15

Please sign in to comment.