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
@@ -61,5 +61,6 @@ namespace Nethermind.Core.Specs.Forks public bool IsEip1052Enabled => true; public bool IsEip1283Enabled => false; public bool IsEip1234Enabled => true; + public bool IsEip1344Enabled => false; } }
1
/* * Copyright (c) 2018 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 the...
1
22,440
Can we add Istanbul with this first EIP please? (or as a separate issue)
NethermindEth-nethermind
.cs
@@ -71,10 +71,10 @@ func (sn Snapshot) ID() backend.ID { func (sn *Snapshot) fillUserInfo() error { usr, err := user.Current() if err != nil { - return err + return nil } - sn.Username = usr.Username + uid, err := strconv.ParseInt(usr.Uid, 10, 32) if err != nil { return err
1
package restic import ( "fmt" "os" "os/user" "path/filepath" "strconv" "time" "github.com/restic/restic/backend" "github.com/restic/restic/repository" ) type Snapshot struct { Time time.Time `json:"time"` Parent backend.ID `json:"parent,omitempty"` Tree backend.ID `json:"tree"` Paths []stri...
1
6,622
I don't understand this change
restic-restic
go
@@ -2248,7 +2248,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): encrypted_e.setText(encrypted.decode('ascii')) except BaseException as e: traceback.print_exc(file=sys.stdout) - self.show_warning(str(e)) + self.show_warning("Invalid Public ke...
1
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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 witho...
1
12,650
Let's allow translators for this string to be translated: `self.show_warning(_('Invalid Public key'))`
spesmilo-electrum
py
@@ -0,0 +1,13 @@ +var landmarks = axe.commons.aria.getRolesByType('landmark'); +var parent = axe.commons.dom.getComposedParent(node); +while (parent){ + var role = parent.getAttribute('role'); + if (!role && (parent.tagName.toLowerCase() !== 'form')){ + role = axe.commons.aria.implicitRole(parent); + } + if (role && l...
1
1
11,447
This needs to work with `role=form` too.
dequelabs-axe-core
js
@@ -1039,6 +1039,11 @@ Blockly.BlockSvg.prototype.handleDragFree_ = function(oldXY, newXY, e) { } } + // Always update previews for output connections. + if (localConnection && localConnection.type == Blockly.OUTPUT_VALUE) { + updatePreviews = true; + } + if (updatePreviews) { var candidateIsLas...
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,870
This should be before the if on line 1028, which should turn into an else if
LLK-scratch-blocks
js
@@ -27,6 +27,13 @@ type ClusterNetworkPolicySpecBuilder struct { Name string } +type ACNPRuleAppliedToSpec struct { + PodSelector map[string]string + NSSelector map[string]string + PodSelectorMatchExp *[]metav1.LabelSelectorRequirement + NSSelectorMatchExp *[]metav1.LabelSelectorRequirement +} + ...
1
// Copyright 2020 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
26,380
Not really introduced by this PR, but I don't recall why these have to be pointers, while `PodSelector` / `NSSelector` do not. Do you know the reason?
antrea-io-antrea
go
@@ -98,10 +98,10 @@ func (r *RTTStats) UpdateRTT(sendDelta, ackDelay time.Duration, now time.Time) { r.updateRecentMinRTT(sendDelta, now) // Correct for ackDelay if information received from the peer results in a - // positive RTT sample. Otherwise, we use the sendDelta as a reasonable - // measure for smoothedRT...
1
package congestion import ( "time" "github.com/lucas-clemente/quic-go/internal/utils" ) const ( // Note: This constant is also defined in the ackhandler package. initialRTTus = 100 * 1000 rttAlpha float32 = 0.125 oneMinusAlpha float32 = (1 - rttAlpha) rttBeta float32 = 0.25 oneMinusBeta ...
1
7,278
Is there a reason why we are ignoring the ackDelay if it would result in a value smaller than the min? Why not `max(sample - ackDelay, minRTT)`?
lucas-clemente-quic-go
go
@@ -10,8 +10,8 @@ namespace Microsoft.CodeAnalysis.Sarif /// <summary> /// Defines methods to support the comparison of objects of type SarifLog for equality. /// </summary> - [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "0.31.0.0")] - public sealed class SarifLogEqualityComparer : IEqualityCom...
1
// Copyright (c) Microsoft. All Rights Reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.CodeDom.Compiler; using System.Collections.Generic; namespace Microsoft.CodeAnalysis.Sarif { /// <summary> /// Defines m...
1
10,842
Here's an example of how the files in the `NotYetGenerated` directory drifted out of sync from the generated files. When we made the equality comparers internal, we neglected to fix this one.
microsoft-sarif-sdk
.cs
@@ -19,6 +19,10 @@ class GuidancePolicy < ApplicationPolicy user.can_modify_guidance? && guidance.in_group_belonging_to?(user.org_id) end + def index? + admin_index? + end + def admin_index? user.can_modify_guidance? end
1
class GuidancePolicy < ApplicationPolicy attr_reader :user, :guidance def initialize(user, guidance) raise Pundit::NotAuthorizedError, "must be logged in" unless user @user = user @guidance = guidance end def admin_show? user.can_modify_guidance? && guidance.in_group_belonging_to?(user.org_id)...
1
17,327
nice. we should do this elsewhere too. We have a lot of repeated stuff in the policies
DMPRoadmap-roadmap
rb
@@ -612,3 +612,14 @@ TEST_F(BadPonyTest, FieldReferenceInDefaultArgument) TEST_ERRORS_1(src, "can't reference 'this' in a default argument"); } + + +TEST_F(BadPonyTest, DefaultArgScope) +{ + const char* src = + "actor A\n" + " fun foo(x: None = (let y = None; y)) =>\n" + " y"; + + TEST_ERRORS_1(src...
1
#include <gtest/gtest.h> #include <platform.h> #include "util.h" /** Pony code that parses, but is erroneous. Typically type check errors and * things used in invalid contexts. * * We build all the way up to and including code gen and check that we do not * assert, segfault, etc but that the build fails and at l...
1
10,737
Small formatting thing, but can you remove the space before the semicolon?
ponylang-ponyc
c
@@ -38,7 +38,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance var reading = Task.Run(async () => { - int remaining = InnerLoopCount * _writeLenght; + long remaining = InnerLoopCount * _writeLenght; while (remaining != 0) ...
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.Threading.Tasks; using BenchmarkDotNet.Attributes; using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines; namespace Micr...
1
13,699
Not new, but nit: _writeLeng*th*.
aspnet-KestrelHttpServer
.cs
@@ -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
php
@@ -3,11 +3,12 @@ package volume import ( "crypto/tls" "encoding/json" - "github.com/libopenstorage/openstorage/api" - "github.com/stretchr/testify/require" "net/http" "net/http/httptest" "testing" + + "github.com/libopenstorage/openstorage/api" + "github.com/stretchr/testify/require" ) func TestClientTL...
1
package volume import ( "crypto/tls" "encoding/json" "github.com/libopenstorage/openstorage/api" "github.com/stretchr/testify/require" "net/http" "net/http/httptest" "testing" ) func TestClientTLS(t *testing.T) { ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { var...
1
6,420
Remove this file from the PR
libopenstorage-openstorage
go
@@ -488,7 +488,7 @@ Blockly.Variables.renameVariable = function(workspace, variable, var validate = Blockly.Variables.nameValidator_.bind(null, varType); var promptText = promptMsg.replace('%1', variable.name); - Blockly.prompt(promptText, '', + Blockly.prompt(promptText, variable.name, function(newNam...
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,861
I think that for cloud variables, the default value in the prompt should be the variable name without the cloud prefix; this is slightly different from the scratch 2.0 behavior, but I think would ultimately lead to less confusion. Proposing code changes below:
LLK-scratch-blocks
js
@@ -16,7 +16,8 @@ struct wlr_pointer *create_libinput_pointer( wlr_log(WLR_ERROR, "Unable to allocate wlr_pointer"); return NULL; } - wlr_pointer_init(wlr_pointer, NULL); + wlr_pointer_init(wlr_pointer, NULL, + libinput_device_config_tap_get_finger_count(libinput_dev) > 0); return wlr_pointer; }
1
#include <assert.h> #include <libinput.h> #include <stdlib.h> #include <wlr/backend/session.h> #include <wlr/interfaces/wlr_pointer.h> #include <wlr/types/wlr_input_device.h> #include <wlr/util/log.h> #include "backend/libinput.h" #include "util/signal.h" struct wlr_pointer *create_libinput_pointer( struct libinput_...
1
13,645
I think I would rather fish this interface through than use it as the basis for heuristics.
swaywm-wlroots
c
@@ -153,7 +153,7 @@ namespace pwiz.Skyline.Controls.Graphs public static float QValueCutoff { get => Properties.Settings.Default.DetectionsQValueCutoff; - set => Properties.Settings.Default.DetectionsQValueCutoff = value; + set => Properties.Setti...
1
/* * Original author: Rita Chupalov <ritach .at. uw.edu>, * MacCoss Lab, Department of Genome Sciences, UW * * Copyright 2020 University of Washington - Seattle, WA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Lic...
1
13,748
Probably not worth making this line-ending change, since it is the only change to this file.
ProteoWizard-pwiz
.cs
@@ -1180,8 +1180,13 @@ encode_opnd_x0(uint enc, int opcode, byte *pc, opnd_t opnd, OUT uint *enc_out) static inline bool decode_opnd_memx0(uint enc, int opcode, byte *pc, OUT opnd_t *opnd) { +#ifdef DR_HOST_NOT_TARGET + CLIENT_ASSERT(opnd_size_in_bytes(OPSZ_CACHE_LINE) == 64, "OPSZ_CACHE_LINE != 64"); +#endif ...
1
/* ********************************************************** * Copyright (c) 2017-2021 Google, Inc. All rights reserved. * Copyright (c) 2016 ARM Limited. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or without * ...
1
25,823
Is this the correct place for this assert? Does this routine rely on it being 64, or was this only for testing?
DynamoRIO-dynamorio
c
@@ -3,7 +3,7 @@ package hardware import ( "github.com/shirou/gopsutil/mem" "github.com/sonm-io/core/insonmnia/hardware/cpu" - "github.com/sonm-io/core/insonmnia/hardware/gpu" + pb "github.com/sonm-io/core/proto" ) // Hardware accumulates the finest hardware information about system the miner
1
package hardware import ( "github.com/shirou/gopsutil/mem" "github.com/sonm-io/core/insonmnia/hardware/cpu" "github.com/sonm-io/core/insonmnia/hardware/gpu" ) // Hardware accumulates the finest hardware information about system the miner // is running on. type Hardware struct { CPU []cpu.Device Memory *mem.Vi...
1
6,414
No pb please
sonm-io-core
go
@@ -0,0 +1,11 @@ +require 'migrate' +class AddJoinTableBetweenUsersAndChangesets < ActiveRecord::Migration + def change + create_table :changesets_subscribers, id: false do |t| + t.column :subscriber_id, :bigint, null: false + t.column :changeset_id, :bigint, null: false + end + add_foreign_key :cha...
1
1
9,296
We need to add indexes here on both `subscriber_id` and `changeset_id` or things will quickly collapse as we build up subscribers ;-) What I would suggest is a unique index on `[:subscriber_id, :changeset_id]` which will also make duplicate entries impossible, and an ordinary index on `[:changeset_id]` for finding the ...
openstreetmap-openstreetmap-website
rb
@@ -0,0 +1,13 @@ +package slackbot + +import ( + "github.com/slack-go/slack" +) + +func sendBotReply(client *slack.Client, channel, message string) error { + _, _, err := client.PostMessage(channel, slack.MsgOptionText(message, false)) + if err != nil { + return err + } + return nil +}
1
1
10,850
use the context versions of everything, e.g. `PostMessageContext` and thread it through the functions. will save you a bunch of refactoring trouble later on.
lyft-clutch
go
@@ -64,9 +64,7 @@ def implements( obj: "BaseChecker", interface: Union[Type["Interface"], Tuple[Type["Interface"], ...]], ) -> bool: - """Return whether the given object (maybe an instance or class) implements - the interface. - """ + """Does the given object (maybe an instance or class) implemen...
1
# Copyright (c) 2009-2010, 2012-2013 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2013-2014 Google, Inc. # Copyright (c) 2014 Michal Nowikowski <godfryd@gmail.com> # Copyright (c) 2014 Arun Persaud <arun@nubati.net> # Copyright (c) 2015-2018, 2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c...
1
19,343
"not to be used elsewhere other than"
PyCQA-pylint
py
@@ -205,6 +205,7 @@ class SparkAppenderFactory implements FileAppenderFactory<InternalRow> { case PARQUET: return Parquet.writeDeletes(file.encryptingOutputFile()) .createWriterFunc(msgType -> SparkParquetWriters.buildWriter(lazyEqDeleteSparkType(), msgType)) + .setAll(pr...
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
39,563
Thanks for the contribution, @coolderli ! I also think the newPosDeleteWriter need the properties setting ...
apache-iceberg
java
@@ -0,0 +1,7 @@ +class AddIndexToSubscriptions < ActiveRecord::Migration + def change + add_index :subscriptions, :user_id + add_index :subscriptions, :team_id + add_index :subscriptions, [:plan_id, :plan_type] + end +end
1
1
8,088
These additions seem unrelated to this change?
thoughtbot-upcase
rb
@@ -126,4 +126,8 @@ public class TableProperties { public static final String SNAPSHOT_ID_INHERITANCE_ENABLED = "compatibility.snapshot-id-inheritance.enabled"; public static final boolean SNAPSHOT_ID_INHERITANCE_ENABLED_DEFAULT = false; + + public static final String ENGINE_HIVE_ENABLED = "engine.hive.enabled...
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
25,199
Could we move this to a class for Hadoop configuration properties, like `org.apache.iceberg.hadoop.ConfigProperties`?
apache-iceberg
java
@@ -95,19 +95,6 @@ func (r *ChaosCollector) Reconcile(ctx context.Context, req ctrl.Request) (ctrl. manageFlag = true } - if obj.IsDeleted() { - if !manageFlag { - if err = r.archiveExperiment(req.Namespace, req.Name); err != nil { - r.Log.Error(err, "failed to archive experiment") - } - } else { - if...
1
// Copyright 2021 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 agreed to...
1
26,262
The related statements should also be deleted.
chaos-mesh-chaos-mesh
go
@@ -455,6 +455,10 @@ class ELBConnection(AWSQueryConnection): 'LoadBalancerName' : lb_name, 'LoadBalancerPort' : lb_port, } + if policies: + self.build_list_params(params, policies, 'PolicyNames.member.%d') + else: + ...
1
# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/ # # 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, modi...
1
8,228
Shouldn't this line be removed?
boto-boto
py
@@ -0,0 +1,7 @@ +bad_names = set([ + 'TEAM', + 'PUBLIC' +]) + +def blacklisted_name(username): + return username in bad_names
1
1
16,536
Just move this into `const.py`. It already has similar stuff. Also, make it uppercase since it's a const.
quiltdata-quilt
py
@@ -294,6 +294,7 @@ public class PasscodeActivity extends Activity { launchBiometricAuth(); } else { setMode(PasscodeMode.Check); + newMode = PasscodeMode.Check; } break; }
1
/* * Copyright (c) 2011-present, salesforce.com, inc. * All rights reserved. * Redistribution and use of this software 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 noti...
1
17,528
Issue is that `currentMode = newMode;` is called at the end of the method. Passcode screen will come up, but since the activity thinks current mode is biometric check we don't check passcode when submitted.
forcedotcom-SalesforceMobileSDK-Android
java
@@ -51,7 +51,7 @@ import org.tikv.kvproto.Coprocessor.KeyRange; public class ScanAnalyzer { private static final double INDEX_SCAN_COST_FACTOR = 1.2; private static final double TABLE_SCAN_COST_FACTOR = 1.0; - private static final double DOUBLE_READ_COST_FACTOR = TABLE_SCAN_COST_FACTOR * 3; + private static fi...
1
/* * Copyright 2017 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 ...
1
9,702
Need change it back?
pingcap-tispark
java
@@ -0,0 +1,12 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key is used for verifying the integrity of signed cookies. +# If you change this key, all old signed cookies will become invalid! + +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'...
1
1
8,654
Didn't we delete this file a while back because it isn't used but people think that it's a security vulnerability that it's checked in?
openstreetmap-openstreetmap-website
rb
@@ -2,6 +2,7 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; +using Datadog.Trace.ExtensionMethods; using Datadog.Trace.Logging; using Newtonsoft.Json; using Newtonsoft.Json.Linq;
1
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using Datadog.Trace.Logging; using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace Datadog.Trace.Configuration { /// <summary> /// Represents a configuration source that retrieves /// values from th...
1
16,620
nit: Looks like this can be removed now
DataDog-dd-trace-dotnet
.cs
@@ -54,15 +54,9 @@ func (p *PKI) Provision(ctx caddy.Context) error { p.ctx = ctx p.log = ctx.Logger(p) - // if this app is initialized at all, ensure there's at - // least a default CA that can be used: the standard CA - // which is used implicitly for signing local-use certs if p.CAs == nil { p.CAs = make(...
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
17,136
Can probably remove the lines above it too (L60-62), since ProvisionDefaultCA() makes sure the map isn't nil.
caddyserver-caddy
go
@@ -260,11 +260,15 @@ static void on_context_dispose(h2o_handler_t *_self, h2o_context_t *ctx) void h2o_status_register(h2o_pathconf_t *conf) { + static int handler_registered = 0; struct st_h2o_root_status_handler_t *self = (void *)h2o_create_handler(conf, sizeof(*self)); self->super.on_context_init =...
1
/* * Copyright (c) 2016 DeNA Co., Ltd., Kazuho Oku * * 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,...
1
13,203
Do you think it's worth erroring out? It's likely that this is a configuration error that the user might want to know about?
h2o-h2o
c
@@ -20,7 +20,7 @@ def function(): #todo: no space after hash # +1: [fixme] - # FIXME: this is broken + # FIXME: this is broken # +1: [fixme] # ./TODO: find with notes # +1: [fixme]
1
# -*- encoding=utf-8 -*- # pylint: disable=missing-docstring, unused-variable # +1: [fixme] # FIXME: beep def function(): variable = "FIXME: Ignore me!" # +1: [fixme] test = "text" # FIXME: Valid test # +1: [fixme] # TODO: Do something with the variables # +1: [fixme] xxx = "n/a" # XXX...
1
13,238
I think the functional test should not change here, this is probably a test in itself :)
PyCQA-pylint
py
@@ -31,7 +31,16 @@ import ( "github.com/gogits/gogs/modules/setting" ) -var Sanitizer = bluemonday.UGCPolicy().AllowAttrs("class").Matching(regexp.MustCompile(`[\p{L}\p{N}\s\-_',:\[\]!\./\\\(\)&]*`)).OnElements("code") +func BuildSanitizer() (p *bluemonday.Policy) { + p = bluemonday.UGCPolicy() + p.AllowAttrs("cla...
1
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package base import ( "crypto/hmac" "crypto/md5" "crypto/rand" "crypto/sha1" "encoding/base64" "encoding/hex" "fmt" "hash" "html/template" "math" ...
1
9,995
Why this to be a public function?
gogs-gogs
go
@@ -21,7 +21,7 @@ module Travis end def set(var, value, options = {}) - cmd "export #{var}=#{value}", options.merge(log: false) + cmd "export #{var}=#{value}", options.merge(log: false, timing: false) end def echo(string, options = {})
1
module Travis module Build module Shell module Dsl def script(*args, &block) nodes << Script.new(*merge_options(args), &block) nodes.last end def cmd(code, *args) options = args.last.is_a?(Hash) ? args.last : {} node = Cmd.new(code, *merge_opt...
1
11,213
I think we can remove the timing for export env vars
travis-ci-travis-build
rb
@@ -29,8 +29,10 @@ limitations under the License. // limitations under the License. Modifies: -- Remove interface "Provider" -- Remove import "k8s.io/kubernetes/pkg/proxy/config" +- Replace import "k8s.io/kubernetes/pkg/proxy/config" with "github.com/vmware-tanzu/antrea/third_party/proxy/config" +- Remove config.En...
1
/* Copyright 2015 The Kubernetes 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, ...
1
23,019
wrong import grouping
antrea-io-antrea
go
@@ -232,8 +232,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc if (newValue.equals("page")) { final Context context = ui.getActivity(); final String[] navTitles = context.getResources().getStringArra...
1
package de.danoeh.antennapod.preferences; import android.Manifest; import android.annotation.SuppressLint; import android.app.Activity; import android.app.ProgressDialog; import android.app.TimePickerDialog; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent...
1
14,210
There is a doubled semicolon ;)
AntennaPod-AntennaPod
java
@@ -40,6 +40,10 @@ #include <math.h> +#include <zlib.h> +#include "openssl/md5.h" +#include <openssl/sha.h> + #define MathSqrt(op, err) sqrt(op) #include <ctype.h>
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. T...
1
14,727
I'm wondering why this isn't <openssl/md5.h>. Seems like one would have to copy the md5.h file into the source tree somewhere for this to compile cleanly. Maybe you meant to use angle brackets instead of quotes?
apache-trafodion
cpp
@@ -102,7 +102,7 @@ class presence_of_all_elements_located(object): def __call__(self, driver): return _find_elements(driver, self.locator) -class visibility_of_all_elements_located(object): +class visibility_of_any_elements_located(object): """ An expectation for checking that there is at ...
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
13,212
shouldn't **call** return a boolean?
SeleniumHQ-selenium
rb
@@ -229,6 +229,16 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot, return false; } + if (IsEffectInSpell(spell_id, SE_Charm) && !PassCharmTargetRestriction(entity_list.GetMobID(target_id))) { + if (IsClient()) { + CastToClient()->SendSpellBarEnable(spell_id); + } + if (casting_spe...
1
/* EQEMu: Everquest Server Emulator Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org) 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
10,935
We don't need to cast to client here. (well, from spell gem not AA etc) We should also make sure the charm is a casted spell before calling SendSpellBarEnable.
EQEmu-Server
cpp
@@ -63,6 +63,7 @@ def define_violation(dbengine): full_name = Column(String(1024)) inventory_data = Column(Text(16777215)) inventory_index_id = Column(String(256)) + invocation_id = Column(DateTime()) resource_id = Column(String(256), nullable=False) resource_type = C...
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
29,206
This is not an `id`. This should either be `invocation_time` or `invocated_at` to be consistent with what we are using elsewhere, and also to better rerflect the column's DateTime type. Also, within the context of this table, there is no idea of what `invocation` is. I know that `scanner` may not be future-proof, but w...
forseti-security-forseti-security
py
@@ -412,6 +412,18 @@ func (tx Transaction) TxAmount() basics.MicroAlgos { } } +// GetReceiverAddress returns the address of the receiver. If the transaction has no receiver, it returns the empty address. +func (tx Transaction) GetReceiverAddress() basics.Address { + switch tx.Type { + case protocol.PaymentTx: + r...
1
// Copyright (C) 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) any l...
1
37,197
should the 'Receiver' be the clawback address in case of clawback transaction?
algorand-go-algorand
go
@@ -19,10 +19,16 @@ package command import ( "errors" "flag" - "github.com/spf13/cobra" ) +const ( + // VolumeAPIPath is the api path to get volume information + VolumeAPIPath = "/latest/volumes/" + controllerStatusOk = "running" + volumeStatusOK = "Running" +) + var ( volumeCommandHelpText = ` T...
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, sof...
1
9,140
@ashishranjan738 -- Where are these consts used? in which pkg?
openebs-maya
go
@@ -81,12 +81,12 @@ autodoc_default_options = { "show-inheritance": True, } +# Generate autosummary pages. Output should be set with: `:toctree: pythonapi/` +autosummary_generate = ['Python-API.rst'] + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -...
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # LightGBM documentation build configuration file, created by # sphinx-quickstart on Thu May 4 14:30:58 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # a...
1
20,689
The only change I would suggest is moving these lines back below the `templates_path` variable to keep the diffs smaller.
microsoft-LightGBM
cpp
@@ -1862,8 +1862,8 @@ func (fbo *folderBranchOps) unembedBlockChanges( md.AddRefBytes(uint64(info.EncodedSize)) md.AddDiskUsage(uint64(info.EncodedSize)) - changes.Info = info md.data.cachedChanges = *changes + changes.Info = info changes.Ops = nil return nil }
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 ( "fmt" "os" "reflect" "strings" "sync" "time" "github.com/keybase/backoff" "github.com/keybase/client/go/libkb" "github.com/keybase/cl...
1
15,557
Having it above kept the block info in the cached changes, which could end up confusing things quite a bit.
keybase-kbfs
go
@@ -409,15 +409,7 @@ HELP outputter.print_event(node, event) end when 'task' - task_name = options[:object] - - path, metadata = load_task_data(task_name, @config[:modulepath]) - input_method = metadata['input_method'] - - ...
1
require 'uri' require 'optparse' require 'benchmark' require 'logger' require 'json' require 'bolt/node' require 'bolt/version' require 'bolt/error' require 'bolt/executor' require 'bolt/outputter' require 'bolt/config' require 'io/console' module Bolt class CLIError < Bolt::Error attr_reader :error_code de...
1
7,145
If the execute_task returns an `ExecutionResult`, the passing of a block would be unnecessary. Instead, the `ExecutionResult` could be presented to the user in some standardized way (iterating over the result of each node, etc.).
puppetlabs-bolt
rb
@@ -199,7 +199,7 @@ func (c *client) InstallTunnelFlows(tunnelOFPort uint32) error { func (c *client) Initialize() error { // Initiate connections to target OFswitch, and create tables on the switch. - if err := c.bridge.Connect(maxRetryForOFSwitch); err != nil { + if err := c.bridge.Connect(maxRetryForOFSwitch, m...
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
9,450
Not sure why we make a new channel here. If we don't use this channel, how about creating it inside the `Connect`?
antrea-io-antrea
go
@@ -1001,6 +1001,12 @@ void RaftPart::processAppendLogResponses(const AppendLogResponses& resps, LOG_EVERY_N(WARNING, 100) << idStr_ << "Only " << numSucceeded << " hosts succeeded, Need to try again"; usleep(1000); + { + std::lock_guard<std::mutex> g(raftLock_); + ...
1
/* Copyright (c) 2018 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License. */ #include "kvstore/raftex/RaftPart.h" #include <folly/executors/IOThreadPoolExecutor.h> #include <folly/gen/Base.h> #include <folly/io/async/EventBaseManager.h> #include <thrift/lib/cpp/util/EnumUtil...
1
33,449
There are two question here: 1. If you only modify lastLogId, but the `iter` is not modified, I really don't know whether we can succeed. 2. We will check the if the term has changed in `replicateLogs` (if rollback really happen, the term must have been updated), so I really doubt whether the problem should be fixed in...
vesoft-inc-nebula
cpp
@@ -164,7 +164,7 @@ class OrderFlow extends FormFlow $request = $this->getRequest()->request; $requestParameters = $request->all(); $requestParameters['flow_order_step'] = $step->getNumber(); - $requestParameters[$step->getFormType()->getName()] = $stepData; + $requestParameters...
1
<?php namespace Shopsys\ShopBundle\Form\Front\Order; use Craue\FormFlowBundle\Form\FormFlow; use Craue\FormFlowBundle\Form\StepInterface; class OrderFlow extends FormFlow { /** * @var bool */ protected $allowDynamicStepNavigation = true; /** * @var int */ private $domainId; ...
1
11,557
Hello @jDolba, I have reviewed your PR and I found one problem. `$step->getFormType()` can return `FormTypeInterface`. You cannot use interface as key for an array. Can you find some better way to fix this? Thank you.
shopsys-shopsys
php
@@ -62,6 +62,19 @@ gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg EOM yum -y install google-osconfig-agent echo 'inventory install done'` +var installInventoryYumEL6 = `sleep 10 +cat > /etc/yum.repos.d/google-osconfig-agent.repo <<EOM +[google-osconfig-agent] +name=Google OSConfig Agent Repository +bas...
1
// Copyright 2018 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
8,111
i was confused by keyword "inventory" here. my understanding is this starts the osconfig-agent which covers inventory lookup and package-management(correct me if i am wrong).
GoogleCloudPlatform-compute-image-tools
go
@@ -47,6 +47,10 @@ public interface CapabilityType { String HAS_TOUCHSCREEN = "hasTouchScreen"; String OVERLAPPING_CHECK_DISABLED = "overlappingCheckDisabled"; String STRICT_FILE_INTERACTABILITY = "strictFileInteractability"; + String TIMEOUTS = "timeouts"; + String IMPLICIT_TIMEOUT = "implicit"; + String P...
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
19,072
These are really meant to be the keys in the capabilities, not the keys of values within the capabilities
SeleniumHQ-selenium
py
@@ -1,5 +1,6 @@ import { options, createElement as h, render } from 'preact'; import { useEffect, useState } from 'preact/hooks'; +import sinon from 'sinon'; import { setupScratch, teardown } from '../../../test/_util/helpers'; import { act } from '../../src';
1
import { options, createElement as h, render } from 'preact'; import { useEffect, useState } from 'preact/hooks'; import { setupScratch, teardown } from '../../../test/_util/helpers'; import { act } from '../../src'; /** @jsx h */ describe('act', () => { /** @type {HTMLDivElement} */ let scratch; beforeEach(() =...
1
12,728
This breaks tests on IE because this will import an `esm` bundle. For that reason `sinon` is available as a global in our test suite and never imported. The global is aliased to the proper `es5` file.
preactjs-preact
js
@@ -12,6 +12,18 @@ import ( "github.com/lucas-clemente/quic-go/utils" ) +const ( + // Maximum reordering in time space before time based loss detection considers a packet lost. + // In fraction of an RTT. + timeReorderingFraction = 1.0 / 8 + // defaultRTOTimeout is the RTO time on new connections + defaultRTOTimeo...
1
package ackhandler import ( "errors" "fmt" "time" "github.com/lucas-clemente/quic-go/congestion" "github.com/lucas-clemente/quic-go/frames" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" "github.com/lucas-clemente/quic-go/utils" ) var ( // ErrDuplicateOrOutOfOrderAck o...
1
5,800
Maybe move all the Loss Recovery constants to a separate file.
lucas-clemente-quic-go
go
@@ -145,6 +145,7 @@ func (d *Disk) validate(ctx context.Context, s *Step) DError { } type diskAttachment struct { + diskName string mode string attacher, detacher *Step }
1
// Copyright 2017 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
11,518
this field is added so that we can find disk name by device name from attachments
GoogleCloudPlatform-compute-image-tools
go
@@ -1,5 +1,6 @@ package com.fsck.k9.activity; + import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent;
1
package com.fsck.k9.activity; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.text.format.DateUtils; import com.fsck.k9.Account; import com.fsck.k9.AccountStats; import com.fsck.k9.K9; import com.fsck.k9.R; im...
1
16,171
Unnecessary new line
k9mail-k-9
java
@@ -1893,13 +1893,15 @@ func (c *linuxContainer) currentState() (*State, error) { state.NamespacePaths[ns.Type] = ns.GetPath(pid) } for _, nsType := range configs.NamespaceTypes() { - if !configs.IsNamespaceSupported(nsType) { + if _, ok := state.NamespacePaths[nsType]; ok { continue } - if _, ...
1
// +build linux package libcontainer import ( "bytes" "encoding/json" "errors" "fmt" "io" "io/ioutil" "net" "os" "os/exec" "path/filepath" "reflect" "strconv" "strings" "sync" "time" securejoin "github.com/cyphar/filepath-securejoin" "github.com/opencontainers/runc/libcontainer/cgroups" "github.com...
1
22,592
First determine if the namespace already exists, so it's clearer that it's handling namespaces that aren't included in the `c.config.Namespaces`
opencontainers-runc
go
@@ -1,7 +1,5 @@ -<section class="assets-wrapper"> - <div class="assets"> - <%= render "videos/download_link", download_type_key: "OriginalFile", download_type: "original", size_display: "Original (720p)", clip: clip %> - <%= render "videos/download_link", download_type_key: "IphoneVideoFile", download_type: "iph...
1
<section class="assets-wrapper"> <div class="assets"> <%= render "videos/download_link", download_type_key: "OriginalFile", download_type: "original", size_display: "Original (720p)", clip: clip %> <%= render "videos/download_link", download_type_key: "IphoneVideoFile", download_type: "iphone", size_display: ...
1
17,162
What changed in the styles that means we don't need this?
thoughtbot-upcase
rb
@@ -275,13 +275,13 @@ namespace Microsoft.DotNet.Build.Tasks } } - private JToken GetFrameworkDependenciesSection(JObject projectJsonRoot, string framework = null) + private JObject GetFrameworkDependenciesSection(JObject projectJsonRoot, string framework = null) { ...
1
using Microsoft.Build.Utilities; using Microsoft.Build.Framework; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; using NuGet.Packaging; using NuGet.Packaging.Core; using NuGet.Versioning; name...
1
11,152
This pattern should be applied to the other instance where NewtonsoftEscapeJProperty is used and you can remove the NewtonsoftEscapeJProperty method.
dotnet-buildtools
.cs
@@ -165,6 +165,10 @@ class Histogram(Element2D): vdims = param.List(default=[Dimension('Frequency')], bounds=(1,1)) def __init__(self, values, edges=None, **params): + if edges is not None: + self.warning("Histogram edges should be supplied as a tuple " + "along wit...
1
import numpy as np import param from ..core import util from ..core import Dimension, Dataset, Element2D from .util import compute_edges class Chart(Dataset, Element2D): """ The data held within Chart is a numpy array of shape (N, D), where N is the number of samples and D the number of dimensions. C...
1
18,849
Something to mention in the next changelog/release notes. It will be good to get histogram working consistently with everything else.
holoviz-holoviews
py
@@ -892,6 +892,7 @@ spec: values: - {{ $targetAffinityVal }} topologyKey: kubernetes.io/hostname + namespaces: [{{.Volume.runNamespace}}] {{- end }} containers: - args:
1
/* 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 applicable law or agreed to in writing, soft...
1
18,313
What does this contain? Is it PVC namespace or is it openebs?
openebs-maya
go
@@ -0,0 +1,18 @@ +// 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. + +namespace Microsoft.AspNetCore.Server.Kestrel.Core.Features +{ + /// <summary> + /// Represents a minimum data rate for the r...
1
1
13,389
Design note: Using local concrete data types on a feature abstraction makes it hard to generalize / replace. This is tolerable so long as this remains a kestrel exclusive feature, but we'd need a different design if this were ever moved to HttpAbstractions.
aspnet-KestrelHttpServer
.cs
@@ -426,11 +426,12 @@ LGBM_SE LGBM_BoosterGetEvalNames_R(LGBM_SE handle, LGBM_SE buf_len, LGBM_SE actual_len, LGBM_SE eval_names, - LGBM_SE call_state) { + LGBM_SE call_state, + LGBM_SE data_idx) { R_API_BEGIN(); int len; - CHECK_CALL(LGBM_BoosterGetEvalCounts(R_GET_PTR(handle), &len)); + CHECK_CA...
1
#include <LightGBM/lightgbm_R.h> #include <LightGBM/utils/log.h> #include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/text_reader.h> #include <LightGBM/utils/common.h> #include <vector> #include <string> #include <utility> #include <cstring> #include <cstdio> #include <sstream> #include <cstdint> #incl...
1
19,549
this will break R package, you should update the R files accordingly. BTW, the call state should be in the last argument.
microsoft-LightGBM
cpp
@@ -182,9 +182,13 @@ final class MediaController public function getMediumFormatsAction($id): FOSRestView { $media = $this->getMedium($id); + $mediaContext = $media->getContext(); $formats = [MediaProviderInterface::FORMAT_REFERENCE]; - $formats = array_merge($formats, array_...
1
<?php declare(strict_types=1); /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\MediaBundle\Controlle...
1
12,155
Shouldn't we throw an exception if the context is null instead ?
sonata-project-SonataMediaBundle
php
@@ -13,6 +13,9 @@ var DdevVersion = "v0.3.0-dev" // Note that this is overridden by make // for examples defining version constraints. var DockerVersionConstraint = ">= 17.05.0-ce" +// DockerComposeVersionConstraint is the current minimum version of docker-compose required for ddev. +var DockerComposeVersionConstra...
1
package version // VERSION is supplied with the git committish this is built from var VERSION = "" // IMPORTANT: These versions are overridden by version ldflags specifications VERSION_VARIABLES in the Makefile // DdevVersion is the current version of ddev, by default the git committish (should be current git tag) v...
1
11,996
These should both be const, not var right?
drud-ddev
php
@@ -0,0 +1,8 @@ +from mmcv.utils import Registry, build_from_cfg + +MATCH_COST = Registry('Match Cost') + + +def build_match_cost(cfg, default_args=None): + """Builder of IoU calculator.""" + return build_from_cfg(cfg, MATCH_COST, default_args)
1
1
21,971
Rename the directory, match_costers -> match_costs
open-mmlab-mmdetection
py
@@ -64,6 +64,13 @@ class DeleteModelTest(BaseTest): records = result['data'] self.assertEqual(len(records), 1) + def test_delete_collection_gives_number_of_deletable_records_in_headers(self): + self.resource.request.GET = {'_limit': '1'} + self.resource.collection_delete() + ...
1
from pyramid import httpexceptions from . import BaseTest class ModelTest(BaseTest): def setUp(self): super(ModelTest, self).setUp() self.record = self.model.create_record({'field': 'value'}) def test_list_gives_number_of_results_in_headers(self): self.resource.collection_get() ...
1
10,377
I don't think this should go in the model tests, since it is done in the resource. `PaginatedDeleteTest` seems more appropriate
Kinto-kinto
py
@@ -273,7 +273,7 @@ public class HttpCommandExecutor implements CommandExecutor, NeedsLocalLogs { } if (!GET_ALL_SESSIONS.equals(command.getName()) && !NEW_SESSION.equals(command.getName())) { - throw new SessionNotFoundException("Session ID is null"); + throw new SessionNotFoundE...
1
/* Copyright 2007-2011 Selenium committers 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
10,691
It would be better to just change RWD to throw IllegalStateException if you attempt to execute a command after quit (unless it's a second call to quit())
SeleniumHQ-selenium
rb
@@ -130,13 +130,13 @@ func NewExportPipeline(config Config, options ...controller.Option) (*Exporter, // InstallNewPipeline instantiates a NewExportPipeline and registers it globally. // Typically called as: // -// hf, err := prometheus.InstallNewPipeline(prometheus.Config{...}) +// exporter, err := prometheus.Ins...
1
// Copyright The 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.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
1
14,843
Could we move this to an example test to allow the compiler to help us ensure it stays up-to-date in the future?
open-telemetry-opentelemetry-go
go
@@ -380,14 +380,6 @@ describe "Bolt::CLI" do cli = Bolt::CLI.new(%w[command run uptime --password opensesame --nodes foo]) expect(cli.parse).to include(password: 'opensesame') end - - it "prompts the user for password if not specified" do - allow(STDIN).to receive(:noecho).and_retur...
1
# frozen_string_literal: true require 'spec_helper' require 'bolt_spec/files' require 'bolt_spec/task' require 'bolt/cli' require 'bolt/util' require 'concurrent/utility/processor_counter' require 'r10k/action/puppetfile/install' require 'yaml' describe "Bolt::CLI" do include BoltSpec::Files include BoltSpec::Tas...
1
13,048
Maybe we could update these to use $future and then check on stderr? that way when we deprecate stdout we can not have to delete tests.
puppetlabs-bolt
rb
@@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 public void PrepareContinuation(Http2ContinuationFrameFlags flags, int streamId) { - PayloadLength = MinAllowedMaxFrameSize - HeaderLength; + PayloadLength = (int)_maxFrameSize; Typ...
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. namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2 { /* https://tools.ietf.org/html/rfc7540#section-6.10 +------------------...
1
16,409
Remove this since it always has to be set afterwards.
aspnet-KestrelHttpServer
.cs
@@ -11,7 +11,7 @@ import "testing" // bob writes a multi-block file while unmerged, no conflicts func TestCrUnmergedWriteMultiblockFile(t *testing.T) { test(t, - blockSize(20), users("alice", "bob"), + blockSize(20), blockChangeSize(20*1024), users("alice", "bob"), as(alice, mkdir("a"), ),
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. // These tests all do one conflict-free operation while a user is unstaged. package test import "testing" // bob writes a multi-block file while unmerged, no conflict...
1
15,560
These two tests were causing us to use too many goroutines with `-race` using the default block change size, I think due to prefetching.
keybase-kbfs
go
@@ -25,8 +25,13 @@ class LeafNode(Node): self.reader = reader self.is_leaf = True - def fetch(self, startTime, endTime): - return self.reader.fetch(startTime, endTime) + def fetch(self, startTime, endTime, now=None, requestContext=None): + try: + result = self.reader.fetch(startTime, endTime, n...
1
class Node(object): __slots__ = ('name', 'path', 'local', 'is_leaf') def __init__(self, path): self.path = path self.name = path.split('.')[-1] self.local = True self.is_leaf = False def __repr__(self): return '<%s[%x]: %s>' % (self.__class__.__name__, id(self), self.path) class BranchNo...
1
11,407
Is that `try..except` block really needed? I mean, when it could fail?
graphite-project-graphite-web
py
@@ -101,7 +101,7 @@ module.exports = function(config) { files: [ { pattern: 'test/polyfills.js', watched: false }, - { pattern: config.grep || '{debug,hooks,compat,test-utils,}/test/{browser,shared}/**.test.js', watched: false } + { pattern: config.grep || '{debug,hooks,compat,test-utils,}/test/{browser,sh...
1
/*eslint no-var:0, object-shorthand:0 */ var coverage = String(process.env.COVERAGE) === 'true', ci = String(process.env.CI).match(/^(1|true)$/gi), pullRequest = !String(process.env.TRAVIS_PULL_REQUEST).match(/^(0|false|undefined)$/gi), masterBranch = String(process.env.TRAVIS_BRANCH).match(/^master$/gi), sauceLab...
1
13,520
If you only want to run a specific group of tests you can always use `.only` like `it.only()` or `describe.only()`. It may not speed up the globbing process as much as this change here :)
preactjs-preact
js
@@ -65,7 +65,13 @@ LAMBDA_DEFAULT_STARTING_POSITION = 'LATEST' LAMBDA_ZIP_FILE_NAME = 'original_lambda_archive.zip' LAMBDA_JAR_FILE_NAME = 'original_lambda_archive.jar' -DEFAULT_BATCH_SIZE = 10 +INVALID_PARAMETER_VALUE_EXCEPTION = 'InvalidParameterValueException' + +BATCH_SIZE_MAP = { + 'kinesis': (100, 10000), ...
1
import re import os import imp import sys import json import uuid import time import base64 import logging import threading import traceback import hashlib import functools from io import BytesIO from datetime import datetime from six.moves import cStringIO as StringIO from six.moves.urllib.parse import urlparse from f...
1
10,812
nit: I'd probably rename this to `BATCH_SIZE_RANGES`, to use a slightly more descriptive name.
localstack-localstack
py
@@ -1322,7 +1322,8 @@ public class MenuEntrySwapperPlugin extends Plugin if (this.swapCoalBag) { - menuManager.addPriorityEntry("Empty", "Coal bag"); + menuManager.addPriorityEntry("Empty", "Coal bag").setPriority(90); + menuManager.addPriorityEntry("Fill", "Coal bag").setPriority(100); } if (this...
1
/* * Copyright (c) 2018, Adam <Adam@sigterm.info> * Copyright (c) 2018, Kamiel * Copyright (c) 2019, alanbaumgartner <https://github.com/alanbaumgartner> * Copyright (c) 2019, Kyle <https://github.com/kyleeld> * Copyright (c) 2019, lucouswin <https://github.com/lucouswin> * All rights reserved. * * Redistributi...
1
15,489
aren't these the wrong way around?
open-osrs-runelite
java
@@ -2027,6 +2027,10 @@ public class CoreContainer { return configSetsHandler; } + public ConfigSetService getCoreConfigService() { + return this.coreConfigService; + } + public String getHostName() { return this.hostName; }
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
40,240
Lets call this getConfigSetService and maybe rename the field now (or later)
apache-lucene-solr
java
@@ -27,8 +27,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog" - "k8s.io/klog/klogr" + "k8s.io/klog/v2" + "k8s.io/klog/v2/klogr" "github.com/jetstack/cert-manager/pkg/api" )
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
22,894
Could / should we make these constants and give them a type?
jetstack-cert-manager
go
@@ -63,6 +63,13 @@ const ( deleteAfterAnnotation = "hive.openshift.io/delete-after" // contains a duration after which the cluster should be cleaned up. tryInstallOnceAnnotation = "hive.openshift.io/try-install-once" + + platformAWS = "aws" + platformAzure = "azure" + platformGCP = "GCP" + plat...
1
package clusterdeployment import ( "context" "fmt" "os" "reflect" "sort" "strings" "time" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" log "github.com/sirupsen/logrus" routev1 "github.com/openshift/api/route/v1" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" apier...
1
10,972
lets stick with lowercase for consistency.
openshift-hive
go
@@ -17,10 +17,9 @@ limitations under the License. package acme import ( - corev1 "k8s.io/api/core/v1" - cmacme "github.com/jetstack/cert-manager/pkg/apis/acme/v1" cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" ) // IsFinalState will return true if the given ACME Sta...
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,552
ordering of imports went wrong
jetstack-cert-manager
go
@@ -84,6 +84,11 @@ public class AllDataFilesTable extends BaseMetadataTable { this.fileSchema = fileSchema; } + @Override + protected String tableType() { + return String.valueOf(MetadataTableType.ALL_DATA_FILES); + } + @Override protected TableScan newRefinedScan(TableOperations o...
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
37,766
I think these can all be .name() to get the value we are looking for
apache-iceberg
java
@@ -2622,6 +2622,16 @@ class FunctionCallTest extends TestCase array_push();', 'error_message' => 'TooFewArguments', ], + 'printOnlyString' => [ + '<?php + print [];', + 'error_message' => 'InvalidArgument', +...
1
<?php namespace Psalm\Tests; use const DIRECTORY_SEPARATOR; class FunctionCallTest extends TestCase { use Traits\InvalidCodeAnalysisTestTrait; use Traits\ValidCodeAnalysisTestTrait; /** * @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}> */ publi...
1
8,019
Is this a good place for these test cases?
vimeo-psalm
php
@@ -45,6 +45,7 @@ class Job(object): self.vault = vault if response_data: for response_name, attr_name, default in self.ResponseDataElements: + print response_name, attr_name setattr(self, attr_name, response_data[response_name]) else: ...
1
# -*- coding: utf-8 -*- # Copyright (c) 2012 Thomas Parslow http://almostobsolete.net/ # # 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 th...
1
8,497
Did you mean to leave the print statement?
boto-boto
py
@@ -184,6 +184,9 @@ Interpreter.false = new Buffer([]); Interpreter.MAX_SCRIPT_ELEMENT_SIZE = 520; +Interpreter.LOCKTIME_THRESHOLD = 500000000; +Interpreter.LOCKTIME_THRESHOLD_BN = new BN(500000000); + // flags taken from bitcoind // bitcoind commit: b5d1b1092998bc95313856d535c632ea5a8f9104 Interpreter.SCRIPT_V...
1
'use strict'; var _ = require('lodash'); var Script = require('./script'); var Opcode = require('../opcode'); var BN = require('../crypto/bn'); var Hash = require('../crypto/hash'); var Signature = require('../crypto/signature'); var PublicKey = require('../publickey'); /** * Bitcoin transactions contain scripts. E...
1
14,460
I would do `new BN(Interpreter.LOCKTIME_THRESHOLD)`
bitpay-bitcore
js
@@ -23,9 +23,7 @@ package com.github.javaparser.ast.visitor; import com.github.javaparser.ast.Node; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.Queue; +import java.util.*; /** * Iterate over all the nodes in (a part of) the AST.
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
11,782
@ftomassetti I turned the tree walking algorithms into iterators so you don't have to visit every node when you only wanted a few, like for a `findFirst`.
javaparser-javaparser
java
@@ -416,7 +416,7 @@ func timerTypeFromThrift( func timerTypeToReason( timerType timerType, ) string { - return fmt.Sprintf("cadenceInternal:Timeout %v", timerTypeToThrift(timerType)) + return fmt.Sprintf("cadenceInternal:Timeout TimeoutType%v", timerTypeToThrift(timerType)) } // Len implements sort.Interface
1
// Copyright (c) 2019 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
9,141
Need to add type name here to be compatible with proto string representation.
temporalio-temporal
go
@@ -40,7 +40,7 @@ public class BazelBuild { if (target == null || "".equals(target)) { throw new IllegalStateException("No targets specified"); } - log.info("\nBuilding " + target + " ..."); + log.finest("\nBuilding " + target + " ..."); ImmutableList.Builder<String> builder = ImmutableLis...
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
17,120
This is to let people know that the tooling is doing something during a build. Please leave.
SeleniumHQ-selenium
py
@@ -17,8 +17,8 @@ MINIMALIST_COLLECTION = {'data': dict()} MINIMALIST_GROUP = {'data': dict(members=['fxa:user'])} MINIMALIST_RECORD = {'data': dict(name="Hulled Barley", type="Whole Grain")} -USER_PRINCIPAL = 'basicauth:8a931a10fc88ab2f6d1cc02a07d3a81b5d4768f' \ - '...
1
try: import unittest2 as unittest except ImportError: import unittest # NOQA import webtest from cliquet import utils from pyramid.security import IAuthorizationPolicy from zope.interface import implementer from cliquet.tests import support as cliquet_support from kinto import main as testapp from kinto impor...
1
7,567
Why is the principal changing here?
Kinto-kinto
py
@@ -26,6 +26,11 @@ // The default URL opener will use credentials from the environment variables // AZURE_STORAGE_ACCOUNT, AZURE_STORAGE_KEY, and AZURE_STORAGE_SAS_TOKEN. // AZURE_STORAGE_ACCOUNT is required, along with one of the other two. +// AZURE_BLOB_DOMAIN can optionally be used to provide an Azure Environmen...
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
19,859
Naming nit: let's use `AZURE_STORAGE_` prefix for consistency with the other ones.
google-go-cloud
go
@@ -0,0 +1,18 @@ +const Plugin = require('../../core/Plugin') + +module.exports = class ProgressBar extends Plugin { + constructor (uppy, opts) { + super(uppy, opts) + + this.id = opts.id + this.type = 'progressindicator' + } + + install () { + this.opts.onInstall() + } + + uninstall () { + this.opt...
1
1
10,848
I'm a bit confused. We have an actual `ProgressBar` Uppy React wrapper component that we are testing. Why do we need a mock for it?
transloadit-uppy
js
@@ -1,6 +1,9 @@ package v1alpha1 import ( + "errors" + "strings" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1
package v1alpha1 import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kclient "github.com/openebs/maya/pkg/client/k8s/v1alpha1" clientset "k8s.io/client-go/kubernetes" ) // getClientsetFn is a typed function that // abstracts fetching of clientset type getClientsetFn func() (clientset *...
1
12,644
can we use `github.com/pkg/errors`?
openebs-maya
go
@@ -72,15 +72,15 @@ func Compile(scope Scope, f *semantic.FunctionExpression, in semantic.MonoType) // inType and mapping any variables to the value in the other record. // If the input type is not a type variable, it will check to ensure // that the type in the input matches or it will return an error. -func substi...
1
package compiler import ( "github.com/influxdata/flux/codes" "github.com/influxdata/flux/internal/errors" "github.com/influxdata/flux/semantic" "github.com/influxdata/flux/values" ) func Compile(scope Scope, f *semantic.FunctionExpression, in semantic.MonoType) (Func, error) { if scope == nil { scope = NewScop...
1
15,181
I changed the name of the arguments here just to help make the code clearer.
influxdata-flux
go
@@ -404,7 +404,10 @@ class Callable(param.Parameterized): allowing their inputs (and in future outputs) to be defined. This makes it possible to wrap DynamicMaps with streams and makes it possible to traverse the graph of operations applied - to a DynamicMap. + to a DynamicMap. Additionally a Calla...
1
import itertools import types from numbers import Number from itertools import groupby from functools import partial import numpy as np import param from . import traversal, util from .dimension import OrderedDict, Dimension, ViewableElement from .layout import Layout, AdjointLayout, NdLayout from .ndmapping import U...
1
16,230
I think either 'avoiding calls to the function' or 'to avoid calling the function ...' would be read better.
holoviz-holoviews
py
@@ -5425,7 +5425,7 @@ SyncOpBeginRenderPass::SyncOpBeginRenderPass(CMD_TYPE cmd, const SyncValidator & // TODO: Revisit this when all attachment validation is through SyncOps to see if we can discard the plain pointer copy // Note that this a safe to presist as long as shared_attachments is no...
1
/* Copyright (c) 2019-2021 The Khronos Group Inc. * Copyright (c) 2019-2021 Valve Corporation * Copyright (c) 2019-2021 LunarG, 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 * ...
1
15,125
@sfricke-samsung -- thanks. saves a few atomic ops which is always good :) The TODO is there to track that this object is storing *both* vectors of shared_ptr and plain pointers to the same data. The shared are to ensure scope, and the plain are for backwards compatibility with existing code that consumed a plain point...
KhronosGroup-Vulkan-ValidationLayers
cpp
@@ -16,10 +16,16 @@ // using System; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using FluentAssertions; +using Nethermind.Core; +using Nethermind.Logging; +using Nethermind.Monitoring.Config; +using Nethermind.Monitoring.Metrics; +using Nethermind.Runner; us...
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,780
minor: typo (knowMetricsTypes -> knownMetricsTypes)
NethermindEth-nethermind
.cs
@@ -503,7 +503,13 @@ ConstValue* OptRangeSpec::getConstOperand(ItemExpr* predExpr, Lng32 constInx) // currently support. Predicates involving types not yet supported will be // treated as residual predicates. if (QRDescGenerator::typeSupported(static_cast<ConstValue*>(right)->getType())) + { + /* add const...
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
18,790
This adds a case-insensitive flag to the type in the RangeSpec, but I don't think RangeSpecs are written to handle case-insensitive comparisons. Take a look at the methods that deal with comparisons when building RangeSpecs, in file Range.cpp. So, I think you would have to do one of two things: a) disable the RangeSpec...
apache-trafodion
cpp
@@ -637,6 +637,16 @@ public class MethodResolutionLogic { throw new UnsupportedOperationException(typeDeclaration.getClass().getCanonicalName()); } + public static SymbolReference<ResolvedMethodDeclaration> solveMethodInFQN(String fqn, String name, + ...
1
/* * Copyright 2016 Federico Tomassetti * * 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
12,685
I would throw an exception if the type is not solved
javaparser-javaparser
java
@@ -52,11 +52,8 @@ func TestDifficulty(t *testing.T) { // files are 2 years old, contains strange values dt.skipLoad("difficultyCustomHomestead\\.json") - dt.skipLoad("difficultyMorden\\.json") - dt.skipLoad("difficultyOlimpic\\.json") dt.config("Ropsten", *params.RopstenChainConfig) - dt.config("Morden", *pa...
1
// Copyright 2017 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum 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 the License...
1
22,558
if remove `dt.skipLoad` - then this tests will run. You probably mean opposite?
ledgerwatch-erigon
go
@@ -0,0 +1,14 @@ +module Beaker + module Shared + module Timed + + def run_and_report_duration &block + start = Time.now + block.call + Time.now - start + end + + end + end +end +
1
1
4,686
I feel like we do this in a lot of places should we move that out into its own PR?
voxpupuli-beaker
rb
@@ -12,7 +12,7 @@ import 'css!./style'; fillImageElement(elem, source); } - async function itemBlurhashing(target, blurhashstr) { + function itemBlurhashing(target, blurhashstr) { if (blurhash.isBlurhashValid(blurhashstr)) { // Although the default values recommended by Blurh...
1
import * as lazyLoader from 'lazyLoader'; import * as userSettings from 'userSettings'; import * as blurhash from 'blurhash'; import 'css!./style'; /* eslint-disable indent */ export function lazyImage(elem, source = elem.getAttribute('data-src')) { if (!source) { return; } fil...
1
16,369
Already asked you in Matrix, but I'll do it here again so it can be discussed publicly. Why?
jellyfin-jellyfin-web
js