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
@@ -311,6 +311,10 @@ bool rai::uint256_union::decode_dec (std::string const & text) { stream >> number_l; *this = number_l; + if (!stream.eof ()) + { + result = true; + } } catch (std::runtime_error &) {
1
#include <rai/lib/numbers.hpp> #include <ed25519-donna/ed25519.h> #include <blake2/blake2.h> #include <cryptopp/aes.h> #include <cryptopp/modes.h> thread_local CryptoPP::AutoSeededRandomPool rai::random_pool; namespace { char const * base58_reverse ("~012345678~~~~~~~9:;<=>?@~ABCDE~FGHIJKLMNOP~~~~~~QRSTUVWXYZ[~\\...
1
12,901
This is to prevent parsing things like "1.1" as "1" until we implement it properly.
nanocurrency-nano-node
cpp
@@ -25,7 +25,7 @@ import os import shutil from nupic.data.file_record_stream import FileRecordStream -from nupic.frameworks.opf.experiment_runner import runExperiment +from nupic.frameworks.opf.experiment_runner import runExperiment, _getCheckpointParentDir from nupic.support import initLogging from nupic.support...
1
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
1
20,154
Can we change `_getCheckpointParentDir` to be a public function explicitly? It seems like something that clients of experiment runner may wish to use.
numenta-nupic
py
@@ -2050,6 +2050,13 @@ class AdvancedPanelControls(wx.Panel): self.UIAInMSWordCheckBox.SetValue(config.conf["UIA"]["useInMSWordWhenAvailable"]) self.UIAInMSWordCheckBox.defaultValue = self._getDefaultValue(["UIA", "useInMSWordWhenAvailable"]) + # Translators: This is the label for a checkbox in the + # Advan...
1
# -*- coding: UTF-8 -*- #settingsDialogs.py #A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2006-2019 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Heiko Folkerts, Zahari Yurukov, Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger #This file is covered ...
1
25,231
Why is a restart necessary?
nvaccess-nvda
py
@@ -458,7 +458,11 @@ func (task *Task) addGPUResource(cfg *config.Config) error { container.GPUIDs = append(container.GPUIDs, association.Name) } } - task.populateGPUEnvironmentVariables() + // For external instances, GPU IDs are handled by resources struct + // For internal instances, GPU IDs are handle...
1
// Copyright 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" file ...
1
26,486
Should setting the task runtime also go under the above if condition?
aws-amazon-ecs-agent
go
@@ -32,6 +32,8 @@ import ( var isDNSLabel = regexp.MustCompile(`^[a-zA-Z0-9]([-]*[a-zA-Z0-9])+$`).MatchString +const _defaultListEntriesPageSize = 50 + //Handler service is used to register SPIFFE IDs, and the attestation logic that should //be performed on a workload before those IDs can be issued. type Handle...
1
package registration import ( "crypto/x509" "errors" "fmt" "net/url" "regexp" "strings" "time" "github.com/gofrs/uuid" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/wrappers" "github.com/sirupsen/logrus" "github.com/spiffe/spire/pkg/common/idutil" "github.com/spiffe/spire/pkg/comm...
1
12,630
SPIRE uses the leadingLowerCase convention for unexported constants
spiffe-spire
go
@@ -1,11 +1,12 @@ // 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 Microsoft.CodeAnalysis.Sarif.Readers; using System; using System.CodeDom.Compiler; using System.Collections.Generic; using S...
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 Microsoft.CodeAnalysis.Sarif.Readers; using System; using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serializatio...
1
10,937
The newest JSchema code generator orders `System` usings first.
microsoft-sarif-sdk
.cs
@@ -82,10 +82,17 @@ public class HiveIcebergSerDe extends AbstractSerDe { } String[] selectedColumns = ColumnProjectionUtils.getReadColumnNames(configuration); - Schema projectedSchema = selectedColumns.length > 0 ? tableSchema.select(selectedColumns) : tableSchema; + Schema projectedSchema = tableSch...
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
31,404
I understand that we want to have a possibility to configure the IcebergInputFormat to be case sensitive or case insensitive since it can be used by other MR jobs as well. Do we want to allow the users of Hive to shot themselves on the foot and enable case sensitivity? My first guess would be that we should not use the...
apache-iceberg
java
@@ -79,7 +79,7 @@ func (c *CStorPoolController) cStorPoolEventHandler(operation common.QueueOperat common.SyncResources.Mux.Lock() status, err := c.cStorPoolAddEventHandler(cStorPoolGot) common.SyncResources.Mux.Unlock() - + pool.PoolAddEventHandled = true return status, err case common.QOpDestroy:
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, sof...
1
9,546
Will the above call to cStorPoolAddEventHandler() get executed in the same thread as this line?
openebs-maya
go
@@ -600,11 +600,11 @@ func (c *coroutineLoweringPass) lowerFuncsPass() { continue } - if len(fn.normalCalls) == 0 { - // No suspend points. Lower without turning it into a coroutine. + if len(fn.normalCalls) == 0 && fn.fn.FirstBasicBlock().FirstInstruction().IsAAllocaInst().IsNil() { + // No suspend poin...
1
package transform // This file lowers asynchronous functions and goroutine starts when using the coroutines scheduler. // This is accomplished by inserting LLVM intrinsics which are used in order to save the states of functions. import ( "errors" "go/token" "strconv" "github.com/tinygo-org/tinygo/compiler/llvmut...
1
13,029
I don't think alloca instructions are always at the start of the entry block. I think it would be safer to check the entire entry block for alloca instructions, just in case some are not the first instruction. (Technically they can be anywhere in the function but we check in other places that this isn't possible).
tinygo-org-tinygo
go
@@ -135,11 +135,19 @@ func chainsForIfaces(ifaceMetadata []string, epMarkMapper rules.EndpointMarkMapper, host bool, tableKind string) []*iptables.Chain { + const ( + ProtoUDP = 17 + ProtoIPIP = 4 + VXLANPort = 0 + VXLANVNI = 0 + ) + log.WithFields(log.Fields{ "ifaces": ifaceMetadata, "host": ...
1
// Copyright (c) 2017-2019 Tigera, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
1
16,983
Why isn't this 4789 (which I think is the Felix default)?
projectcalico-felix
go
@@ -57,6 +57,10 @@ const ( MessageResourceFailCreate EventReason = "Resource creation failed" // SuccessImported holds status for corresponding imported resource. SuccessImported EventReason = "Imported" + // FailureImported holds status for corresponding imported resource. + FailureImported EventReason = "Import...
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, sof...
1
15,582
Can this be `Import operations failure`? In addition, is this the right time to change the variable names? e.g. `ReasonImportOperationsFailure`, `ReasonImportFailure`, `ReasonImportSuccessful`, `ReasonCreateResourceFailure`, `ReasonImportResourceSuccessful` Naming convention that i have assumed here is as follows: `Rea...
openebs-maya
go
@@ -457,4 +457,5 @@ void Init_binary_protocol_accelerated() { rb_define_method(bpa_class, "read_set_end", rb_thrift_binary_proto_read_set_end, 0); rbuf_ivar_id = rb_intern("@rbuf"); + rb_global_variable(&rbuf_ivar_id); }
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 m...
1
17,047
I suspect this isn't needed because I think `rb_intern` gets marked already.
apache-thrift
c
@@ -96,7 +96,7 @@ public class InternalSelenseTestBase extends SeleneseTestBase { return; } - log.info("In dev mode. Copying required files in case we're using a WebDriver-backed Selenium"); + log.finest("In dev mode. Copying required files in case we're using a WebDriver-backed Selenium"); 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
16,448
This change is incorrect: the current log level is correct.
SeleniumHQ-selenium
rb
@@ -80,7 +80,8 @@ public class BKDWriter implements Closeable { //public static final int VERSION_CURRENT = VERSION_START; public static final int VERSION_LEAF_STORES_BOUNDS = 5; public static final int VERSION_SELECTIVE_INDEXING = 6; - public static final int VERSION_CURRENT = VERSION_SELECTIVE_INDEXING; + ...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
29,486
Can you add a space before the equal sign? There are a couple other places where spaces are missing in this PR.
apache-lucene-solr
java
@@ -268,7 +268,10 @@ public class ExecutorServlet extends HttpServlet implements ConnectorParams { continue; } - if (flow.getUpdateTime() > updateTime) { + // After removing runningFlows cache from web server, flow info will be fetched from DB directly, + // updateTime will be synced be...
1
/* * Copyright 2012 LinkedIn Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
1
13,078
Please follow the todo naming convention.
azkaban-azkaban
java
@@ -28,6 +28,9 @@ import ( // +k8s:openapi-gen=true // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type==\"Ready\")].status",description="" +// +kubebuilder:printcolumn:name="Status",type="string",JSONPa...
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
19,822
These are no longer used and changes should instead be made directly to the files in `deploy/chart/crds` /assign @JoshVanL /unassign
jetstack-cert-manager
go
@@ -257,9 +257,11 @@ class YOLOV3Head(BaseDenseHead, BBoxTestMixin): # (h, w, num_anchors*num_attrib) -> (h*w*num_anchors, num_attrib) pred_map = pred_map.permute(1, 2, 0).reshape(-1, self.num_attrib) - pred_map[..., :2] = torch.sigmoid(pred_map[..., :2]) - bbox_pred = ...
1
# Copyright (c) 2019 Western Digital Corporation or its affiliates. import warnings import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule, normal_init from mmcv.runner import force_fp32 from mmdet.core import (build_anchor_generator, build_assigner, ...
1
21,626
Is this really necessary to work around this way? The old version works fine with me when converting to ONNX.
open-mmlab-mmdetection
py
@@ -71,7 +71,7 @@ type s3Blob struct { func (bb *s3Blob) Write(p []byte) (int, error) { if bb.final { - return 0, errors.New("blob already closed") + return 0, errors.New("Blob already closed") } n, err := bb.buf.Write(p)
1
package s3 import ( "bytes" "errors" "fmt" "io" "io/ioutil" "strings" "gopkg.in/amz.v3/aws" "gopkg.in/amz.v3/s3" "github.com/restic/restic/backend" ) const maxKeysInList = 1000 const connLimit = 10 const backendPrefix = "restic" func s3path(t backend.Type, name string) string { if t == backend.Config { ...
1
6,732
Same as above: don't start error strings with a capital letter, and don't fix unneeded things in an unrelated commit ;)
restic-restic
go
@@ -168,6 +168,7 @@ module Beaker options[:recursive]=File.directory?(source) if options[:recursive].nil? + @logger.debug "going to upload! #{source} to #{@hostname}:#{target}" @ssh.scp.upload! source, target, options result = Result.new(@hostname, [source, target])
1
require 'socket' require 'timeout' require 'net/scp' module Beaker class SshConnection attr_accessor :logger RETRYABLE_EXCEPTIONS = [ SocketError, Timeout::Error, Errno::ETIMEDOUT, Errno::EHOSTDOWN, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ECONNRESET, ...
1
6,363
Is this a testing debug statement?
voxpupuli-beaker
rb
@@ -849,7 +849,11 @@ var connect = function(self, url, options, callback) { } // Parse the string - var object = parse(url, options); + var object; + parse(url, options, function(err, connectionStringObject) { + if (err) return console.log(err); + object = connectionStringObject; + }); var _finalOp...
1
'use strict'; var parse = require('./url_parser'), Server = require('./topologies/server'), Mongos = require('./topologies/mongos'), ReplSet = require('./topologies/replset'), EventEmitter = require('events').EventEmitter, inherits = require('util').inherits, Define = require('./metadata'), ReadPreferenc...
1
13,965
you'll need to wrap the _whole thing_ within this async call (or refactor it so everything below is in a new temporary function). The code below this section depends on a value for `object` after the parsing occurs, but what you're doing here is kicking off a race condition where `object` is null, but _might_ parse qui...
mongodb-node-mongodb-native
js
@@ -238,9 +238,9 @@ thread ([this]() { void nano::worker::run () { + std::unique_lock<std::mutex> lk (mutex); while (!stopped) { - std::unique_lock<std::mutex> lk (mutex); if (!queue.empty ()) { auto func = queue.front ();
1
#include <nano/lib/utility.hpp> #include <boost/dll/runtime_symbol_info.hpp> #include <iostream> // Some builds (mac) fail due to "Boost.Stacktrace requires `_Unwind_Backtrace` function". #ifndef _WIN32 #ifndef _GNU_SOURCE #define BEFORE_GNU_SOURCE 0 #define _GNU_SOURCE #else #define BEFORE_GNU_SOURCE 1 #endif #endi...
1
15,882
This is now going to be protecting `stopped` when it doesn't need to. If you are going to do this then can you make `stopped` non-atomic and protect it in `stop`. It's cheap to make a `unique_lock` fyi, it's just a pointer to a mutex and a `bool`. The `lk.lock ()` in the loop is superfluous so probably shouldn't have b...
nanocurrency-nano-node
cpp
@@ -27,6 +27,10 @@ import ( "strings" "time" + "github.com/mysteriumnetwork/node/cmd/commands" + + remote_config "github.com/mysteriumnetwork/node/config/remote" + "github.com/chzyer/readline" "github.com/rs/zerolog/log" "github.com/urfave/cli/v2"
1
/* * Copyright (C) 2017 The "MysteriumNetwork/node" Authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
1
16,852
Lets not give packages names if we dont have to. If a package requires a rename, we should change the actual name while/if we can.
mysteriumnetwork-node
go
@@ -1128,12 +1128,16 @@ encode_opnd_imm5(uint enc, int opcode, byte *pc, opnd_t opnd, OUT uint *enc_out) static inline bool decode_opnd_imm6(uint enc, int opcode, byte *pc, OUT opnd_t *opnd) { + if (!TEST(1U << 31, enc) && TEST(1U << 15, enc)) + return false; return decode_opnd_int(10, 6, false, 0, OP...
1
/* ********************************************************** * Copyright (c) 2017 Google, Inc. All rights reserved. * Copyright (c) 2016 ARM Limited. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or without * modif...
1
12,158
Not sure I see where this is coming from. This is a bug fix? Should be mentioned in the commit message? Same below.
DynamoRIO-dynamorio
c
@@ -125,9 +125,6 @@ function generateTopologyTests(testSuites, testContext, filter) { describe(suiteName, { metadata: { requires }, test: function () { - beforeEach(() => prepareDatabaseForSuite(testSuite, testContext)); - afterEach(() => testContext.cleanupAfterSuite()); - ...
1
'use strict'; const path = require('path'); const fs = require('fs'); const chai = require('chai'); const expect = chai.expect; const { EJSON } = require('bson'); const TestRunnerContext = require('./context').TestRunnerContext; const resolveConnectionString = require('./utils').resolveConnectionString; const hasOwnPro...
1
18,798
I reverted this change in the last commit, I think we should revert it here. I know this leads to confusing test output for skipped tests, but I would prefer to tackle that in a separate PR specifically focused on that problem. In fact, I think the issue might really be with the leak checker, and not how this test runn...
mongodb-node-mongodb-native
js
@@ -213,6 +213,9 @@ class LoadAnnotations: annotation. Default: False. poly2mask (bool): Whether to convert the instance masks from polygons to bitmaps. Default: True. + normed_bbox (bool): Whether to convert bbox from relative value to + absolute value. Only used in...
1
# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp import mmcv import numpy as np import pycocotools.mask as maskUtils from mmdet.core import BitmapMasks, PolygonMasks from ..builder import PIPELINES try: from panopticapi.utils import rgb2id except ImportError: rgb2id = None @PIPELINES.r...
1
26,123
Can this part be done in `dataset.get_ann_info`? Just like CocoDataset converts xywh to xyxy in `_parse_ann_info`
open-mmlab-mmdetection
py
@@ -32,10 +32,10 @@ func (*testTraceProvider) Tracer(_ string, _ ...trace.TracerOption) trace.Tracer func TestMultipleGlobalTracerProvider(t *testing.T) { p1 := testTraceProvider{} p2 := trace.NoopProvider{} - global.SetTraceProvider(&p1) - global.SetTraceProvider(&p2) + global.SetTracerProvider(&p1) + global.SetT...
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
13,209
Should we change the name of this test struct to be `testTracerProvider` as well?
open-telemetry-opentelemetry-go
go
@@ -21,13 +21,14 @@ import ( "github.com/iotexproject/iotex-core/action" "github.com/iotexproject/iotex-core/blockchain" "github.com/iotexproject/iotex-core/config" - "github.com/iotexproject/iotex-core/explorer" "github.com/iotexproject/iotex-core/pkg/keypair" "github.com/iotexproject/iotex-core/pkg/log" "...
1
// Copyright (c) 2018 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
15,583
"google.golang.org/grpc" should be together with "go.uber.org/zap" all ""github.com/iotexproject/iotex-core/*" stay together
iotexproject-iotex-core
go
@@ -700,6 +700,12 @@ class WebEngineTab(browsertab.AbstractTab): self._inject_early_js('js', js_code, subframes=True) self._init_stylesheet() + js_code_print = utils.read_file('javascript/print.js') + self._inject_early_js('js', + js_code_print, + ...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
1
21,361
No need for a separate variable here - just call `utils.read_file` directly below.
qutebrowser-qutebrowser
py
@@ -150,8 +150,18 @@ func (ctx *ChannelContext) SendResp(message model.Message) { ctx.anonChsLock.RLock() defer ctx.anonChsLock.RUnlock() + + deadline := time.Now().Add(MessageTimeoutDefault) + sendTimer := time.NewTimer(time.Until(deadline)) + if channel, exist := ctx.anonChannels[anonName]; exist { - channel...
1
package context import ( "errors" "fmt" "sync" "sync/atomic" "time" "k8s.io/klog" "github.com/kubeedge/beehive/pkg/core/model" ) // constants for channel context const ( ChannelSizeDefault = 1024 MessageTimeoutDefault = 30 * time.Second TickerTimeoutDefault = 20 * time.Millisecond ) // ChannelContext i...
1
18,325
Thanks for the fixing, small question, Here the message just be written to the channel, will it be blocked?
kubeedge-kubeedge
go
@@ -29,7 +29,8 @@ type SyncStage byte const ( Headers SyncStage = iota // Headers are downloaded, their Proof-Of-Work validity and chaining is verified - Bodies // Block bodies are downloaded, TxHash and UncleHash are getting verified, "From" recovered from signatures + Bodies ...
1
// Copyright 2020 The turbo-geth Authors // This file is part of the turbo-geth 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
21,479
maybe we will have something like `Bodies []byte("bodies")` instead of them being a number? with numbers we are making it harder to insert stages mid-process.
ledgerwatch-erigon
go
@@ -82,11 +82,11 @@ type Endpoint struct { // GroupMember represents resource member to be populated in Groups. // This supersedes GroupMemberPod, and will eventually replace it. type GroupMember struct { - // ExternalEntity maintains the reference to the ExternalEntity. - ExternalEntity *ExternalEntityReference `js...
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
22,673
out of curiosity, why making this change? If no real reason, could you restore to avoid unnecessary changes of several generated files?
antrea-io-antrea
go
@@ -334,6 +334,10 @@ func (manager *connectionManager) Disconnect() error { manager.cleanConnection() manager.setStatus(statusNotConnected()) + manager.eventPublisher.Publish(StateEventTopic, StateEvent{ + State: NotConnected, + SessionInfo: manager.sessionInfo, + }) return nil }
1
/* * Copyright (C) 2017 The "MysteriumNetwork/node" Authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
1
14,316
Could we public events if `manager.serStatus()`?
mysteriumnetwork-node
go
@@ -134,7 +134,9 @@ module.exports = class Plugin { } this.uppy.log(`Not installing ${callerPluginName}`) - throw new Error(`Invalid target option given to ${callerPluginName}`) + throw new Error(`Invalid target option given to ${callerPluginName}. Please make sure that the element + exists on t...
1
const preact = require('preact') const findDOMElement = require('@uppy/utils/lib/findDOMElement') /** * Defer a frequent call to the microtask queue. */ function debounce (fn) { let calling = null let latestArgs = null return (...args) => { latestArgs = args if (!calling) { calling = Promise.reso...
1
11,120
could be misread as `<body>`, maybe something redundant but very clear like "before the closing `</body>` tag"?
transloadit-uppy
js
@@ -510,12 +510,11 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests var testLogger = new TestApplicationErrorLogger(); var serviceContext = new TestServiceContext { Log = new TestKestrelTrace(testLogger) }; - using (var server = new TestServer(httpContext => + ...
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 System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.Http; using System.Net.Sockets; u...
1
13,575
This test is specifically checking behavior on sync I/O (note there are tests with Write in the name, and other tests with WriteAsync). Enable sync I/O here.
aspnet-KestrelHttpServer
.cs
@@ -0,0 +1,11 @@ +class WeeklyIterationDripMailerPreview < ActionMailer::Preview + def weekly_update + user = User.new(name: 'John Doe') + video = Video.first.tap do |video| + video.email_body_text = 'Email body text' + video.email_cta_label = 'Click Here!' + end + + WeeklyIterationDripMailer.wee...
1
1
18,307
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
thoughtbot-upcase
rb
@@ -56,6 +56,8 @@ type CStorVolumeClaimSpec struct { // CStorVolumeRef has the information about where CstorVolumeClaim // is created from. CStorVolumeRef *corev1.ObjectReference `json:"cstorVolumeRef,omitempty"` + // CstorVolumeSource contains the source volumeID+Snapshot combaination + CstorVolumeSource string ...
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, sof...
1
17,608
nit: Should we have something like `volumeName@snapShotname` and this will be filled only if it is a clone creation
openebs-maya
go
@@ -164,10 +164,13 @@ func WriteWordpressConfig(wordpressConfig *WordpressConfig, filePath string) err return err } - // Ensure target directory is writable. + // Ensure target directory exists and is writeable dir := filepath.Dir(filePath) - err = os.Chmod(dir, 0755) - if err != nil { + if err = os.Chmod(dir,...
1
package ddevapp import ( "os" "path/filepath" "text/template" "fmt" "github.com/Masterminds/sprig" "github.com/drud/ddev/pkg/archive" "github.com/drud/ddev/pkg/fileutil" "github.com/drud/ddev/pkg/output" "github.com/drud/ddev/pkg/util" ) // WordpressConfig encapsulates all the configurations for a WordPres...
1
13,064
This seems like an improved pattern :)
drud-ddev
php
@@ -53,7 +53,11 @@ def get_hdfs_syntax(): override this setting with "cdh3" or "apache1" in the hadoop section of the config in order to use the old syntax """ - return configuration.get_config().get("hadoop", "version", "cdh4").lower() + try: + import snakebite + return configuration...
1
# Copyright (c) 2012 Spotify AB # # 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, s...
1
8,856
I think it would be better to have a separate configuration option for specifying which HDFS interaction layer to use instead of using the existing hadoop version option. I think there are still cases where things might have to rely on Hadoop version for other things, and overwriting that information with "snakebite" w...
spotify-luigi
py
@@ -575,10 +575,15 @@ module Bolt outputter.print_task_info(pal.get_task(task_name)) end + # Filters a list of content by matching substring. + # + private def filter_content(content, filter) + return content unless content && filter + content.select { |name,| name.include?(filter) } + ...
1
# frozen_string_literal: true # Avoid requiring the CLI from other files. It has side-effects - such as loading r10k - # that are undesirable when using Bolt as a library. require 'uri' require 'benchmark' require 'json' require 'io/console' require 'logging' require 'optparse' require 'bolt/analytics' require 'bolt/...
1
16,881
Why are we filtering content twice? It seems like just filtering it in PAL should work.
puppetlabs-bolt
rb
@@ -17,11 +17,11 @@ */ export const ACCOUNT_STATUS_NONE = 'none'; +export const ACCOUNT_STATUS_MULTIPLE = 'multiple'; export const ACCOUNT_STATUS_DISAPPROVED = 'disapproved'; export const ACCOUNT_STATUS_GRAYLISTED = 'graylisted'; -export const ACCOUNT_STATUS_MULTIPLE = 'multiple'; -export const ACCOUNT_STATUS_NO...
1
/** * Status utlities. * * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unl...
1
28,051
These should probably move to `constants.js`
google-site-kit-wp
js
@@ -21,6 +21,8 @@ import com.google.common.base.Charsets; import com.google.common.io.ByteStreams; import com.google.common.net.MediaType; +import com.sun.org.glassfish.gmbal.ManagedObject; + import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.http.HttpHost;
1
/* Copyright 2011 Selenium committers Copyright 2011 Software Freedom Conservancy Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by...
1
11,531
Again, you don't want to depend on glassfish.
SeleniumHQ-selenium
java
@@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Faker + module Space + class << self + extend Gem::Deprecate + + def launch_vehicule + Faker::Space.launch_vehicule + end + + deprecate :launch_vehicule, 'Faker::Space.launch_vehicule', 2019, 06 + end + end +end
1
1
9,214
it should be `Faker::Space.launch_vehicle`, otherwise it will crash
faker-ruby-faker
rb
@@ -630,6 +630,18 @@ namespace NLog.Targets #endif byte[] bytes = this.GetBytesToWrite(logEvent); + // Clean up old archives if this is the first time a log record has been written to + // this log file and the archiving system is date/time based. + if (this.ArchiveNumbe...
1
// // Copyright (c) 2004-2011 Jaroslaw Kowalski <jaak@jkowalski.net> // // 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 co...
1
11,011
Isn't it quite expensive to check whether the file exists on every write?
NLog-NLog
.cs
@@ -165,7 +165,9 @@ webdriver.Builder.prototype.build = function() { } else { var url = this.serverUrl_; var client; - if (url[0] == '/') { + if (webdriver.http.CorsClient.isAvailable()) { + client = new webdriver.http.XhrClient(url); + } else if (url[0] == '/') { var origin = window.l...
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
11,962
Please hide this behind a flag and add a setter function to the builder.
SeleniumHQ-selenium
py
@@ -1009,6 +1009,7 @@ func (vd *volAPI) Routes() []*Route { {verb: "POST", path: backupPath("/restore", volume.APIVersion), fn: vd.cloudBackupRestore}, {verb: "GET", path: backupPath("", volume.APIVersion), fn: vd.cloudBackupEnumerate}, {verb: "DELETE", path: backupPath("", volume.APIVersion), fn: vd.cloudBack...
1
package server import ( "encoding/json" "fmt" "net/http" "strconv" "strings" "github.com/gorilla/mux" "github.com/libopenstorage/openstorage/api" "github.com/libopenstorage/openstorage/api/errors" "github.com/libopenstorage/openstorage/cluster" "github.com/libopenstorage/openstorage/volume" "github.com/lib...
1
6,632
old api should be deprecated if we don't intend on using it anymore. Again this should happen through swagger api and then removed from next release. We should also release not this as a breaking change. (same with all the other cloudsnap api renames.
libopenstorage-openstorage
go
@@ -59,7 +59,7 @@ public class VertxRestTransport extends AbstractTransport { } if (!NetUtils.canTcpListen(ep.getSocketAddress().getAddress(), ep.getPort())) { - log.info("can not listen {}, skip {}.", ep.getSocketAddress(), this.getClass().getName()); + log.warn("can not listen {}, port may have ...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
9,806
so strange...... canTcpListen is to detect, if this transport can init when customers deployed vertx and servlet rest transport, we must detect which one will be used only both of them refused to init is a problem. we have already print that......
apache-servicecomb-java-chassis
java
@@ -38,6 +38,8 @@ import com.salesforce.androidsdk.util.JSONObjectHelper; */ public class QuerySpec { private static final String SELECT_COUNT = "SELECT count(*) "; + private static final String SELECT_COUNT_FORM = SELECT_COUNT + " FROM (%s)"; + // Constants private static final String SELECT = "SELECT "; ...
1
/* * Copyright (c) 2012, 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 notice, this...
1
14,498
Did you mean for this to be `FORM`, instead of `FROM`?
forcedotcom-SalesforceMobileSDK-Android
java
@@ -94,6 +94,13 @@ type AWSMachineSpec struct { // +kubebuilder:validation:MaxItems=2 NetworkInterfaces []string `json:"networkInterfaces,omitempty"` + // UncompressedUserData specify whether the user data is gzip-compressed before it is sent to ec2 instance. + // cloud-init has built-in support for gzip-compress...
1
/* Copyright 2019 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
14,405
What are your thoughts on the long term solution for the naming of this variable? Do you think we should revert the logic when we are ready to make the next set of breaking API changes?
kubernetes-sigs-cluster-api-provider-aws
go
@@ -92,14 +92,15 @@ module RSpec command = spec_command begin - puts command if verbose + $stdout.puts(command}) if verbose success = system(command) rescue - puts failure_message if failure_message + $stderr.puts failure_message if failure_mes...
1
require 'rspec/support/warnings' require 'rake' require 'rake/tasklib' require 'shellwords' module RSpec module Core class RakeTask < ::Rake::TaskLib include ::Rake::DSL if defined?(::Rake::DSL) # Name of task. # # default: # :spec attr_accessor :name # Glob pattern ...
1
11,114
There's a syntax error on this line.
rspec-rspec-core
rb
@@ -834,7 +834,7 @@ fpga_result clear_port_errors(fpga_handle afu_handle) result = fpgaObjectRead64(port_error_object, &value, 0); if (result != FPGA_OK) { OPAE_ERR("Failed to Read Object "); - return result; + goto out; } printf("\n \n Port error CSR : 0x%lx \n", value);
1
// Copyright(c) 2017-2018, Intel Corporation // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and...
1
17,811
You lose the value of `result` when you `goto out`
OPAE-opae-sdk
c
@@ -497,8 +497,9 @@ Blockly.Scrollbar.prototype.onScroll_ = function() { * @param {number} value The distance from the top/left end of the bar. */ Blockly.Scrollbar.prototype.set = function(value) { + var ratio = this.ratio_ == undefined ? 0 : this.ratio_; // Move the scrollbar slider. - this.svgKnob_.setAttr...
1
/** * @license * Visual Blocks Editor * * Copyright 2011 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,439
Just a style thing, why not `this.ratio_ || 0`?
LLK-scratch-blocks
js
@@ -186,7 +186,8 @@ func CIDRFromCalicoNet(ipNet calinet.IPNet) CIDR { func CIDRFromIPNet(ipNet *net.IPNet) CIDR { ones, _ := ipNet.Mask.Size() - ip := FromNetIP(ipNet.IP) + // Mask the IP before creating the CIDR so that we have it in canonical format. + ip := FromNetIP(getMaskedIp(ipNet)) if ip.Version() == 4 ...
1
// Copyright (c) 2016-2017 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
1
16,402
I think the stdlib's `net.IP` has a `Mask()` method, does that do what we need?
projectcalico-felix
c
@@ -106,9 +106,9 @@ func strOr(s string, ss ...string) string { return "" } -// substitute runs replacer on string elements within a complex data structure +// Substitute runs replacer on string elements within a complex data structure // (except those contained in private data structure fields). -func substitute...
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
7,038
Why does substitute need to be public? Are we allowing/encouraging variable usage when using Daisy as a library?
GoogleCloudPlatform-compute-image-tools
go
@@ -335,6 +335,11 @@ class WebEngineCaret(browsertab.AbstractCaret): """ if js_elem is None: return + if js_elem == "focused": + # we had a focused element, not a selected one. Just send <enter> + self._tab.key_press(Qt.Key_Enter) + return + ...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
1
21,460
We should probably use ctrl-enter if `tab` is given, just like in `follow_selected`?
qutebrowser-qutebrowser
py
@@ -146,7 +146,7 @@ func New( dynamicCollection := dynamicconfig.NewCollection(params.DynamicConfig, logger) - dispatcher := params.RPCFactory.CreateDispatcher() + dispatcher := params.RPCFactory.CreateTChannelDispatcher() membershipMonitor, err := params.MembershipFactory.Create(dispatcher) if err != nil { ...
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,080
This file looks like anti pattern `ServiceLocator` and lucky it's not used anywhere. Can I remove it? (in separate PR).
temporalio-temporal
go
@@ -466,6 +466,10 @@ public class DatasetUtil { * size for tabular files. */ public static String getDownloadSize(DatasetVersion dsv, boolean original) { + return FileSizeChecker.bytesToHumanReadable(getDownloadSizeNumeric(dsv, original)); + } + + public static Long getDownloadSizeNume...
1
package edu.harvard.iq.dataverse.dataset; import edu.harvard.iq.dataverse.DataFile; import edu.harvard.iq.dataverse.Dataset; import edu.harvard.iq.dataverse.DatasetField; import edu.harvard.iq.dataverse.DatasetVersion; import edu.harvard.iq.dataverse.FileMetadata; import edu.harvard.iq.dataverse.dataaccess.DataAccess;...
1
44,306
we can just have this method call the next, passing in the file metadatas (deduplication of logic)
IQSS-dataverse
java
@@ -480,6 +480,17 @@ class TabBar(QTabBar): new_idx = super().insertTab(idx, icon, '') self.set_page_title(new_idx, text) + def wheelEvent(self, event): + """Override wheelEvent to make the action configurable.""" + if config.get('tabs', 'mousewheel-tab-switching'): + ...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
1
12,949
What happens here if you send the `wheelEvent` directly to the `tabbed_browser` and let it take care of propagating it to its children (i.e. the focused tab)? If that works, I guess that'd be cleaner.
qutebrowser-qutebrowser
py
@@ -21,6 +21,10 @@ from .compat import (PANDAS_INSTALLED, DataFrame, Series, is_dtype_sparse, from .libpath import find_lib_path +def _log_callback(msg): + """Redirect logs from native library into Python console""" + print("{0:s}".format(decode_string(msg)), end='') + def _load_lib(): """Load LightGBM...
1
# coding: utf-8 """Wrapper for C API of LightGBM.""" from __future__ import absolute_import import copy import ctypes import os import warnings from tempfile import NamedTemporaryFile from collections import OrderedDict import numpy as np import scipy.sparse from .compat import (PANDAS_INSTALLED, DataFrame, Series, ...
1
24,070
it seems python 2 don't support `end=''`. @StrikerRUS @henry0312 any better solution? or we drop the support of python 2?
microsoft-LightGBM
cpp
@@ -4135,6 +4135,12 @@ bool PreCallValidateCreateImageView(layer_data *device_data, const VkImageViewCr } } } + else + { + skip |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, + HandleToUint64(create_info->image), "...
1
/* Copyright (c) 2015-2018 The Khronos Group Inc. * Copyright (c) 2015-2018 Valve Corporation * Copyright (c) 2015-2018 LunarG, Inc. * Copyright (C) 2015-2018 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
9,328
This test already exists in the object_tracker layer.
KhronosGroup-Vulkan-ValidationLayers
cpp
@@ -64,7 +64,8 @@ public class EthGetCode extends AbstractBlockParameterOrBlockHashMethod { @Override protected String resultByBlockHash(final JsonRpcRequestContext request, final Hash blockHash) { final Address address = request.getRequiredParameter(0, Address.class); - if (GoQuorumOptions.goQuorumCompat...
1
/* * Copyright ConsenSys AG. * * 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
26,053
Same here, can we presume if `privacyParameters` is set we need goQuorum handling? Or is there a goQuorum sub option in `privacyParametes`?
hyperledger-besu
java
@@ -122,6 +122,10 @@ class FastAppend extends SnapshotProducer<AppendFiles> implements AppendFiles { public List<ManifestFile> apply(TableMetadata base) { List<ManifestFile> newManifests = Lists.newArrayList(); + if (base.currentSnapshot() != null) { + newManifests.addAll(base.currentSnapshot().delete...
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
20,258
The addition of delete files in `newManifests` far above the addition of data files threw me a bit. Is it intentional to ensure the delete files are at the front of the list?
apache-iceberg
java
@@ -68,7 +68,7 @@ module Bolt # though, since that will resolve any nested references and we want to # leave it to the group to do that lazily. groups = @plugins.resolve_top_level_references(groups) - + raise ValidationError.new("Groups must be an Array", nil) unless groups.is_a?(Array...
1
# frozen_string_literal: true require 'bolt/inventory/group' require 'bolt/inventory/inventory' require 'bolt/inventory/target' module Bolt class Inventory class Group attr_accessor :name, :groups # Regex used to validate group names and target aliases. NAME_REGEX = /\A[a-z0-9_][a-z0-9_-]*\Z/...
1
17,183
Interesting. The call to `Array(groups)` below this would seem to indicate this doesn't _have_ to be an array. I think the problem is actually that passing a hash to `Array()` actually converts the hash to an array of key/value pairs rather than wrapping it in an array. So maybe `Array(groups)` should be `groups = [gro...
puppetlabs-bolt
rb
@@ -140,4 +140,10 @@ public class TableProperties { public static final String GC_ENABLED = "gc.enabled"; public static final boolean GC_ENABLED_DEFAULT = true; + + public static final String MAX_SNAPSHOT_AGE_MS = "history.expire.max-snapshot-age-ms"; + public static final long MAX_SNAPSHOT_AGE_MS_DEFAULT = 5...
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
29,316
This is not a particularly good default but we need it to keep the old behavior.
apache-iceberg
java
@@ -117,13 +117,6 @@ func TestPaymentBrokerRedeemWithCondition(t *testing.T) { blockHeightParam := types.NewBlockHeight(43) redeemerParams := []interface{}{blockHeightParam} - sys := setup(t) - require.NoError(t, sys.st.SetActor(context.TODO(), toAddress, actor.NewActor(pbTestActorCid, types.NewZeroAttoFIL()))) -...
1
package paymentbroker_test import ( "context" "fmt" "math/big" "strings" "testing" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" "github.com/ipfs/go-hamt-ipld" "github.com/ipfs/go-ipfs-blockstore" cbor "github.com/ipfs/go-ipld-cbor" "github.com/stretchr/testify/assert" "github.com/stretchr/testi...
1
18,906
We have other tests to assert all properties of a condition are valid. It's enough to assert the condition is not nil here.
filecoin-project-venus
go
@@ -30,7 +30,7 @@ import ( "github.com/vmware-tanzu/antrea/pkg/agent/config" "github.com/vmware-tanzu/antrea/pkg/agent/openflow" - opsv1alpha1 "github.com/vmware-tanzu/antrea/pkg/apis/ops/v1alpha1" + opsv1alpha1 "github.com/vmware-tanzu/antrea/pkg/apis/crd/v1alpha1" binding "github.com/vmware-tanzu/antrea/pkg/o...
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
32,486
shouldn't the import be renamed `crdv1alpha1` by convention? It seems that you took care of renaming everywhere else...
antrea-io-antrea
go
@@ -86,6 +86,19 @@ const ( // DefaultMinSupportedCNIVersion denotes the minimum version of cni spec required DefaultMinSupportedCNIVersion = "0.3.0" + + // pauseContainerTarball is the path to the pause container tarball + pauseContainerTarballPath = "/images/amazon-ecs-pause.tar" +) + +var ( + // PauseContainerT...
1
// Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license...
1
15,550
nit: Can Linux-specific paths be moved to a conditionally-compiled file for Linux?
aws-amazon-ecs-agent
go
@@ -81,6 +81,10 @@ public abstract class SessionMap implements HasReadyState, Routable { public abstract void remove(SessionId id); + public int getCount() { + return -10; + }; + public URI getUri(SessionId id) throws NoSuchSessionException { return get(id).getUri(); }
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,774
This is not the right approach. The `Distributor` maintains a model of the current state of the Grid. That model already contains the information about every active session. We don't need to modify `SessionMap` to expose it further.
SeleniumHQ-selenium
rb
@@ -279,8 +279,10 @@ func (r *runner) waitForJournal(ctx context.Context) error { // unrecognized attributes are ignored. The list ends with a blank // line. func (r *runner) handleList(ctx context.Context, args []string) (err error) { - if len(args) > 0 { - return errors.New("Lists for non-fetches unsupported for ...
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 kbfsgit import ( "bufio" "context" "fmt" "io" "os" "path" "strings" "github.com/keybase/client/go/logger" "github.com/keybase/kbfs/kbfsmd" "github.co...
1
17,603
Git doc seems to suggest `for-push` is a optimization. Do we have a plan/ticket for treating them differently?
keybase-kbfs
go
@@ -449,7 +449,8 @@ debug_tls:When 1, print some TLS session secrets when they are computed. "mobileip", "netbios", "netflow", "ntp", "ppp", "pptp", "radius", "rip", "rtp", "skinny", "smb", "snmp", "tftp", "x509", "bluetooth", "dhcp6", "llmnr", - ...
1
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ Implementation of the configuration object. """ from __future__ import absolute_import from __future__ import print_...
1
11,551
This not necessary since you moved the layers to `contrib/`.
secdev-scapy
py
@@ -1088,7 +1088,7 @@ module Bolt end define('--log-level LEVEL', "Set the log level for the console. Available options are", - "trace, debug, info, warn, error, fatal, any.") do |level| + "trace, debug, info, warn, error, fatal.") do |level| @options[:log] =...
1
# frozen_string_literal: true # Note this file includes very few 'requires' because it expects to be used from the CLI. require 'optparse' module Bolt class BoltOptionParser < OptionParser PROJECT_PATHS = %w[project].freeze OPTIONS = { inventory: %w[targets query rerun], authentication: %w[...
1
18,720
I think this also needs to be removed from `resources/bolt_bash_completion.sh`, `rakelib/pwsh.rake`, `lib/bolt_spec/plans.rb`, and `lib/bolt/config/options.rb`.
puppetlabs-bolt
rb
@@ -63,7 +63,7 @@ describe 'PasswordResetsController' do account.update_attribute(:email, 'ThisIsMyAddress@MyDomain.com') assert_difference(['ActionMailer::Base.deliveries.size'], 1) do - post :create, password_reset: {email: account.email.downcase} + post :create, password_reset: { email:...
1
require 'test_helper' describe 'PasswordResetsController' do let(:token) { SecureRandom.hex(16) } let(:original_password) { Faker::Internet.password } let(:account) do create(:account, reset_password_tokens: { token => Time.current + 1.hour }, password: original_password, password_confir...
1
8,379
I fixed this today with a direct push to master. My build was failing otherwise.
blackducksoftware-ohloh-ui
rb
@@ -0,0 +1,16 @@ +/** + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package net.sourceforge.pmd.autofix.rule; + +import net.sourceforge.pmd.autofix.RuleViolationFix; +import net.sourceforge.pmd.lang.ast.Node; + +public class DeleteRuleViolationFix implements RuleViolationFix {...
1
1
13,446
not sure why this is in a "rule" child package from the interface...
pmd-pmd
java
@@ -19,12 +19,14 @@ class Folder extends BaseItem { return { id: null, title: '', + icon: '', }; } static fieldToLabel(field) { const fieldsToLabels = { title: _('title'), + icon: _('icon'), last_note_user_updated_time: _('updated date'), };
1
const BaseModel = require('lib/BaseModel.js'); const { time } = require('lib/time-utils.js'); const Note = require('lib/models/Note.js'); const { Database } = require('lib/database.js'); const { _ } = require('lib/locale.js'); const BaseItem = require('lib/models/BaseItem.js'); const { substrWithEllipsis } = require('l...
1
11,706
Not needed, please remove.
laurent22-joplin
js
@@ -66,7 +66,7 @@ static h2o_iovec_t rewrite_location(h2o_mem_pool_t *pool, const char *location, goto NoRewrite; if (loc_parsed.scheme != &H2O_URL_SCHEME_HTTP) goto NoRewrite; - if (!h2o_lcstris(loc_parsed.host.base, loc_parsed.host.len, match->host.base, match->host.len)) + if (!h2o_url_c...
1
/* * Copyright (c) 2014,2015 DeNA Co., Ltd., Kazuho Oku, Masahiro Nagano * * 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...
1
11,809
Shouldn't the logic be: * the result is a mismatch if either is a unix path but the other is not * if both are unix paths, then perform case-sensitive comparison * if both are not unix paths, then perform case-insensitive comparison
h2o-h2o
c
@@ -11,6 +11,6 @@ import ( _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2" _ "github.com/shurcooL/vfsgen" - _ "google.golang.org/protobuf/cmd/protoc-gen-go" _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" + _ "google.gola...
1
// +build tools // This package tracks build dependencies so they are not removed when `go mod tidy` is run. // https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module package tools import ( _ "github.com/bufbuild/buf/cmd/protoc-gen-buf-check-lint" _ "github.com/envoyproxy/protoc-ge...
1
10,222
This is just rearranging it alphabetically
lyft-clutch
go
@@ -798,6 +798,7 @@ def test_chromium_version_unpatched(qapp): assert version._chromium_version() not in ['', 'unknown', 'unavailable'] +# pylint: disable=too-many-locals @pytest.mark.parametrize(['git_commit', 'frozen', 'style', 'with_webkit', 'known_distribution'], [ (True, F...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
1
17,531
I think this disables it for the rest of the file - you should be able to use it inside of the function instead.
qutebrowser-qutebrowser
py
@@ -61,9 +61,9 @@ final class MediaExtension extends AbstractExtension } /** - * @param MediaInterface $media - * @param string $format - * @param array $options + * @param MediaInterface|int|string $media + * @param string $format + * @param 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\Twig\Exte...
1
11,999
this could receive the MediaInterface directly or an identifier, it is correct to type it with int|string? or just use mixed?
sonata-project-SonataMediaBundle
php
@@ -89,4 +89,15 @@ final class MultiLeafFieldComparator implements LeafFieldComparator { } } + @Override + public Object leafValue(int docID) throws IOException { + Object[] valuesArray = new Object[comparators.length]; + + for (int i = 0; i < comparators.length; i++) { + valuesArray[i] = compara...
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
30,168
Why not return `Object[]`?
apache-lucene-solr
java
@@ -46,12 +46,14 @@ public class GenericManifestFile private String manifestPath = null; private Long length = null; private int specId = -1; + private long sequenceNumber = 0; + private long minSequenceNumber = 0; private Long snapshotId = null; private Integer addedFilesCount = null; - private Long ...
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
19,095
Looks like we are trying to match the new ordering of fields in `ManifestFile`. Earlier, we co-located `...FilesCount` with `...RowsCount` to match the ordering of methods in `ManifestFile` and args in constructors. Is this change intentional?
apache-iceberg
java
@@ -933,11 +933,13 @@ void Monster::onThinkDefense(uint32_t interval) Monster* summon = Monster::createMonster(summonBlock.name); if (summon) { const Position& summonPos = getPosition(); - - addSummon(summon); - + summon->setDropLoot(false); + summon->setLossSkill(false); + summon->setMaster(th...
1
/** * The Forgotten Server - a free and open-source MMORPG server emulator * Copyright (C) 2017 Mark Samman <mark.samman@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; eithe...
1
14,260
You're already setting drop loot to false just above.
otland-forgottenserver
cpp
@@ -20,6 +20,7 @@ type Management struct { listenerShutdownStarted chan bool listenerShutdownWaiter sync.WaitGroup + once sync.Once } type ManagementMiddleware interface {
1
package openvpn import ( "bufio" "net" "net/textproto" "sync" "time" log "github.com/cihub/seelog" ) // https://openvpn.net/index.php/open-source/documentation/miscellaneous/79-management-interface.html type Management struct { socketAddress string logPrefix string lineReceiver chan string middlewares...
1
10,465
`once` is very generic and doesn't specify it's purpose - `closeOnce`?
mysteriumnetwork-node
go
@@ -79,7 +79,7 @@ public class HiveTableBaseTest extends HiveMetastoreTest { return getTableLocationPath(tableName).toString(); } - private static String metadataLocation(String tableName) { + protected static String metadataLocation(String tableName) { return Paths.get(getTableBasePath(tableName), "me...
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
44,618
Why did this need to change from `private`? Oh for the test below. And this is only a test class too.
apache-iceberg
java
@@ -0,0 +1,7 @@ +require 'test_helper' + +class NotificationAcknowledgementTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end
1
1
17,616
Should test the `has?` method here
DMPRoadmap-roadmap
rb
@@ -78,7 +78,18 @@ final class SavedSearchesTest extends \VuFindTest\Integration\MinkTestCase public function testSaveSearch() { $page = $this->performSearch('test'); - $this->clickCss($page, '.fa.fa-save'); + $links = $page->findAll('css', '.searchtools a'); + $saveLink = null; ...
1
<?php /** * Mink saved searches test class. * * PHP version 7 * * Copyright (C) Villanova University 2011. * * 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 progra...
1
31,917
I think you want to be asserting/clicking $saveLink, not $link.
vufind-org-vufind
php
@@ -95,6 +95,7 @@ def sensor( def asset_sensor( asset_key: AssetKey, pipeline_name: Optional[str] = None, + target_name: Optional[str] = None, name: Optional[str] = None, solid_selection: Optional[List[str]] = None, mode: Optional[str] = None,
1
import inspect from functools import update_wrapper from typing import TYPE_CHECKING, Callable, Generator, List, Optional, Sequence, Union from dagster import check from dagster.core.definitions.sensor import RunRequest, SensorDefinition, SkipReason from dagster.core.errors import DagsterInvariantViolationError from ...
1
15,802
We don't have `target_name` on `@sensor` - why introduce it for `@asset_sensor`? If we do want to introduce it everywhere, can we just call it `job_name` to avoid introducing a new term?
dagster-io-dagster
py
@@ -0,0 +1,9 @@ +using System.Collections.Generic; + +namespace Microsoft.DotNet.Build.Tasks.Feed +{ + public class SleetSettings + { + public List<SleetSource> Sources { get; set; } + } +}
1
1
13,794
Missing copyright header (+other new files).
dotnet-buildtools
.cs
@@ -104,12 +104,7 @@ class TypeToSparkType extends TypeUtil.SchemaVisitor<DataType> { throw new UnsupportedOperationException( "Spark does not support time fields"); case TIMESTAMP: - Types.TimestampType timestamp = (Types.TimestampType) primitive; - if (timestamp.shouldAdjust...
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
34,280
Could we do the flag check here as well to check whether or not we have enabled the "Handle without timezone" flag here as well? We may be using this not on the read path (like in the migrate/snapshot code) and it would be good to catch it here as well and make sure users know what is happening.
apache-iceberg
java
@@ -2,7 +2,7 @@ import os from typing import Dict, List from dagster import SensorDefinition -from dagster.core.definitions.pipeline_sensor import PipelineFailureSensorContext +from dagster.core.definitions.pipeline_definition_definition_sensor import PipelineFailureSensorContext from dagster_slack import make_sla...
1
import os from typing import Dict, List from dagster import SensorDefinition from dagster.core.definitions.pipeline_sensor import PipelineFailureSensorContext from dagster_slack import make_slack_on_pipeline_failure_sensor from hacker_news_assets.utils.slack_message import build_slack_message_blocks def slack_messag...
1
16,491
why is the file named `pipeline_definition_definition_sensor`?
dagster-io-dagster
py
@@ -6,6 +6,10 @@ _ts = None def init_timescale_connection(logger, conf): global _ts + + if not conf["SQLALCHEMY_TIMESCALE_URI"]: + return None + while True: try: _ts = TimescaleListenStore(conf, logger)
1
import time from listenbrainz.listenstore import TimescaleListenStore _ts = None def init_timescale_connection(logger, conf): global _ts while True: try: _ts = TimescaleListenStore(conf, logger) break except Exception as e: logger.error("Couldn't create Tim...
1
18,725
None not needed, can just be `return`. not important for this release
metabrainz-listenbrainz-server
py
@@ -104,7 +104,12 @@ const topPageTemplate = ` <div class="g-recaptcha" data-sitekey="{{.RecaptchaSiteKey}}"> </div> <div> - <input id="target" placeholder="target address"> + The dispensed Algos have no monetary value and should only be used to test applications. + <p>This service is grac...
1
// Copyright (C) 2019-2021 Algorand, Inc. // This file is part of go-algorand // // go-algorand is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) ...
1
42,051
I think it's missing closing `</p>` tags in line 108 and 109 unless they don't matter...
algorand-go-algorand
go
@@ -579,10 +579,12 @@ public abstract class ProcessEngineConfigurationImpl extends ProcessEngineConfig protected ScriptingEnvironment scriptingEnvironment; protected List<ScriptEnvResolver> scriptEnvResolvers; protected ScriptFactory scriptFactory; + protected String scriptEngineNameJavaScript; protected b...
1
/* * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH * under one or more contributor license agreements. See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. Camunda licenses this file to you under the Apache License, * Version 2.0; y...
1
11,934
So it seems that loading a script file from the classpath needs to be enabled explicitly now since this is `false` by default. Is it possible to enable this via the YAML config file in a Camunda Platform Run distribution?
camunda-camunda-bpm-platform
java
@@ -5,8 +5,7 @@ const config = require('@purest/providers') const dropbox = require('./dropbox') const drive = require('./drive') -const instagram = require('./instagram') -const instagramGraph = require('./instagram/graph') +const instagram = require('./instagram/graph') const facebook = require('./facebook') con...
1
/** * @module provider */ // @ts-ignore const config = require('@purest/providers') const dropbox = require('./dropbox') const drive = require('./drive') const instagram = require('./instagram') const instagramGraph = require('./instagram/graph') const facebook = require('./facebook') const onedrive = require('./oned...
1
13,435
can we delete any code in the provider implementation? i imagine the entire thing is unused now?
transloadit-uppy
js
@@ -148,6 +148,7 @@ func wrapErrorWithClusterIssuerStatusCondition(client clientset.ClusterIssuerInt // WaitForCertificateCondition waits for the status of the named Certificate to contain // a condition whose type and status matches the supplied one. +// Deprecated: this function is not used anymore func WaitForC...
1
/* Copyright 2020 The cert-manager 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
28,828
I suggest we remove all these unused functions. I don't expect any external projects to be importing packages from `cert-manager/test/...`
jetstack-cert-manager
go
@@ -150,15 +150,10 @@ void DataManWriter::MetadataThread(const std::string &address) while (m_Listening) { auto request = tpm.ReceiveRequest(); - if (request == nullptr) + if (request && request->size() > 0) { - continue; - } - if (request->size() >= 0)...
1
/* * Distributed under the OSI-approved Apache License, Version 2.0. See * accompanying file Copyright.txt for details. * * DataMan.cpp * * Created on: Jan 10, 2017 * Author: wfg */ #include "DataManWriter.h" #include "DataManWriter.tcc" #include <iostream> #include "adios2/ADIOSMacros.h" #include "ad...
1
12,860
Looks like the template argument doesn't resolve by default so you need `std::lock_guard<std::mutex> lck`
ornladios-ADIOS2
cpp
@@ -128,12 +128,6 @@ public final class ArrayCreationLevel extends Node implements NodeWithAnnotation return this; } - @Override - @Generated("com.github.javaparser.generator.core.node.GetNodeListsGenerator") - public List<NodeList<?>> getNodeLists() { - return Arrays.asList(getAnnotatio...
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,517
Are we removing this public method? Could it be useful to someone? Maybe we could implement it once in Node using the metamodel
javaparser-javaparser
java
@@ -47,6 +47,10 @@ class Plan < ActiveRecord::Base self == self.class.popular end + def includes_exercises? + sku != THE_WEEKLY_ITERATION_SKU + end + def subscription_interval stripe_plan.interval end
1
class Plan < ActiveRecord::Base PRIME_249_SKU = "prime-249" PROFESSIONAL_SKU = "professional" THE_WEEKLY_ITERATION_SKU = "the-weekly-iteration" has_many :checkouts has_many :subscriptions, as: :plan belongs_to :annual_plan, class_name: "Plan" validates :description, presence: true validates :price, pr...
1
14,034
I think this method is unused now?
thoughtbot-upcase
rb
@@ -115,6 +115,11 @@ func run(o *Options) error { appliedToGroupStore, networkPolicyStore) + var networkPolicyStatusController *networkpolicy.StatusController + if features.DefaultFeatureGate.Enabled(features.AntreaPolicy) { + networkPolicyStatusController = networkpolicy.NewStatusController(crdClient, network...
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
26,985
I know we discussed this before and decided to reuse the AntreaPolicy gate. But do you think realization status will introduce much overhead or not?
antrea-io-antrea
go
@@ -0,0 +1,11 @@ +package constants + +const ( + RunController = "cd ${GOPATH}/src/github.com/kubeedge/kubeedge/cloud/; sudo nohup ./edgecontroller > edgecontroller.log 2>&1 &" + RunEdgecore = "cd ${GOPATH}/src/github.com/kubeedge/kubeedge/edge/; sudo nohup ./edge_core > edge_core.log 2>&1 &" + RunEdgeSite = "cd ${...
1
1
11,398
please add a blank line at the end of this file. Applicable to similar cases below
kubeedge-kubeedge
go
@@ -203,6 +203,9 @@ public class RegistrationRequest { if (pendingConfiguration.port != null) { pendingRequest.configuration.port = pendingConfiguration.port; } + if (pendingConfiguration.remoteHost != null) { + pendingRequest.configuration.remoteHost = pendingConfiguration.remoteHost; + } ...
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
15,979
This is not really needed, the line added in `GridNodeConfiguration.java` is what really fixes the `remoteHost` regression.
SeleniumHQ-selenium
java
@@ -588,6 +588,10 @@ class JoinQuery extends Query { // use the filterCache to get a DocSet if (toTermsEnum.docFreq() >= minDocFreqTo || resultBits == null) { // use filter cache + if (! toSearcher.getFilterCache().isAsync()) { + throw new SolrExcepti...
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
41,007
filterCache can be null
apache-lucene-solr
java