patch
stringlengths
17
31.2k
y
int64
1
1
oldf
stringlengths
0
2.21M
idx
int64
1
1
id
int64
4.29k
68.4k
msg
stringlengths
8
843
proj
stringclasses
212 values
lang
stringclasses
9 values
@@ -23,6 +23,8 @@ type KeyExchangeFunction func() crypto.KeyExchange // The CryptoSetupServer handles all things crypto for the Session type cryptoSetupServer struct { + mutex sync.RWMutex + connID protocol.ConnectionID remoteAddr net.Addr scfg *ServerConfig
1
package handshake import ( "bytes" "crypto/rand" "encoding/binary" "errors" "io" "net" "sync" "github.com/lucas-clemente/quic-go/internal/crypto" "github.com/lucas-clemente/quic-go/internal/protocol" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/qerr" ) // QuicCrypt...
1
7,263
This mutex is never used. Should it be, if users can now make calls into the crypto setup?
lucas-clemente-quic-go
go
@@ -25,6 +25,9 @@ module Beaker host.exec(Command.new("w32tm /config /manualpeerlist:#{NTPSERVER} /syncfromflags:manual /update")) host.exec(Command.new("w32tm /resync")) @logger.notify "NTP date succeeded on #{host}" + elsif host['platform'].include? 'sles' + ...
1
module Beaker module Utils class NTPControl NTPSERVER = 'pool.ntp.org' SLEEPWAIT = 5 TRIES = 5 def initialize(options, hosts) @options = options.dup @hosts = hosts @logger = options[:logger] end def timesync @logger.notify "Update system time sy...
1
5,318
Check here for sles-, and i'd prefer a regex since I don't know what an 'include' is going to do exactly. :)
voxpupuli-beaker
rb
@@ -65,7 +65,11 @@ class QR_Window(QWidget): amount_text = '' if amount: if currency: - self.amount = Decimal(amount) / self.exchanger.exchange(1, currency) if currency else amount + exch = self.exchanger.exchange(1, currency) + if exch == None...
1
import re import platform from decimal import Decimal from PyQt4.QtGui import * from PyQt4.QtCore import * import PyQt4.QtCore as QtCore import PyQt4.QtGui as QtGui from electrum_gui.qt.qrcodewidget import QRCodeWidget from electrum import bmp, pyqrnative, BasePlugin from electrum.i18n import _ if platform.system(...
1
10,642
Should this be `None` instead?
spesmilo-electrum
py
@@ -171,7 +171,14 @@ public final class ConfigUtil { } String cseKey = CONFIG_CSE_PREFIX + key.substring(key.indexOf(".") + 1); - source.addProperty(cseKey, source.getProperty(key)); + if (!source.containsKey(cseKey)) { + source.addProperty(cseKey, source.getProperty(key)); + } els...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
9,831
Not sure if the warning message is enough for this time, if the configuration is wrong, java-chassis may need to stop working instead of sending out the warning message to let the admin know about it. BTW, we may need a default override policy here.
apache-servicecomb-java-chassis
java
@@ -7,7 +7,7 @@ import ( func MustParse(args []string) []string { parser := &Parser{ - After: []string{"server", "agent", "etcd-snapshot"}, + After: []string{"server", "agent", "etcd-snapshot", "save", "delete", "list", "prune"}, FlagNames: []string{"--config", "-c"}, EnvName: ver...
1
package configfilearg import ( "github.com/rancher/k3s/pkg/version" "github.com/sirupsen/logrus" ) func MustParse(args []string) []string { parser := &Parser{ After: []string{"server", "agent", "etcd-snapshot"}, FlagNames: []string{"--config", "-c"}, EnvName: version.ProgramUpper + "_CONFIG...
1
10,458
I see this getting unwieldy as we add more commands with subcommands. Can we perhaps enhance it to handle subcommands properly? Perhaps something like `"etcd-snapshot:1"` which would indicate that the etcd-snapshot command may have 1 subcommand after it, and if the 1 next argument after it doesn't start with `--` then ...
k3s-io-k3s
go
@@ -249,13 +249,13 @@ public class ExecutionController extends EventHandler implements ExecutorManager } /** - * Get all active (running, non-dispatched) flows from database. {@inheritDoc} + * Get all running (unfinished) flows from database. {@inheritDoc} */ @Override public List<ExecutableFlow> ...
1
/* * Copyright 2018 LinkedIn Corp. * * Licensed under the Apache License, Version 2.0 (the “License”); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing...
1
17,372
why returning a string instead of a list?
azkaban-azkaban
java
@@ -3,11 +3,13 @@ // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // </copyright> +using Datadog.Trace.Configuration; + namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.AdoNet.Npgsql { internal static class NpgsqlConstants { - ...
1
// <copyright file="NpgsqlConstants.cs" company="Datadog"> // Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // </copyright> namespace Datadog.Trac...
1
22,189
Was there a reason for changing all these integration names? Are they actually used for anything besides information in logs?
DataDog-dd-trace-dotnet
.cs
@@ -422,6 +422,10 @@ public class FieldInfos implements Iterable<FieldInfo> { } } + synchronized Set<String> getFieldNames() { + return Set.copyOf(nameToNumber.keySet()); + } + synchronized void clear() { numberToName.clear(); nameToNumber.clear();
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
29,851
we should not resurrect this method that we just removed
apache-lucene-solr
java
@@ -837,7 +837,18 @@ class WebDriver(object): del png return True - save_screenshot = get_screenshot_as_file + def save_screenshot(self, filename): + """ + Gets the screenshot of the current window. Returns False if there is + any IOError, else returns True. Use ful...
1
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
1
14,439
This needs to be just return self.get_screenshot_as_file(filename)
SeleniumHQ-selenium
rb
@@ -0,0 +1,6 @@ +function isNetworkError (xhr) { + if (!xhr) return + return (xhr.readyState !== 0 && xhr.readyState !== 4) || xhr.status === 0 +} + +module.exports = isNetworkError
1
1
12,837
Shouldn't this return false here?
transloadit-uppy
js
@@ -92,6 +92,9 @@ type Config struct { // Path to a directory containing the container's root filesystem. Rootfs string `json:"rootfs"` + // Umask is the umask to use inside of the container. + Umask *uint32 `json:"umask"` + // Readonlyfs will remount the container's rootfs as readonly where only externally mou...
1
package configs import ( "bytes" "encoding/json" "fmt" "os/exec" "time" "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) type Rlimit struct { Type int `json:"type"` Hard uint64 `json:"hard"` Soft uint64 `json:"soft"` } // IDMap represents UID/GID...
1
20,825
Should have json tag
opencontainers-runc
go
@@ -180,7 +180,7 @@ static const char *const PORT_ERROR[PORT_ERROR_COUNT] = { /* * errors command configuration, set during parse_args() */ -static struct errors_config { +STATIC struct errors_config { bool clear; int force_count; enum verbs_index which;
1
// Copyright(c) 2018, Intel Corporation // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the ...
1
19,096
Is this needed after all? Looks like the struct was re-defined inside the test file.
OPAE-opae-sdk
c
@@ -67,4 +67,11 @@ public interface ActionsProvider { default ExpireSnapshots expireSnapshots(Table table) { throw new UnsupportedOperationException(this.getClass().getName() + " does not implement expireSnapshots"); } + + /** + * Instantiates an action to remove all the files referenced by given metadata...
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
1
35,835
I think the name of the method should match the name of the action: `removeReachableFiles`.
apache-iceberg
java
@@ -106,6 +106,7 @@ echo " <ul> <li><a href=\"manage_apps.php\">Manage applications</a></li> <li><a href=\"manage_app_versions.php\">Manage application versions</a></li> + <li><a href=\"manage_consent_types.php\">Manage Consent types</a></li> <li> Manage jobs <ul> ...
1
<?php // This file is part of BOINC. // http://boinc.berkeley.edu // Copyright (C) 2014 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation, // either version 3 of the ...
1
10,935
can you make the C in Consent lower case to match the other ones in this list?
BOINC-boinc
php
@@ -16,6 +16,7 @@ import ( "sync" "testing" + "github.com/iotexproject/iotex-core/action/protocol/poll" "github.com/stretchr/testify/require" "github.com/iotexproject/iotex-core/action"
1
// Copyright (c) 2018 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
17,651
fix the group
iotexproject-iotex-core
go
@@ -59,6 +59,13 @@ public class NodeStatus { } } + public boolean hasCapability(Capabilities caps) { + long count = slots.stream() + .filter(slot -> slot.isSupporting(caps)) + .count(); + return count > 0; + } + public boolean hasCapacity() { return slots.stream().anyMatch(slot -...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
18,174
Prefer `Stream.anyMatch` instead of iterating over all slots.
SeleniumHQ-selenium
py
@@ -47,7 +47,7 @@ func BenchmarkServiceFetchBlocks(b *testing.B) { // Create a network and block service net := &httpTestPeerSource{} - ls := rpcs.MakeBlockService(config.GetDefaultLocal(), remote, net, "test genesisID") + ls := rpcs.MakeBlockService(logging.Base(), config.GetDefaultLocal(), remote, net, "test g...
1
// Copyright (C) 2019-2021 Algorand, Inc. // This file is part of go-algorand // // go-algorand is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) ...
1
42,224
we have `logging.TestingLog()` that should be used for that purpose.
algorand-go-algorand
go
@@ -2372,7 +2372,7 @@ int mg_url_decode(const char *src, int src_len, char *dst, #define HEXTOI(x) (isdigit(x) ? x - '0' : x - 'W') for (i = j = 0; i < src_len && j < dst_len - 1; i++, j++) { - if (src[i] == '%' && i < src_len - 2 && + if (i < src_len - 2 && src[i] == '%' && isxdigit(* (const unsig...
1
// Copyright (c) 2004-2013 Sergey Lyubka <valenok@gmail.com> // Copyright (c) 2013-2014 Cesanta Software Limited // All rights reserved // // This library is dual-licensed: you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Founda...
1
10,495
This is also a question of style. src[i] will always be valid because of check if 'for' statement
BOINC-boinc
php
@@ -398,7 +398,7 @@ func killKubeEdgeBinary(proc string) error { //isKubeEdgeProcessRunning checks if the given process is running or not func isKubeEdgeProcessRunning(proc string) (bool, error) { - procRunning := fmt.Sprintf("pidof %s 2&>1", proc) + procRunning := fmt.Sprintf("pidof %s 2>&1", proc) cmd := NewCom...
1
/* Copyright 2019 The KubeEdge Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, so...
1
20,090
Why change it?
kubeedge-kubeedge
go
@@ -11,7 +11,7 @@ import { textStyle, colorStyle, borders, -} from '../src' +} from '../src/index' const theme = { colors: {
1
import test from 'ava' import { space, color, width, fontSize, size, gridGap, gridRowGap, gridColumnGap, textStyle, colorStyle, borders, } from '../src' const theme = { colors: { blue: '#07c', black: '#111', }, } test('returns color values from theme', t => { const a = color({ them...
1
5,047
nb: this change is unnecessary
styled-system-styled-system
js
@@ -120,6 +120,7 @@ type Object struct { size int64 // size of the object modTime time.Time // modification time of the object id string // ID of the object + publicLink string // Public Link for the object sha1 string // SHA-1 of the object content }
1
// Package box provides an interface to the Box // object storage system. package box // FIXME Box only supports file names of 255 characters or less. Names // that will not be supported are those that contain non-printable // ascii, / or \, names with trailing spaces, and the special names // “.” and “..”. // FIXME ...
1
7,456
Is the publicLink mostly empty? I'm just wondering how much this will bloat memory usage as sometimes rclone has millions of Object~s in memory.
rclone-rclone
go
@@ -65,6 +65,11 @@ type OrderSpec struct { // validation process. // This field must match the corresponding field on the DER encoded CSR. DNSNames []string + + // IPAddresses is a list of IP addresses that should be included as part of the Order + // validation process. + // This field must match the correspondi...
1
/* Copyright 2019 The Jetstack cert-manager contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
1
23,453
I don't think the Internal API types need the json annotations. They are never serialised, right?
jetstack-cert-manager
go
@@ -45,6 +45,7 @@ type apiClient interface { GetApplicationMostRecentDeployment(ctx context.Context, req *pipedservice.GetApplicationMostRecentDeploymentRequest, opts ...grpc.CallOption) (*pipedservice.GetApplicationMostRecentDeploymentResponse, error) CreateDeployment(ctx context.Context, in *pipedservice.CreateDe...
1
// Copyright 2020 The PipeCD Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
1
21,918
Maybe this was added incidentally. We don't need this function in the interface.
pipe-cd-pipe
go
@@ -18,8 +18,15 @@ func To(fs http.FileSystem, r *http.Request, to string, replacer httpserver.Repl // try each rewrite paths t := "" + query := "" for _, v := range tos { - t = path.Clean(replacer.Replace(v)) + t = replacer.Replace(v) + tparts := strings.Split(t, "?") + t = path.Clean(tparts[0]) + + if le...
1
package rewrite import ( "log" "net/http" "net/url" "path" "strings" "github.com/mholt/caddy/caddyhttp/httpserver" ) // To attempts rewrite. It attempts to rewrite to first valid path // or the last path if none of the paths are valid. // Returns true if rewrite is successful and false otherwise. func To(fs ht...
1
8,473
Is this a safe/reliable way to split the URL?
caddyserver-caddy
go
@@ -350,6 +350,7 @@ public class JdbcProjectLoader extends AbstractJdbcLoader implements public void uploadProjectFile(Project project, int version, String filetype, String filename, File localFile, String uploader) throws ProjectManagerException { + long startMs = System.currentTimeMillis(); l...
1
/* * Copyright 2012 LinkedIn Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
1
12,343
do we also need to profile the time to getConnection()?
azkaban-azkaban
java
@@ -34,6 +34,12 @@ def flow_to_json(flow: mitmproxy.flow.Flow) -> dict: "type": flow.type, "modified": flow.modified(), } + # .alpn_proto_negotiated is bytes, we need to decode that. + for conn in "client_conn", "server_conn": + if f[conn]["alpn_proto_negotiated"] is None: + ...
1
import hashlib import json import logging import os.path import re from io import BytesIO import mitmproxy.addons.view import mitmproxy.flow import tornado.escape import tornado.web import tornado.websocket from mitmproxy import contentviews from mitmproxy import exceptions from mitmproxy import flowfilter from mitmpr...
1
12,477
Should we move the decode part directly to the actual first-use of this? Or how does this affect if the value gets decoded and we need to get the bytes back later?
mitmproxy-mitmproxy
py
@@ -78,6 +78,16 @@ $config = [ ] ] ], + 'legacy-holds' => [ + 'type' => 'Laminas\Router\Http\Literal', + 'options' => [ + 'route' => '/MyResearch/Holds', + 'defaults' => [ + ...
1
<?php namespace VuFind\Module\Config; $config = [ 'router' => [ 'routes' => [ 'default' => [ 'type' => 'Laminas\Router\Http\Segment', 'options' => [ 'route' => '/[:controller[/[:action]]]', 'constraints' => [ ...
1
31,805
How would you feel about continuing to point this at the MyResearchController's holdsAction, but instead changing that action to force a redirect to the new holds-list route? That way, people will get sent to the new URL instead of having two different URLs that do the same thing.
vufind-org-vufind
php
@@ -1196,6 +1196,14 @@ func (c *client) markConnAsClosed(reason ClosedState, skipFlush bool) bool { if skipFlush { c.flags.set(skipFlushOnClose) } + // Be consistent with the creation: for routes and gateways, + // we use Noticef on create, so use that too for delete. + if c.kind == ROUTER || c.kind == GATEWAY {...
1
// Copyright 2012-2020 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
1
10,246
I think if yo use %s then you do not need reason.String() and can just do reason.
nats-io-nats-server
go
@@ -156,9 +156,9 @@ func WorkflowEndingRunID(endingRunID string) Tag { return newStringTag("wf-ending-run-id", endingRunID) } -// WorkflowDecisionTimeoutSeconds returns tag for WorkflowDecisionTimeoutSeconds -func WorkflowDecisionTimeoutSeconds(s int32) Tag { - return newInt32("wf-decision-timeout", s) +// Workflo...
1
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Soft...
1
9,845
Having "wf" prefix doesn't make sense anymore. Please remove.
temporalio-temporal
go
@@ -5,15 +5,15 @@ import { teardown, getMixedArray, mixedArrayHTML, - serializeHtml + serializeHtml, + sortAttributes, + spyAll } from '../_util/helpers'; import { div, span, p } from '../_util/dom'; /** @jsx createElement */ const h = createElement; -let spyAll = obj => Object.keys(obj).forEach(key => si...
1
import { createElement, render, Component, Fragment } from 'preact'; import { setupRerender } from 'preact/test-utils'; import { setupScratch, teardown, getMixedArray, mixedArrayHTML, serializeHtml } from '../_util/helpers'; import { div, span, p } from '../_util/dom'; /** @jsx createElement */ const h = createEl...
1
14,726
Removed this copy of the `spyAll` function and replaced it with the same function declared in `helpers.js`. Same for `sortAttributes` below
preactjs-preact
js
@@ -90,9 +90,9 @@ public class KubernetesContainerizedImpl extends EventHandler implements Contain public static final String DEFAULT_POD_NAME_PREFIX = "fc-dep"; public static final String DEFAULT_SERVICE_NAME_PREFIX = "fc-svc"; public static final String DEFAULT_CLUSTER_NAME = "azkaban"; - public static fina...
1
/* * Copyright 2020 LinkedIn Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
1
22,662
Default max cpu should be 8 and memory 64GB
azkaban-azkaban
java
@@ -156,6 +156,11 @@ class _MissingPandasLikeSeries(object): real = unsupported_property( 'real', reason="If you want to collect your data as an NumPy array, use 'to_numpy()' instead.") + nbytes = unsupported_property( + 'nbytes', + reason="'nbytes' requires to compute whole data...
1
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
1
11,367
@itholic, can you remove `nbytes = unsupported_property('nbytes')` at `_MissingPandasLikeSeries`?
databricks-koalas
py
@@ -101,9 +101,8 @@ func TestEnvironmentConfig(t *testing.T) { assert.True(t, conf.TaskIAMRoleEnabled, "Wrong value for TaskIAMRoleEnabled") assert.True(t, conf.TaskIAMRoleEnabledForNetworkHost, "Wrong value for TaskIAMRoleEnabledForNetworkHost") assert.True(t, conf.ImageCleanupDisabled, "Wrong value for ImageCle...
1
// Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license...
1
17,190
What happened to the assertion on `conf.TaskCPUMemLimit`?
aws-amazon-ecs-agent
go
@@ -5,10 +5,13 @@ import { render } from './render'; import { rerender } from './render-queue'; import options from './options'; +const createRef = Object; + export default { h, createElement, cloneElement, + createRef, Component, render, rerender,
1
import { h, h as createElement } from './h'; import { cloneElement } from './clone-element'; import { Component } from './component'; import { render } from './render'; import { rerender } from './render-queue'; import options from './options'; export default { h, createElement, cloneElement, Component, render, ...
1
12,073
Just curious: Is using `Object` faster than a literal `{}`?
preactjs-preact
js
@@ -59,6 +59,14 @@ func ValidateCertificateForACMEIssuer(crt *v1alpha1.CertificateSpec, issuer *v1a el = append(el, field.Invalid(specPath.Child("organization"), crt.Organization, "ACME does not support setting the organization name")) } + if crt.Duration.Duration != 0 { + el = append(el, field.Invalid(specPath...
1
/* Copyright 2018 The Jetstack cert-manager contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
1
13,814
How come we don't allow this to be configured with the ACME issuer? Happy to leave this as-is for now if there's a lot more consideration that needs to be made, but it seems like we could/should be able to allow this?
jetstack-cert-manager
go
@@ -208,7 +208,6 @@ type HTTPHealthCheckOpts struct { // NetworkLoadBalancerListener holds configuration that's need for a Network Load Balancer listener. type NetworkLoadBalancerListener struct { - Port string Protocol string TargetContainer string TargetPort string
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package template import ( "bytes" "fmt" "text/template" "github.com/dustin/go-humanize/english" "github.com/google/uuid" "github.com/aws/aws-sdk-go/aws" ) // Constants for template paths. const ( //...
1
20,453
Should we remove the `Aliases` field as well?
aws-copilot-cli
go
@@ -88,6 +88,8 @@ public class VoiceSearchWidget extends UIWidget implements WidgetManagerDelegate mMozillaSpeechService = MozillaSpeechService.getInstance(); mMozillaSpeechService.setProductTag("fxr"); + mMozillaSpeechService.storeSamples(false); + mMozillaSpeechService.storeTranscrip...
1
package org.mozilla.vrbrowser.ui.widgets; import android.Manifest; import android.app.Activity; import android.app.Application; import android.content.Context; import android.content.pm.PackageManager; import android.graphics.drawable.ClipDrawable; import android.graphics.drawable.Drawable; import android.graphics.dra...
1
6,744
what's the effect of turning these two off? is there an issue on file for context?
MozillaReality-FirefoxReality
java
@@ -35,9 +35,10 @@ type CLITestType string // List all test types here const ( - Wrapper CLITestType = "1 wrapper" - GcloudProdWrapperLatest CLITestType = "2 gcloud-prod wrapper-latest" - GcloudLatestWrapperLatest CLITestType = "3 gcloud-latest wrapper-latest" + Wrapper CLI...
1
// Copyright 2020 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
12,261
The format like gcloud-beta-prod is a bit hard to understand. Maybe find a a more clear way to describe it,
GoogleCloudPlatform-compute-image-tools
go
@@ -20,7 +20,7 @@ namespace OpenTelemetry.Tags /// <summary> /// Collection of tags representing the tags context. /// </summary> - public interface ITagContext : IEnumerable<Tag> + public interface ITagContext : IEnumerable<DistributedContextEntry> { } }
1
// <copyright file="ITagContext.cs" company="OpenTelemetry Authors"> // Copyright 2018, OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache....
1
12,541
Are we renaming this too in a follow up PR?
open-telemetry-opentelemetry-dotnet
.cs
@@ -179,7 +179,8 @@ class Preference extends Model public function getLocaleOptions() { $localeOptions = [ - 'be' => [Lang::get('system::lang.locale.be'), 'flag-by'], + 'ar' => [Lang::get('system::lang.locale.ar'), 'flag-sa'], + 'be' => [Lang::get('system::lang.locale.be'),...
1
<?php namespace Backend\Models; use App; use Lang; use Model; use Config; use Session; use BackendAuth; use DirectoryIterator; use DateTime; use DateTimeZone; use Carbon\Carbon; /** * Backend preferences for the backend user * * @package october\backend * @author Alexey Bobkov, Samuel Georges */ class Preference...
1
12,898
The indentation on this is off by one space to the left
octobercms-october
php
@@ -52,7 +52,9 @@ static VkImageSubresourceRange RangeFromLayers(const VkImageSubresourceLayers &s static VkImageSubresourceRange MakeImageFullRange(const VkImageCreateInfo &create_info) { const auto format = create_info.format; VkImageSubresourceRange init_range{0, 0, VK_REMAINING_MIP_LEVELS, 0, VK_REMAININ...
1
/* Copyright (c) 2015-2020 The Khronos Group Inc. * Copyright (c) 2015-2020 Valve Corporation * Copyright (c) 2015-2020 LunarG, Inc. * Copyright (C) 2015-2020 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You m...
1
14,168
I guess nothing is wrong with this approach, but more curious if you didn't just go `|| (format != VK_FORMAT_UNDEFINED)) {` As if there ever was another external format system added in Vulkan it would need to be manually added here
KhronosGroup-Vulkan-ValidationLayers
cpp
@@ -22,7 +22,8 @@ package com.github.javaparser.resolution.types; import java.util.*; -import java.util.stream.Collectors; + +import static java.util.stream.Collectors.joining; /** * A union type is defined in java as list of types separates by pipes.
1
/* * Copyright (C) 2007-2010 Júlio Vilmar Gesser. * Copyright (C) 2011, 2013-2016 The JavaParser Team. * * This file is part of JavaParser. * * JavaParser can be used either under the terms of * a) the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the ...
1
13,388
Is order really irrelevant here?
javaparser-javaparser
java
@@ -15,11 +15,14 @@ import android.net.Uri; import android.provider.MediaStore; import android.speech.RecognizerIntent; import android.support.annotation.NonNull; +import android.support.design.widget.Snackbar; import android.util.Base64; import android.view.View; import android.webkit.MimeTypeMap; +import androi...
1
package org.fossasia.phimpme.utilities; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.graphi...
1
12,880
I think this import will be unused now. If it is unused remove it.
fossasia-phimpme-android
java
@@ -37,6 +37,13 @@ type MutationItem struct { value []byte } +func NewBatch(kv RwKV) StatelessRwTx { + return &mutation{ + db: NewObjectDatabase(kv), + puts: btree.New(32), + } +} + func (mi *MutationItem) Less(than btree.Item) bool { i := than.(*MutationItem) c := strings.Compare(mi.table, i.table)
1
package ethdb import ( "bytes" "context" "encoding/binary" "errors" "fmt" "strings" "sync" "sync/atomic" "time" "unsafe" "github.com/google/btree" "github.com/ledgerwatch/turbo-geth/common" "github.com/ledgerwatch/turbo-geth/common/dbutils" "github.com/ledgerwatch/turbo-geth/log" "github.com/ledgerwatc...
1
22,041
Let's change to tx
ledgerwatch-erigon
go
@@ -55,6 +55,12 @@ const ( // By default, this will be the block type given to all blocks // that aren't explicitly some other type. defaultBlockTypeDefault = keybase1.BlockType_DATA + + // By default, allow 10% of the free bytes on disk to be used in the disk block cache. + defaultDiskBlockCacheFraction = 0.10 +...
1
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libkbfs import ( "flag" "os" "path/filepath" "strings" "sync" "time" kbname "github.com/keybase/client/go/kbun" "github.com/keybase/client/go/logger" ...
1
20,325
Looks like I was wrong about the sync cache size being 15% before. There seems to be some reporting bug related to my use of the sync cache, that makes the limit different from the working set cache limit. For now, I say we keep this at `0.10` (change the param default too), and we can change it later if needed.
keybase-kbfs
go
@@ -151,7 +151,7 @@ func sentryNotSetupWarning() { // from the last saved version. If it is, prompt to request anon ddev usage stats // and update the info. func checkDdevVersionAndOptInSentry() error { - if !output.JSONOutput && version.COMMIT != globalconfig.DdevGlobalConfig.LastUsedVersion && globalconfig.DdevGlo...
1
package cmd import ( "github.com/drud/ddev/pkg/dockerutil" "github.com/drud/ddev/pkg/globalconfig" "github.com/drud/ddev/pkg/output" "github.com/drud/ddev/pkg/updatecheck" "github.com/drud/ddev/pkg/util" "github.com/drud/ddev/pkg/version" "github.com/getsentry/raven-go" log "github.com/sirupsen/logrus" "githu...
1
13,373
I think it'd be a good idea to define the environment variable name as a constant in values.go because it's hard-coded in several places, but that's a small point.
drud-ddev
go
@@ -0,0 +1,6 @@ +class AddIndexesToClassifications < ActiveRecord::Migration + def change + add_index :classifications, :topic_id + add_index :classifications, [:classifiable_id, :classifiable_type] + end +end
1
1
18,565
Style/SymbolArray: Use %i or %I for an array of symbols.
thoughtbot-upcase
rb
@@ -133,6 +133,13 @@ func TestComposeCmd(t *testing.T) { assert.Error(err) } +func TestCheckCompose(t *testing.T) { + assert := asrt.New(t) + + err := CheckDockerCompose() + assert.NoError(err) +} + func TestGetAppContainers(t *testing.T) { assert := asrt.New(t) sites, err := GetAppContainers("dockertest")
1
package dockerutil_test import ( "os" "testing" log "github.com/sirupsen/logrus" "path/filepath" . "github.com/drud/ddev/pkg/dockerutil" "github.com/drud/ddev/pkg/output" docker "github.com/fsouza/go-dockerclient" asrt "github.com/stretchr/testify/assert" ) var ( // The image here can be any image, it jus...
1
11,989
Our habit is to go ahead and put a description line (or more) in front of every function, not just non-test or exported functions.
drud-ddev
go
@@ -116,6 +116,10 @@ public abstract class AbstractOAuth2AuthenticationProvider implements Authentica final OAuthRequest request = new OAuthRequest(Verb.GET, userEndpoint, service); request.addHeader("Authorization", "Bearer " + accessToken.getAccessToken()); request.setCharset("UTF-8"); + + ...
1
package edu.harvard.iq.dataverse.authorization.providers.oauth2; import com.github.scribejava.core.builder.ServiceBuilder; import com.github.scribejava.core.builder.api.BaseApi; import com.github.scribejava.core.model.OAuth2AccessToken; import com.github.scribejava.core.model.OAuthRequest; import com.github.scribejava...
1
40,432
I'm slightly concerned about this because doesn't ORCID use XML instead of JSON?
IQSS-dataverse
java
@@ -17,7 +17,11 @@ def is_new_user_stats_batch(): So, we check the database and see if the difference between the last time stats were updated and right now is greater than 12 hours. """ - return datetime.now(timezone.utc) - db_stats.get_timestamp_for_last_user_stats_update() > timedelta(hours=TIME_TO...
1
""" This file contains handler functions for rabbitmq messages we receive from the Spark cluster. """ import listenbrainz.db.user as db_user import listenbrainz.db.stats as db_stats from flask import current_app, render_template from brainzutils.mail import send_mail from datetime import datetime, timezone, timedelta ...
1
15,941
brackets around if conditions isn't really pythonic.
metabrainz-listenbrainz-server
py
@@ -396,9 +396,6 @@ func (h *Impl) Stop() { h.namespaceCache.Stop() h.membershipMonitor.Stop() h.ringpopChannel.Close() - if err := h.grpcListener.Close(); err != nil { - h.logger.WithTags(tag.Error(err)).Error("failed to close gRPC listener") - } h.runtimeMetricsReporter.Stop() h.persistenceBean.Close() h...
1
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Soft...
1
10,036
It turn out that when we close server it closed underlying listener itself, so this line always generated and error.
temporalio-temporal
go
@@ -38,13 +38,13 @@ function createObjects(user) { error: err => console.log(err) }, schema: [{ - name: 'Dog', - primaryKey: '_id', + name: "Dog", + primaryKey: "_id", properties: { - _id: 'objectId?', - br...
1
/* This script creates 3 new objects into a new realm. These are objects are validated to exists by the download api tests. */ 'use strict'; console.log("download-api-helper started"); const appId = process.argv[2]; const appUrl = process.argv[3]; const partition = process.argv[4]; const realmModule = process.argv[5]; ...
1
19,299
Looks like this is for debugging? Maybe just remove.
realm-realm-js
js
@@ -187,7 +187,10 @@ module Mongoid # # @since 1.0.0 def exists? - context.count > 0 + Mongoid.unit_of_work(disable: :current) do + # Don't use count here since Mongo does not use counted b-tree indexes + !context.dup.criteria.only(:_id).limit(1).entries.first.nil? + end ...
1
# encoding: utf-8 require "mongoid/criterion/inspection" require "mongoid/criterion/scoping" module Mongoid # The +Criteria+ class is the core object needed in Mongoid to retrieve # objects from the database. It is a DSL that essentially sets up the # selector and options arguments that get passed on to a Mongo...
1
9,661
Same here - this code is duplicated. I think we can just remove the `exists?` method completely from `Criteria` and it should delegate to the context.
mongodb-mongoid
rb
@@ -150,8 +150,14 @@ void SYCLInternal::initialize(const sycl::queue& q) { m_maxShmemPerBlock = d.template get_info<sycl::info::device::local_mem_size>(); - m_indirectKernelMem.reset(*m_queue, m_instance_id); + m_indirectReducerMem.reset(*m_queue, m_instance_id); + for (auto& usm_mem : m_indi...
1
/* //@HEADER // ************************************************************************ // // Kokkos v. 3.0 // Copyright (2020) National Technology & Engineering // Solutions of Sandia, LLC (NTESS). // // Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Govern...
1
32,241
I'm not quite sure that we preallocate memory. Do you have a good reason for that?
kokkos-kokkos
cpp
@@ -731,6 +731,17 @@ func (s *Server) checkAuth(c *client) bool { } } +// Check that number of clients is below Max connection setting. +func (s *Server) checkMaxConn(c *client) bool { + if c.typ == CLIENT { + s.mu.Lock() + ok := len(s.clients) <= s.opts.MaxConn + s.mu.Unlock() + return ok + } + return true +}...
1
// Copyright 2012-2016 Apcera Inc. All rights reserved. package server import ( "bufio" "crypto/tls" "encoding/json" "fmt" "io/ioutil" "net" "net/http" "os" "runtime" "strconv" "sync" "time" // Allow dynamic profiling. "github.com/nats-io/gnatsd/util" _ "net/http/pprof" ) // Info is the information s...
1
6,727
If we have added to s.clients, we could just do the following since if its a route will be ok I think. s.mu.Lock() defer s.mu.Unlock() return len(s.clients) <+ s.opts.MaxConn
nats-io-nats-server
go
@@ -53,7 +53,10 @@ void BalanceTask::invoke() { LOG(INFO) << taskIdStr_ << "Ask the src to give up the leadership."; SAVE_STATE(); if (srcLived_) { - client_->transLeader(spaceId_, partId_, src_).thenValue([this](auto&& resp) { + // For balance task o...
1
/* Copyright (c) 2019 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "meta/processors/admin/BalanceTask.h" #include <folly/synchronization/Baton.h> #include "meta/processors/Common...
1
28,424
if the targetLeader is src_ itself, it is really need call transLeader function?
vesoft-inc-nebula
cpp
@@ -85,6 +85,7 @@ public class CSharpSurfaceNamer extends SurfaceNamer { @Override public String getAndSavePagedResponseTypeName( + Method method, FeatureConfig featureConfig, ModelTypeTable typeTable, TypeRef inputType,
1
/* Copyright 2016 Google Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
1
18,487
Can we remove this featureConfig since you removed in L98 (assuming it is not used else where)
googleapis-gapic-generator
java
@@ -11,6 +11,7 @@ using Newtonsoft.Json; using Xunit; using System.Collections.Generic; +using System.Linq; namespace Microsoft.CodeAnalysis.Sarif.Driver.Sdk {
1
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.IO; using System.Reflection; using Microsoft.CodeAnalysis.Sarif.Sdk; using Microsoft.CodeAnalysis.Sarif.Readers; using Newtonsoft.Json; us...
1
10,560
namespaces in this file need a sorting
microsoft-sarif-sdk
.cs
@@ -942,7 +942,7 @@ func ConfigureDefaultMTUs(hostMTU int, c *Config) { c.VXLANMTU = hostMTU - vxlanMTUOverhead } if c.Wireguard.MTU == 0 { - if c.KubernetesProvider == config.ProviderAKS && c.RouteSource == "WorkloadIPs" { + if c.Wireguard.EncryptHostTraffic { // The default MTU on Azure is 1500, but the ...
1
// Copyright (c) 2020-2021 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
1
19,217
This line should actually be: `if c.KubernetesProvider == config.ProviderAKS && c.Wireguard.EncryptHostTraffic {` because we only need to tweak the MTU like this on AKS.
projectcalico-felix
go
@@ -36,8 +36,14 @@ class FastTemporalMemory(TemporalMemory): """ def __init__(self, *args, **kwargs): + maxSegmentsPerCell = kwargs.get("maxSegmentsPerCell") or 255 + maxSynapsesPerSegment = kwargs.get("maxSynapsesPerSegment") or 255 + super(FastTemporalMemory, self).__init__(*args, **kwargs) - se...
1
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
1
20,003
`get` has an optional second parameter that is the default if the key isn't found.
numenta-nupic
py
@@ -63,6 +63,7 @@ if (LDAP_HOST && $ldap_auth) { if (!$passwd_hash) { echo "<account_out>\n"; echo " <success/>\n"; + echo "<id>$user->id</id>\n"; echo "</account_out>\n"; exit(); }
1
<?php // This file is part of BOINC. // http://boinc.berkeley.edu // Copyright (C) 2008 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation, // either version 3 of the ...
1
8,938
Please also indent the new response line as was done to the existing line above.
BOINC-boinc
php
@@ -3403,6 +3403,13 @@ void Client::Handle_OP_AutoFire(const EQApplicationPacket *app) DumpPacket(app); return; } + + if (this->GetTarget() == this) { + this->MessageString(Chat::TooFarAway, TRY_ATTACKING_SOMEONE); + auto_fire = false; + return; + } + bool *af = (bool*)app->pBuffer; auto_fire = *af; au...
1
/* EQEMu: Everquest Server Emulator Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is di...
1
11,022
Shouldn't need this-> here.
EQEmu-Server
cpp
@@ -2717,7 +2717,7 @@ bool Game::internalStartTrade(Player* player, Player* tradePartner, Item* tradeI player->sendTradeItemRequest(player->getName(), tradeItem, true); if (tradePartner->tradeState == TRADE_NONE) { - tradePartner->sendTextMessage(MESSAGE_EVENT_ADVANCE, fmt::format("{:s} wants to trade with you."...
1
/** * The Forgotten Server - a free and open-source MMORPG server emulator * Copyright (C) 2019 Mark Samman <mark.samman@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; eithe...
1
19,767
I believe this is incorrect, if I'm not wrong, MESSAGE_TRADE should be used when buying/selling items from NPC's
otland-forgottenserver
cpp
@@ -728,6 +728,8 @@ namespace pwiz.Skyline return _listGraphPeakArea.FirstOrDefault(g => g.Type == type) ?? CreateGraphPeakArea(type); else if (split[1] == typeof(MassErrorGraphController).Name) return _listGraphMassError.FirstOrDefault(g => g.Type == type) ?? ...
1
/* * Original author: Brendan MacLean <brendanx .at. u.washington.edu>, * MacCoss Lab, Department of Genome Sciences, UW * * Copyright 2009 University of Washington - Seattle, WA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in co...
1
13,608
Better if you give split[0], split[1], and split[2] descriptive names than using them this much through so many lines of code.
ProteoWizard-pwiz
.cs
@@ -41,8 +41,6 @@ export const getSetupIncompleteComponent = ( module, inGrid = false, fullWidth = return ctaWrapper( cta, inGrid, fullWidth, createGrid ); }; -export default getSetupIncompleteComponent; - /** * Creates a CTA component when module needs to be activated. Different wrapper HTML is needed dependin...
1
/** * `getSetupIncompleteComponents` function. * * Site Kit by Google, Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licen...
1
40,129
I know we're deleting this soon but I thought I'd fix it anyway :smile:
google-site-kit-wp
js
@@ -58,9 +58,9 @@ public final class Slf4jConstantLogMessage extends BugChecker implements MethodI List<? extends ExpressionTree> args = tree.getArguments(); ExpressionTree messageArg = ASTHelpers.isCastable( - ASTHelpers.getType(tree.getArguments().get(0)), - state.get...
1
/* * (c) Copyright 2017 Palantir Technologies Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
1
7,746
I like this, makes it clearer what scope the continuation is in
palantir-gradle-baseline
java
@@ -367,12 +367,12 @@ describe('MergeCells', () => { keyDownUp('tab'); keyDownUp('enter'); - expect(spec().$container.find('.handsontableInputHolder textarea').val()).toEqual('top-left-corner!'); + expect(spec().$container.find('.handsontableInputHolder textarea').val()).toEqual('A1'); ...
1
describe('MergeCells', () => { let id = 'testContainer'; beforeEach(function() { this.$container = $(`<div id="${id}"></div>`).appendTo('body'); }); afterEach(function() { if (this.$container) { destroy(); this.$container.remove(); } }); describe('initialization', () => { it('...
1
14,823
These test checks if the value of the merged cells is correct. Please revert the changes and set `autoWrapCol` and `autoWrapRow` to `false` to the Handsontable instance. This change applies to the entire mergeCells.e2e.js file.
handsontable-handsontable
js
@@ -598,3 +598,14 @@ func encodeAccounts(s *changeset.ChangeSet) ([]byte, error) { } // ---- Copy-Paste of code to decode ChangeSets: End ----- + +var clearHashedChangesets = Migration{ + Name: "clear_hashed_changesets", + Up: func(db ethdb.Database, tmpdir string, progress []byte, OnLoadCommit etl.LoadCommitHandle...
1
package migrations import ( "bytes" "encoding/binary" "fmt" "sort" "time" "github.com/ledgerwatch/turbo-geth/common" "github.com/ledgerwatch/turbo-geth/common/changeset" "github.com/ledgerwatch/turbo-geth/common/dbutils" "github.com/ledgerwatch/turbo-geth/common/etl" "github.com/ledgerwatch/turbo-geth/ethdb...
1
21,991
Don't need to clear them - because nobody have data there, also can don't delete buckets - just leave them, new nodes will not have them if remove bucket from buckets.go
ledgerwatch-erigon
go
@@ -0,0 +1,17 @@ +/* Copyright 2016 Google Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by appli...
1
1
16,101
Similarly, this has only one implementing class
googleapis-gapic-generator
java
@@ -22,7 +22,7 @@ module Selenium class Common MAX_REDIRECTS = 20 # same as chromium/gecko CONTENT_TYPE = 'application/json'.freeze - DEFAULT_HEADERS = {'Accept' => CONTENT_TYPE}.freeze + DEFAULT_HEADERS = {'Accept' => CONTENT_TYPE, 'Content-Type' => 'application/x-...
1
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
1
15,359
Does it send requests with urlencoded bodies anywhere? I thought it sends only json. Maybe content-type should be `application/json` by default?
SeleniumHQ-selenium
rb
@@ -268,7 +268,7 @@ class StubsGenerator /** * @return PhpParser\Node\Identifier|PhpParser\Node\Name|PhpParser\Node\NullableType|null */ - public static function getParserTypeFromPsalmType(Type\Union $type) + public static function getParserTypeFromPsalmType(Type\Union $type): ?PhpParser\NodeAbst...
1
<?php namespace Psalm\Internal\Stubs\Generator; use PhpParser; use Psalm\Internal\Scanner\ParsedDocblock; use Psalm\Type; class StubsGenerator { public static function getAll( \Psalm\Codebase $codebase, \Psalm\Internal\Provider\ClassLikeStorageProvider $class_provider, \Psalm\Internal\Pro...
1
9,160
I must have forgotten that one in previous PR
vimeo-psalm
php
@@ -1,10 +1,8 @@ require "test_helper" class DiaryCommentTest < ActiveSupport::TestCase - api_fixtures - fixtures :diary_comments - def test_diary_comment_count - assert_equal 4, DiaryComment.count + comment = create(:diary_comment) + assert_includes DiaryComment.all, comment end end
1
require "test_helper" class DiaryCommentTest < ActiveSupport::TestCase api_fixtures fixtures :diary_comments def test_diary_comment_count assert_equal 4, DiaryComment.count end end
1
10,079
This test name doesn't really reflect what the test does any more... Then again I'm not really sure what it is testing now - is it actually just testing that FactoryGirl can create records? or does that itself funnel through the rails code so that we're testing rails can create records?
openstreetmap-openstreetmap-website
rb
@@ -1423,8 +1423,12 @@ func (m *executor) putCStorVolumeReplica() (err error) { // putUpgradeResult will put an upgrade result as defined in the task func (m *executor) putUpgradeResult() (err error) { + raw, err := template.AsTemplatedBytes("UpgradeResult", m.Runtask.Spec.Task, m.Values) + if err != nil { + retur...
1
/* Copyright 2017 The OpenEBS Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
1
15,396
Can this be `BuilderForYAMLObject`
openebs-maya
go
@@ -42,12 +42,14 @@ cpp_test = pytest.mark.skipif(not hasattr(core, "test_coverage"), #------------------------------------------------------------------------------- def test_multiprocessing_threadpool(): + import atexit # Verify that threads work properly after forking (#1758) import multiprocessing ...
1
#!/usr/bin/env python # -*- coding: utf-8 -*- #------------------------------------------------------------------------------- # Copyright 2018 H2O.ai # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the...
1
11,950
better use `with mp.Pool(...) as pool:` here
h2oai-datatable
py
@@ -48,8 +48,12 @@ public class Pids extends AbstractApiBean { String baseUrl = systemConfig.getDataCiteRestApiUrlString(); String username = System.getProperty("doi.username"); String password = System.getProperty("doi.password"); - JsonObjectBuilder result = PidUtil.queryDoi(persiste...
1
package edu.harvard.iq.dataverse.api; import edu.harvard.iq.dataverse.Dataset; import static edu.harvard.iq.dataverse.api.AbstractApiBean.error; import edu.harvard.iq.dataverse.authorization.users.User; import edu.harvard.iq.dataverse.engine.command.impl.DeletePidCommand; import edu.harvard.iq.dataverse.engine.command...
1
43,350
Since this is a config problem, BAD_REQUEST is probably not the right response.
IQSS-dataverse
java
@@ -479,6 +479,11 @@ func (o *Options) ProcessConfigFile(configFile string) error { errors = append(errors, err) continue } + if dur < 30*time.Second { + err := &configErr{tk, fmt.Sprintf("invalid lame_duck_duration of %v, minimum is 30 seconds", dur)} + errors = append(errors, err) + continue ...
1
// Copyright 2012-2018 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
1
8,369
We could probably do 1 sec if we have time, and hence exit early if we have small number of clients. So LB = 60 sec. Grace = 10secs. So 50Sec window, if NumClients < 50, Close 1 every second. Then exit when NumClients == 0.
nats-io-nats-server
go
@@ -75,7 +75,7 @@ def combine_frames(this, *args, how="full"): # If the same named index is found, that's used. for this_column, this_name in this_index_map: for that_col, that_name in that_index_map: - if this_name == that_name: + if (this_column == that_col...
1
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
1
13,295
can you rename `that_col` to `that_column`?
databricks-koalas
py
@@ -19,7 +19,9 @@ /** * Internal dependencies */ -import Widgets from './googlesitekit/widgets'; +import { Widget } from './googlesitekit/widgets'; + +const Widgets = { componenets: Widget }; if ( typeof global.googlesitekit === 'undefined' ) { global.googlesitekit = {};
1
/** * Public Widgets API entrypoint. * * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE...
1
29,381
This is not correct, it will override everything else that is currently in `Widgets`. This file shouldn't be modified at all, we should be adding `components.Widget` in `assets/js/googlesitekit/widgets/index.js`, where the rest of that object is defined. Oh, and there's a typo here :)
google-site-kit-wp
js
@@ -152,6 +152,14 @@ void BalanceTask::invoke() { if (!resp.ok()) { LOG(INFO) << taskIdStr_ << "Update meta failed, status " << resp; ret_ = Result::FAILED; + } else if (kv_ != nullptr) { + if (LastUpdateTimeMan::update(kv_, ti...
1
/* Copyright (c) 2019 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "meta/processors/admin/BalanceTask.h" #include <folly/synchronization/Baton.h> #include "meta/processors/Common...
1
28,079
Each task finished will result in the meta info updated?
vesoft-inc-nebula
cpp
@@ -88,7 +88,7 @@ class PageSpeedInsightsSetup extends Component { handleAPIKeyChange( e ) { this.setState( { - apikey: e.currentTarget.value, + apikey: e.currentTarget.value.replace( /\s/g, '' ), disabled: 0 === e.currentTarget.value.length, } ); }
1
/** * TagmanagerSetup component. * * Site Kit by Google, Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0...
1
24,375
Quick follow-up @aaemnnosttv, why this and not `.trim()`?
google-site-kit-wp
js
@@ -1,3 +1,4 @@ +/* eslint-disable sitekit/camelcase-acronyms */ /** * Profile Select component tests. *
1
/** * Profile Select component tests. * * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENS...
1
30,935
I don't think we should have file-wide exceptions for this rule, let's annotate the individual instances.
google-site-kit-wp
js
@@ -101,6 +101,8 @@ public class MailServiceBean implements java.io.Serializable { private Session session; public boolean sendSystemEmail(String to, String subject, String messageText) { + if (true) return true; + boolean sent = false; String body = messageText + ResourceBundle.get...
1
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package edu.harvard.iq.dataverse; import com.sun.mail.smtp.SMTPSendFailedException; import edu.harvard.iq.dataverse.authorization.grou...
1
36,091
@raprasad you plan to take this "if true" out, right?
IQSS-dataverse
java
@@ -496,11 +496,13 @@ class ConsoleMaster(flow.FlowMaster): self.eventlog = not self.eventlog self.view_flowlist() - def _readflow(self, path): - path = os.path.expanduser(path) + def _readflow(self, paths): try: - f = file(path, "rb") - flows = list(flow....
1
from __future__ import absolute_import import mailcap, mimetypes, tempfile, os, subprocess, glob, time, shlex, stat import os.path, sys, weakref, traceback import urwid from .. import controller, utils, flow, script, proxy from . import flowlist, flowview, help, common, grideditor, palettes, contentview, flowdetailview...
1
10,617
Could you adjust this to `with open(path, "rb"):` here and below? We should make sure that we close all files.
mitmproxy-mitmproxy
py
@@ -7,6 +7,8 @@ package libkbfs import ( "testing" + "golang.org/x/net/context" + "github.com/keybase/kbfs/kbfshash" "github.com/keybase/kbfs/tlf" )
1
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libkbfs import ( "testing" "github.com/keybase/kbfs/kbfshash" "github.com/keybase/kbfs/tlf" ) func blockCacheTestInit(t *testing.T, capacity int, bytesCap...
1
15,017
Does this need its own import block or can it be combined with the imports below as in most other files?
keybase-kbfs
go
@@ -34,6 +34,12 @@ _registered_options = { # For example, this value determines whether the repr() for a dataframe prints out fully or # just a truncated repr. "display.max_rows": 1000, # TODO: None should support unlimited. + + # This determines whether or not to operate between two different datafr...
1
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
1
11,259
It defaults to `false`.
databricks-koalas
py
@@ -7,8 +7,12 @@ type corsHandler struct { } func (wrapper corsHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) { - resp.Header().Set("Access-Control-Allow-Origin", "*") - resp.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE") + if isPreflightCorsRequest(req) { + applyP...
1
package tequilapi import "net/http" type corsHandler struct { originalHandler http.Handler } func (wrapper corsHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) { resp.Header().Set("Access-Control-Allow-Origin", "*") resp.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE"...
1
10,175
Why conditional check is done? As i understand, later both `applyPreflightCorsResponse()` and `allowAllCorsActions()` does the same
mysteriumnetwork-node
go
@@ -142,6 +142,9 @@ func (mh *MessageHandle) OnRegister(connection conn.Connection) { if _, ok := mh.KeepaliveChannel[nodeID]; !ok { mh.KeepaliveChannel[nodeID] = make(chan struct{}, 1) + } else { + klog.Warningf("Node %v/%v has not yet exit, OnRegister failed", projectID, nodeID) + return } io := &hubio...
1
package handler import ( "encoding/json" "fmt" "regexp" "strings" "sync" "time" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" "k8s.io/klog" beehiveContext "github.com/kubeedge/beehive/pkg/core/...
1
16,359
has not yet exit?
kubeedge-kubeedge
go
@@ -247,6 +247,11 @@ _rt_hemuother_per_user_known = { class RadioTap(Packet): name = "RadioTap dummy" + deprecated_fields = { + "Channel": "ChannelFrequency", # 2.4.3 + "ChannelFlags2": "ChannelPlusFlags", # 2.4.3 + "ChannelNumber": "ChannelPlusNumber" # 2.4.3 + } fields_desc ...
1
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Scapy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # any later version. # #...
1
15,260
I wonder if the version should be part of the deprecation API. It might ease our future selves while debugging issues =)
secdev-scapy
py
@@ -102,7 +102,7 @@ class ExternalDriverSupplier implements Supplier<WebDriver> { Optional<Class<? extends Supplier<WebDriver>>> supplierClass = getDelegateClass(); if (supplierClass.isPresent()) { Class<? extends Supplier<WebDriver>> clazz = supplierClass.get(); - logger.info("Using delegate supp...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
16,449
We chose `info` in the test code for obvious reasons. Changing to `finest` makes debugging harder and noisier.
SeleniumHQ-selenium
rb
@@ -183,10 +183,11 @@ namespace Microsoft.Sarif.Viewer HelpLink = rule?.HelpUri?.ToString() }; - IEnumerable<IEnumerable<AnnotatedCodeLocation>> stackLocations = CreateAnnotationsFromStacks(result.Stacks); + IEnumerable<IEnumerable<AnnotatedCodeLocation>> stackLocat...
1
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysi...
1
10,595
This is just a rename...
microsoft-sarif-sdk
.cs
@@ -33,7 +33,10 @@ func GetLengthLimitedID(fixedPrefix, suffix string, maxLength int) string { // start with the character that we use to denote a shortened string, which could // result in a clash. Hash the value and truncate... hasher := sha256.New() - hasher.Write([]byte(suffix)) + _, err := hasher.Write...
1
// Copyright (c) 2016-2017 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
1
17,190
Should probably panic here. I think hashers are contracted not to return errors (and returning "" doesn't handle the error)
projectcalico-felix
go
@@ -13,7 +13,7 @@ import ( // Address is the interface that defines methods to manage Filecoin addresses and wallets. type Address interface { Addrs() Addrs - Import(ctx context.Context, f files.Directory) ([]address.Address, error) + Import(ctx context.Context, f files.File) ([]address.Address, error) Export(ctx...
1
package api import ( "context" "gx/ipfs/QmQmhotPUzVrMEWNK3x1R5jQ5ZHWyL7tVUrmRPjrBrvyCb/go-ipfs-files" "gx/ipfs/QmTu65MVbemtUxJEWgsTtzv9Zv9P8rvmqNA4eG9TrTRGYc/go-libp2p-peer" "github.com/filecoin-project/go-filecoin/address" "github.com/filecoin-project/go-filecoin/types" ) // Address is the interface that defi...
1
17,220
Aside: this is a confusing name for an interface that contains multiple addresses.
filecoin-project-venus
go
@@ -47,10 +47,8 @@ module Bolt state = node_result['state'] result = node_result['result'] - result_output = Bolt::Node::ResultOutput.new - result_output.stdout << result.to_json if state == 'finished' - Bolt::Node::Success.new(result.to_json, result_output) + exit_code = ...
1
require 'base64' require 'json' require 'orchestrator_client' module Bolt class Orch < Node CONF_FILE = File.expand_path('~/.puppetlabs/client-tools/orchestrator.conf') BOLT_MOCK_FILE = 'bolt/tasks/init'.freeze def connect; end def disconnect; end def make_client OrchestratorClient.new({...
1
7,003
We expect to use Bolt::CommandResult for scripts as well?
puppetlabs-bolt
rb
@@ -386,7 +386,9 @@ module RSpec user_metadata = Metadata.build_hash_from(args) @metadata = Metadata::ExampleGroupHash.create( - superclass_metadata, user_metadata, description, *args, &example_group_block + superclass_metadata, user_metadata, + superclass.method(:next_run...
1
RSpec::Support.require_rspec_support 'recursive_const_methods' module RSpec module Core # ExampleGroup and {Example} are the main structural elements of # rspec-core. Consider this example: # # describe Thing do # it "does something" do # end # end # # The obje...
1
14,762
same thing as above inre commas and args?
rspec-rspec-core
rb
@@ -224,6 +224,9 @@ public class SolrConfig extends XmlConfigFile implements MapSerializable { queryResultWindowSize = Math.max(1, getInt("query/queryResultWindowSize", 1)); queryResultMaxDocsCached = getInt("query/queryResultMaxDocsCached", Integer.MAX_VALUE); enableLazyFieldLoading = getBool("query/ena...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
34,985
Should we validate that this is between 0 and 100?
apache-lucene-solr
java
@@ -332,7 +332,7 @@ func (c *cliApp) help() { // quit stops cli and client commands and exits application func (c *cliApp) quit() { - stop := utils.SoftKiller(c.Kill) + stop := utils.HardKiller(c.Kill) stop() }
1
/* * Copyright (C) 2017 The "MysteriumNetwork/node" Authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
1
12,367
`HardKiller` doing `os.Exit()` without proper shutting down other dependencies. I think there should be a better approach for this.
mysteriumnetwork-node
go
@@ -136,16 +136,12 @@ const struct wlr_gles2_pixel_format *get_gles2_format_from_gl( return NULL; } -const uint32_t *get_gles2_shm_formats(const struct wlr_gles2_renderer *renderer, - size_t *len) { - static uint32_t shm_formats[sizeof(formats) / sizeof(formats[0])]; - size_t j = 0; +void init_gles2_data_ptr_form...
1
#include <drm_fourcc.h> #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include "render/gles2.h" /* * The DRM formats are little endian while the GL formats are big endian, * so DRM_FORMAT_ARGB8888 is actually compatible with GL_BGRA_EXT. */ static const struct wlr_gles2_pixel_format formats[] = { { .drm_forma...
1
18,397
Why isnt the return value checked?
swaywm-wlroots
c
@@ -28,12 +28,15 @@ package util import ( "fmt" - "k8s.io/apimachinery/pkg/util/json" "strings" + + "k8s.io/apimachinery/pkg/util/json" ) // GetNestedField returns a nested field from the provided map func GetNestedField(obj map[string]interface{}, fields ...string) interface{} { + fmt.Println("obj", obj) +...
1
/* Copyright 2015 The Kubernetes Authors. Copyright 2018 The OpenEBS Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by appl...
1
18,560
remove this debug
openebs-maya
go
@@ -286,10 +286,13 @@ auto data_type_layer<TensorDataType>::get_local_error_signals(int parent_index) // Accessing matrices corresponding to parent/child layer template <typename TensorDataType> auto data_type_layer<TensorDataType>::get_activations(const Layer& child) const -> const BaseDistMat& { - const int child...
1
//////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2014-2019, Lawrence Livermore National Security, LLC. // Produced at the Lawrence Livermore National Laboratory. // Written by the LBANN Research Team (B. Van Essen, et al.) listed in // the CONTRIBUTORS file. <lbann-dev@l...
1
15,056
This should change to a call to `Layer::find_layer_index`, which should be renamed to `find_child_layer_index` and it should return a `size_t` (technically the `difference_type` for whatever iterators are going to be used).
LLNL-lbann
cpp
@@ -114,7 +114,7 @@ class py2exe(build_exe.py2exe): def build_manifest(self, target, template): mfest, rid = build_exe.py2exe.build_manifest(self, target, template) - if getattr(target, "script", None) == "nvda.pyw": + if getattr(target, "script", "").endswith(".pyw"): # This is one of the main application...
1
# -*- coding: UTF-8 -*- #setup.py #A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2006-2017 NV Access Limited, Peter Vágner, Joseph Lee #This file is covered by the GNU General Public License. #See the file COPYING for more details. import os import copy import gettext gettext.install("nvda", unico...
1
21,812
what is this change about?
nvaccess-nvda
py