This is an automated email from the ASF dual-hosted git repository.
vincbeck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new c78a004210 Add fixes by breeze/precommit-lint static checks (#41604)
(#41618)
c78a004210 is described below
commit c78a0042100ea7330c1fbc7ac234306e09d4678e
Author: Omkar P <[email protected]>
AuthorDate: Wed Aug 21 01:10:03 2024 +0530
Add fixes by breeze/precommit-lint static checks (#41604) (#41618)
---
.../providers/fab/auth_manager/cli_commands/user_command.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/airflow/providers/fab/auth_manager/cli_commands/user_command.py
b/airflow/providers/fab/auth_manager/cli_commands/user_command.py
index 3050a9e250..5853dcf1a6 100644
--- a/airflow/providers/fab/auth_manager/cli_commands/user_command.py
+++ b/airflow/providers/fab/auth_manager/cli_commands/user_command.py
@@ -212,10 +212,12 @@ def users_import(args):
users_created, users_updated = _import_users(users_list)
if users_created:
- print("Created the following
users:\n\t{}".format("\n\t".join(users_created)))
+ users_created_str = "\n\t".join(users_created)
+ print(f"Created the following users:\n\t{users_created_str}")
if users_updated:
- print("Updated the following
users:\n\t{}".format("\n\t".join(users_updated)))
+ users_updated_str = "\n\t".join(users_updated)
+ print(f"Updated the following users:\n\t{users_updated_str}")
def _import_users(users_list: list[dict[str, Any]]):
@@ -231,9 +233,8 @@ def _import_users(users_list: list[dict[str, Any]]):
msg.append(f"[Item {row_num}]")
for key, value in failure.items():
msg.append(f"\t{key}: {value}")
- raise SystemExit(
- "Error: Input file didn't pass validation. See
below:\n{}".format("\n".join(msg))
- )
+ msg_str = "\n".join(msg)
+ raise SystemExit(f"Error: Input file didn't pass validation. See
below:\n{msg_str}")
for user in users_list:
roles = []