Documentation
¶
Index ¶
- func BuildTree(ctx context.Context, pwg *sync.WaitGroup, c chan tree, pythonRoot string)
- func BuildTrees(ctx context.Context, pythonRoots file.Paths) *trees
- func BuildTreesWithOptions(ctx context.Context, pythonRoots file.Paths, opts BuildTreesOptions) *trees
- func CalculatePythonRoots(paths file.Paths) file.Paths
- func ClassToPath(root string, class string) string
- func PathToClass(path string) (string, error)
- type BuildTreesOptions
- type Classes
- func (p *Classes) Add(items ...string) *Classes
- func (s *Classes) Copy() Classes
- func (p *Classes) Discard(other Classes) *Classes
- func (p *Classes) Intersection(other Classes) *Classes
- func (c Classes) Lister() []string
- func (c Classes) SameAs(o Classes) bool
- func (p *Classes) Union(other Classes) *Classes
- type Void
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTrees ¶
BuildTrees builds import dependency trees for the given Python roots.
func BuildTreesWithOptions ¶
func BuildTreesWithOptions(ctx context.Context, pythonRoots file.Paths, opts BuildTreesOptions) *trees
BuildTreesWithOptions builds import dependency trees with configurable behavior.
func CalculatePythonRoots ¶
CalculatePythonRoots handles the situation where a repository contains multiple python projects. Each project has __init__.py in its child directories - so if a directory is found without one, it is a separate project. This function creates a set of these "root" directories, which contain at least one of the input paths and does not contain __init__.py
func ClassToPath ¶
func PathToClass ¶
Types ¶
type BuildTreesOptions ¶
type BuildTreesOptions struct {
// NamespacePackages disables the __init__.py requirement when walking
// directories. Required for implicit namespace packages.
NamespacePackages bool
}
BuildTreesOptions controls tree-building behavior.
Click to show internal directories.
Click to hide internal directories.