Skip to content

Commit

Permalink
Rename file_name to filename for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhph111 committed Aug 12, 2021
1 parent 11756ed commit 858db7a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions imagepaste/clipboard/clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions imagepaste/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions imagepaste/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -139,15 +139,15 @@ 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)
split = prop.split(factor=split_ratio)
# 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
Expand Down

0 comments on commit 858db7a

Please sign in to comment.