Skip to content

Commit

Permalink
Remove glob imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamandar committed Nov 16, 2024
1 parent 0bd1cdb commit f9791b1
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 20 deletions.
22 changes: 17 additions & 5 deletions tests/test_app.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
#!/usr/bin/env python3

import subprocess
import copy
import json
import os
import subprocess
import sys
import toml

from lib.lib_package_linter import *
import toml
from lib.lib_package_linter import (
Error,
Info,
Success,
TestSuite,
Warning,
config_panel_v1_schema,
file_exists,
test,
tests_reports,
validate_schema,
)
from lib.print import _print, is_json_output

from tests.test_catalog import AppCatalog
from tests.test_configurations import Configurations
from tests.test_manifest import Manifest
from tests.test_scripts import Script
from tests.test_configurations import Configurations
from tests.test_catalog import AppCatalog

scriptnames = ["_common.sh", "install", "remove", "upgrade", "backup", "restore"]

Expand Down
17 changes: 14 additions & 3 deletions tests/test_catalog.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
#!/usr/bin/env python3

import toml
import json
import os
import subprocess
import sys
import time
from datetime import datetime
import subprocess

from lib.lib_package_linter import *
import toml
from lib.lib_package_linter import (
Critical,
Error,
Info,
Success,
TestSuite,
Warning,
test,
urlopen,
)
from lib.print import _print

########################################
Expand Down
19 changes: 15 additions & 4 deletions tests/test_configurations.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
#!/usr/bin/env python3

import re
import json
import toml
import os
import re
import subprocess

from lib.lib_package_linter import *
import toml
from lib.lib_package_linter import (
Error,
Info,
TestSuite,
Warning,
file_exists,
test,
tests_v1_schema,
validate_schema,
)
from lib.print import _print


Expand Down Expand Up @@ -384,7 +394,8 @@ def find_path_traversal_issue(nginxconf):

do_path_traversal_check = False
try:
import pyparsing, six
import pyparsing
import six

do_path_traversal_check = True
except Exception:
Expand Down
20 changes: 15 additions & 5 deletions tests/test_manifest.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
#!/usr/bin/env python3

import json
import copy
import json
import os
import sys
import toml
import re
import sys

from lib.lib_package_linter import *

import toml
from lib.lib_package_linter import (
Critical,
Error,
Info,
TestSuite,
Warning,
c,
manifest_v2_schema,
spdx_licenses,
test,
validate_schema,
)

# Only packaging v2 is supported on the linter now ... But someday™ according The Prophecy™, packaging v3 will be a thing
app_packaging_format = 2
Expand Down
16 changes: 13 additions & 3 deletions tests/test_scripts.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
#!/usr/bin/env python3

import shlex
import os
import re
import subprocess
import shlex
import statistics
import subprocess

from lib.lib_package_linter import *
from lib.lib_package_linter import (
Critical,
Error,
Info,
TestSuite,
Warning,
file_exists,
report_warning_not_reliable,
test,
)
from lib.print import _print


Expand Down

0 comments on commit f9791b1

Please sign in to comment.