Fix lint issues

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-29 19:47:45 +02:00
parent 8d5571cf91
commit c8b7615046
4 changed files with 12 additions and 0 deletions

View File

@@ -707,6 +707,7 @@ func TestPatternAnalysisWorker_GlobInheritsUnanimousMapping(t *testing.T) {
for _, ep := range exacts { for _, ep := range exacts {
ep.ThirdPartyID = &thirdPartyID ep.ThirdPartyID = &thirdPartyID
} }
exacts[1].Description = "Google Analytics measurement cookie" exacts[1].Description = "Google Analytics measurement cookie"
require.NoError(t, client.WithTx(ctx, func(ctx context.Context, tx pg.Tx) error { require.NoError(t, client.WithTx(ctx, func(ctx context.Context, tx pg.Tx) error {

View File

@@ -91,6 +91,7 @@ func loadCommonTrackerPattern(
t.Helper() t.Helper()
var reloaded coredata.CommonTrackerPattern var reloaded coredata.CommonTrackerPattern
require.NoError(t, client.WithConn(ctx, func(ctx context.Context, conn pg.Querier) error { require.NoError(t, client.WithConn(ctx, func(ctx context.Context, conn pg.Querier) error {
return reloaded.LoadByID(ctx, conn, id) return reloaded.LoadByID(ctx, conn, id)
})) }))

View File

@@ -177,28 +177,34 @@ func sanitizeRequest(ctx context.Context, logger *log.Logger, req *ChatCompletio
sanitized := *req sanitized := *req
dropped := make([]string, 0, 5) dropped := make([]string, 0, 5)
if dropTemperature { if dropTemperature {
sanitized.Temperature = nil sanitized.Temperature = nil
dropped = append(dropped, "temperature") dropped = append(dropped, "temperature")
} }
if dropTopP { if dropTopP {
sanitized.TopP = nil sanitized.TopP = nil
dropped = append(dropped, "top_p") dropped = append(dropped, "top_p")
} }
if dropFrequencyPenalty { if dropFrequencyPenalty {
sanitized.FrequencyPenalty = nil sanitized.FrequencyPenalty = nil
dropped = append(dropped, "frequency_penalty") dropped = append(dropped, "frequency_penalty")
} }
if dropPresencePenalty { if dropPresencePenalty {
sanitized.PresencePenalty = nil sanitized.PresencePenalty = nil
dropped = append(dropped, "presence_penalty") dropped = append(dropped, "presence_penalty")
} }
if dropStop { if dropStop {
sanitized.StopSequences = nil sanitized.StopSequences = nil
dropped = append(dropped, "stop") dropped = append(dropped, "stop")
} }

View File

@@ -137,6 +137,7 @@ func TestResolveOrCreateCommonThirdParty(t *testing.T) {
party := seedCatalogThirdParty(t, ctx, client, name, slug.Make(name)) party := seedCatalogThirdParty(t, ctx, client, name, slug.Make(name))
var got *gid.GID var got *gid.GID
require.NoError(t, client.WithTx(ctx, func(ctx context.Context, tx pg.Tx) error { require.NoError(t, client.WithTx(ctx, func(ctx context.Context, tx pg.Tx) error {
id, err := ResolveOrCreateCommonThirdParty( id, err := ResolveOrCreateCommonThirdParty(
ctx, ctx,
@@ -166,6 +167,7 @@ func TestResolveOrCreateCommonThirdParty(t *testing.T) {
require.Equal(t, slug.Make(name), slug.Make(variant)) require.Equal(t, slug.Make(name), slug.Make(variant))
var got *gid.GID var got *gid.GID
require.NoError(t, client.WithTx(ctx, func(ctx context.Context, tx pg.Tx) error { require.NoError(t, client.WithTx(ctx, func(ctx context.Context, tx pg.Tx) error {
id, err := ResolveOrCreateCommonThirdParty( id, err := ResolveOrCreateCommonThirdParty(
ctx, ctx,
@@ -189,6 +191,7 @@ func TestResolveOrCreateCommonThirdParty(t *testing.T) {
expectedSlug := slug.Make(name) expectedSlug := slug.Make(name)
var got *gid.GID var got *gid.GID
require.NoError(t, client.WithTx(ctx, func(ctx context.Context, tx pg.Tx) error { require.NoError(t, client.WithTx(ctx, func(ctx context.Context, tx pg.Tx) error {
id, err := ResolveOrCreateCommonThirdParty( id, err := ResolveOrCreateCommonThirdParty(
ctx, ctx,
@@ -213,6 +216,7 @@ func TestResolveOrCreateCommonThirdParty(t *testing.T) {
}) })
var created coredata.CommonThirdParty var created coredata.CommonThirdParty
require.NoError(t, client.WithConn(ctx, func(ctx context.Context, conn pg.Querier) error { require.NoError(t, client.WithConn(ctx, func(ctx context.Context, conn pg.Querier) error {
return created.LoadByID(ctx, conn, *got) return created.LoadByID(ctx, conn, *got)
})) }))