From 858db7a75fd69ed4fec7c97e88702c652e8c23ac Mon Sep 17 00:00:00 2001 From: Thanh Phan Date: Thu, 12 Aug 2021 00:59:03 +0700 Subject: [PATCH] Rename `file_name` to `filename` for consistency --- imagepaste/clipboard/clipboard.py | 4 ++-- imagepaste/helper.py | 4 ++-- imagepaste/preferences.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/imagepaste/clipboard/clipboard.py b/imagepaste/clipboard/clipboard.py index d9333b8..363b516 100644 --- a/imagepaste/clipboard/clipboard.py +++ b/imagepaste/clipboard/clipboard.py @@ -57,10 +57,10 @@ def pull(cls, image_path: str) -> Clipboard: @staticmethod def get_filename() -> str: - """Get a string representation of the current time in the file name format. + """Get a string representation of the current time in the filename format. Returns: - str: a string representing the current time in the file name format. + str: a string representing the current time in the filename format. """ from time import strftime from ..helper import get_addon_preferences diff --git a/imagepaste/helper.py b/imagepaste/helper.py index 57f3e53..475fc70 100644 --- a/imagepaste/helper.py +++ b/imagepaste/helper.py @@ -51,7 +51,7 @@ def is_valid_filename(filename: str) -> bool: """Check if the filename is valid. Args: - filename (str): a string representing the file name. + filename (str): a string representing the filename. Returns: bool: True if the filename is valid, False otherwise. @@ -61,7 +61,7 @@ def is_general_valid_filename(filename: str) -> bool: """Check if the filename is valid. Args: - filename (str): a string representing the file name. + filename (str): a string representing the filename. Returns: bool: True if the filename is valid, False otherwise. diff --git a/imagepaste/preferences.py b/imagepaste/preferences.py index 51b2b93..16f181c 100644 --- a/imagepaste/preferences.py +++ b/imagepaste/preferences.py @@ -45,7 +45,7 @@ class IMAGEPASTE_AddonPreferences(bpy.types.AddonPreferences): default="ImagePaste", ) image_filename_pattern: bpy.props.StringProperty( - name="Image file name", + name="Image filename", description=( "A name for pasted images\n" "Go to the Documentation to read more about the variables\n" @@ -139,7 +139,7 @@ def draw(self, _context): # New box box = layout.box().column() - box.label(text="Custom image file name") + box.label(text="Customize image filename") # New property prop = box.row(align=True) @@ -147,7 +147,7 @@ def draw(self, _context): # First column column_1 = split.column() column_1.alignment = "RIGHT" - column_1.label(text="Image file name") + column_1.label(text="Image filename") # Second column column_2 = split.column().row(align=True) filename = populate_filename(self.image_filename_pattern) + self.image_extension