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
@@ -0,0 +1,7 @@ +package azkaban.imagemgmt.utils; + +public interface ImageMgmtConstants { + public static final String IMAGE_TYPE = "imageType"; + public static final String IMAGE_VERSION = "imageVersion"; + +}
1
1
20,186
Can you please move this interface as class in common Constants file in az-core module?
azkaban-azkaban
java
@@ -43,12 +43,15 @@ TEST(ProcessUtils, isPidAvailable) { } { // pid file which contains pid of current process - auto pidFile = "/tmp/maybe-non-existing-dir/process_test.pid"; + auto pidFile = folly::stringPrintf("/tmp/non-existing-dir-%d/process_test.pid", ::getpid()); + SCOPE_E...
1
/* Copyright (c) 2018 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "base/Base.h" #include <gtest/gtest.h> #include <fstream> #include "process/ProcessUtils.h" #include "fs/FileUt...
1
17,102
Why not TempDir?
vesoft-inc-nebula
cpp
@@ -0,0 +1,16 @@ +using System; +using MvvmCross.Binding.BindingContext; +using MvvmCross.Core.ViewModels; +using MvvmCross.Core.Views; + +namespace MvvmCross.Forms.Views +{ + public interface IMvxElement : IMvxView, IMvxBindingContextOwner + { + } + + public interface IMvxElement<TViewModel> + : IM...
1
1
13,283
IMvxFormsView -> IMvxElement is a breaking change, isn't it?
MvvmCross-MvvmCross
.cs
@@ -33,6 +33,7 @@ import yaml from molecule import config from molecule import state from molecule import utilities +from molecule import ansible_galaxy_install from molecule.provisioners import baseprovisioner from molecule.provisioners import dockerprovisioner from molecule.provisioners import openstackprovisio...
1
# Copyright (c) 2015-2016 Cisco Systems # # 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, publ...
1
6,476
This should be imported alphabetically.
ansible-community-molecule
py
@@ -11,7 +11,7 @@ use Shopsys\FrameworkBundle\Component\Grid\Ordering\OrderableEntityInterface; use Shopsys\FrameworkBundle\Component\Money\Money; use Shopsys\FrameworkBundle\Model\Localization\AbstractTranslatableEntity; use Shopsys\FrameworkBundle\Model\Payment\Payment; -use Shopsys\FrameworkBundle\Model\Pricing\C...
1
<?php namespace Shopsys\FrameworkBundle\Model\Transport; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping\ManyToMany; use Gedmo\Mapping\Annotation as Gedmo; use Prezent\Doctrine\Translatable\Annotation as Prezent; use Shopsys\FrameworkBundle\Component\Grid\Ord...
1
20,036
Please apply same changes as for Payment
shopsys-shopsys
php
@@ -55,9 +55,13 @@ import { Cell, Grid, Row } from '../material-components'; import PageHeader from './PageHeader'; import Layout from './layout/Layout'; import { CORE_WIDGETS } from '../googlesitekit/widgets/datastore/constants'; +import { useHasScrolledEffect } from '../hooks/useHasScrolledEffect'; +import ScrollE...
1
/** * DashboardEntityApp component. * * Site Kit by Google, Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-...
1
42,717
This should only be used in the `ScrollEffect` component, as you have in the `DashboardMainApp` below
google-site-kit-wp
js
@@ -269,6 +269,8 @@ def api(require_login=True, schema=None, enabled=True, is_admin=user.is_admin, is_active=user.is_active) + g.token_str = token + if not g.auth.is_active: raise ApiException( ...
1
# Copyright (c) 2017 Quilt Data, Inc. All rights reserved. """ API routes. NOTE: By default, SQLAlchemy expires all objects when the transaction is committed: http://docs.sqlalchemy.org/en/latest/orm/session_api.html#sqlalchemy.orm.session.Session.commit We disable this behavior because it can cause unexpected queri...
1
16,870
I'd call it `g.auth_token`, just to make it more clear
quiltdata-quilt
py
@@ -2,6 +2,9 @@ package protocol import "time" +// DesiredReceiveBufferSize is the kernel UDP receive buffer size that we'd like to use. +const DesiredReceiveBufferSize = (1 << 20) * 2 // 2 MB + // MaxPacketSizeIPv4 is the maximum packet size that we use for sending IPv4 packets. const MaxPacketSizeIPv4 = 1252
1
package protocol import "time" // MaxPacketSizeIPv4 is the maximum packet size that we use for sending IPv4 packets. const MaxPacketSizeIPv4 = 1252 // MaxPacketSizeIPv6 is the maximum packet size that we use for sending IPv6 packets. const MaxPacketSizeIPv6 = 1232 // MaxCongestionWindowPackets is the maximum conges...
1
9,280
Not sure if this is what we really need, we might need to adjust this constant after more extensive benchmarking.
lucas-clemente-quic-go
go
@@ -183,7 +183,10 @@ func RegisterRoutes(m *macaron.Macaron) { m.Patch("/hooks/:id:int", bind(api.EditHookOption{}), repo.EditHook) m.Get("/raw/*", middleware.RepoRef(), repo.GetRawFile) m.Get("/archive/*", repo.GetArchive) - + m.Group("/branches", func() { + m.Get("",repo.ListBranches) + m.Ge...
1
// Copyright 2015 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package v1 import ( "strings" "github.com/go-macaron/binding" "gopkg.in/macaron.v1" api "github.com/gogits/go-gogs-client" "github.com/gogits/gogs/mo...
1
10,032
Shouldn't we use `:branchname` here? Or just `:branch`?
gogs-gogs
go
@@ -930,7 +930,7 @@ class RandUUID(RandField): # Automatic timestamp -class AutoTime(VolatileValue): +class AutoTime(RandNum): def __init__(self, base=None): if base is None: self.diff = 0
1
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # Copyright (C) Michael Farrell <micolous+git@gmail.com> # Copyright (C) Gauthier Sebaux # This program is published under a GPLv2 license """ Fields that hold random numbers. ...
1
16,385
`AutoTime` is a number but calling `int()` would make it crash. Tested through the docs
secdev-scapy
py
@@ -333,7 +333,16 @@ namespace OpenTelemetry.Trace new EvictingQueue<KeyValuePair<string, object>>(this.tracerConfiguration.MaxNumberOfAttributes); } - this.attributes.Add(new KeyValuePair<string, object>(key ?? string.Empty, sanitizedValue)); + ...
1
// <copyright file="SpanSdk.cs" company="OpenTelemetry Authors"> // Copyright 2018, OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/...
1
13,425
@eddynaka Looks like the same block more or less 4 times, should we have a helper method? private void AddOrReplaceAttribute or something?
open-telemetry-opentelemetry-dotnet
.cs
@@ -381,7 +381,8 @@ public class JettySolrRunner { dispatchFilter = root.getServletHandler().newFilterHolder(Source.EMBEDDED); dispatchFilter.setHeldClass(SolrDispatchFilter.class); dispatchFilter.setInitParameter("excludePatterns", excludePatterns); - root.addFilter(dispatchFilter, "*...
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
31,215
Please do the same for the DebugFilter a few lines above.
apache-lucene-solr
java
@@ -0,0 +1,2 @@ +export * from './act'; +export * from './setupRerender';
1
1
12,541
Minor nit: Just inline both functions here. No need to make a file per function (that's a popular approach for some projects though, just not for us :) ).
preactjs-preact
js
@@ -28,6 +28,18 @@ namespace Datadog.Trace.Configuration { } + /// <summary> + /// Initializes a new instance of the <see cref="TracerSettings"/> class with default values, + /// or using the default sources. Calling <c>new TracerSettings(true)</c> is equivalent to + /// ...
1
// <copyright file="TracerSettings.cs" company="Datadog"> // Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // </copyright> using System; using Sys...
1
25,953
There are several uses of the word "default" in here, perhaps it can be reworded slightly?
DataDog-dd-trace-dotnet
.cs
@@ -50,7 +50,7 @@ class MediaType extends AbstractType 'new_on_update' => $options['new_on_update'], ))); - $builder->addEventListener(FormEvents::BIND, function (FormEvent $event) { + $builder->addEventListener(FormEvents::SUBMIT, function(FormEvent $event) { if ($eve...
1
<?php /* * This file is part of the Sonata project. * * (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\Form\Type; use Sonata\MediaBundle\Form\Dat...
1
6,735
`function (` is correct. A space must be there. Please run `make cs` to have correct coding style.
sonata-project-SonataMediaBundle
php
@@ -18,7 +18,7 @@ function pageNoDuplicateEvaluate(node, options, virtualNode) { cache.set(key, true); let elms = querySelectorAllFilter(axe._tree[0], options.selector, elm => - isVisible(elm.actualNode) + isVisible(elm.actualNode, true) ); // Filter elements that, within certain contexts, don't m...
1
import cache from '../../core/base/cache'; import { querySelectorAllFilter } from '../../core/utils'; import { isVisible, findUpVirtual } from '../../commons/dom'; function pageNoDuplicateEvaluate(node, options, virtualNode) { if (!options || !options.selector || typeof options.selector !== 'string') { throw new...
1
16,753
I think this is now going to fail the scenario where there is a `main` with aria-hidden="true". I don't think that should fail.
dequelabs-axe-core
js
@@ -83,7 +83,7 @@ func NewSublist() *Sublist { // Insert adds a subscription into the sublist func (s *Sublist) Insert(sub *subscription) error { // copy the subject since we hold this and this might be part of a large byte slice. - subject := string(append([]byte(nil), sub.subject...)) + subject := string(sub.subj...
1
// Copyright 2016 Apcera Inc. All rights reserved. // Package sublist is a routing mechanism to handle subject distribution // and provides a facility to match subjects from published messages to // interested subscribers. Subscribers can have wildcard subjects to match // multiple published subjects. package server ...
1
6,363
Is this specifically that if we capture the cast in another variable, even if it passes escape analysis, that the runtime will copy?
nats-io-nats-server
go
@@ -108,6 +108,10 @@ type EKSConfig struct { // Fargate controls the configuration of the AWS IAM role for // used by EKS managed machine pools. Fargate *AWSIAMRoleSpec `json:"fargate,omitempty"` + // KMSAliasPrefix is prefix to use to restrict permission to KMS keys to only those that have an alias + // name tha...
1
/* Copyright 2020 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
19,042
Should this be optional for existing configs to work?
kubernetes-sigs-cluster-api-provider-aws
go
@@ -119,12 +119,14 @@ func (s *Service) Pay(ctx context.Context, peer swarm.Address, amount uint64) er } return ErrUnknownBeneficary } - err = s.chequebook.Issue(ctx, beneficiary, big.NewInt(int64(amount)), func(signedCheque *chequebook.SignedCheque) error { + balance, err := s.chequebook.Issue(ctx, beneficiary...
1
// Copyright 2020 The Swarm Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package swap import ( "context" "errors" "fmt" "math/big" "github.com/ethereum/go-ethereum/common" "github.com/ethersphere/bee/pkg/crypto" "github.c...
1
13,721
note that `balance` does not necessarily fit into `int64`, especially with the new bzz token. so you might want to avoid the `int64` conversion step using `big.NewFloat(0).SetInt(balance).Float64()`.
ethersphere-bee
go
@@ -96,7 +96,12 @@ int main(int argc, const char *argv[]) { flatbuffers::IDLOptions::kPhp, "Generate PHP files for tables/structs", flatbuffers::GeneralMakeRule }, - }; + { flatbuffers::GenerateJsonSchema, "-S", "--jsonschema", "JsonSchema", true, + nullptr, + flatbuffers::IDLOptions...
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 applica...
1
12,130
lets leave out the `-S` ?
google-flatbuffers
java
@@ -112,4 +112,9 @@ public class CommonRenderingUtil { public static int toInt(String value) { return Integer.valueOf(value); } + + /** Returns the lowercase version of the given text */ + public static String lowercase(String value) { + return value.toLowerCase(); + } }
1
/* Copyright 2016 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 * * Unless required by applicable law or agreed to in...
1
26,073
Is this method needed?
googleapis-gapic-generator
java
@@ -127,6 +127,7 @@ void PoolingLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom, template <typename Dtype> void PoolingLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { + PoolingParameter pool_param = this->layer_param_.pooling_param(); const Dtype* b...
1
#include <algorithm> #include <cfloat> #include <vector> #include "caffe/layers/pooling_layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { using std::min; using std::max; template <typename Dtype> void PoolingLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dty...
1
38,657
How about, instead of reading the param every time, just add a class member variable to hold the value of the flag, and just set it once during `LayerSetUp`?
BVLC-caffe
cpp
@@ -99,7 +99,7 @@ func (e *ECS) Service(clusterName, serviceName string) (*Service, error) { return nil, fmt.Errorf("cannot find service %s", serviceName) } -// ServiceTasks calls ECS API and returns ECS tasks running by a service. +// ServiceTasks calls ECS API and returns ECS tasks desired to be running by a ser...
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package ecs provides a client to make API requests to Amazon Elastic Container Service. package ecs import ( "errors" "fmt" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request...
1
17,754
Does this mean it's only returning tasks associated with the primary deployment? or something else
aws-copilot-cli
go
@@ -1101,6 +1101,11 @@ func TestRequestNoConnection(t *testing.T) { t.Fatal("expect error, but got none") } + t.Log(err) + awsError := err.(awserr.Error) + origError := awsError.OrigErr() + t.Logf("Orig Error: %#v of type %T", origError, origError) + if e, a := 10, r.RetryCount; e != a { t.Errorf("expect %v...
1
package request_test import ( "bytes" "encoding/json" "errors" "fmt" "io" "io/ioutil" "net" "net/http" "net/http/httptest" "net/url" "reflect" "runtime" "strconv" "strings" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client"...
1
9,760
nit, would be good to include prefix for this log statement.
aws-aws-sdk-go
go
@@ -57,4 +57,12 @@ describe('aria-required-attr', function () { axe.commons.aria.requiredAttr = orig; }); + describe('options', function () { + it('should require provided attribute names', function () { + fixture.innerHTML = '<div role="slider" id="target"></div>'; + var target = fixture.children[0]; + a...
1
describe('aria-required-attr', function () { 'use strict'; var fixture = document.getElementById('fixture'); var checkContext = { _data: null, data: function (d) { this._data = d; } }; afterEach(function () { fixture.innerHTML = ''; checkContext._data = null; }); it('should detect missing attrib...
1
11,982
Same here, you should use a made up role. May I suggest `role="McCheddarton"`? :)
dequelabs-axe-core
js
@@ -372,7 +372,9 @@ class SparkWrite { } Expression conflictDetectionFilter = conflictDetectionFilter(); - overwriteFiles.validateNoConflictingAppends(conflictDetectionFilter); + overwriteFiles.conflictDetectionFilter(conflictDetectionFilter); + overwriteFiles.validateNoConflictingData();...
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,619
@aokolnychyi, shouldn't this check whether the operation is a delete? If this is invoked by `DELETE FROM` then we don't need to validate conflicting deletes.
apache-iceberg
java
@@ -11,8 +11,9 @@ import ( "reflect" "sync" - "github.com/keybase/kbfs/kbfscodec" "golang.org/x/net/context" + + "github.com/keybase/kbfs/kbfscodec" ) const (
1
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libkbfs import ( "container/heap" "errors" "io" "reflect" "sync" "github.com/keybase/kbfs/kbfscodec" "golang.org/x/net/context" ) const ( defaultBlock...
1
14,731
Any reason to split up this import block? I think most files have them together in one block, right?
keybase-kbfs
go
@@ -109,6 +109,18 @@ namespace Datadog.Trace.AppSec internal SecuritySettings Settings => _settings; + private static void TagSpan(Span span) + { + // we should only tag service entry span, the first span opened for a + // service. For WAF it's safe to assume we always h...
1
// <copyright file="Security.cs" company="Datadog"> // Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // </copyright> using System; using System.Co...
1
23,000
`Tags.AppSecEnabled` should probably move to `Metrics.AppSecEnabled` I guess?
DataDog-dd-trace-dotnet
.cs
@@ -35,6 +35,9 @@ class atomic_file(AtomicLocalFile): Also cleans up the temp file if close is not invoked """ + def __init__(self, path, mode): + super(AtomicLocalFile, self).__init__(path, mode) + def move_to_final_destination(self): os.rename(self.tmp_path, self.path)
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
14,761
What happens if you remove this? Can't you still initialize this atomic_file class, since it's just AtomicLocalFile with an additional method (move_to_final_destination)?
spotify-luigi
py
@@ -34,7 +34,6 @@ <h2><div class='icon partners'></div><%= t ".partners_title" %></h2> <p><%= t 'layouts.partners_html', :ucl => link_to(t('layouts.partners_ucl'), "https://www.ucl.ac.uk"), - :ic => link_to(t('layouts.partners_ic'), "https://www.imperial.ac.uk/"), :byte...
1
<div class='attr'> <div class='byosm'> <%= t ".copyright_html" %> </div> <div class='user-image'></div> <h1><%= raw t ".used_by", :name => "<span class='user-name'>OpenStreetMap</span>" %></h1> </div> <div class='text'> <div class='section'> <p><strong><%= t ".lede_text" %></strong></p> <h2><di...
1
11,509
As previously discussed in #1944 it's not safe to remove IC like this as it will break every language that still has a `%{ic}` marker in the translation.
openstreetmap-openstreetmap-website
rb
@@ -293,6 +293,19 @@ func (r *DefaultRuleRenderer) endpointIptablesChain( }, }) + rules = append(rules, Rule{ + Match: Match().ProtocolNum(ProtoUDP). + DestPorts(uint16(r.Config.VXLANPort)). + VXLANVNI(uint32(r.Config.VXLANVNI)), + Action: DropAction{}, + Comment: "Drop VXLAN encapped packets originating...
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 ...
1
16,987
I believe these rules will be enforced both (1) on egress from a local workload, and (2) on ingress **to** a local workload. Right? I understand that we definitely want (1), but do we really want to enforce (2) as well?
projectcalico-felix
go
@@ -368,6 +368,8 @@ class RemoteConnection(object): ('POST', '/session/$sessionId/window/rect'), Command.GET_WINDOW_RECT: ('GET', '/session/$sessionId/window/rect'), + Command.W3C_MINIMIZE_WINDOW: + ('POST', '/session/$sessionId/window/minimize'),...
1
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
1
14,688
Update after command rename
SeleniumHQ-selenium
java
@@ -79,7 +79,7 @@ module Faker digits = Faker::Number.leading_zero_number(9) until digits&.match(/(\d)((?!\1)\d)+/) first_digit = brazilian_citizen_number_checksum_digit(digits) second_digit = brazilian_citizen_number_checksum_digit(digits + first_digit) - [digits, first_digit, second_...
1
# frozen_string_literal: true module Faker class IDNumber < Base CHECKS = 'TRWAGMYFPDXBNJZSQVHLCKE' INVALID_SSN = [ /0{3}-\d{2}-\d{4}/, /\d{3}-0{2}-\d{4}/, /\d{3}-\d{2}-0{4}/, /666-\d{2}-\d{4}/, /9\d{2}-\d{2}-\d{4}/ ].freeze ZA_RACE_DIGIT = '8' ZA_CITIZENSHIP_DIGITS ...
1
8,896
What about adding an optional parameter that allows users to choose whether they want to use the format or not?
faker-ruby-faker
rb
@@ -35,8 +35,8 @@ func TestChainHead(t *testing.T) { func TestChainLs(t *testing.T) { tf.IntegrationTest(t) - ctx := context.Background() t.Skip("DRAGONS: fake post for integration test") + ctx := context.Background() t.Run("chain ls with json encoding returns the whole chain as json", func(t *testing.T) { ...
1
package commands_test import ( "bytes" "context" "encoding/json" "fmt" "testing" "github.com/ipfs/go-cid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/filecoin-project/go-filecoin/fixtures" "github.com/filecoin-project/go-filecoin/internal/app/go-filecoin/node/test...
1
23,572
Lint didn't like this context being before the skip
filecoin-project-venus
go
@@ -0,0 +1,18 @@ +package tequilapi + +import "net/http" + +type corsHandler struct { + originalHandler http.Handler +} + +func (wrapper corsHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) { + resp.Header().Set("Access-Control-Allow-Origin", "*") + resp.Header().Set("Access-Control-Allow-Methods", "POST...
1
1
10,109
so now basically anybody could drink my tequila? currently electron dev-env runs on `http://localhost:9080`
mysteriumnetwork-node
go
@@ -259,7 +259,7 @@ bool Plugin::loadLib(ILXQtPanelPluginLibrary const * pluginLib) mPlugin = pluginLib->instance(startupInfo); if (!mPlugin) { - qWarning() << QString("Can't load plugin \"%1\". Plugin can't build ILXQtPanelPlugin.").arg(mPluginLoader->fileName()); + qWarning() << QString("...
1
/* BEGIN_COMMON_COPYRIGHT_HEADER * (c)LGPL2+ * * LXDE-Qt - a lightweight, Qt based, desktop toolset * http://razor-qt.org * * Copyright: 2012 Razor team * Authors: * Alexander Sokoloff <sokoloff.a@gmail.com> * * This program or library is free software; you can redistribute it * and/or modify it under the ...
1
5,932
`mPluginLoader` is nullptr in static plugins, which causes segmentation faults
lxqt-lxqt-panel
cpp
@@ -1,12 +1,8 @@ package org.phoenicis.javafx.views.mainwindow.ui; -import javafx.event.ActionEvent; -import javafx.event.EventHandler; -import org.phoenicis.javafx.views.common.ThemeManager; - import javafx.beans.property.StringProperty; -import javafx.scene.control.TextField; import javafx.scene.control.Button; ...
1
package org.phoenicis.javafx.views.mainwindow.ui; import javafx.event.ActionEvent; import javafx.event.EventHandler; import org.phoenicis.javafx.views.common.ThemeManager; import javafx.beans.property.StringProperty; import javafx.scene.control.TextField; import javafx.scene.control.Button; import javafx.scene.layout...
1
11,139
Better use `Optional<Consumer<String>> onSearch` here.
PhoenicisOrg-phoenicis
java
@@ -16,7 +16,6 @@ BOOST_AUTO_TEST_CASE(rfc4648_test_vectors) { using namespace osrm::engine; - BOOST_CHECK_EQUAL(encodeBase64(""), ""); BOOST_CHECK_EQUAL(encodeBase64("f"), "Zg=="); BOOST_CHECK_EQUAL(encodeBase64("fo"), "Zm8="); BOOST_CHECK_EQUAL(encodeBase64("foo"), "Zm9v");
1
#include "engine/base64.hpp" #include "engine/hint.hpp" #include "mocks/mock_datafacade.hpp" #include <boost/test/unit_test.hpp> #include <boost/test/test_case_template.hpp> #include <iostream> #include <algorithm> // RFC 4648 "The Base16, Base32, and Base64 Data Encodings" BOOST_AUTO_TEST_SUITE(base64) // For test...
1
15,918
this is asserted as invalid input
Project-OSRM-osrm-backend
cpp
@@ -10,12 +10,15 @@ import ( "time" "github.com/thought-machine/please/src/core" + "github.com/thought-machine/please/src/parse" ) // Print produces a Python call which would (hopefully) regenerate the same build rule if run. // This is of course not ideal since they were almost certainly created as a java_l...
1
package query import ( "fmt" "io" "os" "reflect" "sort" "strings" "time" "github.com/thought-machine/please/src/core" ) // Print produces a Python call which would (hopefully) regenerate the same build rule if run. // This is of course not ideal since they were almost certainly created as a java_library // o...
1
10,068
Why do you need to create a new parser? Can't you just use `state.Parser` to answer this question?
thought-machine-please
go
@@ -155,5 +155,10 @@ namespace Nethermind.Core HashNumberDiffAndTx, Short } + + public virtual Block CreateBlockForProcessing(BlockHeader header) => + new(header, Transactions, Ommers); + + public virtual IEnumerable<Transaction> GetTransactions() => ...
1
// Copyright (c) 2021 Demerzel Solutions Limited // This file is part of the Nethermind library. // // The Nethermind library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of...
1
25,729
remove processing references from Nethermind.Core where possible, keep clean
NethermindEth-nethermind
.cs
@@ -0,0 +1,7 @@ +package com.fsck.k9.mail.internet; + +public class UnsupportedContentTransferEncodingException extends Exception { + public UnsupportedContentTransferEncodingException(String encoding) { + super("Unsupported encoding: "+encoding); + } +}
1
1
14,355
Why not make this a subclass of `MessagingException` so we don't need to change all `throws` clause?
k9mail-k-9
java
@@ -22,6 +22,8 @@ import qrcode import traceback from hashlib import sha256 from decimal import Decimal +import binascii +from .drbg.hmac_drbg import DRBG from PyQt5.QtPrintSupport import QPrinter
1
''' Revealer So you have something to hide? plug-in for the electrum wallet. Features: - Deep Cold multi-factor backup solution - Safety - One time pad security - Redundancy - Trustless printing & distribution - Encrypt your seedphrase or any secret you want for your revealer - Based on crypto by...
1
12,777
it should instead be `from .hmac_drbg import DRBG` also, please put it at the bottom of the imports (PEP 8 order), so near line 36
spesmilo-electrum
py
@@ -138,12 +138,13 @@ class SchemaUpdate implements UpdateSchema { parentId = parentField.fieldId(); Preconditions.checkArgument(!deletes.contains(parentId), "Cannot add to a column that will be deleted: %s", parent); - Preconditions.checkArgument(schema.findField(parent + "." + name) == n...
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
33,062
Nit: indentation is 2 indents (4 spaces) from the previous line.
apache-iceberg
java
@@ -224,7 +224,7 @@ func (c *Config) RenderComposeYAML() (string, error) { // path.Join is desired over filepath.Join here, // as we always want a unix-style path for the mount. "docroot": path.Join("../", c.Docroot), - "plugin": c.Platform, + "plugin": "ddev", "appType": c.AppType, "...
1
package ddevapp import ( "bytes" "fmt" "html/template" "io/ioutil" "os" "path" "path/filepath" "strings" log "github.com/Sirupsen/logrus" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/drud/ddev/pkg/appports" "github.com/drud/ddev/pkg/util" "github.com/drud/ddev/pkg/version" "github.com/pkg/errors"...
1
11,383
I don't understand why this is changing to a hard-coded string.
drud-ddev
php
@@ -24,7 +24,7 @@ import ( // Devnet is a FAST lib environment that is meant to be used // when working with kittyhawk devnets run by the Filecoin development team. type Devnet struct { - network string + network DevnetConfig location string log logging.EventLogger
1
package environment // The devnet FAST environment provides an environment for using FAST with the deployed kittyhawk // devnet infrasturture run by the Filecoin development team. It can be used to setup and manage nodes // connected to either the nightly, test, or user devnets for running automation with the FAST lib...
1
21,301
nit: perhaps calling this `config` would be more clear?
filecoin-project-venus
go
@@ -110,7 +110,7 @@ de_DE.strings = { '1': '+%{smart_count} Dateien hochladen', '2': '+%{smart_count} Dateien hochladen', }, - uploading: 'Uploading', + uploading: 'Lade hoch', uploadingXFiles: { '0': '%{smart_count} Datei wird hochgeladen', '1': '%{smart_count} Dateien werden hochgeladen',
1
const de_DE = {} de_DE.strings = { addMoreFiles: 'Dateien hinzufügen', addingMoreFiles: 'Dateien hinzufügen', allowAccessDescription: 'Um Bilder oder Videos mit Ihrer Kamera aufzunehmen, erlauben Sie dieser Website bitte Zugriff auf Ihre Kamera.', allowAccessTitle: 'Bitte erlauben Sie Zugriff auf Ihre Kamera',...
1
14,317
I would rather recommend using 'Wird hochgeladen' since the imperative form of 'Lade hoch' confuses me whether this is an action I need to do or whether it's an action that Uppy is currently doing. Just my two cents.
transloadit-uppy
js
@@ -30,6 +30,8 @@ const ( defaultDataDir = "." defaultLogLevel = "INFO" defaultUmask = 0077 + + minimumUmask = 0027 ) // RunConfig represents the available configurables for file
1
package run import ( "context" "crypto/x509" "encoding/pem" "errors" "flag" "fmt" "io/ioutil" "net" "os" "path/filepath" "strconv" "github.com/hashicorp/hcl" "github.com/spiffe/spire/pkg/agent" "github.com/spiffe/spire/pkg/common/catalog" "github.com/spiffe/spire/pkg/common/idutil" "github.com/spiffe/...
1
10,309
Hmm I would have expected this to go away? What role does it play now that we have a minimum?
spiffe-spire
go
@@ -3,12 +3,6 @@ const MongoNetworkError = require('./core').MongoNetworkError; const mongoErrorContextSymbol = require('./core').mongoErrorContextSymbol; -const GET_MORE_NON_RESUMABLE_CODES = new Set([ - 136, // CappedPositionLost - 237, // CursorKilled - 11601 // Interrupted -]); - // From spec@https://github...
1
'use strict'; const MongoNetworkError = require('./core').MongoNetworkError; const mongoErrorContextSymbol = require('./core').mongoErrorContextSymbol; const GET_MORE_NON_RESUMABLE_CODES = new Set([ 136, // CappedPositionLost 237, // CursorKilled 11601 // Interrupted ]); // From spec@https://github.com/mongodb...
1
17,291
if we are removing this, is it useful to have the `isGetMoreError` message below? If that's not required, can we also remove the `mongoErrorContextSymbol` outright?
mongodb-node-mongodb-native
js
@@ -59,11 +59,7 @@ public: void helper_block_for_at_least_entries( uint32_t amount) { - std::unique_lock<std::mutex> lck(*xml_mutex_); - mock_consumer->cv().wait(lck, [this, amount] - { - return mock_consumer->ConsumedEntriesSize_nts() >= amount; - ...
1
// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima). // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless re...
1
23,457
I think this mutex is only used here. Remove it.
eProsima-Fast-DDS
cpp
@@ -181,7 +181,16 @@ public class IndexSearcher { } /** Runs searches for each segment separately, using the - * provided Executor. NOTE: + * provided Executor. The passed in Executor will also be + * used by LRUQueryCache (if enabled) to perform asynchronous + * query caching. + * If a task is r...
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,699
it's unclear to me which method you are recommending overriding?
apache-lucene-solr
java
@@ -511,7 +511,7 @@ class StringFormatChecker(BaseChecker): check_args = False # Consider "{[0]} {[1]}" as num_args. - num_args += sum(1 for field in named_fields if field == "") + num_args += sum(1 for field in named_fields if not field) if named_fields: for fiel...
1
# Copyright (c) 2009-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2010 Daniel Harding <dharding@gmail.com> # Copyright (c) 2012-2014 Google, Inc. # Copyright (c) 2013-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Brett Cannon <brett@python.org> # Copyright (c) 2014 Arun Persau...
1
16,399
This make me think that if the typing of a variable is inconsistent it could cause problem. For example here, if `field == 0`, the behavior is not exactly the same. A `0` and is implicitelty false. Well it works because summing 0 is neutral, but what if it was a multiplication ?
PyCQA-pylint
py
@@ -4,12 +4,13 @@ import ( "bytes" "errors" "fmt" - "github.com/libopenstorage/openstorage/api" - "github.com/libopenstorage/openstorage/api/client" - "github.com/libopenstorage/openstorage/volume" "io" "io/ioutil" "strconv" + + "github.com/libopenstorage/openstorage/api" + "github.com/libopenstorage/openst...
1
package volume import ( "bytes" "errors" "fmt" "github.com/libopenstorage/openstorage/api" "github.com/libopenstorage/openstorage/api/client" "github.com/libopenstorage/openstorage/volume" "io" "io/ioutil" "strconv" ) const ( graphPath = "/graph" volumePath = "/osd-volumes" snapPath = "/osd-snapshot" ...
1
6,419
Remove this file from the PR
libopenstorage-openstorage
go
@@ -35,9 +35,9 @@ namespace Nethermind.Precompiles.Benchmark // BenchmarkRunner.Run<Bn256MulBenchmark>(); // BenchmarkRunner.Run<Bn256PairingBenchmark>(); BenchmarkRunner.Run<ModExp2565Benchmark>(); - BenchmarkRunner.Run<ModExpBenchmark>(); + // BenchmarkRunn...
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
25,166
I cannot find the changes / results of the eip2565 benchmark
NethermindEth-nethermind
.cs
@@ -151,7 +151,7 @@ const withData = ( 'googlesitekit.moduleDataReset', 'googlesitekit.moduleDataResetHandler', () => { - this.setState( { data: false } ); + this.setState( { data: false, zeroData: false } ); } );
1
/** * withData higher-order component. * * Site Kit by Google, Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICEN...
1
31,236
@tofumatt now that I see this in context, we're now resetting 2/3 of the keys in the `NewComponent` state - the other being `error`. It seems that `error` should probably also be reset - essentially resetting all of the component state when the date range changes. What do you think? cc: @felixarntz @adamsilverstein
google-site-kit-wp
js
@@ -32,7 +32,11 @@ namespace OpenTelemetry.Trace.Export public override Task ShutdownAsync(CancellationToken cancellationToken) { +#if NET452 + return Task.FromResult(0); +#else return Task.CompletedTask; +#endif } } }
1
// <copyright file="NoopActivityProcessor.cs" company="OpenTelemetry Authors"> // 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...
1
14,202
This one and the ones below are for shutdowns but if it appears in some method called frequently during the lifetime of the process it should be cached in a static.
open-telemetry-opentelemetry-dotnet
.cs
@@ -5540,7 +5540,9 @@ describe('Model', function() { return co(function*() { const createdUser = yield User.create({ name: 'Hafez' }); - let threw = false; + + let err; + try { yield User.bulkWrite([{ updateOne: {
1
'use strict'; /** * Test dependencies. */ const start = require('./common'); const assert = require('assert'); const co = require('co'); const random = require('../lib/utils').random; const util = require('./util'); const Buffer = require('safe-buffer').Buffer; const mongoose = start.mongoose; const Schema = mong...
1
14,155
Better to just do `const err = yield User.bulkWrite(ops).then(() => null, err => err);` so you don't need to write out the whole `try/catch` block.
Automattic-mongoose
js
@@ -453,7 +453,7 @@ func evmErrToErrStatusCode(evmErr error, g genesis.Blockchain, height uint64) (e // intrinsicGas returns the intrinsic gas of an execution func intrinsicGas(data []byte) (uint64, error) { dataSize := uint64(len(data)) - if action.ExecutionDataGas == 0 || (math.MaxInt64-action.ExecutionBaseIntrin...
1
// Copyright (c) 2019 IoTeX Foundation // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use...
1
24,112
`action.ExecutionDataGas = 100`
iotexproject-iotex-core
go
@@ -124,6 +124,9 @@ class GalleryControllerTest extends TestCase $this->assertSame([$media], $gController->getGalleryMediasAction(1)); } + /** + * @group legacy + */ public function testPostGalleryMediaGalleryhasmediaAction() { $media = $this->createMock(MediaInterface::cla...
1
<?php /* * 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\Tests\Controller\Api; use Doctrine...
1
10,230
@supersmile2009 please review. Is it right to mark this as legacy? Are we testing the legacy path here? Are there tests for the non-legacy path?
sonata-project-SonataMediaBundle
php
@@ -112,11 +112,14 @@ func (c *Controller) getSpcResource(key string) (*apis.StoragePoolClaim, error) // The SPC resource may no longer exist, in which case we stop // processing. if errors.IsNotFound(err) { + runtime.HandleError(fmt.Errorf("spcGot '%s' in work queue no longer exists", key)) - return ...
1
/* Copyright 2017 The OpenEBS Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
1
8,797
getSpcResource should not be bothered about deletion. Can we have `separation of concerns` for this logic?
openebs-maya
go
@@ -4596,11 +4596,11 @@ defaultdict(<class 'list'>, {'col..., 'col...})] >>> merged.sort_values(by=['lkey', 'value_x', 'rkey', 'value_y']) lkey value_x rkey value_y 0 bar 2 bar 6 - 1 baz 3 baz 7 - 2 foo 1 foo 5 - 3 foo ...
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
10,940
This is actually matched with pandas's result since the output is sorted.
databricks-koalas
py
@@ -37,12 +37,12 @@ var ConfigCmd = &cobra.Command{ // Config defines the config schema type Config struct { - Endpoint string `yaml:"endpoint""` - WalletList map[string]string `yaml:"walletList"` + Endpoint string `yaml:"endpoint""` + AccountList map[string]string `yaml:"walletList"` } ...
1
// Copyright (c) 2019 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,893
struct field tag `yaml:"endpoint""` not compatible with reflect.StructTag.Get: key:"value" pairs not separated by spaces (from `govet`)
iotexproject-iotex-core
go
@@ -41,6 +41,8 @@ TopicImpl::TopicImpl( , qos_(&qos == &TOPIC_QOS_DEFAULT ? participant_->get_default_topic_qos() : qos) , listener_(listen) , user_topic_(nullptr) + , handle_() + , num_refs_(0u) { }
1
// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima). // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless re...
1
18,300
This is not necessary. Topic inherits from DomainEntity which already has instance_handle_
eProsima-Fast-DDS
cpp
@@ -31,7 +31,7 @@ func TestICMPPortUnreachable(t *testing.T) { _, ipv4, _, _, pktBytes, err := testPacketUDPDefault() Expect(err).NotTo(HaveOccurred()) - runBpfUnitTest(t, "icmp_port_unreachable.c", func(bpfrun bpfProgRunFn) { + runBpfUnitTest(t, "icmp_port_unreachable.c", false, func(bpfrun bpfProgRunFn) { re...
1
// Copyright (c) 2019-2021 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
1
19,322
Do we need the forXDP parameter in runBpfUnitTest? If not, I think better to revert in order to save a few changes.
projectcalico-felix
go
@@ -68,8 +68,8 @@ func (c *cstorSnapshotCommand) validateOptions() error { return nil } -// getSnapshotObj returns a filled object of CASSnapshot -func (c *cstorSnapshotCommand) getSnapshotObj() *apis.CASSnapshot { +// casSnapshot returns a filled object of CASSnapshot +func (c *cstorSnapshotCommand) casSnapshot()...
1
/* Copyright 2018 The OpenEBS Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
1
10,052
All the code that reference to this function must also be changed.
openebs-maya
go
@@ -49,4 +49,12 @@ public interface UserManager { public Role getRole(String roleName); public boolean validateProxyUser(String proxyUser, User realUser); + + /** + * @param username e.g. user alias + * @param groupName e.g. name of hadoop headless group / LDAP group + * @return Returns true if the user ...
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
23,000
How is this new interface different from existing `validateProxyUser` method? If I understand correctly the `proxyUser` parameter is essentially a group and the method should verify if `realUser` belongs to it.
azkaban-azkaban
java
@@ -38,6 +38,7 @@ using Nethermind.Store; using Nethermind.Store.Bloom; using Nethermind.TxPool; using NUnit.Framework; +using BlockTree = Nethermind.Blockchain.BlockTree; namespace Nethermind.JsonRpc.Test.Modules.Trace {
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,765
Do we have namespace conflicts?
NethermindEth-nethermind
.cs
@@ -224,7 +224,7 @@ func (s *server) run(ctx context.Context, t cli.Telemetry) error { if s.useFakeResponse { service = api.NewFakeWebAPI() } else { - service = api.NewWebAPI(ds, sls, alss, cmds, cfg.ProjectMap(), encryptDecrypter, t.Logger) + service = api.NewWebAPI(ctx, ds, sls, alss, cmds, cfg.ProjectM...
1
// Copyright 2020 The PipeCD Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
1
11,088
We have several groups of caches so I think we should not use this shared configuration value for all of them. Instead of that, each cache group should have a separate configuration field, and the added `validation cache` should have its own field too. But this point, they can be fixed by `24h`.
pipe-cd-pipe
go
@@ -26,12 +26,12 @@ class Replicate implements AdapterInterface, MetadataSupporter /** * @var AdapterInterface */ - protected $master; + protected $primary; /** * @var AdapterInterface */ - protected $slave; + protected $secondary; /** * @var LoggerInterface
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\Filesyste...
1
11,361
This is a BC break for extending classes, it can't be done on 3.x
sonata-project-SonataMediaBundle
php
@@ -950,10 +950,13 @@ class Key(object): if isinstance(md5, bytes): md5 = md5.decode('utf-8') - if self.etag != '"%s"' % md5: - raise provider.storage_data_error( - 'ETag from S3 did not match computed MD5. ' - '%s vs. %s' %...
1
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Nexenta Systems Inc. # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the...
1
10,222
Line length (PEP8, should be 80 chars max)
boto-boto
py
@@ -42,6 +42,8 @@ public abstract class MessageBuilder { private final Context context; private final MessageIdGenerator messageIdGenerator; private final BoundaryGenerator boundaryGenerator; + private static final String highPriorityTag = "X-Priority"; + private static final String xPriorityConten...
1
package com.fsck.k9.message; import java.util.Date; import java.util.List; import java.util.Locale; import android.app.Activity; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import timber.log.Timber; import com.fsck.k9.Account.QuoteSty...
1
15,540
this is duplicate now. I suggest moving it into `MimeHeader`, we already have a bunch of other headers there
k9mail-k-9
java
@@ -551,11 +551,15 @@ func checkPassword(password string) (string, error) { if !utf8.ValidString(password) { return "", errors.New("password contains invalid utf8 characters") } - // Remove leading+trailing whitespace - password = strings.TrimSpace(password) + // Check for leading/trailing whitespace + trimmedPa...
1
// Read, write and edit the config file package fs import ( "bufio" "bytes" "crypto/aes" "crypto/cipher" "crypto/rand" "crypto/sha256" "encoding/base64" "encoding/json" "fmt" "io" "io/ioutil" "log" "net" "os" "os/user" "path/filepath" "regexp" "sort" "strconv" "strings" "time" "unicode/utf8" "...
1
6,416
Can you expand the warning slightly "Your password contains leading/trailing whitespace - in previous versions of rclone this was stripped" Just so users know they might have to type their password without a leading space.
rclone-rclone
go
@@ -596,7 +596,7 @@ namespace pwiz.Skyline var message = TextUtil.SpaceSeparate( Resources.SkylineWindow_FindIrtDatabase_The_database_file_specified_could_not_be_opened, e.Message); - MessageBox.Sho...
1
/* * Original author: Brendan MacLean <brendanx .at. u.washington.edu>, * MacCoss Lab, Department of Genome Sciences, UW * * Copyright 2009 University of Washington - Seattle, WA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in co...
1
13,967
I think "this" should be "parent".
ProteoWizard-pwiz
.cs
@@ -331,6 +331,8 @@ ostree_async_progress_set (OstreeAsyncProgress *self, if (self->dead) goto out; + changed = FALSE; + va_start (ap, self); for (key = va_arg (ap, const char *), format_string = va_arg (ap, const char *);
1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- * * Copyright (C) 2013 Colin Walters <walters@verbum.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either *...
1
10,437
Why not init this at variable decl time instead?
ostreedev-ostree
c
@@ -25,6 +25,11 @@ const ( ProjectIDEnvKey = "PROJECT_ID" ) +// ProjectIDEnvConfig is a struct to parse Project id from env var +type ProjectIDEnvConfig struct { + ProjectID string `envconfig:"PROJECT_ID"` +} + // ProjectID returns the project ID for a particular resource. func ProjectID(project string, client m...
1
/* Copyright 2019 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
1
18,338
Do we still need this if we're doing everything through `envconfig`?
google-knative-gcp
go
@@ -22,6 +22,8 @@ type OptionsNetwork struct { Testnet bool Localnet bool + IdentityCheck bool + DiscoveryAPIAddress string BrokerAddress string
1
/* * Copyright (C) 2018 The "MysteriumNetwork/node" Authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
1
11,985
I would like these options to have `experiment` prefix or suffix. Because we will be deleting them later
mysteriumnetwork-node
go
@@ -88,7 +88,11 @@ <%= f.label :additional_info, 'Please include any additional information you feel we need to correctly execute the purchase' %> <%= f.text_area :additional_info, class: 'form-control' %> </div> - <%= f.submit class: 'form-button' %> + <% unless ENV['DISABLE_SANDBOX_WARNING'] ...
1
<% content_for :title, "GSA 18f Purchase Request" %> <div class="container content m-request-form"> <h2>GSA 18f</h2> <h3>Purchase Request - Supplies</h3> <p>Eg; ergonomic keyboards, foamcore boards, ergonomic mice, monitor stands, post-its, sharpies, etc. </p> <%= form_for @model_instance do |f| %> <!-- Off...
1
14,077
Since we have the same logic in both forms, can we make a shared partial/helper for it?
18F-C2
rb
@@ -69,10 +69,12 @@ func NewSalesman(opts ...Option) (*Salesman, error) { if err := o.Validate(); err != nil { return nil, err } + marketAddr := blockchain.MarketAddr().Hex() + askPlansKey := marketAddr + "/ask_plans" s := &Salesman{ options: o, - askPlanStorage: state.NewKeyedStorage("ask_plans...
1
package salesman import ( "context" "crypto/ecdsa" "errors" "fmt" "sync" "time" "github.com/ethereum/go-ethereum/crypto" "github.com/mohae/deepcopy" "github.com/pborman/uuid" "github.com/sonm-io/core/blockchain" "github.com/sonm-io/core/insonmnia/cgroups" "github.com/sonm-io/core/insonmnia/hardware" "git...
1
7,198
Why to introduce this intermediate variable?
sonm-io-core
go
@@ -43,6 +43,9 @@ class webhdfs(luigi.Config): description='Port for webhdfs') user = luigi.Parameter(default='', description='Defaults to $USER envvar', config_path=dict(section='hdfs', name='user')) + client_type = luigi.Parameter(default='insecure', ...
1
# -*- coding: utf-8 -*- # # Copyright 2015 VNG Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
1
18,331
Maybe use ChoiceParameter?
spotify-luigi
py
@@ -2,11 +2,12 @@ class ProposalsController < ApplicationController include TokenAuth before_filter :authenticate_user!, except: :approve - before_filter ->{authorize self.proposal}, only: :show + before_filter ->{authorize self.proposal}, only: [:show, :cancel, :cancel_form] before_filter :needs_token_on_...
1
class ProposalsController < ApplicationController include TokenAuth before_filter :authenticate_user!, except: :approve before_filter ->{authorize self.proposal}, only: :show before_filter :needs_token_on_get, only: :approve before_filter :validate_access, only: :approve helper_method :display_status add...
1
13,387
Not positive is this is needed, given the `TokenAuth` include
18F-C2
rb
@@ -50,3 +50,13 @@ class ErrorDescriptionDict(TypedDict): CheckerStats = Dict[ str, Union[int, "Counter[str]", List, Dict[str, Union[int, str, Dict[str, int]]]] ] + + +# Tuple with information about the location of a to-be-displayed message +class MessageLocationTuple(NamedTuple): + abspath: str + path: st...
1
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE """A collection of typing utilities.""" import sys from typing import TYPE_CHECKING, Dict, List, NamedTuple, Union if TYPE_CHECKING: from typing import Counter # typin...
1
16,074
Why not use a docstring for it?
PyCQA-pylint
py
@@ -3672,4 +3672,17 @@ public class BesuCommandTest extends CommandTestAbstract { assertThat(commandErrorOutput.toString()) .contains("Invalid value for option", "--Xws-timeout-seconds", "abc", "is not a long"); } + + @Test + public void assertThatDuplicatePortSpecifiedFails() { + parseCommand("--...
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
23,478
Two more tests - no ports specified and every possible port specified - p2pPort, graphQLHttpPort, rpcHttpPort, rpcWsPort, metricsPort, metricsPushPort, stratumPort
hyperledger-besu
java
@@ -9,6 +9,7 @@ # Copyright (c) 2019-2020 Pierre Sassoulas <pierre.sassoulas@gmail.com> # Copyright (c) 2019 Ashley Whetter <ashley@awhetter.co.uk> # Copyright (c) 2019 Taewon D. Kim <kimt33@mcmaster.ca> +# Copyright (c) 2020 Eli Fine <ejfine@gmail.com> # Licensed under the GPL: https://www.gnu.org/licenses/old-l...
1
# Copyright (c) 2010, 2012, 2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2012 Ry4an Brase <ry4an-hg@ry4an.org> # Copyright (c) 2014 Google, Inc. # Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro> # Copyright (c) 2016-2018, 2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) ...
1
12,377
Don't worry about that next time, it's automated :)
PyCQA-pylint
py
@@ -172,6 +172,7 @@ def pytest_configure(config): # pylint: disable=unused-variable if config.webengine: import PyQt5.QtWebEngineWidgets + # pylint: enable=unused-variable @pytest.fixture(scope='session', autouse=True)
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-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
19,422
No need for this, as pylint already only turns things off for this function and it's needed for the entire function.
qutebrowser-qutebrowser
py
@@ -103,10 +103,11 @@ const ( fluentTagDockerFirelensV2Format = "%s.%s" // Environment variables are needed for firelens - fluentNetworkHost = "FLUENT_HOST" - fluentNetworkPort = "FLUENT_PORT" - FluentNetworkPortValue = "24224" - FluentAWSVPCHostValue = "127.0.0.1" + fluentNetworkHost = "FLUENT_...
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 acco...
1
26,678
Are these values expected to change over time? Why not inject these values in ECS backend instead of agent doing it?
aws-amazon-ecs-agent
go
@@ -31,6 +31,17 @@ func run(app *cli.Context, cfg *cmds.Server) error { return err } + nodeName := app.String("node-name") + if nodeName == "" { + h, err := os.Hostname() + if err != nil { + return err + } + nodeName = h + } + + os.Setenv("NODE_NAME", nodeName) + var serverConfig server.Config serverCo...
1
package etcdsnapshot import ( "context" "errors" "os" "path/filepath" "github.com/erikdubbelboer/gspt" "github.com/rancher/k3s/pkg/cli/cmds" "github.com/rancher/k3s/pkg/cluster" "github.com/rancher/k3s/pkg/daemons/config" "github.com/rancher/k3s/pkg/etcd" "github.com/rancher/k3s/pkg/server" "github.com/ran...
1
9,446
as best i can tell, you are setting this here in order to make it available in `(e *ETCD) Snapshot(ctx context.Context, config *config.Control) error`. It feels wrong to pass state like this through an env var. Could you instead add a `nodeName` property to the ETCD struct?
k3s-io-k3s
go
@@ -38,6 +38,8 @@ var skipTests = map[string]string{ "covariance_missing_column_2": "need to support known errors in new test framework (https://github.com/influxdata/flux/issues/536)", "drop_before_rename": "need to support known errors in new test framework (https://github.com/influxdata/flux/issues/536)...
1
package tests_test import ( "context" "io/ioutil" "os" "path/filepath" "testing" "github.com/influxdata/flux" _ "github.com/influxdata/flux/functions/inputs" // Import the built-in inputs _ "github.com/influxdata/flux/functions/outputs" // Import the built-in outputs _ "github.com/influxdata...
1
9,372
These seem to support the new test framework below, but the `.in.csv` files are still committed.
influxdata-flux
go
@@ -227,8 +227,11 @@ namespace Nethermind.Blockchain.Receipts for (int i = 0; i < txReceipts.Length; i++) { - var txHash = block.Transactions[i].Hash; - _transactionDb.Set(txHash, block.Hash.Bytes); + if (txReceipts[i].Removed == false...
1
// Copyright (c) 2021 Demerzel Solutions Limited // This file is part of the Nethermind library. // // The Nethermind library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of ...
1
25,716
!txReceipts[i].Removed and We can check it for first item outside of for loop, we don't expect mixed batches
NethermindEth-nethermind
.cs
@@ -40,7 +40,7 @@ const ( prodEnvFlag = "prod" deployFlag = "deploy" resourcesFlag = "resources" - githubURLFlag = "github-url" + repoURLFlag = "url" githubAccessTokenFlag = "github-access-token" gitBranchFlag = "git-branch" envsFlag = "env...
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli import ( "fmt" "strings" "github.com/aws/copilot-cli/internal/pkg/manifest" "github.com/aws/copilot-cli/internal/pkg/template" ) // Long flag names. const ( // Common flags. nameFlag = ...
1
15,970
We can't unfortunately change any of our old flags :( it'd be a breaking change. Instead, we can keep both `githubURLFlag` and `repoURLFlag` and make the description of `githubURLFlagDescription` as "(Deprecated) Use --url instead. GitHub respository URL for your service." It would be even better if we can make `github...
aws-copilot-cli
go
@@ -61,7 +61,10 @@ Puppet::Functions.create_function(:run_plan, Puppet::Functions::InternalFunction return result end + # Could not find plan - raise ArgumentError, "Function #{self.class.name}(): Unknown plan: '#{plan_name}'" + raise Puppet::ParseErrorWithIssue.from_issue_and_stack( + Pup...
1
# Runs the `plan` referenced by its name passing giving arguments to it given as a hash of name to value mappings. # A plan is autoloaded from under <root>/plans if not already defined. # # @example defining and running a plan # plan myplan($x) { # # do things with tasks # notice "plan done with param x = ${x...
1
7,829
This provides file and line number if applicable.
puppetlabs-bolt
rb
@@ -10,6 +10,7 @@ import math from matplotlib import pyplot as plt import os import pandas as pd +import numpy as np import random import re import shutil
1
# This file is generated automatically through: # d2lbook build lib # Don't edit it directly # Defined in file: ./chapter_preface/index.md import collections from collections import defaultdict from IPython import display import math from matplotlib import pyplot as plt import os import pandas as pd import random i...
1
18,999
This is already imported. Please check the file.
d2l-ai-d2l-en
py
@@ -1676,6 +1676,11 @@ public class WindowWidget extends UIWidget implements SessionChangeListener, if (aSelection.isActionAvailable(action)) { aSelection.execute(action); } + if (GeckoSession.SelectionActionDelegate.ACTION_COPY.equals(action) && + ...
1
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*- * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package org.mozilla.vrbrowser.ui.wi...
1
8,651
One thing we can do in a follow up is use the shorthand calls, so You can just call `aSelection.unselect()` instead of calling the more verbose `execute()`. The fact that you have to check if the action is available sort of sucks though.
MozillaReality-FirefoxReality
java
@@ -519,10 +519,10 @@ func (st *ServerType) serversFromPairings( for _, h := range hosts { if h == defaultSNI { hosts = append(hosts, "") - cp.DefaultSNI = defaultSNI break } } + cp.DefaultSNI = defaultSNI // TODO: are matchers needed if every hostname of the ...
1
// Copyright 2015 Matthew Holt and The Caddy Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicab...
1
14,410
I don't think adding this value to _every_ connection policy is needed or useful... why is this necessary?
caddyserver-caddy
go
@@ -10,7 +10,11 @@ declare(strict_types=1); namespace Ergonode\Product\Infrastructure\Provider\Strategy; use Ergonode\Attribute\Domain\Entity\AbstractAttribute; -use Ergonode\Attribute\Infrastructure\Provider\AttributeValueConstraintStrategyInterface; +use Ergonode\Attribute\Infrastructure\Provider\ContextAwareAttr...
1
<?php /** * Copyright © Ergonode Sp. z o.o. All rights reserved. * See LICENSE.txt for license details. */ declare(strict_types=1); namespace Ergonode\Product\Infrastructure\Provider\Strategy; use Ergonode\Attribute\Domain\Entity\AbstractAttribute; use Ergonode\Attribute\Infrastructure\Provider\AttributeValueCon...
1
9,559
adding this constrain for null AggreagateId is redundant
ergonode-backend
php
@@ -103,7 +103,12 @@ func Dashboard(ctx *middleware.Context) { feeds := make([]*models.Action, 0, len(actions)) for _, act := range actions { if act.IsPrivate { - if has, _ := models.HasAccess(ctx.User, &models.Repository{Id: act.RepoId, IsPrivate: true}, models.ACCESS_MODE_READ); !has { + repo := &models.Re...
1
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package user import ( "bytes" "fmt" "strings" "github.com/Unknwon/com" "github.com/gogits/gogs/models" "github.com/gogits/gogs/modules/base" "github...
1
8,737
Why when current user is owner but still check access? Should we use `else if` here?
gogs-gogs
go
@@ -4,12 +4,18 @@ import ( "errors" "fmt" "strings" + "time" docker "github.com/fsouza/go-dockerclient" . "github.com/weaveworks/weave/common" ) +const ( + InitialInterval = 1 * time.Second + MaxInterval = 60 * time.Second +) + // An observer for container events type ContainerObserver interface ...
1
package docker import ( "errors" "fmt" "strings" docker "github.com/fsouza/go-dockerclient" . "github.com/weaveworks/weave/common" ) // An observer for container events type ContainerObserver interface { ContainerStarted(ident string) ContainerDied(ident string) } type Client struct { *docker.Client } // ...
1
12,629
60 seems high. 10? 20?
weaveworks-weave
go
@@ -755,8 +755,8 @@ def server_init_start(args): # Create the main database link from the arguments passed over the # command line. - default_product_path = os.path.join(args.config_directory, - 'Default.sqlite') + cfg_dir = os.path.abspath(args.config_directory)...
1
# ------------------------------------------------------------------------- # The CodeChecker Infrastructure # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # -------------------------------------------------------------------------...
1
9,287
I think this is not the best way to handle this problem. This way every relative path will be converted to absolute path. What if the user would like to move his config directory to a different directory?
Ericsson-codechecker
c
@@ -169,6 +169,10 @@ type NetworkSpec struct { // Subnets configuration. // +optional Subnets Subnets `json:"subnets,omitempty"` + + // ControlPlaneLoadBalancerScheme (defaults to Internet-facing) + // +optional + ControlPlaneLoadBalancerScheme ClassicELBScheme `json:"controlPlaneLoadBalancerScheme,omitempty""` ...
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 agreed to in writing, ...
1
11,317
Let's make this a pointer given that's optional
kubernetes-sigs-cluster-api-provider-aws
go
@@ -4,6 +4,7 @@ * Module dependencies. */ +var CircularJSON = require('circular-json'); var Stream = require('stream').Stream; var utils = require('./utils'); var helpers = require('./queryhelpers');
1
/* eslint no-empty: 1 */ /*! * Module dependencies. */ var Stream = require('stream').Stream; var utils = require('./utils'); var helpers = require('./queryhelpers'); var K = function(k) { return k; }; /** * Provides a Node.js 0.8 style [ReadStream](http://nodejs.org/docs/v0.8.21/api/stream.html#stream_readable...
1
13,579
Why is CircularJSON imported here? It is never used in this file.
Automattic-mongoose
js
@@ -80,7 +80,11 @@ namespace AutoRest.Swagger { // Look for semantic errors and warnings in the document. var validator = new RecursiveObjectValidator(PropertyNameResolver.JsonName); - foreach (var validationEx in validator.GetValidationExceptions(ServiceDef...
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.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.Linq; using AutoRest.Core; using AutoRest.Core...
1
24,609
Should be ARM
Azure-autorest
java
@@ -86,10 +86,10 @@ func openBucket(dir string, _ *Options) (driver.Bucket, error) { dir = filepath.Clean(dir) info, err := os.Stat(dir) if err != nil { - return nil, fmt.Errorf("open file bucket: %v", err) + return nil, err } if !info.IsDir() { - return nil, fmt.Errorf("open file bucket: %s is not a direc...
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
12,266
I don't see how removing "open file bucket" helps your purpose.
google-go-cloud
go