Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ pythonpath = "."
exclude_dirs = ["tools", "tests", "**/venv*", "build"]
skips = [
"B101", # assert_used
"B404", # import_subprocess
"B614", # pytorch_load
"B615", # huggingface_unsafe_download
]
2 changes: 1 addition & 1 deletion src/custom_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
import contextlib
import os
import re
import subprocess
import subprocess # nosec B404
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same concern as above: suppressing B404 at the import level with no explanation makes it hard to audit why subprocess is safe here. Add a short rationale to the # nosec comment and consider limiting suppression to the specific safe usage instead of the module import.

Copilot uses AI. Check for mistakes.
from pathlib import Path

NNCF_VERSION_FILE = "src/nncf/version.py"
Expand Down
2 changes: 1 addition & 1 deletion src/nncf/torch/quantization/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# limitations under the License.

import os.path
import subprocess
import subprocess # nosec B404
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using # nosec B404 without any justification defeats the intent of enabling B404 for SDL review. Prefer adding a brief rationale (e.g., # nosec B404: <reason this import/use is safe>) and/or scoping the suppression as narrowly as possible to the specific safe call site(s) rather than suppressing at import.

Suggested change
import subprocess # nosec B404
import subprocess # nosec B404: imported only for CalledProcessError exception handling; no subprocess commands are executed in this module

Copilot uses AI. Check for mistakes.

import torch

Expand Down
Loading