Skip to content

fix: add back subcommands and add_typer (alias)#52

Open
percevalw wants to merge 1 commit into
mainfrom
subcommands
Open

fix: add back subcommands and add_typer (alias)#52
percevalw wants to merge 1 commit into
mainfrom
subcommands

Conversation

@percevalw

Copy link
Copy Markdown
Member

Description

  • Restore nested CLI applications with Cli.add_subcommands(). Confit CLI objects
    can temporarily still be mounted under Typer applications without making Typer
    a Confit dependency. Cli.add_typer() and Typer mounting now emit a visible
    deprecation warning and will be removed in the next major release.

Checklist

  • If this PR is a bug fix, the bug is documented in the test suite.
  • Changes were documented in the changelog (pending section).
  • If necessary, changes were made to the documentation.

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

NameStmtsMiss∆ MissCover
TOTAL138518098.70%
Files without new missing coverage
NameStmtsMiss∆ MissCover
confit/utils/settings.py

Was already missing at lines 10-12

         return bool(loads(value))
-     except Exception:
-         return True

112081.82%
confit/registry.py

Was already missing at line 132

         if name is None and hasattr(e.model, "type_"):
-             name = e.model.type_.__module__ + "." + e.model.type_.__qualname__
         e = ConfitValidationError(
Was already missing at lines 545-550
         """
-         entrypoints = importlib_metadata.entry_points()
  ...
-             return entrypoints.get(self.entry_point_namespace, [])
Was already missing at line 575
                 if catalogue.check_exists(*path):
-                     return catalogue._get(path)
                 elif from_entry_point:
Was already missing at line 577
                 elif from_entry_point:
-                     return from_entry_point
             if not catalogue.check_exists(*path):
Was already missing at line 584
                 )
-             return catalogue._get(path)

2308096.52%
confit/config.py

Was already missing at line 150

             if isinstance(obj, tuple):
-                 return tuple(wrap_mapping(v) for v in obj)
             return obj
Was already missing at line 156
         if resolve:
-             return config.resolve(registry=registry)
Was already missing at line 386
                     return local_names[parts] + ("." if path.endswith(":") else "")
-                 except KeyError:
                     raise KeyError(path)
Was already missing at line 431
             if not deep and len(loc) > 1:
-                 return obj
Was already missing at line 519
                 return
-             current[path] = val
Was already missing at line 560
                     ):
-                         old[key] = new_val
                     else:
Was already missing at line 598
             elif isinstance(obj, tuple):
-                 return tuple(rec(v) for v in obj)
             elif isinstance(obj, Reference):
Was already missing at line 649
     if isinstance(config_paths, Path):
-         config_paths = [config_paths]

3238097.52%

11 files skipped due to complete coverage.

Coverage success: total of 98.70% is above 98.61% 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant