diff --git a/ci/check_js_templates.py b/ci/check_js_templates.py index e3c1f0148f..b9db7fe612 100644 --- a/ci/check_js_templates.py +++ b/ci/check_js_templates.py @@ -28,6 +28,7 @@ print("=================================") print("Checking static javascript files:") print("=================================") + def check_invalid_tag(data): pattern = r"{%(\w+)" @@ -45,6 +46,7 @@ def check_invalid_tag(data): return err_count + def check_prohibited_tags(data): allowed_tags = [ @@ -78,7 +80,7 @@ def check_prohibited_tags(data): has_trans = True if not has_trans: - print(f" > file is missing 'trans' tags") + print(" > file is missing 'trans' tags") err_count += 1 return err_count diff --git a/ci/check_locale_files.py b/ci/check_locale_files.py index 9995ceaec5..06246cd923 100644 --- a/ci/check_locale_files.py +++ b/ci/check_locale_files.py @@ -24,7 +24,7 @@ for line in str(out.decode()).split('\n'): if len(locales) > 0: print("There are {n} unstaged locale files:".format(n=len(locales))) - for l in locales: - print(" - {l}".format(l=l)) + for lang in locales: + print(" - {l}".format(l=lang)) -sys.exit(len(locales)) \ No newline at end of file +sys.exit(len(locales)) diff --git a/ci/check_migration_files.py b/ci/check_migration_files.py index 88e5a90bee..8ef0ada13d 100644 --- a/ci/check_migration_files.py +++ b/ci/check_migration_files.py @@ -28,4 +28,4 @@ print("There are {n} unstaged migration files:".format(n=len(migrations))) for m in migrations: print(" - {m}".format(m=m)) -sys.exit(len(migrations)) \ No newline at end of file +sys.exit(len(migrations)) diff --git a/ci/check_version_number.py b/ci/check_version_number.py index ca2dbd71c7..6adc36b6d3 100644 --- a/ci/check_version_number.py +++ b/ci/check_version_number.py @@ -84,4 +84,4 @@ if __name__ == '__main__': print(f"Release tag '{args.tag}' does not match INVENTREE_SW_VERSION '{version}'") sys.exit(1) -sys.exit(0) \ No newline at end of file +sys.exit(0) diff --git a/tasks.py b/tasks.py index 1abbf23bc6..7f9d155301 100644 --- a/tasks.py +++ b/tasks.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from shutil import copyfile import os import json import sys @@ -143,6 +142,7 @@ def clean_settings(c): manage(c, "clean_settings") + @task(post=[rebuild]) def migrate(c): """ @@ -298,7 +298,7 @@ def export_records(c, filename='data.json'): # Get an absolute path to the file if not os.path.isabs(filename): filename = os.path.join(localDir(), filename) - filename = os.path.abspath(filename) + filename = os.path.abspath(filename) print(f"Exporting database records to file '{filename}'")