mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
Ignore Jupyter Notebooks for --add-noqa
(#5727)
This commit is contained in:
parent
067b2a6ce6
commit
e9771c9c63
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@ use rayon::prelude::*;
|
|||
use ruff::linter::add_noqa_to_path;
|
||||
use ruff::resolver::PyprojectConfig;
|
||||
use ruff::{packaging, resolver, warn_user_once};
|
||||
use ruff_python_stdlib::path::is_project_toml;
|
||||
use ruff_python_stdlib::path::{is_jupyter_notebook, is_project_toml};
|
||||
|
||||
use crate::args::Overrides;
|
||||
|
||||
|
@ -47,7 +47,7 @@ pub(crate) fn add_noqa(
|
|||
.flatten()
|
||||
.filter_map(|entry| {
|
||||
let path = entry.path();
|
||||
if is_project_toml(path) {
|
||||
if is_project_toml(path) || is_jupyter_notebook(path) {
|
||||
return None;
|
||||
}
|
||||
let package = path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue