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
@@ -57,8 +57,8 @@ func NewCmdPoolDescribe() *cobra.Command { Use: "describe", Short: "Describes the pools", Long: poolDescribeCommandHelpText, - Run: func(cmd *cobra.Command, args []string) { - util.CheckErr(options.runPoolDescribe(cmd), util.Fatal) + Run: func(_ *cobra.Command, args []string) { + uti...
1
/* Copyright 2017 The OpenEBS Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
1
14,672
It does not look idiomatic.
openebs-maya
go
@@ -3,9 +3,12 @@ package sql_test import ( "testing" + _ "github.com/mattn/go-sqlite3" + "github.com/DATA-DOG/go-sqlmock" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" + "github.com/influxdata/flux" _ "github.com/influxdata/flux/builtin" // We need to import the builtins for the t...
1
package sql_test import ( "testing" "github.com/DATA-DOG/go-sqlmock" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/influxdata/flux" _ "github.com/influxdata/flux/builtin" // We need to import the builtins for the tests to work. "github.com/influxdata/flux/dependencies/depend...
1
12,454
Generally, we do not use newlines between project imports, we only separate them from the stdlib imports
influxdata-flux
go
@@ -770,6 +770,10 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med var isProgressClear = state.MediaSource && null == state.MediaSource.RunTimeTicks; nowPlayingPositionSlider.setIsClear(isProgressClear); + if (nowPlayingItem.RunTimeTicks) { + ...
1
define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "mediaInfo", "focusManager", "imageLoader", "scrollHelper", "events", "connectionManager", "browser", "globalize", "apphost", "layoutManager", "userSettings", "scrollStyles", "emby-slider", "paper-icon-button-light", "css!css/videoosd"], functi...
1
12,220
can this long line be wrapped?
jellyfin-jellyfin-web
js
@@ -1731,6 +1731,12 @@ class ComparisonChecker(_BasicChecker): 'comparison-with-itself', 'Used when something is compared against itself.', ), + 'W0143': ('Comparing bare callable, might have skipped parenthesis after callable', + ...
1
# -*- coding: utf-8 -*- # Copyright (c) 2006-2016 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2010 Daniel Harding <dharding@gmail.com> # Copyright (c) 2012-2014 Google, Inc. # Copyright (c) 2013-2017 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Brett Cannon <brett@python.org> # Copyri...
1
10,290
I'd use the same message that I suggested in the release changelog.
PyCQA-pylint
py
@@ -53,7 +53,7 @@ function DocumentArray (key, schema, options) { if (!Array.isArray(arr)) arr = [arr]; return new MongooseDocumentArray(arr, path, this); }); -}; +} /** * This schema type's name, to defend against minifiers that mangle
1
/*! * Module dependencies. */ var SchemaType = require('../schematype') , ArrayType = require('./array') , MongooseDocumentArray = require('../types/documentarray') , Subdocument = require('../types/embedded') , Document = require('../document'); var utils = require('../utils.js'); /** * SubdocsArray Sche...
1
12,596
Keep semi-colons at end of function defs please
Automattic-mongoose
js
@@ -2,13 +2,18 @@ const OperationBase = require('./operation').OperationBase; const resolveReadPreference = require('../utils').resolveReadPreference; +const ReadConcern = require('../read_concern'); +const WriteConcern = require('../write_concern'); class CommandOperationV2 extends OperationBase { constructo...
1
'use strict'; const OperationBase = require('./operation').OperationBase; const resolveReadPreference = require('../utils').resolveReadPreference; class CommandOperationV2 extends OperationBase { constructor(parent, options) { super(options); this.ns = parent.s.namespace.withCollection('$cmd'); this.re...
1
16,044
A little skeptical of `explain` being here. Why is this now a property of all commands?
mongodb-node-mongodb-native
js
@@ -1,5 +1,7 @@ -// Copyright (c) Microsoft. All rights reserved. -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft Corporation...
1
// Copyright (c) Microsoft. All rights reserved. // Copyright (c) Microsoft. All rights reserved. namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel { /// <summary> /// Interface used to define a data attachment. /// </summary> public interface IDataAttachment { /// <summary>...
1
11,394
License copied two times!!
microsoft-vstest
.cs
@@ -44,7 +44,8 @@ class CustomWaiter: """ def __init__( - self, name, operation, argument, acceptors, client, delay=10, max_tries=60): + self, name, operation, argument, acceptors, client, delay=10, max_tries=60, + matcher='path'): """ Subclasses should pas...
1
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Base class for implementing custom waiters for services that don't already have prebuilt waiters. This class leverages botocore waiter code. """ from enum import Enum import logging import botocore.waiter l...
1
17,932
... their **superclass**
awsdocs-aws-doc-sdk-examples
rb
@@ -526,7 +526,7 @@ module Beaker cmdline_args = conf_opts[:__commandline_args__] conf_opts = conf_opts.reject { |k,v| k == :__commandline_args__ } - curl_retries = host['master-start-curl-retries'] || options['master-start-curl-retries'] + curl_retries = host['master-start-curl-retrie...
1
# -*- coding: utf-8 -*- require 'resolv' require 'inifile' require 'timeout' require 'beaker/dsl/outcomes' module Beaker module DSL # This is the heart of the Puppet Acceptance DSL. Here you find a helper # to proxy commands to hosts, more commands to move files between hosts # and execute remote scripts...
1
6,206
I'm not sure if this is the right thing to be doing here. It seems like there should be a more systemic fix instead of this patch.
voxpupuli-beaker
rb
@@ -811,6 +811,7 @@ const baseSelectors = { /** * Gets the module's screenWidgetContext. * + * Returns `undefined` if dependencies are loading. * Returns `null` if there is no registered context string for the given module. * Returns `string` the registered context string, screenWidgetContext for the giv...
1
/** * `core/modules` data store: module info. * * 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/license...
1
38,313
Not sure why these are up here can we move these down to be part of the `@return` tag instead? This is what we usually do (e.g. `getCurrentEntityURL`)
google-site-kit-wp
js
@@ -34,12 +34,14 @@ module Blacklight::Document # but extensions should call super and modify hash returned, to avoid # unintentionally erasing values provided by other extensions. def to_semantic_values - @semantic_value_hash ||= self.class.field_semantics.each_with_object(Hash.new([])) do |(key, f...
1
# frozen_string_literal: true module Blacklight::Document module SemanticFields extend ActiveSupport::Concern module ClassMethods # Returns array of hashes of registered extensions. Each hash # has a :module_obj key and a :condition_proc key. Usually this # method is only used internally in...
1
7,724
Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning.
projectblacklight-blacklight
rb
@@ -0,0 +1,18 @@ +package org.openqa.selenium; + +/** + * Created by James Reed on 11/04/2016. + * Thrown to indicate that a click was attempted on an element but was intercepted by another + * element on top of it + */ +public class InterceptingElementException extends InvalidElementStateException { + + public Interc...
1
1
13,182
We keep who wrote the code anonymous.
SeleniumHQ-selenium
java
@@ -25,6 +25,12 @@ func (client *clientFake) NodeRegister(proposal dto_discovery.ServiceProposal) ( return nil } +func (client *clientFake) RegisterIdentity(identity dto_discovery.Identity) (err error) { + log.Info(MYSTERIUM_API_LOG_PREFIX, "Identity registered: ", identity) + + return nil +} + func (client *clie...
1
package server import ( "github.com/mysterium/node/server/dto" "fmt" log "github.com/cihub/seelog" dto_discovery "github.com/mysterium/node/service_discovery/dto" ) func NewClientFake() Client { return &clientFake{ proposalsByProvider: make(map[string]dto_discovery.ServiceProposal, 0), } } type clientFake s...
1
9,654
Mention something in logs, that fake registration was used e.g. `Fake identity registered`
mysteriumnetwork-node
go
@@ -151,10 +151,12 @@ const baseActions = { return; } - registry.dispatch( STORE_NAME ).setPropertyID( propertyID ); - if ( PROPERTY_CREATE === propertyID ) { - registry.dispatch( STORE_NAME ).setProfileID( PROFILE_CREATE ); + registry.dispatch( STORE_NAME ).setSettings( { + propertyID, + ...
1
/** * `modules/analytics` data store: properties. * * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/lic...
1
33,553
I think it would make sense to also set `internalWebPropertyID` to `''` here. Otherwise, it might keep its previous value (let's say a property was selected before, but then the user chooses "Create new property"), but since it always should depend on `propertyID`, that would be incorrect.
google-site-kit-wp
js
@@ -779,3 +779,18 @@ TEST_CASE("setDoubleBondNeighborDirections()", "[stereochemistry,bug]") { CHECK(MolToSmiles(*m) == "C/C=C\\C"); } } + +TEST_CASE("github #2782: addHs() fails on atoms with 'bad' valences", "[bug]") { + SECTION("basics") { + SmilesParserParams ps; + ps.sanitize = false; + std::uni...
1
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do // this in one cpp file #include "catch.hpp" #include <GraphMol/RDKitBase.h> #include <GraphMol/new_canon.h> #include <GraphMol/RDKitQueries.h> #include <GraphMol/Chirality.h> #include <GraphMol/FileParsers/FilePars...
1
20,063
It might be reasonable to add a check that sanitization still fails here.
rdkit-rdkit
cpp
@@ -602,9 +602,8 @@ public class JobRunner extends EventHandler implements Runnable { } final int attemptNo = this.node.getAttempt(); - logInfo("Finishing job " + this.jobId + " attempt: " + attemptNo + " at " + logInfo("Finishing job " + this.jobId + (this.node.getAttempt() > 0 ? (" retry: " + attemp...
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
14,251
Why not use attemptNo instead of another call to getAttempt? Even better, consider using a private method to calculate this string. This logic is in two places.
azkaban-azkaban
java
@@ -2,7 +2,7 @@ module ProjectAssociations extend ActiveSupport::Concern included do - has_many :links, -> { where(deleted: false) } + has_many :links, -> { where("links.deleted = 'f'") } has_one :permission, as: :target has_many :analyses has_many :analysis_summaries, through: :analyses
1
module ProjectAssociations extend ActiveSupport::Concern included do has_many :links, -> { where(deleted: false) } has_one :permission, as: :target has_many :analyses has_many :analysis_summaries, through: :analyses has_many :taggings, as: :taggable has_many :tags, through: :taggings be...
1
7,979
Yuck. Rails bug.
blackducksoftware-ohloh-ui
rb
@@ -927,6 +927,15 @@ class Packet(six.with_metaclass(Packet_metaclass, BasePacket)): return self.payload.answers(other.payload) return 0 + def layers(self): + """returns a list of layer classes (including subclasses) in this packet""" # noqa: E501 + layers = [] + l = sel...
1
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """ Packet class. Binding mechanism. fuzz() method. """ from __future__ import absolute_import from __future__ import print_f...
1
13,646
It's useally a common practice to not use `l` as a variable (we have disabled this test in scapy because our code has tons, but it would have PEP8 failed otherwise), but it would be better not to create any. In general, single letter variables are not liked that much. Especially with windows where the fonts make 1=l Ho...
secdev-scapy
py
@@ -40,6 +40,12 @@ func (s *server) chunkUploadHandler(w http.ResponseWriter, r *http.Request) { return } + w.Header().Set(SwarmTagUidHeader, fmt.Sprint(tag.Uid)) + w.WriteHeader(http.StatusContinue) + if f, ok := w.(http.Flusher); ok { + f.Flush() + } + // Add the tag to the context ctx := sctx.SetTag(r.Co...
1
// Copyright 2020 The Swarm Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package api import ( "bytes" "errors" "fmt" "io" "io/ioutil" "net/http" "github.com/ethersphere/bee/pkg/netstore" "github.com/ethersphere/bee/pkg/...
1
11,927
DRY these 5 lines into a function call, no?
ethersphere-bee
go
@@ -113,12 +113,13 @@ func Main() int { signal.Notify(term, os.Interrupt, syscall.SIGTERM) select { case <-term: - fmt.Fprint(os.Stdout, "Received SIGTERM, exiting gracefully...") + logger.Log("msg", "Received SIGTERM, exiting gracefully...") l.Close() close(stopc) wg.Wait() - case <-errc: - fmt.Fprin...
1
// Copyright 2016 The prometheus-operator 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 ...
1
7,461
should we be trying to close here? or just return directly @fabxc ? same goes for `stopc`...
prometheus-operator-prometheus-operator
go
@@ -177,7 +177,7 @@ describe Ncr::ApprovalManager do context "for a BA60 or BA61 request" do it "uses BA61 tier1 team approver when org code matches" do - org_letters = %w( 7 J 4 T 1 A C Z ) + org_letters = %w( 1 4 7 A C J T Z ) org_letters.each do |org_letter| org_code =...
1
describe Ncr::ApprovalManager do describe '#setup_approvals_and_observers' do let (:ba61_tier_one) { Ncr::Mailboxes.ba61_tier1_budget } let (:ba61_tier_two) { Ncr::Mailboxes.ba61_tier2_budget } it "creates approvers when not an emergency" do wo = create(:ncr_work_order, expense_type: 'BA61') ...
1
17,160
just re-ordered for clarity
18F-C2
rb
@@ -69,13 +69,13 @@ func NewVolumeInfo(URL string, volname string, namespace string) (volInfo *Volum } if resp != nil && resp.StatusCode != 200 { if resp.StatusCode == 500 { - fmt.Printf("Volume: %s not found at M_API server\n", volname) + fmt.Printf("Volume: %s not found at namespace: %q\n", volname, namesp...
1
/* Copyright 2017 The OpenEBS Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
1
9,290
Can you fix this also to print what is the IP address used to connect. Rename --> "M_API server" to maya apiservice
openebs-maya
go
@@ -205,6 +205,18 @@ func decodeUTF8(s string, index uintptr) (rune, uintptr) { } } +// indexByte returns the index of the first instance of c in the byte slice b, +// or -1 if c is not present in the byte slice. +//go:linkname indexByte internal/bytealg.IndexByte +func indexByte(b []byte, c byte) int { + for i, x...
1
package runtime // This file implements functions related to Go strings. import ( "unsafe" ) // The underlying struct for the Go string type. type _string struct { ptr *byte length uintptr } // The iterator state for a range over a string. type stringIterator struct { byteindex uintptr } // Return true iff ...
1
8,089
This fails on Go 1.11 because `indexByte` is already defined in strings_go111.go. I would suggest simply renaming one of the two, for example you could rename the other one to `strings_indexByte` (that will be one of the things we'll drop when we drop Go 1.11 support so it's better to make that one look ugly instead of...
tinygo-org-tinygo
go
@@ -868,7 +868,7 @@ CreateParameter(1) Parameter #1 Direction=Input Parameter #1 Name=@level Parameter #1 MockDbType=Int32 -Parameter #1 Value=""{0}"" +Parameter #1 Value={0} Add Parameter Parameter #1 CreateParameter(2) Parameter #2 Direction=Input
1
// // Copyright (c) 2004-2021 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // * Redistributions of s...
1
23,028
Now `dbType=' MockDbType.int32 '` is correctly interpreted and the value is rendered as an integer instead of a string; hence no more double quotes.
NLog-NLog
.cs
@@ -63,7 +63,7 @@ class Comment extends AbstractAggregateRoot public function changeContent(string $contend): void { if ($contend !== $this->content) { - $this->apply(new CommentContentChangedEvent($this->id, $this->content, $contend, new \DateTime())); + $this->apply(new Commen...
1
<?php /** * Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved. * See LICENSE.txt for license details. */ declare(strict_types=1); namespace Ergonode\Comment\Domain\Entity; use Ergonode\SharedKernel\Domain\Aggregate\UserId; use Ergonode\EventSourcing\Domain\AbstractAggregateRoot; use Ergonode\Comment...
1
9,096
typo in `$contend`
ergonode-backend
php
@@ -28,9 +28,13 @@ import com.netflix.iceberg.TableOperations; import com.netflix.iceberg.Tables; import com.netflix.iceberg.exceptions.AlreadyExistsException; import com.netflix.iceberg.exceptions.NoSuchTableException; +import com.netflix.iceberg.exceptions.RuntimeIOException; import org.apache.hadoop.conf.Configu...
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
12,975
Nit: empty line
apache-iceberg
java
@@ -185,6 +185,10 @@ func (fs *KBFSOpsStandard) DeleteFavorite(ctx context.Context, } func (fs *KBFSOpsStandard) getOpsNoAdd(fb FolderBranch) *folderBranchOps { + if fb == (FolderBranch{}) { + panic("zero FolderBranch in getOps") + } + fs.opsLock.RLock() if ops, ok := fs.ops[fb]; ok { fs.opsLock.RUnlock()
1
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libkbfs import ( "errors" "fmt" "sync" "time" "github.com/keybase/client/go/logger" "golang.org/x/net/context" ) // KBFSOpsStandard implements the KBFS...
1
13,125
I figured this was more fool-proof than trying to plumb the error up from everywhere.
keybase-kbfs
go
@@ -192,8 +192,8 @@ func (c *client) initClient() { c.cid = atomic.AddUint64(&s.gcid, 1) c.bw = bufio.NewWriterSize(c.nc, startBufSize) c.subs = make(map[string]*subscription) - c.debug = (atomic.LoadInt32(&debug) != 0) - c.trace = (atomic.LoadInt32(&trace) != 0) + c.debug = (atomic.LoadInt32(&c.srv.logging.debug...
1
// Copyright 2012-2016 Apcera Inc. All rights reserved. package server import ( "bufio" "crypto/tls" "encoding/json" "fmt" "math/rand" "net" "sync" "sync/atomic" "time" ) // Type of client connection. const ( // CLIENT is an end user. CLIENT = iota // ROUTER is another router in the cluster. ROUTER ) c...
1
7,004
We know debug and trace as globals exist and are defaulted to 0. In this instance we need to know that c is non- nil, srv is non-nil and logging is non-nil before we can trust this statement not to panic.
nats-io-nats-server
go
@@ -58,7 +58,6 @@ type Provider interface { func NewApp(AppRoot string, provider string) (*DdevApp, error) { // Set defaults. app := &DdevApp{} - app.ConfigPath = filepath.Join(AppRoot, ".ddev", "config.yaml") app.AppRoot = AppRoot app.ConfigPath = app.GetConfigPath("config.yaml")
1
package ddevapp import ( "bytes" "fmt" "html/template" "io/ioutil" "os" "path/filepath" "strings" "regexp" "github.com/drud/ddev/pkg/appports" "github.com/drud/ddev/pkg/exec" "github.com/drud/ddev/pkg/fileutil" "github.com/drud/ddev/pkg/output" "github.com/drud/ddev/pkg/util" "github.com/drud/ddev/pkg/...
1
12,787
Good removal here for two reasons: we're redeclaring `app.ConfigPath` immediately below without having used the initial value, and `app.GetConfigPath()` will build the value using the same process as in this line anyway.
drud-ddev
php
@@ -193,9 +193,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors new RunSpecificTestsArgumentProcessor(), new TestAdapterPathArgumentProcessor(), new TestCaseFilterArgumentProcessor(), - new OutputArgumentProcessor(), ...
1
// Copyright (c) Microsoft. All rights reserved. namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors { using System; using System.Collections.Generic; using System.Diagnostics.Contracts; using System.Linq; using Microsoft.VisualStudio.TestPlatform.ObjectModel; /// <summary> ...
1
11,237
Should BuildBase be removed?
microsoft-vstest
.cs
@@ -1,13 +1,14 @@ package internal_test import ( + "io/ioutil" "os" + "path" "regexp" "testing" - "github.com/golangci/golangci-lint/pkg/fsutils" - ast "github.com/stretchr/testify/assert" - req "github.com/stretchr/testify/require" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/requi...
1
package internal_test import ( "os" "regexp" "testing" "github.com/golangci/golangci-lint/pkg/fsutils" ast "github.com/stretchr/testify/assert" req "github.com/stretchr/testify/require" tf "github.com/filecoin-project/go-filecoin/testhelpers/testflags" . "github.com/filecoin-project/go-filecoin/tools/migrati...
1
18,853
this was a bad Goland auto-import that I missed in the previous PR. Thanks to @rkowalick and @acruikshank for catching it
filecoin-project-venus
go
@@ -133,10 +133,12 @@ TEST_CASE("github #2224", "[bug, molops, removeHs, query]") { } { // but if we add a query feature it's not removed RWMol m2(*mol); - m2.replaceAtom(1, new QueryAtom(1)); + auto *qa = new QueryAtom(1); + m2.replaceAtom(1, qa); m2.getAtomWithIdx(1)->setAtomic...
1
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do // this in one cpp file #include "catch.hpp" #include <GraphMol/RDKitBase.h> #include <GraphMol/RDKitQueries.h> #include <GraphMol/Chirality.h> #include <GraphMol/FileParsers/FileParsers.h> #include <GraphMol/Smiles...
1
18,992
Good catch here. Reading the code, it actually seems kind of dumb that `replaceAtom` needs to copy the atom it's passed. Ah well, we're more or less stuck with that.
rdkit-rdkit
cpp
@@ -560,6 +560,17 @@ void wlr_output_schedule_frame(struct wlr_output *output) { wl_event_loop_add_idle(ev, schedule_frame_handle_idle_timer, output); } +void wlr_output_send_present(struct wlr_output *output, struct timespec *when, + unsigned seq, uint32_t flags) { + struct wlr_output_event_present event = { + ...
1
#define _POSIX_C_SOURCE 200809L #include <assert.h> #include <stdlib.h> #include <string.h> #include <tgmath.h> #include <time.h> #include <wayland-server.h> #include <wlr/interfaces/wlr_output.h> #include <wlr/render/wlr_renderer.h> #include <wlr/types/wlr_box.h> #include <wlr/types/wlr_matrix.h> #include <wlr/types/w...
1
12,633
What's the reason for adding the output pointer here? I'd expect it to be derivable from the actual handler that's called.
swaywm-wlroots
c
@@ -82,6 +82,10 @@ class Plan < ActiveRecord::Base annual_plan.price end + def annualized_savings + annualized_payment - discounted_annual_payment + end + def annual_plan_sku annual_plan.sku end
1
class Plan < ActiveRecord::Base PRIME_249_SKU = "prime-249" PROFESSIONAL_SKU = "professional" THE_WEEKLY_ITERATION_SKU = "the-weekly-iteration" has_many :checkouts has_many :subscriptions, as: :plan belongs_to :annual_plan, class_name: "Plan" validates :description, presence: true validates :price, pr...
1
14,102
I don't see tests for this (or the similar method on `Team`).
thoughtbot-upcase
rb
@@ -35,12 +35,9 @@ public class SetNetworkConnection extends WebDriverHandler<Number> implements Js @SuppressWarnings("unchecked") @Override public void setJsonParameters(Map<String, Object> allParameters) throws Exception { - Map<String, Map<String, Object>> parameters = (Map<String, Map<String, Object>>)al...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
13,952
should use Number instead of Long
SeleniumHQ-selenium
java
@@ -281,8 +281,12 @@ func (c *client) readLoop() { c.cache.subs = 0 if err := c.parse(b[:n]); err != nil { - // handled inline - if err != ErrMaxPayload && err != ErrAuthorization { + // If client connection has been closed, simply return, + // otherwise report a generic parsing error. + c.mu.Lock() +...
1
// Copyright 2012-2016 Apcera Inc. All rights reserved. package server import ( "bufio" "crypto/tls" "encoding/json" "fmt" "math/rand" "net" "sync" "sync/atomic" "time" ) // Type of client connection. const ( // CLIENT is an end user. CLIENT = iota // ROUTER is another router in the cluster. ROUTER ) c...
1
6,789
We had the checks for those two errors for a reason, why do we not need them anymore?
nats-io-nats-server
go
@@ -19,6 +19,7 @@ from rdkit import Chem from rdkit.Chem.PeriodicTable import numTable from rdkit.Chem import Crippen from rdkit.Chem import rdPartialCharges, rdMolDescriptors +from rdkit.six.moves import xrange import numpy import bisect radCol = 5
1
# $Id$ # # Copyright (C) 2001-2008 greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """ Exposes functionali...
1
15,994
Why didn't you just switch to `range` here too?
rdkit-rdkit
cpp
@@ -32,15 +32,15 @@ import ( "google.golang.org/api/option" ) -// New returns a GCS Bucket. It handles creation of a client used to communicate +// NewBucket returns a GCS Bucket. It handles creation of a client used to communicate // to GCS service. -func New(ctx context.Context, bucketName string, opts *BucketO...
1
// Copyright 2018 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
10,158
I don't even think `nil` should be allowed, since it uses global state to get the client.
google-go-cloud
go
@@ -352,6 +352,9 @@ def qt_message_handler(msg_type, context, msg): # may not be available on the system "QSslSocket: cannot resolve SSLv3_client_method", "QSslSocket: cannot resolve SSLv3_server_method", + # When enabling debugging with QtWebEngine + "Remote debugging server st...
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
15,581
You somehow got a change from `master` into your branch again, in e6d2167085688264e5ee6a81cfd2a7a8f10ded13. While it's not something terribly bad (as it will be fine after merging), it's kind of confusing, and I have no idea how it happens :laughing: Are you trying to update changes from `master` while working on your ...
qutebrowser-qutebrowser
py
@@ -3083,10 +3083,14 @@ initiate_request (OtPullData *pull_data, g_clear_pointer (&delta_from_revision, g_free); } - /* This is similar to the below, except we *might* use the previous - * commit, or we might do a scratch delta first. + /* If the current ref is di...
1
/* * Copyright (C) 2011,2012,2013 Colin Walters <walters@verbum.org> * Copyright © 2017 Endless Mobile, Inc. * * 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 * version 2 of...
1
12,694
Minor, can we drop the leading `!` and just swap the if and the else blocks?
ostreedev-ostree
c
@@ -102,7 +102,9 @@ class SCNetRoIHead(CascadeRoIHead): bbox_head = self.bbox_head[stage] bbox_feats = bbox_roi_extractor( x[:len(bbox_roi_extractor.featmap_strides)], rois) - if self.with_semantic and semantic_feat is not None: + # bbox_feats.shape[0] > 0 is mean the number...
1
import numpy as np import torch import torch.nn.functional as F from mmdet.core import (bbox2result, bbox2roi, bbox_mapping, merge_aug_bboxes, merge_aug_masks, multiclass_nms) from ..builder import HEADS, build_head, build_roi_extractor from .cascade_roi_head import CascadeRoIHead @HEADS.regi...
1
25,549
`bbox_feats.shape[0] > 0` requires the number of proposal is not 0.
open-mmlab-mmdetection
py
@@ -1,4 +1,4 @@ -const { h, Component } = require('preact') +const { Component } = require('preact') module.exports = class CloseWrapper extends Component { componentWillUnmount () {
1
const { h, Component } = require('preact') module.exports = class CloseWrapper extends Component { componentWillUnmount () { this.props.onUnmount() } render () { return this.props.children[0] } }
1
13,624
Just FYI, I had to remove this unused import because Travis/`npm run lint` were complaining.
transloadit-uppy
js
@@ -15,8 +15,10 @@ #include "domain.h" #include "error.h" #include "update.h" +#include "force.h" #include <cstring> +#include <fmt/format.h> using namespace LAMMPS_NS;
1
/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04...
1
28,924
format.h is not a system header but bundled with LAMMPS. This should be `#include "fmt/format.h"`
lammps-lammps
cpp
@@ -441,8 +441,15 @@ public final class BKDReader extends PointValues implements Accountable { void visitDocValues(int[] commonPrefixLengths, byte[] scratchDataPackedValue, byte[] scratchMinIndexPackedValue, byte[] scratchMaxIndexPackedValue, IndexInput in, int[] docIDs, int count, Intersect...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
29,478
could we always call visitDocValuesWithCardinality? It seems to include the version check already?
apache-lucene-solr
java
@@ -607,6 +607,10 @@ public class RegistrationRequest { + HUB_HOST + " X -" + HUB_PORT + " 5555. The specified config was -" + HUB_HOST + " " + hub + " -" + HUB_PORT + " " + port); } + + if(port==-1){ + throw new GridConfigurationException("No port was specified in -hub parameter. ...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
12,168
I think if they _don't_ specify a port, we should assume grid default (which is 4444)
SeleniumHQ-selenium
js
@@ -155,14 +155,12 @@ std::vector<std::string> enumerateTautomerSmiles( cleanup(*mol, params); MolOps::sanitizeMol(*mol); - auto *tautparams = new TautomerCatalogParams(params.tautomerTransforms); - // unsigned int ntautomers = tautparams->getNumTautomers(); - TautomerEnumerator te(new TautomerCatalog(tautpa...
1
// // Copyright (C) 2018 Susan H. Leung // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include "MolStandardize.h" #include "Metal.h" #in...
1
21,391
This looks to be a breaking change. I know it will affect some of my code that uses the Tautomer enumerator.
rdkit-rdkit
cpp
@@ -61,8 +61,12 @@ func (m *bucketlistMessage) String() string { if output.Format == "" { var lines []string lines = append(lines, fmt.Sprintf("Blockchain Node: %s", m.Node)) - for _, bucket := range m.Bucketlist { - lines = append(lines, bucket.String()) + if len(m.Bucketlist) == 0 { + lines = append(lin...
1
// Copyright (c) 2020 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
21,844
Perhaps remove this line
iotexproject-iotex-core
go
@@ -707,6 +707,9 @@ void removeHs(RWMol &mol, const RemoveHsParameters &ps, bool sanitize) { if (!ps.removeMapped && atom->getAtomMapNum()) { continue; } + if (!ps.removeHydrides && atom->getAtomicNum() == 1 && atom->getFormalCharge() == -1) { + continue; + } bool removeIt = true; ...
1
// // Copyright (C) 2003-2019 Greg Landrum and Rational Discovery LLC // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include "RDKitBase....
1
20,899
Ah, missed this one. Sorry: you don't need to test the atomic number here. that's taken care of above on line 683.
rdkit-rdkit
cpp
@@ -146,8 +146,11 @@ func (c *roundCalculator) roundInfo( } } if !lastBlockTime.Before(now) { + // TODO: if this is the case, the system time is far behind the time of other nodes. + // the code below is just to mute the warning, but "panic" may be a better choice. + time.Sleep(lastBlockTime.Sub(now)) err ...
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
21,675
roundInfo() is called by couple of places in consensus for safety, better test/verify the delay of return err due to this Sleep() would not affect the normal functionality, like consensus can still be reached, full-node can correctly sync
iotexproject-iotex-core
go
@@ -376,8 +376,9 @@ func (sb *RustSectorBuilder) GeneratePoSt(req GeneratePoStRequest) (GeneratePoSt defer elapsed("GeneratePoSt")() // flattening the byte slice makes it easier to copy into the C heap - flattened := make([]byte, 32*len(req.CommRs)) - for idx, commR := range req.CommRs { + commRs := req.SortedCom...
1
// +build !windows package sectorbuilder import ( "bytes" "context" "io" "runtime" "time" "unsafe" bserv "github.com/ipfs/go-blockservice" cid "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log" "github.com/pkg/errors" "github.com/filecoin-project/go-filecoin/address" "github.com/filecoin-project/...
1
18,509
This 32 could go away too.
filecoin-project-venus
go
@@ -146,6 +146,8 @@ class Notification extends Component { module, moduleName, pageIndex, + pageSpeedLink, + pageSpeedLabel, } = this.props; if ( getCache( `notification::dismissed::${ id }` ) ) {
1
/** * Notification 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/LICENSE-2.0 *...
1
29,104
These props should be less specifically named since the component is generic, for example `anchorLink`, `anchorLinkLabel`.
google-site-kit-wp
js
@@ -189,13 +189,13 @@ func (r *AWSMachineReconciler) reconcileDelete(machineScope *scope.MachineScope, // and AWSMachine // 3. Issue a delete // 4. Scale controller deployment to 1 - machineScope.V(2).Info("Unable to locate instance by ID or tags") + machineScope.V(2).Info("Unable to locate EC2 instance by I...
1
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
1
11,844
In the future, it'd be great if we can separate commits or PRs that aren't in the same scope
kubernetes-sigs-cluster-api-provider-aws
go
@@ -133,7 +133,11 @@ class ScriptableType(AutoPropertyType): def __new__(meta, name, bases, dict): cls = super(ScriptableType, meta).__new__(meta, name, bases, dict) - gestures = getattr(cls, "_%s__gestures" % cls.__name__, {}) + # #8463: To avoid name mangling conflicts, create a copy of the __gestures dictio...
1
#baseObject.py #A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2007-2018 NV Access Limited, Christopher Toth, Babbage B.V. #This file is covered by the GNU General Public License. #See the file COPYING for more details. """Contains the base classes that many of NVDA's classes such as NVDAObjects, virtu...
1
22,623
can you define the string format on a different line, so it can be named, and so that it does not have to be constructed twice?
nvaccess-nvda
py
@@ -91,3 +91,9 @@ class AnsibleGalaxyInstall: except sh.ErrorReturnCode as e: LOG.error('ERROR: {}'.format(e)) utilities.sysexit(e.exit_code) + + def download(self, config_file): + utilities.print_info('Installing role dependencies ...') + self.add_env_arg('ANSIBLE_CO...
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,481
Can we write a unit test for this.
ansible-community-molecule
py
@@ -685,6 +685,8 @@ class AbstractTab(QWidget): @pyqtSlot(bool) def _on_load_finished(self, ok): + sess_manager = objreg.get('session-manager') + sess_manager.session_save('_autosave', quiet=True, force=True) if ok and not self._has_ssl_errors: if self.url().scheme() == '...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 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 Softwa...
1
16,957
Same as above, use `.delete('_autosave')`, not the command handler.
qutebrowser-qutebrowser
py
@@ -68,18 +68,7 @@ class BatchDataReader extends BaseDataReader<ColumnarBatch> { // update the current file for Spark's filename() function InputFileBlockHolder.set(file.path().toString(), task.start(), task.length()); - // schema or rows returned by readers - PartitionSpec spec = task.spec(); - Se...
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
30,609
It isn't necessary to check whether there are projected ID columns. The code is shorter if the values are available by default, even if they aren't used. This fixes the problem where there are constants to add (like `_file`) but no identity partition values are projected.
apache-iceberg
java
@@ -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
rb
@@ -6,9 +6,9 @@ package net.sourceforge.pmd.lang.java.rule.bestpractices; import java.util.List; +import net.sourceforge.pmd.lang.java.ast.ASTAnyTypeDeclaration; import org.jaxen.JaxenException; -import net.sourceforge.pmd.lang.ast.AbstractNode; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge...
1
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ package net.sourceforge.pmd.lang.java.rule.bestpractices; import java.util.List; import org.jaxen.JaxenException; import net.sourceforge.pmd.lang.ast.AbstractNode; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge...
1
15,990
@KroArtem This is the Checkstyle violation. This import should be grouped with other `net.sourceforge.pmd` imports below, in alphabetical order
pmd-pmd
java
@@ -47,6 +47,7 @@ import ( "github.com/ncw/rclone/lib/rest" "github.com/ncw/swift" "github.com/pkg/errors" + "github.com/ncw/rclone/fs" ) // Register with Fs
1
// Package s3 provides an interface to Amazon S3 oject storage package s3 // FIXME need to prevent anything but ListDir working for s3:// /* Progress of port to aws-sdk * Don't really need o.meta at all? What happens if you CTRL-C a multipart upload * get an incomplete upload * disappears when you delete the b...
1
8,682
File is not `goimports`-ed (from `goimports`)
rclone-rclone
go
@@ -126,6 +126,10 @@ public class MessageTopView extends LinearLayout implements ShowPicturesControll mHeaderContainer.setOnFlagListener(listener); } + public void setOnToggleFlagLongClickListener(OnLongClickListener listener){ + mHeaderContainer.setOnFlagListener(listener); + } + publ...
1
package com.fsck.k9.ui.messageview; import java.util.ArrayList; import java.util.List; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.LinearLayout; import com....
1
13,435
This change seems unrelated to copying email addresses to the clipboard. Please limit the scope of pull requests as much as possible.
k9mail-k-9
java
@@ -370,6 +370,13 @@ static void seat_client_send_keymap(struct wlr_seat_client *client, continue; } + if (keyboard->keymap == NULL) { + wl_keyboard_send_keymap(resource, + WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP, keymap_fd, 0); + close(keymap_fd); + continue; + } + void *ptr = mmap(NULL, keyboard->k...
1
#define _POSIX_C_SOURCE 200809L #include <assert.h> #include <stdlib.h> #include <string.h> #include <sys/mman.h> #include <time.h> #include <unistd.h> #include <wayland-server-core.h> #include <wlr/types/wlr_data_device.h> #include <wlr/types/wlr_input_device.h> #include <wlr/util/log.h> #include "types/wlr_data_devic...
1
18,320
I'm assuming that there isn't a way for us to skip sending an fd here (-1?), and that we're allocating this fd just to send a legal but useless value across?
swaywm-wlroots
c
@@ -66,7 +66,11 @@ func TransportSpec(opts ...Option) yarpcconfig.TransportSpec { // All parameters of TransportConfig are optional. This section // may be omitted in the transports section. type TransportConfig struct { - Backoff yarpcconfig.Backoff `config:"backoff"` + ServerMaxRecvMsgSize int `con...
1
// Copyright (c) 2017 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
15,344
might be good for the units (bytes?) to be in the variable name.
yarpc-yarpc-go
go
@@ -1,6 +1,6 @@ # NOTE: There are several rewrite rules defined in # config/initializers/rack_rewrite.rb which run before these routes. -Upcase::Application.routes.draw do +Rails.application.routes.draw do scope "upcase" do root to: "marketing#show"
1
# NOTE: There are several rewrite rules defined in # config/initializers/rack_rewrite.rb which run before these routes. Upcase::Application.routes.draw do scope "upcase" do root to: "marketing#show" use_doorkeeper scope module: "admin" do resources :users, only: [] do resource :masquerade,...
1
18,613
Metrics/BlockLength: Block has too many lines. [166/25]
thoughtbot-upcase
rb
@@ -23,9 +23,9 @@ CSV file based implementation of a record stream FileRecordStream is class that can read and write .csv files that contain -records. The file has 3 header lines that contain for each field the name, type -and a special indicator for the fields that serve as the reset field, -sequence id field and ...
1
# ---------------------------------------------------------------------- # 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 apply: # # This progra...
1
17,174
I'd end the sentence after `special indicator (line 3)`. And then start a new sentence: `The special field can indicate that the field specifies a reset, is a sequence ID, or is a timestamp for the record.`
numenta-nupic
py
@@ -105,11 +105,9 @@ def bbox_mapping_back(bboxes, img_shape, scale_factor, flip): def bbox2roi(bbox_list): """Convert a list of bboxes to roi format. - Args: bbox_list (list[Tensor]): a list of bboxes corresponding to a batch of images. - Returns: Tensor: shape (n, 5), ...
1
import mmcv import numpy as np import torch def bbox2delta(proposals, gt, means=[0, 0, 0, 0], stds=[1, 1, 1, 1]): assert proposals.size() == gt.size() proposals = proposals.float() gt = gt.float() px = (proposals[..., 0] + proposals[..., 2]) * 0.5 py = (proposals[..., 1] + proposals[..., 3]) * 0....
1
16,979
These empty lines can be kept.
open-mmlab-mmdetection
py
@@ -176,14 +176,14 @@ public class VelocityResponseWriterTest extends SolrTestCaseJ4 { // The test init properties file turns off being able to use $foreach.index (the implicit loop counter) // The foreach.vm template uses $!foreach.index, with ! suppressing the literal "$foreach.index" output - assertEq...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
41,030
For some reason these tests started failing due to an extra `NEWLINE` returned from `h.query()`. Have not tried to check whether this may be a problem for real templates or not, just fixed the failing tests. Anyone with an opinion here?
apache-lucene-solr
java
@@ -42,6 +42,9 @@ type TraceContext struct{} var _ propagation.TextFormat = TraceContext{} var traceCtxRegExp = regexp.MustCompile("^[0-9a-f]{2}-[a-f0-9]{32}-[a-f0-9]{16}-[a-f0-9]{2}-?") +// DefaultPropagator is the default trace propagator. +var DefaultPropagator propagation.TextFormat = TraceContext{} + func (hp...
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
11,026
It is better to have a method than a var.
open-telemetry-opentelemetry-go
go
@@ -58,9 +58,11 @@ func (s scannerCtxExecMgrFactory) NewExecutionManager(shardID int32) (persistenc const ( scannerContextKey = contextKey(0) - maxConcurrentActivityExecutionSize = 10 - maxConcurrentWorkflowTaskExecutionSize = 10 - infiniteDuration = 20 * 365 * 24 * time.Hour + maxConcurr...
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
12,272
concurrent poller won't be larger than concurrent execution. Jump from 2 -> 16 seems aggressive. I suggest to use 8. Ideally, this should be dynamic config. :)
temporalio-temporal
go
@@ -0,0 +1,5 @@ +_base_ = ['./yolact_r50.py'] + +model = dict(pretrained='torchvision://resnet101', backbone=dict(depth=101)) + +work_dir = './work_dirs/yolact_r101'
1
1
20,875
List is redundant.
open-mmlab-mmdetection
py
@@ -88,8 +88,9 @@ public class LoginActivity extends BaseActivity implements CustomTabActivityHelp setTitle(getString(R.string.txtSignIn)); setSupportActionBar(toolbar); - getSupportActionBar().setDisplayHomeAsUpEnabled(true); - + if(getSupportActionBar()!=null) { + getSuppo...
1
package openfoodfacts.github.scrachx.openfood.views; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.ActivityInfo; import android.hardware.Sensor; import android.hardware.SensorManager; import android.net.Ur...
1
65,318
Please use a string resource here rather than the hardcoded string "user". This allows the app to be multilingual.
openfoodfacts-openfoodfacts-androidapp
java
@@ -18,13 +18,10 @@ package cstorpoolit import ( "testing" - "time" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/openebs/CITF" - "github.com/openebs/CITF/citf_options" apis "github.com/openebs/CITF/pkg/apis/openebs.io/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" )
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,370
@aswathkk Why did we remove this import? I guess we are using it.
openebs-maya
go
@@ -184,7 +184,6 @@ func (s *Service) Stop() { remainingTime = s.sleep(shardOwnershipTransferDelay, remainingTime) s.GetLogger().Info("ShutdownHandler: No longer taking rpc requests") - s.handler.PrepareToStop() remainingTime = s.sleep(gracePeriod, remainingTime) // TODO: Change this to GracefulStop when in...
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,931
Why? I thought this is for graceful shutdown.
temporalio-temporal
go
@@ -59,10 +59,14 @@ module Bolt if result.instance_of? Bolt::TaskResult @stream.puts(indent(2, ::JSON.pretty_generate(result.value))) elsif result.instance_of? Bolt::CommandResult - @stream.puts(indent(2, "STDOUT:")) - @stream.puts(indent(4, result.stdout)) - @str...
1
module Bolt class Outputter class Human < Bolt::Outputter COLORS = { red: "31", green: "32", yellow: "33" }.freeze def print_head; end def colorize(color, string) if @stream.isatty "\033[#{COLORS[color]}m#{string}\033[0m" else ...
1
7,047
Can `result.stdout` or `result.stderr` be nil?
puppetlabs-bolt
rb
@@ -130,7 +130,8 @@ public class PyIssueParserProvider implements BlazeIssueParserProvider { if (projectScope.contains(vf)) { return 0; } - return PythonSdkType.isStdLib(vf, sdk) ? 2 : 1; + return 2; + // return PythonSdkType.isStdLib(vf, sdk) ? 2 : 1; } /** defaults to...
1
/* * Copyright 2017 The Bazel 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 a...
1
5,850
@mprobst Looks like the `isStdLib` function has been removed in the latest Python plugin. Any thoughts on how to handle this? The new version doesn't seem to have any relevant alternatives.
bazelbuild-intellij
java
@@ -32,6 +32,8 @@ type Config struct { RuleRendererOverride rules.RuleRenderer IPIPMTU int + MaxIPSetSize int + IptablesRefreshInterval time.Duration RulesConfig rules.Config
1
// Copyright (c) 2016-2017 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
1
14,900
How can there be a configured max ipset size? Surely we need to write ipsets with however many members are implied by the Calico datastore?
projectcalico-felix
go
@@ -205,7 +205,7 @@ export default AbstractEditController.extend(IncidentStatuses, FriendlyId, Patie showDeleteAttachment(attachment) { let i18n = get(this, 'i18n'); - let message = i18n.t('incident.messages.deleteAttachment'); + let message = i18n.t('messages.delete_singular', { name: 'attachme...
1
import AbstractEditController from 'hospitalrun/controllers/abstract-edit-controller'; import DS from 'ember-data'; import Ember from 'ember'; import FriendlyId from 'hospitalrun/mixins/friendly-id'; import IncidentStatuses, { CLOSED } from 'hospitalrun/mixins/incident-statuses'; import PatientSubmodule from 'hospitalr...
1
13,481
This code is passing a non localized string when it should be passing in a localized string or it should use the name of the item being deleted.
HospitalRun-hospitalrun-frontend
js
@@ -75,6 +75,14 @@ public class ExpressionVisitors { return null; } + public <T> R isNaN(BoundReference<T> ref) { + throw new UnsupportedOperationException(this.getClass().getName() + " does not implement isNaN"); + } + + public <T> R notNaN(BoundReference<T> ref) { + throw new Unsuppor...
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
27,678
why not be consistent with `isNull` and `notNull` and return null?
apache-iceberg
java
@@ -41,6 +41,7 @@ type BackendServiceConfig struct { *Logging `yaml:"logging,flow"` Sidecars map[string]*SidecarConfig `yaml:"sidecars"` Network NetworkConfig `yaml:"network"` + DockerLabels map[string]string `yaml:"docker_labels,flow"` } type imageWithPortAndHealthcheck s...
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package manifest import ( "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecs" "github.com/aws/copilot-cli/internal/pkg/template" "github.com/imdario/mergo" ) const ( backendS...
1
17,181
Did we forget to remove this field?
aws-copilot-cli
go
@@ -60,4 +60,9 @@ public class BaseRefreshableMap<K, V extends IRefreshable> extends HashMap<K, V> public BaseRefreshableMap<K, V> clone() { return (BaseRefreshableMap<K, V>) super.clone(); } + + @Override + public int elementCount() { + return this.values().stream().mapToInt(elem -> elem.elementCount()...
1
/* * Copyright 2019 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,305
What if there is no element?
azkaban-azkaban
java
@@ -52,8 +52,15 @@ func (c *Client) uploadAction(target *core.BuildTarget, isTest, isRun bool) (*pb return command, digest, err } -// buildAction creates a build action for a target and returns the command and the action digest digest. No uploading is done. +// buildAction creates a build action for a target and r...
1
package remote import ( "context" "encoding/hex" "fmt" "os" "path" "runtime" "sort" "strings" "time" "github.com/bazelbuild/remote-apis-sdks/go/pkg/chunker" "github.com/bazelbuild/remote-apis-sdks/go/pkg/digest" "github.com/bazelbuild/remote-apis-sdks/go/pkg/filemetadata" "github.com/bazelbuild/remote-ap...
1
9,130
I think you need to be careful to honour isTest and stamp here.
thought-machine-please
go
@@ -14,10 +14,16 @@ */ package com.google.api.codegen.transformer.nodejs; +import com.google.api.codegen.config.MethodConfig; import com.google.api.codegen.transformer.ApiMethodParamTransformer; import com.google.api.codegen.transformer.MethodTransformerContext; +import com.google.api.codegen.transformer.Surface...
1
/* Copyright 2017 Google Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
1
21,599
why zero value for `arrayType` for the default value of the optional args?
googleapis-gapic-generator
java
@@ -264,6 +264,14 @@ class Filter extends WidgetBase $value = post('options.value.' . $scope->scopeName) ?: null; $this->setScopeValue($scope, $value); break; + + case 'clear': + foreach ($this->getScopes() as $scope) { + $t...
1
<?php namespace Backend\Widgets; use Db; use Str; use Lang; use Backend; use DbDongle; use Carbon\Carbon; use Backend\Classes\WidgetBase; use Backend\Classes\FilterScope; use ApplicationException; /** * Filter Widget * Renders a container used for filtering things. * * @package october\backend * @author Alexey B...
1
17,294
@robinbonnes ~~Would you mind putting the array key and value on a new line - it makes it more readable as an array.~~ Never mind, see discussion below.
octobercms-october
php
@@ -26,6 +26,7 @@ var version = "(unreleased version)" func main() { var ( justVersion bool + cniNet, cniIpam bool address string meshAddress string logLevel string
1
package main import ( "flag" "fmt" "net" "net/http" "os" "os/signal" "strings" "syscall" cni "github.com/appc/cni/pkg/skel" "github.com/docker/libnetwork/ipamapi" weaveapi "github.com/weaveworks/weave/api" . "github.com/weaveworks/weave/common" "github.com/weaveworks/weave/common/docker" weavenet "githu...
1
12,601
I've never seen us do this anywhere else - why here? Why not `address, meshAddress string`?
weaveworks-weave
go
@@ -191,7 +191,9 @@ public class RequestUtil { } // implement compat for existing components... - JsonQueryConverter jsonQueryConverter = new JsonQueryConverter(); + JsonQueryConverter jsonQueryConverter = (JsonQueryConverter) req.getContext() + .computeIfAbsent(JsonQueryConverter.contextKey, (...
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,726
I think it's necessary only for the earlier "dynamic" approach. I suppose it's not necessary in the eager one.
apache-lucene-solr
java
@@ -437,4 +437,9 @@ class Configurator ? $this->doctrineTypeToFormTypeMap[$doctrineType] : $doctrineType; } + + public function getBackendConfig() + { + return $this->backendConfig; + } }
1
<?php /* * This file is part of the EasyAdminBundle. * * (c) Javier Eguiluz <javier.eguiluz@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace JavierEguiluz\Bundle\EasyAdminBundle\Configuration; use Doctrine\OR...
1
8,137
Same here than [there](#r26168925)
EasyCorp-EasyAdminBundle
php
@@ -53,12 +53,12 @@ public class ApplicationDTO { this.typeId = builder.typeId; this.categoryId = builder.categoryId; if (builder.id != null) { - if (builder.id.matches("^[a-zA-Z0-9_]+$")) { + if (builder.id.matches("^[a-zA-Z0-9_.]+$")) { this.id = build...
1
/* * Copyright (C) 2015-2017 PÂRIS Quentin * * 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 2 of the License, or * (at your option) any later version. * * This program is...
1
13,336
Again we should think about moving this pattern to a static final field
PhoenicisOrg-phoenicis
java
@@ -186,7 +186,7 @@ class ConfigManager private function doProcessConfig($backendConfig) { $configPasses = array( - new NormalizerConfigPass(), + new NormalizerConfigPass($this->container->get('easyadmin.controller_resolver')), new DesignConfigPass($this->container-...
1
<?php /* * This file is part of the EasyAdminBundle. * * (c) Javier Eguiluz <javier.eguiluz@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace JavierEguiluz\Bundle\EasyAdminBundle\Configuration; use Symfony\Com...
1
10,522
haven't been implemented the `__constructor` for `NormalizerConfigPass` ?
EasyCorp-EasyAdminBundle
php
@@ -190,3 +190,16 @@ class Collect(object): def __repr__(self): return self.__class__.__name__ + '(keys={}, meta_keys={})'.format( self.keys, self.meta_keys) + + +@PIPELINES.register_module +class WrapFieldsToLists(object): + + def __call__(self, results): + # Wrap dict fields into ...
1
from collections.abc import Sequence import mmcv import numpy as np import torch from mmcv.parallel import DataContainer as DC from ..registry import PIPELINES def to_tensor(data): """Convert objects of various python types to :obj:`torch.Tensor`. Supported types are: :class:`numpy.ndarray`, :class:`torch....
1
18,847
Docstring is missing.
open-mmlab-mmdetection
py
@@ -74,6 +74,7 @@ bool BaseEvents::loadFromXml() if (!success || !registerEvent(event, node)) { delete event; + return false; } } return true;
1
/** * The Forgotten Server - a free and open-source MMORPG server emulator * Copyright (C) 2017 Mark Samman <mark.samman@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; eithe...
1
14,043
I don't see the reason of this return as it will stop loading in half because an error, thats bad imo. Or you load it all and report errors or you load nothing and terminate, the first is as it always was so I wouldn't change that.
otland-forgottenserver
cpp
@@ -58,9 +58,9 @@ func NewMockKademlia(o ...Option) *Mock { return m } -// AddPeer is called when a peer is added to the topology backlog +// AddPeers is called when a peers are added to the topology backlog // for further processing by connectivity strategy. -func (m *Mock) AddPeer(ctx context.Context, addr swa...
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 mock import ( "context" "sync" "github.com/ethersphere/bee/pkg/swarm" "github.com/ethersphere/bee/pkg/topology" ) type AddrTuple struct { Add...
1
11,860
change from AddPeer to AddPeers added a space in some occurrences
ethersphere-bee
go
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertEquals; import org.junit.Before; import org.junit.Test; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Arrays;
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
19,390
Can you please revert changes to files in the `thoughtworks` package? This is legacy code and we will eventually phase out RC.
SeleniumHQ-selenium
java
@@ -29,15 +29,15 @@ import ( const NodePortLocalChain = "ANTREA-NODE-PORT-LOCAL" // IPTableRules provides a client to perform IPTABLES operations -type iptablesRules struct { +type IPTableRules struct { name string table *iptables.Client } -// NewIPTableRules retruns a new instance of IPTableRules -func New...
1
// +build !windows // Copyright 2020 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicab...
1
27,808
Do you remove "s" from "iptables" to IPTable" on purpose? I feel it should be "IPTablesRules".
antrea-io-antrea
go
@@ -16,17 +16,17 @@ package org.hyperledger.besu.ethereum.api.jsonrpc.internal.privacy.methods.priv; import org.hyperledger.besu.ethereum.api.jsonrpc.RpcMethod; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext; +import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.JsonRpc...
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
20,833
nit: not your problem - but I wonder if this should have been a "ConstantResponseRpc" - which takes a name and a value .... maybe a more reusable concept.
hyperledger-besu
java
@@ -26,7 +26,7 @@ import ( // instrumentationName is empty, then a implementation defined default name // will be used instead. // -// This is short for MeterProvider().Meter(name) +// This is short for otel.GetMeterProvider().Meter(name) func Meter(instrumentationName string, opts ...metric.MeterOption) metric.Met...
1
// Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
1
14,237
These changes have been resolved upstream. We can revert changes to this file when synced.
open-telemetry-opentelemetry-go
go
@@ -33,7 +33,7 @@ T = TypeVar("T") class Partition(Generic[T]): """ - Partition is the representation of a logical slice across an axis of a pipeline's work + A Partition represents a single slice of the entire set of a job's possible work. Args: value (Any): The object for this partition
1
import inspect from abc import ABC, abstractmethod from datetime import datetime, time from enum import Enum from typing import Any, Callable, Dict, Generic, List, NamedTuple, Optional, TypeVar, Union, cast import pendulum from dagster import check from ...seven.compat.pendulum import PendulumDateTime, to_timezone fr...
1
16,175
The description predates this diff but I think we can come up with something more grounded.
dagster-io-dagster
py
@@ -277,7 +277,17 @@ type VolumeAPISpec struct { } `yaml:"metadata"` } -// -------------Snapshot Structs ---------- +// SnapshotAPISpec hsolds the config for creating asnapshot of volume +type SnapshotAPISpec struct { + Kind string `yaml:"kind"` + APIVersion string `yaml:"apiVersion"` + Metadata struct { +...
1
// Package v1 - Description provided at doc.go // // NOTE: // There are references to Kubernetes (K8s) types & links. This reflects the // similarity of OpenEBS design principles with K8s. These may not be a // one-to-one mapping though. // // We have not imported the K8s namespaces as-is, as OpenEBS will change ...
1
7,144
Let the Kind, APIVersion & Metadata follow the rules followed by Volume. What is the reason for a change for snapshot struct ?
openebs-maya
go
@@ -24,14 +24,14 @@ import org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry; import com.google.common.eventbus.EventBus; import com.netflix.servo.DefaultMonitorRegistry; -import com.netflix.spectator.servo.ServoRegistry; public class DefaultRegistryInitializer implements MetricsInitializer { ...
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
11,104
seems that we did not strong depend servo no need to keep it? change to another one?
apache-servicecomb-java-chassis
java
@@ -142,7 +142,15 @@ boost::property_tree::ptree wait_response (nano::system & system, std::shared_pt void check_block_response_count (nano::system & system, std::shared_ptr<nano::rpc> const & rpc, boost::property_tree::ptree & request, uint64_t size_count) { auto response (wait_response (system, rpc, request)); - ...
1
#include <nano/boost/beast/core/flat_buffer.hpp> #include <nano/boost/beast/http.hpp> #include <nano/lib/rpcconfig.hpp> #include <nano/lib/threading.hpp> #include <nano/node/ipc/ipc_server.hpp> #include <nano/node/json_handler.hpp> #include <nano/node/node_rpc_config.hpp> #include <nano/rpc/rpc.hpp> #include <nano/rpc/...
1
16,809
Looks like this used to be UB before with an empty blocks and then calling `.second` on the `.front()`. Did it ever crash though?
nanocurrency-nano-node
cpp
@@ -121,7 +121,7 @@ function parseRunOn(runOn) { } function generateTopologyTests(testSuites, testContext, filter) { - testSuites.forEach(testSuite => { + for (const testSuite of testSuites) { // TODO: remove this when SPEC-1255 is completed let runOn = testSuite.runOn; if (!testSuite.runOn) {
1
'use strict'; const path = require('path'); const fs = require('fs'); const chai = require('chai'); const expect = chai.expect; const { EJSON } = require('bson'); const { isRecord } = require('../../../src/utils'); const TestRunnerContext = require('./context').TestRunnerContext; const resolveConnectionString = require...
1
21,211
Sorry about the code churn here, reworking this use normal loops and async await made debugging far more straight forward. For example, if configuring the fail point fails you find out when stepping over that line vs having to look for the ultimate catch clause that handled it.
mongodb-node-mongodb-native
js
@@ -56,7 +56,9 @@ const test = (suite, buildConfig = config.defaultBuildConfig, options) => { braveArgs.push('--test-launcher-jobs=' + options.test_launcher_jobs) } + const args = util.buildArgsToString(config.buildArgs()) // Build the tests + util.run('gn', ['gen', config.outputDir, '--args="' + args + ...
1
const path = require('path') const config = require('../lib/config') const util = require('../lib/util') const getTestBinary = (suite) => { return (process.platform === 'win32') ? `${suite}.exe` : suite } const getTestsToRun = (config, suite) => { testsToRun = [suite] if (suite === 'brave_unit_tests') { if...
1
6,672
this is wrong and should be reverted
brave-brave-browser
js