Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] develop from quantumblacklabs:develop #2

Merged
merged 1 commit into from
Apr 12, 2021
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 @@ -31,7 +31,7 @@ repos:
exclude: ^causalnex/ebaybbn

- repo: https://github.com/psf/black
rev: stable
rev: 20.8b1
hooks:
- id: black

Expand Down
2 changes: 2 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Upcoming release

* Fixes cyclical import of `causalnex.plots`, as per #106.

# Release 0.9.2
* Remove Boston housing dataset from "sklearn tutorial", see #91 for more information.
* Update pylint version to 2.7
Expand Down
8 changes: 3 additions & 5 deletions causalnex/plots/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@

import networkx as nx

from causalnex.structure.structuremodel import StructureModel


def plot_structure(
sm: StructureModel,
sm: nx.DiGraph,
prog: str = "neato",
all_node_attributes: Dict[str, str] = None,
all_edge_attributes: Dict[str, str] = None,
Expand Down Expand Up @@ -187,12 +185,12 @@ def color_gradient_string(from_color: str, to_color: str, steps: int) -> str:


def _add_attributes(
sm: StructureModel,
sm: nx.DiGraph,
all_node_attributes: Dict[str, str] = None,
all_edge_attributes: Dict[str, str] = None,
node_attributes: Dict[str, Dict[str, str]] = None,
edge_attributes: Dict[str, Dict[str, str]] = None,
) -> StructureModel:
) -> nx.DiGraph:
_sm = deepcopy(sm)

# shift labels to be above nodes
Expand Down