Skip to content

Commit c5b7eca

Browse files
committed
fix: imports
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
1 parent 70b9d49 commit c5b7eca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/crs_linter/linter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import msc_pyparser
22
import re
3+
import os.path
4+
import sys
5+
36

47
class LintProblem:
58
"""Represents a linting problem found by crs-linter."""
@@ -132,7 +135,6 @@ def __init__(self, data, filename=None, txvars=None):
132135
[]
133136
) # list of rules which don't have any tests
134137
# regex to produce tag from filename:
135-
import os.path
136138
self.re_fname = re.compile(r"(REQUEST|RESPONSE)\-\d{3}\-")
137139
self.filename_tag_exclusions = []
138140

@@ -240,7 +242,6 @@ def check_ignore_case(self):
240242
e["message"] += f" (rule: {self.current_ruleid})"
241243

242244
def check_action_order(self):
243-
import sys
244245
for d in self.data:
245246
if "actions" in d:
246247
max_order = 0 # maximum position of read actions
@@ -781,7 +782,6 @@ def gen_crs_file_tag(self, fname=None):
781782
"""
782783
generate tag from filename
783784
"""
784-
import os.path
785785
filename_for_tag = fname if fname is not None else self.filename
786786
filename = self.re_fname.sub("", os.path.basename(os.path.splitext(filename_for_tag)[0]))
787787
filename = filename.replace("APPLICATION-", "")

0 commit comments

Comments
 (0)