Skip to content

Latest commit

 

History

History
41 lines (25 loc) · 3.36 KB

File metadata and controls

41 lines (25 loc) · 3.36 KB
graph LR
    BaseCompleter["BaseCompleter"]
    ConcreteCompleterImplementations["ConcreteCompleterImplementations"]
    ConcreteCompleterImplementations -- "inherit from" --> BaseCompleter
    ConcreteCompleterImplementations -- "implement" --> BaseCompleter
Loading

CodeBoardingDemoContact

Details

Analysis of the 'Custom Completer Interface' subsystem within argcomplete/completers.py, focusing on the BaseCompleter and its ConcreteCompleterImplementations and their interactions.

BaseCompleter

This is the abstract base class that serves as the core extensible API for argcomplete. It defines the contract (__call__ method) that all custom completers must adhere to, enabling developers to inject their specific, context-aware completion logic for argparse arguments. It embodies the Hook/Extension Pattern, providing the primary point for user-defined completion strategies.

Related Classes/Methods:

ConcreteCompleterImplementations

These components represent the concrete strategies that implement the BaseCompleter interface. They provide specific, reusable completion behaviors, such as completing from a predefined list (ChoicesCompleter), file system paths (FilesCompleter, DirectoriesCompleter), or suppressing completions entirely (SuppressCompleter). They encapsulate the actual algorithms for generating completion candidates, adhering to the Plugin/Strategy Pattern.

Related Classes/Methods: