mirror of https://github.com/astral-sh/ruff
Make ruff::violations private
This commit is contained in:
parent
cfa25ea4b0
commit
fe7658199d
|
|
@ -19,7 +19,7 @@ use ruff::registry::RuleCode;
|
|||
use ruff::resolver::{FileDiscovery, PyprojectDiscovery};
|
||||
use ruff::settings::flags;
|
||||
use ruff::settings::types::SerializationFormat;
|
||||
use ruff::{fix, fs, packaging, resolver, violations, warn_user_once};
|
||||
use ruff::{fix, fs, packaging, resolver, warn_user_once, IOError};
|
||||
use serde::Serialize;
|
||||
use walkdir::WalkDir;
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ pub fn run(
|
|||
let settings = resolver.resolve(path, pyproject_strategy);
|
||||
if settings.enabled.contains(&RuleCode::E902) {
|
||||
Diagnostics::new(vec![Message {
|
||||
kind: violations::IOError(message).into(),
|
||||
kind: IOError(message).into(),
|
||||
location: Location::default(),
|
||||
end_location: Location::default(),
|
||||
fix: None,
|
||||
|
|
|
|||
|
|
@ -45,10 +45,11 @@ pub mod settings;
|
|||
pub mod source_code;
|
||||
mod vendor;
|
||||
mod violation;
|
||||
pub mod violations;
|
||||
mod violations;
|
||||
mod visibility;
|
||||
|
||||
use cfg_if::cfg_if;
|
||||
pub use violations::IOError;
|
||||
|
||||
cfg_if! {
|
||||
if #[cfg(not(target_family = "wasm"))] {
|
||||
|
|
|
|||
Loading…
Reference in New Issue