Skip to content

Commit 12052d7

Browse files
authored
Fix precommit (#3879)
1 parent 1a568fe commit 12052d7

File tree

39 files changed

+50
-50
lines changed

39 files changed

+50
-50
lines changed

.yamllint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ yaml-files:
1010
# which yamllint complains about.
1111

1212
ignore: |
13+
ci/bandit.yml
1314
demos/thirdparty/
1415
tools/accuracy_checker/dataset_definitions.yml
1516
tools/accuracy_checker/configs/

.bandit renamed to ci/bandit.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
### This config may optionally select a subset of tests to run or skip by
32
### filling out the 'tests' and 'skips' lists given below. If no tests are
43
### specified for inclusion then it is assumed all tests are desired. The skips

ci/check-basics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"""
2222

2323
import re
24-
import subprocess # nosec - disable B404:import-subprocess check
24+
import subprocess # nosec B404 # disable import-subprocess check
2525
import sys
2626

2727
from pathlib import Path
@@ -150,7 +150,7 @@ def complain(message):
150150
all_passed = False
151151

152152
print('running bandit...', flush=True)
153-
if subprocess.run([sys.executable, '-m', 'bandit', '.', '-r', '-c', '.bandit'], cwd=OMZ_ROOT).returncode != 0:
153+
if subprocess.run([sys.executable, '-m', 'bandit', '-r', '-c', 'ci/bandit.yml', '.'], cwd=OMZ_ROOT).returncode != 0:
154154
all_passed = False
155155

156156
print('running documentation checks...', flush=True)

ci/get-jobs-for-changes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import argparse
2929
import json
3030
import re
31-
import subprocess # nosec - disable B404:import-subprocess check
31+
import subprocess # nosec B404 # disable import-subprocess check
3232
import sys
3333

3434
from pathlib import Path, PurePosixPath

ci/prepare-documentation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import sys
4343
import urllib.parse
4444
import urllib.request
45-
import xml.etree.ElementTree as ET # nosec - disable B405:import-xml-etree check
45+
import xml.etree.ElementTree as ET # nosec B405 # disable import-xml-etree check
4646

4747
from pathlib import Path
4848

ci/prepare-openvino-content.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"""
2626

2727
import argparse
28-
import subprocess # nosec - disable B404:import-subprocess check
28+
import subprocess # nosec B404 # disable import-subprocess check
2929

3030
from pathlib import Path, PurePath
3131

demos/common/python/html_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_paragraphs(url_list):
2828
paragraphs_all = []
2929
for url in url_list:
3030
log.debug("Get paragraphs from {}".format(url))
31-
with urllib.request.urlopen(url) as response: # nosec - disable B310:urllib-urlopen check
31+
with urllib.request.urlopen(url) as response: # nosec B310 # disable urllib-urlopen check
3232
parser = HTMLDataExtractor(['title', 'p'])
3333
charset='utf-8'
3434
if 'Content-type' in response.headers:

demos/common/python/visualizers/drawing_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self, n, rng=None):
2525
if n == 0:
2626
raise ValueError('ColorPalette accepts only the positive number of colors')
2727
if rng is None:
28-
rng = random.Random(0xACE) # nosec - disable B311:random check
28+
rng = random.Random(0xACE) # nosec B311 # disable random check
2929

3030
candidates_num = 100
3131
hsv_colors = [(1.0, 1.0, 1.0)]

demos/formula_recognition_demo/python/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import logging as log
2020
import os
2121
import re
22-
import subprocess # nosec - disable B404:import-subprocess check
22+
import subprocess # nosec B404 # disable import-subprocess check
2323
import tempfile
2424
from enum import Enum
2525
from multiprocessing.pool import ThreadPool

demos/multi_camera_multi_target_tracking_demo/python/mc_tracker/sct.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def update(self, feature_vec):
4343
self.clusters.append(feature_vec)
4444
self.clusters_sizes.append(1)
4545
elif sum(self.clusters_sizes) < 2*self.feature_len:
46-
idx = random.randint(0, self.feature_len - 1) # nosec - disable B311:random check
46+
idx = random.randint(0, self.feature_len - 1) # nosec B311 # disable random check
4747
self.clusters_sizes[idx] += 1
4848
self.clusters[idx] += (feature_vec - self.clusters[idx]) / \
4949
self.clusters_sizes[idx]

0 commit comments

Comments
 (0)