AQIT 0.1.0
Loading...
Searching...
No Matches
aquin.license_acceptance Namespace Reference

Functions

str current_license_hash ()
dict[str, Any]|None _accepted_record (dict[str, Any] cfg)
bool is_license_accepted ()
None record_license_acceptance ()
bool _env_auto_accept ()
None ensure_license_accepted (*, str|None cmd)
None accept_license_cli ()
None _non_tty_message ()
bool _prompt_and_accept (*, str context="first_use", bool exit_on_decline=True)

Variables

 _LICENSE_EXEMPT_CMDS = frozenset({"license"})

Function Documentation

◆ _accepted_record()

dict[str, Any] | None _accepted_record ( dict[str, Any] cfg)
protected

Definition at line 31 of file license_acceptance.py.

Referenced by is_license_accepted().

◆ _env_auto_accept()

bool _env_auto_accept ( )
protected

Definition at line 52 of file license_acceptance.py.

Referenced by ensure_license_accepted().

◆ _non_tty_message()

None _non_tty_message ( )
protected

Definition at line 76 of file license_acceptance.py.

Referenced by _prompt_and_accept().

◆ _prompt_and_accept()

bool _prompt_and_accept ( * ,
str context = "first_use",
bool exit_on_decline = True )
protected

Definition at line 89 of file license_acceptance.py.

References _non_tty_message(), and record_license_acceptance().

Referenced by ensure_license_accepted().

◆ accept_license_cli()

None accept_license_cli ( )
Non-interactive acceptance via `aquin --accept-license`.

Definition at line 67 of file license_acceptance.py.

References is_license_accepted(), and record_license_acceptance().

◆ current_license_hash()

str current_license_hash ( )

Definition at line 27 of file license_acceptance.py.

Referenced by is_license_accepted(), and record_license_acceptance().

◆ ensure_license_accepted()

None ensure_license_accepted ( * ,
str | None cmd )

◆ is_license_accepted()

bool is_license_accepted ( )

Definition at line 36 of file license_acceptance.py.

References _accepted_record(), and current_license_hash().

Referenced by accept_license_cli(), and ensure_license_accepted().

◆ record_license_acceptance()

None record_license_acceptance ( )

Variable Documentation

◆ _LICENSE_EXEMPT_CMDS

aquin.license_acceptance._LICENSE_EXEMPT_CMDS = frozenset({"license"})
protected

Definition at line 24 of file license_acceptance.py.