From b9d75047d99420b3e53d7dd5047bdb29e18ff3d9 Mon Sep 17 00:00:00 2001 From: Alain Klotz Date: Tue, 19 Sep 2023 10:38:36 +0200 Subject: [PATCH] Add naming_keys. --- src/guitastro/filenames.py | 11 +++++++++++ 1 file changed, 11 insertions(+), 0 deletions(-) diff --git a/src/guitastro/filenames.py b/src/guitastro/filenames.py index e401a9a..e0f20db 100644 --- a/src/guitastro/filenames.py +++ b/src/guitastro/filenames.py @@ -1221,6 +1221,17 @@ class FileNames(FileNamesException, GuitastroTools): param['indexes'] = "" return param + def naming_keys(self) -> list: + """Return the keys of a file context + + Returns: + Key names. + + """ + wildcard = self.naming_wildcard() + param = self.naming_get(wildcard) + return list(param.keys()) + def naming_wildcard(self, *args: str, **kwargs: int) -> str: """Return the wildcard corresponding to the naming rule -- libgit2 0.21.2