From 6e7f9e1c757d25af3babc3c5d93c33e1d2790114 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Mon, 11 Nov 2024 12:28:24 +0000 Subject: [PATCH] Fix the flake8 error Signed-off-by: Ethan Lee --- src/fosslight_binary/cli.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/fosslight_binary/cli.py b/src/fosslight_binary/cli.py index c184ce5..30ee9a4 100644 --- a/src/fosslight_binary/cli.py +++ b/src/fosslight_binary/cli.py @@ -14,18 +14,19 @@ _PKG_NAME = "fosslight_binary" -def get_terminal_size(): + +def get_terminal_size(): size = shutil.get_terminal_size() return size.lines -def paginate_file(file_path): +def paginate_file(file_path): lines_per_page = get_terminal_size() - 1 with open(file_path, 'r') as file: lines = file.readlines() - + for i in range(0, len(lines), lines_per_page): os.system('clear' if os.name == 'posix' else 'cls') - print(''.join(lines[i:i+lines_per_page])) + print(''.join(lines[i : i + lines_per_page])) if i + lines_per_page < len(lines): input("Press Enter to see the next page...")