mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
[mod] some pep8 fixes.
This commit is contained in:
parent
74315b2718
commit
cda98505ba
1 changed files with 6 additions and 5 deletions
|
@ -41,7 +41,7 @@ def check_files_exist(app_path):
|
||||||
"""
|
"""
|
||||||
return_code = 0
|
return_code = 0
|
||||||
|
|
||||||
print (c.BOLD + c.HEADER + ">>>> MISSING FILES <<<<" + c.END)
|
print(c.BOLD + c.HEADER + ">>>> MISSING FILES <<<<" + c.END)
|
||||||
fnames = ("manifest.json", "scripts/install", "scripts/remove",
|
fnames = ("manifest.json", "scripts/install", "scripts/remove",
|
||||||
"scripts/upgrade", "scripts/backup", "scripts/restore", "LICENSE", "README.md")
|
"scripts/upgrade", "scripts/backup", "scripts/restore", "LICENSE", "README.md")
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ def read_file(file_path):
|
||||||
|
|
||||||
|
|
||||||
def check_source_management(app_path):
|
def check_source_management(app_path):
|
||||||
print (c.BOLD + c.HEADER + "\n>>>> SOURCES MANAGEMENT <<<<" + c.END)
|
print(c.BOLD + c.HEADER + "\n>>>> SOURCES MANAGEMENT <<<<" + c.END)
|
||||||
DIR = os.path.join(app_path, "sources")
|
DIR = os.path.join(app_path, "sources")
|
||||||
# Check if there is more than six files on 'sources' folder
|
# Check if there is more than six files on 'sources' folder
|
||||||
if os.path.exists(os.path.join(app_path, "sources")) and \
|
if os.path.exists(os.path.join(app_path, "sources")) and \
|
||||||
|
@ -81,7 +81,7 @@ def check_source_management(app_path):
|
||||||
|
|
||||||
|
|
||||||
def check_manifest(manifest):
|
def check_manifest(manifest):
|
||||||
print (c.BOLD + c.HEADER + "\n>>>> MANIFEST <<<<" + c.END)
|
print(c.BOLD + c.HEADER + "\n>>>> MANIFEST <<<<" + c.END)
|
||||||
"""
|
"""
|
||||||
Check if there is no comma syntax issue
|
Check if there is no comma syntax issue
|
||||||
"""
|
"""
|
||||||
|
@ -178,7 +178,7 @@ def check_script(path, script_name, script_nbr):
|
||||||
if check_file_exist(script_path) == 0:
|
if check_file_exist(script_path) == 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
print (c.BOLD + c.HEADER + "\n>>>>",
|
print(c.BOLD + c.HEADER + "\n>>>>",
|
||||||
script_name.upper(), "SCRIPT <<<<" + c.END)
|
script_name.upper(), "SCRIPT <<<<" + c.END)
|
||||||
|
|
||||||
script = read_file(script_path)
|
script = read_file(script_path)
|
||||||
|
@ -225,6 +225,7 @@ def check_verifications_done_before_modifying_system(script):
|
||||||
"Verifications (with 'ynh_die' or 'exit' commands) are done before any system modification.")
|
"Verifications (with 'ynh_die' or 'exit' commands) are done before any system modification.")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def check_non_helpers_usage(script):
|
def check_non_helpers_usage(script):
|
||||||
"""
|
"""
|
||||||
check if deprecated commands are used and propose helpers:
|
check if deprecated commands are used and propose helpers:
|
||||||
|
@ -299,7 +300,7 @@ def check_arg_retrieval(script):
|
||||||
if line_nbr > 30:
|
if line_nbr > 30:
|
||||||
exitFlag = True
|
exitFlag = True
|
||||||
break
|
break
|
||||||
if exitFlag == True:
|
if exitFlag is True:
|
||||||
break
|
break
|
||||||
|
|
||||||
if present:
|
if present:
|
||||||
|
|
Loading…
Reference in a new issue