Get username from config. Args: config: Configuration dictionary Returns: Username string if found and valid, None otherwise
(config: dict)
| 97 | |
| 98 | |
| 99 | def get_username(config: dict) -> str | None: |
| 100 | """Get username from config. |
| 101 | |
| 102 | Args: |
| 103 | config: Configuration dictionary |
| 104 | |
| 105 | Returns: |
| 106 | Username string if found and valid, None otherwise |
| 107 | """ |
| 108 | config_path = ["app", "credentials", "username"] |
| 109 | if not traverse_config_path(config=config, config_path=config_path): |
| 110 | log_config_error(config_path, "username is missing. Please set the username.") |
| 111 | return None |
| 112 | |
| 113 | username = get_config_value(config=config, config_path=config_path) |
| 114 | return validate_and_strip_username(username, config_path) |
| 115 | |
| 116 | |
| 117 | def get_retry_login_interval(config: dict) -> int: |
nothing calls this directly
no test coverage detected