Skip to main content

PythonFrontend

Struct PythonFrontend 

Source
pub struct PythonFrontend {
    pub include_tests: bool,
}
Expand description

The Python language frontend.

When include_tests is false (the default), two skip mechanisms apply:

  • Path-based: entire files whose base name matches test_*.py / *_test.py / conftest.py, or whose path contains a tests/ directory segment, are skipped.
  • Source-based: within an otherwise-scanned file, units that are a test_*-named function, a method of a Test*-named class, or a method of a unittest.TestCase subclass are skipped.

Skipped units are counted in FrontendOutput::skipped_tests. --include-tests (include_tests: true) disables both skip mechanisms.

Fields§

§include_tests: bool

Trait Implementations§

Source§

impl Frontend for PythonFrontend

Source§

fn language(&self) -> Language

Source§

fn corpus_profile(&self) -> CorpusProfile

The frontend’s corpus-hygiene profile (prune dirs, exclude globs, test-file globs, content-marker prunes). Default: empty. See docs/corpus-profile-guideline.md.
Source§

fn analyze(&self, files: &[SourceFile]) -> FrontendOutput

Parse the sources and emit per-symbol effect observations (with evidence and locations). Un-parseable files become diagnostics, not panics.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.