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
@@ -119,7 +119,7 @@ type Node struct { // Incoming messages for block mining. MsgPool *core.MessagePool // Messages sent and not yet mined. - Outbox *core.MessageQueue + MsgQueue *core.MessageQueue Wallet *wallet.Wallet
1
package node import ( "context" "encoding/json" "fmt" "os" "sync" "time" ps "github.com/cskr/pubsub" "github.com/ipfs/go-bitswap" bsnet "github.com/ipfs/go-bitswap/network" bserv "github.com/ipfs/go-blockservice" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" "github.com/ipfs/go-hamt-ipld" bsto...
1
19,320
I'll replace this with the actual outbox object soon.
filecoin-project-venus
go
@@ -218,6 +218,9 @@ class AnnotationTest extends TestCase */ public function providerValidCodeParse(): iterable { + $codebase = $this->project_analyzer->getCodebase(); + $codebase->reportUnusedVariables(); + return [ 'nopType' => [ '<?php
1
<?php namespace Psalm\Tests; use Psalm\Config; use Psalm\Context; use const DIRECTORY_SEPARATOR; class AnnotationTest extends TestCase { use Traits\InvalidCodeAnalysisTestTrait; use Traits\ValidCodeAnalysisTestTrait; public function testPhpStormGenericsWithValidArrayIteratorArgument(): void { ...
1
10,978
Providers are called *before* `setUp()`, so I don't think you can access properties here.
vimeo-psalm
php
@@ -11,7 +11,7 @@ namespace Xunit /// Apply this attribute to your test method to specify an active issue. /// </summary> [TraitDiscoverer("Xunit.NetCore.Extensions.ActiveIssueDiscoverer", "Xunit.NetCore.Extensions")] - [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] + [AttributeUsa...
1
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using Xunit.Sdk; namespace Xunit { /// <summary> /// Apply this attribute to your test method...
1
12,791
While this allows it to be applied does it correctly cause the entire class to be skipped?
dotnet-buildtools
.cs
@@ -143,6 +143,11 @@ def main(): if args.seed is not None: logger.info(f'Set random seed to {args.seed}, ' f'deterministic: {args.deterministic}') + + # import torch.distributed as dist + # rank = dist.get_rank() + # args.seed = args.seed + rank + set_ran...
1
import argparse import copy import os import os.path as osp import time import warnings import mmcv import torch from mmcv import Config, DictAction from mmcv.runner import init_dist from mmcv.utils import get_git_hash from mmdet import __version__ from mmdet.apis import set_random_seed, train_detector from mmdet.dat...
1
21,641
clean unnecessary modification.
open-mmlab-mmdetection
py
@@ -44,8 +44,8 @@ describe('createElement(jsx)', () => { }); it('should set VNode#key property', () => { - expect(<div />).to.have.property('key').that.is.undefined; - expect(<div a="a" />).to.have.property('key').that.is.undefined; + expect(<div />).to.have.property('key').that.is.empty; + expect(<div a="a" ...
1
import { createElement } from '../../'; import { expect } from 'chai'; const h = createElement; /** @jsx createElement */ /*eslint-env browser, mocha */ // const buildVNode = (nodeName, attributes, children=[]) => ({ // nodeName, // children, // attributes, // key: attributes && attributes.key // }); describe('c...
1
14,732
I think these assertions want to be `.to.not.exist` which would pass for `null` or `undefined`
preactjs-preact
js
@@ -24,11 +24,9 @@ import ( ) func ExampleOpenKeeper() { - // This example is used in https://gocloud.dev/howto/secrets/#vault-ctor - - // import _ "gocloud.dev/secrets/hashivault" - - // Variables set up elsewhere: + // PRAGMA(gocloud.dev): Package this example for gocloud.dev. + // PRAGMA(gocloud.dev): Add a blan...
1
// Copyright 2019 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,590
Don't think you need this since this is not a URL example.
google-go-cloud
go
@@ -43,6 +43,14 @@ class TestFakerNumber < Test::Unit::TestCase assert @tester.decimal(l_digits: 4, r_digits: 5).to_s.match(/[0-9]{4}\.[0-9]{5}/) end + def test_decimal_within + assert @tester.decimal_within(l_digits: 1, r_digits: 1, range: 0..1).to_s.match(/[0-1]{1}\.[0-1]{1}/) + assert @tester.decima...
1
# frozen_string_literal: true require_relative '../../test_helper' require 'minitest/mock' class TestFakerNumber < Test::Unit::TestCase def setup @tester = Faker::Number end def test_leading_zero_number assert_match(/^0[0-9]{9}/, @tester.leading_zero_number) assert_match(/^0[0-9]{8}/, @tester.leadi...
1
9,806
Maybe a test to check if the generated value is within the boundaries would be nice, what do you think?
faker-ruby-faker
rb
@@ -12,7 +12,7 @@ namespace AutoRest.Core.Utilities { public void WriteFile(string path, string contents) { - File.WriteAllText(path, contents, Encoding.UTF8); + File.WriteAllText(path, contents, new UTF8Encoding(false, true)); } /// <summary>
1
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using System; using System.IO; using System.Net; using System.Text; namespace AutoRest.Core.Utilities { public class FileSystem : IFileSystem { ...
1
23,378
Suppresses UTF-8 BOM in outputs
Azure-autorest
java
@@ -65,10 +65,10 @@ type Config struct { Inbounds Inbounds Outbounds Outbounds - // Filter and Interceptor that will be applied to all outgoing and incoming - // requests respectively. - Filter transport.Filter - Interceptor transport.Interceptor + // Inbound and Outbound Middleware that will be applied to ...
1
// Copyright (c) 2016 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
11,381
order wrong for "outgoing and incoming"
yarpc-yarpc-go
go
@@ -43,6 +43,7 @@ public class MemoryCircuitBreaker extends CircuitBreaker { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); private static final MemoryMXBean MEMORY_MX_BEAN = ManagementFactory.getMemoryMXBean(); + private boolean isMemoryCircuitBreakerEnabled; ...
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
36,273
We know it's a boolean and it's in the MemoryCircuitBreaker, why not simply call it `enabled` (like many other Solr plugins do)?
apache-lucene-solr
java
@@ -0,0 +1,5 @@ +class AddIncludesTeamToIndividualPlans < ActiveRecord::Migration + def change + add_column :individual_plans, :includes_team, :boolean, default: false + end +end
1
1
11,356
Should team be a "feature" that can be "included" or a type? In code it seems to me that a `team` flag makes sense.
thoughtbot-upcase
rb
@@ -172,6 +172,9 @@ type OutputInfo struct { } func (i *InputParams) updateParams(p *string) { + logParamsMutex.Lock() + defer logParamsMutex.Unlock() + if p == nil { return }
1
// Copyright 2019 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
9,585
Why is this called update params when it's updating project info? Should p called project?
GoogleCloudPlatform-compute-image-tools
go
@@ -44,7 +44,8 @@ const ( // below are templates for history_tree table addHistoryTreeQuery = `INSERT INTO history_tree (` + `shard_id, tree_id, branch_id, data, data_encoding) ` + - `VALUES (:shard_id, :tree_id, :branch_id, :data, :data_encoding) ` + `VALUES (:shard_id, :tree_id, :branch_id, :data, :data_enco...
1
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Soft...
1
10,912
`upsertHistoryTreeQuery` is a better name for this query now. Is it ok to change history?
temporalio-temporal
go
@@ -33,8 +33,12 @@ namespace Nethermind.Core } string date = DateTime.Now.ToString("yyyyMMdd"); string gitTag = File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "git-hash")) ? File.ReadAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "git-hash")).Trim().R...
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 ...
1
23,016
b did not mean branch - it meant the next version - so probably better to be able to release from a tag on the branch so we can create a hotfix branch of the 1.4.1 tag and tag it 1.4.1b and then version is picked as 1.4.1b
NethermindEth-nethermind
.cs
@@ -9,7 +9,6 @@ * Created on: Jul 26, 2017 * Author: William F Godoy godoywf@ornl.gov */ -#include <mpi.h> #include <ios> //std::ios_base::failure #include <iostream> //std::cout
1
/* * Distributed under the OSI-approved Apache License, Version 2.0. See * accompanying file Copyright.txt for details. * * helloBPSZWrapper.cpp: Simple self-descriptive example of how to write a * variable to a BP File that lives in several MPI processes and is compressed * with SZ http://www.bzip.org/ * * C...
1
12,065
Keep the mpi.h include, just move it to after adios2.h and guard with the ifdef. Otherwise everything else looks good.
ornladios-ADIOS2
cpp
@@ -72,8 +72,12 @@ type Config struct { // bind mounts are writtable. Readonlyfs bool `json:"readonlyfs"` - // Privatefs will mount the container's rootfs as private where mount points from the parent will not propogate - Privatefs bool `json:"privatefs"` + // RootfsMountMode is the rootfs mount propagation mode....
1
package configs type Rlimit struct { Type int `json:"type"` Hard uint64 `json:"hard"` Soft uint64 `json:"soft"` } // IDMap represents UID/GID Mappings for User Namespaces. type IDMap struct { ContainerID int `json:"container_id"` HostID int `json:"host_id"` Size int `json:"size"` } type Seccomp ...
1
6,865
Shouldn't this be something like `rootmountmode` to fit the pattern of the other fields' serialized representations?
opencontainers-runc
go
@@ -747,9 +747,7 @@ void Cuda::impl_initialize(const Cuda::SelectDevice config, size_t /*num_instances*/) { Impl::CudaInternal::singleton().initialize(config.cuda_device_id, 0); -#if defined(KOKKOS_ENABLE_PROFILING) Kokkos::Profiling::initialize(); -#endif } std::vector<unsigned>...
1
/* //@HEADER // ************************************************************************ // // Kokkos v. 3.0 // Copyright (2020) National Technology & Engineering // Solutions of Sandia, LLC (NTESS). // // Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Govern...
1
23,667
Why were we initializing here in the first place?
kokkos-kokkos
cpp
@@ -0,0 +1,7 @@ +namespace MvvmCross.Core.Platform.LogProviders +{ + internal sealed class NullLogProvider : MvxBaseLogProvider + { + protected override Logger GetLogger(string name) => new Logger((logLevel, messageFunc, exception, formatParameters) => true); + } +}
1
1
13,437
This should be removed, and instead set the logger to None.
MvvmCross-MvvmCross
.cs
@@ -49,7 +49,7 @@ function UndoRedo(instance) { return; } - var originalData = plugin.instance.getSourceDataArray(); + var originalData = plugin.instance.getSourceData(); index = (originalData.length + index) % originalData.length;
1
/** * Handsontable UndoRedo class */ import Hooks from './../../pluginHooks'; import {arrayMap} from './../../helpers/array'; import {rangeEach} from './../../helpers/number'; import {inherit, deepClone} from './../../helpers/object'; import {stopImmediatePropagation} from './../../helpers/dom/event'; import {CellCoo...
1
14,170
Storing a reference to source data isn't the best choice. Maybe you can find a different way (without storing the reference) to save removed data?
handsontable-handsontable
js
@@ -7761,7 +7761,7 @@ void UDR::processData(UDRInvocationInfo &info, * * This method is called in debug Trafodion builds when certain * flags are set in the UDR_DEBUG_FLAGS CQD (CONTROL QUERY DEFAULT). - * See https://wiki.trafodion.org/wiki/index.php/Tutorial:_The_object-oriented_UDF_interface#Debugging_UDF_c...
1
/********************************************************************** * * File: sqludr.h * Description: Interface between the SQL engine and routine bodies * Language: C * // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agree...
1
9,028
Is the tutorial going to move to the new Trafodion website or will it stay on the Confluence wiki? (Check with Gunnar.)
apache-trafodion
cpp
@@ -55,10 +55,8 @@ func FromStatus(st *status.Status) error { switch errDetails := errDetails.(type) { case *errordetails.ShardOwnershipLostFailure: return newShardOwnershipLost(st, errDetails) - case *errordetails.RetryTaskFailure: - return newRetryTask(st, errDetails) case *errordetails.RetryTaskV2Fai...
1
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Soft...
1
10,693
maybe call it `fromRetryTaskV2Failure`
temporalio-temporal
go
@@ -16,11 +16,13 @@ package com.google.api.codegen.transformer.php; import com.google.api.codegen.InterfaceView; import com.google.api.codegen.config.FieldConfig; +import com.google.api.codegen.config.FlatteningConfig; import com.google.api.codegen.config.GapicProductConfig; import com.google.api.codegen.config.G...
1
/* Copyright 2016 Google Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
1
23,958
The diff for this class is difficult to walk through because I reorganized it to be much more clear. There are improvements throughout, but the most important are in the new `createSmokeTest.*` methods.
googleapis-gapic-generator
java
@@ -164,6 +164,12 @@ class BaseDetector(BaseModule, metaclass=ABCMeta): should be double nested (i.e. List[Tensor], List[List[dict]]), with the outer list indicating test time augmentations. """ + img_norm_cfg = kwargs.get('img_norm_cfg', None) + if img_norm_cfg: + m...
1
# Copyright (c) OpenMMLab. All rights reserved. from abc import ABCMeta, abstractmethod from collections import OrderedDict import mmcv import numpy as np import torch import torch.distributed as dist from mmcv.runner import BaseModule, auto_fp16 from mmdet.core.visualization import imshow_det_bboxes class BaseDete...
1
25,610
We suggest keeping this logic in lines between 173-175 to restrict its influence.
open-mmlab-mmdetection
py
@@ -88,7 +88,7 @@ class GridView * @param string $name * @param array $parameters * @param bool $echo - * @return string|null + * @return string|null|void */ public function renderBlock($name, array $parameters = [], $echo = true) {
1
<?php namespace Shopsys\FrameworkBundle\Component\Grid; use Symfony\Component\Form\FormView; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\RouterInterface; use Twig_Environment; class GridView { /** * @var \Sho...
1
16,304
why not ? maybe another phpstan plugin
shopsys-shopsys
php
@@ -37,14 +37,16 @@ namespace Nethermind.JsonRpc.Modules.Trace private readonly ITracer _tracer; private readonly IBlockFinder _blockFinder; private readonly TransactionDecoder _txDecoder = new TransactionDecoder(); - private readonly CancellationToken _cancellationToken; + pri...
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 ...
1
24,232
That was a really bad CR from me before if I did not spot it.
NethermindEth-nethermind
.cs
@@ -203,7 +203,15 @@ EOF echo "$FORSETI_ENV" > $USER_HOME/forseti_env.sh USER=ubuntu -(echo "{run_frequency} $FORSETI_HOME/setup/gcp/scripts/run_forseti.sh") | crontab -u $USER - + +# Use flock to prevent rerun of the same cron job when the previous job is still running. +# If the lock file does not exist under the...
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
30,131
Does this resolve the scenario when the user-triggered forseti process is running, and it would be killed by the cron job restarting the server?
forseti-security-forseti-security
py
@@ -157,7 +157,6 @@ func (ops *OpStream) Intc(constIndex uint) { } else { ops.trace("intc %d %d", constIndex, ops.intc[constIndex]) } - ops.tpush(StackUint64) } // Uint writes opcodes for loading a uint literal
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
41,748
Does this happen somewhere else now?
algorand-go-algorand
go
@@ -749,7 +749,8 @@ import browser from './browser'; } // Support H264 Level 52 (Tizen 5.0) - app only - if (browser.tizenVersion >= 5 && window.NativeShell) { + if ((browser.tizenVersion >= 5 && window.NativeShell) || + videoTestElement.canPlayType('video/mp4; codecs="avc1....
1
import appSettings from './settings/appSettings'; import * as userSettings from './settings/userSettings'; import browser from './browser'; /* eslint-disable indent */ function canPlayH264(videoTestElement) { return !!(videoTestElement.canPlayType && videoTestElement.canPlayType('video/mp4; codecs="avc1.42...
1
19,849
Remove trailing space at this line, amend the commit, and then force-push.
jellyfin-jellyfin-web
js
@@ -21,6 +21,8 @@ import ( "testing" "time" + "go.opentelemetry.io/api/trace" + "google.golang.org/grpc/codes" "go.opentelemetry.io/api/core"
1
// Copyright 2019, 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 ag...
1
10,209
This should be grouped together with the import of "go.opentelemetry.io/{api/core,sdk/export}" below.
open-telemetry-opentelemetry-go
go
@@ -66,10 +66,14 @@ REQUIREMENTS_MAP = { {'module_name': 'instance_network_interface_scanner', 'class_name': 'InstanceNetworkInterfaceScanner', 'rules_filename': 'instance_network_interface_rules.yaml'}, + 'ke_scanner': + {'module_name': 'ke_scanner', + 'class_name': 'KeSc...
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
31,696
What's the impact to people upgrading to the new version? If they don't change their file names, they'll suddenly be broken. While I agree that your naming makes more intuitive sense, I think we need to maintain backwards compatibility. Please choose a new rules file name for the new scanner and keep ke_rules.yaml for ...
forseti-security-forseti-security
py
@@ -698,7 +698,7 @@ class InternalFrame(object): index_spark_columns = self.index_spark_columns return index_spark_columns + [ spark_column - for label, spark_column in zip(self.column_labels, self.data_spark_columns) + for spark_column in self.data_spark_columns ...
1
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
1
15,395
Shall we add some docstrings clearly to describe when to use which clearly? For example, `spark_frame` now should always be used via `df._internal.applied.spark_frame` for Spark DataFrame APIs that internally creates new query execution plan with the different output length. For expressions and/or functions, `df._inter...
databricks-koalas
py
@@ -54,8 +54,8 @@ class DataFrame(_Frame): Dict can contain Series, arrays, constants, or list-like objects If data is a dict, argument order is maintained for Python 3.6 and later. - Note that if `data` is a Pandas DataFrame other arguments are ignored. - If data is a Spark Dat...
1
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
1
9,017
nit: `.` at the end of line?
databricks-koalas
py
@@ -2012,7 +2012,16 @@ public class MessageListFragment extends Fragment implements OnItemClickListener private void updateFooterView() { if (!mSearch.isManualSearch() && mCurrentFolder != null && mAccount != null) { - if (mCurrentFolder.loading) { + int msg=100; + try {...
1
package com.fsck.k9.fragment; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.EnumMap; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util....
1
14,045
I'm not sure I agree that this should take priority over "Loading".
k9mail-k-9
java
@@ -237,8 +237,6 @@ class PySparkTask(SparkSubmitTask): # Path to the pyspark program passed to spark-submit app = os.path.join(os.path.dirname(__file__), 'pyspark_runner.py') - # Python only supports the client deploy mode, force it - deploy_mode = "client" @property def name(self):
1
# -*- coding: utf-8 -*- # # Copyright 2012-2015 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...
1
17,307
Was this an intentional deletion? Why not just allow overwrite of `deploy_mode`?
spotify-luigi
py
@@ -168,7 +168,16 @@ func (c *CStorVolumeReplicaController) syncHandler( // Synchronize cstor volume total allocated and // used capacity fields on CVR object. // Any kind of sync activity should be done from here. - c.syncCvr(cvrGot) + err = c.syncCvr(cvrGot) + if err != nil { + c.recorder.Event( + cvrGot, + ...
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
18,279
better to call it as syncCVRStatus.. just syncCVR is very confusing
openebs-maya
go
@@ -29,11 +29,14 @@ var ( errAppDeleteCancelled = errors.New("app delete cancelled - no changes made") ) -type deleteAppOpts struct { - // Flags or arguments that are user inputs. +type deleteAppVars struct { *GlobalOpts SkipConfirmation bool AppName string +} + +type deleteAppOpts struct { + delete...
1
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli import ( "errors" "fmt" "github.com/aws/amazon-ecs-cli-v2/internal/pkg/archer" "github.com/aws/amazon-ecs-cli-v2/internal/pkg/aws/ecr" "github.com/aws/amazon-ecs-cli-v2/internal/pkg/aws/...
1
11,910
should we make this not a pointer? so that when we embed the struct a copy is made instead of modifying the original object.
aws-copilot-cli
go
@@ -99,9 +99,9 @@ class BaseWebTest(object): def get_app_settings(self, additional_settings=None): settings = DEFAULT_SETTINGS.copy() - settings['storage_backend'] = 'kinto.core.storage.redis' - settings['cache_backend'] = 'kinto.core.cache.redis' - settings['permission_backend'] = ...
1
from collections import defaultdict import mock import os import threading import functools try: import unittest2 as unittest except ImportError: import unittest # NOQA import webtest from cornice import errors as cornice_errors from pyramid.url import parse_url_overrides from pyramid.security import IAutho...
1
9,655
Does this mean that `kinto_redis` is required to run tests?
Kinto-kinto
py
@@ -475,7 +475,7 @@ function mergeBatchResults(batch, bulkResult, err, result) { if (Array.isArray(result.writeErrors)) { for (let i = 0; i < result.writeErrors.length; i++) { const writeError = { - index: batch.originalZeroIndex + result.writeErrors[i].index, + index: batch.originalIndexes...
1
'use strict'; const Long = require('../core').BSON.Long; const MongoError = require('../core').MongoError; const ObjectID = require('../core').BSON.ObjectID; const BSON = require('../core').BSON; const MongoWriteConcernError = require('../core').MongoWriteConcernError; const toError = require('../utils').toError; cons...
1
16,858
will this ensure the indexes for ordered writes as well?
mongodb-node-mongodb-native
js
@@ -28,7 +28,11 @@ from nupic.support.lockattributes import LockAttributesMixin import functools basicTypes = ['Byte', 'Int16', 'UInt16', 'Int32', 'UInt32', 'Int64', 'UInt64', - 'Real32', 'Real64', 'Handle'] + 'Real32', 'Real64', 'Handle', 'Bool'] + +arrayTypes = ['ByteArray', 'Int16Array'...
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,687
Put `BoolArray` first?
numenta-nupic
py
@@ -0,0 +1,3 @@ +window.appMode = 'standalone'; + +import('./site');
1
1
17,790
I believe this whole file can be deleted now.
jellyfin-jellyfin-web
js
@@ -34,6 +34,17 @@ var ( Usage: "Port for listening incoming api requests", Value: 4050, } + + promiseCurrencyFlag = cli.StringFlag{ + Name: "promise.currency", + Usage: "Type of currency that will be used for issuing promises", + Value: "MYST", + } + promiseAmountFlag = cli.IntFlag{ + Name: "promise.amou...
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
11,837
We should specify format for a user. I.e: Integer, 1000 == 1 MYST
mysteriumnetwork-node
go
@@ -132,6 +132,12 @@ func runControllers(ctx context.Context, config *Config) error { } } + for _, controller := range config.Controllers { + if err := controller(ctx, sc); err != nil { + return errors.Wrap(err, "controller") + } + } + if err := sc.Start(ctx); err != nil { return err }
1
package server import ( "context" "crypto/sha256" "encoding/hex" "fmt" "io/ioutil" net2 "net" "os" "path" "path/filepath" "strconv" "strings" "time" corev1 "k8s.io/api/core/v1" "github.com/k3s-io/helm-controller/pkg/helm" "github.com/pkg/errors" "github.com/rancher/k3s/pkg/apiaddresses" "github.com/...
1
9,287
Does the errors returned from these controllers indicate which controller threw the error? If not, there might be some value in making the "CustomControllers" type a `map[string]func(ctx context.Context, sc *server.Context) error` with the name of the controller as the key and include the key in this error string. This...
k3s-io-k3s
go
@@ -2204,8 +2204,13 @@ CheckedError Parser::DoParse(const char *source, } uoffset_t toff; ECHECK(ParseTable(*root_struct_def_, nullptr, &toff)); - builder_.Finish(Offset<Table>(toff), - file_identifier_.length() ? file_identifier_.c_str() : nullptr); + if (opts.prefix_size)...
1
/* * Copyright 2014 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 applica...
1
12,450
maybe at least pull the file identifier arg out of the if?
google-flatbuffers
java
@@ -1028,17 +1028,13 @@ class CommandDispatcher: raise cmdexc.CommandError("Can't move tab to position {}!".format( new_idx + 1)) - tab = self._current_widget() cur_idx = self._current_index() - icon = self._tabbed_browser.tabIcon(cur_idx) - label = self._ta...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2016 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,098
You can most likely remove that (and the try/finally) too, as we shouldn't have any flickering from removing/inserting tabs anymore now.
qutebrowser-qutebrowser
py
@@ -19,12 +19,15 @@ const localHooks = { * * @param {String} key Hook name. * @param {Function} callback Hook callback + * @return {Object} */ addLocalHook(key, callback) { if (!this._localHooks[key]) { this._localHooks[key] = []; } this._localHooks[key].push(callback); + + ...
1
import {arrayEach} from './../helpers/array'; import {defineGetter} from './../helpers/object'; const MIXIN_NAME = 'localHooks'; /** * Mixin object to extend objects functionality for local hooks. * * @type {Object} */ const localHooks = { /** * Internal hooks storage. */ _localHooks: Object.create(null...
1
14,795
Could you add `s` to `@return`?
handsontable-handsontable
js
@@ -57,11 +57,10 @@ module Selenium is_relative = Regexp.last_match(1).strip == '1' when /^Path=(.+)$/ path = Regexp.last_match(1).strip + p = path_for(name, is_relative, path) + @profile_paths[name] = p if p end end - - ...
1
# encoding: utf-8 # # 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 # "Li...
1
13,901
Moving this code inside the last case statement doesn't seem right. Why are we defining `name` and `is_relative` variables there if we aren't using them anywhere?
SeleniumHQ-selenium
js
@@ -290,9 +290,16 @@ func (at *addrTable) getAddrTable(key string) *serviceTable { // filterResourceType implement filter. Proxy cares "Service" and "ServiceList" type func filterResourceType(msg model.Message) []v1.Service { svcs := make([]v1.Service, 0) - content, ok := msg.Content.([]byte) - if !ok { - return s...
1
package proxy import ( "encoding/json" "fmt" "math/rand" "net" "strconv" "strings" "sync" "syscall" "time" "github.com/kubeedge/beehive/pkg/core/model" "github.com/kubeedge/kubeedge/common/constants" "github.com/kubeedge/kubeedge/edge/pkg/metamanager/client" "github.com/kubeedge/kubeedge/edgemesh/pkg/pro...
1
14,912
Will cause any bugs without this change? I've seen this code block(L293-302) many times... ;-)
kubeedge-kubeedge
go
@@ -82,6 +82,11 @@ namespace NLog /// </summary> public LogFactory Factory { get; private set; } + /// <summary> + /// Properties added with <see cref="WithProperty"/> or <see cref="SetProperty"/> + /// </summary> + public IDictionary<string, object> Properties => _contex...
1
// // Copyright (c) 2004-2019 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // * Redistributions of s...
1
19,342
You are opening a door to race-condition-hell by returning an unprotected dictionary. I recommend that you return `IReadOnlyDictionary` that only works on the platforms where it is known.
NLog-NLog
.cs
@@ -4367,7 +4367,7 @@ describe('Cursor', function() { } ); - it('should return a promise when no callback supplied to forEach method', function(done) { + it.skip('should return a promise when no callback supplied to forEach method', function(done) { const configuration = this.configuration; const ...
1
'use strict'; const test = require('./shared').assert; const setupDatabase = require('./shared').setupDatabase; const fs = require('fs'); const expect = require('chai').expect; const Long = require('bson').Long; const sinon = require('sinon'); const Buffer = require('safe-buffer').Buffer; const Writable = require('stre...
1
17,362
also seems we should not skip this test
mongodb-node-mongodb-native
js
@@ -31,14 +31,17 @@ import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList; class BaseFileScanTask implements FileScanTask { private final DataFile file; + private final DeleteFile[] deletes; private final String schemaString; private final String specString; private final ResidualE...
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
22,713
This is mostly for my understanding: is `DeleteFile[] deletes` a mandatory builder param now for file scan tasks? If not, from a v1 / v2 compatibility standpoint would it make sense to add an overloaded constructor?
apache-iceberg
java
@@ -123,6 +123,16 @@ public class ExecutionFlowDao { } } + public List<Pair<ExecutionReference, ExecutableFlow>> fetchAgedQueuedFlows(final Duration minAge) + throws ExecutorManagerException { + try { + return this.dbOperator.query(FetchAgedQueuedExecutableFlows.FETCH_FLOWS_QUEUED_FOR_LONG_TIME,...
1
/* * Copyright 2017 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
19,604
Can the error message reflect the purpose of the query more closely? Something like "Error fetching executions queued for a long time"
azkaban-azkaban
java
@@ -60,7 +60,7 @@ func (c *CreateInstances) validate(w *Workflow) error { } // Startup script checking. - if !sourceExists(ci.StartupScript) { + if ci.StartupScript != "" && !w.sourceExists(ci.StartupScript) { return fmt.Errorf("cannot create instance: file not found: %s", ci.StartupScript) }
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
6,354
Are you making it so startup script HAS to be in sources?
GoogleCloudPlatform-compute-image-tools
go
@@ -128,7 +128,9 @@ void l2_weight_regularization::start_evaluation() { if (vals.Participating() && vals.GetLocalDevice() == El::Device::GPU && vals.RedundantRank() == i % vals.RedundantSize()) { - if (vals.LDim() == vals.LocalHeight()) { + if (vals.LocalWidth() < 1 || vals.Lo...
1
//////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2014-2016, Lawrence Livermore National Security, LLC. // Produced at the Lawrence Livermore National Laboratory. // Written by the LBANN Research Team (B. Van Essen, et al.) listed in // the CONTRIBUTORS file. <lbann-dev@l...
1
13,148
Might be more clear to just have one if statement?
LLNL-lbann
cpp
@@ -87,7 +87,7 @@ class SparkReader: try: response_handler(response) except Exception as e: - current_app.logger.error('Error in the response handler: %s, data: %s %' + current_app.logger.error('Error in the response handler: %s, data: %s' % ...
1
import json import logging import time from flask import current_app import pika import sqlalchemy import ujson from listenbrainz import utils from listenbrainz.db import stats as db_stats from listenbrainz.db import user as db_user from listenbrainz.db.exceptions import DatabaseException from listenbrainz.spark.hand...
1
19,652
remember that logger methods will do string interpolation automatically anyway, so you should be able to do `logger.error('message %s', var, exc_info=True)`
metabrainz-listenbrainz-server
py
@@ -350,6 +350,7 @@ private: void render_sync_handler_failed_default_exception_branch(t_function *tfunc); void render_sync_handler_send_exception_response(t_function *tfunc, const string &err_var); void render_service_call_structs(t_service* tservice); + void render_args_struct(t_function* tfunc); void ren...
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 ma...
1
14,443
Perhaps rename to `render_service_args_struct`?
apache-thrift
c
@@ -11,8 +11,8 @@ import ( "github.com/filecoin-project/go-filecoin/internal/pkg/cborutil" "github.com/filecoin-project/go-filecoin/internal/pkg/chain" "github.com/filecoin-project/go-filecoin/internal/pkg/consensus" + crypto2 "github.com/filecoin-project/go-filecoin/internal/pkg/crypto" "github.com/filecoin-pr...
1
package node import ( "context" bstore "github.com/ipfs/go-ipfs-blockstore" keystore "github.com/ipfs/go-ipfs-keystore" "github.com/libp2p/go-libp2p-core/crypto" "github.com/pkg/errors" "github.com/filecoin-project/go-filecoin/internal/pkg/cborutil" "github.com/filecoin-project/go-filecoin/internal/pkg/chain"...
1
22,926
clean the name
filecoin-project-venus
go
@@ -70,6 +70,13 @@ func (a BrokerMetricAssertion) Assert(client *monitoring.MetricClient) error { if err != nil { return fmt.Errorf("metric has invalid response code label: %v", ts.GetMetric()) } + + // Workarounds to reduce test flakiness caused by sender pod retry sending events (which will cause unexpecte...
1
/* 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
1
17,643
I think we would expect StatusNotFound instead of StatusForbidden?
google-knative-gcp
go
@@ -241,9 +241,11 @@ static int rexec_output (flux_subprocess_t *p, bool eof) { json_t *io = NULL; + char rankstr[64]; int rv = -1; - if (!(io = ioencode (stream, s->rank, data, len, eof))) { + snprintf (rankstr, sizeof (rankstr), "%d", s->rank); + if (!(io = ioencode ...
1
/************************************************************\ * Copyright 2018 Lawrence Livermore National Security, LLC * (c.f. AUTHORS, NOTICE.LLNS, COPYING) * * This file is part of the Flux resource manager framework. * For details, see https://github.com/flux-framework. * * SPDX-License-Identifier: LGPL-3....
1
24,731
Since this is a recurring theme, would it make sense to have an ioencode interface for it like `ioencode_rank()` that takes an integer rank like before?
flux-framework-flux-core
c
@@ -192,8 +192,10 @@ func contains(capabilities []string, capability string) bool { // object func (agent *ecsAgent) initializeResourceFields() { agent.resourceFields = &taskresource.ResourceFields{ - Control: cgroup.New(), - IOUtil: ioutilwrapper.NewIOUtil(), + Control: cgroup.New(), + IOUtil: iout...
1
// +build linux // Copyright 2017-2018 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/ // // o...
1
20,131
Is it a concern that we initialize these fields irrespective of whether resources like cgroup/volumes are enabled or not?
aws-amazon-ecs-agent
go
@@ -109,10 +109,13 @@ func NewDispatcher(cfg Config) Dispatcher { // convertOutbounds applys outbound middleware and creates validator outbounds func convertOutbounds(outbounds Outbounds, middleware OutboundMiddleware) Outbounds { - //TODO(apb): ensure we're not given the same underlying outbound for each RPC type ...
1
// Copyright (c) 2016 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
11,640
Wouldn't this be the first panic in yarpc? What do we do for transport validation? Return errors?
yarpc-yarpc-go
go
@@ -26,6 +26,7 @@ import ( type processor interface { process(ctx context.Context) error traceLogs() []string + cancel(reason string) } // processorProvider allows the processor to be determined after the pd has been inflated.
1
// Copyright 2020 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
11,422
have you envisioned other cancellation reasons?
GoogleCloudPlatform-compute-image-tools
go
@@ -395,8 +395,10 @@ final class SonataMediaExtension extends Extension implements PrependExtensionIn /** * Checks if the classification of media is enabled. * - * @param array<string, class-string> $bundles - * @param array<string, mixed> $config + * @param array<string, string> $bu...
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\Dependenc...
1
12,280
For the record, class-string is now suported by PHPStorm. Don't know if it's worth moving it to `@phpstan-param` then.
sonata-project-SonataMediaBundle
php
@@ -2085,7 +2085,10 @@ class CommandDispatcher: raise cmdexc.CommandError(str(e)) widget = self._current_widget() - widget.run_js_async(js_code, callback=jseval_cb, world=world) + try: + widget.run_js_async(js_code, callback=jseval_cb, world=world) + except Ov...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-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,896
This prevents negative IDs, but it doesn't check for too large IDs. You should probably just do the same check you do for `QWebengineScript` here as well.
qutebrowser-qutebrowser
py
@@ -18,6 +18,7 @@ const ( // Command specific flags. dockerFileFlag = "dockerfile" imageTagFlag = "tag" + awsTagsFlag = "tags" stackOutputDirFlag = "output-dir" limitFlag = "limit" followFlag = "follow"
1
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli // Long flag names. const ( // Common flags. projectFlag = "project" nameFlag = "name" appFlag = "app" envFlag = "env" appTypeFlag = "app-type" profileFlag = "profile" yesFlag ...
1
12,424
This might be very confusing. Maybe `resource-tags`? I
aws-copilot-cli
go
@@ -283,6 +283,7 @@ class DeformConvPack(DeformConv): kernel_size=self.kernel_size, stride=_pair(self.stride), padding=_pair(self.padding), + dilation=self.dilation, bias=True) self.init_offset()
1
import math import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Function from torch.autograd.function import once_differentiable from torch.nn.modules.utils import _pair, _single from mmdet.utils import print_log from . import deform_conv_cuda class DeformConvFunction(Funct...
1
19,170
We may use `_pair` to wrap `dilation`.
open-mmlab-mmdetection
py
@@ -286,15 +286,9 @@ func createLibcontainerConfig(cgroupName string, spec *specs.LinuxSpec) (*config return nil, err } config.Cgroups = c - if config.Readonlyfs { - setReadonly(config) - config.MaskPaths = []string{ - "/proc/kcore", - } - config.ReadonlyPaths = []string{ - "/proc/sys", "/proc/sysrq-trig...
1
// +build linux package main import ( "encoding/json" "fmt" "io/ioutil" "os" "path/filepath" "runtime" "strconv" "strings" "syscall" "github.com/Sirupsen/logrus" "github.com/codegangsta/cli" "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/configs" "git...
1
9,975
what's with `setReadonly`? Why we deleted it totally?
opencontainers-runc
go
@@ -121,12 +121,7 @@ CXXToken * cxxTagSetTypeField( { CXX_DEBUG_ASSERT(tag && pTypeStart && pTypeEnd,"Non null parameters are expected"); - const char * szTypeRef0; - - // "typename" is debatable since it's not really - // allowed by C++ for unqualified types. However I haven't been able - // to come up with somet...
1
/* * Copyright (c) 2016, Szymon Tomasz Stefanek * * This source code is released for free distribution under the terms of the * GNU General Public License version 2 or (at your option) any later version. * * This module contains functions for parsing and scanning C++ source files */ #include "cxx_tag.h" #inclu...
1
13,503
Currently I think this is not acceptable. I think the value should be chosen by the author of the parser. (Personally "type" is better than "typename".)
universal-ctags-ctags
c
@@ -13,6 +13,7 @@ package machine +// should not need to import the ec2 sdk here import ( "fmt"
1
// Copyright © 2018 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 ag...
1
5,952
Is this excessive?
kubernetes-sigs-cluster-api-provider-aws
go
@@ -251,7 +251,7 @@ main(int argc, char *argv[]) * sysroot, we still need a writable /etc. And to avoid race conditions * we ensure it's writable in the initramfs, before we switchroot at all. */ - if (mount ("/etc", "/etc", NULL, MS_BIND, NULL) < 0) + if (mount ("etc", "etc", NULL, M...
1
/* -*- c-file-style: "gnu" -*- * Switch to new root directory and start init. * * Copyright 2011,2012,2013 Colin Walters <walters@verbum.org> * * Based on code from util-linux/sys-utils/switch_root.c, * Copyright 2002-2009 Red Hat, Inc. All rights reserved. * Authors: * Peter Jones <pjones@redhat.com> * Jer...
1
18,555
Ohhhh I see, this change was previously having *no effect* - I had thought you meant we were doing something like bind mounting the initramfs' `/etc` as the real `/etc` but we'd clearly notice if that happened, we'd be missing all sorts of config files etc.
ostreedev-ostree
c
@@ -133,6 +133,15 @@ abstract class SnapshotProducer<ThisT> implements SnapshotUpdate<ThisT> { */ protected abstract String operation(); + /** + * A Long that write sequenceNumber in manifest-list file. + * + * @return a string operation + */ + protected Long sequenceNumber() { + return null; + }...
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
42,649
I think this needs a more specific name, like `sequenceNumberOverride`
apache-iceberg
java
@@ -39,7 +39,8 @@ module Blacklight when /::/ connection_config[:adapter].constantize else - Blacklight.const_get("#{connection_config[:adapter]}/Repository".classify) + raise "The value for :adapter was not found in the blacklight.yml config" unless connection_config.key? :adapter + Bla...
1
require 'kaminari' require 'deprecation' require 'blacklight/utils' require 'active_support/hash_with_indifferent_access' module Blacklight autoload :AbstractRepository, 'blacklight/abstract_repository' autoload :Configuration, 'blacklight/configuration' autoload :Exceptions, 'blacklight/exceptions' autoload ...
1
6,287
Ought we just raise an exception if the adapter isn't defined?
projectblacklight-blacklight
rb
@@ -5,7 +5,6 @@ var stsLegacyGlobalRegions = map[string]struct{}{ "ap-south-1": {}, "ap-southeast-1": {}, "ap-southeast-2": {}, - "aws-global": {}, "ca-central-1": {}, "eu-central-1": {}, "eu-north-1": {},
1
package endpoints var stsLegacyGlobalRegions = map[string]struct{}{ "ap-northeast-1": {}, "ap-south-1": {}, "ap-southeast-1": {}, "ap-southeast-2": {}, "aws-global": {}, "ca-central-1": {}, "eu-central-1": {}, "eu-north-1": {}, "eu-west-1": {}, "eu-west-2": {}, "eu-west-3": {}...
1
10,008
Should this have been removed? We still set the region to "aws-global" in v3model.go#L115
aws-aws-sdk-go
go
@@ -335,14 +335,15 @@ def setup_logging(config): errno=errors.ERRORS.INVALID_PARAMETERS, message='Invalid URL path.') + qs = dict(errors.request_GET(request)) request.log_context(agent=request.headers.get('User-Agent'), path=request_path, ...
1
import logging import re import warnings from datetime import datetime from dateutil import parser as dateparser from pyramid.events import NewRequest, NewResponse from pyramid.exceptions import ConfigurationError from pyramid.httpexceptions import (HTTPTemporaryRedirect, HTTPGone, ...
1
11,159
You could shorten this to `qs or None`. But why not just build a dict of parameters we want to include and only add `querystring` if there's something here, similar to the way you do in the error view?
Kinto-kinto
py
@@ -31,15 +31,9 @@ func (c *client) acquireTopologyCacheLock(ctx context.Context) { } defer conn.Close() - go func() { - <-ctx.Done() - ticker.Stop() - c.unlockAdvisoryLock(context.Background(), conn, advisoryLockId) - }() - // Infinitely try to acquire the advisory lock // Once the lock is acquired we sta...
1
package topology import ( "context" "crypto/sha256" "database/sql" "encoding/binary" "encoding/json" "time" "go.uber.org/zap" "google.golang.org/protobuf/encoding/protojson" topologyv1 "github.com/lyft/clutch/backend/api/topology/v1" "github.com/lyft/clutch/backend/service" ) const topologyCacheLockId = "...
1
9,156
sorry if I'm missing it somewhere else in the code, but do you need to create a `ticker := time.NewTicker`?
lyft-clutch
go
@@ -44,7 +44,11 @@ import ( func TestNew(t *testing.T) { ctx, _ := SetupFakeContext(t) - c := NewController(ctx, configmap.NewStaticWatcher( + dataresidencySs := &dataresidency.StoreSingleton{} + + ctor := NewConstructor(dataresidencySs) + + c := ctor(ctx, configmap.NewStaticWatcher( &corev1.ConfigMap{ Obje...
1
/* 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
1
18,026
Inline this, as we don't use it again.
google-knative-gcp
go
@@ -39,7 +39,9 @@ exclude = ["ForwardFFTImageFilter", "templated_class", "HalfHermitianToRealInverseFFTImageFilter", "RealToHalfHermitianForwardFFTImageFilter", - "CustomColormapFunction"] + "CustomColormapFunction", + "ScanlineFilterCommon" # Segfault ...
1
#========================================================================== # # Copyright Insight Software Consortium # # 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...
1
10,047
I think the instantiation of the new objects i.New() and T.New() need to be done in a function to have local variable and reduce the amount of memory used.
InsightSoftwareConsortium-ITK
py
@@ -40,6 +40,8 @@ namespace pwiz.Skyline.Model.Hibernate public const string Mz = "0.####"; public const string SamplingTime = "0.00"; public const string OneOverK0 = "0.####"; + + public const string IonMobility = "0.#####"; // ReSharper restore LocalizableElement } }
1
/* * Original author: Nick Shulman <nicksh .at. u.washington.edu>, * MacCoss Lab, Department of Genome Sciences, UW * * Copyright 2009 University of Washington - Seattle, WA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complia...
1
14,039
This is probably more digits than needed - perhaps rename OneOverK0 to IonMobility instead
ProteoWizard-pwiz
.cs
@@ -25,5 +25,8 @@ public enum ApiMethodType { CallableMethod, // PHP OptionalArrayMethod, - PagedOptionalArrayMethod + PagedOptionalArrayMethod, + // C# + FlattenedMethodAsyncCallSettings, + FlattenedMethodAsyncCancellationToken, }
1
/* Copyright 2016 Google Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
1
17,747
End with 'Method', so: - FlattenedAsyncCallSettingsMethod - FlattenedAsyncCancellationTokenMethod
googleapis-gapic-generator
java
@@ -22,6 +22,7 @@ import ( cloudkms "cloud.google.com/go/kms/apiv1" "gocloud.dev/gcp" + "gocloud.dev/internal/secrets" "google.golang.org/api/option" kmspb "google.golang.org/genproto/googleapis/cloud/kms/v1" )
1
// Copyright 2018 The Go Cloud 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 applicable law or agr...
1
13,542
`localsecrets` should be updated in the same way.
google-go-cloud
go
@@ -94,13 +94,18 @@ const ConsensusV17 = ConsensusVersion( "https://github.com/algorandfoundation/specs/tree/5615adc36bad610c7f165fa2967f4ecfa75125f0", ) +// ConsensusV18 adds the ability to issue a transaction that marks an account non-participating +const ConsensusV18 = ConsensusVersion( + "---->!!!TODO!!!<----"...
1
// Copyright (C) 2019 Algorand, Inc. // This file is part of go-algorand // // go-algorand is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any l...
1
36,246
We'll want to PR a spec change into github.com/algorandfoundation/specs. (Side note: It might or might not make sense to combine this protocol upgrade with Tsachi's protocol upgrade for fixing the reward rate calculation.)
algorand-go-algorand
go
@@ -30,7 +30,7 @@ func (w *DefaultWorker) Generate( nullBlockCount abi.ChainEpoch, posts []block.PoStProof, drandEntries []*drand.Entry, -) Output { +) (*block.Block, []*types.SignedMessage, []*types.SignedMessage, error) { generateTimer := time.Now() defer func() {
1
package mining // Block generation is part of the logic of the DefaultWorker. // 'generate' is that function that actually creates a new block from a base // TipSet using the DefaultWorker's many utilities. import ( "context" "time" "github.com/filecoin-project/go-address" "github.com/filecoin-project/specs-acto...
1
23,827
Use `FullBlock`, it comes from the same package.
filecoin-project-venus
go
@@ -1,9 +1,13 @@ +import abc import json import logging import time from concurrent.futures import ThreadPoolExecutor +from typing import Collection, Dict, Optional import requests +from flask import Request +from readerwriterlock import rwlock from localstack import config from localstack.utils.bootstrap im...
1
import json import logging import time from concurrent.futures import ThreadPoolExecutor import requests from localstack import config from localstack.utils.bootstrap import canonicalize_api_names from localstack.utils.common import clone # set up logger LOG = logging.getLogger(__name__) # map of service plugins, m...
1
12,997
do we plan to use anything else than flask for making HTTP requests inside localstack? if so, it maybe makes sense not to strongly couple to flask for now, and just leave the type of the `request` function parameters open for now.
localstack-localstack
py
@@ -143,9 +143,17 @@ func (verifyContentLanguage) ErrorCheck(b *blob.Bucket, err error) error { } func (verifyContentLanguage) BeforeWrite(as func(interface{}) bool) error { + var objp **storage.ObjectHandle + if !as(&objp) { + return errors.New("Writer.As failed to get ObjectHandle") + } + // Replace the ObjectHa...
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
17,074
I think we should make this a separate test case: it seems like making the precondition fail is the test case that would ensure that this escape hatch worked. Otherwise, if it's always true, then it would be the same as if the escape hatch didn't modify the outgoing request.
google-go-cloud
go
@@ -62,6 +62,13 @@ func (s *Server) Start(ctx context.Context) error { return errors.Wrap(err, "error when subscribe to block") } + // sync genesis block + genesisBlk, err := s.bc.GetBlockByHeight(0) + if err != nil { + return errors.Wrap(err, "error when get genesis block") + } + s.idx.BuildIndex(genesisBlk) +...
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
12,897
Error return value of `s.idx.BuildIndex` is not checked
iotexproject-iotex-core
go
@@ -36,6 +36,8 @@ def gen_classes(): pass elif member is configtypes.MappingType: pass + elif member in [configtypes.List, configtypes.LengthList]: + pass elif member is configtypes.FormatString: yield functools.partial(member, fields=['a', 'b']...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2016 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 Sof...
1
15,384
What's the reason for excluding those from the fuzzing here? You probably could just add some inner type via `functools.partial` like below with `FormatString`.
qutebrowser-qutebrowser
py
@@ -3,6 +3,6 @@ require 'spec_helper' describe Api::V1::UsersController, '#show' do it 'returns a 401 when users are not authenticated' do get :show - response.code.should eq '401' + expect(response.code).to eq '401' end end
1
require 'spec_helper' describe Api::V1::UsersController, '#show' do it 'returns a 401 when users are not authenticated' do get :show response.code.should eq '401' end end
1
9,667
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
thoughtbot-upcase
rb
@@ -14,7 +14,7 @@ import ( ) func killContainer(container libcontainer.Container) error { - container.Signal(syscall.SIGKILL, false) + _ = container.Signal(syscall.SIGKILL, false) for i := 0; i < 100; i++ { time.Sleep(100 * time.Millisecond) if err := container.Signal(syscall.Signal(0), false); err != nil {
1
// +build !solaris package main import ( "fmt" "os" "path/filepath" "syscall" "time" "github.com/opencontainers/runc/libcontainer" "github.com/urfave/cli" ) func killContainer(container libcontainer.Container) error { container.Signal(syscall.SIGKILL, false) for i := 0; i < 100; i++ { time.Sleep(100 * ti...
1
13,746
Its this golint or govet stuff?
opencontainers-runc
go
@@ -232,10 +232,9 @@ insert(hash_table_t table, app_pc addr, cbr_state_t state) static void at_taken(app_pc src, app_pc targ) { - dr_mcontext_t mcontext = { - sizeof(mcontext), - DR_MC_ALL, - }; + dr_mcontext_t mcontext; + mcontext.size = sizeof(mcontext); + mcontext.flags = DR_MC_ALL; ...
1
/* ********************************************************** * Copyright (c) 2014-2019 Google, Inc. All rights reserved. * Copyright (c) 2008 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or without *...
1
21,933
These are good cleanups: I didn't realize there were so many like this in the samples and tests. But given that there are quite of few of these mcontext changes I would separate these into their own PR (no need for an issue: iX branch) since they are logically distinct. Cleaner history, simpler revert paths, etc.
DynamoRIO-dynamorio
c
@@ -0,0 +1,18 @@ +// Copyright (c) Six Labors. +// Licensed under the Apache License, Version 2.0. + +using BenchmarkDotNet.Attributes; + +using SixLabors.ImageSharp.PixelFormats; + +namespace SixLabors.ImageSharp.Benchmarks +{ + public class ColorEquality + { + [Benchmark(Description = "ImageSharp Color ...
1
1
12,802
This is just a random struct equality, no value here.
dotnet-performance
.cs
@@ -180,6 +180,7 @@ type Config struct { FailsafeOutboundHostPorts []ProtoPort `config:"port-list;udp:53,udp:67,tcp:179,tcp:2379,tcp:2380,tcp:6666,tcp:6667;die-on-fail"` KubeNodePortRanges []numorstring.Port `config:"portrange-list;30000:32767"` + NatPortRange numorstring.Port `config:"portrange;;local"` ...
1
// Copyright (c) 2016-2018 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,561
Just spotted the `local` on here; that shouldn't be needed - no reason to limit this config to env vars only
projectcalico-felix
c
@@ -8,8 +8,12 @@ except ImportError: import numpy as np import param -from ..dimension import redim -from ..util import unique_iterator +from ..dimension import redim, Dimension, process_dimensions +from ..element import Element +from ..ndmapping import OrderedDict +from ..spaces import HoloMap, DynamicMap +from .....
1
from __future__ import absolute_import try: import itertools.izip as zip except ImportError: pass import numpy as np import param from ..dimension import redim from ..util import unique_iterator from .interface import Interface, iloc, ndloc from .array import ArrayInterface from .dictionary import DictInterf...
1
21,632
I had some weird issues when importing ``from .. import util`` getting the wrong utilities, hence I did this.
holoviz-holoviews
py
@@ -1,8 +1,8 @@ -#NVDAObjects/WinConsole.py -#A part of NonVisual Desktop Access (NVDA) -#This file is covered by the GNU General Public License. -#See the file COPYING for more details. -#Copyright (C) 2007-2019 NV Access Limited, Bill Dengler +# NVDAObjects/WinConsole.py +# A part of NonVisual Desktop Access (NVDA) +...
1
#NVDAObjects/WinConsole.py #A part of NonVisual Desktop Access (NVDA) #This file is covered by the GNU General Public License. #See the file COPYING for more details. #Copyright (C) 2007-2019 NV Access Limited, Bill Dengler import winConsoleHandler from . import Window from ..behaviors import Terminal, Editabl...
1
30,282
Please remove this line.
nvaccess-nvda
py
@@ -324,7 +324,8 @@ module Beaker # exit codes at the host level and then raising... # is it necessary to break execution?? if options[:accept_all_exit_codes] && options[:acceptable_exit_codes] - @logger.warn ":accept_all_exit_codes & :acceptable_exit_codes set. :accept_all_e...
1
require 'socket' require 'timeout' require 'benchmark' require 'rsync' require 'beaker/dsl/helpers' require 'beaker/dsl/patterns' [ 'command', 'ssh_connection'].each do |lib| require "beaker/#{lib}" end module Beaker class Host SELECT_TIMEOUT = 30 include Beaker::DSL::Helpers include Beaker::DSL::Pa...
1
12,594
should this state that we're falling back to `:acceptable_exit_codes`?
voxpupuli-beaker
rb
@@ -87,6 +87,16 @@ def df_type_check(_, value): success=True, metadata_entries=[ EventMetadataEntry.text(str(len(value)), 'row_count', 'Number of rows in DataFrame'), + EventMetadataEntry.text(str(value.shape), "shape", "The shape of the DataFrame."), + EventMetadata...
1
import pandas as pd from dagster_pandas.constraints import ( ColumnExistsConstraint, ColumnTypeConstraint, ConstraintViolationException, ) from dagster_pandas.validation import PandasColumn, validate_constraints from dagster import ( DagsterInvariantViolationError, DagsterType, EventMetadataEnt...
1
13,629
I don't think this works. The dataframe object is encapsulated in the value parameter. This might be the root of the failing checks.
dagster-io-dagster
py
@@ -163,7 +163,7 @@ class TopologyDescription { } if (topologyType === TopologyType.Unknown) { - if (serverType === ServerType.Standalone) { + if (serverType === ServerType.Standalone && this.servers.size !== 1) { serverDescriptions.delete(address); } else { topologyType =...
1
'use strict'; const { ServerDescription } = require('./server_description'); const WIRE_CONSTANTS = require('../cmap/wire_protocol/constants'); const { TopologyType, ServerType } = require('./common'); // contstants related to compatability checks const MIN_SUPPORTED_SERVER_VERSION = WIRE_CONSTANTS.MIN_SUPPORTED_SERVE...
1
17,593
Why was it necessary to add this check against `this.servers.size`?
mongodb-node-mongodb-native
js
@@ -61,6 +61,11 @@ std::string getWrongOptionHelp(const engine::api::TableParameters &parameters) help = "fallback_speed must be > 0"; } + if (parameters.scale_factor < 0) + { + help = "scale_factor must be > 0"; + } + return help; } } // anon. ns
1
#include "server/service/table_service.hpp" #include "server/api/parameters_parser.hpp" #include "engine/api/table_parameters.hpp" #include "util/json_container.hpp" #include <boost/format.hpp> namespace osrm { namespace server { namespace service { namespace { const constexpr char PARAMETER_SIZE_MISMATCH_MSG[] =...
1
23,943
This tests for < 0 but the error message says it must be > 0. The `if` should probably be `<=` to match the message.
Project-OSRM-osrm-backend
cpp
@@ -25,12 +25,12 @@ namespace Datadog.Trace.ClrProfiler.Integrations { var request = (WebRequest)webRequest; - if (!IsTracingEnabled(request)) + if (!(request is HttpWebRequest) || !IsTracingEnabled(request)) { return request.GetResponse(); ...
1
using System; using System.Net; using System.Threading.Tasks; using Datadog.Trace.ExtensionMethods; namespace Datadog.Trace.ClrProfiler.Integrations { /// <summary> /// Tracer integration for WebRequest. /// </summary> public static class WebRequestIntegration { /// <summary> /// In...
1
14,885
Short circuits when it's something like a WebPackRequest, which we should instrument and test specifically.
DataDog-dd-trace-dotnet
.cs
@@ -23,7 +23,7 @@ var ( func init() { flag.BoolVar(&fProd, "prod", false, "disable development mode") - flag.BoolVar(&fDiskCertCache, "use-disk-cert-cache-dev", false, "cache cert on disk") + flag.BoolVar(&fDiskCertCache, "use-disk-cert-cache", false, "cache cert on disk") } func main() {
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 main import ( "context" "flag" "os" "github.com/keybase/kbfs/env" "github.com/keybase/kbfs/libkbfs" "github.com/keybase/kbfs/libpages" "go.uber.org/zap"...
1
18,808
Should this be true now by default?
keybase-kbfs
go
@@ -131,6 +131,7 @@ public class AzkabanExecutorServer { root.addServlet(new ServletHolder(new ExecutorServlet()), "/executor"); root.addServlet(new ServletHolder(new JMXHttpServlet()), "/jmx"); root.addServlet(new ServletHolder(new StatsServlet()), "/stats"); + root.addServlet(new ServletHolder(new S...
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
10,512
/DispatcherStatistics ? /statistics is a bit confusing with /stats
azkaban-azkaban
java
@@ -605,6 +605,9 @@ def get_lambda_log_events( or "START" in raw_message or "END" in raw_message or "REPORT" in raw_message + # necessary until tail is updated in docker images. See this PR: + # http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff...
1
import glob import importlib import io import json import os import re import shutil import tempfile import time import zipfile from contextlib import contextmanager from typing import Any, Callable, Dict, List, Optional, Tuple import requests from six import iteritems from localstack.constants import ( ENV_INTER...
1
13,861
nit: Wondering if we should simply filter on `"tail: unrecognized file system type"`, or is the type identifier `0x794c7630` always the same?
localstack-localstack
py