fix: use context for analyzers (#9538)

This commit is contained in:
DmitriyLewen
2025-10-14 11:13:48 +06:00
committed by GitHub
parent 84518dbb7f
commit b885d3a369
105 changed files with 366 additions and 265 deletions

View File

@@ -2,6 +2,7 @@ package packaging
import (
"bufio"
"context"
"errors"
"io"
"net/textproto"
@@ -30,7 +31,7 @@ func NewParser() *Parser {
// Parse parses egg and wheel metadata.
// e.g. .egg-info/PKG-INFO and dist-info/METADATA
func (p *Parser) Parse(r xio.ReadSeekerAt) ([]ftypes.Package, []ftypes.Dependency, error) {
func (p *Parser) Parse(_ context.Context, r xio.ReadSeekerAt) ([]ftypes.Package, []ftypes.Dependency, error) {
rd := textproto.NewReader(bufio.NewReader(r))
h, err := rd.ReadMIMEHeader()
if e := textproto.ProtocolError(""); errors.As(err, &e) {