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
@@ -272,8 +272,7 @@ func newAdminMembershipCommands() []cli.Command { { Name: "list_db", Usage: "List cluster membership items", - Flags: append( - getDBFlags(), + Flags: []cli.Flag{ cli.StringFlag{ Name: FlagHeartbeatedWithin, Value: "15m",
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
13,231
should combine these 2 list (list_gossip and list_db) into just one list command, and show the discrepancy between the 2 if any.
temporalio-temporal
go
@@ -21,6 +21,11 @@ class ProposalPolicy !@proposal.approved? end + def approve_reject? + actionable_approvers = @proposal.currently_awaiting_approvers + actionable_approvers.include? @user + end + def edit? self.test_all(:edit?) end
1
class ProposalPolicy include TreePolicy def perm_trees { edit?: [:author?, :not_approved?], update?: [:edit?] } end def initialize(user, proposal) @user = user @proposal = proposal end def author? @proposal.requester_id == @user.id end def not_approved? !@proposal...
1
12,795
What do you think about prefixing the Policy method names with `can_`?
18F-C2
rb
@@ -29,11 +29,10 @@ #include <sys/types.h> #include <sys/stat.h> -/* HTTP Credentials Endpoints have a standard set of JSON Keys */ -#define AWS_HTTP_RESPONSE_ACCESS_KEY "AccessKeyId" -#define AWS_HTTP_RESPONSE_SECRET_KEY "SecretAccessKey" -#define AWS_HTTP_RESPONSE_TOKEN "Token" -#define AWS_HTTP_RESPON...
1
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Fluent Bit * ========== * Copyright (C) 2019-2021 The Fluent Bit 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...
1
14,915
Based on the docs, credential process can return a key `SessionToken`
fluent-fluent-bit
c
@@ -9,8 +9,12 @@ export default Ember.Mixin.create({ if (birthDate) { if (birthDate.getFullYear === undefined) { - birthDate = moment(birthDate, 'l').toDate(); + birthDate = moment(birthDate, 'LLL').toDate(); } + + birthDate.setHours(0, 0, 0, 0); + today.setHours(0, 0, 0, 0)...
1
import Ember from 'ember'; import moment from 'moment'; export default Ember.Mixin.create({ convertDOBToText(birthDate, shortFormat, omitDays) { let today = new Date(); let years = 0; let months = 0; let days = 0; if (birthDate) { if (birthDate.getFullYear === undefined) { birthDate...
1
13,938
I think this if should be removed (see issue)
HospitalRun-hospitalrun-frontend
js
@@ -19,6 +19,7 @@ import ( log "github.com/sirupsen/logrus" + "github.com/projectcalico/felix/ipsets" "github.com/projectcalico/libcalico-go/lib/set" )
1
// Copyright (c) 2017-2021 Tigera, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
1
19,772
I would avoid importing `felix/ipsets` package because this package is the windows equivalent and should be at the same level of `felix/ipsets`. We could add linux specific dependencies into `felix/ipsets` later and it will break Windows build.
projectcalico-felix
c
@@ -19,6 +19,7 @@ # along with qutebrowser. If not, see <http://www.gnu.org/licenses/>. """Generate the html documentation based on the asciidoc files.""" +from typing import List, Tuple import re import os
1
#!/usr/bin/env python3 # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2020 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 pub...
1
24,308
nitpick: Please move this down to the other imports, as it's a Python stdlib import.
qutebrowser-qutebrowser
py
@@ -13,7 +13,8 @@ // limitations under the License. // Package blob provides an easy and portable way to interact with blobs -// within a storage location, hereafter called a "bucket". +// within a storage location, hereafter called a "bucket". See +// https://gocloud.dev/howto/blob/ for getting started guides. //...
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,878
"for getting started guides" reads a bit weird, like it's missing punctuation. Maybe just "for a tutorial"?
google-go-cloud
go
@@ -50,9 +50,9 @@ class Formats extends AbstractBase * Constructor * * @param bool $enabled is this tab enabled? - * @param bool $urc use recaptcha? + * @param bool $uc use captcha? */ - public function __construct($enabled = true, $urc = false) + public function __construc...
1
<?php /** * Digital Content Formats tab * * PHP version 7 * * Copyright (C) Villanova University 2010. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * as published by the Free Software Foundation. * * This program is...
1
28,997
This looks like a dead parameter -- maybe a copy and paste error. If it's truly unused, maybe you can open a separate PR to simply delete it, and then it's one less detail to worry about here.
vufind-org-vufind
php
@@ -42,7 +42,11 @@ func (m *VerticaRowReader) GetNextRow() ([]values.Value, error) { row := make([]values.Value, len(m.columns)) for i, col := range m.columns { switch col := col.(type) { - case bool, int, uint, int64, uint64, float64, string: + case int: + row[i] = values.NewInt(int64(col)) + case uint: + ...
1
package sql import ( "database/sql" "fmt" "time" "github.com/influxdata/flux" "github.com/influxdata/flux/codes" "github.com/influxdata/flux/execute" "github.com/influxdata/flux/internal/errors" "github.com/influxdata/flux/values" ) type VerticaRowReader struct { Cursor *sql.Rows columns []interfa...
1
17,509
Nit: Should we add support for `int` and `uint` in the `values.New()` function? That would allow us to to handle all of these types in one case. Maybe there's a good reason why we don't do that already, but I'm not sure what it is.
influxdata-flux
go
@@ -14,7 +14,7 @@ import net.sourceforge.pmd.RuleViolation; /** * A {@link RuleViolation} implementation that is immutable, and therefore cache friendly */ -public final class CachedRuleViolation implements RuleViolation { +public class CachedRuleViolation implements RuleViolation { private final CachedRule...
1
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ package net.sourceforge.pmd.cache; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import net.sourceforge.pmd.Rule; import net.sourceforge.pmd.RuleViolation; /** * A {@link RuleViola...
1
13,447
if you are not dealing with cache now, please revert these changes. On their own they make little sense
pmd-pmd
java
@@ -56,7 +56,7 @@ public abstract class NodeGenerator extends Generator { throw new AssertionError(f("Wanted to regenerate a method with signature %s in %s, but it wasn't there.", callable.getSignature(), containingClassOrInterface.getNameAsString())); }); } - + priva...
1
package com.github.javaparser.generator; import com.github.javaparser.ast.CompilationUnit; import com.github.javaparser.ast.body.CallableDeclaration; import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration; import com.github.javaparser.metamodel.BaseNodeMetaModel; import com.github.javaparser.metamodel.JavaP...
1
11,044
Wearing my extra-douche-bag hat I would say not spaces on a blank line. Maybe at some point we could have some automated process remove these things. For now I would not bother changing it.
javaparser-javaparser
java
@@ -0,0 +1,7 @@ +package de.danoeh.antennapod.core.event; + +public class ShowRemainTimeUpdateEvent { + public ShowRemainTimeUpdateEvent() { + + } +}
1
1
18,377
I think it would be better to use an `ItemUpdatedEvent` like for the "prefer streaming" preference. We already have a ton of events that need to be handled in all list fragments that just do the same everywhere. I think we could even remove some of the existing events in the future.
AntennaPod-AntennaPod
java
@@ -0,0 +1,17 @@ +class AddSlugToProducts < ActiveRecord::Migration + def change + add_column :products, :slug, :string, null: true + + products = select_all("select id, name from products") + products.each do |product| + update(<<-SQL) + UPDATE products + SET slug='#{product["name"].para...
1
1
10,750
I think we have to manually write a down for this migration.
thoughtbot-upcase
rb
@@ -454,14 +454,13 @@ class _InternalFrame(object): assert isinstance(sdf, spark.DataFrame) if index_map is None: - # Here is when Koalas DataFrame is created directly from Spark DataFrame. - assert not any(SPARK_INDEX_NAME_PATTERN.match(name) for name in sdf.schema.names), \ +...
1
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
1
13,991
I don't think we still need this check, but I'd leave it as an assertion for now.
databricks-koalas
py
@@ -203,4 +203,9 @@ class Cart < ActiveRecord::Base 0.0 end end + + # may be replaced with paper-trail or similar at some point + def version + self.updated_at.to_i + end end
1
require 'csv' class Cart < ActiveRecord::Base include PropMixin include ProposalDelegate has_one :approval_group has_many :user_roles, through: :approval_group has_many :api_tokens, through: :approvals has_many :comments, as: :commentable has_many :properties, as: :hasproperties #TODO: validates_uniq...
1
12,772
Since this may be the case, wondering if we should call the param `updated_at_i` or something so that we don't run into a problem distinguishing them down the road?
18F-C2
rb
@@ -215,6 +215,10 @@ namespace ScenarioMeasurement } TraceEventSession.Merge(files.ToArray(), traceFileName); + if (guiApp) + { + appExe = Path.Join(workingDir, appExe); + } string commandLine = $"\"{app...
1
using Microsoft.Diagnostics.Tracing.Parsers; using Microsoft.Diagnostics.Tracing.Session; using Reporting; using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace ScenarioMeasurement { enum MetricType { TimeToMain, GenericStartup, ProcessTime, ...
1
10,471
wondering why we need to join the paths here; seems evt.commandLine only takes whatever appExe is
dotnet-performance
.cs
@@ -329,8 +329,14 @@ public class ConfigCenterClient { public void refreshConfig(String configcenter, boolean wait) { CountDownLatch latch = new CountDownLatch(1); + String encodeServiceName = ""; + try { + encodeServiceName = URLEncoder.encode(StringUtils.deleteWhitespace(serviceName), "...
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
9,613
1.not format code 2.failed but still continue? 3."UTF-8" can changed to java.nio.charset.StandardCharsets.UTF_8.name()
apache-servicecomb-java-chassis
java
@@ -74,6 +74,7 @@ from typing import Any, Callable, Iterator, List, Optional, Pattern, Tuple import astroid import astroid.exceptions from astroid import bases, nodes +from astroid.brain import brain_dataclasses from pylint.checkers import BaseChecker, utils from pylint.checkers.utils import (
1
# Copyright (c) 2006-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2009 James Lingard <jchl@aristanetworks.com> # Copyright (c) 2012-2014 Google, Inc. # Copyright (c) 2014-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 David Shea <dshea@redhat.com> # Copyright (c) 2014 Steven My...
1
19,197
I'm wondering if we should add this to a `utils` module in `astroid`. Porting the util to `pylint` doesn't make sense as we would need to duplicate the globals that are being used in the function, but importing from `brain` also feels weird. @Pierre-Sassoulas Do you have an opinion?
PyCQA-pylint
py
@@ -54,6 +54,12 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http InitializeHeaders(); + if (_corruptedRequest) + { + await ProduceEnd(); + return; + } + while (!_requ...
1
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting.Server; using Microsoft.AspNetCore.Server.Kestrel...
1
8,477
This seems different than what we do for corrupted request headers. I would like to determine the correct behavior and consolidate this logic.
aspnet-KestrelHttpServer
.cs
@@ -292,7 +292,7 @@ class _RunData(object): direct_access_sources = set() for backend in backend_service.backends: instance_group = self.find_instance_group_by_url( - backend.get('group')) + backend.get('resourceGroup')) if not instance_group: ...
1
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
1
33,681
Please make the change in the CAI inventory, rather than changing the scanner.
forseti-security-forseti-security
py
@@ -6,7 +6,7 @@ package net.sourceforge.pmd.lang.jsp.ast; import net.sourceforge.pmd.lang.ast.AbstractNode; -public class AbstractJspNode extends AbstractNode implements JspNode { +public abstract class AbstractJspNode extends AbstractNode implements JspNode { protected JspParser parser;
1
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ package net.sourceforge.pmd.lang.jsp.ast; import net.sourceforge.pmd.lang.ast.AbstractNode; public class AbstractJspNode extends AbstractNode implements JspNode { protected JspParser parser; public AbstractJspNode(int i...
1
13,524
adding this `abstract` is a breaking API change. Even though I agree it makes perfect sense to have it, we can't break this API until PMD 7.0.0. We should revert this particular change. We could make a reminder ticket like we did with #463 for 6.0.0
pmd-pmd
java
@@ -16,6 +16,7 @@ describe IndividualPlan do it_behaves_like 'a Plan with countable subscriptions' it_behaves_like 'a Plan for public listing' + it_behaves_like 'Purchaseable plan' describe '.active' do it 'only includes active plans' do
1
require 'spec_helper' describe IndividualPlan do it { should have_many(:announcements) } it { should have_many(:purchases) } it { should have_many(:subscriptions) } it { should validate_presence_of(:description) } it { should validate_presence_of(:individual_price) } it { should validate_presence_of(:name...
1
8,990
This is following the existing convention, but I'm not sure the convention is a good one. I think it would be better to have one shared example group: - It means we don't need to add new example groups twice every time. - If the shared example group looks large, that makes it more obvious that our team models have too ...
thoughtbot-upcase
rb
@@ -304,14 +304,15 @@ size_t network_prefix) bool nano::server_socket::limit_reached_for_incoming_subnetwork_connections (std::shared_ptr<nano::socket> const & new_connection) { debug_assert (strand.running_in_this_thread ()); - if (node.flags.disable_max_peers_per_subnetwork) + if (node.flags.disable_max_peers_per...
1
#include <nano/boost/asio/bind_executor.hpp> #include <nano/boost/asio/dispatch.hpp> #include <nano/boost/asio/ip/address.hpp> #include <nano/boost/asio/ip/address_v6.hpp> #include <nano/boost/asio/ip/network_v6.hpp> #include <nano/boost/asio/read.hpp> #include <nano/node/node.hpp> #include <nano/node/socket.hpp> #incl...
1
16,982
I do not think we need to do a source code change to handle this. We could set the subnetwork to default to /32 (/128 for ipv6 ipv4-mapped)
nanocurrency-nano-node
cpp
@@ -41,7 +41,7 @@ gboolean ot_remote_builtin_delete_cookie (int argc, char **argv, GCancellable *cancellable, GError **error) { g_autoptr(OstreeRepo) repo = NULL; - g_autoptr(GOptionContext) context = g_option_context_new ("NAME DOMAIN PATH COOKIE_NAME- Remote one cookie from remote"); + g_autoptr(GOptionContext...
1
/* * Copyright (C) 2015 Red Hat, Inc. * Copyright (C) 2016 Sjoerd Simons <sjoerd@luon.net> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (...
1
12,856
It looks good overall! The only issue I have is that the description string is now duplicated twice right? Once in the struct and once in the parameter string? Maybe let's pass the struct to the command so that `ostree_option_context_parse` can set it as the summary? Similar to what we do in rpm-ostree.
ostreedev-ostree
c
@@ -29,7 +29,7 @@ import org.openqa.selenium.remote.service.DriverService; * * @see <a href="https://chromium.googlesource.com/chromium/src/+/master/chrome/test/chromedriver/client/command_executor.py">List of ChromeWebdriver commands</a> */ -class ChromeDriverCommandExecutor extends DriverCommandExecutor { +publ...
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,391
This states very clearly that this is a derivative of Chrome and not Chromium. Do we need to extract an abstract `ChromiumCommandExecutor` and have both Edge and Chrome derive from that?
SeleniumHQ-selenium
js
@@ -84,7 +84,9 @@ public class CompareObjectsWithEqualsRule extends AbstractJavaRule { ASTReferenceType type1 = ((Node) nd1.getAccessNodeParent()) .getFirstDescendantOfType(ASTReferenceType.class); // skip, if it is an enum - if (type0.getType() ...
1
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ package net.sourceforge.pmd.lang.java.rule.errorprone; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.java.ast.ASTAllocationExpression; import net.sourceforge.pmd.lang.java.ast.ASTEqualityExpression; imp...
1
13,530
it seems to me, the issue lies on `isEnum()` itself, returning false for something that is an enum. I'd rather change it there than here.
pmd-pmd
java
@@ -49,6 +49,15 @@ class QuteSchemeHandler(schemehandler.SchemeHandler): """Scheme handler for qute: URLs.""" + handlers = dict() + + @classmethod + def addHandler(cls, name): + """Add a handler to the qute: sheme.""" + def namedecorator(function): + cls.handlers[name] = funct...
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,859
Please use `{}` instead of `dict()`
qutebrowser-qutebrowser
py
@@ -20,11 +20,12 @@ * External dependencies */ import PropTypes from 'prop-types'; +import { useInView } from 'react-intersection-observer'; /** * WordPress dependencies */ -import { useCallback } from '@wordpress/element'; +import { useCallback, useEffect } from '@wordpress/element'; import { __ } from '@...
1
/** * DashboardCTA component. * * Site Kit by Google, Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 *...
1
40,776
I have concerns about using this in more places before #3278 - I'll take a look at that again shortly.
google-site-kit-wp
js
@@ -37,7 +37,16 @@ func TestConvert(t *testing.T) { testLog := newTestLog() testLog.Topics = topics testLog.NotFixTopicCopyBug = true - receipt := &Receipt{1, 1, hash.ZeroHash256, 1, "test", []*Log{testLog}, nil, "balance not enough"} + receipt := &Receipt{ + Status: 1, + BlockHeight: 1, + A...
1
// Copyright (c) 2019 IoTeX Foundation // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use...
1
24,263
new field needs to be asserted
iotexproject-iotex-core
go
@@ -190,6 +190,7 @@ void Host::appendLogsInternal(folly::EventBase* eb, { std::lock_guard<std::mutex> g(self->lock_); self->setResponse(r); + self->lastLogIdSent_ = self->logIdToSend_; } self->noMoreRequestCV_.notify_all(); ...
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 "kvstore/raftex/Host.h" #include "kvstore/raftex/RaftPart.h" #include "kvstore/wal/FileB...
1
23,395
when send log failed, why update the last sent log id?
vesoft-inc-nebula
cpp
@@ -127,12 +127,12 @@ public final class Tuple0 implements Tuple, Comparable<Tuple0>, Serializable { } @Override - public <T> Tuple1<T> prepend(T value) { + public <T> Tuple1<T> append(T value) { return new Tuple1<>(value); } @Override - public <T> Tuple1<T> append(T value) { + ...
1
/* / \____ _ _ ____ ______ / \ ____ __ _______ * / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG * _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io * /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ...
1
10,101
what was the problem with the previous order? `prepend` comes conceptually before `append`, i.e. `insert before` should be before `insert after`, I think
vavr-io-vavr
java
@@ -291,6 +291,8 @@ type BackupInfo struct { // Timestamp is the timestamp at which the source volume // was backed up to cloud Timestamp time.Time + // Metadata associated with the backup + Metadata map[string]string // Status indicates if this backup was successful Status string }
1
package api import ( "fmt" "math" "strconv" "strings" "time" "github.com/mohae/deepcopy" ) // Strings for VolumeSpec const ( Name = "name" SpecNodes = "nodes" SpecParent = "parent" SpecEphemeral = "ephemeral" SpecShared = "shared" ...
1
6,613
Why is this necessary? Could you provide some context?
libopenstorage-openstorage
go
@@ -46,7 +46,9 @@ public class HTMLTestResults { private final HTMLSuiteResult suite; private static final String HEADER = "<html>\n" + - "<head><style type='text/css'>\n" + + "<head>\n"+ + "<meta charset=\"UTF-8\">\n"+ + "<style type='text/css'>\n" + "body, table {\n" + " f...
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,139
Is there a recommended quote style for attributes? I see single and double here, double further down.
SeleniumHQ-selenium
java
@@ -772,6 +772,17 @@ var _ = Describe("Session", func() { Expect(mconn.written[0][0] & 0x02).ToNot(BeZero()) // Public Reset Expect(sess.runClosed).To(BeClosed()) }) + + It("unblocks WaitUntilClosed when the run loop exists", func() { + returned := make(chan struct{}) + go func() { + sess.WaitUntilCl...
1
package quic import ( "bytes" "crypto/tls" "errors" "io" "net" "runtime/pprof" "strings" "time" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/lucas-clemente/quic-go/ackhandler" "github.com/lucas-clemente/quic-go/crypto" "github.com/lucas-clemente/quic-go/frames" "github.com/lucas-cl...
1
6,313
Please use an atomic bool.
lucas-clemente-quic-go
go
@@ -0,0 +1,19 @@ +namespace Datadog.Trace.ClrProfiler +{ + internal static class WebHelpers + { + public static void DecorateWebSpan( + this Span span, + string resourceName, + string method, + string host, + string httpUrl) + { + spa...
1
1
14,952
Consider naming this class `SpanExtensions` to follow C# conventions.
DataDog-dd-trace-dotnet
.cs
@@ -81,11 +81,6 @@ namespace Datadog.Trace.Logging { // Don't let this exception bubble up as this logger is for debugging and is non-critical } - finally - { - // Log some information to correspond with the app domain - Shar...
1
using System; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; using Datadog.Trace.Configuration; using Datadog.Trace.Vendors.Serilog; using Datadog.Trace.Vendors.Serilog.Core; using Datadog.Trace.Vendors.Serilog.Events; using Datadog.Trace.Vendors.Serilog.Sinks.File; namespace Datadog....
1
16,872
FYI @lucaspimentel and @colin-higgins since you have already approved, I wanted to point out this required change. By fixing `FrameworkDescription` to use the correct logger, it created a cycle between these two static constructors, so I'm removing this log line and delaying it to when it's actually constructed later i...
DataDog-dd-trace-dotnet
.cs
@@ -34,6 +34,8 @@ module Beaker Beaker::Fusion when /blimpy/ Beaker::Blimper + when /ec2/ + Beaker::AwsSdk when /vcloud/ if options['pooling_api'] Beaker::VcloudPooled
1
%w( host_prebuilt_steps ).each do |lib| begin require lib rescue LoadError require File.expand_path(File.join(File.dirname(__FILE__), lib)) end end module Beaker #The Beaker class that interacts to all the supported hypervisors class Hypervisor include HostPrebuiltSteps #Generates an array w...
1
5,441
Ah, so we are going to need to update node/host files for this to work?
voxpupuli-beaker
rb
@@ -35,7 +35,7 @@ public class Container { private final ContainerId id; public Container(Function<HttpRequest, HttpResponse> client, ContainerId id) { - LOG.info("Created container " + id); + LOG.finest("Created container " + id); this.client = Objects.requireNonNull(client); this.id = Objects....
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,458
This code is new and not tested well. While we may drop the log level before we ship 4.0, right now this is extremely helpful to users.
SeleniumHQ-selenium
rb
@@ -11,9 +11,15 @@ class ObservationsController < ApplicationController end def destroy - self.observation.destroy - flash[:success] = "Deleted Observation" - redirect_to proposal_path(self.observation.proposal_id) + proposal = observation.proposal + if current_user == observation.user + red...
1
class ObservationsController < ApplicationController before_action :authenticate_user! before_action :find_proposal before_action -> { authorize self.observation_for_auth } rescue_from Pundit::NotAuthorizedError, with: :auth_errors def create obs = @proposal.add_observer(observer_email, current_user, par...
1
15,354
used named path (`proposals_path`) instead?
18F-C2
rb
@@ -107,7 +107,10 @@ class Sierra extends AbstractBase implements TranslatorAwareInterface . "FROM sierra_view.bib_view " . "LEFT JOIN sierra_view.bib_record_item_record_link ON " . "(bib_view.id = bib_record_item_record_link.bib_record_id) " - . "WHERE bib_view.record_...
1
<?php /** * Sierra (III) ILS Driver for VuFind * * PHP version 5 * * Copyright (C) 2013 Julia Bauder * * 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 Lic...
1
25,223
Am I misreading something, or is there a mismatched parenthesis here? Please let me know whether or not this is cause for concern -- just wanted to be totally sure before merging, since I can't test this from here. Thanks!
vufind-org-vufind
php
@@ -256,6 +256,13 @@ func (o *Outbound) call(ctx context.Context, treq *transport.Request) (*transpor span.SetTag("http.status_code", response.StatusCode) + // Service name match validation, return yarpcerrors.CodeInternal error if not match + if match, resSvcName := checkServiceMatch(treq.Service, response.Heade...
1
// Copyright (c) 2018 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
16,797
Might we want a hook to allow emitting metrics or logs in the case of a permitted empty service header response (or similar UpdateSpanWithErr on empty service header in response if strict enforcement is desired by the caller)?
yarpc-yarpc-go
go
@@ -63,6 +63,7 @@ class AzureBlobClient(FileSystem): * `token_credential` - A token credential used to authenticate HTTPS requests. The token value should be updated before its expiration. """ self.options = {"account_name": account_name, "account_key": account_key, "sas_token": sas_token...
1
# -*- coding: utf-8 -*- # # Copyright (c) 2018 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
1
19,938
if using dict.get, this could just be `kwargs.get('protocol', 'https')`
spotify-luigi
py
@@ -443,6 +443,14 @@ public class SurfaceNamer extends NameFormatterDelegator { return getNotImplementedString("SurfaceNamer.getAsyncApiMethodExampleName"); } + public String getGrpcStreamingApiMethodName(Method method) { + return getApiMethodName(method); + } + + public String getGrpcStreamingApiMethod...
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
18,247
Add docs to the new methods here
googleapis-gapic-generator
java
@@ -28,9 +28,11 @@ namespace Nethermind.Trie.Pruning _memoryLimit = memoryLimit; } + public bool Enabled => true; + public bool ShouldPrune(in long currentMemory) { return currentMemory >= _memoryLimit; } } -} +}
1
// Copyright (c) 2020 Demerzel Solutions Limited // This file is part of the Nethermind library. // // The Nethermind library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of ...
1
24,779
what does it mean enabled?
NethermindEth-nethermind
.cs
@@ -128,7 +128,7 @@ public class SmartStore { public static synchronized void changeKey(SQLiteDatabase db, String oldKey, String newKey) { synchronized(db) { if (newKey != null && !newKey.trim().equals("")) { - db.execSQL("PRAGMA rekey = '" + newKey + "'"); + db.query("PRAG...
1
/* * Copyright (c) 2012-present, 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 noti...
1
17,746
Getting an error when calling with db.execSQL (in sqlcipher 4.3.0, pragma returns ok).
forcedotcom-SalesforceMobileSDK-Android
java
@@ -83,11 +83,11 @@ func retrieveFeeds(ctx *middleware.Context, ctxUserID, userID, offset int64, isP } func Dashboard(ctx *middleware.Context) { - ctx.Data["Title"] = ctx.Tr("dashboard") + ctxUser := getDashboardContextUser(ctx) + ctx.Data["Title"] = ctxUser.DisplayName() + " " + ctx.Tr("dashboard") ctx.Data["Pa...
1
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package user import ( "bytes" "fmt" "github.com/Unknwon/com" "github.com/Unknwon/paginater" "github.com/gogits/gogs/models" "github.com/gogits/gogs/m...
1
10,582
Maybe we could remove `" " + ctx.Tr("dashboard")` completely?
gogs-gogs
go
@@ -1,13 +1,13 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -# SPDX - License - Identifier: Apache - 2.0 +# SPDX-License-Identifier: Apache-2.0 + +# Purpose +# This code demonstrates how to copy an object from one Amazon Simple Storage Solution (Amazon S3) bucket to another, +# changing the ...
1
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX - License - Identifier: Apache - 2.0 # snippet-start:[s3.ruby.copy_object_encrypt_copy.rb] require 'aws-sdk-s3' # Copies an object from one Amazon S3 bucket to another, # changing the object's server-side encryption state during # the co...
1
20,518
Simple Storage **Service**
awsdocs-aws-doc-sdk-examples
rb
@@ -42,6 +42,15 @@ type jsonHandler struct { handler reflect.Value } +type jsonHandler2 struct { + handler reflect.Value +} + +func (h jsonHandler2) Handle(ctx context.Context, reqBody interface{}) (interface{}, error) { + results := h.handler.Call([]reflect.Value{reflect.ValueOf(ctx), reflect.ValueOf(reqBody)}) +...
1
// Copyright (c) 2018 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
17,951
Let's add some assertions here to ensure we don't panic. Length of results. Conditionally cast second result to error.
yarpc-yarpc-go
go
@@ -23,8 +23,10 @@ namespace Microsoft.AspNetCore.Server.Kestrel // Matches the default LimitRequestFields in Apache httpd. private int _maxRequestHeaderCount = 100; - // Matches the default http.sys connection timeout. - private TimeSpan _connectionTimeout = TimeSpan.FromMinutes(2); +...
1
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; namespace Microsoft.AspNetCore.Server.Kestrel { public class KestrelServerLimits { // Matches the non-configurable defau...
1
10,123
Where did we take this default from?
aspnet-KestrelHttpServer
.cs
@@ -122,6 +122,8 @@ const baseSelectors = { * @param {Object} options Options for generating the report. * @param {string} options.startDate Required, unless dateRange is provided. Start date to query report data for as YYYY-mm-dd. * @param {string} options...
1
/** * `modules/analytics` data store: report. * * 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/license...
1
34,948
Let's move these down to be after all required arguments rather than in between.
google-site-kit-wp
js
@@ -90,6 +90,10 @@ namespace FlatBuffers _objectStart = 0; _numVtables = 0; _vectorNumElems = 0; + if (_sharedStringMap != null) + { + _sharedStringMap.Clear(); + } } /// <summary>
1
/* * Copyright 2014 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
1
19,532
Should we just null the Map and let the GC handle the memory? Clearing just removes items, but not capacity, so this would leave some memory on the table.
google-flatbuffers
java
@@ -107,7 +107,8 @@ func (i *Inbound) start() error { return errRouterNotSet } - handler := newHandler(i) + handler := newHandler(i, i.t.options.logger) + // handler := &handler{i: i, logger: i.t.options.logger} server := grpc.NewServer( grpc.CustomCodec(customCodec{}),
1
// Copyright (c) 2018 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
16,542
did you mean to delete this line?
yarpc-yarpc-go
go
@@ -420,6 +420,10 @@ public class DatasetField implements Serializable { } else if (template != null) { return template.getDataverse(); } else { + + System.out.print("getDataverseException: " + this.datasetFieldType.getDisplayName()); + System.out.print("getDataverse...
1
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package edu.harvard.iq.dataverse; /** * * @author skraffmiller */ import java.io.Serializable; import java.util.ArrayList; import j...
1
37,876
Should we use logger instead?
IQSS-dataverse
java
@@ -5,7 +5,7 @@ describe AnalyticsHelper do it "is true when ENV['ANALYTICS'] is present" do ENV['ANALYTICS'] = 'anything' - expect(analytics?).to be_true + expect(analytics?).to be true ENV['ANALYTICS'] = nil end
1
require 'spec_helper' describe AnalyticsHelper do describe '#analytics?' do it "is true when ENV['ANALYTICS'] is present" do ENV['ANALYTICS'] = 'anything' expect(analytics?).to be_true ENV['ANALYTICS'] = nil end it "is false when ENV['ANALYTICS'] is not present" do ENV['ANALYTI...
1
10,551
I think it would be preferred to do `expect(helper).to be_analytics`
thoughtbot-upcase
rb
@@ -10089,7 +10089,7 @@ defaultdict(<class 'list'>, {'col..., 'col...})] if key is None: raise KeyError("none key") - if isinstance(key, (str, tuple, list)): + if isinstance(key, (str, tuple, list, pd.Index)): return self.loc[:, key] elif isinstance(key, slice...
1
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
1
15,936
Actually, I think it's okay to just change to `if isinstance(key, (str)) or is_list_like(key):` and `key = list(key) if is_list_like(key) else key` for simplicity for now.
databricks-koalas
py
@@ -183,7 +183,7 @@ func (s *resetorSuite) TestResetWorkflowExecution_NoReplication() { currRunID := uuid.New().String() we := commonpb.WorkflowExecution{ WorkflowId: wid, - RunId: forkRunID, + RunId: "", } request.ResetRequest = &workflowservice.ResetWorkflowExecutionRequest{ Namespace: ...
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,116
If there any other tests, I would make it optional there also.
temporalio-temporal
go
@@ -54,6 +54,7 @@ Workshops::Application.routes.draw do end match '/watch' => 'high_voltage/pages#show', as: :watch, id: 'watch' + match '/my-accounts' => 'high_voltage/pages#show', as: :watch, id: 'my-accounts' match '/directions' => "high_voltage/pages#show", as: :directions, id: "directions" match '...
1
Workshops::Application.routes.draw do mount RailsAdmin::Engine => '/new_admin', :as => 'rails_admin' root to: 'topics#index' match '/pages/tmux' => redirect("/products/4-humans-present-tmux") resource :session, controller: 'sessions' resources :sections, only: [:show] do resources :registrations, only:...
1
6,373
This can be removed too, right?
thoughtbot-upcase
rb
@@ -248,7 +248,7 @@ public class SettingsExporter { // Write outgoing server settings - ServerSettings outgoing = Transport.decodeTransportUri(account.getTransportUri()); + ServerSettings outgoing = Transport.decodeTransportUri(account.getTransportUri(0)); serializer.startTag(null, O...
1
package com.fsck.k9.preferences; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap...
1
11,905
If you're going to allow people to specify multiple SMTP servers, you should also properly export/import them.
k9mail-k-9
java
@@ -28,5 +28,14 @@ namespace Datadog.Trace.RuntimeMetrics public const string CpuUserTime = "runtime.dotnet.cpu.user"; public const string CpuSystemTime = "runtime.dotnet.cpu.system"; public const string CpuPercentage = "runtime.dotnet.cpu.percent"; + + public const string CurrentReque...
1
namespace Datadog.Trace.RuntimeMetrics { internal static class MetricsNames { public const string ExceptionsCount = "runtime.dotnet.exceptions.count"; public const string Gen0CollectionsCount = "runtime.dotnet.gc.count.gen0"; public const string Gen1CollectionsCount = "runtime.dotnet.gc...
1
18,528
nit: Can we prefix these variables with `AspNetCore`?
DataDog-dd-trace-dotnet
.cs
@@ -47,12 +47,18 @@ describe "transpiling YAML plans" do } PLAN - it 'transpiles a yaml plan' do + it 'transpiles a YAML plan from a path' do expect { run_cli(%W[plan convert #{plan_path}]) }.to output(output_plan).to_stdout end + it 'transpiles a YAML plan from a plan name' do + exp...
1
# frozen_string_literal: true require 'spec_helper' require 'bolt/pal/yaml_plan/transpiler' require 'bolt_spec/files' require 'bolt_spec/integration' describe "transpiling YAML plans" do include BoltSpec::Files include BoltSpec::Integration after(:each) { Puppet.settings.send(:clear_everything_for_tests) } l...
1
18,018
Can this also include a quick test for transpiling by name?
puppetlabs-bolt
rb
@@ -59,10 +59,11 @@ func (client *clientRest) NodeRegister(proposal dto_discovery.ServiceProposal) ( return } -func (client *clientRest) NodeSendStats(nodeKey string, sessionList []dto.SessionStatsDeprecated) (err error) { +func (client *clientRest) NodeSendStats(nodeKey string) (err error) { response, err := cl...
1
package server import ( "bytes" "encoding/json" "errors" "fmt" "io/ioutil" "net/http" log "github.com/cihub/seelog" "github.com/mysterium/node/identity" "github.com/mysterium/node/server/dto" dto_discovery "github.com/mysterium/node/service_discovery/dto" "net/url" ) var mysteriumApiUrl string const MYST...
1
9,975
This TODO can be removed
mysteriumnetwork-node
go
@@ -5,13 +5,13 @@ using UIKit; namespace MvvmCross.iOS.Support.Presenters { - public interface IMvxTabBarViewController - { - void ShowTabView(UIViewController viewController, bool wrapInNavigationController, string tabTitle, string tabIconName); + public interface IMvxTabBarViewController + { + void ...
1
using System; using System.Collections.Generic; using MvvmCross.Core.ViewModels; using UIKit; namespace MvvmCross.iOS.Support.Presenters { public interface IMvxTabBarViewController { void ShowTabView(UIViewController viewController, bool wrapInNavigationController, string tabTitle, string tabIconName); bool Sh...
1
12,280
can we make tabAccessibilityIdentifier = null as default?
MvvmCross-MvvmCross
.cs
@@ -80,8 +80,9 @@ func initProvider() func() { pusher.Start() return func() { - bsp.Shutdown() // shutdown the processor - handleErr(exp.Shutdown(context.Background()), "failed to stop exporter") + ctx := context.Background() + _ = bsp.Shutdown(ctx) // shutdown the processor + handleErr(exp.Shutdown(ctx), "f...
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
13,536
Should we print this error?
open-telemetry-opentelemetry-go
go
@@ -31,7 +31,7 @@ def multiclass_nms(multi_bboxes, tuple: (bboxes, labels, indices (optional)), tensors of shape (k, 5), (k), and (k). Labels are 0-based. """ - num_classes = multi_scores.size(1) - 1 + num_classes = int(multi_scores.size(1) - 1) # exclude background category i...
1
import torch from mmcv.ops.nms import batched_nms from mmdet.core.bbox.iou_calculators import bbox_overlaps def multiclass_nms(multi_bboxes, multi_scores, score_thr, nms_cfg, max_num=-1, score_factors=None, ...
1
23,349
For which reason do we need to convert this to int here?
open-mmlab-mmdetection
py
@@ -19,7 +19,7 @@ func setFreezer(dirPath string, state configs.FreezerState) error { // freeze the container (since without the freezer cgroup, that's a // no-op). if state == configs.Undefined || state == configs.Thawed { - err = nil + return nil } return errors.Wrap(err, "freezer not supported") ...
1
// +build linux package fs2 import ( stdErrors "errors" "os" "strings" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" "github.com/pkg/errors" "golang.org/x/sys/unix" ) func setFreezer(dirPath string, state configs.FreezerState) error { if...
1
21,490
FWIW, wondering if the error is interesting here (I actually arrived at this code initially to change `supportsFreezer()` to return a `bool`
opencontainers-runc
go
@@ -1,8 +1 @@ -<h1><%= plan.title %></h1> - -<% if plan.visibility == 'is_test' %> - <div class="roadmap-info-box"> - <i class="fa fa-exclamation-circle" aria-hidden="true"></i> - <span><%= _('This is a') %> <strong><%= _('test plan') %></strong>.</span> - </div> -<% end %> +<h1><%= plan.title %></h1>
1
<h1><%= plan.title %></h1> <% if plan.visibility == 'is_test' %> <div class="roadmap-info-box"> <i class="fa fa-exclamation-circle" aria-hidden="true"></i> <span><%= _('This is a') %> <strong><%= _('test plan') %></strong>.</span> </div> <% end %>
1
16,785
Does this still need to be a partial? is the intention down the line to move back towards a conditionally different title?
DMPRoadmap-roadmap
rb
@@ -107,13 +107,12 @@ func TestEnvAdd_Execute(t *testing.T) { prog: mockSpinner, }, expectedEnv: archer.Environment{ - Name: "env", - Project: "project", - //TODO update these to real values - AccountID: "1234", - Region: "1234", - Prod: true...
1
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli import ( "fmt" "testing" "github.com/aws/amazon-ecs-cli-v2/internal/pkg/archer" climocks "github.com/aws/amazon-ecs-cli-v2/internal/pkg/cli/mocks" "github.com/aws/amazon-ecs-cli-v2/mocks...
1
10,561
seems like `RegistryURL` is missing? Same for a few other places that create `archer.Environment` below.
aws-copilot-cli
go
@@ -14,7 +14,9 @@ import abc import logging +import datetime import parameter +import target import warnings import traceback import pyparsing as pp
1
# Copyright (c) 2012 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 or agreed to in writing, s...
1
9,726
Are these imports needed?
spotify-luigi
py
@@ -139,6 +139,13 @@ describe('text.formControlValue', function() { axe.utils .querySelectorAll(axe._tree[0], '#fixture input') .forEach(function(target) { + // Safari and IE11 do not support the color input type + // and thus treat them as text inputs. ignore fallback + // inputs + ...
1
describe('text.formControlValue', function() { var __methods, __unsupported; var formControlValue = axe.commons.text.formControlValue; var fixtureSetup = axe.testUtils.fixtureSetup; var fixture = document.querySelector('#fixture'); var isIE11 = axe.testUtils.isIE11; function queryFixture(code, query) { fixture...
1
14,470
I think you can remove the `(isIE11 ? it.skip : it)(` above, if you're going to skip the test this way.
dequelabs-axe-core
js
@@ -96,11 +96,12 @@ public class CopyOneFile implements Closeable { // Paranoia: make sure the primary node is not smoking crack, by somehow sending us an already corrupted file whose checksum (in its // footer) disagrees with reality: long actualChecksumIn = in.readLong(); - if (actua...
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
38,573
IMO we should instead fix the above call to do `long actualChecksumIn = Long.reverseBytes(in.readLong());` to get the actual checksum value? This way the below error message would also be correct?
apache-lucene-solr
java
@@ -512,6 +512,13 @@ func prune(opts PruneOptions, gopts GlobalOptions, repo restic.Repository, usedB DeleteFiles(gopts, repo, removePacksFirst, restic.PackFile) } + // delete obsolete index files (index files that have already been superseded) + obsoleteIndexes := (repo.Index()).(*repository.MasterIndex).Obsole...
1
package main import ( "math" "sort" "strconv" "strings" "github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/errors" "github.com/restic/restic/internal/repository" "github.com/restic/restic/internal/restic" "github.com/spf13/cobra" ) var errorIndexIncomplete = errors.Fatal("index is...
1
13,485
I think we also need something similar for `rebuild-index`?
restic-restic
go
@@ -20,12 +20,14 @@ import ( "github.com/spiffe/spire/pkg/common/telemetry" "github.com/spiffe/spire/pkg/common/util" "github.com/spiffe/spire/pkg/server" + bundleClient "github.com/spiffe/spire/pkg/server/bundle/client" ) const ( - defaultConfigPath = "conf/server/server.conf" - defaultSocketPath = "/tmp/spi...
1
package run import ( "context" "crypto/x509/pkix" "errors" "flag" "fmt" "io/ioutil" "net" "os" "path/filepath" "time" "github.com/hashicorp/hcl" "github.com/spiffe/spire/pkg/common/catalog" "github.com/spiffe/spire/pkg/common/cli" "github.com/spiffe/spire/pkg/common/idutil" "github.com/spiffe/spire/pkg...
1
11,420
I think convention is snake case for import naming?
spiffe-spire
go
@@ -303,7 +303,13 @@ public class TiDAGRequest implements Serializable { // double read case if (!hasPk) { // add handle column - indexScanBuilder.addColumns(handleColumn); + if (!tableInfo.isCommonHandle()) { + indexScanBuilder.addColumns(handleColumn); + ...
1
/* * Copyright 2017 PingCAP, 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 ...
1
13,102
i think haspk is false?
pingcap-tispark
java
@@ -113,6 +113,7 @@ var opts struct { FailingTestsOk bool `long:"failing_tests_ok" hidden:"true" description:"Exit with status 0 even if tests fail (nonzero only if catastrophe happens)"` NumRuns int `long:"num_runs" short:"n" description:"Number of times to run each test target."` Te...
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,178
you should add this to the cover command too (but let's have a more general convo about whether it's a flag or config option)
thought-machine-please
go
@@ -104,7 +104,7 @@ func (s *historyArchiverSuite) SetupTest() { s.Assertions = require.New(s.T()) s.container = &archiver.HistoryBootstrapContainer{ Logger: log.NewNoopLogger(), - MetricsClient: metrics.NewClient(scope, metrics.HistoryArchiverScope), + MetricsClient: metrics.NewClient(&metrics.ClientCo...
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
13,146
instead of passing in pointer to empty struct, we should make it optional and support passing nil and use default cfg if it is nil.
temporalio-temporal
go
@@ -101,7 +101,7 @@ class HashableJSON(json.JSONEncoder): elif isinstance(obj, np.ndarray): return obj.tolist() if pd and isinstance(obj, (pd.Series, pd.DataFrame)): - return repr(sorted(list(obj.to_dict().items()))) + return obj.to_csv().encode('utf-8') eli...
1
import os, sys, warnings, operator import time import types import numbers import inspect import itertools import string, fnmatch import unicodedata import datetime as dt from collections import defaultdict from functools import partial from contextlib import contextmanager from distutils.version import LooseVersion f...
1
19,028
A fair bit faster, although still not great, hence also adding a hashkey.
holoviz-holoviews
py
@@ -0,0 +1,17 @@ +<div class="started"> + <section class="trail"> + <header> + <h1><%= trail.name %></h1> + <span class="numerical-progress"> + <%= pluralize( + trail.steps_remaining_for(current_user), + "step" + ) %> remaining + </span> + </header> + + <section ...
1
1
11,815
If we're going to leave this in here, how about we at least pull it into partial?
thoughtbot-upcase
rb
@@ -75,7 +75,7 @@ func TestCtlInstall(t *testing.T) { testApiServer, cleanup := install_framework.NewTestInstallApiServer(t) defer cleanup() - ctx, cancel := context.WithTimeout(context.TODO(), time.Second*20) + ctx, cancel := context.WithTimeout(context.Background(), time.Second*40) defer cancel() ...
1
/* Copyright 2021 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
29,097
This `context` is used correctly, there is nothing left TO DO.
jetstack-cert-manager
go
@@ -230,12 +230,9 @@ function countDocuments(coll, query, options, callback) { delete options.limit; delete options.skip; - coll.aggregate(pipeline, options, (err, result) => { + coll.aggregate(pipeline, options).toArray((err, docs) => { if (err) return handleCallback(callback, err); - result.toArray(...
1
'use strict'; const applyWriteConcern = require('../utils').applyWriteConcern; const checkCollectionName = require('../utils').checkCollectionName; const Code = require('mongodb-core').BSON.Code; const createIndexDb = require('./db_ops').createIndex; const decorateCommand = require('../utils').decorateCommand; const d...
1
14,584
If `docs` is an empty array there will be an error
mongodb-node-mongodb-native
js
@@ -150,7 +150,8 @@ func (u *staticUpstream) From() string { func (u *staticUpstream) NewHost(host string) (*UpstreamHost, error) { if !strings.HasPrefix(host, "http") && - !strings.HasPrefix(host, "unix:") { + !strings.HasPrefix(host, "unix:") && + !strings.HasPrefix(host, "quic:") { host = "http://" + host...
1
package proxy import ( "bytes" "fmt" "io" "io/ioutil" "net" "net/http" "net/url" "path" "strconv" "strings" "sync" "sync/atomic" "time" "crypto/tls" "github.com/mholt/caddy/caddyfile" "github.com/mholt/caddy/caddyhttp/httpserver" ) var ( supportedPolicies = make(map[string]func(string) Policy) ) t...
1
11,210
Is it really necessary to have the user specify this, or can the reverse proxy infer QUIC from the upstream's Alt-Svc headers?
caddyserver-caddy
go
@@ -55,7 +55,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.Http2 get { var dataset = new TheoryData<H2SpecTestCase>(); - var toSkip = new[] { "http2/5.1/8" }; + var toSkip = new string[] { /*"http2/5.1/8"*/ }; ...
1
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. #if NETCOREAPP2_2 using System.IO; using System.Linq; using System.Net; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microso...
1
16,748
just remove the entire variable.
aspnet-KestrelHttpServer
.cs
@@ -202,7 +202,10 @@ Available options are: end define('--modulepath MODULES', "List of directories containing modules, separated by '#{File::PATH_SEPARATOR}'") do |modulepath| - @options[:modulepath] = modulepath.split(File::PATH_SEPARATOR) + # When specified from the CLI, mod...
1
# frozen_string_literal: true require 'optparse' module Bolt class BoltOptionParser < OptionParser def self.examples(cmd, desc) <<-EXAMP #{desc} a Windows host via WinRM, providing for the password bolt #{cmd} -n winrm://winhost -u Administrator -p #{desc} the local machine, a Linux host via SSH, and ho...
1
9,469
Maybe we should put that in the option description?
puppetlabs-bolt
rb
@@ -211,8 +211,8 @@ public class BesuNodeConfigurationBuilder { return this; } - public BesuNodeConfigurationBuilder keyFilePath(final String keyFilePath) { - this.keyFilePath = Optional.of(keyFilePath); + public BesuNodeConfigurationBuilder keyFilePath(final Optional<String> keyFilePath) { + this.key...
1
/* * Copyright ConsenSys AG. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing...
1
23,551
Why do we need to make this optional? Isn't the idea of the builder that if you don't need this value you just don't call the `keyFilePath ` method?
hyperledger-besu
java
@@ -125,7 +125,7 @@ public class Parquet { public WriteBuilder forTable(Table table) { schema(table.schema()); setAll(table.properties()); - metricsConfig(MetricsConfig.fromProperties(table.properties())); + metricsConfig(MetricsConfig.forTable(table)); return this; }
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
1
33,716
Shall we do the same for ORC and Avro?
apache-iceberg
java
@@ -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.ObjectModel.Navigation { #if NET46
1
// Copyright (c) Microsoft. All rights reserved. namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Navigation { #if NET46 using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.InteropServices; using ...
1
11,393
Should be a space between line
microsoft-vstest
.cs
@@ -6,7 +6,14 @@ public static byte[] GeneratePrivateKey() { - byte[] bytes = new byte[32]; + var bytes = new byte[32]; + SecureRandom.GetBytes(bytes); + return bytes; + } + + public static byte[] GenerateRandomBytes(int lenght) + { + ...
1
namespace Nevermind.Core.Crypto { public static class Random { private static readonly System.Security.Cryptography.RandomNumberGenerator SecureRandom = new System.Security.Cryptography.RNGCryptoServiceProvider(); public static byte[] GeneratePrivateKey() { byte[] bytes = n...
1
22,272
if not behind interface then equally we can use SecureRandom.GetBytes directly, otherwise let us push it behind ISecureRandom so we can test with this class wherever used
NethermindEth-nethermind
.cs
@@ -1,4 +1,4 @@ -<figure class="video_tutorial card"> +<figure class="video_tutorial tile"> <%= link_to video_tutorial, title: "The #{video_tutorial.name} online video tutorial details" do %> <h5>Video Tutorial</h5> <%= image_tag(video_tutorial.product_image.url) %>
1
<figure class="video_tutorial card"> <%= link_to video_tutorial, title: "The #{video_tutorial.name} online video tutorial details" do %> <h5>Video Tutorial</h5> <%= image_tag(video_tutorial.product_image.url) %> <h4><%= video_tutorial.name %></h4> <p><%= video_tutorial.tagline %></p> <% end %> </fig...
1
13,403
Probably will undo this change for now, as I'm just targeting Weekly Iteration in this PR.
thoughtbot-upcase
rb
@@ -53,8 +53,6 @@ static size_t expectedNumberOfContextVariables; static int64_t expectedContextVariableValue; -static std::unordered_map<size_t, Kokkos::Tools::Experimental::SetOrRange> - candidate_value_map; int main() { Kokkos::initialize();
1
/* //@HEADER // ************************************************************************ // // Kokkos v. 3.0 // Copyright (2020) National Technology & Engineering // Solutions of Sandia, LLC (NTESS). // // Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Govern...
1
25,537
Unused parameter warning? How comes we did not catch that before? In any case please open another PR for this.
kokkos-kokkos
cpp
@@ -60,9 +60,12 @@ def average_precision(recalls, precisions, mode='area'): def tpfp_imagenet(det_bboxes, gt_bboxes, gt_bboxes_ignore=None, + gt_bboxes_group_of=None, default_iou_thr=0.5, + ioa_thr=None, area_...
1
# Copyright (c) OpenMMLab. All rights reserved. from multiprocessing import Pool import mmcv import numpy as np from mmcv.utils import print_log from terminaltables import AsciiTable from .bbox_overlaps import bbox_overlaps from .class_names import get_classes def average_precision(recalls, precisions, mode='area')...
1
26,137
I recommend move all openimage related logic to a new function
open-mmlab-mmdetection
py
@@ -12,6 +12,8 @@ const ( type Cgroup struct { Name string `json:"name"` + // indicates that this is an externally passed, fully created cgroup + ExternalCgroup bool `json:"external_cgroup"` // name of parent cgroup or slice Parent string `json:"parent"`
1
// +build linux freebsd package configs type FreezerState string const ( Undefined FreezerState = "" Frozen FreezerState = "FROZEN" Thawed FreezerState = "THAWED" ) type Cgroup struct { Name string `json:"name"` // name of parent cgroup or slice Parent string `json:"parent"` // If this is true allow ...
1
8,796
We shouldn't have a bool for this. If there is a path passed, then we use it. Resource may or may not be empty.
opencontainers-runc
go
@@ -0,0 +1,16 @@ +<ul class="teachers"> + <li> + <%= teacher_gravatar section_teacher.teacher, 92 %> + <h2> + <span> + <%= t '.header', + city: section_teacher.section.city, + count: @section_teachers.size %> + </span> + <%= section_teacher.teacher.name %> + </h...
1
1
6,609
I like how you used the count on the translate call to handle this.
thoughtbot-upcase
rb
@@ -139,11 +139,13 @@ class QueryBuilder implements QueryBuilderInterface $finalQuery->setString($this->getNormalizedQueryString($query)); } $string = $finalQuery->getString() ?: '*:*'; - // Highlighting is enabled if we have a field list set. $highlight = !empty($this->...
1
<?php /** * SOLR QueryBuilder. * * PHP version 7 * * Copyright (C) Villanova University 2010. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * as published by the Free Software Foundation. * * This program is distrib...
1
28,037
Do we need to do this from the outside, or is there a spot in the handler code where we can do this automatically? (I haven't studied it closely yet... just wondering if you've already thought it through or if it's worth taking a closer look).
vufind-org-vufind
php
@@ -0,0 +1,9 @@ +package com.fsck.k9; + +import java.util.*; + +public class SputnikTest { + public void sputnikTest() { + return; + } +}
1
1
13,776
[Checkstyle] INFO: Using the '._' form of import should be avoided - java.util._.
k9mail-k-9
java
@@ -42,6 +42,9 @@ class BaseWebTest(object): def get_app_settings(self, additional_settings=None): settings = cliquet_support.DEFAULT_SETTINGS.copy() + settings['cliquet.cache_backend'] = 'cliquet.cache.memory' + settings['cliquet.storage_backend'] = 'cliquet.storage.memory' + setti...
1
try: import unittest2 as unittest except ImportError: import unittest # NOQA import webtest from cliquet import utils from pyramid.security import IAuthorizationPolicy from zope.interface import implementer from cliquet.tests import support as cliquet_support from kinto import main as testapp MINIMALIST_BUC...
1
7,450
So, why everything is in memory but the permission backend?
Kinto-kinto
py
@@ -283,8 +283,9 @@ public class UiSetupWizardImplementation implements SetupWizard { */ @Override public String browse(String textToShow, String directory, List<String> allowedExtensions) { + final List<String> copiedAllowedExtensions = allowedExtensions != null ? List.copyOf(allowedExtensions) ...
1
/* * Copyright (C) 2015-2017 PÂRIS Quentin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is...
1
13,907
Are you sure it should be null and not an empty List?
PhoenicisOrg-phoenicis
java
@@ -22,10 +22,12 @@ namespace Microsoft.DotNet.Build.Tasks // Additional Dependencies to add to the project.json. May Optionally contain a version. // Will Override dependencies present in the project if there is a conflict. // AdditionalDependencies required metadata: Name, Version - ...
1
using Microsoft.Build.Utilities; using Microsoft.Build.Framework; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; using NuGet.Versioning; namespace Microsoft.DotNet.Build.Tasks { /// <summa...
1
8,649
Unfortunately I think the assumption of "empty" means the default dependency section is not correct. For a project.json file the default dependencies section is a shared section between all the different target frameworks and our TargetGroup being empty may map to many different target frameworks so they aren't really ...
dotnet-buildtools
.cs
@@ -121,8 +121,8 @@ namespace Microsoft.AspNet.Server.KestrelTests IDictionary<string, StringValues> headers = new FrameRequestHeaders(); var kv1 = new KeyValuePair<string, StringValues>("host", new[] { "localhost" }); var kv2 = new KeyValuePair<string, StringValues>("custom", new...
1
using System; using System.Collections.Generic; using Microsoft.AspNet.Server.Kestrel.Http; using Microsoft.Extensions.Primitives; using Xunit; namespace Microsoft.AspNet.Server.KestrelTests { public class FrameRequestHeadersTests { [Fact] public void InitialDictionaryIsEmpty() { ...
1
6,274
This test was verifying the wrong thing.
aspnet-KestrelHttpServer
.cs
@@ -9,7 +9,7 @@ const build = (buildConfig = config.defaultBuildConfig, options) => { util.updateBranding() } - util.buildMuon() + util.buildMuon('brave') } module.exports = build
1
const config = require('../lib/config') const util = require('../lib/util') const build = (buildConfig = config.defaultBuildConfig, options) => { config.buildConfig = buildConfig config.update(options) if (!options.no_branding_update) { util.updateBranding() } util.buildMuon() } module.exports = build...
1
5,286
pls pr a name change fro muon here too separately.
brave-brave-browser
js
@@ -198,7 +198,11 @@ func (opts *InitAppOpts) deployEnv() error { return err } + if err := opts.envStore.CreateEnvironment(&env); err != nil { + opts.spinner.Stop("Error!") + return err + } opts.spinner.Stop("Done!") } return nil
1
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 // Package cli contains the archer subcommands. package cli import ( "errors" "fmt" "os" "github.com/AlecAivazis/survey/v2" "github.com/AlecAivazis/survey/v2/terminal" "github.com/aws/PRIVATE-amazo...
1
10,284
nit: we can use `defer opts.spinner.Stop("Error!")` after l.180 to make it slightly neater
aws-copilot-cli
go
@@ -7367,6 +7367,7 @@ check_thread_vm_area(dcontext_t *dcontext, app_pc pc, app_pc tag, void **vmlist, read_lock(&executable_areas->lock); ok = lookup_addr(executable_areas, pc, &area); if (ok && TEST(VM_DELAY_READONLY, area->vm_flags)) { + bool is_allocated_mem; /...
1
/* ********************************************************** * Copyright (c) 2010-2017 Google, Inc. All rights reserved. * Copyright (c) 2002-2010 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or witho...
1
10,598
This is declared in the wrong block
DynamoRIO-dynamorio
c