Skip to content

Commit

Permalink
fix: support for mypy>1 (#425)
Browse files Browse the repository at this point in the history
* chore: update requirement of mypy

Signed-off-by: rokamu623 <[email protected]>

* fix: set default return value in message_context velify

Signed-off-by: rokamu623 <[email protected]>

* fix: annotation of optional in graph_search

Signed-off-by: rokamu623 <[email protected]>

* fix: annotation of optional in timeseries

Signed-off-by: rokamu623 <[email protected]>

* fix: convert tuple to list

Signed-off-by: rokamu623 <[email protected]>

* valify InheritUniqueStamp return False

Signed-off-by: rokamu623 <[email protected]>

---------

Signed-off-by: rokamu623 <[email protected]>
  • Loading branch information
rokamu623 authored Nov 27, 2023
1 parent a1e736e commit b248902
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/caret_analyze/architecture/architecture_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def __str__(self) -> str:
return yaml.dump(obj, indent=2, default_flow_style=False, sort_keys=False)

def to_dict(self):
named_path_dicts = NamedPathsDicts(self._named_path_values)
executor_dicts = ExecutorsDicts(self._executor_values)
nodes_dicts = NodesDicts(self._node_values)
named_path_dicts = NamedPathsDicts(list(self._named_path_values))
executor_dicts = ExecutorsDicts(list(self._executor_values))
nodes_dicts = NodesDicts(list(self._node_values))
return {
'named_paths': named_path_dicts.data,
'executors': executor_dicts.data,
Expand Down
4 changes: 2 additions & 2 deletions src/caret_analyze/architecture/graph_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, i_from: int, i_to: int, label: str | None = None):

class GraphPathCore(UserList):

def __init__(self, init: list[GraphEdgeCore] = None):
def __init__(self, init: list[GraphEdgeCore] | None = None):
init = init or []
super().__init__(init)

Expand Down Expand Up @@ -227,7 +227,7 @@ def node_name_to(self) -> str:

class GraphPath(UserList):

def __init__(self, init: list[GraphEdge] = None):
def __init__(self, init: list[GraphEdge] | None = None):
init = init or []
super().__init__(init)

Expand Down
2 changes: 1 addition & 1 deletion src/caret_analyze/plot/visualize_lib/bokeh/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(
xaxis_type: str,
ywheel_zoom: bool,
full_legends: bool,
case: str = None
case: str | None = None
) -> None:
self._metrics = metrics
self._xaxis_type = xaxis_type
Expand Down
2 changes: 1 addition & 1 deletion src/caret_analyze/value_objects/message_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def context_type(self) -> MessageContextType:
return MessageContextType.INHERIT_UNIQUE_STAMP

def verify(self) -> bool:
pass
return False


class CallbackChain(MessageContext):
Expand Down
2 changes: 1 addition & 1 deletion src/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ bokeh>=3
graphviz
types-pyyaml
pydantic>=1.9.0
mypy==0.981
mypy>1
multimethod>=1.10

0 comments on commit b248902

Please sign in to comment.