File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package symbol
22
3+ // represents the origin of a function signature
4+ type SigSource int
5+
6+ const (
7+ // signature extracted from docstring
8+ SigSourceDoc SigSource = iota
9+ // signature from Python inspect module
10+ SigSourceInspect
11+ // generic fallback signature
12+ SigSourceParadigm
13+ )
14+
15+ // represents a function signature with its source information
16+ type Signature struct {
17+ Str string `json:"str"` // The signature string
18+ Source SigSource `json:"source"` // Where the signature was obtained
19+ }
20+
321type Symbol struct {
422 Name string `json:"name"`
523 Type string `json:"type"`
@@ -12,16 +30,3 @@ type Module struct {
1230 Functions []* Symbol `json:"functions"` // package functions
1331 // TODO: variables, classes, etc.
1432}
15-
16- type SigSource int
17-
18- const (
19- SigSourceDoc SigSource = iota
20- SigSourceInspect
21- SigSourceParadigm
22- )
23-
24- type Signature struct {
25- Str string `json:"str"`
26- Source SigSource `json:"source"`
27- }
You can’t perform that action at this time.
0 commit comments