From 04b423183f3a4558ca0dfa7a07305d319ea4d885 Mon Sep 17 00:00:00 2001 From: Philipp Weiler Date: Mon, 20 Feb 2023 07:43:44 +0100 Subject: [PATCH 1/2] Update `.pre-commit-config.yaml` --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 32dd3d48b..d60b23530 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: black additional_dependencies: [toml] - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.12.0 hooks: - id: isort additional_dependencies: [toml] From 1f697fe90ad5c62acd2d86c60a75ebea4dbda184 Mon Sep 17 00:00:00 2001 From: Philipp Weiler Date: Mon, 20 Feb 2023 09:31:45 +0100 Subject: [PATCH 2/2] Strip unnecessary `# noqa`s --- cellrank/_utils/_lineage.py | 2 +- .../estimators/terminal_states/_term_states_estimator.py | 2 +- cellrank/models/_base_model.py | 8 ++++---- cellrank/models/_sklearn_model.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cellrank/_utils/_lineage.py b/cellrank/_utils/_lineage.py index cab82b64f..2266c2ef9 100644 --- a/cellrank/_utils/_lineage.py +++ b/cellrank/_utils/_lineage.py @@ -531,7 +531,7 @@ def T(self): @property def nlin(self) -> int: - """The number of lineages.""" # noqa: D401 + """The number of lineages.""" return self.shape[1] @d.get_full_description(base="lin_pd") diff --git a/cellrank/estimators/terminal_states/_term_states_estimator.py b/cellrank/estimators/terminal_states/_term_states_estimator.py index 39dab610f..59243001c 100644 --- a/cellrank/estimators/terminal_states/_term_states_estimator.py +++ b/cellrank/estimators/terminal_states/_term_states_estimator.py @@ -68,7 +68,7 @@ def terminal_states(self) -> Optional[pd.Series]: @property @d.get_summary(base="tse_term_states_probs") def terminal_states_probabilities(self) -> Optional[pd.Series]: - """Aggregated probability of cells to be in terminal states.""" # noqa: D401 + """Aggregated probability of cells to be in terminal states.""" return self._term_states_probs @d.dedent diff --git a/cellrank/models/_base_model.py b/cellrank/models/_base_model.py index 4164049fa..83da08aee 100644 --- a/cellrank/models/_base_model.py +++ b/cellrank/models/_base_model.py @@ -238,7 +238,7 @@ def adata(self, adata: Optional[AnnData]) -> None: @property def shape(self) -> Tuple[int]: - """Number of cells in :attr:`adata`.""" # noqa: D401 + """Number of cells in :attr:`adata`.""" return (self._n_obs,) @property @@ -267,19 +267,19 @@ def w_all(self) -> np.ndarray: @property @d.get_summary(base="base_model_x") def x(self) -> np.ndarray: - """Filtered independent variables of shape `(n_filtered_cells, 1)` used for fitting.""" # noqa + """Filtered independent variables of shape `(n_filtered_cells, 1)` used for fitting.""" return self._x @property @d.get_summary(base="base_model_y") def y(self) -> np.ndarray: - """Filtered dependent variables of shape `(n_filtered_cells, 1)` used for fitting.""" # noqa + """Filtered dependent variables of shape `(n_filtered_cells, 1)` used for fitting.""" return self._y @property @d.get_summary(base="base_model_w") def w(self) -> np.ndarray: - """Filtered weights of shape `(n_filtered_cells,)` used for fitting.""" # noqa + """Filtered weights of shape `(n_filtered_cells,)` used for fitting.""" return self._w @property diff --git a/cellrank/models/_sklearn_model.py b/cellrank/models/_sklearn_model.py index 10c1d6b7d..44b080ffc 100644 --- a/cellrank/models/_sklearn_model.py +++ b/cellrank/models/_sklearn_model.py @@ -229,7 +229,7 @@ def _find_arg_name( @property def model(self) -> BaseEstimator: - """The underlying :class:`sklearn.base.BaseEstimator`.""" # noqa + """The underlying :class:`sklearn.base.BaseEstimator`.""" return self._model @d.dedent