From 7aed8f06f20a05aa28d4747190cae7ec50487f55 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 19:26:48 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 22.12.0 → 24.4.2](https://github.com/psf/black/compare/22.12.0...24.4.2) - [github.com/pycqa/isort: 5.12.0 → 5.13.2](https://github.com/pycqa/isort/compare/5.12.0...5.13.2) - [github.com/pre-commit/mirrors-mypy: v0.971 → v1.10.1](https://github.com/pre-commit/mirrors-mypy/compare/v0.971...v1.10.1) - [github.com/pre-commit/mirrors-mypy: v0.971 → v1.10.1](https://github.com/pre-commit/mirrors-mypy/compare/v0.971...v1.10.1) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c79fd5bd3..46441076c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,25 +3,25 @@ repos: - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 24.4.2 hooks: - id: black - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort name: isort (python) args: ["--profile", "black", "--filter-files", "--skip", "__init__.py"] files: ^dodiscover/ - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v0.971" + rev: "v1.10.1" hooks: - id: mypy name: mypy (dodiscover) args: ["--config-file", "pyproject.toml"] files: ^dodiscover/ - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v0.971" + rev: "v1.10.1" hooks: - id: mypy name: mypy (tests) From fb3ab2b80cf76851225a6d83ab52b2cb849f8f63 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 19:26:56 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/intro/intro_causal_graphs.py | 1 + examples/visualization/plot_timeseries_graphs.py | 1 + pywhy_graphs/_version.py | 1 + pywhy_graphs/classes/networkxprotocol.py | 12 ++++-------- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/intro/intro_causal_graphs.py b/examples/intro/intro_causal_graphs.py index 8dda0d919..f429af96a 100644 --- a/examples/intro/intro_causal_graphs.py +++ b/examples/intro/intro_causal_graphs.py @@ -9,6 +9,7 @@ and missing edge. We will review some of the fundamental causal graphs used in causal inference, and their differences from traditional graphs. """ + import networkx as nx import numpy as np import pandas as pd diff --git a/examples/visualization/plot_timeseries_graphs.py b/examples/visualization/plot_timeseries_graphs.py index 4891ff389..b7c348e40 100644 --- a/examples/visualization/plot_timeseries_graphs.py +++ b/examples/visualization/plot_timeseries_graphs.py @@ -13,6 +13,7 @@ For comparing different graphs with the same layout, see :ref:`ex-draw-graphs` """ + from pywhy_graphs import StationaryTimeSeriesDiGraph from pywhy_graphs.viz import draw, timeseries_layout diff --git a/pywhy_graphs/_version.py b/pywhy_graphs/_version.py index 9e93d559b..7d7c1b1a9 100644 --- a/pywhy_graphs/_version.py +++ b/pywhy_graphs/_version.py @@ -1,4 +1,5 @@ """Version number.""" + from importlib.metadata import version # type: ignore __version__ = version(__package__) diff --git a/pywhy_graphs/classes/networkxprotocol.py b/pywhy_graphs/classes/networkxprotocol.py index 17d5d5274..f53d3ff86 100644 --- a/pywhy_graphs/classes/networkxprotocol.py +++ b/pywhy_graphs/classes/networkxprotocol.py @@ -10,17 +10,13 @@ class NetworkXProtocol(Protocol): _adj: Dict @property - def nodes(self): - ... + def nodes(self): ... @property - def edges(self): - ... + def edges(self): ... @abstractmethod - def add_node(self, node): - ... + def add_node(self, node): ... @abstractmethod - def remove_edge(self, u, v): - ... + def remove_edge(self, u, v): ...