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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
entry: pflake8
additional_dependencies: [pyproject-flake8]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.902
rev: v1.10.0
hooks:
- id: mypy
exclude: "tests/|docs/|docs_sphinx/"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed:
- Misc: Documentation to update mkdocs-material version for social plugin.
- Misc: Update links in README.
- Misc: Fix mypy typing.

## [0.17.2] - 2024-04-24
### Changed:
Expand Down
4 changes: 2 additions & 2 deletions bigtree/node/dagnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ def __copy__(self: T) -> T:
obj.__dict__.update(self.__dict__)
return obj

def __getitem__(self, child_name: str) -> T:
def __getitem__(self, child_name: str) -> "DAGNode":
"""Get child by name identifier

Args:
Expand All @@ -605,7 +605,7 @@ def __getitem__(self, child_name: str) -> T:
"""
from bigtree.tree.search import find_child_by_name

return find_child_by_name(self, child_name) # type: ignore
return find_child_by_name(self, child_name)

def __delitem__(self, child_name: str) -> None:
"""Delete child by name identifier, will not throw error if child does not exist
Expand Down
4 changes: 2 additions & 2 deletions bigtree/node/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def hshow(self, **kwargs: Any) -> None:

hprint_tree(self, **kwargs)

def __getitem__(self, child_name: str) -> T:
def __getitem__(self, child_name: str) -> "Node":
"""Get child by name identifier

Args:
Expand All @@ -232,7 +232,7 @@ def __getitem__(self, child_name: str) -> T:
"""
from bigtree.tree.search import find_child_by_name

return find_child_by_name(self, child_name) # type: ignore
return find_child_by_name(self, child_name)

def __delitem__(self, child_name: str) -> None:
"""Delete child by name identifier, will not throw error if child does not exist
Expand Down
1 change: 0 additions & 1 deletion tests/dag/test_construct.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
import unittest

import pandas as pd
Expand Down