From acd73258c2fc3d872ecfb73191e98472d49c511e Mon Sep 17 00:00:00 2001 From: Luca Vivona Date: Tue, 9 Jan 2024 00:59:43 -0500 Subject: [PATCH] remove os from _generate module, and desc for cli --- identicons/_generate/__init__.py | 3 +-- identicons/cli/__init__.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/identicons/_generate/__init__.py b/identicons/_generate/__init__.py index 3490093..e0e1734 100644 --- a/identicons/_generate/__init__.py +++ b/identicons/_generate/__init__.py @@ -1,6 +1,5 @@ from rich.console import Console from rich.traceback import install -import os import numpy as np from PIL import Image import hashlib @@ -80,7 +79,7 @@ def save(icon: np.ndarray, filepath: str, height: int, width: int): assert 100 <= height, f"{height} is far two small, the minimum height is 100 pixels" assert 100 <= width, f"{width} is far two small, the minimum width is 100 pixels" assert filepath.lower().endswith(('.png', '.jpg', '.jpeg')) - + i, j = icon.shape[:2] h, w = height // i, width // j large_identicon = np.repeat(icon, h, axis=0) diff --git a/identicons/cli/__init__.py b/identicons/cli/__init__.py index 8035d45..c492c4e 100644 --- a/identicons/cli/__init__.py +++ b/identicons/cli/__init__.py @@ -4,7 +4,7 @@ def main(): - parser = argparse.ArgumentParser(description=f'CLI tool.') + parser = argparse.ArgumentParser(description=f'identicons CLI tool that allow you to interface with the package and generate your identicons via command line.') parser.add_argument( '-t', '--text', required=True,