Skip to content
Merged
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
1 change: 1 addition & 0 deletions gooddata-fdw/mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins = pydantic.mypy
disallow_untyped_defs = True
warn_redundant_casts = True
strict_equality = True
no_implicit_optional = True

[mypy-gooddata_afm_client.*]
ignore_missing_imports = True
Expand Down
4 changes: 2 additions & 2 deletions gooddata-pandas/gooddata_pandas/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def for_insight(self, insight_id: str, auto_index: bool = True) -> pandas.DataFr
def for_exec_def(
self,
exec_def: ExecutionDefinition,
label_overrides: LabelOverrides = None,
label_overrides: Optional[LabelOverrides] = None,
result_size_limits: ResultSize = (),
) -> Tuple[pandas.DataFrame, BareExecutionResponse]:
"""
Expand Down Expand Up @@ -280,7 +280,7 @@ def for_exec_def(
def for_exec_result_id(
self,
result_id: str,
label_overrides: LabelOverrides = None,
label_overrides: Optional[LabelOverrides] = None,
result_size_limits: ResultSize = (),
) -> pandas.DataFrame:
"""
Expand Down
2 changes: 1 addition & 1 deletion gooddata-pandas/gooddata_pandas/result_convertor.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def _extract_all_result_data(


def _create_header_mapper(
response: BareExecutionResponse, dim: int, label_overrides: LabelOverrides = None
response: BareExecutionResponse, dim: int, label_overrides: Optional[LabelOverrides] = None
) -> Callable[[Any, Optional[int]], str]:
"""
Prepares header mapper function which is doing header structures translations into appropriate label used
Expand Down
2 changes: 1 addition & 1 deletion gooddata-pandas/gooddata_pandas/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def indexed(
def not_indexed(
self,
data_by: Union[SimpleMetric, str, ObjId, Attribute],
granularity: Union[list[LabelItemDef], IndexDef] = None,
granularity: Optional[Union[list[LabelItemDef], IndexDef]] = None,
filter_by: Optional[Union[Filter, list[Filter]]] = None,
) -> pandas.Series:
"""
Expand Down
1 change: 1 addition & 0 deletions gooddata-pandas/mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins = pydantic.mypy
disallow_untyped_defs = True
warn_redundant_casts = True
strict_equality = True
no_implicit_optional = True

[mypy-gooddata_afm_client.*]
ignore_missing_imports = True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class CatalogDeclarativeDataSources(Base):
data_sources: List[CatalogDeclarativeDataSource]

def to_api(self, credentials: dict[str, Any] = None) -> DeclarativeDataSources:
def to_api(self, credentials: Optional[dict[str, Any]] = None) -> DeclarativeDataSources:
data_sources = []
client_class = self.client_class()
credentials = credentials if credentials is not None else dict()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# (C) 2022 GoodData Corporation
from __future__ import annotations

from typing import Any
from typing import Any, Optional

from gooddata_metadata_client.model.json_api_workspace_in import JsonApiWorkspaceIn
from gooddata_metadata_client.model.json_api_workspace_in_attributes import JsonApiWorkspaceInAttributes
Expand All @@ -15,7 +15,7 @@


class CatalogWorkspace(CatalogNameEntity):
def __init__(self, workspace_id: str, name: str, parent_id: str = None):
def __init__(self, workspace_id: str, name: str, parent_id: Optional[str] = None):
super(CatalogWorkspace, self).__init__(workspace_id, name)
self.parent_id = parent_id

Expand Down
2 changes: 1 addition & 1 deletion gooddata-sdk/gooddata_sdk/compute/model/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _to_identifier(val: Union[ObjId, str]) -> Union[afm_models.AfmLocalIdentifie


class AttributeFilter(Filter):
def __init__(self, label: Union[ObjId, str, Attribute], values: list[str] = None) -> None:
def __init__(self, label: Union[ObjId, str, Attribute], values: Optional[list[str]] = None) -> None:
super(AttributeFilter, self).__init__()

self._label = _extract_id_or_local_id(label)
Expand Down
2 changes: 1 addition & 1 deletion gooddata-sdk/gooddata_sdk/compute/model/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(
item: ObjId,
aggregation: Optional[str] = None,
compute_ratio: bool = False,
filters: list[Filter] = None,
filters: Optional[list[Filter]] = None,
) -> None:
super(SimpleMetric, self).__init__(local_id)

Expand Down
1 change: 1 addition & 0 deletions gooddata-sdk/mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins = pydantic.mypy
disallow_untyped_defs = True
warn_redundant_casts = True
strict_equality = True
no_implicit_optional = True

[mypy-gooddata_afm_client.*]
ignore_missing_imports = True
Expand Down