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
@@ -239,7 +239,7 @@ class RefactoringChecker(checkers.BaseTokenChecker): "with statement assignment and exception handler assignment.", ), "R1705": ( - 'Unnecessary "%s" after "return"', + 'Unnecessary "%s" after "return" remove it and de-indent all the code inside i...
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 import collections import copy import itertools import tokenize from functools import reduce from typing import Dict, Iterator, List, NamedTuple, Optional, Tuple, Union imp...
1
20,548
I think here should be a comma before remove, in all the cases
PyCQA-pylint
py
@@ -12,11 +12,16 @@ class OHEMSampler(BaseSampler): context, neg_pos_ub=-1, add_gt_as_proposals=True, + stages=0, **kwargs): super(OHEMSampler, self).__init__(num, pos_fraction, neg_pos_ub, ...
1
import torch from .base_sampler import BaseSampler from ..transforms import bbox2roi class OHEMSampler(BaseSampler): def __init__(self, num, pos_fraction, context, neg_pos_ub=-1, add_gt_as_proposals=True, **kwa...
1
17,165
Single quote is used by default in this project.
open-mmlab-mmdetection
py
@@ -177,10 +177,8 @@ func (c *Controller) updateSpc(oldSpc, newSpc interface{}) { c.recorder.Event(spc, corev1.EventTypeWarning, "Update", message) return } - // Enqueue spc only when there is a pending pool to be created. - if c.isPoolPending(spc) { - c.enqueueSpc(newSpc) - } + // Don't reconcile on spc + ret...
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
16,826
S1023: redundant `return` statement (from `gosimple`)
openebs-maya
go
@@ -43,3 +43,6 @@ func (s *webhook) Run(ctx context.Context) error { func (s *webhook) Notify(event model.Event) { } + +func (s *webhook) Close(ctx context.Context) { +}
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
8,797
`ctx` is unused in Close
pipe-cd-pipe
go
@@ -0,0 +1,9 @@ +<?php + +namespace Shopsys\ProductFeed\HeurekaBundle\Model\HeurekaCategory; + +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; + +class HeurekaCategoryNotFoundException extends NotFoundHttpException +{ +}
1
1
9,485
I'm confused. This exception is thrown when `HeurekaCategory` is not found in database. But this exception extends Http exception. Why? What has database search common with http? If the only reason is that it is the same in the whole project, then fine. But then we have even bigger problem - we don't know how to use ex...
shopsys-shopsys
php
@@ -0,0 +1,7 @@ +_base_ = './tood_r101_fpn_mstrain_2x_coco.py' + +model = dict( + backbone=dict( + dcn=dict(type='DCNv2', deformable_groups=1, fallback_on_stride=False), + stage_with_dcn=(False, True, True, True)), + bbox_head=dict(num_dcn_on_head=2))
1
1
26,868
Is it necessary to add the suffix `on_head`, because it belongs to` bbox_head`?
open-mmlab-mmdetection
py
@@ -548,6 +548,14 @@ AM_COND_IF(BUILDOPT_SYSTEMD_AND_LIBMOUNT, AC_DEFINE([BUILDOPT_LIBSYSTEMD_AND_LIBMOUNT], 1, [Define if systemd and libmount])) if test x$with_libsystemd = xyes; then OSTREE_FEATURES="$OSTREE_FEATURES systemd"; fi +AC_ARG_WITH(modern-grub, + AS_HELP_STRING([--with-modern-grub], + ...
1
AC_PREREQ([2.63]) dnl To perform a release, follow the instructions in `docs/CONTRIBUTING.md`. m4_define([year_version], [2020]) m4_define([release_version], [9]) m4_define([package_version], [year_version.release_version]) AC_INIT([libostree], [package_version], [walters@verbum.org]) is_release_build=no AC_CONFIG_HEAD...
1
19,147
Hmm, I wonder if this should just be e.g. `--with-grub-2.02` instead. (Not sure Autoconf supports periods in these switches.) Today's modern GRUB is tomorrow's ancient GRUB. :) Or maybe we should be specific about the feature this is enabling, which might be safer given that each distro carries so many patches. E.g. `-...
ostreedev-ostree
c
@@ -27,13 +27,13 @@ import ( // Instance is a compute instance. type Instance struct { *api.Instance - client daisyCompute.Client + Client daisyCompute.Client Project, Zone string } // Cleanup deletes the Instance. func (i *Instance) Cleanup() { - if err := i.client.DeleteInstance(i.Project, i....
1
// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
8,674
Add a GetSerialPortOutput method to Instance that way you don't need to access the client, also it makes the call cleaner as you don't have the odd i.Client and path.Base(i.Project), path.Base(i.Zone)
GoogleCloudPlatform-compute-image-tools
go
@@ -138,9 +138,11 @@ Workshops::Application.routes.draw do get '/group-training' => "pages#show", as: :group_training, id: "group-training" get '/humans-present/oss' => redirect('https://www.youtube.com/watch?v=VMBhumlUP-A') get '/backbone.js' => redirect('/backbone') - get '/backbone-js-on-rails' => redirect...
1
Workshops::Application.routes.draw do use_doorkeeper mount RailsAdmin::Engine => '/admin', :as => 'admin' root to: 'homes#show' get '/api/v1/me.json' => 'api/v1/users#show', as: :resource_owner namespace :api do namespace :v1 do resources :completions, only: [:index, :show, :create, :destroy] ...
1
10,109
Line is too long. [104/80]
thoughtbot-upcase
rb
@@ -93,6 +93,8 @@ func TestReconcileClusterPool(t *testing.T) { expectedMissingDependenciesMessage string expectedAssignedClaims int expectedUnassignedClaims int + expectedAssignedCDs int + expectedRunning int expectedLabels map[s...
1
package clusterpool import ( "context" "sort" "testing" "time" "github.com/stretchr/testify/require" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" log "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert"...
1
18,860
Since CD updates (assignment & power state) are now done in this controller...
openshift-hive
go
@@ -13,10 +13,18 @@ const MongooseError = require('./mongooseError'); * @api private */ -function ParallelValidateError(doc) { +function ParallelValidateError(doc, opts) { const msg = 'Can\'t validate() the same doc multiple times in parallel. Document: '; MongooseError.call(this, msg + doc._id); this.na...
1
'use strict'; /*! * Module dependencies. */ const MongooseError = require('./mongooseError'); /** * ParallelValidate Error constructor. * * @inherits MongooseError * @api private */ function ParallelValidateError(doc) { const msg = 'Can\'t validate() the same doc multiple times in parallel. Document: '; ...
1
14,130
Hmm I'd rather not support this option going forward - it seems like a one-off just to work around this particular issue. Would it be fine to just remove the `deepStackTrace` option? The rest of the PR looks great - I love the idea of switching to sets.
Automattic-mongoose
js
@@ -0,0 +1,17 @@ +class CommentCreator + def initialize(parsed_email) + @parsed_email = parsed_email + end + + def run + Comment.create( + comment_text: parsed_email.comment_text, + user: parsed_email.comment_user, + proposal: parsed_email.proposal + ) + end + + private + + attr_reader :pa...
1
1
14,971
on the one hand I like how little this is doing. On the other hand, `inbound_mail_parser` is doing most of the work here so maybe it's not as helpful as I originally thought
18F-C2
rb
@@ -238,7 +238,7 @@ TEST_F(BlackBoxPersistence, AsyncRTPSAsReliableWithPersistence) ASSERT_TRUE(reader.isInitialized()); - writer.make_persistent(db_file_name(), guid_prefix()).asynchronously(eprosima::fastrtps::rtps::RTPSWriterPublishMode::ASYNCHRONOUS_WRITER).init(); + writer.make_persistent(db_file_na...
1
// Copyright 2019 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
16,071
This line is too long
eProsima-Fast-DDS
cpp
@@ -54,7 +54,7 @@ func run(ctx context.Context) { ticker := time.NewTicker(config.SvcPollInterval()) for { if err := config.SetConfig(); err != nil { - logger.Errorf(err.Error()) + logger.Fatalf(err.Error()) } // This sets up the patching system to run in the background.
1
// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
8,550
This isn't a fatal error, we don't want to crash just because we can't set configs, we have sane defaults set
GoogleCloudPlatform-compute-image-tools
go
@@ -93,7 +93,7 @@ func (t *V4Trie) Get(cidr V4CIDR) interface{} { } func (t *V4Trie) LookupPath(buffer []V4TrieEntry, cidr V4CIDR) []V4TrieEntry { - return t.root.lookupPath(buffer, cidr) + return t.root.lookupPath(buffer[:0], cidr) } // LPM does a longest prefix match on the trie
1
// Copyright (c) 2020 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 applica...
1
17,500
I wondered why `buffer` was passed into `LookupPath`. What is happening here? Is `buffer[:0]` equivalent to `[]V4TrieEntry{}`, and hence `buffer` isn't needed any more?
projectcalico-felix
c
@@ -0,0 +1,18 @@ +<table style="font-size: 15px; font-style: italic; margin: 15px; background-color: #eee; width: 520px"> + <tr> + <td style="width: 50px; vertical-align: top; padding: 15px"> + <%= link_to( + image_tag( + attachments["avatar.png"].url, + alt: @user_message_author...
1
1
10,315
I don't really like the name of this file, especially the encoding of an implementation detail (the fact that it's a table) in the name. Can we just use `_message_body.html.erb` instead maybe?
openstreetmap-openstreetmap-website
rb
@@ -220,6 +220,9 @@ type NetworkPolicyRule struct { // action “nil” defaults to Allow action, which would be the case for rules created for // K8s Network Policy. Action *secv1alpha1.RuleAction `json:"action,omitempty" protobuf:"bytes,6,opt,name=action,casttype=github.com/vmware-tanzu/antrea/pkg/apis/security/v1a...
1
// Copyright 2019 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
1
24,490
Feel better not to expose our internal implementation in API/CRD, so no need to mention agent here. Consider: EnableLogging indicates whether or not to generate logs when rules are matched. Default to false.
antrea-io-antrea
go
@@ -124,6 +124,16 @@ RocksEngine::RocksEngine(GraphSpaceID spaceId, status = rocksdb::DB::Open(options, path, &db); } CHECK(status.ok()) << status.ToString(); + if (!readonly && spaceId_ != 0 /* only for storage*/) { + rocksdb::ReadOptions readOptions; + std::string dataVersionValue = ""; + status ...
1
/* Copyright (c) 2018 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License. */ #include "kvstore/RocksEngine.h" #include <folly/String.h> #include <rocksdb/convenience.h> #include "common/base/Base.h" #include "common/fs/FileUtils.h" #include "common/utils/NebulaKeyUtils.h" #...
1
33,444
use `NebulaKeyUtilsV3::dataVersionValue()` to replace the literal value?
vesoft-inc-nebula
cpp
@@ -372,10 +372,15 @@ def get_path_if_valid(pathstr, cwd=None, relative=False, check_exists=False): path = None if check_exists: - if path is not None and os.path.exists(path): - log.url.debug("URL is a local file") - else: - path = None + if path is not None: ...
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,331
No need for the `\` here, inside parentheses whitespace is ignored by Python.
qutebrowser-qutebrowser
py
@@ -171,6 +171,10 @@ eqp31wM9il1n+guTNyxJd+FzVAH+hCZE5K+tCgVDdVFUlDEHHbS/wqb2PSIoouLV input: "{http.request.tls.client.san.ips.0}", expect: "127.0.0.1", }, + { + input: "{http.request.tls.client.certificate_pem}", + expect: "<empty>", + }, } { actual := repl.ReplaceAll(tc.input, "<empty>") if...
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
15,414
This doesn't seem like the right expected result... it should be the same as the `clientCert` var defined above.
caddyserver-caddy
go
@@ -391,8 +391,6 @@ static void wlr_surface_flush_damage(struct wlr_surface *surface, release: pixman_region32_clear(&surface->current->surface_damage); pixman_region32_clear(&surface->current->buffer_damage); - - wlr_surface_state_release_buffer(surface->current); } static void wlr_surface_commit_pending(stru...
1
#include <assert.h> #include <stdlib.h> #include <wayland-server.h> #include <wlr/util/log.h> #include <wlr/egl.h> #include <wlr/render/interface.h> #include <wlr/types/wlr_surface.h> #include <wlr/render/matrix.h> static void wlr_surface_state_reset_buffer(struct wlr_surface_state *state) { if (state->buffer) { wl...
1
8,370
need to rename this now.
swaywm-wlroots
c
@@ -42,7 +42,16 @@ public class ExpectValidPrivateTransactionReceipt implements PrivateCondition { node.execute(transactions.getPrivateTransactionReceipt(transactionHash)); assertThat(actualReceipt) .usingRecursiveComparison() - .ignoringFields("commitmentHash", "logs") + .ignoringF...
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
22,396
NIT: This shouldn't be a TODO. It is just a note isn't it?
hyperledger-besu
java
@@ -1644,6 +1644,8 @@ class CommandDispatcher: """ try: elem.set_value(text) + except webelem.OrphanedError as e: + message.warning('Edited element vanished') except webelem.Error as e: raise cmdexc.CommandError(str(e))
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,819
I changed this to an error, that seems more appropriate than a warning here.
qutebrowser-qutebrowser
py
@@ -492,7 +492,7 @@ func (sct *SmartContractTest) run(r *require.Assertions) { if receipt.Status == uint64(iotextypes.ReceiptStatus_Success) { numLog := 0 for _, l := range receipt.Logs { - if !action.IsSystemLog(l) { + if !l.IsEvmTransfer() { numLog++ } }
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
22,001
This change could mute unit test failure, but it is better to update unit tests
iotexproject-iotex-core
go
@@ -165,6 +165,8 @@ class NotificationData { activeNotifications.remove(holder); int notificationId = holder.notificationId; + notificationIdsInUse.delete(notificationId); + if (!additionalNotifications.isEmpty()) { NotificationContent newContent = additionalNotification...
1
package com.fsck.k9.notification; import java.util.ArrayList; import java.util.Deque; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import android.util.SparseBooleanArray; import com.fsck.k9.Account; import com.fsck.k9.activity.MessageReference; /** * A holder class for pending n...
1
14,069
All other places that access `notificationIdsInUse` are in methods with descriptive names. We should do the same here. Maybe `markNotificationIdAsFree()`?
k9mail-k-9
java
@@ -26,17 +26,14 @@ import ( "sync" "time" - "github.com/ethersphere/bee/pkg/sctx" "github.com/ethersphere/bee/pkg/swarm" ) var ( TagUidFunc = rand.Uint32 - ErrNotFound = errors.New("tag not found") + NotFoundErr = errors.New("tag not found") ) -type TagsContextKey struct{} - // Tags hold tag informa...
1
// Copyright 2019 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
1
11,820
keep as `ErrNotFound`, it is the same convention as in other packages
ethersphere-bee
go
@@ -10,13 +10,15 @@ var ip = {}, extIP = require('external-ip'), plugins = require('../../../plugins/pluginManager.js'); + /** * Function to get the hostname/ip address/url to access dashboard * @param {function} callback - callback function that returns the hostname */ ip.getHost = function(callba...
1
/** * Module returning hostname value * @module api/parts/mgmt/ip */ /** @lends module:api/parts/mgmt/ip */ var ip = {}, net = require('net'), extIP = require('external-ip'), plugins = require('../../../plugins/pluginManager.js'); /** * Function to get the hostname/ip address/url to access dashboard * ...
1
13,376
Same here, we need to call `callback` in else branch
Countly-countly-server
js
@@ -160,7 +160,7 @@ public class CertFailedRefreshNotificationTask implements NotificationTask { } String expiryTime = getTimestampAsString(certRecord.getExpiryTime()); - String hostName = (certRecord.getHostName() != null) ? certRecord.getHostName() : ""; + String hos...
1
/* * Copyright 2020 Verizon Media * * 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 t...
1
5,473
At this point we already check that the record is valid and so it could never be nulll
AthenZ-athenz
java
@@ -126,6 +126,7 @@ class UserController < ApplicationController (params[:user][:auth_provider] == current_user.auth_provider && params[:user][:auth_uid] == current_user.auth_uid) update_user(current_user, params) + @title = t "user.account.title" else session[:new_u...
1
class UserController < ApplicationController layout "site", :except => [:api_details] skip_before_action :verify_authenticity_token, :only => [:api_read, :api_details, :api_gpx_files, :auth_success] before_action :disable_terms_redirect, :only => [:terms, :save, :logout, :api_details] before_action :authorize,...
1
11,301
Would it not be more sensible just to move setting of the title to later in the method rather than duplicating it here?
openstreetmap-openstreetmap-website
rb
@@ -130,6 +130,7 @@ void MetaClient::heartBeatThreadFunc() { localLastUpdateTime_ = metadLastUpdateTime_; } } + uploadSession(); } bool MetaClient::loadUsersAndRoles() {
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 "time/Duration.h" #include "meta/common/MetaCommon.h" #include "meta/client/MetaClient.h" #include "network/Net...
1
29,003
why not do it in `reclaimExpiredSessions`? and `pushSessionToCache` can delete
vesoft-inc-nebula
cpp
@@ -0,0 +1,17 @@ +_base_ = './retinanet_regnetx-1.6GF_fpn_mstrain_640-800_3x_coco.py' +model = dict( + pretrained='open-mmlab://regnetx_3.2gf', + backbone=dict( + _delete_=True, + type='RegNet', + arch='regnetx_3.2gf', + out_indices=(0, 1, 2, 3), + frozen_stages=1, + norm...
1
1
24,576
out_channels/num_outs/type are unnecessary
open-mmlab-mmdetection
py
@@ -6,6 +6,17 @@ let null_dict = null_dictionary || {} // eslint-disable-next-line no-undef assert_true(dict.X !== undefined && dict.doSomething !== undefined); // Testing successful object creation. + +/* + It seems that Object.values(dict) is not supported on JSC for non-static fields, it would be interesting...
1
// eslint-disable-next-line no-undef,strict let dict = dictionary || {} // eslint-disable-next-line no-undef let null_dict = null_dictionary || {} // eslint-disable-next-line no-undef assert_true(dict.X !== undefined && dict.doSomething !== undefined); // Testing successful object creation. null_dict.hello(true); /...
1
20,469
You can create an issue for it and put it on the backlog so we don't forget it.
realm-realm-js
js
@@ -21,7 +21,11 @@ func (i *startContainerInterceptor) InterceptResponse(r *http.Response) error { return err } - cidrs, ok := i.proxy.weaveCIDRsFromConfig(container.Config) + if !validNetworkMode(container.HostConfig) { + Debug.Printf("Ignoring container %s with --net=%s", container.ID, networkMode(container.H...
1
package proxy import ( "errors" "net/http" "strings" "github.com/fsouza/go-dockerclient" . "github.com/weaveworks/weave/common" ) type startContainerInterceptor struct{ proxy *Proxy } func (i *startContainerInterceptor) InterceptRequest(r *http.Request) error { return nil } func (i *startContainerInterceptor...
1
10,201
So now we are checking twice, both here and in `weaveCIDRsFromConfig`. Not great. I suggest changing the `ok` return of `weaveCIDRsFromConfig` to a messsage (or error?) instead, which we can then log.
weaveworks-weave
go
@@ -436,11 +436,10 @@ def install(session, package, hash=None, version=None, tag=None): if pkghash != hash_contents(response_contents): raise CommandException("Mismatched hash. Try again.") - pkgobj = store.create_package(owner, pkg, PackageFormat.HDF5) + pkgobj = store.create_package(owner, pkg) ...
1
# -*- coding: utf-8 -*- """ Command line parsing and command dispatch """ from __future__ import print_function from builtins import input import argparse import json import os import stat import sys import time import webbrowser import pandas as pd import requests from packaging.version import Version from .build i...
1
14,926
An alternative to setting format to the default in Package.__init__ would be to set it in create_package. I think we can assume all packages are created by create_package, but not necessarily by build_package.
quiltdata-quilt
py
@@ -34,10 +34,17 @@ type MiningBlock struct { RemoteTxs types.TransactionsStream } +// In case we are proposing during proof-of-stake and we are supplied with header fields already +type PresetHeaderFields struct { + Timestamp uint64 + Random common.Hash +} + type MiningState struct { MiningConfig *params...
1
package stagedsync import ( "bytes" "context" "errors" "fmt" "math/big" "time" mapset "github.com/deckarep/golang-set" libcommon "github.com/ledgerwatch/erigon-lib/common" "github.com/ledgerwatch/erigon-lib/kv" "github.com/ledgerwatch/erigon-lib/txpool" "github.com/ledgerwatch/erigon/common" "github.com/l...
1
23,050
Let's add fee recipient as well.
ledgerwatch-erigon
go
@@ -239,6 +239,7 @@ class FileDownloadTarget(_DownloadTarget): def __init__(self, filename): # pylint: disable=super-init-not-called self.filename = filename + # pylint: enable=super-init-not-called def suggested_filename(self): return os.path.basename(self.filename)
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,409
No need for those with `super-init-not-called`, as pylint already only turns things off for this function and it's needed for the entire function.
qutebrowser-qutebrowser
py
@@ -35,6 +35,7 @@ public interface CapabilityType { String PROXY = "proxy"; String SUPPORTS_WEB_STORAGE = "webStorageEnabled"; String ROTATABLE = "rotatable"; + String APPLICATION_NAME = "applicationName"; // Enable this capability to accept all SSL certs by defaults. String ACCEPT_SSL_CERTS = "acceptSs...
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,114
I think there's another spot for this in DefaultCapabilityMatcher
SeleniumHQ-selenium
py
@@ -55,6 +55,15 @@ class ProposalDecorator < Draper::Decorator "#{number_approved} of #{total_approvers} approved." end + def table_waiting_text + actionable_step = currently_awaiting_steps.first + if actionable_step + actionable_step.decorate.waiting_text + else + I18n.t("decorators.steps...
1
class ProposalDecorator < Draper::Decorator delegate_all def number_approved object.individual_steps.approved.count end def total_approvers object.individual_steps.count end def steps_by_status # Override default scope object.individual_steps.with_users.reorder( # http://stackoverfl...
1
16,126
this name seems pretty vague -- thoughts on a more descriptive method name?
18F-C2
rb
@@ -1,4 +1,4 @@ -// <copyright file="MeterFactory.cs" company="OpenTelemetry Authors"> +// <copyright file="MeterFactory.cs" company="OpenTelemetry Authors"> // Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License");
1
// <copyright file="MeterFactory.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.apache.or...
1
13,985
what changed in this line?
open-telemetry-opentelemetry-dotnet
.cs
@@ -43,13 +43,16 @@ import { isZeroReport } from '../../modules/search-console/util/is-zero-report'; import sumObjectListValue from '../../util/sum-object-list-value'; const { useSelect } = Data; +// reportArgs is declared in this higher scope so that it can be used by hasData. +let reportArgs; + const AdminBarCli...
1
/** * Admin Bar Clicks component. * * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2....
1
35,316
Instead of doing this let's add another function similar to `hasZeroData` for selecting the `reportArgs` since this is all sourced from selected values. Then `hasZeroData` can use this internally, as well as the component itself. Since this function would be internal just for the purpose of avoiding duplication, we don...
google-site-kit-wp
js
@@ -38,7 +38,6 @@ class ExceptionListener return $event->getException()->getMessage(); } - /** @var \JavierEguiluz\Bundle\EasyAdminBundle\Exception\BaseException */ $exception = $event->getException(); $exceptionClassName = basename(str_replace('\\', '/', get_class($exce...
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\Listener; use JavierEguiluz\Bu...
1
9,156
This line was useful for auto-completion, I think it should be re-added with specifying the var name (`$exception`) and simplifying the FQCN.
EasyCorp-EasyAdminBundle
php
@@ -228,10 +228,16 @@ func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request, extr outreq.Write(backendConn) + errCh := make(chan error, 1) go func() { - io.Copy(backendConn, conn) // write tcp stream to backend. + _, err := io.Copy(backendConn, conn) // write tcp stream to backend. +...
1
// This file is adapted from code in the net/http/httputil // package of the Go standard library, which is by the // Go Authors, and bears this copyright and license info: // // Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found i...
1
7,983
This looks like you're not collecting everything from the error channel.
caddyserver-caddy
go
@@ -1,10 +1,10 @@ class CheckoutMailer < BaseMailer def receipt(checkout) - @checkout = checkout + @plan = checkout.plan mail( - to: @checkout.user_email, - subject: "Your receipt for #{@checkout.plan_name}" + to: checkout.user_email, + subject: "Your receipt for #{@plan.name}" ...
1
class CheckoutMailer < BaseMailer def receipt(checkout) @checkout = checkout mail( to: @checkout.user_email, subject: "Your receipt for #{@checkout.plan_name}" ) end end
1
14,023
This currently violates the Law of Demeter. Using `checkout.plan_name` is the quick resolution.
thoughtbot-upcase
rb
@@ -77,7 +77,7 @@ class Image implements EntityFileUploadInterface * @param string $entityName * @param int $entityId * @param string|null $type - * @param string $temporaryFilename + * @param string|null $temporaryFilename */ public function __construct($entityName, $entityId, $typ...
1
<?php namespace Shopsys\FrameworkBundle\Component\Image; use DateTime; use Doctrine\ORM\Mapping as ORM; use Shopsys\FrameworkBundle\Component\FileUpload\EntityFileUploadInterface; use Shopsys\FrameworkBundle\Component\FileUpload\FileForUpload; use Shopsys\FrameworkBundle\Component\FileUpload\FileNamingConvention; use...
1
9,925
is there any scenario when `$temporaryFilename` can be null?
shopsys-shopsys
php
@@ -171,6 +171,7 @@ class FlinkTypeToType extends FlinkTypeVisitor<Type> { } @Override + @SuppressWarnings("ReferenceEquality") public Type visit(RowType rowType) { List<Types.NestedField> newFields = Lists.newArrayListWithExpectedSize(rowType.getFieldCount()); boolean isRoot = root == rowType;
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
38,578
this is for the `boolean isRoot = root == rowType` check, which seems to be on purpose, but maybe you could double check whether using ref. equality here is still wanted? Same for `SparkTypeToType`
apache-iceberg
java
@@ -260,6 +260,7 @@ static void roots_drag_icon_handle_surface_commit(struct wl_listener *listener, void *data) { struct roots_drag_icon *icon = wl_container_of(listener, icon, surface_commit); + roots_drag_icon_update_position(icon); roots_drag_icon_damage_whole(icon); }
1
#define _POSIX_C_SOURCE 199309L #include <assert.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <wayland-server.h> #include <wlr/config.h> #include <wlr/types/wlr_idle.h> #include <wlr/types/wlr_layer_shell.h> #include <wlr/types/wlr_xcursor_manager.h> #include <wlr/util/log.h> #include "rootston...
1
11,743
No need to damage after `roots_drag_icon_update_position`, this is already done in `roots_drag_icon_update_position`
swaywm-wlroots
c
@@ -102,11 +102,13 @@ def build_model_from_cfg(config_path, checkpoint_path, cfg_options=None): return model -def preprocess_example_input(input_config): +def preprocess_example_input(input_config, device=torch.device('cpu')): """Prepare an example input image for ``generate_inputs_and_wrap_model``. ...
1
from functools import partial import mmcv import numpy as np import torch from mmcv.runner import load_checkpoint def generate_inputs_and_wrap_model(config_path, checkpoint_path, input_config, cfg_options=None): ...
1
25,490
Have you tested exporting to ONNX with `device=cuda`?
open-mmlab-mmdetection
py
@@ -78,10 +78,14 @@ func newJobLogOpts(vars jobLogsVars) (*jobLogsOpts, error) { // Validate returns an error if the values provided by flags are invalid. func (o *jobLogsOpts) Validate() error { if o.appName != "" { - _, err := o.configStore.GetApplication(o.appName) - if err != nil { + if _, err := o.configSto...
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli import ( "errors" "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/copilot-cli/internal/pkg/aws/sessions" "github.com/aws/copilot-cli/internal/pkg/config" "github.com/aws/copilot-cli/in...
1
19,101
Do we also need to validate `envName` flag then? `appName` and `envName` are used in `initLogsSvc` which are called by `svc logs` from within `Execute()`
aws-copilot-cli
go
@@ -147,6 +147,19 @@ class Auth extends Controller */ public function restore_onSubmit() { + // Force Trusted Host verification on password reset link generation + // regardless of config to protect against host header poisoning + $trustedHosts = Config::get('app.trustedHosts', fals...
1
<?php namespace Backend\Controllers; use Mail; use Flash; use Backend; use Request; use Validator; use BackendAuth; use Backend\Models\AccessLog; use Backend\Classes\Controller; use System\Classes\UpdateManager; use ApplicationException; use ValidationException; use Exception; use Config; /** * Authentication contro...
1
19,278
@LukeTowers I think I would prefer that we don't force it, on the basis that: a) some people would be opting to configure their web server to protect against this kind of attack and would disable this feature in October CMS to get a small performance increase. b) it might be a bit misleading to say that `app.trustedHos...
octobercms-october
php
@@ -259,7 +259,7 @@ func (c *NetworkPolicyController) triggerParentGroupSync(grp *antreatypes.Group) // triggerCNPUpdates triggers processing of ClusterNetworkPolicies associated with the input ClusterGroup. func (c *NetworkPolicyController) triggerCNPUpdates(cg *crdv1alpha3.ClusterGroup) error { // If a ClusterGro...
1
// Copyright 2021 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
1
42,202
i like that you are trying to correct the naming, but its making the PR longer :( i guess in future we can do such changes in separate PRs
antrea-io-antrea
go
@@ -257,12 +257,12 @@ describe('text.accessibleTextVirtual', function() { axe.testUtils.flatTreeSetup(fixture); var target = axe.utils.querySelectorAll(axe._tree, '#t2label')[0]; - // Chrome 72: This is This is a label of - // Firefox 62: This is ARIA Label - // Safari 12.0: This is This is a label of + // ...
1
describe('text.accessibleTextVirtual', function() { 'use strict'; var fixture = document.getElementById('fixture'); var shadowSupport = axe.testUtils.shadowSupport; afterEach(function() { fixture.innerHTML = ''; axe._tree = null; }); it('is called through accessibleText with a DOM node', function() { var...
1
16,045
Are we marking what the browser's accessibility tree says or what screen readers with those browsers say?
dequelabs-axe-core
js
@@ -156,6 +156,10 @@ func (s *stream) Close() error { return nil } +func (s *stream) FullClose() error { + return s.Close() +} + type record struct { b []byte c int
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 streamtest import ( "context" "errors" "io" "sync" "github.com/ethersphere/bee/pkg/p2p" "github.com/ethersphere/bee/pkg/swarm" ) var ( ErrR...
1
8,843
This method should behave as intended, to block until it reads an EOF from the other side.
ethersphere-bee
go
@@ -1924,7 +1924,7 @@ func GitFsck() { repo := bean.(*Repository) repoPath := repo.RepoPath() if err := git.Fsck(repoPath, setting.Cron.RepoHealthCheck.Timeout, setting.Cron.RepoHealthCheck.Args...); err != nil { - desc := fmt.Sprintf("Fail to health check repository '%s': %v", repoPath, err) + desc :...
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 models import ( "bytes" "fmt" "image" _ "image/jpeg" "image/png" "io/ioutil" "os" "os/exec" "path" "path/filepath" "sort" "strings" "tim...
1
13,122
I prefer starts with `Failed to xxx`, how about `Failed to perform health check on xxx`?
gogs-gogs
go
@@ -141,9 +141,15 @@ namespace Datadog.Trace if (AzureAppServices.Metadata?.IsRelevant ?? false) { span.SetTag(Tags.AzureAppServicesSiteName, AzureAppServices.Metadata.SiteName); + span.SetTag(Tags.AzureAppServicesSiteKind, AzureAppServices.Metadata.SiteKind); +...
1
using System; using System.Collections.Generic; using System.Diagnostics; using Datadog.Trace.Logging; using Datadog.Trace.PlatformHelpers; using Datadog.Trace.Util; namespace Datadog.Trace { internal class TraceContext : ITraceContext { private static readonly Vendors.Serilog.ILogger Log = DatadogLogg...
1
18,658
All these calls make me think we should refactor how traces are started and allow "source tags" that we initialize a trace with. I'd like to do this in a follow up.
DataDog-dd-trace-dotnet
.cs
@@ -1,6 +1,6 @@ // DO NOT EDIT: This file is autogenerated via the builtin command. -package v1_test +package v1 import ( ast "github.com/influxdata/flux/ast"
1
// DO NOT EDIT: This file is autogenerated via the builtin command. package v1_test import ( ast "github.com/influxdata/flux/ast" parser "github.com/influxdata/flux/internal/parser" ) var FluxTestPackages = []*ast.Package{&ast.Package{ BaseNode: ast.BaseNode{ Errors: nil, Loc: nil, }, Files: []*ast.File{...
1
10,620
This file shouldn't be in this PR
influxdata-flux
go
@@ -1881,7 +1881,7 @@ class ArrayAssignmentTest extends TestCase takesArray($a);', 'error_message' => 'InvalidScalarArgument', ], - 'nonEmptyAssignmentToListElementChangeType' => [ + 'SKIPPED-nonEmptyAssignmentToListElementChangeType' => [ // Shou...
1
<?php namespace Psalm\Tests; use Psalm\Context; use Psalm\Tests\Traits\InvalidCodeAnalysisTestTrait; use Psalm\Tests\Traits\ValidCodeAnalysisTestTrait; use Psalm\Type; class ArrayAssignmentTest extends TestCase { use InvalidCodeAnalysisTestTrait; use ValidCodeAnalysisTestTrait; public function testCondit...
1
12,276
This now causes `LessSpecificReturnStatement - src/somefile.php:9:32 - The type 'non-empty-list<5|string>' is more general than the declared return type 'non-empty-list<string>' for takesList`, which seems correct to me. The type `non-empty-list<5|string>` contains the type `non-empty-list<string>`. Thoughts?
vimeo-psalm
php
@@ -123,7 +123,7 @@ public class RestrictedDefaultPrivacyController implements PrivacyController { final String privacyUserId, final Optional<PrivacyGroup> maybePrivacyGroup) { try { - LOG.trace("Storing private transaction in enclave"); + LOG.info("Storing private transaction in enclave");...
1
/* * Copyright ConsenSys AG. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing...
1
26,413
Are you going to change that back?
hyperledger-besu
java
@@ -51,6 +51,16 @@ tune ?= generic cpu ?= $(arch) fpu ?= bits ?= $(shell getconf LONG_BIT) +staticbuild ?= false + +# Set static building if requested +ifeq (true,$(staticbuild)) + use += llvm_link_static +else + ifneq (false,$(staticbuild)) + $(error staticbuild must be true or false) + endif +endif ifndef...
1
# Determine the operating system OSTYPE ?= ifeq ($(OS),Windows_NT) OSTYPE = windows else UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) OSTYPE = linux ifndef AR ifneq (,$(shell which gcc-ar 2> /dev/null)) AR = gcc-ar endif endif ALPINE=$(wildcard /etc/alpine-release) ...
1
13,694
we have a standard format for putting these together elsewhere, it does the filter check first and errors out and then sets based on the value. i think this should be adjusted to do that. there's no logical change, just an approach change.
ponylang-ponyc
c
@@ -1088,6 +1088,7 @@ function createFunctionsMenu() { {text: 'Power', handler: applyFuncToEachWithInput('pow', 'Please enter a power factor')}, {text: 'Square Root', handler: applyFuncToEach('squareRoot')}, {text: 'Time-adjusted Derivative', handler: applyFuncToEachWithInput('perSecond', "Pl...
1
/* Copyright 2008 Orbitz WorldWide * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
1
9,412
Note this should be `delay` instead of `scale` here. I'll fix this in my branch.
graphite-project-graphite-web
py
@@ -87,7 +87,6 @@ class Uppy { this.upload = this.upload.bind(this) this.emitter = ee() - this.on = this.emitter.on.bind(this.emitter) this.off = this.emitter.off.bind(this.emitter) this.once = this.emitter.once.bind(this.emitter) this.emit = this.emitter.emit.bind(this.emitter)
1
const Utils = require('../core/Utils') const Translator = require('../core/Translator') const ee = require('namespace-emitter') const cuid = require('cuid') const throttle = require('lodash.throttle') const prettyBytes = require('prettier-bytes') const match = require('mime-match') const DefaultStore = require('../stor...
1
10,523
`on` likely still needs a bind, similar to `this.resetProgress = this.resetProgress.bind(this)` correct?
transloadit-uppy
js
@@ -1,4 +1,11 @@ # Copyright (c) OpenMMLab. All rights reserved. +import random + +import torch +import torch.distributed as dist +import torch.nn.functional as F +from mmcv.runner import get_dist_info + from ..builder import DETECTORS from .single_stage import SingleStageDetector
1
# Copyright (c) OpenMMLab. All rights reserved. from ..builder import DETECTORS from .single_stage import SingleStageDetector @DETECTORS.register_module() class YOLOX(SingleStageDetector): r"""Implementation of `YOLOX: Exceeding YOLO Series in 2021 <https://arxiv.org/abs/2107.08430>`_""" def __init__(sel...
1
26,397
Considering the trade-off between training speed and accuracy, multi-scale training is temporarily kept. More elegant implementation will be adopted in the future.
open-mmlab-mmdetection
py
@@ -38,6 +38,7 @@ import ( "github.com/aws/amazon-ecs-agent/agent/utils/ttime" "context" + "github.com/cihub/seelog" "github.com/pkg/errors" )
1
// Copyright 2014-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license...
1
19,051
Can you move this up along with the other builtin libraries?
aws-amazon-ecs-agent
go
@@ -633,6 +633,12 @@ class GeneralSettingsPanel(SettingsPanel): if globalVars.appArgs.secure: item.Disable() settingsSizerHelper.addItem(item) + # Translators: The label of a checkbox in general settings to toggle allowing of usage stats gathering + item=self.allowUsageStatsCheckBox=wx.CheckBox(self,...
1
# -*- coding: UTF-8 -*- #settingsDialogs.py #A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2006-2018 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Heiko Folkerts, Zahari Yurukov, Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger #This file is covered ...
1
22,177
I actually think it makes sense to reposition this checkbox after the notifyForPendingUpdateCheckBox. The current order of check boxes is a bit arbitrary now.
nvaccess-nvda
py
@@ -309,6 +309,14 @@ var opts struct { Targets []core.BuildLabel `position-arg-name:"targets" description:"Additional targets to load rules from"` } `positional-args:"true"` } `command:"rules" description:"Prints built-in rules to stdout as JSON"` + Changes struct { + Before string `short:"b" lo...
1
package main import ( "fmt" "net/http" _ "net/http/pprof" "os" "path" "runtime" "runtime/pprof" "strings" "syscall" "time" "github.com/jessevdk/go-flags" "gopkg.in/op/go-logging.v1" "build" "cache" "clean" "cli" "core" "export" "follow" "fs" "gc" "hashes" "help" "metrics" "output" "parse" ...
1
8,159
Why do we have both `before` and `after`? Naively I would expect this to work as follows: `plz query changed` with no arguments compares the current working directory state to the last commit (i.e. HEAD, i.e. a noop when directly on a git commit). `plz query changed --since [reflike]` compare the current working direct...
thought-machine-please
go
@@ -381,6 +381,17 @@ class FDst(_Rex): return f.server_conn.address and self.re.search(r) +class FDstIP(_Rex): + code = "ip" + help = "Match destination ip address" + is_binary = False + + def __call__(self, f): + if not f.server_conn or not f.server_conn.ip_address: + return ...
1
""" The following operators are understood: ~q Request ~s Response Headers: Patterns are matched against "name: value" strings. Field names are all-lowercase. ~a Asset content-type in response. Asset content types are: ...
1
15,743
Is there a reason why we can't use `~dst`? It feels like that could be good enough.I would like to avoid extending the filter syntax unless there's an urgent need. :)
mitmproxy-mitmproxy
py
@@ -60,7 +60,7 @@ namespace Nethermind.Core public long GasUsed { get; set; } public long GasLimit { get; set; } public UInt256 Timestamp { get; set; } - public DateTime TimestampDate => DateTimeOffset.FromUnixTimeSeconds((long) Timestamp).DateTime; + public DateTime TimestampDa...
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
22,950
Why local and not UTC?
NethermindEth-nethermind
.cs
@@ -172,7 +172,8 @@ ExSqlComp::ReturnStatus ExSqlComp::createServer() // if (ret == ERROR) { - error(arkcmpErrorServer); + if ((!diagArea_->contains(-2013)) && (!diagArea_->contains(-2012))) // avoid generating redundant error + error(arkcmpErrorServer); if (getenv("DEBUG_SERVER")) MessageBox(NULL, "...
1
/********************************************************************** // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. ...
1
23,102
2012 is a retryable error. Will avoiding rgenerating it here cause a difference in behavior in createServer() ?
apache-trafodion
cpp
@@ -8,6 +8,7 @@ package factory import ( "context" + "github.com/iotexproject/iotex-address/address" "sort" "github.com/iotexproject/go-pkgs/hash"
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
23,697
move to line 14 below
iotexproject-iotex-core
go
@@ -107,7 +107,7 @@ public class Rectangle2D { return eastRelation; } - /** Checks if the rectangle intersects the provided triangle **/ + /** Checks if the rectangle crosses the provided triangle **/ public boolean intersectsTriangle(int aX, int aY, int bX, int bY, int cX, int cY) { // 1. query con...
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
28,260
the method name should match teh docs
apache-lucene-solr
java
@@ -278,13 +278,16 @@ func getOps(config Config, id TlfID) *folderBranchOps { getOpsNoAdd(FolderBranch{id, MasterBranch}) } +// TODO: Test MDv3. + // createNewRMD creates a new RMD for the given name. Returns its ID // and handle also. func createNewRMD(t *testing.T, config Config, name string, public bool) ( ...
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 ( "bytes" "errors" "fmt" "math/rand" "testing" "time" "github.com/golang/mock/gomock" "github.com/keybase/client/go/libkb" "github.com/...
1
14,127
Won't this happen automatically when we flip the default version in the config?
keybase-kbfs
go
@@ -312,7 +312,7 @@ func TestLocalExec(t *testing.T) { err = app.Exec("web", true, "pwd") assert.NoError(err) out := stdout() - assert.Contains(out, "/var/www/html/docroot") + assert.Contains(out, "/var/www/html") stdout = testcommon.CaptureStdOut() switch app.GetType() {
1
package platform import ( "fmt" "path/filepath" "testing" "time" "os" "strings" log "github.com/Sirupsen/logrus" "github.com/drud/ddev/pkg/dockerutil" "github.com/drud/ddev/pkg/fileutil" "github.com/drud/ddev/pkg/testcommon" "github.com/drud/ddev/pkg/util" "github.com/stretchr/testify/assert" ) var ( ...
1
11,402
This would also change back to /var/www/html/docroot if we go that way.
drud-ddev
go
@@ -0,0 +1,7 @@ +import { getImplicitRole } from '../commons/aria'; + +function hasImplicitChromiumRoleMatches(node, virtualNode) { + return getImplicitRole(virtualNode) !== null; +} + +export default hasImplicitChromiumRoleMatches;
1
1
16,569
This still needs to use the new option. We'll need tests for it too.
dequelabs-axe-core
js
@@ -0,0 +1,16 @@ +#appModules/egui.py +#A part of NonVisual Desktop Access (NVDA) +#Copyright (C) 2020 Pavol Kecskemety <pavol.kecskemety@eset.sk> +#This file is covered by the GNU General Public License. +#See the file COPYING for more details. + +import appModuleHandler + +class AppModule(appModuleHandler.AppModule):...
1
1
28,823
We are no longer including file name in the source files.
nvaccess-nvda
py
@@ -4,6 +4,9 @@ class ApplicationController < ActionController::Base # Look for template overrides before rendering before_filter :prepend_view_paths + # Set current user (see set_current_user) + before_filter :set_current_user + include GlobalHelpers include Pundit helper_method GlobalHelpers.instan...
1
class ApplicationController < ActionController::Base protect_from_forgery with: :exception # Look for template overrides before rendering before_filter :prepend_view_paths include GlobalHelpers include Pundit helper_method GlobalHelpers.instance_methods rescue_from Pundit::NotAuthorizedError, with: :u...
1
17,609
no need for this. Devise provides us with `current_user` and `user_signed_in?` helpers.
DMPRoadmap-roadmap
rb
@@ -169,4 +169,8 @@ public class EthProtocol implements SubProtocol { public static final int V65 = 65; public static final int V66 = 66; } + + public static boolean isEth66Compatible(final Capability capability) { + return capability.getName().equals(NAME) && capability.getVersion() >= ETH66.getVersio...
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
25,902
Would `Object.equals(capability.getName(), NAME)` would be safer, as you wouldn't have to do null checks?
hyperledger-besu
java
@@ -193,6 +193,7 @@ RSpec.describe RSpec::Core::Example, :parent_metadata => 'sample' do expect(RSpec::Matchers).not_to receive(:generated_description) example_group.example { assert 5 == 5 } example_group.run + RSpec::Mocks.space.reset_all end it "uses the file and lin...
1
require 'pp' require 'stringio' RSpec.describe RSpec::Core::Example, :parent_metadata => 'sample' do let(:example_group) do RSpec.describe('group description') end let(:example_instance) do example_group.example('example description') { } end it_behaves_like "metadata hash builder" do def meta...
1
14,734
Hmm, I wonder if we should revert #1862 instead? BTW, what failure do you get w/o this line?
rspec-rspec-core
rb
@@ -428,6 +428,9 @@ func (cg *configGenerator) convertSlackConfig(ctx context.Context, in monitoring return nil, errors.Errorf("failed to get key %q from secret %q", in.APIURL.Key, in.APIURL.Name) } out.APIURL = strings.TrimSpace(url) + if _, err := ValidateURL(out.APIURL); err != nil { + return nil, error...
1
// Copyright 2020 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
17,233
since there are several places where we do 1) get secret key ref and 2) validate URL, maybe it's worth having a common method? it could also trim spaces as done here (but not at the other places currently).
prometheus-operator-prometheus-operator
go
@@ -21,11 +21,11 @@ import ( func TestExtendPartialURL(t *testing.T) { want := "projects/foo/zones/bar/disks/baz" - if s := extendPartialURL("zones/bar/disks/baz", "foo"); s != want { + if s := normalizeToPartialURL("zones/bar/disks/baz", "foo"); s != want { t.Errorf("got: %q, want: %q", s, want) } - if s :...
1
// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
9,917
TestNormalize... I would also split them
GoogleCloudPlatform-compute-image-tools
go
@@ -49,7 +49,7 @@ def readObjects(obj): _startGenerator(readObjectsHelper_generator(obj)) def generateObjectSubtreeSpeech(obj,indexGen): - index=indexGen.next() + index=next(indexGen) speech.speakObject(obj,reason=controlTypes.REASON_SAYALL,index=index) yield obj,index child=obj.simpleFirstChild
1
#sayAllHandler.py #A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2006-2012 NVDA Contributors #This file is covered by the GNU General Public License. #See the file COPYING for more details. import itertools import queueHandler import config import speech import textInfos import globalVars import...
1
25,074
All changes to this file are going to conflict with #7599. Please revert these as well. They will be addressed during the Python 3 transition.
nvaccess-nvda
py
@@ -89,8 +89,10 @@ func (l *twoRandomChoicesList) Remove(peer peer.StatusPeer, _ peer.Identifier, p } func (l *twoRandomChoicesList) Choose(_ *transport.Request) peer.StatusPeer { - l.m.RLock() - defer l.m.RUnlock() + // Usage of a wite lock because r.random.Intn is not thread safe + // see: https://golang.org/pkg/...
1
// Copyright (c) 2021 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
19,619
Just thought, using spinlock (busy wait with compare and swap) that generates 2 random numbers inside rlock. We know that collisions are rare and we don't need that "large" write lock really but lock namely for "rand". Or least use a separate Lock (Mutex), namely for "rand" (wrap it into method). Mutex will use some so...
yarpc-yarpc-go
go
@@ -2,6 +2,11 @@ # For details: https://github.com/PyCQA/pylint/blob/master/COPYING import re +import sys + +from astroid.__pkginfo__ import version as astroid_version + +from pylint.__pkginfo__ import version as pylint_version # Allow stopping after the first semicolon/hash encountered, # so that an option can...
1
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING import re # Allow stopping after the first semicolon/hash encountered, # so that an option can be continued with the reasons # why it is active or disabled. OPTION_RGX = ...
1
11,953
Can we grab it directly from `__pkginfo__` as that is the source of truth for the version?
PyCQA-pylint
py
@@ -19,6 +19,7 @@ package org.openqa.selenium.grid.graphql; import graphql.schema.DataFetcher; import graphql.schema.DataFetchingEnvironment; + import org.openqa.selenium.grid.distributor.Distributor; import org.openqa.selenium.internal.Require;
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
17,791
We can revert this to reduce the diff of the PR.
SeleniumHQ-selenium
java
@@ -94,7 +94,7 @@ class BazelBuildFileView { goPkg = goPkg.replaceFirst("cloud\\/", ""); String goImport = ""; - if (isCloud) { + if (isCloud || protoPkg.contains("cloud")) { goImport = "cloud.google.com/go/"; goPkg = goPkg.replaceFirst("v(.+);", "apiv$1;"); } else {
1
package com.google.api.codegen.bazel; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; import java.util.regex.Pattern; class BazelBuildFileView { private static final Pattern LABEL_NAME = ...
1
30,596
This looks weird. `isCloud` should define if it is a cloud or no. Here it does it partially, and it can be overriden by protoPkg value (which also an argument to this function). Please make sure that isCloud completely defines the cloud thing. (i.e. it an be as straightforward as moving `protoPkg.contains("cloud")` fro...
googleapis-gapic-generator
java
@@ -1693,7 +1693,9 @@ Ex_Lob_Error ExLob::readDataToLocalFile(char *fileName, Int64 offset, Int64 siz // open the targte file for writing int filePerms = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; int openFlags = O_RDWR ; // O_DIRECT needs mem alignment - if ((LobTgtFileFlags)filefla...
1
/********************************************************************** // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. ...
1
8,358
Declaring fileflags to be of type LobTgtFileFlags would eliminate the need for all this casting. And would be safer. (Not a show-stopper though.)
apache-trafodion
cpp
@@ -124,7 +124,7 @@ public class DockerOptions { for (int i = 0; i < maxContainerCount; i++) { node.add(caps, new DockerSessionFactory(clientFactory, docker, image, caps)); } - LOG.info(String.format( + LOG.finest(String.format( "Mapping %s to docker image %s %d times", ...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
16,469
This change prevents a user understanding how their server is configured. Best to leave at `info` level.
SeleniumHQ-selenium
js
@@ -471,8 +471,10 @@ void TSSLSocket::checkHandshake() { } } while (rc == 2); } else { - // set the SNI hostname - SSL_set_tlsext_host_name(ssl_, getHost().c_str()); + /* OpenSSL < 0.9.8f does not have SSL_set_tlsext_host_name() */ + #if defined(SSL_set_tlsext_host_name) // set the SNI hostna...
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ma...
1
12,238
Typically we would add something to the build system environment to differentiate this; also is there an alternative that can be used with older OpenSSL? Other folks who are committers will need to decide if it is worth supporting an older and likely quite vulnerable (to hacks) OpenSSL library.
apache-thrift
c
@@ -367,7 +367,7 @@ var ( }, } - readBlockProducersByHeightTests = []struct { + readActiveBlockProducersByHeightTests = []struct { // Arguments protocolID string protocolType string
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,952
`readActiveBlockProducersByHeightTests` is a global variable (from `gochecknoglobals`)
iotexproject-iotex-core
go
@@ -447,10 +447,10 @@ public class SyncManager { int totalSize = target.getTotalSize(); sync.setTotalSize(totalSize); updateSync(sync, SyncState.Status.RUNNING, 0, callback); - + final String idField = sync.getTarget().getIdFieldName(); while (records != null) { /...
1
/* * Copyright (c) 2014-2105, salesforce.com, inc. * All rights reserved. * Redistribution and use of this software in source and binary forms, with or * without modification, are permitted provided that the following conditions * are met: * - Redistributions of source code must retain the above copyright notice,...
1
14,778
Falls back on `Constants.ID` if there's no custom field set.
forcedotcom-SalesforceMobileSDK-Android
java
@@ -509,6 +509,7 @@ public class FileAccessIO<T extends DvObject> extends StorageIO<T> { try { in = new FileInputStream(getFileSystemPath().toFile()); + in.skip(this.getOffset()); } catch (IOException ex) { // We don't particularly care what the reason why we hav...
1
/* Copyright (C) 2005-2012, by the President and Fellows of Harvard College. 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 Unle...
1
45,163
I believe this is what we want to rearrange: this in.skip() should not be happening here, in the open method, but in the setOffset() method itself. Because we want to be able to change that offset after the initial open. The setOffset() method will need to throw an IOException, if it's called while the InputStream is s...
IQSS-dataverse
java
@@ -32,6 +32,11 @@ public class MethodNameDeclaration extends AbstractNameDeclaration { return p.isVarargs(); } + public boolean isPrimitiveReturnType() { + return getMethodNameDeclaratorNode().getParent().getResultType().getChild(0) + .getChild(0) instanceof ASTPrimitiveType; +...
1
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ package net.sourceforge.pmd.lang.java.symboltable; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.java.ast.ASTFormalParameter; import net.sourceforge.pmd.lang.java.ast.ASTFormalParameters; import net.sou...
1
19,244
In case the method is `void`, there won't be any children and `getChild(0)` throws. We'll need to check with `isVoid()` for that case. I'll update this when I merge.
pmd-pmd
java
@@ -83,6 +83,7 @@ func main() { tch.NewInbound(channel, tch.ListenAddr(":28941")), http.NewInbound(":24034"), }, + Interceptors: yarpc.Interceptors{requestLogInterceptor{}}, }) handler := handler{items: make(map[string]string)}
1
// Copyright (c) 2016 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
9,567
If the yarpc.Interceptors wrapper will be added to any user interceptor, why not do it transitively. Can save one step for users. Same apply to filter.
yarpc-yarpc-go
go
@@ -1011,5 +1011,13 @@ func (e *ETCD) GetMembersClientURLs(ctx context.Context) ([]string, error) { // RemoveSelf will remove the member if it exists in the cluster func (e *ETCD) RemoveSelf(ctx context.Context) error { - return e.removePeer(ctx, e.name, e.address, true) + if err := e.removePeer(ctx, e.name, e.addr...
1
package etcd import ( "bytes" "context" "crypto/tls" "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "os" "path/filepath" "sort" "strconv" "strings" "time" "github.com/google/uuid" "github.com/gorilla/mux" "github.com/pkg/errors" certutil "github.com/rancher/dynamiclistener/cert" "github.com...
1
9,316
Is there anything we should do in the event we're unable to renaming the directory?
k3s-io-k3s
go
@@ -17,12 +17,17 @@ limitations under the License. package main import ( - "github.com/google/knative-gcp/pkg/broker/ingress" "go.uber.org/zap" + + "github.com/google/knative-gcp/pkg/broker/ingress" "knative.dev/pkg/logging" "knative.dev/pkg/signals" ) +// main creates and starts an ingress handler using d...
1
/* Copyright 2020 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
1
12,088
How is this env var populated? Can this be retrieved from cluster metadata?
google-knative-gcp
go
@@ -61,10 +61,11 @@ func (s *Service) reconcileInternetGateways() error { EC2Client: s.scope.EC2, BuildParams: s.getGatewayTagParams(*gateway.InternetGatewayId), }) - if err != nil { + record.Warnf(s.scope.Cluster, "FailedTagInternetGateway", "Failed to tag managed Internet Gateway %q: %v", gateway.Interne...
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
10,339
Should probably skip the success event here, since it could be a noop.
kubernetes-sigs-cluster-api-provider-aws
go
@@ -1840,7 +1840,8 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti chaptercardbuilder.buildChapterCards(item, chapters, { itemsContainer: scenesContent, backdropShape: 'overflowBackdrop', - squareShape: 'ov...
1
define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSettings', 'cardBuilder', 'datetime', 'mediaInfo', 'backdrop', 'listView', 'itemContextMenu', 'itemHelper', 'dom', 'indicators', 'imageLoader', 'libraryMenu', 'globalize', 'browser', 'events', 'playbackManager', 'scrollStyles', 'emby-itemscontai...
1
16,008
I added this here because people cards (which depends on cardBuilder) had this added in blurhash. Not sure when this is used though cc @JustAMan
jellyfin-jellyfin-web
js
@@ -509,9 +509,6 @@ func DecryptDecode(ctx context.Context, k *secrets.Keeper, post Decode) Decode { } // DecoderByName returns a *Decoder based on decoderName. -// It is intended to be used by VariableURLOpeners in driver packages. -var DecoderByName = decoderByName - // Supported values include: // - empty st...
1
// Copyright 2018 The Go Cloud Development Kit Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appli...
1
16,610
Let's keep this line in the docstring, to let end users know they shouldn't be using this directly.
google-go-cloud
go
@@ -39,13 +39,10 @@ func (p *Protocol) validateCreateStake(ctx context.Context, act *action.CreateSt if act.Amount().Cmp(p.config.MinStakeAmount) == -1 { return errors.Wrap(ErrInvalidAmount, "stake amount is less than the minimum requirement") } - if act.GasPrice().Sign() < 0 { - return errors.Wrap(action.ErrGa...
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,463
can do the same for other validateXXX()
iotexproject-iotex-core
go
@@ -512,7 +512,7 @@ ReturnCode_t PublisherImpl::wait_for_acknowledgments( const DomainParticipant* PublisherImpl::get_participant() const { - return participant_->get_participant(); + return const_cast<const DomainParticipantImpl*>(participant_)->get_participant(); } const Publisher* PublisherImpl::get_pu...
1
// Copyright 2019 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
20,819
Why is this necessary?
eProsima-Fast-DDS
cpp
@@ -21,6 +21,7 @@ import os import sys import sphinx from sphinx.errors import VersionRequirementError +import datetime curr_path = os.path.dirname(os.path.realpath(__file__)) libpath = os.path.join(curr_path, '../python-package/')
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # LightGBM documentation build configuration file, created by # sphinx-quickstart on Thu May 4 14:30:58 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # a...
1
19,124
Please move this import upper to other similar imports
microsoft-LightGBM
cpp
@@ -1749,6 +1749,14 @@ translate_from_synchall_to_dispatch(thread_record_t *tr, thread_synch_state_t sy arch_mcontext_reset_stolen_reg(dcontext, mc); } }); + IF_AARCHXX({ + // XXX i#4495: Consider saving stolen reg's application value. + set_stolen_reg...
1
/* ********************************************************** * Copyright (c) 2012-2020 Google, Inc. All rights reserved. * Copyright (c) 2008-2010 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or witho...
1
21,948
Include the key word "translated". Otherwise the reader will find this confusing.
DynamoRIO-dynamorio
c