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
@@ -149,6 +149,8 @@ void PDPSimpleListener::onNewCacheChangeAdded(RTPSReader* reader, const CacheCha { listener->onParticipantDiscovery(this->mp_SPDP->getRTPSParticipant()->getUserRTPSParticipant(), std::move(info)); } + + return; // change already removed from hist...
1
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). // // 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 re...
1
14,257
Then, where is it removed?
eProsima-Fast-DDS
cpp
@@ -16,6 +16,7 @@ func TestVHostTrie(t *testing.T) { "example.com/foo/bar", "*.example.com/test", }) + CaseSensitivePath = true assertTestTrie(t, trie, []vhostTrieTest{ {"not-in-trie.com", false, "", "/"}, {"example", true, "example", "/"},
1
package httpserver import ( "net/http" "net/http/httptest" "testing" ) func TestVHostTrie(t *testing.T) { trie := newVHostTrie() populateTestTrie(trie, []string{ "example", "example.com", "*.example.com", "example.com/foo", "example.com/foo/bar", "*.example.com/test", }) assertTestTrie(t, trie, []v...
1
10,348
The tests are not run concurrently? (I don't know. Better check.)
caddyserver-caddy
go
@@ -131,7 +131,7 @@ Blockly.FieldTextInput.prototype.showEditor_ = function(opt_quietInput) { var htmlInput = goog.dom.createDom('input', 'blocklyHtmlInput'); htmlInput.setAttribute('spellcheck', this.spellcheck_); var fontSize = - (Blockly.FieldTextInput.FONTSIZE * this.workspace_.scale) + 'pt'; + (...
1
/** * @license * Visual Blocks Editor * * Copyright 2012 Google Inc. * https://developers.google.com/blockly/ * * 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.apach...
1
7,575
Regardless of scale?
LLK-scratch-blocks
js
@@ -44,6 +44,14 @@ var dataDirectory = flag.String("d", "", "Root Algorand daemon data path") var versionCheck = flag.Bool("v", false, "Display and write current build version and exit") var telemetryOverride = flag.String("t", "", `Override telemetry setting if supported (Use "true", "false", "0" or "1")`) +// the...
1
// Copyright (C) 2019-2020 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
39,037
Nit: should not we hide them from printing out?
algorand-go-algorand
go
@@ -196,7 +196,7 @@ test_pipeline = [ dict(type='RandomFlip'), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), - dict(type='ImageToTensor', keys=['img']), + dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['...
1
# model settings model = dict( type='MaskRCNN', pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, style='pytorch'), neck=dict( type='FPN', in_channels=[256,...
1
18,332
What is the reason to modify those things? I noticed it breaks the examples using `asyncio`
open-mmlab-mmdetection
py
@@ -33,7 +33,7 @@ import ( const ( // Encoding is the name of this encoding. - Encoding transport.Encoding = "protobuf" + Encoding transport.Encoding = "proto" rawResponseHeaderKey = "rpc-protobuf-raw-response" )
1
// Copyright (c) 2017 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 Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
13,718
WHOOOOOOOPS! so this is a wire protocol breaking change. I deployed a dev version of yarpc 1.9 to demo-yarpc-go and it caused bad request errors because it couldn't determine the procedure anymore. (in coordination with yarpc-prober)
yarpc-yarpc-go
go
@@ -1,5 +1,9 @@ 'use strict'; +const parseConnectionString = require('./core/uri_parser'); + +const writeConcernKeys = new Set(['w', 'wtimeout', 'j', 'fsync', 'wtimeoutMS', 'journal']); + /** * The **WriteConcern** class is a class that represents a MongoDB WriteConcern. * @class
1
'use strict'; /** * The **WriteConcern** class is a class that represents a MongoDB WriteConcern. * @class * @property {(number|string)} w The write concern * @property {number} wtimeout The write concern timeout * @property {boolean} j The journal write concern * @property {boolean} fsync The file sync write co...
1
16,463
if we keep this, can we stick to our convention of using UPPER_CASE for constants? Otherwise this looks like a floating variable to me.
mongodb-node-mongodb-native
js
@@ -341,7 +341,7 @@ class GTPPDUSessionContainer(Packet): return p def hashret(self): - return struct.pack("H", self.seq) + return struct.pack("H", getattr(self.underlayer, "seq")) class GTPEchoRequest(Packet):
1
# Copyright (C) 2018 Leonardo Monteiro <decastromonteiro@gmail.com> # 2017 Alexis Sultan <alexis.sultan@sfr.com> # 2017 Alessio Deiana <adeiana@gmail.com> # 2014 Guillaume Valadon <guillaume.valadon@ssi.gouv.fr> # 2012 ffranz <ffranz@iniqua.com> ## # This progr...
1
17,405
You probably don't want to assume that `self.underlayer` has a `seq` attribute.
secdev-scapy
py
@@ -65,10 +65,6 @@ class DisplayLanguageOptionFactory implements FactoryInterface if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); } - // We want to construct a separate translator instance for this helper, - // since it configures differe...
1
<?php /** * DisplayLanguageOption helper factory. * * PHP version 7 * * Copyright (C) Villanova University 2018. * * This program is free software; 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 Foundation. * * This ...
1
31,547
This apparently breaks the language selection.
vufind-org-vufind
php
@@ -0,0 +1,10 @@ +# This migration comes from acts_as_taggable_on_engine (originally 5) +# This migration is added to circumvent issue #623 and have special characters +# work properly +class ChangeCollationForTagNames < ActiveRecord::Migration + def up + if ActsAsTaggableOn::Utils.using_mysql? + execute("ALTE...
1
1
15,431
since we're not using mysql, do we need this migration?
18F-C2
rb
@@ -453,6 +453,9 @@ OUTBOUND_HTTP_PROXY = os.environ.get("OUTBOUND_HTTP_PROXY", "") # Equivalent to HTTPS_PROXY, but only applicable for external connections OUTBOUND_HTTPS_PROXY = os.environ.get("OUTBOUND_HTTPS_PROXY", "") +# Whether to enable the partition adjustment listener (in order to support other partitions...
1
import logging import os import platform import re import socket import subprocess import tempfile import time from typing import Any, Dict, List, Mapping, Tuple import six from boto3 import Session from localstack.constants import ( AWS_REGION_US_EAST_1, DEFAULT_BUCKET_MARKER_LOCAL, DEFAULT_DEVELOP_PORT,...
1
13,969
i'm not sure about htis naming here. both the word partition and adjustment are very ambiguous and it's not clear what it does. i would maybe go for something less generic and more concrete like `GOV_CLOUD_SUPPORT`
localstack-localstack
py
@@ -78,7 +78,13 @@ public class MockExecutorLoader implements ExecutorLoader { @Override public Map<Integer, Pair<ExecutionReference, ExecutableFlow>> fetchUnfinishedFlows() throws ExecutorManagerException { - return new ConcurrentHashMap<>(); + return this.activeFlows; + } + + @Override + public ...
1
/* * Copyright 2014 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
17,114
unfinishedFlows might not be the same as activeFlows. Will it cause confusion here?
azkaban-azkaban
java
@@ -73,3 +73,18 @@ func Example() { cfg := snapshot.Value.(MyConfig) _ = cfg } + +func Example_openVariable() { + // OpenVariable creates a *runtimevar.Variable from a URL. + ctx := context.Background() + v, err := runtimevar.OpenVariable(ctx, "runtimeconfigurator://myproject/myconfigid/myvar?decoder=string") + if...
1
// Copyright 2018 The Go Cloud Development Kit 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appli...
1
15,234
Same, remove the error handling.
google-go-cloud
go
@@ -1,14 +1,16 @@ -// IMvxAppStart.cs +// IMvxAppStart.cs // MvvmCross is licensed using Microsoft Public License (Ms-PL) // Contributions and inspirations noted in readme.md and license.txt // // Project Lead - Stuart Lodge, @slodge, me@slodge.com +using System.Threading.Tasks; + namespace MvvmCross.Core.Vie...
1
// IMvxAppStart.cs // MvvmCross is licensed using Microsoft Public License (Ms-PL) // Contributions and inspirations noted in readme.md and license.txt // // Project Lead - Stuart Lodge, @slodge, me@slodge.com namespace MvvmCross.Core.ViewModels { public interface IMvxAppStart { void Start(object hin...
1
13,533
We should not change this at this time.
MvvmCross-MvvmCross
.cs
@@ -242,8 +242,8 @@ class AnchorGenerator(object): Args: base_anchors (torch.Tensor): The base anchors of a feature grid. featmap_size (tuple[int]): Size of the feature maps. - stride (tuple[int], optional): Stride of the feature map. - Defaults to (16, 16). ...
1
import mmcv import numpy as np import torch from torch.nn.modules.utils import _pair from .builder import ANCHOR_GENERATORS @ANCHOR_GENERATORS.register_module() class AnchorGenerator(object): """Standard anchor generator for 2D anchor-based detectors. Args: strides (list[int] | list[tuple[int, int]]...
1
21,274
We may also update the docstring in the AnchorGenerator's arguments at around line 15.
open-mmlab-mmdetection
py
@@ -930,7 +930,7 @@ bool CoreChecks::ValidateAndUpdateQFOScoreboard(const debug_report_data *report_ " duplicates existing barrier submitted in this batch from command buffer %s.", "vkQueueSubmit()", BarrierRecord::BarrierName(), operation, BarrierRecord::HandleName(), ...
1
/* Copyright (c) 2015-2019 The Khronos Group Inc. * Copyright (c) 2015-2019 Valve Corporation * Copyright (c) 2015-2019 LunarG, Inc. * Copyright (C) 2015-2019 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
10,434
FormatHandle isn't current typesafe w.r.t. requiring *VULKAN* handles... so this slipped through.
KhronosGroup-Vulkan-ValidationLayers
cpp
@@ -21,6 +21,7 @@ import ( "errors" "testing" + "github.com/asaskevich/EventBus" "github.com/stretchr/testify/assert" "github.com/mysteriumnetwork/node/identity"
1
/* * Copyright (C) 2019 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
14,018
What kind of dependency is here, I think we have own implementation of event wo external dependencies
mysteriumnetwork-node
go
@@ -125,6 +125,18 @@ SYCL::SYCLDevice::SYCLDevice(sycl::device d) : m_device(std::move(d)) {} SYCL::SYCLDevice::SYCLDevice(const sycl::device_selector& selector) : m_device(selector.select_device()) {} +SYCL::SYCLDevice::SYCLDevice(size_t id) { + std::vector<sycl::device> gpu_devices = + sycl::device::get...
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
28,509
Throw an exception instead
kokkos-kokkos
cpp
@@ -6,6 +6,9 @@ RSpec.describe Org::CreateLastMonthCreatedPlanService do let(:org) do FactoryBot.create(:org, created_at: DateTime.new(2018, 04, 01)) end + let(:org2) do + FactoryBot.create(:org) + end let(:template) do FactoryBot.create(:template, org: org) end
1
# frozen_string_literal: true require "rails_helper" RSpec.describe Org::CreateLastMonthCreatedPlanService do let(:org) do FactoryBot.create(:org, created_at: DateTime.new(2018, 04, 01)) end let(:template) do FactoryBot.create(:template, org: org) end let(:template2) do FactoryBot.create(:templa...
1
18,910
we shouldn't need the `FactoryBot.` in these. Ok to leave for now since all of these specs have them. Can clean up later
DMPRoadmap-roadmap
rb
@@ -80,7 +80,7 @@ class File extends FileBase $uploadsPath .= '/protected'; } - return Url::asset($uploadsPath) . '/'; + return Storage::url($uploadsPath) . '/'; } /**
1
<?php namespace System\Models; use Url; use Config; use File as FileHelper; use Storage; use October\Rain\Database\Attach\File as FileBase; use Backend\Controllers\Files; /** * File attachment model * * @package october\system * @author Alexey Bobkov, Samuel Georges */ class File extends FileBase { /** ...
1
19,478
Isn't the better option to actually do `$this->getDisk()->url($uploadsPath)` without changing the filesystems config? Not sure why you think that change is required but it's definitely not getting merged.
octobercms-october
php
@@ -1585,7 +1585,7 @@ accessed. Python regular expressions are accepted.", not isinstance(itemmethod, nodes.FunctionDef) or itemmethod.root().name != "builtins" or not itemmethod.parent - or itemmethod.parent.name not in SEQUENCE_TYPES + or itemmethod.parent....
1
# Copyright (c) 2006-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2009 James Lingard <jchl@aristanetworks.com> # Copyright (c) 2012-2014 Google, Inc. # Copyright (c) 2014-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 David Shea <dshea@redhat.com> # Copyright (c) 2014 Steven My...
1
20,331
Not sure if we need this. It's not tested because it only guards against a new conditional definition of a dunder method in a built-in package. I am fine with leaving it out.
PyCQA-pylint
py
@@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.DotNet.Build.Common.Desktop; + +namespace Microsoft.DotNet.Build.Tasks.Feed +{...
1
1
14,575
Is this the only task in this library? If so this is good, if not then we should do it for each task.
dotnet-buildtools
.cs
@@ -245,7 +245,7 @@ func (ops *Operations) GetCstorVolumeCountEventually(namespace, lselector string cvCount := ops.GetCVCount(namespace, lselector) return cvCount }, - 60, 10).Should(Equal(expectedCVCount)) + 120, 10).Should(Equal(expectedCVCount)) } // GetCstorVolumeReplicaCountEventually gives the coun...
1
/* Copyright 2019 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
16,334
I am not sure what is 120 and what is 10. Hence unable to review.
openebs-maya
go
@@ -47,8 +47,9 @@ type Options struct { Location OptionsLocation Transactor OptionsTransactor - Openvpn Openvpn - Firewall OptionsFirewall + EnableDNS bool + Openvpn Openvpn + Firewall OptionsFirewall } // OptionsKeystore stores the keystore configuration
1
/* * Copyright (C) 2018 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
14,889
Not needed anymore
mysteriumnetwork-node
go
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// Package pingpong exposes the simple ping-pong protocol +// which measures RTT with other peers. package pingpong import (
1
// Copyright 2020 The Swarm Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package pingpong import ( "context" "fmt" "io" "time" "github.com/ethersphere/bee/pkg/logging" "github.com/ethersphere/bee/pkg/p2p" "github.com/ethe...
1
13,694
Please not abbreviations
ethersphere-bee
go
@@ -199,6 +199,10 @@ var ValidateResponseHandler = request.NamedHandler{Name: "core.ValidateResponseH // AfterRetryHandler performs final checks to determine if the request should // be retried and how long to delay. var AfterRetryHandler = request.NamedHandler{Name: "core.AfterRetryHandler", Fn: func(r *request.Req...
1
package corehandlers import ( "bytes" "fmt" "io" "io/ioutil" "net/http" "net/url" "regexp" "runtime" "strconv" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/request" ) // Interface for matching ty...
1
9,081
This shouldn't get stomped over on line 207
aws-aws-sdk-go
go
@@ -37,6 +37,7 @@ func (tok Token) String() string { } // A Position describes a position in a source file. +// All properties in Position are zero indexed type Position struct { Filename string Offset int
1
package asp import ( "io" "io/ioutil" "unicode" "unicode/utf8" ) // Token types. const ( EOF = -(iota + 1) Ident Int String LexOperator EOL Unindent ) // A Token describes each individual lexical element emitted by the lexer. type Token struct { // Type of token. If > 0 this is the literal character valu...
1
8,432
are they not 1-indexed?
thought-machine-please
go
@@ -272,7 +272,7 @@ func (s *Service) Pay(ctx context.Context, peer swarm.Address, amount, checkAllo } currentTime := s.timeNow().Unix() - if currentTime == lastTime.CheckTimestamp { + if currentTime == lastTime.CheckTimestamp || currentTime == lastTime.Timestamp { return nil, 0, ErrSettlementTooSoon }
1
// Copyright 2020 The Swarm Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package pseudosettle import ( "context" "errors" "fmt" "math/big" "strings" "sync" "time" "github.com/ethersphere/bee/pkg/logging" "github.com/eth...
1
15,937
I know that previously this check was here but @ralph-pichler replaced it with the `CheckTimestamp` field stating that checking against `Timestamp` was incorrect. @ralph-pichler can you elaborate?
ethersphere-bee
go
@@ -0,0 +1,19 @@ +# Copyright (c) Open-MMLab. All rights reserved. + +__version__ = '2.3.0rc0' +short_version = '2.3.0rc0' + + +def parse_version_info(version_str): + version_info = [] + for x in version_str.split('.'): + if x.isdigit(): + version_info.append(int(x)) + elif x.find('rc') !...
1
1
20,926
`short_version = __version__`
open-mmlab-mmdetection
py
@@ -1,4 +1,4 @@ -//snippet-sourcedescription:[UpdateAccessKey.java demonstrates how to update the status of an access key for an AWS Identity and Access Management (IAM) user.] +//snippet-sourcedescription:[UpdateAccessKey.java demonstrates how to update the status of an access key for an AWS Identity and Access Manage...
1
//snippet-sourcedescription:[UpdateAccessKey.java demonstrates how to update the status of an access key for an AWS Identity and Access Management (IAM) user.] //snippet-keyword:[AWS SDK for Java v2] //snippet-keyword:[Code Sample] //snippet-service:[AWS IAM] //snippet-sourcetype:[full-example] //snippet-sourcedat...
1
18,251
AWS Identity and Access Management (IAM)
awsdocs-aws-doc-sdk-examples
rb
@@ -19,11 +19,12 @@ package org.apache.iceberg.spark; +import java.io.Serializable; import org.apache.iceberg.StructLike; import org.apache.iceberg.types.Types; import org.apache.spark.sql.Row; -public class SparkStructLike implements StructLike { +public class SparkStructLike implements StructLike, Serializa...
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
24,168
Required for the SparkDataFile SerDe
apache-iceberg
java
@@ -2595,16 +2595,8 @@ bool SwiftLanguageRuntime::CouldHaveDynamicValue(ValueObject &in_value) { // Swift class instances are actually pointers, but base class instances // are inlined at offset 0 in the class data. If we just let base classes // be dynamic, it would cause an infinite recursion. So we wo...
1
//===-- SwiftLanguageRuntime.cpp --------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
1
19,909
Do you want to make this an assertion instead?
apple-swift-lldb
cpp
@@ -1,5 +1,5 @@ #A part of NonVisual Desktop Access (NVDA) -#Copyright (C) 2015 NV Access Limited +#Copyright (C) 2016 NV Access Limited #This file is covered by the GNU General Public License. #See the file COPYING for more details.
1
#A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2015 NV Access Limited #This file is covered by the GNU General Public License. #See the file COPYING for more details. import itertools import collections import winsound import time import weakref import wx import queueHandler from logHandler impo...
1
17,676
When updating the copyright, we tend to cover previous years, not just the current. So, if we started the file in 2015, we'd update to say 2015-2016. I'm not sure if there's a legal requirement surrounding this, but it's the convention we and many others have adopted for code.
nvaccess-nvda
py
@@ -1180,6 +1180,16 @@ func (fbo *folderBranchOps) SetInitialHeadFromServer( return fmt.Errorf("MD with revision=%d not initialized", md.Revision()) } + // Return early if the head is already set. This avoids taking + // mdWriterLock for no reason. + lState := makeFBOLockState() + head := fbo.getHead(lState) + ...
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 ( "errors" "fmt" "os" "reflect" "strings" "sync" "time" "github.com/keybase/backoff" "github.com/keybase/client/go/logger" "github.com...
1
13,276
Wait, so it looks like this function is called _every_ time we fetch the root node, i.e. we do an MD head fetch every time we fetch the root node? Not for this PR, but it seems like we should make that unnecessary, since this function only ever does anything when head is `nil`, i.e. the first time. Maybe add a TODO?
keybase-kbfs
go
@@ -1948,9 +1948,9 @@ class DomainNameListField(StrLenField): islist = 1 padded_unit = 8 - def __init__(self, name, default, fld=None, length_from=None, padded=False): # noqa: E501 + def __init__(self, name, default, length_from=None, padded=False): # noqa: E501 self.padded = padded - ...
1
############################################################################# # # # inet6.py --- IPv6 support for Scapy # # see http://natisbad.org/IPv6/ # # ...
1
18,539
Why are you changing this?
secdev-scapy
py
@@ -35,11 +35,11 @@ func NewConfigParser() *ConsumerConfigParser { } // Parse parses the given configuration -func (c *ConsumerConfigParser) Parse(config json.RawMessage) (ip string, port int, serviceType services.ServiceType, err error) { +func (c *ConsumerConfigParser) Parse(config *json.RawMessage) (ip string, p...
1
/* * Copyright (C) 2019 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
14,283
`json.RawMessage` is a `[]byte`, which is already a pointer. Why do we need to have pointer here if we just reading this value?
mysteriumnetwork-node
go
@@ -29,7 +29,7 @@ func main() { cni.ActionAdd.Request, cni.ActionCheck.Request, cni.ActionDel.Request, - cni_version.PluginSupports("0.1.0", "0.2.0", "0.3.0", "0.3.1"), + cni_version.All, fmt.Sprintf("Antrea CNI %s", version.GetFullVersionWithRuntimeInfo()), ) }
1
// Copyright 2019 Antrea 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
18,636
should we actually switch to `All` or just add `0.4.0` explicitly to the list of supported CNI versions? What is a new CNI version is released?
antrea-io-antrea
go
@@ -23,6 +23,7 @@ from google.cloud.security.notifier import notifier from google.cloud.security.common.data_access import csv_writer from google.cloud.security.scanner.audit import fw_rules_engine +from google.cloud.security.common.gcp_type import resource_util from google.cloud.security.common.data_access import...
1
# Copyright 2017 The Forseti Security Authors. 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 ap...
1
27,963
pylint might complain that this isn't alphasorted?
forseti-security-forseti-security
py
@@ -52,6 +52,7 @@ namespace Interop.FunctionalTests $"--no-sandbox " + $"--disable-gpu " + $"--allow-insecure-localhost " + + $"--ignore-certificate-errors --enable-features=NetworkService " + $"--enable-logging " + $"--...
1
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. #if NETCOREAPP2_2 using System; using System.Diagnostics; using System.IO; using System.Net; using System.Threading.Tasks; using Microsoft.AspNetCore....
1
17,134
It seems that NetworkService is behind a feature flag because it's still experimental. If we see new issues, we should look at flipping this back off.
aspnet-KestrelHttpServer
.cs
@@ -31,6 +31,19 @@ func (ts *TaskStatus) String() string { return "UNKNOWN" } +// Mapping task status in the agent to that in the backend +func BackEndStatus(ts *TaskStatus) string { + switch *ts { + case TaskRunning: + return "RUNNING" + case TaskStopped: + return "STOPPED" + case TaskDead: + return "STOPPED" ...
1
// Copyright 2014-2015 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
13,286
I think it makes more sense to have this be a method on TaskStatus. Also, nit, Backend, not BackEnd.
aws-amazon-ecs-agent
go
@@ -154,6 +154,10 @@ int HIPInternal::verify_is_initialized(const char *const label) const { return 0 <= m_hipDev; } +uint32_t HIPInternal::impl_get_instance_id() const noexcept { + return Kokkos::Tools::Experimental::Impl::idForInstance< + Kokkos::Experimental::HIP>(reinterpret_cast<uintptr_t>(this)); +} ...
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
28,750
Could you please elaborate on why you need all this magic here? In which cases do you want the same id to be returned? Does this work the same way for all backends?
kokkos-kokkos
cpp
@@ -38,11 +38,8 @@ var ( ) type Config struct { - // Directory in which plugin config files - // reside - ConfigDir string - - Log logrus.FieldLogger + PluginsConfigs map[string]map[string]common.HclPluginConfig + Log logrus.FieldLogger } type catalog struct {
1
package catalog import ( "fmt" "sync" "github.com/sirupsen/logrus" // Plugin interfaces "github.com/spiffe/spire/proto/agent/keymanager" "github.com/spiffe/spire/proto/agent/nodeattestor" "github.com/spiffe/spire/proto/agent/workloadattestor" goplugin "github.com/hashicorp/go-plugin" common "github.com/spi...
1
9,033
nit: `PluginConfigs` feels a little better
spiffe-spire
go
@@ -323,7 +323,7 @@ func TestLocalTransfer(t *testing.T) { probeSvr := probe.New(7788) require.NoError(probeSvr.Start(ctx)) defer func() { - require.NoError(probeSvr.Stop(ctx)) + probeSvr.Stop(ctx) }() // Start server
1
// Copyright (c) 2019 IoTeX Foundation // 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...
1
23,046
think we need to find out the root-cause and fix, instead of just removing `NoError`? it erred b/c `context canceled`, so call this before context cancelled is the right fix
iotexproject-iotex-core
go
@@ -405,7 +405,10 @@ func (b *BlockServerRemote) Get(ctx context.Context, tlfID tlf.ID, id kbfsblock. id, tlfID, context, size) dbc := b.config.DiskBlockCache() if dbc != nil { - go dbc.Put(ctx, tlfID, id, buf, serverHalf) + // This used to be called in a goroutine to prevent blocking + // the `Ge...
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 ( "errors" "sync" "time" "github.com/keybase/backoff" "github.com/keybase/client/go/libkb" "github.com/keybase/client/go/logger" "github....
1
17,899
Please expand "later behavior". Presumably something to do with the prefetch logic?
keybase-kbfs
go
@@ -66,7 +66,7 @@ func (s *server) splitUpload(ctx context.Context, r io.ReadCloser, l int64) (int response.Message = "upload error" response.Code = http.StatusInternalServerError err = fmt.Errorf("%s: %v", response.Message, err) - return response, err + return swarm.ZeroAddress, err } return bytesPostRe...
1
// Copyright 2020 The Swarm Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package api import ( "context" "errors" "fmt" "io" "net/http" "github.com/gorilla/mux" "github.com/ethersphere/bee/pkg/file" "github.com/ethersphe...
1
10,486
The `response` variable is not used, it can be removed, also the fmt.Errorf.
ethersphere-bee
go
@@ -51,10 +51,7 @@ namespace NLog.Internal internal static bool IsNullOrWhiteSpace(string value) { #if NET3_5 - - if (value == null) return true; - if (value.Length == 0) return true; - return String.IsNullOrEmpty(value.Trim()); + return value?.Length > 0 ?...
1
// // Copyright (c) 2004-2021 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // * Redistributions of s...
1
22,483
Do you find this really easier to read?
NLog-NLog
.cs
@@ -11388,8 +11388,9 @@ void RelRoot::setMvBindContext(MvBindContext * pMvBindContext) pMvBindContextForScope_ = pMvBindContext; } -void RelRoot::addOneRowAggregates(BindWA* bindWA) +NABoolean RelRoot::addOneRowAggregates(BindWA* bindWA, NABoolean forceGroupByAgg) { + NABoolean GroupByAggNodeAdded = FALSE; R...
1
/*********************************************************************** // @@@ START COPYRIGHT @@@ // // 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. ...
1
20,040
A small nit: This variable should start with a lower case letter.
apache-trafodion
cpp
@@ -38,12 +38,13 @@ public class PageStreamingTransformer { PageStreamingDescriptorView.Builder descriptor = PageStreamingDescriptorView.newBuilder(); descriptor.varName(context.getNamer().getPageStreamingDescriptorName(method)); - descriptor.requestTokenFieldName(pageStreaming.getRequestTokenField...
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
21,651
Where is this used for Node?
googleapis-gapic-generator
java
@@ -130,14 +130,14 @@ func (c *Command) handleActions(line string) { func (c *Command) connect(argsString string) { if len(argsString) == 0 { - info("Press tab to select identity or create a new one. Connect <your-identity> <node-identity>") + info("Press tab to select identity or create a new one. Connect <your...
1
package cli import ( "fmt" "github.com/chzyer/readline" tequilapi_client "github.com/mysterium/node/tequilapi/client" "io" "log" "strings" ) // NewCommand constructs CLI based with possibility to control quiting func NewCommand( historyFile string, tequilapi *tequilapi_client.Client, quitHandler func() error...
1
10,396
Is `<your-id>` really easier to understand than `<your-identity>` for CLI user? For me, `identity` seems like a concept we use publicly, and `id` is just an internal shortcut for it.
mysteriumnetwork-node
go
@@ -39,7 +39,11 @@ func (n *NetworkPolicyController) addClusterGroup(curObj interface{}) { key := internalGroupKeyFunc(cg) klog.V(2).Infof("Processing ADD event for ClusterGroup %s", cg.Name) newGroup := n.processClusterGroup(cg) - klog.V(2).Infof("Creating new internal Group %s with selector (%s)", newGroup.UID,...
1
// Copyright 2021 Antrea 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
32,236
nit.. `if` .. `else` for logging probably can be avoided.. maybe only log that an internal group was created for cluster group
antrea-io-antrea
go
@@ -21,6 +21,7 @@ import ( "time" "github.com/aws/amazon-ecs-agent/agent/api" + "github.com/aws/amazon-ecs-agent/agent/config" "github.com/aws/amazon-ecs-agent/agent/engine/dockerstate/mocks" "github.com/aws/amazon-ecs-agent/agent/engine/testdata" "github.com/aws/amazon-ecs-agent/agent/eventstream"
1
// +build !integration // Copyright 2014-2017 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/ /...
1
15,833
There's a lot of changed tests -- but no new tests. You need unit and integration tests for this.
aws-amazon-ecs-agent
go
@@ -38,16 +38,16 @@ namespace Nethermind.TxPool.Filters _configuredGasLimit = txPoolConfig.GasLimit ?? long.MaxValue; } - public (bool Accepted, AddTxResult? Reason) Accept(Transaction tx, TxHandlingOptions handlingOptions) + public AcceptTxResult Accept(Transaction tx,...
1
// Copyright (c) 2021 Demerzel Solutions Limited // This file is part of the Nethermind library. // // The Nethermind library 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...
1
26,435
WithMessage what gas limit is?
NethermindEth-nethermind
.cs
@@ -2099,7 +2099,7 @@ describe('Cursor', function() { * @ignore * @api private */ - it('cursor stream errors', { + it.skip('cursor stream errors', { // Add a tag that our runner can trigger on // in this case we are setting that node needs to be higher than 0.10.X to run metadata: { require...
1
'use strict'; const test = require('./shared').assert; const setupDatabase = require('./shared').setupDatabase; const fs = require('fs'); const expect = require('chai').expect; const Long = require('bson').Long; const sinon = require('sinon'); const ReadPreference = require('mongodb-core').ReadPreference; const Buffer ...
1
14,961
Why are these skipped?
mongodb-node-mongodb-native
js
@@ -388,6 +388,13 @@ type MetaManager struct { // RemoteQueryTimeout indicates remote query timeout (second) // default 60 RemoteQueryTimeout int32 `json:"remoteQueryTimeout,omitempty"` + // The config of MetaServer + MetaServer `json:"metaServer,omitempty"` +} + +type MetaServer struct { + Enable bool + Debug b...
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, sof...
1
20,507
We'd better add the `json:"metaServer,omitempty"` here
kubeedge-kubeedge
go
@@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +import platform +import sys +from pathlib import Path +from subprocess import check_call + +here = Path(__file__).parent + +pip_install = [ + sys.executable, "-m", + "pip", + "install", + "--disable-pip-version-check", +] + +check_call([*pip_install, "--require-hash...
1
1
15,677
So... when we want to install mitmproxy with pinned dependencies, we first install all pinned dependencies, and then in a second step install mitmproxy as editable, making sure that no additional dependencies are sneaking in.
mitmproxy-mitmproxy
py
@@ -68,7 +68,10 @@ func Sandbox(args []string) error { } } err = syscall.Exec(cmd, args, env) - return fmt.Errorf("Failed to exec %s: %s", cmd, err) + if err != nil { + return fmt.Errorf("Failed to exec %s: %s", cmd, err) + } + return nil } func rewriteEnvVars(env []string, from, to string) {
1
//go:build linux // +build linux package sandbox import ( "fmt" "os" "os/exec" "strings" "syscall" "golang.org/x/sys/unix" "github.com/thought-machine/please/src/core" ) // mdLazytime is the bit for lazily flushing disk writes. // TODO(jpoole): find out if there's a reason this isn't in syscall const mdLazy...
1
10,445
not sure how this got in master, but the linter is unhappy about it so I fixed it here
thought-machine-please
go
@@ -15,3 +15,8 @@ const rekeyRecheckInterval = 30 * time.Second // rekeyInitialTTL is the maximum number rechecks each rekey request can trigger. const rekeyInitialTTL = 4 + +// mdserverReconnectBackoffWindow is a backoff window within which we try to +// wait randomly for before reconnecting to MD server. +// TODO...
1
// Copyright 2017 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 "time" // RPCReconnectInterval specifies the time between reconnect attempts for RPC Connections. const RPCReconnectInterval = 2 * time.Second ...
1
16,874
No need for this TODO anymore, right?
keybase-kbfs
go
@@ -47,7 +47,8 @@ def main(global_config, config=None, **settings): # In Kinto API 1.x, a default bucket is available. # Force its inclusion if not specified in settings. - if 'kinto.plugins.default_bucket' not in settings['includes']: + if 'kinto.plugins.default_bucket' not in settings['includes'] \ ...
1
import pkg_resources import logging import cliquet from pyramid.config import Configurator from pyramid.settings import asbool from pyramid.security import Authenticated from kinto.authorization import RouteFactory # Module version, as defined in PEP-0396. __version__ = pkg_resources.get_distribution(__package__).ve...
1
8,921
I would assign the key you're looking for into a variable first, and then use it in the comparisons.
Kinto-kinto
py
@@ -855,6 +855,9 @@ class PluginManager if ($pluginPath = self::instance()->getPluginPath($id)) { File::deleteDirectory($pluginPath); } + + // actually remove the plugin from our internal container + unset($this->plugins[ $this->normalizeIdentifier($id) ]); } /**
1
<?php namespace System\Classes; use Db; use App; use Str; use Log; use File; use Lang; use View; use Config; use Schema; use SystemException; use RecursiveIteratorIterator; use RecursiveDirectoryIterator; /** * Plugin manager * * @package october\system * @author Alexey Bobkov, Samuel Georges */ class PluginMana...
1
19,041
Would be better to normalize it at the start of the method to pass through to all the other calls
octobercms-october
php
@@ -167,6 +167,7 @@ class CodeEditor extends FormWidgetBase $this->vars['highlightActiveLine'] = $this->highlightActiveLine; $this->vars['useSoftTabs'] = $this->useSoftTabs; $this->vars['showGutter'] = $this->showGutter; + $this->vars['safeMode'] = $this->parentForm->model->isSafeMode(...
1
<?php namespace Backend\FormWidgets; use Backend\Models\Preference as BackendPreference; use Backend\Classes\FormWidgetBase; /** * Code Editor * Renders a code editor field. * * @package october\backend * @author Alexey Bobkov, Samuel Georges */ class CodeEditor extends FormWidgetBase { // // Configurab...
1
17,406
This can't exist here either because the code editor can be used on other models than CMS templates. You could probably implement this as a `hint` property (so `hint: cms::lang.cms_object.safe_mode_enabled`) on the codeeditor formwidget instead though and I'd be fine with that.
octobercms-october
php
@@ -888,6 +888,15 @@ class WordDocumentTextInfo(textInfos.TextInfo): field['line-prefix']=mapPUAToUnicode.get(bullet,bullet) return field + def scrollIntoView(self): + try: + self.obj.WinwordWindowObject.ScrollIntoView(self._rangeObj, True) + except COMError: + log.exception("Can't scroll") + pass + + ...
1
# A part of NonVisual Desktop Access (NVDA) # Copyright (C) 2006-2020 NV Access Limited, Manish Agrawal, Derek Riemer, Babbage B.V. # This file is covered by the GNU General Public License. # See the file COPYING for more details. import ctypes import time from comtypes import COMError, GUID, BSTR import com...
1
33,835
This line is unnecessary.
nvaccess-nvda
py
@@ -119,13 +119,4 @@ Recorder::~Recorder() { UpdateBoundary(); } -void Recorder::Log(unsigned id) { -#ifndef LLDB_REPRO_INSTR_TRACE - LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API), "Recording {0}: {1}", id, - m_pretty_func); -#else - llvm::errs() << "Recording " << id << ": " << m_pretty_func << ...
1
//===-- ReproducerInstrumentation.cpp ---------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
1
19,981
How did this compile in the first place? Is there a matching declaration in a header that should be removed too?
apple-swift-lldb
cpp
@@ -56,7 +56,8 @@ mrb_value h2o_mruby__new_str(mrb_state *mrb, const char *s, size_t len, const ch if (mrb->exc != NULL) h2o_mruby__abort_exc(mrb, "h2o_mruby_new_str:precondition failure", file, line); mrb_value ret = mrb_str_new(mrb, s, len); - h2o_mruby_assert(mrb); + if (mrb->exc != NULL) + ...
1
/* * Copyright (c) 2014-2016 DeNA Co., Ltd., Kazuho Oku, Ryosuke Matsumoto, * Masayoshi Takahashi * * 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 Software without restr...
1
12,807
Please remove the colon at the end, and merge the PR once the CI succeeds. Thank you for the PR.
h2o-h2o
c
@@ -3,8 +3,5 @@ package tools import ( - _ "github.com/AlekSi/gocoverutil" _ "github.com/golang/protobuf/protoc-gen-go" - _ "github.com/jteeuwen/go-bindata/go-bindata" - _ "github.com/mattn/goveralls" )
1
// +build tools package tools import ( _ "github.com/AlekSi/gocoverutil" _ "github.com/golang/protobuf/protoc-gen-go" _ "github.com/jteeuwen/go-bindata/go-bindata" _ "github.com/mattn/goveralls" )
1
12,476
whoops. this should be protoc-gen-doc, since that is the only bit left that is built out-of-tree (everything else is either downloaded or built via modules already depended on by spire's go.mod)
spiffe-spire
go
@@ -0,0 +1,19 @@ +package azkaban.spi; + +import java.util.Map; + +/** + * Implement this interface to report flow and job events. Event reporter + * can be turned on by setting the property {@code AZKABAN_EVENT_REPORTING_ENABLED} to true. + * + * By default, a KafkaAvroEventReporter is provided. Alternate implementati...
1
1
14,426
The convention is to use <p> see the google style guide and use checkstyle to check. You can change it later.
azkaban-azkaban
java
@@ -134,12 +134,14 @@ class ListElement(list): def startElement(self, name, attrs, connection): for lm in self.list_marker: if name.endswith(lm): - l = ListElement(self.connection, name, self.item_marker, + l = ListElement(self.connection, name, self.list_marker,...
1
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, 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 Software without restriction, including # withou...
1
8,046
Using non-keyword args after the keyword arg (parent-self) will cause a SyntaxError.
boto-boto
py
@@ -277,6 +277,13 @@ module Faker '%08x-%04x-%04x-%04x-%04x%08x' % ary # rubocop:disable Style/FormatString end + def user(*args) + user_hash = {} + args = %w[username email] if args.empty? + args.each { |arg| user_hash[:"#{arg}"] = send(arg) } + user_hash + end +...
1
# frozen_string_literal: true module Faker class Internet < Base class << self def email(legacy_name = NOT_GIVEN, legacy_separators = NOT_GIVEN, name: nil, separators: nil) warn_for_deprecated_arguments do |keywords| keywords << :name if legacy_name != NOT_GIVEN keywords << :sep...
1
9,334
I think you'll want to add some YARD docs to this method to get the PR approved
faker-ruby-faker
rb
@@ -4452,12 +4452,13 @@ ostree_repo_query_object_storage_size (OstreeRepo *self, * @self: Repo * @objtype: Object type * @sha256: ASCII checksum - * @out_variant: (out) (transfer full): Metadata + * @out_variant: (out) (nullable) (transfer full): Metadata * @error: Error * * Attempt to load the me...
1
/* * Copyright (C) 2011 Colin Walters <walters@verbum.org> * Copyright (C) 2015 Red Hat, Inc. * * SPDX-License-Identifier: LGPL-2.0+ * * This library 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 Foundati...
1
19,210
Hmm, AFAICT `*out_variant` isn't explicitly set to `NULL` in the `ENOENT` case.
ostreedev-ostree
c
@@ -87,12 +87,18 @@ func (b *clientFactory) SDKClient(c *cli.Context, namespace string) sdkclient.Cl hostPort = localHostPort } + tlsConfig, err := b.createTLSConfig(c) + if err != nil { + b.logger.Fatal("Failed to create SDK client", zap.Error(err)) + } + sdkClient, err := sdkclient.NewClient(sdkclient.Optio...
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,517
Nit: "Failed to configure TLS for SDK client"?
temporalio-temporal
go
@@ -89,7 +89,7 @@ def test_plot_split_value_histogram(params, breast_cancer_split, train_data): title='Histogram for feature @index/name@ @feature@', xlabel='x', ylabel='y', color='r') assert isinstance(ax1, matplotlib.axes.Axes) -...
1
# coding: utf-8 import pytest from sklearn.model_selection import train_test_split import lightgbm as lgb from lightgbm.compat import GRAPHVIZ_INSTALLED, MATPLOTLIB_INSTALLED if MATPLOTLIB_INSTALLED: import matplotlib matplotlib.use('Agg') if GRAPHVIZ_INSTALLED: import graphviz from .utils import load_br...
1
30,659
please update your branch to the latest `master`. This change was already made in #4359
microsoft-LightGBM
cpp
@@ -18,6 +18,8 @@ import ( "crypto/sha1" "errors" "fmt" + "github.com/pingcap/chaos-mesh/controllers" + "time" "golang.org/x/sync/errgroup"
1
// Copyright 2019 PingCAP, 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,040
This line should be formatted
chaos-mesh-chaos-mesh
go
@@ -32,6 +32,9 @@ int main (int argc, char * const * argv) ("disable_unchecked_drop", "Disables drop of unchecked table at startup") ("fast_bootstrap", "Increase bootstrap speed for high end nodes with higher limits") ("batch_size",boost::program_options::value<std::size_t> (), "Increase sideband batch size, d...
1
#include <nano/lib/utility.hpp> #include <nano/nano_node/daemon.hpp> #include <nano/node/cli.hpp> #include <nano/node/node.hpp> #include <nano/node/rpc.hpp> #include <nano/node/testing.hpp> #include <sstream> #include <argon2.h> #include <boost/lexical_cast.hpp> #include <boost/program_options.hpp> int main (int arg...
1
15,140
"default 65536" Not sure if it's important to state, but block_processor_full_size has a different default for fast_bootstrap.
nanocurrency-nano-node
cpp
@@ -23,5 +23,6 @@ namespace Nethermind.TxPool public uint FutureNonceRetention { get; set; } = 16; public int HashCacheSize { get; set; } = 512 * 1024; public long? GasLimit { get; set; } = null; + } }
1
// Copyright (c) 2021 Demerzel Solutions Limited // This file is part of the Nethermind library. // // The Nethermind library 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...
1
25,415
remove unnecessary whitespace changes
NethermindEth-nethermind
.cs
@@ -46,10 +46,6 @@ func TxnPool(s *transactions.SignedTxn, spec transactions.SpecialAddresses, prot return errors.New("empty address") } - if s.Sig != (crypto.Signature{}) && !s.Msig.Blank() { - return errors.New("signedtxn should only have one of Sig or Msig") - } - outCh := make(chan error, 1) cx := async...
1
// Copyright (C) 2019 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) any l...
1
36,470
Are these conditions covered elsewhere ?
algorand-go-algorand
go
@@ -59,7 +59,14 @@ TurnType::Enum IntersectionHandler::findBasicTurnType(const EdgeID via_edge, if (!on_ramp && onto_ramp) return TurnType::OnRamp; - if (in_data.name_id == out_data.name_id && in_data.name_id != EMPTY_NAMEID) + const auto same_name = + !util::guidance::requiresNameAnnounced...
1
#include "extractor/guidance/intersection_handler.hpp" #include "extractor/guidance/constants.hpp" #include "extractor/guidance/toolkit.hpp" #include "util/coordinate_calculation.hpp" #include "util/guidance/toolkit.hpp" #include "util/simple_logger.hpp" #include <algorithm> #include <cstddef> using EdgeData = osrm:...
1
17,831
the above check (by transitivity) checked for `in_data.name_id == out_data.name_id && in_data.name_id != EMPTY_NAME_ID && out_data.name_id != EMPTY_NAME_ID`. The final check of `out_data.name_id != EMPTY_NAME_ID` is missing now.
Project-OSRM-osrm-backend
cpp
@@ -583,6 +583,11 @@ out_free: fpga_result __FPGA_API__ fpgaDestroyEventHandle(fpga_event_handle *event_handle) { + //sanity check + if (!event_handle) { + return FPGA_INVALID_PARAM; + } + struct _fpga_event_handle *_eh = (struct _fpga_event_handle *) *event_handle; fpga_result result = FPGA_OK; int err = 0;
1
// Copyright(c) 2017, 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
14,509
The event handle is being passed by reference, so the dereference on 591 is actually correct. To follow the convention that variables be declared before executable statements, please change the code to the following: struct _fpga_event_handle *_eh; fpga_result result = FPGA_OK; int err = 0; if (!event_handle) { return ...
OPAE-opae-sdk
c
@@ -42,6 +42,7 @@ class named_mutex; #include "../plugins/nearest.hpp" #include "../plugins/timestamp.hpp" #include "../plugins/viaroute.hpp" +#include "../plugins/map_matching.hpp" #include "../server/data_structures/datafacade_base.hpp" #include "../server/data_structures/internal_datafacade.hpp" #include "../s...
1
/* Copyright (c) 2015, Project OSRM contributors All rights reserved. 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 f...
1
14,206
reorder includes to be alphabetically ordered
Project-OSRM-osrm-backend
cpp
@@ -13,7 +13,8 @@ def anchor_target(anchor_list, cfg, gt_labels_list=None, cls_out_channels=1, - sampling=True): + sampling=True, + need_unmap=True): """Compute regression and classification targets for anch...
1
import torch from ..bbox import assign_and_sample, BBoxAssigner, SamplingResult, bbox2delta from ..utils import multi_apply def anchor_target(anchor_list, valid_flag_list, gt_bboxes_list, img_metas, target_means, target_stds, ...
1
17,013
Rename `need_unmap` to `unmap`.
open-mmlab-mmdetection
py
@@ -26,7 +26,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "github.com/chaos-mesh/chaos-mesh/pkg/chaosctl/common" - cm "github.com/chaos-mesh/chaos-mesh/pkg/chaosctl/common" "github.com/chaos-mesh/chaos-mesh/pkg/chaosctl/debug/iochaos" "github.com/chaos-mesh/chaos-mesh/pkg/chaosctl/debug/networkch...
1
// Copyright 2020 Chaos Mesh 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,458
In line 28, it has been declared twice, so removing `cm` should not impact, can you explain me little bit? :)
chaos-mesh-chaos-mesh
go
@@ -16,7 +16,10 @@ import ( const Name = "clutch.service.topology" -type Service interface{} +type Service interface { + acquireTopologyCacheLock() + startTopologyCache() +} type client struct { config *topologyv1.Config
1
package topology import ( "database/sql" "errors" "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/any" "github.com/uber-go/tally" "go.uber.org/zap" topologyv1 "github.com/lyft/clutch/backend/api/config/service/topology/v1" "github.com/lyft/clutch/backend/service" pgservice "github.com...
1
8,773
i don't think these unexported functions belong on the public interface, they can exist solely on the struct.
lyft-clutch
go
@@ -263,6 +263,13 @@ func (h Helper) NewBindAddresses(addrs []string) []ConfigValue { return []ConfigValue{{Class: "bind", Value: addrs}} } +// WithDispenser returns a new instance based on d. All others Helper +// fields are copied, so typically maps are shared with this new instance. +func (h Helper) WithDispens...
1
// Copyright 2015 Matthew Holt and The Caddy 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 applicab...
1
15,612
I'm not entirely clear on why this is necessary?
caddyserver-caddy
go
@@ -317,7 +317,7 @@ def save_session(fname="", session=None, pickleProto=-1): if not fname: fname = conf.session if not fname: - conf.session = fname = utils.get_temp_file(keep=True) + conf.session = fname = cast(str, utils.get_temp_file(keep=True)) log_interactive.info...
1
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """ Main module for interactive startup. """ from __future__ import absolute_import from __future__ import print_function im...
1
18,377
Why do we need to cast to `str` here?
secdev-scapy
py
@@ -17,7 +17,6 @@ import org.testfx.api.FxToolkit; public class AppConfigurationInitialisationTest { @Test - @Ignore public void testAppConfigurationInitialisation() throws TimeoutException { FxToolkit.registerPrimaryStage(); FxToolkit.setupFixture(() -> new AnnotationConfigApplicationContext(AppConfigurat...
1
/** * */ package org.phoenicis.javafx; import java.util.concurrent.TimeoutException; import org.junit.Ignore; import org.junit.Test; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.testfx.api.FxToolkit; /** * @author marc * */ public class AppConfigurationInitialisa...
1
9,317
The ignore import above should be unused now and can be removed.
PhoenicisOrg-phoenicis
java
@@ -231,4 +231,12 @@ final class MultiTermQueryConstantScoreWrapper<Q extends MultiTermQuery> extends }; } + + @Override + public void visit(QueryVisitor visitor) { + QueryVisitor v = visitor.getSubVisitor(Occur.FILTER, this); + if (v != null) { + query.visit(v); + } + } }
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
28,606
redundant null check?
apache-lucene-solr
java
@@ -11,5 +11,5 @@ func NewRAMDevice() (*sonm.RAMDevice, error) { return nil, err } - return &sonm.RAMDevice{Total: m.Total}, err + return &sonm.RAMDevice{Total: m.Total, Available: m.Total}, err }
1
package ram import ( "github.com/shirou/gopsutil/mem" "github.com/sonm-io/core/proto" ) func NewRAMDevice() (*sonm.RAMDevice, error) { m, err := mem.VirtualMemory() if err != nil { return nil, err } return &sonm.RAMDevice{Total: m.Total}, err }
1
6,924
initialization of available ram is here
sonm-io-core
go
@@ -603,8 +603,12 @@ Blockly.Field.prototype.getDisplayText_ = function() { // Replace whitespace with non-breaking spaces so the text doesn't collapse. text = text.replace(/\s/g, Blockly.Field.NBSP); if (this.sourceBlock_.RTL) { - // The SVG is LTR, force text to be RTL. - text += '\u200F'; + // The ...
1
/** * @license * Visual Blocks Editor * * Copyright 2012 Google Inc. * https://developers.google.com/blockly/ * * 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.apach...
1
9,743
Can have negative numbers with the '-' on the right (`10-`) by just using line 610.
LLK-scratch-blocks
js
@@ -1,4 +1,4 @@ -//snippet-sourcedescription:[DeleteUser.java demonstrates how to delete an AWS Identity and Access Management (IAM) user. This is only possible for users with no associated resources.] +//snippet-sourcedescription:[DeleteUser.java demonstrates how to delete an AWS Identity and Access Management (AWS IA...
1
//snippet-sourcedescription:[DeleteUser.java demonstrates how to delete an AWS Identity and Access Management (IAM) user. This is only possible for users with no associated resources.] //snippet-keyword:[AWS SDK for Java v2] //snippet-keyword:[Code Sample] //snippet-service:[AWS IAM] //snippet-sourcetype:[full-exam...
1
18,239
AWS Identity and Access Management (IAM)
awsdocs-aws-doc-sdk-examples
rb
@@ -2381,11 +2381,10 @@ class ThriftRequestHandler(object): check_commands, check_durations, cc_version, statistics = \ store_handler.metadata_info(metadata_file) - if len(check_commands) == 0: - command = ' '.join(sys.argv) - elif...
1
# ------------------------------------------------------------------------- # The CodeChecker Infrastructure # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # -------------------------------------------------------------------------...
1
9,789
Shouldn't we use store a message which indicates that there was no available checker command? By the way how is it possible that metadata.json doesn't contain the checker command? Maybe this was the case in the earlier versions?
Ericsson-codechecker
c
@@ -32,6 +32,10 @@ module RSpec @exclusion_patterns = true_or_false ? [] : DEFAULT_EXCLUSION_PATTERNS.dup end + def full_backtrace + @exclusion_patterns.empty? + end + private def matches_an_exclusion_pattern?(line)
1
module RSpec module Core class BacktraceCleaner DEFAULT_EXCLUSION_PATTERNS = [ /\/lib\d*\/ruby\//, /org\/jruby\//, /bin\//, %r|/gems/|, /spec\/spec_helper\.rb/, /lib\/rspec\/(core|expectations|matchers|mocks)/ ] attr_accessor :inclusion_patterns ...
1
8,747
Given that this is a boolean predicate, maybe it should be `full_backtrace?`.
rspec-rspec-core
rb
@@ -12,7 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.""" -import ldap, traceback +import traceback + +import ldap from django.conf import settings from django.contrib.auth.models...
1
"""Copyright 2008 Orbitz WorldWide 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, software...
1
12,769
Just curious why the blank line here?
graphite-project-graphite-web
py
@@ -1,3 +1,3 @@ from __future__ import (absolute_import, print_function, division) -from netlib.version import * +from mitmproxy.version import *
1
from __future__ import (absolute_import, print_function, division) from netlib.version import *
1
11,420
I like the idea, but we don't want a dependency on mitmproxy in pathod.
mitmproxy-mitmproxy
py
@@ -49,6 +49,16 @@ namespace Datadog.Trace private TimeSpan Elapsed => StopwatchHelpers.GetElapsed(Stopwatch.GetTimestamp() - _timestamp); + /// <summary> + /// Gets or sets a collection of propagated internal Datadog tags, + /// formatted as "key1=value1,key2=value2". + /// </s...
1
// <copyright file="TraceContext.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> using System; using Syste...
1
25,136
Why not adding this to the interface and keep passing the interface (as the interface is internal I don't get why you're not adding it there)
DataDog-dd-trace-dotnet
.cs
@@ -70,6 +70,7 @@ from typing import Pattern, Tuple import astroid from astroid import nodes +from astroid.const import PY310_PLUS from pylint.checkers import BaseChecker, utils from pylint.checkers.utils import (
1
# Copyright (c) 2006-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2009 James Lingard <jchl@aristanetworks.com> # Copyright (c) 2012-2014 Google, Inc. # Copyright (c) 2014-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 David Shea <dshea@redhat.com> # Copyright (c) 2014 Steven My...
1
15,293
`PY310` should probably be imported from `pylint.const`
PyCQA-pylint
py
@@ -37,6 +37,14 @@ func (w workflowLoggable) GetValue(key string) string { return w.wf.GetSerialConsoleOutputValue(key) } +func (w workflowLoggable) GetValueAsBool(key string) bool { + v, err := strconv.ParseBool(w.wf.GetSerialConsoleOutputValue(key)) + if err != nil { + return false + } + return v +} + func (w ...
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,150
Can we propagate this error up the stack?
GoogleCloudPlatform-compute-image-tools
go
@@ -83,7 +83,12 @@ public: const table& result_values) { auto reference = compute_reference(sigma, x_data, y_data); const double tol = te::get_tolerance<Float>(1e-4, 1e-9); - const double diff = la::l_inf_norm(reference, la::matrix<double>::wrap(result_values)); + ...
1
/******************************************************************************* * Copyright 2021 Intel Corporation * * 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.o...
1
27,588
Why reference is converted to table?
oneapi-src-oneDAL
cpp
@@ -203,16 +203,15 @@ struct roots_view *view_at(struct roots_desktop *desktop, double lx, double ly, struct roots_desktop *desktop_create(struct roots_server *server, struct roots_config *config) { struct roots_desktop *desktop = calloc(1, sizeof(struct roots_desktop)); + assert(desktop); wlr_log(L_DEBUG, "Ini...
1
#define _POSIX_C_SOURCE 199309L #include <assert.h> #include <time.h> #include <stdlib.h> #include <math.h> #include <wlr/types/wlr_box.h> #include <wlr/types/wlr_compositor.h> #include <wlr/types/wlr_cursor.h> #include <wlr/types/wlr_gamma_control.h> #include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_wl_...
1
8,625
You shouldn't use assert for runtime errors.
swaywm-wlroots
c
@@ -15,6 +15,7 @@ return array( 'vendor/bootstrap.min.js', 'vendor/bootstrap-accessibility.min.js', 'vendor/validator.min.js', + 'vendor/form-attr-polyfill.js', // input[form] polyfill, cannot load conditionally, since we need all versions of IE 'autocomplete.js', 'co...
1
<?php return array( 'extends' => 'root', 'css' => array( //'vendor/bootstrap.min.css', //'vendor/bootstrap-accessibility.css', //'vendor/font-awesome.min.css', //'bootstrap-custom.css', 'compiled.css', 'print.css:print', ), 'js' => array( 'vendor/b...
1
24,447
Does this really belong in the vendor directory if you wrote it? At very least, should it get its own repo somewhere in addition to being dropped here?
vufind-org-vufind
php
@@ -78,7 +78,7 @@ public class PMDTaskTest { String actual = IOUtils.toString(in, StandardCharsets.UTF_8); // remove any trailing newline actual = actual.replaceAll("\n|\r", ""); - Assert.assertEquals("sample.dummy:0:\tTest Rule 2", actual); + Assert.assertEq...
1
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ package net.sourceforge.pmd.ant; import static org.junit.Assert.fail; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardC...
1
18,124
I think it would be better to place the rule name before the message. Messages are of varying lengths and the rule names will end up misaligned
pmd-pmd
java
@@ -1719,7 +1719,12 @@ class ComparisonChecker(_BasicChecker): 'Used when comparing an object to a literal, which is usually ' 'what you do not want to do, since you can compare to a different ' 'literal than what was expected altogether.'), - ...
1
# -*- coding: utf-8 -*- # Copyright (c) 2006-2016 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2010 Daniel Harding <dharding@gmail.com> # Copyright (c) 2012-2014 Google, Inc. # Copyright (c) 2013-2017 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Brett Cannon <brett@python.org> # Copyri...
1
10,149
Can we remove the argument from this message? A message will include a line number already that points to the place in the code that has the problem. I think we can remove it.
PyCQA-pylint
py
@@ -174,7 +174,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal _requestBodyMinimumDataRateNotSatisfied(_logger, connectionId, traceIdentifier, rate, null); } - public void ResponseMininumDataRateNotSatisfied(string connectionId, string traceIdentifier) + public vir...
1
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.HPack; using ...
1
14,318
This whole class is now a mix of virtual and non-virtual. I tried to see what would happen if I made everything non-virtual in dev, and the build still passes. It turns out that none of the other methods actually need to be virtual. Can you make *all* the logging methods either virtual or not for consistency? Thanks.
aspnet-KestrelHttpServer
.cs