mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-12 10:05:39 +00:00
PEP fixes for ci / maintenance scripts
This commit is contained in:
@ -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
|
||||
|
@ -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))
|
@ -9,7 +9,6 @@ import sys
|
||||
import re
|
||||
import os
|
||||
import argparse
|
||||
import requests
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@ -65,7 +64,7 @@ if __name__ == '__main__':
|
||||
e.g. "0.5 dev"
|
||||
"""
|
||||
|
||||
print(f"Checking development branch")
|
||||
print("Checking development branch")
|
||||
|
||||
pattern = "^\d+(\.\d+)+ dev$"
|
||||
|
||||
@ -81,7 +80,7 @@ if __name__ == '__main__':
|
||||
e.g. "0.5.1"
|
||||
"""
|
||||
|
||||
print(f"Checking release branch")
|
||||
print("Checking release branch")
|
||||
|
||||
pattern = "^\d+(\.\d+)+$"
|
||||
|
||||
|
Reference in New Issue
Block a user