pub enum Reason {
Show 14 variants
DynamicAccess,
NameAppearsInString,
Decorated,
PackageSurface,
PublicApi,
Overrides,
Abstract,
UsedOnlyByTests,
InTestFile,
UnparsedModule,
AmbiguousName,
WildcardReExport,
NameReadAsAttribute,
PathAppearsInString,
}Expand description
Something about the code that makes a finding less certain. Each reason subtracts a fixed number of points; the reasons travel with the finding so a reader can judge the score rather than trust it.
Variants§
DynamicAccess
The module calls eval, getattr, globals(), require(expr) or
accesses properties by computed key.
NameAppearsInString
The name appears inside a string literal somewhere in the scan, so it may be looked up by name at runtime.
Decorated
The declaration carries a decorator the analyzer does not recognise.
PackageSurface
The declaration is re-exported from a package index / __init__.py,
which is usually a deliberate public surface.
PublicApi
The file exports a public API from a published package manifest.
Overrides
A member that overrides or implements an inherited declaration.
Abstract
An abstract declaration whose implementations live in subclasses.
UsedOnlyByTests
The only references come from test files, which this run does not treat as entry points.
InTestFile
The finding is inside a test, fixture or example file.
UnparsedModule
A module in the scan failed to parse, so some references are unknown.
AmbiguousName
The name is also declared elsewhere in the scan, so the reference matching may have attributed uses to the wrong declaration.
WildcardReExport
A wildcard re-export (export *, from m import *) hides which names
actually cross the module boundary.
NameReadAsAttribute
Something in the project reads this name as an attribute. In Python a
module’s contents are reachable as attributes of the module object, so
mod.name may well be this declaration.
PathAppearsInString
A string literal somewhere in the scan ends with this file’s path,
extension left off: resolve(distDir, 'runtime/handlers/island').
Not an import, so not an edge — but a framework that loads files by
path writes exactly this, and the file is then very much alive.
Implementations§
Trait Implementations§
impl Copy for Reason
Source§impl<'de> Deserialize<'de> for Reason
impl<'de> Deserialize<'de> for Reason
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Reason
impl StructuralPartialEq for Reason
Auto Trait Implementations§
impl Freeze for Reason
impl RefUnwindSafe for Reason
impl Send for Reason
impl Sync for Reason
impl Unpin for Reason
impl UnsafeUnpin for Reason
impl UnwindSafe for Reason
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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