pub struct ParsedModule {Show 19 fields
pub path: Utf8PathBuf,
pub definitions: Vec<Definition>,
pub imports: Vec<Import>,
pub calls: Vec<CallSite>,
pub functions: Vec<FunctionComplexity>,
pub security_hits: Vec<SecurityHit>,
pub dunder_all: Option<Vec<String>>,
pub used_names: Vec<String>,
pub local_uses: Vec<String>,
pub attr_accessed: Vec<String>,
pub module_used: Vec<String>,
pub ignores: Vec<(u32, String)>,
pub scope_findings: Vec<ScopeFinding>,
pub classes: Vec<ClassInfo>,
pub unreachable: Vec<UnreachableCode>,
pub type_leaks: Vec<TypeLeak>,
pub name_counts: HashMap<String, u32>,
pub has_dynamic_sink: bool,
pub halstead_volume: f64,
/* private fields */
}Expand description
The parsed view of one Python module that the graph builds on.
Fields§
§path: Utf8PathBuf§definitions: Vec<Definition>§imports: Vec<Import>§calls: Vec<CallSite>§functions: Vec<FunctionComplexity>§security_hits: Vec<SecurityHit>§dunder_all: Option<Vec<String>>§used_names: Vec<String>§local_uses: Vec<String>§attr_accessed: Vec<String>Names accessed as an attribute (obj.attr, self.attr, Class.attr) —
the precise “member used” signal for unused class / enum members (sorted,
deduped). Distinct from local_uses, which also mixes in bare/store names
that would otherwise mask an unused attribute via its own definition.
module_used: Vec<String>Module-level names referenced by a resolved free load — i.e. a
Name in load context whose scope resolution reaches module/global scope
(not shadowed by a function-local binding, and not an attribute access).
This is the precise signal for whether a top-level symbol is used
internally, replacing coarse token-frequency counting. Sorted + deduped.
ignores: Vec<(u32, String)>§scope_findings: Vec<ScopeFinding>§classes: Vec<ClassInfo>§unreachable: Vec<UnreachableCode>Statements that can never execute (follow a terminator in their block).
type_leaks: Vec<TypeLeak>Private types leaked through public function/method signatures.
name_counts: HashMap<String, u32>§has_dynamic_sink: bool§halstead_volume: f64Implementations§
Source§impl ParsedModule
impl ParsedModule
Sourcepub fn had_errors(&self) -> bool
pub fn had_errors(&self) -> bool
Whether the parser reported syntax errors (we still extract best-effort).
Trait Implementations§
Source§impl Clone for ParsedModule
impl Clone for ParsedModule
Source§fn clone(&self) -> ParsedModule
fn clone(&self) -> ParsedModule
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ParsedModule
impl RefUnwindSafe for ParsedModule
impl Send for ParsedModule
impl Sync for ParsedModule
impl Unpin for ParsedModule
impl UnsafeUnpin for ParsedModule
impl UnwindSafe for ParsedModule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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