mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
Merge commit '1c999be8c8134fe01a75723ea933858435856950'
# Conflicts: # .github/ISSUE_TEMPLATE/bug_report.md # launch.py # modules/async_worker.py # modules/config.py # modules/private_logger.py # modules/util.py # webui.py
This commit is contained in:
+4
-1
@@ -179,7 +179,7 @@ def get_files_from_folder(folder_path, exensions=None, name_filter=None):
|
||||
path = os.path.join(relative_path, filename)
|
||||
filenames.append(path)
|
||||
|
||||
return sorted(filenames, key=lambda x: -1 if os.sep in x else 1)
|
||||
return filenames
|
||||
|
||||
|
||||
def calculate_sha256(filename, length=HASH_SHA256_LENGTH) -> str:
|
||||
@@ -340,3 +340,6 @@ def is_json(data: str) -> bool:
|
||||
except (ValueError, AssertionError):
|
||||
return False
|
||||
return True
|
||||
|
||||
def ordinal_suffix(number: int) -> str:
|
||||
return 'th' if 10 <= number % 100 <= 20 else {1: 'st', 2: 'nd', 3: 'rd'}.get(number % 10, 'th')
|
||||
|
||||
Reference in New Issue
Block a user