Skip to content

Commit

Permalink
fix: add type of param default into type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
percevalw committed Dec 4, 2023
1 parent c7ecbf5 commit 8c286c7
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion edsnlp/data/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class StandoffDoc2DictConverter:
def __init__(
self,
*,
span_getter: SpanGetterArg = None,
span_getter: Optional[SpanGetterArg] = None,
span_attributes: AttributesMappingArg = {},
):
self.span_getter = span_getter
Expand Down
2 changes: 1 addition & 1 deletion edsnlp/pipes/core/terminology/terminology.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def __init__(
ignore_excluded: bool = False,
ignore_space_tokens: bool = False,
term_matcher: Literal["exact", "simstring"] = "exact",
term_matcher_config: Dict[str, Any] = None,
term_matcher_config: Optional[Dict[str, Any]] = None,
label,
span_setter: SpanSetterArg = {"ents": True},
):
Expand Down
2 changes: 1 addition & 1 deletion edsnlp/pipes/misc/dates/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def __init__(
relative: Optional[List[str]] = None,
duration: Optional[List[str]] = None,
false_positive: Optional[List[str]] = None,
on_ents_only: Union[bool, str, Iterable[str]] = None,
on_ents_only: Optional[Union[bool, str, Iterable[str]]] = None,
span_getter: Optional[SpanGetterArg] = None,
merge_mode: Literal["intersect", "align"] = "intersect",
detect_periods: bool = False,
Expand Down
4 changes: 2 additions & 2 deletions edsnlp/pipes/qualifiers/family/family.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def __init__(
family: Optional[List[str]] = None,
termination: Optional[List[str]] = None,
use_sections: bool = True,
span_getter: SpanGetterArg = None,
on_ents_only: Union[bool, str, List[str], Set[str]] = None,
span_getter: Optional[SpanGetterArg] = None,
on_ents_only: Optional[Union[bool, str, List[str], Set[str]]] = None,
explain: bool = False,
):
terms = dict(
Expand Down
4 changes: 2 additions & 2 deletions edsnlp/pipes/qualifiers/history/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def __init__(
history_limit: int = 14,
closest_dates_only: bool = True,
exclude_birthdate: bool = True,
span_getter: SpanGetterArg = None,
on_ents_only: Union[bool, str, List[str], Set[str]] = None,
span_getter: Optional[SpanGetterArg] = None,
on_ents_only: Optional[Union[bool, str, List[str], Set[str]]] = None,
explain: bool = False,
):
terms = dict(
Expand Down
4 changes: 2 additions & 2 deletions edsnlp/pipes/qualifiers/hypothesis/hypothesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ def __init__(
verbs_hyp: Optional[List[str]] = None,
termination: Optional[List[str]] = None,
attr: str = "NORM",
span_getter: SpanGetterArg = None,
on_ents_only: Union[bool, str, List[str], Set[str]] = None,
span_getter: Optional[SpanGetterArg] = None,
on_ents_only: Optional[Union[bool, str, List[str], Set[str]]] = None,
within_ents: bool = False,
explain: bool = False,
):
Expand Down
4 changes: 2 additions & 2 deletions edsnlp/pipes/qualifiers/negation/negation.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ def __init__(
verbs: Optional[List[str]] = None,
termination: Optional[List[str]] = None,
attr: str = "NORM",
span_getter: SpanGetterArg = None,
on_ents_only: Union[bool, str, List[str], Set[str]] = None,
span_getter: Optional[SpanGetterArg] = None,
on_ents_only: Optional[Union[bool, str, List[str], Set[str]]] = None,
within_ents: bool = False,
explain: bool = False,
):
Expand Down
4 changes: 2 additions & 2 deletions edsnlp/pipes/qualifiers/reported_speech/reported_speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def __init__(
quotation: Optional[List[str]] = None,
verbs: Optional[List[str]] = None,
attr: str = "NORM",
span_getter: SpanGetterArg = None,
on_ents_only: Union[bool, str, List[str], Set[str]] = None,
span_getter: Optional[SpanGetterArg] = None,
on_ents_only: Optional[Union[bool, str, List[str], Set[str]]] = None,
within_ents: bool = False,
explain: bool = False,
):
Expand Down

0 comments on commit 8c286c7

Please sign in to comment.