python

package
v1.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package python 用于 python 扫描

触发文件:

  • *.py (exclude conanfile.py)
  • pyproject.toml
  • requirements*

被触发路径下的 pyproject.toml 文件将被识别为一个模块; 被触发的路径下所有 requirements* 文件将被识别为一个模块。 如果以上两者未被发现,目录树遍历,所有名称为 venv 的文件夹将被跳过,解析包名称自所有 *.py 文件的 import 语句,将黑名单过滤后的包名与 pip list 输出合并作为一个模块。

Index

Constants

This section is empty.

Variables

View Source
var ErrNoPipCommand = errors.New("pip command not found")
View Source
var ErrParseToml = errors.New("Parse toml failed")
View Source
var ErrPipListFailed = errors.New("pip list execution failed")

Functions

This section is empty.

Types

type Inspector

type Inspector struct{}

func (Inspector) CheckDir

func (i Inspector) CheckDir(dir string) bool

func (Inspector) InspectProject

func (i Inspector) InspectProject(ctx context.Context) error

func (Inspector) String

func (i Inspector) String() string

func (Inspector) SupportFeature added in v1.9.2

func (i Inspector) SupportFeature(feature model.InspectorFeature) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL