From 90cfe30100300fe5190f8cf49dbf29cd4077d677 Mon Sep 17 00:00:00 2001 From: Florian Frantzen <florian.frantzen@rwth-aachen.de> Date: Thu, 26 Oct 2023 09:20:38 +0200 Subject: [PATCH] Update black to 2023 stable style --- .pre-commit-config.yaml | 7 ++++--- pyproject.toml | 2 +- test/test_tutorials.py | 1 - topoembedx/classes/cell2vec.py | 1 - topoembedx/classes/higher_order_laplacian_eigenmaps.py | 1 - topoembedx/classes/hoglee.py | 1 - topoembedx/classes/random_walks.py | 5 ++--- 7 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3f4ff63..f2163b8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,6 @@ -default_language_version : - python : python3 +default_language_version: + python: python3.10 + repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.0.1 @@ -18,7 +19,7 @@ repos: - id: requirements-txt-fixer - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 23.10.1 hooks: - id: black diff --git a/pyproject.toml b/pyproject.toml index a7444b3..0adbcef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ doc = [ "pydata-sphinx-theme" ] lint = [ - "black < 23.0", + "black < 24.0", "black[jupyter]", "flake8", "flake8-docstrings", diff --git a/test/test_tutorials.py b/test/test_tutorials.py index fc4823e..8e7956e 100644 --- a/test/test_tutorials.py +++ b/test/test_tutorials.py @@ -8,7 +8,6 @@ def _exec_tutorial(path): - file_name = tempfile.NamedTemporaryFile(suffix=".ipynb").name args = [ "jupyter", diff --git a/topoembedx/classes/cell2vec.py b/topoembedx/classes/cell2vec.py index f302cb8..0099fd3 100644 --- a/topoembedx/classes/cell2vec.py +++ b/topoembedx/classes/cell2vec.py @@ -61,7 +61,6 @@ def __init__( min_count: int = 1, seed: int = 42, ): - super().__init__( walk_number=walk_number, walk_length=walk_length, diff --git a/topoembedx/classes/higher_order_laplacian_eigenmaps.py b/topoembedx/classes/higher_order_laplacian_eigenmaps.py index 90aa218..22215de 100644 --- a/topoembedx/classes/higher_order_laplacian_eigenmaps.py +++ b/topoembedx/classes/higher_order_laplacian_eigenmaps.py @@ -26,7 +26,6 @@ def __init__( maximum_number_of_iterations: int = 100, seed: int = 42, ): - super().__init__( dimensions=dimensions, seed=seed, diff --git a/topoembedx/classes/hoglee.py b/topoembedx/classes/hoglee.py index 88f1da1..57e0f05 100644 --- a/topoembedx/classes/hoglee.py +++ b/topoembedx/classes/hoglee.py @@ -17,7 +17,6 @@ class HOGLEE(GLEE): """ def __init__(self, dimensions: int = 3, seed: int = 42): - super().__init__(dimensions=dimensions, seed=seed) self.A = [] diff --git a/topoembedx/classes/random_walks.py b/topoembedx/classes/random_walks.py index 9755ebb..d16b9b4 100644 --- a/topoembedx/classes/random_walks.py +++ b/topoembedx/classes/random_walks.py @@ -55,7 +55,7 @@ def transition_from_adjacency(A, sub_sampling=0.1, self_loop=True): Returns ------- - _ : numpy.ndarray + numpy.ndarray The transition matrix. Example @@ -70,7 +70,6 @@ def transition_from_adjacency(A, sub_sampling=0.1, self_loop=True): """ def _transition_from_adjacency(A): - if scipy.sparse.issparse(A): A = A.todense() @@ -134,7 +133,7 @@ def random_walk(length, num_walks, states, transition_matrix): Returns ------- - _ : list of list of str + list of list of str The generated random walks. Example