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
@@ -853,6 +853,11 @@ class DynamicMap(HoloMap): unbounded_dims.append(str(kdim)) return unbounded_dims + @property + def current_key(self): + """Returns the current key value.""" + return getattr(self, '_current_key', None) + def _stream_parameters(self): re...
1
import itertools import types import inspect from numbers import Number from itertools import groupby from functools import partial from collections import defaultdict from contextlib import contextmanager from types import FunctionType import numpy as np import param from . import traversal, util from .accessors im...
1
24,655
I think I would prefer you declare `self._current_key=None` in the constructor and just return `self._current_key`. That way you can prevent anyone from overwriting `current_key` without needing to use `getattr` here.
holoviz-holoviews
py
@@ -22,8 +22,14 @@ const FromCSVKind = "fromCSV" type FromCSVOpSpec struct { CSV string `json:"csv"` File string `json:"file"` + Mode string `json:"mode"` } +const ( + annotationMode = "annotations" + rawMode = "raw" +) + func init() { fromCSVSignature := runtime.MustLookupBuiltinType("csv", "from") ...
1
package csv import ( "context" "io" "io/ioutil" "strings" "github.com/influxdata/flux" "github.com/influxdata/flux/codes" "github.com/influxdata/flux/csv" "github.com/influxdata/flux/dependencies/filesystem" "github.com/influxdata/flux/execute" "github.com/influxdata/flux/internal/errors" "github.com/influ...
1
15,731
I guess I like the name `mode` okay. I can't think of anything better.
influxdata-flux
go
@@ -69,8 +69,12 @@ type Step struct { testType stepImpl } -// NewStep creates a Step with given name and timeout with the specified workflow +// NewStep creates a Step with given name and timeout with the specified workflow. +// If timeout is less or equal to zero, defaultTimeout from the workflow will be used ...
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,845
I would create a new method (NewStepWithDefaultTimeout?) for this purpose because timeout<=0 looks like a hidden logic
GoogleCloudPlatform-compute-image-tools
go
@@ -71,6 +71,7 @@ func Register(r *gin.RouterGroup, s *Service) { // @Param experimentNamespace query string false "The namespace of the experiment" // @Param uid query string false "The UID of the experiment" // @Param kind query string false "kind" Enums(PodChaos, IoChaos, NetworkChaos, TimeChaos, KernelChaos, Str...
1
// Copyright 2020 Chaos Mesh 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
16,329
Are these limit changes related?
chaos-mesh-chaos-mesh
go
@@ -18,12 +18,12 @@ Routing and network interface handling for IPv6. from __future__ import absolute_import import socket +import scapy.consts from scapy.config import conf from scapy.utils6 import * from scapy.arch import * from scapy.pton_ntop import * from scapy.error import warning, log_loading -from scapy...
1
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license ## Copyright (C) 2005 Guillaume Valadon <guedou@hongo.wide.ad.jp> ## Arnaud Ebalard <arnaud.ebalard@...
1
10,307
Don't you mean `import scapy.consts`?
secdev-scapy
py
@@ -62,3 +62,7 @@ func (e *Executor) ensurePrimaryUpdate(ctx context.Context) model.StageStatus { e.LogPersister.AppendSuccess(fmt.Sprintf("Successfully applied %d primary resources", len(manifests))) return model.StageStatus_STAGE_SUCCESS } + +func (e *Executor) rollbackPrimary(ctx context.Context) model.StageSta...
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
7,343
`ctx` is unused in rollbackPrimary
pipe-cd-pipe
go
@@ -40,7 +40,7 @@ const ( // BufferedEventID is the id of the buffered event BufferedEventID int64 = -123 // EmptyEventTaskID is uninitialized id of the task id within event - EmptyEventTaskID int64 = -1234 + EmptyEventTaskID int64 = 0 // TransientEventID is the id of the transient event TransientEventID int6...
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,002
This is not what title says.
temporalio-temporal
go
@@ -0,0 +1,19 @@ +/** + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package net.sourceforge.pmd.autofix; + +import net.sourceforge.pmd.lang.ast.Node; + +/** + * Classes of this interface must be used when it is desired to make one or more operations to the AST. + */ +public in...
1
1
13,445
a fix applies several fixes? maybe this should simply be `applyToNode`
pmd-pmd
java
@@ -25,11 +25,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// fakeGetClientset gets the cvr clientset func fakeGetClientset() (clientset *clientset.Clientset, err error) { return &client.Clientset{}, nil } -func fakeListfn(cli *clientset.Clientset, namespace string, opts metav1.ListOptions...
1
// Copyright © 2018-2019 The OpenEBS Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law o...
1
16,162
U1000: func `fakeGetOk` is unused (from `unused`)
openebs-maya
go
@@ -18,6 +18,8 @@ import ( "errors" "fmt" + "k8s.io/client-go/util/retry" + "github.com/hashicorp/go-multierror" "golang.org/x/sync/errgroup" v1 "k8s.io/api/core/v1"
1
// Copyright 2019 Chaos Mesh 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
19,137
Because there is a "k8s.io/client-go/tools/cache" below, we can sort out all the "imports" here.
chaos-mesh-chaos-mesh
go
@@ -3,7 +3,9 @@ package api import ( + "github.com/aws/aws-sdk-go/aws" "fmt" + "encoding/json" "reflect" "sort" "strings"
1
// +build codegen package api import ( "fmt" "reflect" "sort" "strings" ) // ShapeValueBuilder provides the logic to build the nested values for a shape. type ShapeValueBuilder struct{} // BuildShape will recursively build the referenced shape based on the json // object provided. isMap will dictate how the fi...
1
9,800
Nit should be using `goimports` to format the import statements with standard libary imports first, new line, followed by non-standard library imports.
aws-aws-sdk-go
go
@@ -118,8 +118,10 @@ func (o *deletePipelineOpts) Ask() error { // Execute deletes the secret and pipeline stack. func (o *deletePipelineOpts) Execute() error { - if err := o.deleteSecret(); err != nil { - return err + if o.PipelineSecret != "" { + if err := o.deleteSecret(); err != nil { + return err + } } ...
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/copilot-cli/internal/pkg/aws/secretsmanager" "github.com/aws/copilot-cli/internal/pkg/aws/sessions" "github.com/aws/copilot-cli/internal/pkg/deploy/clo...
1
16,268
Do we not have tests for pipeline delete
aws-copilot-cli
go
@@ -146,6 +146,12 @@ class HdfsClient(hdfs_abstract_client.HdfsFileSystem): def put(self, local_path, destination): self.call_check(load_hadoop_cmd() + ['fs', '-put', local_path, destination]) + def append(self, local_path, destination): + """ + Requires Hadoop >= 2.3.0 + """ + ...
1
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
1
11,932
Good that you mention this constraint in the docstring :)
spotify-luigi
py
@@ -15,8 +15,13 @@ package workflow import ( "encoding/json" + "fmt" "net/http" + ctrl "sigs.k8s.io/controller-runtime" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + "github.com/gin-gonic/gin" "github.com/chaos-mesh/chaos-mesh/api/v1alpha1"
1
// Copyright 2021 Chaos Mesh 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
22,634
remove this blank?
chaos-mesh-chaos-mesh
go
@@ -9515,7 +9515,8 @@ FileScan::FileScan(const CorrName& tableName, estRowsAccessed_ (0), mdamFlag_(UNDECIDED), skipRowsToPreventHalloween_(FALSE), - doUseSearchKey_(TRUE) + doUseSearchKey_(TRUE), + computedNumOfActivePartiions_(-1) { // Set the filescan properties:
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,105
Partitions is misspelled 8 times in this commit, might make sense to fix the spelling for all of those.
apache-trafodion
cpp
@@ -22,9 +22,11 @@ import shlex from PyQt5.QtCore import (pyqtSlot, pyqtSignal, QObject, QProcess, - QProcessEnvironment) + QProcessEnvironment, QUrl) -from qutebrowser.utils import message, log +from qutebrowser.utils import message, log, objreg + +from qutebrows...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
1
20,011
Please remove this blank line - those are only used to group Python/third-party/qutebrowser imports.
qutebrowser-qutebrowser
py
@@ -45,6 +45,8 @@ var ActionCmd = &cobra.Command{ Args: cobra.MinimumNArgs(1), } +var insecure bool + func init() { ActionCmd.AddCommand(actionHashCmd) ActionCmd.AddCommand(actionTransferCmd)
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
17,390
`insecure` is a global variable (from `gochecknoglobals`)
iotexproject-iotex-core
go
@@ -479,6 +479,11 @@ func HTTPBackend(ctx *context.Context, cfg *serviceConfig) http.HandlerFunc { for _, route := range routes { r.URL.Path = strings.ToLower(r.URL.Path) // blue: In case some repo name has upper case name if m := route.reg.FindStringSubmatch(r.URL.Path); m != nil { + if setting.Repositor...
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 repo import ( "bytes" "compress/gzip" "fmt" "io" "io/ioutil" "net/http" "os" "os/exec" "path" "regexp" "runtime" "strconv" "strings" "t...
1
12,066
Same as above (HTTP in upper-case)
gogs-gogs
go
@@ -206,4 +206,11 @@ class YouTubeProviderTest extends AbstractProviderTest $this->assertSame(100, $properties['player_parameters']['height']); $this->assertSame(100, $properties['player_parameters']['width']); } + + public function testGetReferenceUrl() + { + $media = new Media(); +...
1
<?php /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\MediaBundle\Tests\Provider; use Buzz\Browser; ...
1
7,881
This is getting repetitive maybe you could introduce an abstract test case with a `getExpectedUrl($providerReference)` method ?
sonata-project-SonataMediaBundle
php
@@ -0,0 +1,5 @@ +package reflect + +func MakeFunc(typ Type, fn func(args []Value) (results []Value)) Value { + return Value{} +}
1
1
12,391
I do not think returning `Value{}` is correct here. For example, `reflect.MakeFunc(...).Kind()` would return `reflect.Invalid` instead of `reflect.Func`. Therefore, I think this should panic instead.
tinygo-org-tinygo
go
@@ -73,7 +73,7 @@ function setProperty(dom, name, value, oldValue, isSvg) { else if (name[0]==='o' && name[1]==='n') { let useCapture = name !== (name=name.replace(/Capture$/, '')); let nameLower = name.toLowerCase(); - name = (nameLower in dom ? nameLower : name).substring(2); + name = (nameLower in window ?...
1
import { IS_NON_DIMENSIONAL } from '../constants'; import options from '../options'; /** * Diff the old and new properties of a VNode and apply changes to the DOM node * @param {import('../internal').PreactElement} dom The DOM node to apply * changes to * @param {object} newProps The new props * @param {object} o...
1
13,242
Does this work for Custom Elements? iirc we're lacking test cases for them. /cc @andrewiggins @developit
preactjs-preact
js
@@ -224,9 +224,7 @@ func (m *ipipManager) CompleteDeferredWork() error { for _, ip := range m.activeHostnameToIP { members = append(members, ip) } - for _, ip := range m.externalNodeCIDRs { - members = append(members, ip) - } + members = append(members, m.externalNodeCIDRs...) m.ipsetsDataplane.AddOrR...
1
// Copyright (c) 2016-2017, 2019 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requir...
1
17,206
Same change just above?
projectcalico-felix
go
@@ -35,7 +35,8 @@ // Promise() being missing on some legacy browser, and a funky one // is Promise() present but buggy on WebOS 2 window.Promise = undefined; - window.Promise = undefined; + /* eslint-disable-next-line no-restricted-globals -- Explicit check on self needed */ + ...
1
(function() { function injectScriptElement(src, onload) { if (!src) { return; } const script = document.createElement('script'); if (window.dashboardVersion) { src += `?v=${window.dashboardVersion}`; } script.src = src; script.setAttri...
1
17,484
I suppose `apploader.js` isn't used by WebWorkers. So `self` will always be `window` here.
jellyfin-jellyfin-web
js
@@ -7,13 +7,7 @@ test_name "bolt plan run should apply manifest block on remote hosts via ssh" do extend Acceptance::BoltCommandHelper ssh_nodes = select_hosts(roles: ['ssh']) - skip_targets = select_hosts(platform: [/debian-8/]) targets = "ssh_nodes" - if skip_targets.any? - ssh_nodes -= skip_targets -...
1
# frozen_string_literal: true require 'bolt_command_helper' require 'json' test_name "bolt plan run should apply manifest block on remote hosts via ssh" do extend Acceptance::BoltCommandHelper ssh_nodes = select_hosts(roles: ['ssh']) skip_targets = select_hosts(platform: [/debian-8/]) targets = "ssh_nodes" ...
1
17,593
Since this var is no longer defined we should remove the `if skip_targets.any?` bit below.
puppetlabs-bolt
rb
@@ -170,6 +170,12 @@ def func_arn(function_name): return aws_stack.lambda_function_arn(function_name) +def func_qualifier(function_name, qualifier=None): + arn = aws_stack.lambda_function_arn(function_name) + if ARN_TO_LAMBDA.get(arn).qualifier_exists(qualifier): + return '{}:{}'.format(arn, quali...
1
import re import os import imp import sys import json import uuid import time import base64 import logging import threading import traceback import hashlib import functools from io import BytesIO from datetime import datetime from six.moves import cStringIO as StringIO from six.moves.urllib.parse import urlparse from f...
1
11,711
I think we should `return arn` as a fallback at the end of this function (otherwise the `['Resource']` entry below could become `None`).
localstack-localstack
py
@@ -41,6 +41,11 @@ type NATProxy struct { func (np *NATProxy) consumerHandOff(consumerPort int, remoteConn *net.UDPConn) chan struct{} { stop := make(chan struct{}) + if np.socketProtect == nil { + // shutdown pinger session since openvpn client will connect directly (without NATProxy) + remoteConn.Close() + re...
1
/* * Copyright (C) 2019 The "MysteriumNetwork/node" Authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
1
14,386
Why session is started at all, if you need to shut it down e.g. DI should launch noopSession
mysteriumnetwork-node
go
@@ -184,7 +184,7 @@ type describer interface { } type workspaceDeleter interface { - DeleteAll() error + DeleteWorkspaceFile() error } type svcManifestReader interface {
1
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli import ( "encoding" "io" "github.com/aws/amazon-ecs-cli-v2/internal/pkg/aws/cloudwatchlogs" "github.com/aws/amazon-ecs-cli-v2/internal/pkg/aws/codepipeline" "github.com/aws/amazon-ecs-cli-v2/i...
1
13,705
nit: can we rename the interface to `wsFileDeleter`
aws-copilot-cli
go
@@ -91,10 +91,10 @@ func hashRule(r *rule) string { // It's the struct used by reconciler. type CompletedRule struct { *rule - // Source Pods of this rule, can't coexist with ToAddresses. - FromAddresses v1beta1.GroupMemberPodSet - // Destination Pods of this rule, can't coexist with FromAddresses. - ToAddresses v1...
1
// Copyright 2019 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
1
22,326
Why target cannot be external endpoints?
antrea-io-antrea
go
@@ -127,4 +127,8 @@ public interface CollectionAdminParams { /** Option to follow aliases when deciding the target of a collection admin command. */ String FOLLOW_ALIASES = "followAliases"; + + /** Prefix for automatically created config elements. */ + String AUTO_PREFIX = ".auto_"; + }
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
33,702
We use a suffix ".AUTOCREATED" for configsets, maybe we can use the same here?
apache-lucene-solr
java
@@ -27,7 +27,7 @@ namespace Samples { // Enable OpenTelemetry for the source "MyCompany.MyProduct.MyWebServer" // and use Console exporter - OpenTelemetrySdk.Default.EnableOpenTelemetry( + OpenTelemetrySdk.EnableOpenTelemetry( (builder) => builde...
1
// <copyright file="TestConsoleActivity.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.a...
1
14,243
This one won't be disposed. Should be (something like) `using var openTelemetry = OpenTelemetrySdk.EnableOpenTelemetry(` no?
open-telemetry-opentelemetry-dotnet
.cs
@@ -37,7 +37,7 @@ from logHandler import log import UIAUtils from comInterfaces import UIAutomationClient as UIA # F403: unable to detect undefined names -from comInterfaces .UIAutomationClient import * # noqa: F403 +from comInterfaces.UIAutomationClient import * # noqa: F403 import textInfos from typing impor...
1
# A part of NonVisual Desktop Access (NVDA) # Copyright (C) 2011-2021 NV Access Limited, Joseph Lee, Babbage B.V., Leonard de Ruijter # This file is covered by the GNU General Public License. # See the file COPYING for more details. import ctypes import ctypes.wintypes from ctypes import ( oledll, windll, ...
1
32,361
Why this is in the diff?
nvaccess-nvda
py
@@ -136,6 +136,8 @@ type QuiesceDriver interface { type CloudBackupDriver interface { // CloudBackupCreate uploads snapshot of a volume to the cloud CloudBackupCreate(input *api.CloudBackupCreateRequest) error + // CloudBackupGroupCreate creates and then uploads volumegroup snapshots + CloudBackupGroupCreate(input...
1
package volume import ( "errors" "github.com/libopenstorage/openstorage/api" ) var ( // ErrAlreadyShutdown returned when driver is shutdown ErrAlreadyShutdown = errors.New("VolumeDriverProvider already shutdown") // ErrExit returned when driver already registered ErrExist = errors.New("Already exists") // Err...
1
7,177
How is status determined? When the user calls CloudBackupCreate( src_volume_id ) they can then call CloudBackupStatus( src_volume_id ) Is there something similar for this new API?
libopenstorage-openstorage
go
@@ -232,6 +232,15 @@ export function diff( if ((tmp = options.diffed)) tmp(newVNode); } catch (e) { + // When we are hydrating and have excessDomChildren we don't know the _children this VNode + // should receive so it's safer to unmount them. Else on the subsequent error-boundary diff, + // we won't know the...
1
import { EMPTY_OBJ, EMPTY_ARR } from '../constants'; import { Component } from '../component'; import { Fragment } from '../create-element'; import { diffChildren } from './children'; import { diffProps, setProperty } from './props'; import { assign, removeNode } from '../util'; import options from '../options'; /** ...
1
15,861
We could pass `excessDomChildren` to `options._catchError` and only do this if an error-boundary catches the error. Not entirely sure if that's better.
preactjs-preact
js
@@ -464,7 +464,7 @@ class CombineAssets */ protected function setHashOnCombinerFilters($hash) { - $allFilters = call_user_func_array('array_merge', $this->getFilters()); + $allFilters = array_merge(...array_values($this->getFilters())); foreach ($allFilters as $filter) { ...
1
<?php namespace System\Classes; use App; use Url; use File; use Lang; use Event; use Cache; use Route; use Config; use Request; use Response; use October\Rain\Assetic\Asset\FileAsset; use October\Rain\Assetic\Asset\AssetCache; use October\Rain\Assetic\Asset\AssetCollection; use October\Rain\Assetic\Cache\FilesystemCac...
1
19,343
In php8 named parameters were introduced and now it is required to match called method parameter name when setting parameters by array destructing or call_user_func_array() etc.
octobercms-october
php
@@ -82,6 +82,9 @@ func (b3 B3) Extract(ctx context.Context, supplier propagation.HTTPSupplier) con } else { sc = b3.extract(supplier) } + if !sc.IsValid() { + return ctx + } return ContextWithRemoteSpanContext(ctx, sc) }
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
12,029
If instead we had `B3.extractSingleHeader` and `B3.extract` return a bool value as a second return value, we could avoid the byte array comparison in `TraceID.IsValid`. Did you consider that alternative?
open-telemetry-opentelemetry-go
go
@@ -56,7 +56,7 @@ return [ 'choose_file' => 'Datei auswählen', 'close' => 'Schließen', 'create' => 'Erstellen', - 'create_and_add_another' => 'Erstellen und weiter hinzufügen', + 'create_and_add_another' => 'Erstellen und weitere hinzufügen', 'create_and_continue' => 'E...
1
<?php return [ 'page_title' => [ 'dashboard' => 'Dashboard', 'detail' => '%entity_label_singular% <small>(#%entity_short_id%)</small>', 'edit' => '%entity_label_singular% <small>(#%entity_short_id%)</small> bearbeiten', 'index' => '%entity_label_plural%', 'new' => '%entity_l...
1
12,698
I think this is more of a semantic difference than a typo - `weiter hinzufgen` is like `continue adding` whereas `weitere hinzufgen` is like `add more`. I think it makes sense to change it though
EasyCorp-EasyAdminBundle
php
@@ -227,3 +227,12 @@ class RecordsViewTest(BaseWebTest, unittest.TestCase): MINIMALIST_RECORD, headers=headers, status=200) + + def test_records_can_be_created_after_deletion(self): + self.app.delete(self.record_url, + he...
1
import json import mock from cliquet.utils import decode_header from .support import (BaseWebTest, unittest, MINIMALIST_RECORD, MINIMALIST_GROUP, MINIMALIST_BUCKET, MINIMALIST_COLLECTION, get_user_headers) class RecordsViewTest(BaseWebTest, unittest.TestCase): collect...
1
8,964
nit: 200 is superfluous
Kinto-kinto
py
@@ -246,7 +246,7 @@ TEST_F(SchemaTest, metaCommunication) { // Test unreserved keyword { cpp2::ExecutionResponse resp; - std::string query = "CREATE TAG upper(name string, EMAIL string, " + std::string query = "CREATE TAG upper(name string, email string, " "...
1
/* Copyright (c) 2018 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "base/Base.h" #include "graph/test/TestEnv.h" #include "graph/test/TestBase.h" #include "meta/test/TestUtils.h"...
1
18,292
This is testing `unreserved keyword`
vesoft-inc-nebula
cpp
@@ -829,6 +829,10 @@ static const MethodMapping projectionMethodMappings[] = { {PROJ_WKT2_NAME_METHOD_QUADRILATERALIZED_SPHERICAL_CUBE, 0, "Quadrilateralized_Spherical_Cube", "qsc", nullptr, paramsNatOrigin}, + + {PROJ_WKT2_NAME_METHOD_S2, 0, + "S2", "s2", nullptr, paramsNatOrigin}, + {PR...
1
/****************************************************************************** * * Project: PROJ * Purpose: ISO19111:2019 implementation * Author: Even Rouault <even dot rouault at spatialys dot com> * ****************************************************************************** * Copyright (c) 2018, Even ...
1
12,650
paramsNatOrigin doesn't include sUVtoST. I would just remove that definition for now
OSGeo-PROJ
cpp
@@ -71,9 +71,15 @@ func makeKMD() KeyMetadata { return emptyKeyMetadata{tlf.FakeID(0, tlf.Private), 1} } +func initBlockRetrievalQueueTest(t *testing.T) *blockRetrievalQueue { + q := newBlockRetrievalQueue(0, 0, newTestBlockRetrievalConfig(t, nil, nil)) + <-q.TogglePrefetcher(false, nil) + return q +} + func Test...
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 ( "io" "testing" "github.com/keybase/client/go/protocol/keybase1" "github.com/keybase/kbfs/kbfsblock" "github.com/keybase/kbfs/tlf" "githu...
1
18,651
It feels like the test should be waiting for the prefetcher to shut down, but I don't have a great reason why other than that it might be confusing for debugging if there are still goroutines from old prefetchers lying. But I guess since `TogglePrefetcher(false)` doesn't actually set the prefetcher to nil, the queue sh...
keybase-kbfs
go
@@ -1,4 +1,4 @@ -//snippet-sourcedescription:[ListAccessKeys.java demonstrates how to list access keys associated with an AWS Identity and Access Management (IAM) user.] +//snippet-sourcedescription:[ListAccessKeys.java demonstrates how to list access keys associated with an AWS Identity and Access Management (AWS IAM)...
1
//snippet-sourcedescription:[ListAccessKeys.java demonstrates how to list access keys associated with an AWS Identity and Access Management (IAM) user.] //snippet-keyword:[AWS SDK for Java v2] //snippet-keyword:[Code Sample] //snippet-service:[AWS IAM] //snippet-sourcetype:[full-example] //snippet-sourcedate:[11/0...
1
18,247
AWS Identity and Access Management (IAM)
awsdocs-aws-doc-sdk-examples
rb
@@ -34,6 +34,7 @@ class LoadProjectsCloudsqlPipeline(base_pipeline.BasePipeline): """Pipeline to load project CloudSql data into Inventory.""" PROJECTS_RESOURCE_NAME = 'project_iam_policies' + RESOURCE_NAME = 'cloudsql' RESOURCE_NAME_INSTANCES = 'cloudsql_instances' RESOURCE_NAME_IPADDRESSES = ...
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 writing, s...
1
26,092
As a long term thing, would it make sense to move the resource names as keys under the requirements map?
forseti-security-forseti-security
py
@@ -57,7 +57,7 @@ function traverseForHeaders(headerType, position, tableGrid) { * @return {Array<HTMLTableCellElement>} Array of headers associated to the table cell */ table.getHeaders = function(cell, tableGrid) { - if (cell.hasAttribute('headers')) { + if (cell.getAttribute('headers')) { return commons.dom....
1
/* global table */ /** * Loop through the table grid looking for headers and caching the result. * @param {String} headerType The type of header to look for ("row" or "col") * @param {Object} position The position of the cell to start looking * @param {Array} tablegrid A matrix of the table obtained using axe.comm...
1
15,376
That doesn't fix the whole problem. The issue lays in this line right here, not the one above. There are two problems with this line: 1. It finds things that aren't cells in the table 2. if it doesn't find anything, it shouldn't return empty here, but continue down to look for row/ column headers.
dequelabs-axe-core
js
@@ -38,7 +38,9 @@ public class NoUnusedPinCheckTask extends DefaultTask { @Input public final Set<String> getResolvedArtifacts() { - return BaselineVersions.getResolvedArtifacts(getProject()); + return getProject().getAllprojects().stream() + .flatMap(project -> BaselineVersions...
1
/* * (c) Copyright 2018 Palantir Technologies 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 ...
1
6,651
I am pretty sure that this is infinite recursion as getAllProjects returns the project itself.
palantir-gradle-baseline
java
@@ -268,6 +268,7 @@ Blockly.Categories = { "sound": "sounds", "pen": "pen", "data": "data", + "dataLists": "data-lists", "event": "events", "control": "control", "sensing": "sensing",
1
/** * @license * Visual Blocks Editor * * Copyright 2016 Google Inc. * https://developers.google.com/blockly/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apach...
1
8,994
Something I didn't catch before I merged this PR, is the hyphenated constant a problem? E.g. should "data-lists" be "data_lists"? @paulkaplan
LLK-scratch-blocks
js
@@ -248,3 +248,7 @@ L2socket: use the provided L2socket import scapy.sendrecv scapy.sendrecv.sniff = sniff + +# If wpcap.dll is not available +if (not conf.use_winpcapy) and (not conf.use_pcap) and (not conf.use_dnet): + from scapy.arch.windows.disable_sendrecv import *
1
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ Instanciate part of the customizations needed to support Microsoft Windows. """ import itertools import os import re...
1
9,024
Can you write the test as `if not (conf.use_winpcapy or conf.use_pcap or conf.use_dnet):`
secdev-scapy
py
@@ -23,6 +23,8 @@ class _Repository: self.description = check.opt_str_param(description, "description") def __call__(self, fn: Callable[[], Any]) -> RepositoryDefinition: + from dagster.core.asset_defs import ForeignAsset + check.callable_param(fn, "fn") if not self.name:
1
from functools import update_wrapper from typing import Any, Callable, Optional, Union from dagster import check from dagster.core.errors import DagsterInvalidDefinitionError from ..graph_definition import GraphDefinition from ..partition import PartitionSetDefinition from ..pipeline_definition import PipelineDefinit...
1
17,490
we have to include foreign assets on the repository directly because they don't belong to a job? This seems very awkward... Is this a step towards the job-less assets on the repository? Did you consider having `build_asset_job` take in a set of foreign assets instead? I suppose we would then need to subclass it to be a...
dagster-io-dagster
py
@@ -14,8 +14,7 @@ TempDir::TempDir(const char* pathTemplate, bool deleteOnDestroy) : deleteOnDestroy_(deleteOnDestroy) { auto len = strlen(pathTemplate); std::unique_ptr<char[]> name(new char[len + 1]); - strncpy(name.get(), pathTemplate, len); - name.get()[len] = '\0'; + strcpy(name.get(), ...
1
/* Copyright (c) 2018 - present, VE Software Inc. All rights reserved * * This source code is licensed under Apache 2.0 License * (found in the LICENSE.Apache file in the root directory) */ #include "base/Base.h" #include "fs/TempDir.h" namespace vesoft { namespace fs { TempDir::TempDir(const char* pathTemplate...
1
14,084
`-Wstringop-truncation` is a new kind of error detector introduced in GCC 8. As for this patch, these are two false-positives though.
vesoft-inc-nebula
cpp
@@ -36,7 +36,7 @@ const ( // ErrSharedConfigSourceCollision will be returned if a section contains both // source_profile and credential_source -var ErrSharedConfigSourceCollision = awserr.New(ErrCodeSharedConfig, "only source profile or credential source can be specified, not both", nil) +var ErrSharedConfigSource...
1
package session import ( "crypto/tls" "crypto/x509" "fmt" "io" "io/ioutil" "net/http" "os" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/corehandlers" "github.com/aws/aws-sdk-go/aws/credentials" "github...
1
10,307
Can we port this error msg to v2 too? This one is better, as it explicitly states what sources are allowed.
aws-aws-sdk-go
go
@@ -3,6 +3,7 @@ var f = require('util').format; var test = require('./shared').assert; var setupDatabase = require('./shared').setupDatabase; +const { ReadPreference } = require('../..'); const Db = require('../../lib/db'); const expect = require('chai').expect;
1
'use strict'; var f = require('util').format; var test = require('./shared').assert; var setupDatabase = require('./shared').setupDatabase; const Db = require('../../lib/db'); const expect = require('chai').expect; describe('MongoClient', function() { before(function() { return setupDatabase(this.configuration)...
1
18,653
The convention so far has been to require directly from the defining file (in this case `../../read_preference') . I think the concern has been mostly about the potential for circular dependency cycles
mongodb-node-mongodb-native
js
@@ -10,8 +10,9 @@ from ..registry import PIPELINES @PIPELINES.register_module class LoadImageFromFile(object): - def __init__(self, to_float32=False): + def __init__(self, to_float32=False, color_type='color'): self.to_float32 = to_float32 + self.color_type = color_type def __call__(sel...
1
import os.path as osp import mmcv import numpy as np import pycocotools.mask as maskUtils from ..registry import PIPELINES @PIPELINES.register_module class LoadImageFromFile(object): def __init__(self, to_float32=False): self.to_float32 = to_float32 def __call__(self, results): if results[...
1
18,455
I suggest expanding dims here to simplify the formatting.
open-mmlab-mmdetection
py
@@ -9,7 +9,7 @@ from pyramid.paster import bootstrap from kinto.config import init -CONFIG_FILE = 'config/kinto.ini' +CONFIG_FILE = 'kinto/config/kinto.ini' def main(args=None):
1
from __future__ import print_function import argparse import os import sys from six.moves import input from cliquet.scripts import cliquet from pyramid.scripts import pserve from pyramid.paster import bootstrap from kinto.config import init CONFIG_FILE = 'config/kinto.ini' def main(args=None): """The main routi...
1
8,339
Why do you need to specify the kinto prefix here?
Kinto-kinto
py
@@ -45,7 +45,7 @@ class FPN(nn.Module): >>> self = FPN(in_channels, 11, len(in_channels)).eval() >>> outputs = self.forward(inputs) >>> for i in range(len(outputs)): - ... print('outputs[{}].shape = {!r}'.format(i, outputs[i].shape)) + ... print(f'outputs[{i}].shape = {o...
1
import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import xavier_init from mmdet.core import auto_fp16 from mmdet.ops import ConvModule from ..builder import NECKS @NECKS.register_module class FPN(nn.Module): """ Feature Pyramid Network. This is an implementation of - Feature Pyramid Ne...
1
19,264
The `!r` is unnecessary.
open-mmlab-mmdetection
py
@@ -161,7 +161,7 @@ func (o *lazyCredsOpener) OpenBucketURL(ctx context.Context, u *url.URL) (*blob. isMSIEnvironment := adal.MSIAvailable(ctx, adal.CreateSender()) - if accountKey != "" { + if accountKey != "" || sasToken != "" { o.opener, o.err = openerFromEnv(accountName, accountKey, sasToken, storageDo...
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
20,390
I didn't see existing tests for this `OpenBucketURL`. Not sure if it's easy to do without mocking these `opener` calls.
google-go-cloud
go
@@ -21,6 +21,8 @@ namespace AutoRest.Go.TemplateModels // (null or empty if the model is not paged). public string NextLink; + public bool PreparerNeeded; + public ModelTemplateModel(CompositeType source) { this.LoadFrom(source);
1
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.Linq; using AutoRest.Core.ClientModel; using AutoRest.Core.Utilities; namespace AutoRes...
1
23,110
Should we default to `true` ?
Azure-autorest
java
@@ -15,6 +15,7 @@ import ( uconfig "go.uber.org/config" "github.com/iotexproject/iotex-core/address" + "github.com/iotexproject/iotex-core/consensus/fsm" "github.com/iotexproject/iotex-core/crypto" "github.com/iotexproject/iotex-core/pkg/keypair" )
1
// Copyright (c) 2018 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
14,356
File is not `goimports`-ed (from `goimports`)
iotexproject-iotex-core
go
@@ -54,11 +54,14 @@ const rules = [ use: [ { loader: 'babel-loader', - query: { - presets: [ [ '@babel/env', { - useBuiltIns: 'entry', - corejs: 2, - } ], '@babel/preset-react' ], + options: { + babelrc: false, + configFile: false, + cacheDirectory: true, + presets: [...
1
/** * Webpack config. * * 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 * * Unle...
1
30,282
Shouldn't these options also include `@babel/preset-env`? Also I see you set `babelrc` to `false`, could we rely on our existing `.babelrc` file? Feels like some duplicate configuration otherwise.
google-site-kit-wp
js
@@ -1609,7 +1609,7 @@ func (wn *WebsocketNetwork) removePeer(peer *wsPeer, reason disconnectReason) { // first logging, then take the lock and do the actual accounting. // definitely don't change this to do the logging while holding the lock. localAddr, _ := wn.Address() - wn.log.With("event", "Disconnected").Wit...
1
// Copyright (C) 2019 Algorand, Inc. // This file is part of go-algorand // // go-algorand is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any l...
1
36,821
Nit: We can use `%s` since `disconnectReason` is a string.
algorand-go-algorand
go
@@ -17,7 +17,8 @@ X_test = df_test.drop(0, axis=1).values print('Start training...') # train -gbm = lgb.LGBMRegressor(objective='regression', +gbm = lgb.LGBMRegressor(boosting_type='rgf', + objective='regression', num_leaves=31, learning_rate=...
1
# coding: utf-8 # pylint: disable = invalid-name, C0111 import lightgbm as lgb import pandas as pd from sklearn.metrics import mean_squared_error from sklearn.model_selection import GridSearchCV # load or create your dataset print('Load data...') df_train = pd.read_csv('../regression/regression.train', header=None, se...
1
18,370
I think it's better to create a new example
microsoft-LightGBM
cpp
@@ -392,7 +392,7 @@ void ResolveOperation(Action &action, const RENDER_PASS_STATE &rp_state, const V if (aspect_mask) { action(aspect_string, "resolve read", src_at, dst_at, attachment_views[src_at], - SYNC_COLOR_ATTACHMENT_OUTPUT_COLOR_ATTACHMENT_READ, kDepthStencilAttachmentR...
1
/* Copyright (c) 2019-2020 The Khronos Group Inc. * Copyright (c) 2019-2020 Valve Corporation * Copyright (c) 2019-2020 LunarG, 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 * ...
1
14,702
The stages are correct, but the more forgiving `kAttachmentRasterOrder` should be used, based on a review of the spec. That should give the same effect of suppressing the false positive conflict between the DEPTH R/W and resolve. > End-of-subpass multisample resolves are treated as color attachment writes for the purpo...
KhronosGroup-Vulkan-ValidationLayers
cpp
@@ -64,7 +64,7 @@ class AcidBasePair(object): #: Administration Substance Registration System Standard Operating Procedure guide. ACID_BASE_PAIRS = ( AcidBasePair('-OSO3H', 'OS(=O)(=O)[OH]', 'OS(=O)(=O)[O-]'), - AcidBasePair('–SO3H', '[!O]S(=O)(=O)[OH]', '[!O]S(=O)(=O)[O-]'), + AcidBasePair('--SO3H', '[!O]...
1
# -*- coding: utf-8 -*- """ molvs.charge ~~~~~~~~~~~~ This module implements tools for manipulating charges on molecules. In particular, :class:`~molvs.charge.Reionizer`, which competitively reionizes acids such that the strongest acids ionize first, and :class:`~molvs.charge.Uncharger`, which attempts to neutralize i...
1
18,817
To be consistent, I think it should actually just be a single `-`
rdkit-rdkit
cpp
@@ -6,6 +6,7 @@ import yaml from datetime import datetime from listenbrainz.utils import escape, convert_to_unix_timestamp +from flask import current_app def flatten_dict(d, seperator='', parent_key=''): """
1
# coding=utf-8 import calendar import time import ujson import yaml from datetime import datetime from listenbrainz.utils import escape, convert_to_unix_timestamp def flatten_dict(d, seperator='', parent_key=''): """ Flattens a nested dictionary structure into a single dict. Args: d: the dict to ...
1
15,135
this seems extraneous.
metabrainz-listenbrainz-server
py
@@ -795,7 +795,7 @@ func (s *Suite) Define() { By("Sanity-check the issued Certificate") err = f.Helper().ValidateCertificate(f.Namespace.Name, "testcert", validations...) Expect(err).NotTo(HaveOccurred()) - }, featureset.OnlySAN) + }, featureset.OnlySAN, featureset.LongDomainFeatureSet) s.it(f, "sho...
1
/* Copyright 2020 The cert-manager Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
1
28,566
Ah, I see here that 'LongDomain' is defined as something that contains a subdomain segment that is `maxLengthOfDomainSegment` long (which I think is 63 characters) - I don't think any public ACME servers/Let's Encrypt's staging environment has a restriction on this? if it does, and the 'pebble' based ACME server does...
jetstack-cert-manager
go
@@ -112,12 +112,13 @@ module Travis 'cdbs qpdf texinfo libssh2-1-dev devscripts '\ "#{optional_apt_pkgs}", retry: true - r_filename = "R-#{r_version}-$(lsb_release -cs).xz" - r_url = "https://travis-ci.rstudio.org/#{r_filename}" + r_fi...
1
# Maintained by: # Jim Hester @jimhester james.hester@rstudio.com # Jeroen Ooms @jeroen jeroen@berkeley.edu # module Travis module Build class Script class R < Script DEFAULTS = { # Basic config options cran: 'https://cloud.r-project.org', repos: {...
1
17,526
I think you need `-y` here to prevent a user confirmation prompt
travis-ci-travis-build
rb
@@ -100,6 +100,7 @@ bool dynamo_heap_initialized = false; bool dynamo_started = false; bool automatic_startup = false; bool control_all_threads = false; +bool dynamo_avx512_code_in_use = false; #ifdef WINDOWS bool dr_early_injected = false; int dr_early_injected_location = INJECT_LOCATION_Invalid;
1
/* ********************************************************** * Copyright (c) 2010-2019 Google, Inc. All rights reserved. * Copyright (c) 2000-2010 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or witho...
1
17,614
Repeating: I don't think this should be a core-wide global var. This should be isolated to arch/x86 or at least arch/, maybe inside getter/setters as mentioned above.
DynamoRIO-dynamorio
c
@@ -55,8 +55,11 @@ class JMeterExecutor(ScenarioExecutor, WidgetProvider, FileLister): """ MIRRORS_SOURCE = "https://archive.apache.org/dist/jmeter/binaries/" JMETER_DOWNLOAD_LINK = "https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-{version}.zip" + PLUGINS_MANAGER = 'https://repo1.maven.o...
1
""" Module holds all stuff regarding JMeter tool usage Copyright 2015 BlazeMeter 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...
1
13,778
right URL is like in cmdrunner, using search.maven .org
Blazemeter-taurus
py
@@ -32,9 +32,9 @@ namespace OpenTelemetry.Exporter #if NETSTANDARD2_1 /// <summary> /// Gets or sets the target to which the exporter is going to send traces or metrics. - /// The valid syntax is described at https://github.com/grpc/grpc/blob/master/doc/naming.md. + /// The valid syntax...
1
// <copyright file="OtlpExporterOptions.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.ap...
1
19,140
The link to valid syntax is not really applicable for NET2_1, right?
open-telemetry-opentelemetry-dotnet
.cs
@@ -16,6 +16,13 @@ // PubSub. Use OpenTopic to construct a *pubsub.Topic, and/or OpenSubscription // to construct a *pubsub.Subscription. // +// Escaping +// +// Go CDK supports all UTF-8 strings; some strings are escaped (during writes) +// and unescaped (during reads) to ensure compatibility with the provider: +//...
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
14,277
Shouldn't it be more specific, like "gcppubsub supports all UTF-8 strings"?
google-go-cloud
go
@@ -59,14 +59,14 @@ public class CdcrReplicationHandlerTest extends BaseCdcrDistributedZkTest { } /** - * Test the scenario where the slave is killed from the start. The replication + * Test the scenario where the secondary is killed from the start. The replication * strategy should fetch all the missin...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
36,012
Everything in this class is SolrCloud-related, not legacy replication
apache-lucene-solr
java
@@ -1122,15 +1122,8 @@ drbbdup_prepare_redirect(dr_mcontext_t *mcontext, drbbdup_manager_t *manager, { /* Restore flags and scratch reg to their original app values. */ if (!manager->are_flags_dead) { - reg_t val; - uint sahf; - reg_t newval = mcontext->xflags; - val = (reg_t)drbb...
1
/* ********************************************************** * Copyright (c) 2013-2020 Google, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following...
1
20,292
Could just assign directly and eliminate the `newval` var.
DynamoRIO-dynamorio
c
@@ -27,11 +27,13 @@ import ( const ( inProgressLabel = "in progress" issueTitleComment = "Please edit the title of this issue with the name of the affected package, followed by a colon, followed by a short summary of the issue. Example: `blob/gcsblob: not blobby enough`." + pullRequestTitleComm...
1
// Copyright 2018 The Go Cloud Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
1
11,110
... with the name of the affected package, or "all", followed by a colon,...
google-go-cloud
go
@@ -48,6 +48,10 @@ namespace PrepareRelease "src/Datadog.Trace.ClrProfiler.Managed/Datadog.Trace.ClrProfiler.Managed.csproj", NugetVersionReplace); + SynchronizeVersion( + "src/Datadog.Trace.ClrProfiler.Managed.Core/Datadog.Trace.ClrProfiler.Managed.Core.csp...
1
using System; using System.IO; using System.Text; using System.Text.RegularExpressions; using Datadog.Core.Tools; namespace PrepareRelease { public static class SetAllVersions { public static void Run() { Console.WriteLine($"Updating version instances to {VersionString()}"); ...
1
16,668
We'll want to remove this one if we make the assembly version constant.
DataDog-dd-trace-dotnet
.cs
@@ -51,6 +51,7 @@ class Frontend extends Generator { $this->setup_blog_colors(); $this->setup_form_fields_style(); $this->setup_single_post_style(); + $this->setup_single_page_style(); } /**
1
<?php /** * Style generator based on settings. * * @package Neve\Core\Styles */ namespace Neve\Core\Styles; use Neve\Core\Settings\Config; use Neve\Core\Settings\Mods; use Neve\Customizer\Defaults\Layout; use Neve\Customizer\Defaults\Single_Post; /** * Class Generator for Frontend. * * @package Neve\Core\Styl...
1
22,226
Can we have a single function here that uses the same subscribers and just changes meta based on context?
Codeinwp-neve
php
@@ -513,8 +513,9 @@ hsa_executable_t load_executable(const string& file, hsa_executable_t executable return executable; } -// To force HIP to load the kernels and to setup the function -// symbol map on program startup +// HIP startup kernel loader logic +// When enabled HIP_STARTUP_LOADER, HIP will load the ke...
1
#include "../include/hip/hcc_detail/program_state.hpp" #include "../include/hip/hcc_detail/code_object_bundle.hpp" #include "hip_hcc_internal.h" #include "hsa_helpers.hpp" #include "trace_helper.h" #include "elfio/elfio.hpp" #include <link.h> #include <hsa/hsa.h> #include <hsa/hsa_ext_amd.h> #include <cassert> #i...
1
7,046
where would ` static startup_kernel_loader skl;` be instantiated? if it's not instantiated anywhere should this be removed?
ROCm-Developer-Tools-HIP
cpp
@@ -0,0 +1,14 @@ +const webkitGetAsEntryApi = require('./utils/webkitGetAsEntryApi') +const getFilesAndDirectoriesApi = require('./utils/getFilesAndDirectoriesApi') +const fallbackApi = require('./utils/fallbackApi') + +module.exports = function getDroppedFiles (dataTransfer, callback) { + if (dataTransfer.items[0] &&...
1
1
11,592
I think we should move those util functions that work with drag-drop to @uppy/utils, so they can be shared (maybe later) with drag-drop plugin? Otherwise it will continue to depend on drag-drop module.
transloadit-uppy
js
@@ -732,12 +732,6 @@ func (m *Volume) Contains(mid string) bool { // Copy makes a deep copy of VolumeSpec func (s *VolumeSpec) Copy() *VolumeSpec { spec := *s - if s.VolumeLabels != nil { - spec.VolumeLabels = make(map[string]string) - for k, v := range s.VolumeLabels { - spec.VolumeLabels[k] = v - } - } if ...
1
package api import ( "fmt" "math" "strconv" "strings" "time" "github.com/golang/protobuf/ptypes" "github.com/mohae/deepcopy" ) // Strings for VolumeSpec const ( Name = "name" Token = "token" SpecNodes = "nodes" SpecParent = "parent" Spe...
1
7,768
Migrate the spec.Labels to locator.Labels ?
libopenstorage-openstorage
go
@@ -250,7 +250,7 @@ func TestS3_EmptyBucket(t *testing.T) { gotErr := service.EmptyBucket(tc.inBucket) - if gotErr != nil { + if tc.wantErr != nil { require.EqualError(t, gotErr, tc.wantErr.Error()) } })
1
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package s3 import ( "bytes" "errors" "fmt" "strconv" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/s3/s3manager" "github.c...
1
14,684
The test case already existed but it never tested properly because of the conditional in the test.
aws-copilot-cli
go
@@ -68,11 +68,9 @@ public class PartitionField implements Serializable { } PartitionField that = (PartitionField) other; - return ( - sourceId == that.sourceId && + return sourceId == that.sourceId && name.equals(that.name) && - transform.equals(that.transform) - ); + ...
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
13,100
I'm okay with this, but I don't see a lot of benefit to removing unnecessary parens. If extra parens make something more readable (like this) or clarify order of operations even when matching the default, I would say we should keep them.
apache-iceberg
java
@@ -138,7 +138,7 @@ public class IndexSchema { protected List<SchemaField> fieldsWithDefaultValue = new ArrayList<>(); protected Collection<SchemaField> requiredFields = new HashSet<>(); - protected volatile DynamicField[] dynamicFields; + protected DynamicField[] dynamicFields = new DynamicField[] {}; pub...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
30,560
@sarowe why was this volatile? It's fishy to see this as the only volatile field.
apache-lucene-solr
java
@@ -0,0 +1,13 @@ +package org.apache.servicecomb.serviceregistry.task.event; + +/** + * 一句话功能简述 + * 功能详细描述 + * @author m00416667 + * @version [版本号, ] + * @see [相关类/方法] + * @since [产品/模块版本] + * Package Name:org.apache.servicecomb.serviceregistry.task.event + */ +public class InstanceRegistryFailedEvent { +}
1
1
9,502
template is not correct?
apache-servicecomb-java-chassis
java
@@ -0,0 +1,4 @@ +from mmdet.utils import Registry + +ASSIGNERS = Registry('assigner') +SAMPLERS = Registry('sampler')
1
1
19,052
Rename the registies to `BBOX_ASSIGNERS` and `BBOX_SAMPLERS` to avoid ambiguity. There is also a registry for dataset sampler.
open-mmlab-mmdetection
py
@@ -89,9 +89,7 @@ module Beaker describe "provisioning and cleanup" do before :each do - vagrant.should_receive( :make_vfile ).with( @hosts ).once - - vagrant.should_receive( :vagrant_cmd ).with( "destroy --force" ).once + FakeFS.activate! vagrant.should_receive( :vagrant_cmd...
1
require 'spec_helper' module Beaker describe Vagrant do let( :vagrant ) { Beaker::Vagrant.new( @hosts, make_opts ) } before :each do @hosts = make_hosts() end it "can make a Vagranfile for a set of hosts" do FakeFS.activate! path = vagrant.instance_variable_get( :@vagrant_path ) ...
1
4,868
This is no longer stubbed on every test. Perhaps it should be, and should be unstubbed in the single case that it matters.
voxpupuli-beaker
rb
@@ -188,6 +188,11 @@ module BoltServer [200, GC.stat.to_json] end + get '/admin/status' do + stats = Puma.stats + [200, stats.is_a?(Hash) ? stats.to_json : stats] + end + get '/500_error' do raise 'Unexpected error' end
1
# frozen_string_literal: true require 'sinatra' require 'addressable/uri' require 'bolt' require 'bolt/error' require 'bolt/target' require 'bolt_server/file_cache' require 'bolt/task/puppet_server' require 'json' require 'json-schema' module BoltServer class TransportApp < Sinatra::Base # This disables Sinatra...
1
13,559
This seems much simpler! I'm not sure I follow what you mean by the threading part... Also tests are not liking this constant. Might need a require or to fully qualify this.
puppetlabs-bolt
rb
@@ -5902,6 +5902,7 @@ os_forge_exception(app_pc target_pc, dr_exception_type_t type) switch (type) { case ILLEGAL_INSTRUCTION_EXCEPTION: sig = SIGILL; break; case UNREADABLE_MEMORY_EXECUTION_EXCEPTION: sig = SIGSEGV; break; + case SINGLE_STEP_EXCEPTION: ASSERT_NOT_IMPLEMENTED(false); /* cf i#2144 */ ...
1
/* ********************************************************** * Copyright (c) 2011-2017 Google, Inc. All rights reserved. * Copyright (c) 2000-2010 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or witho...
1
11,037
Convention is "FIXME: i#2144" or "XXX: i#2144"
DynamoRIO-dynamorio
c
@@ -0,0 +1,7 @@ +namespace Datadog.Trace.ClrProfiler.Interfaces +{ + internal interface IHasHttpMethod + { + string GetHttpMethod(); + } +}
1
1
14,659
This should probably be a property instead of a method.
DataDog-dd-trace-dotnet
.cs
@@ -159,10 +159,12 @@ spec: status: phase: Init versionDetails: - current: {{ .CAST.version }} + status: + current: {{ .CAST.version }} + dependentsUpgraded: true + state: RECONCILED desired: {{ .CAST.version }} autoUpgrade: false - dependentsUpgraded: ...
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
17,478
do we need to consider setting the `state` as well? If so, lot of changes might be required, like, setting to 'Reconciling' in upgrade code, setting to 'error' or 'reconciled' in volumeReconciler functions.
openebs-maya
go
@@ -3,7 +3,11 @@ module Blacklight::Solr extend ActiveSupport::Concern included do - self.default_processor_chain = [:default_solr_parameters, :add_query_to_solr, :add_facet_fq_to_solr, :add_facetting_to_solr, :add_solr_fields_to_query, :add_paging_to_solr, :add_sorting_to_solr, :add_group_config_to_so...
1
module Blacklight::Solr module SearchBuilderBehavior extend ActiveSupport::Concern included do self.default_processor_chain = [:default_solr_parameters, :add_query_to_solr, :add_facet_fq_to_solr, :add_facetting_to_solr, :add_solr_fields_to_query, :add_paging_to_solr, :add_sorting_to_solr, :add_group_co...
1
5,986
Line is too long. [82/80]
projectblacklight-blacklight
rb
@@ -1,4 +1,5 @@ -// 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. namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.Parallel { us...
1
// Copyright (c) Microsoft. All rights reserved. namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.Parallel { using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.VisualStudio.TestPlatform.O...
1
11,390
Add blank line below license header.
microsoft-vstest
.cs
@@ -110,9 +110,17 @@ public abstract class BaseMetastoreCatalog implements Catalog { throw new NoSuchTableException("No such table: " + identifier); } - String baseLocation = location != null ? location : defaultWarehouseLocation(identifier); Map<String, String> tableProperties = properties != nul...
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
21,135
I'm not clear on whether this really should be the right behavior. Basically we're saying that a replace table will keep the existing location (as opposed to using defaults). I suspect we don't have create or replace with location semantics, but this is making some assumptions that a replacement is somehow the same as ...
apache-iceberg
java
@@ -37,8 +37,10 @@ import ( executionpb "go.temporal.io/temporal-proto/execution" tasklistpb "go.temporal.io/temporal-proto/tasklist" + executionproto "github.com/temporalio/temporal/.gen/proto/execution" "github.com/temporalio/temporal/.gen/proto/persistenceblobs" replicationgenpb "github.com/temporalio/temp...
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
9,565
Just run a global replacement for all `executionproto`.
temporalio-temporal
go
@@ -111,7 +111,7 @@ class WebDriver(object): def __init__(self, command_executor='http://127.0.0.1:4444/wd/hub', desired_capabilities=None, browser_profile=None, proxy=None, - keep_alive=False, file_detector=None): + keep_alive=False, file_detector=None, options=...
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,946
@AutomatedTester @davehunt thoughts on a new keyword argument?
SeleniumHQ-selenium
java
@@ -49,6 +49,9 @@ fpga_result opae_ioctl(int fd, int request, ...) case EINVAL: res = FPGA_INVALID_PARAM; break; + case ENOTSUP: + res = FPGA_NOT_SUPPORTED; + break; default: // other errors could be // EBADF - fd is bad file descriptor
1
// Copyright(c) 2017-2018, Intel Corporation // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and...
1
17,693
Should line 47 be OPAE_ERR?
OPAE-opae-sdk
c
@@ -104,6 +104,8 @@ import ( "gocloud.dev/pubsub/driver" ) +var zeroTime time.Time + // Message contains data to be published. type Message struct { // Body contains the content of the message.
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,056
Not necessary, just write `time.Time{}`
google-go-cloud
go
@@ -499,6 +499,11 @@ def data(readonly=False): SettingValue(typ.Bool(), 'true'), "Whether to show favicons in the tab bar."), + ('tabbar-size', + SettingValue(typ.Int(minval=8), '12'), + "The height of the tabbar in pixels." + "This also contr...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
1
13,185
As these two strings simply get concatenated for the docs, there's a space missing after the dot here.
qutebrowser-qutebrowser
py
@@ -29,6 +29,7 @@ namespace Datadog.Trace.ClrProfiler.CallTarget { if (IntegrationOptions<TIntegration, TTarget>.IsIntegrationEnabled) { + IntegrationOptions<TIntegration, TTarget>.RecordTelemetry(); return BeginMethodHandler<TIntegration, TTarget>.Invo...
1
// <copyright file="CallTargetInvoker.cs" company="Datadog"> // Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // </copyright> using System; using ...
1
25,682
What about integrations where we don't plug ourselved on OnMethodBegin?
DataDog-dd-trace-dotnet
.cs
@@ -102,7 +102,7 @@ class presence_of_all_elements_located(object): def __call__(self, driver): return _find_elements(driver, self.locator) -class visibility_of_all_elements_located(object): +class visibility_of_any_elements_located(object): """ An expectation for checking that there is at ...
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
13,212
shouldn't **call** return a boolean?
SeleniumHQ-selenium
java
@@ -18,12 +18,15 @@ import com.google.api.codegen.SnippetSetRunner; import com.google.api.codegen.viewmodel.FileHeaderView; import com.google.api.codegen.viewmodel.ViewModel; import com.google.api.codegen.viewmodel.testing.MockServiceImplView.Builder; +import com.google.api.tools.framework.model.Interface; import c...
1
/* Copyright 2016 Google Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
1
19,961
ViewModel classes should not expose any classes from framework.model.
googleapis-gapic-generator
java
@@ -135,9 +135,6 @@ def test_single_required_string_field_config_type(): assert _validate(_single_required_string_config_dict(), {'string_field': 'value'}) == { 'string_field': 'value' } - assert _validate(_single_required_string_config_dict(), {'string_field': None}) == { - 'string_field':...
1
from collections import namedtuple import pytest from dagster import ( ConfigField, DagsterEvaluateConfigValueError, DagsterInvalidDefinitionError, ExecutionContext, Field, PipelineConfigEvaluationError, PipelineContextDefinition, PipelineDefinition, SolidDefinition, execute_pi...
1
11,827
how would you feel about keeping these tests to be more explicit and having them `assert not _validate...`? or is your view that that is too duplicative of the tests in `test_evaluator.py`?
dagster-io-dagster
py
@@ -21,10 +21,11 @@ test_name "bolt plan run should apply manifest block on remote hosts via winrm" scp_to(bolt, File.join(fixtures, 'example_apply'), "#{dir}/modules/example_apply") end - bolt_command = "bolt plan run example_apply filepath=#{filepath} nodes=winrm_nodes" + bolt_command = "bolt plan run exa...
1
# frozen_string_literal: true require 'bolt_command_helper' require 'json' test_name "bolt plan run should apply manifest block on remote hosts via winrm" do extend Acceptance::BoltCommandHelper winrm_nodes = select_hosts(roles: ['winrm']) skip_test('no applicable nodes to test on') if winrm_nodes.empty? co...
1
13,783
Why do we use the `winrm_nodes` variable here and not the string `"winrm_nodes"` as we were using before?
puppetlabs-bolt
rb
@@ -1,4 +1,4 @@ -/* Copyright (c) 2018 vesoft inc. All rights reserved. +/* Copyright (c) 2019 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.
1
/* Copyright (c) 2018 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "base/Base.h" #include <gtest/gtest.h> #include "base/Cord.h" namespace nebula { TEST(Cord, write) { Cord...
1
22,325
why update Copyright ?
vesoft-inc-nebula
cpp