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
@@ -4,9 +4,10 @@ import java.io.File; import java.io.IOException; public class FileTypeDetection { - - public static String determineFileType(File file) throws IOException { - return FileUtil.determineFileType(file, file.getName()); + // Question: why do we need this utility? - as opposed to just calli...
1
package edu.harvard.iq.dataverse.util; import java.io.File; import java.io.IOException; public class FileTypeDetection { public static String determineFileType(File file) throws IOException { return FileUtil.determineFileType(file, file.getName()); } }
1
43,947
good question - I vote we just remove, up to you if you want to handle in this PR though. (as it would require changing the places you call it; maybe moving the test? Though my guess is if we don't now, we never will.
IQSS-dataverse
java
@@ -15,6 +15,10 @@ module Travis super << "--gemfile-" << config[:gemfile].to_s end + def use_directory_cache? + super or data.cache?(:bundler) + end + def setup super setup_bundler
1
module Travis module Build class Script class Ruby < Script DEFAULTS = { rvm: 'default', gemfile: 'Gemfile' } include Jdk include RVM def cache_slug # ruby version is added by RVM] super << "--gemfile-" << config[:gemfile]...
1
10,874
This is so that if we turn on bundler caching globally it still won't affect python etc. Same inheritance logic as for the cache slug.
travis-ci-travis-build
rb
@@ -58,7 +58,8 @@ namespace Nethermind.Synchronization.Peers public bool CanBeAllocated(AllocationContexts contexts) { return !IsAsleep(contexts) && - !IsAllocated(contexts); + !IsAllocated(contexts) && + this.SupportsAllocation(contex...
1
// Copyright (c) 2021 Demerzel Solutions Limited // This file is part of the Nethermind library. // // The Nethermind library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of ...
1
26,404
[You can ignore it] Maybe a better method name would be IsSupported or HasSupportForAllocation?
NethermindEth-nethermind
.cs
@@ -32,7 +32,7 @@ def escape_and_globify(pattern_string): pattern_string (str): The pattern string of which to make a regex. Returns: - str: The pattern string, escaped except for the "*", which is + str: The pattern string, escaped except for the "\*", which is transformed in...
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
32,367
Why is this changed to `\*`? The behavior of the code on line 42, shows that `*` is what's handled?
forseti-security-forseti-security
py
@@ -117,6 +117,16 @@ module.exports = BaseTest.extend({ TestCase.assertEqual(Realm.defaultPath, newPath, "defaultPath should have been updated"); }, + testRealmSchemaVersion: function() { + TestCase.assertEqual(Realm.schemaVersion(Realm.defaultPath), 0xFFFFFFFFFFFFFFFF); + + var...
1
//////////////////////////////////////////////////////////////////////////// // // Copyright 2016 Realm 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/li...
1
15,155
I think this should either return `-1` or throw. I think my vote is on the former.
realm-realm-js
js
@@ -54,6 +54,7 @@ DEFAULT_SETTINGS = { 'kinto.core.events.setup_transaction_hook', ), 'event_listeners': '', + 'heartbeat_timeout_seconds': 5, 'logging_renderer': 'kinto.core.logs.ClassicLogRenderer', 'newrelic_config': None, 'newrelic_env': 'dev',
1
"""Main entry point """ import pkg_resources from cornice import Service as CorniceService from pyramid.settings import aslist from kinto.core import authentication from kinto.core import errors from kinto.core import events from kinto.core.initialization import ( # NOQA initialize, install_middlewares, load...
1
9,294
I am confused, I've read 2, 3 and 5 seconds in various places
Kinto-kinto
py
@@ -91,7 +91,14 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) fcgiBackend.SetSendTimeout(rule.SendTimeout) var resp *http.Response - contentLength, _ := strconv.Atoi(r.Header.Get("Content-Length")) + + var contentLength int64 + // if ContentLength is already set + ...
1
// Package fastcgi has middleware that acts as a FastCGI client. Requests // that get forwarded to FastCGI stop the middleware execution chain. // The most common use for this package is to serve PHP websites via php-fpm. package fastcgi import ( "errors" "io" "net" "net/http" "os" "path" "path/filepath" "strc...
1
10,286
Any particular reason you chose int64 instead of int? This requires adding type conversions throughout the code below.
caddyserver-caddy
go
@@ -280,14 +280,16 @@ class CommandTest(QuiltTestCase): mock_input.return_value = old_refresh_token - with pytest.raises(command.CommandException, match='Invalid team name'): + with pytest.raises(command.CommandException, + match='The team you specified is not a valid team.'): ...
1
""" Tests for commands. Covered cases: CRUD related: 1. users/list - OK - no auth - not found - server error 2. users/create - OK - no auth - not found - server error - already created (duplicate) - bogus email - empty name...
1
16,237
this string should really be a local constant. it's repeated below.
quiltdata-quilt
py
@@ -194,6 +194,7 @@ namespace OpenTelemetry.Exporter.Jaeger.Implementation int i => new JaegerTag(attribute.Key, JaegerTagType.LONG, vLong: Convert.ToInt64(i)), long l => new JaegerTag(attribute.Key, JaegerTagType.LONG, vLong: l), float f => new JaegerTag(attribute.Key...
1
// <copyright file="JaegerActivityExtensions.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://w...
1
19,914
Number types are hard . Should we be considering byte/sbyte? What about unsigned variants that would otherwise fit in a signed 64 bit integer like UInt16, UInt32?
open-telemetry-opentelemetry-dotnet
.cs
@@ -170,7 +170,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests [MemberData(nameof(HostHeaderData))] public void ValidHostHeadersParsed(string host) { - Assert.True(HttpUtilities.IsValidHostHeader(host)); + HttpUtilities.ValidateHostHeader(host); + ...
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.Text; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.I...
1
14,938
`Assert.True(true)`... xunit used to have Assert.DoesNotThrow
aspnet-KestrelHttpServer
.cs
@@ -3,8 +3,9 @@ if ENV["S3_BUCKET_NAME"] && ENV["S3_ACCESS_KEY_ID"] && ENV["S3_SECRET_ACCESS_KEY bucket: ENV["S3_BUCKET_NAME"], s3_credentials: { access_key_id: ENV["S3_ACCESS_KEY_ID"], - secret_access_key: ENV["S3_SECRET_ACCESS_KEY"] + secret_access_key: ENV["S3_SECRET_ACCESS_KEY"], }, ...
1
if ENV["S3_BUCKET_NAME"] && ENV["S3_ACCESS_KEY_ID"] && ENV["S3_SECRET_ACCESS_KEY"] Paperclip::Attachment.default_options.merge!( bucket: ENV["S3_BUCKET_NAME"], s3_credentials: { access_key_id: ENV["S3_ACCESS_KEY_ID"], secret_access_key: ENV["S3_SECRET_ACCESS_KEY"] }, s3_permissions: :priva...
1
16,487
should this be an env var like the other `S3_*` values?
18F-C2
rb
@@ -9,3 +9,12 @@ export function assign(obj, props) { for (let i in props) obj[i] = props[i]; return /** @type {O & P} */ (obj); } + +/** + * Remove a child node from its parent if attached. + * @param {Node} node The node to remove + */ +export function removeNode(node) { + let parentNode = node.parentNode; + if ...
1
/** * Assign properties from `props` to `obj` * @template O, P The obj and props types * @param {O} obj The object to copy properties to * @param {P} props The object to copy properties from * @returns {O & P} */ export function assign(obj, props) { for (let i in props) obj[i] = props[i]; return /** @type {O & ...
1
12,608
If you do go this route, I think it would be worth adding a note here that IE 11 is the only reason why we're not using the more obvious `node.remove()`.
preactjs-preact
js
@@ -26,7 +26,7 @@ class RecommendationChecker(checkers.BaseChecker): "consider-iterating-dictionary", "Emitted when the keys of a dictionary are iterated through the .keys() " "method. It is enough to just iterate through the dictionary itself, as " - 'in "for key in di...
1
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE from typing import Union, cast import astroid from astroid import nodes from pylint import checkers, interfaces from pylint.checkers import utils class RecommendationChec...
1
15,816
The added text doesn't really match why it's possible. Maybe it would be better to name that as a separate case for this checker? (e.g. dict lookup is quicker than list comparison)
PyCQA-pylint
py
@@ -63,7 +63,7 @@ class Image implements EntityFileUploadInterface protected $position; /** - * @var \Datetime + * @var \DateTime * * @ORM\Column(type="datetime") */
1
<?php namespace Shopsys\FrameworkBundle\Component\Image; use DateTime; use Doctrine\ORM\Mapping as ORM; use Shopsys\FrameworkBundle\Component\FileUpload\EntityFileUploadInterface; use Shopsys\FrameworkBundle\Component\FileUpload\FileForUpload; use Shopsys\FrameworkBundle\Component\FileUpload\FileNamingConvention; use...
1
16,299
just whether we are not missing some doctrine extension because above this attribute is nullable position and it shows int instead of int|null but maybe for lvl2 it is OK
shopsys-shopsys
php
@@ -59,6 +59,13 @@ public class NodeStatus { } } + public boolean hasCapability(Capabilities caps) { + long count = slots.stream() + .filter(slot -> slot.isSupporting(caps)) + .count(); + return count > 0; + } + public boolean hasCapacity() { return slots.stream().anyMatch(slot -...
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
18,174
Prefer `Stream.anyMatch` instead of iterating over all slots.
SeleniumHQ-selenium
js
@@ -1030,7 +1030,7 @@ bool StatelessValidation::manual_PreCallValidateCreateImage(VkDevice device, con "vkCreateImage(): Tiling is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT but pNext must have " "either VkImageDrmFormatModifierListCreateInfoEXT o...
1
/* Copyright (c) 2015-2021 The Khronos Group Inc. * Copyright (c) 2015-2021 Valve Corporation * Copyright (c) 2015-2021 LunarG, Inc. * Copyright (C) 2015-2021 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 m...
1
15,310
:grimacing: yikes, thanks for catching this!
KhronosGroup-Vulkan-ValidationLayers
cpp
@@ -0,0 +1,10 @@ +using System; +using MvvmCross.Droid.Support.V7.RecyclerView.Model; + +namespace MvvmCross.Droid.Support.V7.RecyclerView +{ + public interface IMvxRecyclerAdapterBindableHolder + { + event Action<MvxViewHolderBindedEventArgs> MvxViewHolderBinded; + } +}
1
1
12,219
`Binded` is weird. I think it needs to be something with `Bound` in it (and drop the `Mvx` bit) like `ViewHolderBound` or something.
MvvmCross-MvvmCross
.cs
@@ -84,8 +84,8 @@ func importPoolBuilder(cStorPool *apis.CStorPool, cachefileFlag bool) []string { } // CreatePool creates a new cStor pool. -func CreatePool(cStorPool *apis.CStorPool) error { - createAttr := createPoolBuilder(cStorPool) +func CreatePool(cStorPool *apis.CStorPool, diskList []string) error { + creat...
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, sof...
1
13,828
can we have String() and GoString() implementation of `apis.CStorPool` struct to pretty print it.
openebs-maya
go
@@ -914,6 +914,10 @@ CheckedError Parser::ParseTable(const StructDef &struct_def, std::string *value, size_t fieldn = 0; auto err = ParseTableDelimiters(fieldn, &struct_def, [&](const std::string &name) -> CheckedError { + if (name == "$schema") { + NEXT(); // Ignore thi...
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
12,176
Like I said, please replace by `EXPECT(kTokenString)`
google-flatbuffers
java
@@ -32,6 +32,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException; +import org.springframework.security.authentication.AuthenticationDetailsSource; import org.springframework.security....
1
/* * Copyright 2002-2016 the original author or 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 a...
1
17,202
Will you please update the copyright message to `2021` for classes that you modify?
spring-projects-spring-security
java
@@ -301,6 +301,8 @@ getSelectedRows: function () { return service.getSelectedRows(grid).map(function (gridRow) { return gridRow.entity; + }).filter(function (entity) { + return entity.hasOwnProperty('$$hashKey'); ...
1
(function () { 'use strict'; /** * @ngdoc overview * @name ui.grid.selection * @description * * # ui.grid.selection * This module provides row selection * * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api c...
1
11,969
Is there a better way to filter these other than relying on the hashKey. I few like this might now be trustworthy in the long run. If angular ever removes this property, this feature would be broken.
angular-ui-ui-grid
js
@@ -2012,7 +2012,11 @@ os_tls_thread_exit(local_state_t *local_state) /* We already set TLS to &uninit_tls in os_thread_exit() */ - if (dynamo_exited && !last_thread_tls_exited) { + /* Do not set last_thread_tls_exited if a client_thread is exiting. + * If set, get_thread_private_dcontext() returns N...
1
/* ******************************************************************************* * Copyright (c) 2010-2017 Google, Inc. All rights reserved. * Copyright (c) 2011 Massachusetts Institute of Technology All rights reserved. * Copyright (c) 2000-2010 VMware, Inc. All rights reserved. * ****************************...
1
11,373
No need to check dynamo_exited
DynamoRIO-dynamorio
c
@@ -47,8 +47,11 @@ func (c *Config) SetDevice(deviceName string) { c.setParam("dev", deviceName) } -func (c *Config) SetTlsCertificate(caFile, certFile, certKeyFile string) { +func (c *Config) SetTlsCACertificate(caFile string) { c.AddOptions(OptionFile("ca", caFile)) +} + +func (c *Config) SetTlsPrivatePubKeys(...
1
package openvpn import ( "strconv" ) func NewConfig() *Config { return &Config{ options: make([]configOption, 0), } } type Config struct { options []configOption } type configOption interface { getName() string } func (c *Config) AddOptions(options ...configOption) { c.options = append(c.options, options.....
1
10,227
from linter: >method SetTlsCACertificate should be SetTLSCACertificate
mysteriumnetwork-node
go
@@ -519,11 +519,11 @@ public abstract class SpanStoreTest { Span trace2 = Span.builder().traceId(2).name("get").id(2) .timestamp((today + 2) * 1000) - .addAnnotation(Annotation.create((today + 1) * 1000, CLIENT_SEND, APP_ENDPOINT)) - .addAnnotation(Annotation.create((today + 1) * 1000, SER...
1
/** * Copyright 2015-2017 The OpenZipkin 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 ...
1
12,605
this data had incorrectly aligned timestamps (which wasn't the point of the test)
openzipkin-zipkin
java
@@ -280,6 +280,16 @@ func (w *Workflow) populateStep(ctx context.Context, s *Step) error { return step.populate(ctx, s) } +func getUser() string { + if cu, err := user.Current(); err == nil { + return cu.Username + } + if hn, err := os.Hostname(); err == nil { + return hn + } + return "unknown" +} + func (w *Wo...
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
6,683
Since this is workflow agnostic, should we put this in common?
GoogleCloudPlatform-compute-image-tools
go
@@ -54,6 +54,13 @@ class SourceAnalyzer(object): """ raise NotImplementedError("Subclasses should implement this!") + @classmethod + def version_compatible(cls, configured_binary, environ): + """ + Checker the version compatibility of the given analyzer binary. + """ + ...
1
# ------------------------------------------------------------------------- # The CodeChecker Infrastructure # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # -------------------------------------------------------------------------...
1
10,826
using the `@abstractmethod` decorator wouldn't be better?
Ericsson-codechecker
c
@@ -21,7 +21,7 @@ final class BooleanConfigurator implements FieldConfiguratorInterface public function configure(FieldDto $field, EntityDto $entityDto, AdminContext $context): void { $isRenderedAsSwitch = true === $field->getCustomOption(BooleanField::OPTION_RENDER_AS_SWITCH); - if ($isRender...
1
<?php namespace EasyCorp\Bundle\EasyAdminBundle\Field\Configurator; use EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext; use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldConfiguratorInterface; use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto; use EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto; use EasyCor...
1
12,981
This was crashing the app during EDIT on boolean Doctrine Embedded properties
EasyCorp-EasyAdminBundle
php
@@ -45,7 +45,7 @@ #include "board_common.h" -#define DFL_SYSFS_SEC_GLOB "*dfl*/*spi*/*spi*/*spi*/**/security/" +#define DFL_SYSFS_SEC_GLOB "*dfl*/**/security/" #define DFL_SYSFS_SEC_USER_FLASH_COUNT DFL_SYSFS_SEC_GLOB "*flash_count" #define DFL_SYSFS_SEC_BMC_CANCEL DFL_SYSFS_SEC_GLOB "bmc_c...
1
// Copyright(c) 2019-2021, 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
20,883
Will this be backwards compatible with the previous path?
OPAE-opae-sdk
c
@@ -29,6 +29,11 @@ namespace OpenTelemetry.Trace /// </summary> ISpan CurrentSpan { get; } + /// <summary> + /// Gets the current scope from the context. + /// </summary> + IScope CurrentScope { get; } + /// <summary> /// Gets the <see cref="IBinaryForma...
1
// <copyright file="ITracer.cs" company="OpenTelemetry Authors"> // Copyright 2018, OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/...
1
12,126
what is potential use for current scope? It seems you'd only want it to stop it. But if you get current scope you never know if it's yours to stop - i.e. this is not safe or correct to stop current scope. So I wonder should we even try to expose it?
open-telemetry-opentelemetry-dotnet
.cs
@@ -76,7 +76,9 @@ describe( 'User Input Settings', () => { 'enter keywords', async () => { await expect( page ).toClick( '.googlesitekit-user-input__buttons--next' ); - await expect( page ).toFill( '#searchTerms-keyword-0', 'One,Two,Three,' ); + await expect( page ).toFill( '#searchTerms-keyword-0', ...
1
/** * User Input Settings tests. * * 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
36,716
I think this is likely the only additional change needed on the original PR.
google-site-kit-wp
js
@@ -5,10 +5,12 @@ import android.content.SharedPreferences; import android.content.res.Configuration; import android.util.AttributeSet; import android.view.View; + import androidx.appcompat.view.ContextThemeWrapper; import androidx.recyclerview.widget.DividerItemDecoration; import androidx.recyclerview.widget.Lin...
1
package de.danoeh.antennapod.view; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Configuration; import android.util.AttributeSet; import android.view.View; import androidx.appcompat.view.ContextThemeWrapper; import androidx.recyclerview.widget.DividerItemDecoratio...
1
19,254
Please revert changes to unrelated file
AntennaPod-AntennaPod
java
@@ -0,0 +1,14 @@ +package azkaban.execapp.fake; + +import org.mortbay.jetty.Connector; +import org.mortbay.jetty.Server; +import org.mortbay.jetty.bio.SocketConnector; + +public class FakeServer extends Server { + + @Override + public Connector[] getConnectors() { + return new Connector[]{new SocketConnector()}; +...
1
1
13,290
Can test use a Mockito mock instance instead?
azkaban-azkaban
java
@@ -47,12 +47,13 @@ import java.lang.reflect.Method; link = "https://github.com/palantir/gradle-baseline#baseline-error-prone-checks", linkType = BugPattern.LinkType.CUSTOM, severity = BugPattern.SeverityLevel.WARNING, - summary = "InvocationHandlers which delegate to another object mu...
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
8,035
Bit of a shame about these multi-line strings in annotation parameters - they're not a deal breaker but just make the diff noisier
palantir-gradle-baseline
java
@@ -61,6 +61,11 @@ namespace Microsoft.Rest.Generator.NodeJS } } + public List<T> ConvertIEnumerableToList<T>(IEnumerable<T> enumerable) + { + return new List<T>(enumerable); + } + public bool IsPolymorphic { get
1
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.Linq; using Microsoft.Rest.Generator.ClientModel; using Microsoft.Rest.Generator.NodeJS.TemplateMode...
1
20,933
we can remove this one as this is not used any more
Azure-autorest
java
@@ -90,7 +90,6 @@ public abstract class LongRunningConfig { private static LongRunningConfig createLongRunningConfigFromProtoFile( Method method, DiagCollector diagCollector, ProtoParser protoParser) { - boolean error = false; Model model = method.getModel(); OperationTypes operationTypes = pro...
1
/* Copyright 2016 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
1
27,305
we don't really need an extra error flag
googleapis-gapic-generator
java
@@ -21,11 +21,15 @@ import com.google.common.collect.ImmutableList; import java.io.File; import java.util.AbstractList; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; -import net.ltgt.gradle.errorprone.ErrorPronePlugin; +import net.ltgt.gradle.errorprone.javacplugin.CheckSeve...
1
/* * (c) Copyright 2017 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,642
any chance you could just fix the processors plugin?
palantir-gradle-baseline
java
@@ -22,7 +22,8 @@ model = dict( basesize_ratio_range=(0.15, 0.9), anchor_ratios=([2], [2, 3], [2, 3], [2, 3], [2], [2]), target_means=(.0, .0, .0, .0), - target_stds=(0.1, 0.1, 0.2, 0.2))) + target_stds=(0.1, 0.1, 0.2, 0.2), + use_depthwise=False)) cudnn_benchmark = True...
1
# model settings input_size = 300 model = dict( type='SingleStageDetector', pretrained='open-mmlab://vgg16_caffe', backbone=dict( type='SSDVGG', input_size=input_size, depth=16, with_last_pool=False, ceil_mode=True, out_indices=(3, 4), out_feature_indi...
1
18,594
We may keep this config unchanged since `use_depthwise=True` by default.
open-mmlab-mmdetection
py
@@ -566,6 +566,15 @@ privload_process_imports(privmod_t *mod) privload_locate_and_load(name, mod, false /*client dir=>true*/); if (impmod == NULL) return false; + if (strstr(name, "libpthread") == name) { + /* i#956: A private ...
1
/* ******************************************************************************* * Copyright (c) 2011-2021 Google, Inc. All rights reserved. * Copyright (c) 2011 Massachusetts Institute of Technology All rights reserved. * *******************************************************************************/ /* * Re...
1
25,077
Maybe add i#956 in this log as well.
DynamoRIO-dynamorio
c
@@ -438,6 +438,11 @@ void Player::updateInventoryWeight() inventoryWeight += item->getWeight(); } } + + StoreInbox* storeInbox = getStoreInbox(); + if (storeInbox) { + inventoryWeight += storeInbox->getWeight(); + } } void Player::addSkillAdvance(skills_t skill, uint64_t count)
1
/** * The Forgotten Server - a free and open-source MMORPG server emulator * Copyright (C) 2019 Mark Samman <mark.samman@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either...
1
18,546
if (StoreInbox* storeInbox = getStoreInbox()) {
otland-forgottenserver
cpp
@@ -459,9 +459,14 @@ API.prototype._import = function(cb) { }); }; + +API.prototype.importAllFromMnemonic = function(words, opts, cb) { +} + /** * Import from Mnemonics (language autodetected) * Can throw an error if mnemonic is invalid + * Will try compilant and non-compliantDerivation * * @param {Strin...
1
'use strict'; var _ = require('lodash'); var $ = require('preconditions').singleton(); var util = require('util'); var async = require('async'); var events = require('events'); var Bitcore = require('bitcore-lib'); var Bitcore_ = { btc: Bitcore, bch: require('bitcore-lib-cash'), }; var Mnemonic = require('bitcore-...
1
15,125
what is this, is it going to be used later?
bitpay-bitcore
js
@@ -66,8 +66,7 @@ module Beaker name = host.name Dir.stub( :chdir ).and_yield() - out = double( 'stdout' ) - out.stub( :read ).and_return("Host #{host.name} + vagrant.should_receive(:`).and_return("Host #{host.name} HostName 127.0.0.1 User vagrant Port 2222
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 "stores the vagrant file in $WORKINGDIR/.vagrant/beaker_vagrant_files/sample.cfg" do FakeFS.activate! vagrant.stub( :ra...
1
5,122
@anodelman test failure is probably due to this, needs to be fixed to `("Host #{host.name}")`
voxpupuli-beaker
rb
@@ -75,10 +75,10 @@ -<div class="cart-comments-container"> - <div id="cart-comments"> - <h3>Comments on this purchase request</h3> - <%- if @show_comments %> +<%- if @include_comments_files %> + <div class="cart-comments-container proposal-submodel-container"> + <div id="cart-comments"> + <h3>Comm...
1
<div class="inset"> <div class="row"> <div class="col-md-12 col-xs-12"> <h1 class="communicart_header"> <%= cart.proposal.name %> </h1> <div class="communicart_description"> <p> Purchase Request: <strong>#<%= cart.id %></strong> </p> <p> Requ...
1
12,887
I'm not sure that we need this anymore, but that can be a separate discussion.
18F-C2
rb
@@ -34,10 +34,14 @@ public interface HttpClient { * @throws IOException if an I/O error occurs. */ HttpResponse execute(HttpRequest request, boolean followRedirects) throws IOException; - + /** - * Creates HttpClient instances. - */ + * Closes the connections associated with this client. + * + * @t...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
12,899
The formatting seems different from the rest of the code
SeleniumHQ-selenium
js
@@ -709,6 +709,9 @@ func (cg *ConfigGenerator) generateProbeConfig( if m.Spec.ProberSpec.Scheme != "" { cfg = append(cfg, yaml.MapItem{Key: "scheme", Value: m.Spec.ProberSpec.Scheme}) } + if m.Spec.ProberSpec.ProxyURL != "" { + cfg = append(cfg, yaml.MapItem{Key: "proxy_url", Value: m.Spec.ProberSpec.ProxyURL})...
1
// Copyright 2016 The prometheus-operator Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable ...
1
16,131
Could we have a unit test for this?
prometheus-operator-prometheus-operator
go
@@ -477,9 +477,11 @@ func (c *temporalImpl) startHistory( } } + stoppedCh := make(chan struct{}) var historyService *history.Service app := fx.New( - fx.Supply(params), + fx.Supply(params, + stoppedCh), history.Module, fx.Populate(&historyService)) err = app.Err()
1
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Soft...
1
12,737
nit: put params in new line
temporalio-temporal
go
@@ -100,13 +100,15 @@ export default function DateRangeSelector() { 'mdc-button--dropdown', 'googlesitekit-header__dropdown', 'googlesitekit-header__date-range-selector-menu', + 'googlesitekit-border-radius-round--phone', + 'googlesitekit-button-icon--phone', { 'googlesitekit-head...
1
/** * Date range selector component. * * Site Kit by Google, Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE...
1
42,547
The button for the date range selector has incorrect width since it has `padding-right: 8px` which sets the width to: `44px`. Can you review to make the button `36px` on small screens as per the AC?
google-site-kit-wp
js
@@ -2836,8 +2836,13 @@ client_process_bb(dcontext_t *dcontext, build_bb_t *bb) # ifdef X86 if (!d_r_is_avx512_code_in_use()) { if (ZMM_ENABLED()) { - if (instr_may_write_zmm_register(inst)) + if (instr_may_write_zmm_register(inst)) { + LOG(THREA...
1
/* ********************************************************** * Copyright (c) 2011-2019 Google, Inc. All rights reserved. * Copyright (c) 2001-2010 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or witho...
1
17,805
This should be inside the set routine IMHO: matches the others; all callers need it; simplifies code here.
DynamoRIO-dynamorio
c
@@ -106,6 +106,8 @@ public class TwoPhaseCommitter { /** unit is second */ private static final long DEFAULT_BATCH_WRITE_LOCK_TTL = 3000; + private static final long MAX_RETRY_LEVEL = 3; + private static final Logger LOG = LoggerFactory.getLogger(TwoPhaseCommitter.class); private TxnKVClient kvClient;
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
10,164
MAX_RETRY_TIMES makes much more sense.
pingcap-tispark
java
@@ -56,6 +56,7 @@ type testContext struct { fakeStatsKeeper *fakeSessionStatsKeeper fakeDialog *fakeDialog fakePromiseIssuer *fakePromiseIssuer + fakeStorage *fakeStorage sync.RWMutex }
1
/* * Copyright (C) 2017 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
12,433
`saveSession` allows easier mocking - just save function which You need, instead full interface
mysteriumnetwork-node
go
@@ -211,7 +211,8 @@ class Bucket(object): raise self.connection.provider.storage_response_error( response.status, response.reason, '') - def list(self, prefix='', delimiter='', marker='', headers=None): + def list(self, prefix='', delimiter='', marker='', headers=None, + ...
1
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # 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 res...
1
9,523
No docs for the new param here?
boto-boto
py
@@ -1,5 +1,5 @@ /* - * Copyright ConsenSys AG. + * Copyright Contributors to Hyperledger Besu. * * 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
/* * Copyright ConsenSys AG. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing...
1
26,179
This file is unrelated to the aims of this PR. Please remove. If it is needed to demonstrate Sonar Deltas then it has been proven and can be removed.
hyperledger-besu
java
@@ -42,5 +42,12 @@ namespace OpenTelemetry.Trace.Export /// <param name="cancellationToken">Cancellation token.</param> /// <returns>Returns <see cref="Task"/>.</returns> public abstract Task ShutdownAsync(CancellationToken cancellationToken); + + /// <summary> + /// Flushes all...
1
// <copyright file="ActivityProcessor.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.apa...
1
14,571
minor: `Export all ended spans to the configured Exporter that have not yet been exported.` - This is the spec description. Lets use something on that line. "queue" is not necessarily present for all processor.
open-telemetry-opentelemetry-dotnet
.cs
@@ -683,6 +683,8 @@ func (c *Client) reallyExecute(tid int, target *core.BuildTarget, command *pb.Co ActionDigest: digest, SkipCacheLookup: skipCacheLookup, }, updateProgress) + log.Debug("completed ExecuteAndWaitProgress() for %v", target.Label) + if err != nil { // Handle timing issues if we try to re...
1
// Package remote provides our interface to the Google remote execution APIs // (https://github.com/bazelbuild/remote-apis) which Please can use to distribute // work to remote servers. package remote import ( "context" "encoding/hex" "fmt" "io/ioutil" "os" "path" "path/filepath" "strings" "sync" "time" "g...
1
10,236
is this deliberate? or testing?
thought-machine-please
go
@@ -24,7 +24,7 @@ namespace OpenTelemetry { public class CompositeProcessor<T> : BaseProcessor<T> { - private DoublyLinkedListNode head; + private readonly DoublyLinkedListNode head; private DoublyLinkedListNode tail; private bool disposed;
1
// <copyright file="CompositeProcessor.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.apa...
1
20,461
I want to get more perspectives regarding this one. Making it `readonly` makes me feel that we're assuming the head should never change, and my worry is that other code might assume it (e.g. they might cache the value and assume it will never change). While this is true for now, I guess in the future we might want to s...
open-telemetry-opentelemetry-dotnet
.cs
@@ -65,7 +65,7 @@ public class TestIndexSortSortedNumericDocValuesRangeQuery extends LuceneTestCas iw.deleteDocuments(LongPoint.newRangeQuery("idx", 0L, 10L)); } final IndexReader reader = iw.getReader(); - final IndexSearcher searcher = newSearcher(reader, false); + final IndexSearcher...
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,831
This isn't critical for test coverage, but it seemed off that we had disabled wrapping the reader.
apache-lucene-solr
java
@@ -21,9 +21,9 @@ _descList = [] def _setupDescriptors(namespace): global _descList, descList - from rdkit.Chem import GraphDescriptors, MolSurf, Lipinski, Fragments, Crippen + from rdkit.Chem import GraphDescriptors, MolSurf, Lipinski, Fragments, Crippen, Descriptors3D from rdkit.Chem.EState import EState_V...
1
# # Copyright (C) 2001-2017 greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # from rdkit import Chem from rd...
1
16,632
Please remove Descriptors3D from this file. We just did this in master.
rdkit-rdkit
cpp
@@ -15,12 +15,17 @@ namespace storage { StorageClient::StorageClient(std::shared_ptr<folly::IOThreadPoolExecutor> threadPool) : ioThreadPool_(threadPool) { - client_ = std::make_unique<meta::MetaClient>(); - client_->init(); clientsMan_ = std::make_unique<thrift::ThriftClientManager<stor...
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 "storage/client/StorageClient.h" #define ID_HASH(id, numShards) \ ((static_cast<uint64_...
1
16,779
You could pass the MetaClient instance in ctor, and create a new instance if nullptr.
vesoft-inc-nebula
cpp
@@ -264,7 +264,11 @@ func subincludeTarget(s *scope, l core.BuildLabel) *core.BuildTarget { s.NAssert(s.contextPkg.Target(l.Name) == nil, "Target :%s is not defined in this package; it has to be defined before the subinclude() call", l.Name) } s.NAssert(l.IsAllTargets() || l.IsAllSubpackages(), "Can't pass :all ...
1
package asp import ( "encoding/json" "fmt" "io" "path" "reflect" "sort" "strconv" "strings" "github.com/manifoldco/promptui" "github.com/thought-machine/please/src/cli" "github.com/thought-machine/please/src/core" "github.com/thought-machine/please/src/fs" ) // A few sneaky globals for when we don't hav...
1
9,036
What does this do? Seems like a poor mans mutex/semaphore?
thought-machine-please
go
@@ -45,5 +45,5 @@ type ResponseWriter interface { // SetApplicationError specifies that this response contains an // application error. If called, this MUST be called before any invocation // of Write(). - SetApplicationError() + SetApplicationError(err error) }
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,263
This is a breaking change, and cannot be made. We have committed to this API for v1.
yarpc-yarpc-go
go
@@ -136,16 +136,14 @@ class StatementsAnalyzer extends SourceAnalyzer implements StatementsSource * Checks an array of statements for validity * * @param array<PhpParser\Node\Stmt> $stmts - * @param Context|null $global_context - * @param bool ...
1
<?php namespace Psalm\Internal\Analyzer; use PhpParser; use Psalm\Internal\Analyzer\Statements\Block\DoAnalyzer; use Psalm\Internal\Analyzer\Statements\Block\ForAnalyzer; use Psalm\Internal\Analyzer\Statements\Block\ForeachAnalyzer; use Psalm\Internal\Analyzer\Statements\Block\IfAnalyzer; use Psalm\Internal\Analyzer\S...
1
9,051
Can also drop corresponding types from docblock here
vimeo-psalm
php
@@ -105,7 +105,7 @@ public class RequestHandler implements Comparable<RequestHandler> { public void process() { switch (request.getRequestType()) { case START_SESSION: - log.info("Got a request to create a new session: " + log.finest("Got a request to create a new session: " ...
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,457
This change is unhelpful to users.
SeleniumHQ-selenium
py
@@ -59,6 +59,8 @@ public struct Vec3 : IFlatbufferObject } public static Offset<MyGame.Example.Vec3> Pack(FlatBufferBuilder builder, Vec3T _o) { if (_o == null) return default(Offset<MyGame.Example.Vec3>); + var _test3_a = _o.Test3.A; + var _test3_b = _o.Test3.B; return CreateVec3( builder,...
1
// <auto-generated> // automatically generated by the FlatBuffers compiler, do not modify // </auto-generated> namespace MyGame.Example { using global::System; using global::System.Collections.Generic; using global::FlatBuffers; public struct Vec3 : IFlatbufferObject { private Struct __p; public ByteBuffer Byte...
1
17,797
why is this variable introduced? Please stick `_o.Test3.A` directly in the call below.
google-flatbuffers
java
@@ -88,7 +88,7 @@ module.exports.app = (options = {}) => { app.get('/:providerName/logout', middlewares.hasSessionAndProvider, middlewares.gentleVerifyToken, controllers.logout) app.get('/:providerName/authorized', middlewares.hasSessionAndProvider, middlewares.gentleVerifyToken, controllers.authorized) app.ge...
1
const express = require('express') // @ts-ignore const Grant = require('grant-express') const grantConfig = require('./config/grant')() const providerManager = require('./server/provider') const controllers = require('./server/controllers') const s3 = require('./server/controllers/s3') const url = require('./server/con...
1
11,423
do you mind sharing what is the reason for this change?
transloadit-uppy
js
@@ -27,11 +27,11 @@ class ProposalsController < ApplicationController @pending_data = listing.pending @pending_review_data = listing.pending_review @completed_data = listing.completed.alter_query { |rel| rel.limit(@closed_proposal_limit) } - @canceled_data = listing.canceled + @canceled_data = list...
1
class ProposalsController < ApplicationController include TokenAuth skip_before_action :authenticate_user!, only: [:approve, :complete] skip_before_action :check_disabled_client, only: [:approve, :complete] # TODO use Policy for all actions before_action -> { authorize proposal }, only: [:show, :cancel, :can...
1
17,384
thoughts on putting `alter_query { |rel| rel.limit(@closed_proposal_limit) }` in a method that we can call here? That way we can have a test for this logic without needing a controller spec.
18F-C2
rb
@@ -31,7 +31,12 @@ module Api response.last_modified = node.timestamp if node.visible - render :xml => node.to_xml.to_s + @node = node + + # Render the result + respond_to do |format| + format.xml + end else head :gone end
1
# The NodeController is the RESTful interface to Node objects module Api class NodesController < ApiController require "xml/libxml" before_action :authorize, :only => [:create, :update, :delete] authorize_resource before_action :require_public_data, :only => [:create, :update, :delete] before_...
1
11,893
Perhaps `@node` throughout
openstreetmap-openstreetmap-website
rb
@@ -195,8 +195,14 @@ module Beaker @cmd_options[:validate] = bool end - opts.on '--collect-perf-data', 'Use sysstat on linux hosts to collect performance and load data' do - @cmd_options[:collect_perf_data] = true + opts.on '--collect-perf-data [MODE]', + ...
1
module Beaker module Options #An object that parses arguments in the format ['--option', 'value', '--option2', 'value2', '--switch'] class CommandLineParser # @example Create a CommanLineParser # a = CommandLineParser.new # # @note All of Beaker's supported command line options are ...
1
11,332
Shouldn't this default be 'normal' ?
voxpupuli-beaker
rb
@@ -131,7 +131,7 @@ class TelemetryEntry( namedtuple( "TelemetryEntry", "action client_time elapsed_time event_id instance_id pipeline_name_hash " - "num_pipelines_in_repo repo_hash python_version metadata version dagster_version os_desc os_platform", + "num_pipelines_in_repo num_sc...
1
"""As an open source project, we collect usage statistics to inform development priorities. For more information, check out the docs at https://docs.dagster.io/install#telemetry' To see the logs we send, inspect $DAGSTER_HOME/logs/ if $DAGSTER_HOME is set or ~/.dagster/logs/ See class TelemetryEntry for logged fields...
1
18,504
nit: type this
dagster-io-dagster
py
@@ -318,4 +318,11 @@ public interface DriverCommand { // Mobile API String GET_NETWORK_CONNECTION = "getNetworkConnection"; String SET_NETWORK_CONNECTION = "setNetworkConnection"; + + // Cast Media Router API + String GET_CAST_SINKS = "getCastSinks"; + String SET_CAST_SINK_TO_USE = "selectCastSink"; + Stri...
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,690
These command names are specific to Chromium-based browsers. Please move to `ChromiumDriverCommand`
SeleniumHQ-selenium
java
@@ -234,7 +234,8 @@ func CheckIfBDBelongsToNode(nodeName string) Validate { func (bd *BlockDevice) CheckIfBDBelongsToNode(nodeName string) error { if !bd.IsBelongToNode(nodeName) { return errors.Errorf( - "block device doesn't belongs to node %s", + "block device %s doesn't belongs to node %s", + bd.Object....
1
/* Copyright 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 or agreed to in writing, soft...
1
17,938
lets print nodeName that got passed also
openebs-maya
go
@@ -38,6 +38,9 @@ try: except NameError: pass +if sys.version > '3': + long = int + class WebElement(object): """Represents a DOM element.
1
#!/usr/bin/python # # 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 # "Li...
1
11,987
Should be `if sys.version_info[0] > 2:`
SeleniumHQ-selenium
java
@@ -1254,6 +1254,7 @@ int main(int argc, char *argv[]) random_init(); debug_config(argv[0]); + debug_config_file_size(string_metric_parse("0"));//to set debug file size to "don't delete anything" s = getenv("MAKEFLOW_BATCH_QUEUE_TYPE"); if(s) {
1
/* Copyright (C) 2008- The University of Notre Dame This software is distributed under the GNU General Public License. See the file COPYING for details. */ #include "auth_all.h" #include "auth_ticket.h" #include "batch_job.h" #include "cctools.h" #include "copy_stream.h" #include "create_dir.h" #include "debug.h" #inc...
1
13,805
Is there any need to pass this through `string_metric_parse`? I believe you can either create an off_t or just pass 0, with no need to added a string conversion into the mix.
cooperative-computing-lab-cctools
c
@@ -888,6 +888,17 @@ class WebDriver(BaseWebDriver): """ self.execute(Command.MINIMIZE_WINDOW) + def print_page(self, print_option_arg = None): + """ + Takes PDF of the current page. + The driver makes a best effort to return a PDF based on the provided parameters. + "...
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
18,340
Let's not use a form of hungarian notation in naming our variables
SeleniumHQ-selenium
rb
@@ -527,8 +527,13 @@ static void handle_incoming_request(struct st_h2o_http1_conn_t *conn) send_bad_request(conn, "line folding of header fields is not supported"); return; } + + H2O_PROBE_CONN(RECEIVE_REQUEST_HEADERS, &conn->super, conn->_req_index, &conn->req.input.method, &c...
1
/* * Copyright (c) 2014-2016 DeNA Co., Ltd., Kazuho Oku, Shota Fukumori, * Fastly, 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, in...
1
13,757
Seems like we are calling the probe twice?
h2o-h2o
c
@@ -13,7 +13,7 @@ import ( // LocalDevExecCmd allows users to execute arbitrary bash commands within a container. var LocalDevExecCmd = &cobra.Command{ - Use: "exec [app_name] [environment_name] '[cmd]'", + Use: "exec '[cmd]'", Short: "run a command in an app container.", Long: `Execs into container and ru...
1
package cmd import ( "fmt" "log" "path" "strings" "github.com/drud/ddev/pkg/plugins/platform" "github.com/drud/drud-go/utils/dockerutil" "github.com/spf13/cobra" ) // LocalDevExecCmd allows users to execute arbitrary bash commands within a container. var LocalDevExecCmd = &cobra.Command{ Use: "exec [app_na...
1
10,695
I think we'll want @rickmanelius (or somebody) to go through all the help and make it more accessible. Probably later in the cycle. But "Run a command in an app container" doesn't do it for me :)
drud-ddev
php
@@ -118,7 +118,7 @@ func CreateOrUpdateService(ctx context.Context, sclient clientv1.ServiceInterfac } } else { svc.ResourceVersion = service.ResourceVersion - svc.Spec.IPFamily = service.Spec.IPFamily + svc.Spec.IPFamilies = service.Spec.IPFamilies svc.SetOwnerReferences(mergeOwnerReferences(service.GetOw...
1
// Copyright 2016 The prometheus-operator Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable ...
1
15,455
Have not tested this yet, lets see if tests complain, but I suspect it should be as easy as this
prometheus-operator-prometheus-operator
go
@@ -42,6 +42,10 @@ SPARK_INDEX_NAME_FORMAT = "__index_level_{}__".format # A pattern to check if the name of a Spark column is a Koalas index name or not. SPARK_INDEX_NAME_PATTERN = re.compile(r"__index_level_[0-9]+__") +NATURAL_ORDER_COLUMN_NAME = '__natural_order__' + +HIDDEN_COLUMNS = set([NATURAL_ORDER_COLUMN_N...
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,596
no big deal but we don't we just use a list to keep the order? I don't think it's likely to have a duplicated columns if that was the concern.
databricks-koalas
py
@@ -1,5 +1,5 @@ /** - * core/modules data store + * Modules data store * * Site Kit by Google, Copyright 2020 Google LLC *
1
/** * core/modules data store * * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 *...
1
32,211
See above, same for all similar cases below.
google-site-kit-wp
js
@@ -34,6 +34,7 @@ const ContainerdConfigTemplate = ` {{- if .NodeConfig.AgentConfig.Snapshotter }} [plugins.cri.containerd] + disable_snapshot_annotations = true snapshotter = "{{ .NodeConfig.AgentConfig.Snapshotter }}" {{end}}
1
package templates import ( "bytes" "text/template" "github.com/rancher/k3s/pkg/daemons/config" ) type ContainerdConfig struct { NodeConfig *config.Node IsRunningInUserNS bool PrivateRegistryConfig *Registry } const ContainerdConfigTemplate = ` [plugins.opt] path = "{{ .NodeConfig.Containerd.O...
1
8,733
where is this coming from?
k3s-io-k3s
go
@@ -0,0 +1,11 @@ +class MoveScreencastsIntoProducts < ActiveRecord::Migration + def up + say_with_time "Converting screencasts into video_tutorials" do + update "UPDATE products SET type = 'VideoTutorial' WHERE type = 'Screencast'" + end + end + + def down + raise ActiveRecord::IrreversibleMigration + ...
1
1
11,605
We can also drop `plans.includes_screencasts`, right?
thoughtbot-upcase
rb
@@ -374,6 +374,11 @@ class ECPrivkey(ECPubkey): sigdecode = get_r_and_s_from_sig_string private_key = _MySigningKey.from_secret_exponent(self.secret_scalar, curve=SECP256k1) sig = private_key.sign_digest_deterministic(data, hashfunc=hashlib.sha256, sigencode=sigencode) + counter = ...
1
# -*- coding: utf-8 -*- # # Electrum - lightweight Bitcoin client # Copyright (C) 2018 The Electrum developers # # 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, # includi...
1
12,796
wouldn't `int.to_bytes(counter, 32, 'little')` be equivalent, clearer and faster?
spesmilo-electrum
py
@@ -60,6 +60,11 @@ func (a *API) CreatePayments(ctx context.Context, config CreatePaymentsParams) ( return CreatePayments(ctx, a, config) } +// ValidateStoragePaymentCondition validates that the given condition is a payment condition and has the right values +func (a *API) ValidateStoragePaymentCondition(ctx conte...
1
package porcelain import ( "context" "math/big" "time" "github.com/ipfs/go-cid" "github.com/libp2p/go-libp2p-core/peer" minerActor "github.com/filecoin-project/go-filecoin/actor/builtin/miner" "github.com/filecoin-project/go-filecoin/actor/builtin/paymentbroker" "github.com/filecoin-project/go-filecoin/addre...
1
20,755
I don't see why this is in porcelain since it's just a free function, with no dependency on plumbing or the `a` receiver. I think it should be moved to `protocol/storage`. It's exposed unnecessarily widely here.
filecoin-project-venus
go
@@ -130,6 +130,11 @@ def create_messages(data, entity: str, stats_range: str, from_ts: int, to_ts: in """ for entry in data: _dict = entry.asDict(recursive=True) + + # Clip the recordings to top 1000 so that we don't drop messages + if entity == "recordings": + _dict[entity] ...
1
import json from datetime import datetime from typing import Iterator, Optional from flask import current_app from pydantic import ValidationError from data.model.user_entity import UserEntityStatMessage from listenbrainz_spark.constants import LAST_FM_FOUNDING_YEAR from listenbrainz_spark.path import LISTENBRAINZ_DA...
1
16,665
Could we only do this for all time? Because that's what is causing problems rn?
metabrainz-listenbrainz-server
py
@@ -369,7 +369,7 @@ class _FlowType(_BaseFlowType): def parse(self, manager: "CommandManager", t: type, s: str) -> flow.Flow: try: - flows = manager.execute("view.flows.resolve %s" % (s)) + flows = manager.execute("view.flows.resolve '%s'" % (s)) except exceptions.CommandE...
1
import codecs import os import glob import re import typing from mitmproxy import exceptions from mitmproxy import flow from mitmproxy.utils import emoji, strutils if typing.TYPE_CHECKING: # pragma: no cover from mitmproxy.command import CommandManager class Path(str): pass class Cmd(str): pass cla...
1
15,992
This looks better than before, but we'll now likely run into issues with `'` characters in the spec. Maybe we can just use `manager.call_strings` instead?
mitmproxy-mitmproxy
py
@@ -131,6 +131,12 @@ public class SparkReadConf { .parse(); } + public Long splitSizeOption() { + return confParser.longConf() + .option(SparkReadOptions.SPLIT_SIZE) + .parseOptional(); + } + public long splitSize() { return confParser.longConf() .option(SparkReadOption...
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
44,833
Should this replace `splitSize` instead of adding a parallel call? The `SparkReadConf` is not yet released, so we can change it still.
apache-iceberg
java
@@ -71,7 +71,18 @@ class LocalFileSystem(FileSystem): return if parents: - os.makedirs(path) + # for Python 2 compatibility + try: + FileNotExistsError + except NameError: + FileNotExistsError = OSError + + ...
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
16,926
To reduce complexity, please use OSError on Python3 as well.
spotify-luigi
py
@@ -209,3 +209,10 @@ def follow_selected(tab_obj: apitypes.Tab, *, tab: bool = False) -> None: tab_obj.caret.follow_selected(tab=tab) except apitypes.WebTabError as e: raise cmdutils.CommandError(str(e)) + + +@cmdutils.register() +@cmdutils.argument('tab', value=cmdutils.Value.cur_tab) +def rever...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Softwa...
1
22,978
That seems wrong.
qutebrowser-qutebrowser
py
@@ -55,6 +55,7 @@ public class ConfirmEmailPage implements java.io.Serializable { if (confirmEmailData != null) { user = confirmEmailData.getAuthenticatedUser(); session.setUser(user); + session.configureSessionTimeout(); // TODO: is this needed here? (it ca...
1
package edu.harvard.iq.dataverse.confirmemail; import edu.harvard.iq.dataverse.DataverseSession; import edu.harvard.iq.dataverse.actionlogging.ActionLogServiceBean; import edu.harvard.iq.dataverse.authorization.users.AuthenticatedUser; import edu.harvard.iq.dataverse.util.BundleUtil; import edu.harvard.iq.dataverse.ut...
1
40,322
Yes, this is needed here. This is a builtin user who just reset their password.
IQSS-dataverse
java
@@ -396,13 +396,12 @@ class HDF5PackageStore(PackageStore): """ self._find_path_write() buildfile = name.lstrip('/').replace('/', '.') - storepath = os.path.join(self._pkg_dir, buildfile) + storepath = self._object_path('.' + buildfile) with pd.HDFStore(storepath, mode=...
1
""" Build: parse and add user-supplied files to store """ import json import os import re from shutil import copyfile import tempfile import zlib import pandas as pd import requests try: import fastparquet except ImportError: fastparquet = None try: from pyspark.sql import SparkSession except ImportError...
1
14,910
This seems to move the storage of temporary files to the CWD. Is that right? I don't think we should do that. If the process gets interrupted, we should try our best to clean up, but if even that fails, it'd be nice if the mess was left in a different directory. Maybe we should have a directory explicitly for builds?
quiltdata-quilt
py
@@ -67,6 +67,10 @@ type Config struct { // If not set, it uses all versions available. // Warning: This API should not be considered stable and will change soon. Versions []protocol.VersionNumber + // Ask the server to truncate the connection ID sent in the Public Header. + // This saves 8 bytes in the Public Hea...
1
package quic import ( "crypto/tls" "io" "net" "github.com/lucas-clemente/quic-go/protocol" ) // Stream is the interface implemented by QUIC streams type Stream interface { io.Reader io.Writer io.Closer StreamID() protocol.StreamID // Reset closes the stream with an error. Reset(error) } // A Session is a ...
1
6,071
Please explain why a user would enable this (space savings), and the requirements for this option to be safe.
lucas-clemente-quic-go
go
@@ -43,12 +43,16 @@ export default function ContainerSelect( { value, ...props } ) { - const accounts = useSelect( ( select ) => select( STORE_NAME ).getAccounts() ); + const { accounts, hasResolvedAccounts } = useSelect( ( select ) => ( { + accounts: select( STORE_NAME ).getAccounts(), + hasResolvedAccounts: se...
1
/** * Container Select component. * * Site Kit by Google, Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2....
1
32,640
I think the `undefined` checks still need to be removed from here.
google-site-kit-wp
js
@@ -158,6 +158,13 @@ class KubernetesJobTask(luigi.Task): """ return self.kubernetes_config.max_retrials + @property + def backoff_limit(self): + """ + Maximum number of retries before considering the job as failed. + """ + return 6 + @property def delete_...
1
# -*- coding: utf-8 -*- # # Copyright 2015 Outlier Bio, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
1
17,845
Is there any particular reason to have 6?
spotify-luigi
py
@@ -122,8 +122,11 @@ func (s *Space) biggestFreeRange(r address.Range) (biggest address.Range) { biggestSize := address.Count(0) s.walkFree(r, func(chunk address.Range) bool { if size := chunk.Size(); size >= biggestSize { - biggest = chunk - biggestSize = size + chunk = chunk.BiggestPow2AlignedRange() + ...
1
package space import ( "bytes" "fmt" "sort" "github.com/weaveworks/weave/common" "github.com/weaveworks/weave/net/address" ) type Space struct { // ours and free represent a set of addresses as a sorted // sequences of ranges. Even elements give the inclusive // starting points of ranges, and odd elements g...
1
13,136
The biggest chunk does not guarantee that it contains the biggest CIDR-aligned range. If we don't care too much about a few CPU cycles being wasted, then I'd suggest to merge the if-statements.
weaveworks-weave
go
@@ -81,6 +81,16 @@ func (i *IncludeWorkflow) populate(ctx context.Context, s *Step) dErr { } substitute(reflect.ValueOf(i.Workflow).Elem(), strings.NewReplacer(replacements...)) + // We do this here, and not in validate, as embedded startup scripts could + // have what we think are daisy variables. + if err := i....
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
7,103
instead of doing the if err := __; err != nil { return err } thing, you can do errs = addErrs(errs, ___). If you want.
GoogleCloudPlatform-compute-image-tools
go
@@ -4,8 +4,15 @@ package cli import ( + "errors" + "fmt" + "github.com/aws/amazon-ecs-cli-v2/internal/pkg/archer" + "github.com/aws/amazon-ecs-cli-v2/internal/pkg/store" "github.com/aws/amazon-ecs-cli-v2/internal/pkg/store/ssm" + "github.com/aws/amazon-ecs-cli-v2/internal/pkg/term/color" + "github.com/aws/amazo...
1
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli import ( "github.com/aws/amazon-ecs-cli-v2/internal/pkg/archer" "github.com/aws/amazon-ecs-cli-v2/internal/pkg/store/ssm" "github.com/aws/amazon-ecs-cli-v2/internal/pkg/workspace" "github....
1
10,632
nit: Is this error message accurate?
aws-copilot-cli
go
@@ -4269,7 +4269,7 @@ import_one_object_direct (OstreeRepo *dest_repo, G_IN_SET (src_repo->mode, OSTREE_REPO_MODE_BARE, OSTREE_REPO_MODE_BARE_USER); if (src_is_bare_or_bare_user && !OSTREE_OBJECT_TYPE_IS_META(objtype)) { - if (src_repo == OSTREE_REPO_MODE_BARE) + if (src_re...
1
/* * Copyright (C) 2011,2013 Colin Walters <walters@verbum.org> * * SPDX-License-Identifier: LGPL-2.0+ * * 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 ...
1
16,371
Ouch! :man_facepalming: And of course, this worked for me because that evaluated to false when I was testing the bare-user path.
ostreedev-ostree
c
@@ -380,7 +380,10 @@ func (c *FCGIClient) Request(p map[string]string, req io.Reader) (resp *http.Res if err != nil { return } - resp.Status = statusParts[1] + if (len(statusParts) > 0) { + resp.Status = statusParts[1] + } + } else { resp.StatusCode = http.StatusOK }
1
// Forked Jan. 2015 from http://bitbucket.org/PinIdea/fcgi_client // (which is forked from https://code.google.com/p/go-fastcgi-client/) // This fork contains several fixes and improvements by Matt Holt and // other contributors to this project. // Copyright 2012 Junqing Tan <ivan@mysqlab.net> and The Go Authors // U...
1
6,971
Parentheses aren't needed here. `if len(statusParts) > 0 {` will suffice.
caddyserver-caddy
go
@@ -44,9 +44,10 @@ const serverName = "yarpc-test" // TT is the gauntlets table test struct type TT struct { - Service string // thrift service name; defaults to ThriftTest - Function string // name of the Go function on the client - Oneway bool // if the function is a oneway function + Service string ...
1
// Copyright (c) 2017 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
13,167
// the test is skipped on given servers because it will fail.
yarpc-yarpc-go
go
@@ -220,8 +220,7 @@ describe 'OrganizationsController' do it 'should return unauthorized if api key is invalid' do get :index, format: :xml, api_key: 'dummy_id' - - must_respond_with :unauthorized + must_respond_with :bad_request end end
1
require 'test_helper' require 'test_helpers/xml_parsing_helpers' describe 'OrganizationsController' do let(:account) { create(:account) } let(:organization) { create(:organization) } before do @proj1 = create(:project) @proj2 = create(:project) @proj3 = create(:project) @organization = @proj1.or...
1
8,985
The name of the test should be updated to "it 'should return bad_request if api key is invalid"
blackducksoftware-ohloh-ui
rb
@@ -806,6 +806,12 @@ class _HyperSearchRunner(object): # pull out best Model from jobs table jobInfo = _clientJobsDB().jobInfo(hyperSearchJob.getJobID()) + + # Try to return a decent error message if the job was cancelled for some + # reason. + if jobInfo.cancel is 1: + raise Exception(jobInfo...
1
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
1
15,192
Use `==` in this case instead of `is`.
numenta-nupic
py
@@ -53,6 +53,7 @@ type CStorPoolAttr struct { OverProvisioning bool `json:"overProvisioning"` //true or false } +// CStorPoolPhase is a CStorPool phase. type CStorPoolPhase string // Status written onto CStorPool and CStorVolumeReplica objects.
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, sof...
1
9,930
Please put it like this: `CStorPoolPhase is a typed string for phase field of CStorPool`
openebs-maya
go