(content string)
| 1114 | var reQuotedDep = regexp.MustCompile(`["']([^"']+)["']`) |
| 1115 | |
| 1116 | func parsePEP621Deps(content string) []string { |
| 1117 | m := rePEP621Section.FindStringSubmatch(content) |
| 1118 | if m == nil { |
| 1119 | return nil |
| 1120 | } |
| 1121 | var deps []string |
| 1122 | for _, dm := range reQuotedDep.FindAllStringSubmatch(m[1], -1) { |
| 1123 | dep := strings.TrimSpace(dm[1]) |
| 1124 | if dep != "" { |
| 1125 | deps = append(deps, dep) |
| 1126 | } |
| 1127 | } |
| 1128 | return deps |
| 1129 | } |
| 1130 | |
| 1131 | // parsePoetryDeps extracts deps from [tool.poetry.dependencies] key = "version" pairs. |
| 1132 | // It reads lines between the section header and the next [section] header. |
no outgoing calls
no test coverage detected