From b7ab7cfd3832663f448c7a8ac4f78a63ecdcd64d Mon Sep 17 00:00:00 2001 From: Ilan Gold Date: Mon, 29 Jan 2024 15:20:32 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Philipp A. --- anndata/_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anndata/_config.py b/anndata/_config.py index d0132d406..1c1f10017 100644 --- a/anndata/_config.py +++ b/anndata/_config.py @@ -172,7 +172,7 @@ def _update_override_function_for_new_option( # Update docstring for `SettingsManager.override` as well. insert_index = self.override.__doc__.find("\n Yields") option_docstring = "\t" + "\t".join( - self.describe(option, print_description=False).splitlines(True) + self.describe(option, print_description=False).splitlines(keepends=True) ) self.override.__func__.__doc__ = ( self.override.__doc__[:insert_index] @@ -234,7 +234,7 @@ def __getattr__(self, option: str) -> object: raise AttributeError(f"{option} not found.") def __dir__(self) -> Iterable[str]: - return sorted(super().__dir__() + list(self._config.keys())) + return sorted((*dir(super()), *self._config.keys())) def reset(self, option: Iterable[str] | str) -> None: """