You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/06/23 12:57:43 UTC
[airflow] branch main updated: Fix usage of `click.get_terminal_size()` (#24616)
This is an automated email from the ASF dual-hosted git repository.
potiuk 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 5f67cc0747 Fix usage of `click.get_terminal_size()` (#24616)
5f67cc0747 is described below
commit 5f67cc0747ea661b703e4c44c77e7cd005cb9588
Author: Kaxil Naik <ka...@apache.org>
AuthorDate: Thu Jun 23 13:57:36 2022 +0100
Fix usage of `click.get_terminal_size()` (#24616)
We were ignoring mypy error instead of fixing it.
click had removed `get_terminal_size` and recommend using `shutil.get_terminal_size`
---
dev/send_email.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dev/send_email.py b/dev/send_email.py
index 2d796eb800..1ec2199a9c 100755
--- a/dev/send_email.py
+++ b/dev/send_email.py
@@ -20,6 +20,7 @@
# This tool is based on the Superset send_email script:
# https://github.com/apache/incubator-superset/blob/master/RELEASING/send_email.py
import os
+import shutil
import smtplib
import ssl
import sys
@@ -83,7 +84,7 @@ def show_message(entity: str, message: str):
"""
Show message on the Command Line
"""
- width, _ = click.get_terminal_size() # type: ignore[attr-defined]
+ width, _ = shutil.get_terminal_size()
click.secho("-" * width, fg="blue")
click.secho(f"{entity} Message:", fg="bright_red", bold=True)
click.secho("-" * width, fg="blue")