Skip to content

Commit 565d88d

Browse files
chore: supplement signature comments
Co-authored-by: niupilot[bot] <230321281+niupilot[bot]@users.noreply.github.com> Signed-off-by: Micro Liu <858039956@qq.com>
1 parent 9055747 commit 565d88d

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

symbol/symbol.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
package symbol
22

3+
// SigSource represents the origin of a function signature
4+
type SigSource int
5+
6+
const (
7+
// SigSourceDoc indicates signature extracted from docstring
8+
SigSourceDoc SigSource = iota
9+
// SigSourceInspect indicates signature from Python inspect module
10+
SigSourceInspect
11+
// SigSourceParadigm indicates generic fallback signature
12+
SigSourceParadigm
13+
)
14+
15+
// Signature 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+
321
type Symbol struct {
422
Name string `json:"name"`
523
Type string `json:"type"`

0 commit comments

Comments
 (0)