pub struct Config {
pub exclude: Vec<Pattern>,
pub disabled_diagnostics: Vec<String>,
pub fixture_paths: Vec<String>,
pub skip_plugins: Vec<String>,
}Expand description
Configuration for pytest-language-server.
Fields§
§exclude: Vec<Pattern>Glob patterns for directories/files to exclude from scanning.
disabled_diagnostics: Vec<String>Diagnostic codes to disable (e.g., “undeclared-fixture”, “scope-mismatch”).
fixture_paths: Vec<String>Additional directories to scan for fixtures (beyond conftest.py hierarchy).
skip_plugins: Vec<String>Third-party plugins to skip when scanning virtual environment.
Implementations§
Source§impl Config
impl Config
Sourcepub fn load(workspace_root: &Path) -> Self
pub fn load(workspace_root: &Path) -> Self
Load configuration from pyproject.toml in the given workspace root. Returns default configuration if file doesn’t exist or has errors.
Sourcepub fn is_diagnostic_disabled(&self, code: &str) -> bool
pub fn is_diagnostic_disabled(&self, code: &str) -> bool
Check if a diagnostic code is disabled.
Sourcepub fn should_exclude(&self, path: &Path) -> bool
pub fn should_exclude(&self, path: &Path) -> bool
Check if a path should be excluded from scanning.
Sourcepub fn should_skip_plugin(&self, plugin_name: &str) -> bool
pub fn should_skip_plugin(&self, plugin_name: &str) -> bool
Check if a plugin should be skipped when scanning venv.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more