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
@@ -5,9 +5,9 @@ import sys # Simple python version test major,minor = sys.version_info[:2] py_version = sys.version.split()[0] -if major != 2 or minor < 5: +if major != 2 or minor < 6: # SystemExit defaults to returning 1 when printing a string to stderr - raise SystemExit("You are using python %s, but version 2...
1
#!/usr/bin/env python import sys # Simple python version test major,minor = sys.version_info[:2] py_version = sys.version.split()[0] if major != 2 or minor < 5: # SystemExit defaults to returning 1 when printing a string to stderr raise SystemExit("You are using python %s, but version 2.5 or greater is required" ...
1
9,054
Is this meant to be "2.7" or "2.6". The two lines in this commit don't agree with one another. Looks like everything else in this PR is "2.6" and that seems sensible.
graphite-project-graphite-web
py
@@ -21,8 +21,8 @@ # ---------------------------------------------------------------------- import unittest -from nupic.data.pattern_machine import (PatternMachine, - ConsecutivePatternMachine) +from nupic.data.generators.pattern_machine import (PatternMachine, + ...
1
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
1
17,488
Should we put these tests in a `generators` directory?
numenta-nupic
py
@@ -356,8 +356,8 @@ struct greater_equal_op { struct and_op { inline DataType operator()(const DataType& x1, const DataType& x2) const { - const bool b1 = x1 != zero && !std::isnan(x1); - const bool b2 = x2 != zero && !std::isnan(x2); + const auto& b1 = x1 >= DataType(0.5); + ...
1
//////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2014-2016, Lawrence Livermore National Security, LLC. // Produced at the Lawrence Livermore National Laboratory. // Written by the LBANN Research Team (B. Van Essen, et al.) listed in // the CONTRIBUTORS file. <lbann-dev@l...
1
13,266
I think that it makes more sense to keep these with the standard definition of non-zero is true and zero is false.
LLNL-lbann
cpp
@@ -34,9 +34,9 @@ class DummyRequest(mock.MagicMock): self.authn_type = 'basicauth' self.prefixed_userid = 'basicauth:bob' self.effective_principals = [ - self.prefixed_userid, 'system.Everyone', - 'system.Authenticated'] + 'system.Authenticated',...
1
import os import threading import unittest from collections import defaultdict import mock import webtest from cornice import errors as cornice_errors from enum import Enum from pyramid.url import parse_url_overrides from kinto.core import DEFAULT_SETTINGS from kinto.core import statsd from kinto.core.storage import ...
1
10,249
Any idea why you want to change the behavior here? Is there a security risk not to have the prefix in the principal here.
Kinto-kinto
py
@@ -47,6 +47,7 @@ type ConfigMock struct { mockMdcache *MockMDCache mockKcache *MockKeyCache mockBcache *MockBlockCache + mockDBcache *MockDirtyBlockCache mockCrypto *MockCrypto mockCodec *MockCodec mockMdops *MockMDOps
1
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libkbfs import ( "time" "github.com/golang/mock/gomock" "github.com/keybase/client/go/logger" "golang.org/x/net/context" ) type FakeObserver struct { loc...
1
11,333
this reads like "mock database cache", maybe a clearer name
keybase-kbfs
go
@@ -26,6 +26,8 @@ import ( "net/http" "time" + "github.com/jetstack/cert-manager/pkg/webhook/server/util" + logf "github.com/jetstack/cert-manager/pkg/logs" "github.com/go-logr/logr"
1
/* Copyright 2019 The Jetstack cert-manager contributors. 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
23,008
Nit: move this with the other CM imports.
jetstack-cert-manager
go
@@ -2,9 +2,10 @@ namespace Shopsys\ShopBundle\Controller\Front; +use League\Flysystem\FilesystemInterface; use Shopsys\FrameworkBundle\Component\Image\Config\ImageConfig; use Shopsys\FrameworkBundle\Component\Image\Processing\ImageGeneratorFacade; -use Symfony\Component\HttpFoundation\BinaryFileResponse; +use Sy...
1
<?php namespace Shopsys\ShopBundle\Controller\Front; use Shopsys\FrameworkBundle\Component\Image\Config\ImageConfig; use Shopsys\FrameworkBundle\Component\Image\Processing\ImageGeneratorFacade; use Symfony\Component\HttpFoundation\BinaryFileResponse; class ImageController extends FrontBaseController { /** *...
1
10,795
This change should be mentioned in the CM
shopsys-shopsys
php
@@ -23,6 +23,13 @@ namespace Datadog.Trace HttpHeaderNames.DatadogTags, }; + /// <summary> + /// An <see cref="ISpanContext"/> with default values. Can be used as the value for + /// <see cref="SpanCreationSettings.Parent"/> in <see cref="Tracer.StartActive(string, SpanCreat...
1
// <copyright file="SpanContext.cs" company="Datadog"> // Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // </copyright> using System.Collections; ...
1
26,177
Do we really want a new type, or can we just use `SpanContext`? The `ISpanContext` interface is read-only, but there's nothing stopping users from casting this to `SpanContext` and modifying it.
DataDog-dd-trace-dotnet
.cs
@@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // </copyright> -#if NET461 +#if NET452 || NET461 using System; using System.Collections; using System.Collections.Generic;
1
// <copyright file="HttpWebRequestActivitySource.net461.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 // // ...
1
14,231
Should we define a const like NETFRAMEWORK or NETFULL which will be set for NET452 NET461 and anything like NET47 etc in future?
open-telemetry-opentelemetry-dotnet
.cs
@@ -36,6 +36,12 @@ const PoStProofLength = 192 // https://github.com/filecoin-project/go-filecoin/issues/966 var ProvingPeriodBlocks = types.NewBlockHeight(20000) +// GracePeriodBlocks is the number of blocks after a proving period over +// which a miner can still submit a post at a penalty. +// TODO: what is a sec...
1
package miner import ( "math/big" "os" "strconv" "gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid" cbor "gx/ipfs/QmRoARq3nkUb13HSKZGepCZSWe5GrVPwx7xURJGZ7KWv9V/go-ipld-cbor" xerrors "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFo...
1
16,237
maybe start an issue to capture params that we need final values for and link to it here?
filecoin-project-venus
go
@@ -288,6 +288,8 @@ class _RunData(object): alternate_services = set() direct_access_sources = set() for backend in backend_service.backends: + if not backend.get('group'): + continue instance_group = self.find_instance_group_by_url( bac...
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,822
Can we instead do the check in find_instance_group_by_url() ? if we return None when group is not found, it will hit the next if statement (if not instance_group) and continue as expected, in this case we don't need to add 3 separate if statements
forseti-security-forseti-security
py
@@ -85,15 +85,15 @@ public class DateUtil { } public static int toSeconds(String hh_colon_mm) { - Pattern p = Pattern.compile("(\\d+):(\\d+)( a.m.| p.m.|)"); + Pattern p = Pattern.compile("(\\d+):(\\d+)( a.m.| p.m.| AM | PM)"); Matcher m = p.matcher(hh_colon_mm); int retval =...
1
package info.nightscout.utils; import android.text.format.DateUtils; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.TimeZone; import java.util.regex.Matcher; import ...
1
29,576
on my android ".a.m" and ".p.m" is used add `||` here to support both variants
MilosKozak-AndroidAPS
java
@@ -4647,7 +4647,7 @@ bool CoreChecks::PreCallValidateCreateImageView(VkDevice device, const VkImageVi skip |= LogError(pCreateInfo->image, "VUID-VkImageViewCreateInfo-image-01586", "%s", ss.str().c_str()); } } else { - if ((!(image_flags & VK_IMAGE_CREA...
1
/* Copyright (c) 2015-2020 The Khronos Group Inc. * Copyright (c) 2015-2020 Valve Corporation * Copyright (c) 2015-2020 LunarG, Inc. * Copyright (C) 2015-2020 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
14,377
`!FormatIsMultiplane(image_format)` will always be true at this point due to the test on line 4639.
KhronosGroup-Vulkan-ValidationLayers
cpp
@@ -24,6 +24,7 @@ from typing import Any, Optional, List, Union import numpy as np import pandas as pd +from pandas.core.accessor import CachedAccessor from pyspark import sql as spark from pyspark.sql import functions as F
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
9,787
Maybe inline the CachedAccessor code? Is it similar to our lazy property? If yes, can we reconcile the two?
databricks-koalas
py
@@ -34,7 +34,7 @@ func (c SmokeTestCase) BuildInputShape(ref *ShapeRef) string { ) } -// AttachSmokeTests attaches the smoke test cases to the API model. + // AttachSmokeTests attaches the smoke test cases to the API model. func (a *API) AttachSmokeTests(filename string) { f, err := os.Open(filename) if err !...
1
// +build codegen package api import ( "bytes" "encoding/json" "fmt" "os" "text/template" ) // SmokeTestSuite defines the test suite for smoke tests. type SmokeTestSuite struct { Version int `json:"version"` DefaultRegion string `json:"defaultRegion"` TestCases []SmokeTestCase ...
1
9,802
Nit this file has unintended changes.
aws-aws-sdk-go
go
@@ -101,6 +101,8 @@ public class FeedItemMenuHandler { mi.setItemVisibility(R.id.share_download_url_with_position_item, false); } + mi.setItemVisibility(R.id.share_file, selectedItem.getMedia().fileExists()); + if (selectedItem.isPlayed()) { mi.setItemVisibility(R.id...
1
package de.danoeh.antennapod.menuhandler; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.support.annotation.Nullable; import android.util.Log; import android.widget.Toast; import de.danoeh.antennapod.R; import de.danoeh.antennapod.core.feed.FeedItem; import de.da...
1
13,518
Potential NPE? `hasMedia && selectedItem...`
AntennaPod-AntennaPod
java
@@ -1662,7 +1662,7 @@ class EC2Connection(AWSQueryConnection): params['AutoEnableIO.Value'] = new_value return self.get_status('ModifyVolumeAttribute', params, verb='POST') - def create_volume(self, size, zone, snapshot=None, + def create_volume(self, size, zone = None, snapshot=None, ...
1
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files ...
1
8,934
PEP-8/consistency with the rest of the code.
boto-boto
py
@@ -0,0 +1,15 @@ +using Datadog.Trace.ClrProfiler.Integrations; + +namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.MongoDb +{ + internal abstract class MongoDbInstrumentMethodAttribute : InstrumentMethodAttribute + { + protected MongoDbInstrumentMethodAttribute(string typeName) + { + ...
1
1
19,136
nit: Would you mind moving the `ParameterTypeNames` assignment into each of the method-specific attributes? That could reduce confusion if we later decided to instrument other methods in MongoDb
DataDog-dd-trace-dotnet
.cs
@@ -0,0 +1,16 @@ +using System.Collections.Generic; +using Nethermind.Blockchain.Find; +using Nethermind.Core; +using Nethermind.Core.Specs; +using Nethermind.Int256; + +namespace Nethermind.JsonRpc.Modules.Eth +{ + public interface IGasPriceOracle + { + public ISpecProvider SpecProvider { get; } + ...
1
1
25,649
Is exposing SpecProvider needed here?
NethermindEth-nethermind
.cs
@@ -141,6 +141,18 @@ namespace MvvmCross.ViewModels } } + [NotifyPropertyChangedInvocator] + protected virtual bool SetProperty<T>(ref T storage, T value, Action afterAction, [CallerMemberName] string propertyName = null) + { + if (!SetProperty(ref storage, value,...
1
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MS-PL license. // See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq.Expressions; using...
1
14,789
So this will only be executed when it is true. I'm not sure that makes it always usable. Why not make the afterAction, `Action<bool>` and always call it, with the result as parameter.
MvvmCross-MvvmCross
.cs
@@ -516,6 +516,7 @@ int pfs_table::resolve_name(int is_special_syscall, const char *cname, struct pf char tmp[PFS_PATH_MAX]; path_split(pname->path,pname->service_name,tmp); pname->service = pfs_service_lookup(pname->service_name); + if (result == PFS_RESOLVE_LOCAL) pname->service = NULL; if(!pname->servic...
1
/* Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin Copyright (C) 2005- The University of Notre Dame This software is distributed under the GNU General Public License. See the file COPYING for details. */ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include "pfs_search.h" #include "pfs_table.h...
1
14,635
Tim, please add { } to this 'if'.
cooperative-computing-lab-cctools
c
@@ -11,8 +11,11 @@ import ( ) const ( - // DefaultPort is used when no port is specified + // DefaultPort is used when no port is specified. DefaultPort = "31000" + + // DefaultHost is the host that will be used when none is specified. + DefaultHost = "127.0.0.1" ) // Reporter will gather metrics of API reque...
1
package csm import ( "encoding/json" "net" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" ) const ( // DefaultPort is used when no port is specified DefaultPort = "31000" ) // Reporter will gather metrics of API requests made and // send...
1
9,765
Suggest moving to `enable.go` since thats only place used.
aws-aws-sdk-go
go
@@ -54,7 +54,7 @@ describe "apply" do # Includes agent facts from apply_prep agent_facts = report['resource_statuses']['Notify[agent facts]']['events'][0]['desired_value'].split("\n") - expect(agent_facts[0]).to match(/^\w+\./) + expect(agent_facts[0]).to match(/^\w+/) expect(...
1
# frozen_string_literal: true require 'spec_helper' require 'bolt_spec/conn' require 'bolt_spec/files' require 'bolt_spec/integration' require 'bolt_spec/run' describe "apply" do include BoltSpec::Conn include BoltSpec::Files include BoltSpec::Integration include BoltSpec::Run let(:modulepath) { File.join(...
1
9,713
This changed when I rebuilt my docker container. Not quite sure why, but might have to do with what my host network configuration looks like when it's rebuilt.
puppetlabs-bolt
rb
@@ -13,6 +13,7 @@ import ( "github.com/restic/restic/server" ) +// Cache is used to handle the local cache. type Cache struct { base string }
1
package restic import ( "errors" "fmt" "io" "os" "path/filepath" "strings" "github.com/restic/restic/backend" "github.com/restic/restic/debug" "github.com/restic/restic/server" ) type Cache struct { base string } func NewCache(be backend.Identifier) (*Cache, error) { cacheDir, err := getCacheDir() if er...
1
6,450
Local cache of what? What's stored in it?
restic-restic
go
@@ -176,7 +176,7 @@ public class DataFiles { this.keyMetadata = toCopy.keyMetadata() == null ? null : ByteBuffers.copy(toCopy.keyMetadata()); this.splitOffsets = toCopy.splitOffsets() == null ? null : copyList(toCopy.splitOffsets()); - this.sortOrderId = toCopy.sortOrderId(); + this.s...
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
39,517
If the copied `DataFile` returns null, shouldn't the copy also return null? Why not make the builder use `Integer` instead of a primitive here?
apache-iceberg
java
@@ -2,11 +2,18 @@ import os from jinja2 import Environment, FileSystemLoader +HTML_FILES_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'html_files') + def save_html(filename, context, template): path = os.path.dirname(os.path.abspath(__file__)) template_environment = Environment( ...
1
import os from jinja2 import Environment, FileSystemLoader def save_html(filename, context, template): path = os.path.dirname(os.path.abspath(__file__)) template_environment = Environment( loader=FileSystemLoader(os.path.join(path, 'templates'))) outputfile = os.path.join(os.path.dirname(os.path.abspa...
1
16,714
You could just do this test in the `save_html` function above, and then the users of the save html function don't have to worry about it.
metabrainz-listenbrainz-server
py
@@ -214,7 +214,7 @@ func TestTaskRunOpts_Validate(t *testing.T) { Name: "my-app", }, nil) }, - wantedError: errors.New("get environment: couldn't find environment dev in the application my-app"), + wantedError: fmt.Errorf("get environment %s config: couldn't find environment dev in the application my...
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli import ( "errors" "fmt" "github.com/aws/copilot-cli/internal/pkg/deploy" termprogress "github.com/aws/copilot-cli/internal/pkg/term/progress" "testing" "github.com/aws/copilot-cli/internal/p...
1
14,279
I think I'd prefer not using the formatted string when it comes to unit test, since we don't pass in any string variable as params.
aws-copilot-cli
go
@@ -1,4 +1,4 @@ -// +build avr esp nrf sam sifive stm32 k210 nxp +// +build avr esp nrf sam sifive stm32 k210 nxp,!mimxrt1062 package machine
1
// +build avr esp nrf sam sifive stm32 k210 nxp package machine import "errors" var errUARTBufferEmpty = errors.New("UART buffer empty") type UARTConfig struct { BaudRate uint32 TX Pin RX Pin } // To implement the UART interface for a board, you must declare a concrete type as follows: // // type ...
1
10,873
Maybe it would be better to explicitly include devices instead of explicitly excluding devices?
tinygo-org-tinygo
go
@@ -475,10 +475,10 @@ void ROMol::clearComputedProps(bool includeRings) const { RDProps::clearComputedProps(); - for (ConstAtomIterator atomIt = this->beginAtoms(); - atomIt != this->endAtoms(); ++atomIt) { - (*atomIt)->clearComputedProps(); + for (auto atom: atoms()) { + atom->clearComputedProps()...
1
// // Copyright (C) 2003-2015 Greg Landrum and Rational Discovery LLC // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include <iostream>...
1
17,910
This could be `for (auto bond: bonds()){`, right?
rdkit-rdkit
cpp
@@ -78,10 +78,13 @@ class LibraryCardsController extends AbstractBase // Connect to the ILS for login drivers: $catalog = $this->getILS(); + $config = $this->getConfig(); return $this->createViewModel( [ 'libraryCards' => $user->getLibraryCards(), - ...
1
<?php /** * LibraryCards Controller * * PHP version 7 * * Copyright (C) Villanova University 2010. * Copyright (C) The National Library of Finland 2015-2019. * * 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 publishe...
1
30,739
Is $config no longer being used? Can we remove this line?
vufind-org-vufind
php
@@ -179,7 +179,7 @@ char* get_file_name(char* filename) // finished with it. // If you pass in NULL or the new string can't be allocated, // it returns NULL. -char* remove_ext(const char* path, char dot, char sep, size_t* allocated_size) +char* remove_ext(const char* path, char dot, char sep, size_t* allocated_...
1
#include <platform.h> #include "../../libponyrt/mem/pool.h" #include <string.h> #include <stdio.h> #if defined(PLATFORM_IS_LINUX) #include <unistd.h> #elif defined(PLATFORM_IS_MACOSX) #include <mach-o/dyld.h> #elif defined(PLATFORM_IS_BSD) #include <unistd.h> #include <sys/types.h> #include <sys/sysctl.h> #include <sy...
1
13,819
can you revert changes to this file.
ponylang-ponyc
c
@@ -2139,7 +2139,7 @@ public class DBService { Role templateRole = updateTemplateRole(role, domainName, roleName, templateParams); firstEntry = auditLogSeparator(auditDetails, firstEntry); auditDetails.append(" \"add-role\": "); - if (!processRole(con, o...
1
/* * Copyright 2016 Yahoo 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
4,704
I don't believe the change is sufficient to correctly handle variable substitutions in the name. As part of the process command we pass the original role object that was retreived without taking into account the substitution. So while the first template apply command will work fine because the original role does not ex...
AthenZ-athenz
java
@@ -14,5 +14,6 @@ namespace MvvmCross.Base { Task ExecuteOnMainThreadAsync(Action action, bool maskExceptions = true); Task ExecuteOnMainThreadAsync(Func<Task> action, bool maskExceptions = true); + bool IsOnMainThread { get; } } }
1
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MS-PL license. // See the LICENSE file in the project root for more information. using System; using System.Threading.Tasks; namespace MvvmCross.Base { // Note: The long term goal should be...
1
14,318
Please add this to IMvxMainThreadDispatcher as well
MvvmCross-MvvmCross
.cs
@@ -223,7 +223,7 @@ module Bolt if @future to_expand = %w[private-key cacert token-file] & selected.keys to_expand.each do |opt| - selected[opt] = File.expand_path(selected[opt], @boltdir.path) if opt.is_a?(String) + selected[opt] = File.expand_path(selecte...
1
# frozen_string_literal: true require 'etc' require 'logging' require 'pathname' require 'bolt/boltdir' require 'bolt/transport/ssh' require 'bolt/transport/winrm' require 'bolt/transport/orch' require 'bolt/transport/local' require 'bolt/transport/local_windows' require 'bolt/transport/docker' require 'bolt/transport...
1
13,556
Is it possible for opt not to be a string? I couldn't tell if this was a typo or if there is actually a case where it is not a string.
puppetlabs-bolt
rb
@@ -54,6 +54,7 @@ export default function UserInputSettings() { ctaLabel={ __( 'Let’s go', 'google-site-kit' ) } dismiss={ __( 'Remind me later', 'google-site-kit' ) } winImage={ global._googlesitekitLegacyData.admin.assetsRoot + personSitImage } + className="googlesitekit-user-input__notification" /> ...
1
/** * UserInputSettings component. * * Site Kit by Google, Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2...
1
34,061
Let's move this up next to the `id` as we usually have `className` as one of the first props.
google-site-kit-wp
js
@@ -4,14 +4,14 @@ import sys from setuptools import setup, find_packages from setuptools.command.install import install -VERSION = "3.1.0" +VERSION = "3.1.1" def readme(): readme_short = """ Quilt is a data management tool designed for data discoverability, data dependency management, and data ver...
1
import os import sys from setuptools import setup, find_packages from setuptools.command.install import install VERSION = "3.1.0" def readme(): readme_short = """ Quilt is a data management tool designed for data discoverability, data dependency management, and data version control using `data packages <...
1
17,815
While you're in here, "build, push and install"?
quiltdata-quilt
py
@@ -35,8 +35,6 @@ namespace OpenTelemetry.Metrics public string Description { get; set; } - public string Unit { get; set; } - public string[] TagKeys { get; set; } public virtual Aggregation Aggregation { get; set; }
1
// <copyright file="MetricStreamConfiguration.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://...
1
21,749
Unit never made it to spec...so removing.
open-telemetry-opentelemetry-dotnet
.cs
@@ -702,6 +702,9 @@ func (nl *NATSLatency) TotalTime() time.Duration { // ServiceLatency is the JSON message sent out in response to latency tracking for // exported services. type ServiceLatency struct { + Type string `json:"type"` + ID string `json:"id"` + Time string ...
1
// Copyright 2018-2020 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
1
10,305
We have RequestStart which seems redundant a bit to this one, WDYT?
nats-io-nats-server
go
@@ -1,10 +1,4 @@ -import { - Component, - createElement, - _unmount as unmount, - options, - cloneElement -} from 'preact'; +import { Component, createElement, options, Fragment } from 'preact'; import { removeNode } from '../../src/util'; const oldCatchError = options._catchError;
1
import { Component, createElement, _unmount as unmount, options, cloneElement } from 'preact'; import { removeNode } from '../../src/util'; const oldCatchError = options._catchError; options._catchError = function(error, newVNode, oldVNode) { if (error.then && oldVNode) { /** @type {import('./internal').Compon...
1
14,655
I think we can remove this corresponding export from `preact` now! Double check no other s using though lol
preactjs-preact
js
@@ -78,6 +78,14 @@ ActiveRecord::Schema.define(version: 20140604204910) do t.datetime "updated_at" end + create_table "item_traits", force: true do |t| + t.text "name" + t.text "value" + t.integer "cart_item_id" + t.datetime "created_at" + t.datetime "updated_at" + end + create_ta...
1
# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative sou...
1
11,849
I'm not sure why this would be in here. Were you working off a branch based off of master? These lines were removed in a previous commit because the table is actually called 'cart_item_traits'.
18F-C2
rb
@@ -30,6 +30,8 @@ module Travis bundler: false } + DEFAULT_GITHUB_ENDPOINT = "https://api.github.com" + attr_reader :data def initialize(data, defaults = {})
1
require 'core_ext/hash/deep_merge' require 'core_ext/hash/deep_symbolize_keys' # actually, the worker payload can be cleaned up a lot ... module Travis module Build class Data autoload :Env, 'travis/build/data/env' autoload :Var, 'travis/build/data/var' DEFAULTS = { timeouts: { ...
1
10,970
Maybe `DEFAULT_GITHUB_API_ENDPOINT` would be a better name, since we refer to this as an API endpoint elsewhere?
travis-ci-travis-build
rb
@@ -45,7 +45,9 @@ const ( capabilityPrefix = "com.amazonaws.ecs.capability." capabilityTaskIAMRole = "task-iam-role" capabilityTaskIAMRoleNetHost = "task-iam-role-network-host" + capabilityTaskCPUMemLimit = "task-cpu-mem-limit" labelPrefix = "com.amazonaws.ecs." + attribut...
1
// Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license...
1
16,983
If/when you rebase from `dev`, this is going to cause a merge conflict. I'd suggest that soon after merging this PR as the capabilities code has been moved to "agent/app/agent_capabilities.go"
aws-amazon-ecs-agent
go
@@ -40,6 +40,14 @@ func Test_Start(t *testing.T) { assert.Equal(t, "bytecount 1", mockConnection.LastLine) } +func Test_Stop(t *testing.T) { + statsRecorder := fakeStatsRecorder{} + middleware := NewMiddleware(statsRecorder.record, 1*time.Second) + mockConnection := &management.MockConnection{} + middleware.Stop(m...
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
11,731
What is the test case here?
mysteriumnetwork-node
go
@@ -130,6 +130,7 @@ func run(o *Options) error { go flowAggregator.Run(stopCh, &wg) informerFactory.Start(stopCh) + informerFactory.WaitForCacheSync(stopCh) <-stopCh klog.Infof("Stopping flow aggregator")
1
// Copyright 2020 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
1
46,816
You could try moving this closer to the call, where we request label info. We might be doing the check very early.. all the resources may not be present with the informer at this point.
antrea-io-antrea
go
@@ -42,7 +42,10 @@ public interface ManifestFile { required(509, "contains_null", Types.BooleanType.get()), optional(510, "lower_bound", Types.BinaryType.get()), // null if no non-null values optional(511, "upper_bound", Types.BinaryType.get()) - )))); + ))), + optional(5...
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
17,537
Can we add these up by the data files counts?
apache-iceberg
java
@@ -30,10 +30,8 @@ const resolve = (list, child, node) => { // callbacks won't get queued in the node anyway. // If revealOrder is 'together' then also do an early exit // if all suspended descendants have not yet been resolved. - if ( - !list.props.revealOrder || - (list.props.revealOrder[0] === 't' && list._m...
1
import { Component, toChildArray } from 'preact'; import { suspended } from './suspense.js'; // Indexes to linked list nodes (nodes are stored as arrays to save bytes). const SUSPENDED_COUNT = 0; const RESOLVED_COUNT = 1; const NEXT_NODE = 2; // Having custom inheritance instead of a class here saves a lot of bytes. ...
1
15,165
Most of the time assigning won't save bytes unless used 3+ times (var adds 3bytes)
preactjs-preact
js
@@ -160,8 +160,8 @@ define(['playbackManager', 'nowPlayingHelper', 'events', 'connectionManager'], f if (navigator.mediaSession) { navigator.mediaSession.metadata = new MediaMetadata({ - title: title, - artist: artist, + title: artist, + ...
1
define(['playbackManager', 'nowPlayingHelper', 'events', 'connectionManager'], function (playbackManager, nowPlayingHelper, events, connectionManager) { "use strict"; // no support for mediaSession if (!navigator.mediaSession && !window.NativeShell) { return; } // Reports media playback to...
1
12,908
I would rather find the code that inverts the logic and remove that.
jellyfin-jellyfin-web
js
@@ -142,7 +142,7 @@ class RemoteConnection(object): :Returns: Timeout value in seconds for all http requests made to the Remote Connection """ - return None if cls._timeout == socket._GLOBAL_DEFAULT_TIMEOUT or cls._timeout + return None if cls._timeout == socket._GLOBAL_DEFAULT_...
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
12,281
The else doesn't return anything?
SeleniumHQ-selenium
java
@@ -48,7 +48,7 @@ func claim(args []string) error { gasLimit = action.ClaimFromRewardingFundBaseGas + action.ClaimFromRewardingFundGasPerByte*uint64(len(payload)) } - gasPriceRau, err := gasPriceInRau() + gasPriceRau, _ := gasPriceInRau() nonce, err := nonce(sender) if err != nil { return output.NewErro...
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
19,325
assignments should only be cuddled with other assignments (from `wsl`)
iotexproject-iotex-core
go
@@ -3413,9 +3413,8 @@ static void GetLibrarySearchPaths(std::vector<std::string> &paths, const swift::SearchPathOptions &search_path_opts) { paths.clear(); - paths.resize(search_path_opts.LibrarySearchPaths.size() + 1); - std::copy(search_path_opts.LibrarySearchPaths.begin(), - s...
1
//===-- SwiftASTContext.cpp -------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
1
16,818
why not simply `paths = search_path_opts.LibrarySearchPaths` ?
apple-swift-lldb
cpp
@@ -610,7 +610,7 @@ define(["globalize", "listView", "layoutManager", "userSettings", "focusManager" } if (item) { - return item.Name; + return globalize.translate(item.Name); } if ("Movie" === params.type) {
1
define(["globalize", "listView", "layoutManager", "userSettings", "focusManager", "cardBuilder", "loading", "connectionManager", "alphaNumericShortcuts", "scroller", "playbackManager", "alphaPicker", "emby-itemscontainer", "emby-scroller"], function (globalize, listView, layoutManager, userSettings, focusManager, cardB...
1
15,180
Are we sure this should be translated by the web client? It was unclear in chat exactly what's getting translated here.
jellyfin-jellyfin-web
js
@@ -253,7 +253,7 @@ func (c *collection) actionToWrites(a *driver.Action) ([]*pb.Write, string, erro docName = driver.UniqueString() newName = docName } - w, err = c.putWrite(a.Doc, docName, &pb.Precondition{ConditionType: &pb.Precondition_Exists{false}}) + w, err = c.putWrite(a.Doc, docName, &pb.Precondit...
1
// Copyright 2019 The Go Cloud Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
1
15,801
same oneof issue.
google-go-cloud
go
@@ -258,7 +258,7 @@ module Bolt config.project.puppetfile, config.project.managed_moduledir, config.project.project_file, - config.module_install) + @plugins.resolve_references(config.module_install)) end # ...
1
# frozen_string_literal: true require 'benchmark' require_relative '../bolt/plan_creator' require_relative '../bolt/util' module Bolt class Application attr_reader :analytics, :config, :executor, :inventory, :logger, :pal, :plugins private :analytics, :config, :executor, :inventory, :logger, :pal, :plu...
1
19,223
If we resolve here, isn't the whole `module_install` config setting or any subkeys also pluggable? I think that's totally fine, just want to make sure that that's known, and we should also update the data in `options.rb` for those options
puppetlabs-bolt
rb
@@ -376,6 +376,7 @@ hipError_t ihipExtLaunchMultiKernelMultiDevice(hipLaunchParams* launchParamsList if(globalWorkSizeX > UINT32_MAX || globalWorkSizeY > UINT32_MAX || globalWorkSizeZ > UINT32_MAX) { + free(kds); return hipErrorInvalidConfiguration; }
1
/* Copyright (c) 2015 - present Advanced Micro Devices, 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 restriction, including without limitation the rights to us...
1
9,150
it would be better to change `kds` into a `std::vector` then we don't need to explicitly free it
ROCm-Developer-Tools-HIP
cpp
@@ -113,6 +113,8 @@ def send_email_sendgrid(config, sender, subject, message, recipients, image_png) def send_email(subject, message, sender, recipients, image_png=None): + config = configuration.get_config() + subject = _prefix(subject) logger.debug("Emailing:\n" "-------------\n"
1
# Copyright (c) 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 or agreed to in writing, s...
1
10,742
Looks like you're also changing logic and not only tests.
spotify-luigi
py
@@ -78,7 +78,7 @@ namespace Datadog.Trace.Tests.Sampling var expectedLimit = totalMilliseconds * actualIntervalLimit / 1_000; - var acceptableVariance = (actualIntervalLimit * 1.0); + var acceptableVariance = (actualIntervalLimit * 1.15); var upperLimit = expectedLimi...
1
using System; using System.Collections.Concurrent; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; using Datadog.Trace.Sampling; using Xunit; namespace Datadog.Trace.Tests.Sampling { [Collection(nameof(Datadog.Trace.Tests.Sampling))] public class RateLimiterTests { p...
1
17,586
Is it possible that test failures here are real and that we should improve the rate limiting logic? Or are we ok with rate limits to be exceeded by 15%?
DataDog-dd-trace-dotnet
.cs
@@ -71,6 +71,8 @@ class ImageProvider extends FileProvider throw new \LogicException("The 'srcset' and 'picture' options must not be used simultaneously."); } + $attrPrefix = isset($options['lazy']) && true === $options['lazy'] ? 'data-' : ''; + if (MediaProviderInterface::FORMAT...
1
<?php declare(strict_types=1); /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\MediaBundle\Provider;...
1
10,617
Shouldn't there be some kind of validation somewhere? IMO there should be an exception if `$options['lazy']` is not a boolean.
sonata-project-SonataMediaBundle
php
@@ -1,5 +1,7 @@ // Copyright (c) Microsoft. All rights reserved. +using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; + namespace Microsoft.TestPlatform.VsTestConsole.TranslationLayer { using System;
1
// Copyright (c) Microsoft. All rights reserved. namespace Microsoft.TestPlatform.VsTestConsole.TranslationLayer { using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; using Microsoft.TestPlatform.VsTestConsole.TranslationLaye...
1
11,166
nit: please move it inside namespace.
microsoft-vstest
.cs
@@ -15,7 +15,7 @@ module Bolt shell-command tmpdir tty - ].freeze + ].concat(RUN_AS_OPTIONS).sort.freeze DEFAULTS = { 'cleanup' => true
1
# frozen_string_literal: true require 'bolt/error' require 'bolt/config/transport/base' module Bolt class Config module Transport class Docker < Base OPTIONS = %w[ cleanup host interpreters service-url shell-command tmpdir tty ...
1
18,457
The inventory schema needs to be regenerated to include these options. Looks like the CI job didn't get triggered since the paths don't include `lib/bolt/transport/**`.
puppetlabs-bolt
rb
@@ -0,0 +1,14 @@ +WELCOME_DIALOG_TEXT = ( + "Welcome to NVDA dialog Welcome to NVDA!\n" + "Most commands for controlling NVDA require you to hold down the NVDA key while pressing other keys.\n" + "By default, the numpad Insert and main Insert keys may both be used as the NVDA key.\n" + "You can also configure NVDA to...
1
1
22,730
This might break if a user runs the system tests with a system language other than English, in which the user default language differs.
nvaccess-nvda
py
@@ -3,7 +3,7 @@ require 'rspec/expectations' RSpec::Matchers.define :have_errors do |expected| match do - actual.body.match(/Error/) + actual.body.match(/Error\:/) end failure_message do |actual|
1
require 'rspec/expectations' RSpec::Matchers.define :have_errors do |expected| match do actual.body.match(/Error/) end failure_message do |actual| "expected would have errors on the page." end failure_message_when_negated do |actual| "expected would not have errors on the page." end end
1
18,115
This was raising intermittent errors, since Lorem ipsum contains the word "error"
DMPRoadmap-roadmap
rb
@@ -214,6 +214,7 @@ bool RTPSDomain::removeRTPSParticipant( { if (p != nullptr) { + assert((p->mp_impl != nullptr) && "This participant has been previously invalidated"); p->mp_impl->disable(); std::unique_lock<std::mutex> lock(m_mutex);
1
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless re...
1
22,273
Shouldn't we then add `mp_impl = nullptr` to the destructor of `RTPSParticipant`
eProsima-Fast-DDS
cpp
@@ -5,10 +5,10 @@ import pytest from mmdet.datasets import DATASETS -@patch('mmdet.datasets.CocoDataset.load_annotations', MagicMock) -@patch('mmdet.datasets.CustomDataset.load_annotations', MagicMock) -@patch('mmdet.datasets.XMLDataset.load_annotations', MagicMock) -@patch('mmdet.datasets.CityscapesDataset.load_a...
1
from unittest.mock import MagicMock, patch import pytest from mmdet.datasets import DATASETS @patch('mmdet.datasets.CocoDataset.load_annotations', MagicMock) @patch('mmdet.datasets.CustomDataset.load_annotations', MagicMock) @patch('mmdet.datasets.XMLDataset.load_annotations', MagicMock) @patch('mmdet.datasets.City...
1
22,814
Are the additional brackets necessary?
open-mmlab-mmdetection
py
@@ -148,7 +148,7 @@ public class Invoker implements InvocationHandler { } PojoConsumerOperationMeta pojoConsumerOperationMeta = consumerMeta - .findOperationMeta(MethodUtils.findSwaggerMethodName(method)); + .findOperationMeta(MethodUtils.findSwaggerMethodName(method), consumerIntf); if (...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
11,708
consumerMeta only belongs to this invoker instance only relate to this one consumerIntf class seems no need to build a complex key?
apache-servicecomb-java-chassis
java
@@ -35,6 +35,11 @@ RSpec.describe RSpec::Core::Formatters::BaseTextFormatter do expect(formatter_output.string).to match("1 example, 1 failure, 1 pending") end + it "with 1s outputs singular (only pending)" do + send_notification :dump_summary, summary_notification(1, examples(1), examples(0), exa...
1
# encoding: utf-8 require 'rspec/core/formatters/base_text_formatter' RSpec.describe RSpec::Core::Formatters::BaseTextFormatter do include FormatterSupport context "when closing the formatter", :isolated_directory => true do let(:output_to_close) { File.new("./output_to_close", "w") } let(:formatter) { de...
1
16,039
this one is unrelated right? (Don't mind including it, just making sure I understand)
rspec-rspec-core
rb
@@ -0,0 +1,14 @@ +_base_ = [ + '../_base_/datasets/coco_instance.py', '../_base_/models/solo_r50_fpn.py', + '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' +] +# optimizer +optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0001) +optimizer_config = dict(grad_clip=dict(max_nor...
1
1
23,516
8, 11 actually achieves similar performance, we should use our default config if [9,11] is unnecessary.
open-mmlab-mmdetection
py
@@ -0,0 +1,12 @@ +package yarpc + +import ( + "time" + + "github.com/yarpc/yarpc-go/encoding/raw" +) + +func SleepRaw(reqMeta *raw.ReqMeta, body []byte) ([]byte, *raw.ResMeta, error) { + time.Sleep(1 * time.Second) + return nil, nil, nil +}
1
1
9,854
For a separate PR: Can we make this a JSON/Thrift procedure instead? It could accept the amount of time it needs to sleep as an argument.
yarpc-yarpc-go
go
@@ -92,6 +92,7 @@ class Tab(browsertab.AbstractTab): pass + @pytest.mark.xfail(run=False, reason='Causes segfaults, see #1638') def test_tab(qtbot, view, config_stub, tab_registry, mode_manager): tab_w = Tab(win_id=0, mode_manager=mode_manager)
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
1
19,436
Please remove this blank line.
qutebrowser-qutebrowser
py
@@ -26,6 +26,7 @@ use Front\Front; use Propel\Runtime\Exception\PropelException; use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\HttpFoundation\Request; +use Thelia\Cart\CartTrait; use Thelia\Controller\Front\BaseFrontController; use Thelia\Core\Event\Cart\CartEvent; use Thelia\Core\Event\Order...
1
<?php /*************************************************************************************/ /* */ /* Thelia */ /* ...
1
10,655
the cartTrait is not used anymore
thelia-thelia
php
@@ -82,6 +82,7 @@ namespace OpenTelemetry.Trace.Configuration /// Creates tracerSdk factory. /// </summary> /// <param name="configure">Function that configures tracerSdk factory.</param> + /// <returns><see cref="TracerFactory"/>.</returns> public static TracerFactory Create(...
1
// <copyright file="TracerFactory.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.apach...
1
13,533
Cn you please make the message more human friendly.
open-telemetry-opentelemetry-dotnet
.cs
@@ -23,10 +23,12 @@ import os import sys import html import netrc -from typing import Callable, Mapping, List, Optional import tempfile +from enum import Enum, unique +from typing import Callable, Mapping, List, Optional from PyQt5.QtCore import QUrl +from PyQt5.QtWebEngineWidgets import QWebEnginePage from q...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2021 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
25,938
Please do `import enum` instead, then use `enum.Enum` and `enum.unique` - we do this everywhere to see where things are coming from, except for Qt (everything begins with a `Q` anyways) and typing (mostly used in type annotations, so it's clear without the namespacing).
qutebrowser-qutebrowser
py
@@ -46,7 +46,6 @@ #include "codec.h" -#define ENCFAIL (uint)0 /* a value that is not a valid instruction */ /* Decode immediate argument of bitwise operations. * Returns zero if the encoding is invalid.
1
/* ********************************************************** * Copyright (c) 2016 ARM Limited. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condit...
1
11,136
Isn't ENCFAIL used in codec.c below? Wouldn't this make it no longer compile?
DynamoRIO-dynamorio
c
@@ -73,6 +73,10 @@ public abstract class StaticLangXCombinedSurfaceView implements ViewModel { public abstract List<PageStreamingDescriptorClassView> pageStreamingDescriptorClasses(); + public boolean getTrue() { + return true; + } + public static Builder newBuilder() { return new AutoValue_StaticLa...
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,250
this looks very weird
googleapis-gapic-generator
java
@@ -14,7 +14,9 @@ import java.util.logging.LogRecord; * Log to the console using a basic formatter. * * @author Wouter Zelle + * @deprecated This class will be complety removed in 7.0.0 */ +@Deprecated public class ConsoleLogHandler extends Handler { private static final Formatter FORMATTER = new PmdLog...
1
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ package net.sourceforge.pmd.util.log; import java.io.PrintWriter; import java.io.StringWriter; import java.util.logging.Formatter; import java.util.logging.Handler; import java.util.logging.LogRecord; /** * Log to the console us...
1
13,964
So, the culprit was actually this class "ConsoleLogHandler", correct? Because it simply wrote to stdout...
pmd-pmd
java
@@ -272,7 +272,7 @@ namespace NLog.Config public override LoggingConfiguration Reload() { if (!string.IsNullOrEmpty(_originalFileName)) - return new XmlLoggingConfiguration(_originalFileName, LogFactory); + return LogFactory.CreateConfig(_originalFileName); /...
1
// // Copyright (c) 2004-2020 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // * Redistributions of s...
1
21,314
Still curious why you need to modify this method? Why not in the future just have a method called `LogFactory.ReloadConfiguration()` instead of the config assigning itself?
NLog-NLog
.cs
@@ -110,8 +110,8 @@ class Test(base.Base): 'Molecule run (always).')) def test(ctx, scenario_name, driver_name, __all, destroy): # pragma: no cover """ - Test (lint, destroy, dependency, syntax, create, prepare, converge, - idempotence, side_effect, verify, destroy). + Test (lint, clean...
1
# Copyright (c) 2015-2018 Cisco Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge...
1
9,178
Should this say "lint, cleanup, destroy, dependency, syntax, create, prepare, converge, idempotence, side_effect, verify, cleanup, destroy"?
ansible-community-molecule
py
@@ -23,12 +23,11 @@ func sendHeaders(ctx context.Context, headers p2p.Headers, stream *stream) error defer cancel() if err := w.WriteMsgWithContext(ctx, headersP2PToPB(headers)); err != nil { - return fmt.Errorf("write message: %w", err) + return fmt.Errorf("send write message: %w", err) } - h := new(pb.Hea...
1
// Copyright 2020 The Swarm Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package libp2p import ( "context" "fmt" "time" "github.com/ethersphere/bee/pkg/p2p" "github.com/ethersphere/bee/pkg/p2p/libp2p/internal/headers/pb" "...
1
13,385
I am not sure why these log messages are changed.
ethersphere-bee
go
@@ -5,7 +5,10 @@ package runtime // Interfaces are represented as a pair of {typecode, value}, where value can be // anything (including non-pointers). -import "unsafe" +import ( + "reflect" + "unsafe" +) type _interface struct { typecode uintptr
1
package runtime // This file implements Go interfaces. // // Interfaces are represented as a pair of {typecode, value}, where value can be // anything (including non-pointers). import "unsafe" type _interface struct { typecode uintptr value unsafe.Pointer } //go:inline func composeInterface(typecode uintptr, v...
1
7,617
This panic is incorrect - this is a full implementation of a slice equality check. This should be something more like `type x is not comparable` maybe?
tinygo-org-tinygo
go
@@ -271,7 +271,7 @@ add_extra_option(opt_info_t *opt_info, const TCHAR *opt) return DR_FAILURE; } - len = MIN(DR_MAX_OPTIONS_LENGTH - 1, _tcslen(opt)); + len = _dr_nlen(opt, DR_MAX_OPTIONS_LENGTH); opt_info->extra_opts[idx] = malloc((len + 1) * sizeof(opt_info...
1
/* ********************************************************** * Copyright (c) 2011-2016 Google, Inc. All rights reserved. * Copyright (c) 2008-2010 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or witho...
1
15,688
See below: let's use the existing convention _tcsnlen.
DynamoRIO-dynamorio
c
@@ -6,10 +6,6 @@ describe Step do describe "Validations" do it { should validate_presence_of(:proposal) } - it do - create(:approval_step) # needed for spec, see https://github.com/thoughtbot/shoulda-matchers/issues/194 - should validate_uniqueness_of(:user_id).scoped_to(:proposal_id) - end ...
1
describe Step do describe "Associations" do it { should belong_to(:user) } it { should belong_to(:proposal) } end describe "Validations" do it { should validate_presence_of(:proposal) } it do create(:approval_step) # needed for spec, see https://github.com/thoughtbot/shoulda-matchers/issues...
1
17,725
Why don't we need this any more?
18F-C2
rb
@@ -0,0 +1,14 @@ +_base_ = ['./sparse_rcnn_r50_fpn_mstrain_480-800_3x_coco.py'] + +model = dict( + pretrained='torchvision://resnet101', + backbone=dict( + type='ResNet', + depth=101, + num_stages=4, + out_indices=(0, 1, 2, 3), + frozen_stages=1, + norm_cfg=dict(type='BN'...
1
1
21,817
clean unnecessary comma
open-mmlab-mmdetection
py
@@ -75,11 +75,14 @@ export function createVNode(type, props, key, ref, original) { // a _nextDom that has been set to `null` _nextDom: undefined, _component: null, - constructor: undefined, - _original: original + constructor: undefined }; - if (original == null) vnode._original = vnode; + Object.define...
1
import options from './options'; /** * Create an virtual node (used for JSX) * @param {import('./internal').VNode["type"]} type The node name or Component * constructor for this virtual node * @param {object | null | undefined} [props] The properties of the virtual node * @param {Array<import('.').ComponentChildr...
1
15,589
This is the default value for enumerable.
preactjs-preact
js
@@ -61,8 +61,8 @@ std::string chemicalReactionTemplatesToString( bool toSmiles, bool canonical) { std::string res = ""; std::vector<std::string> vfragsmi; - RDKit::MOL_SPTR_VECT::const_iterator begin = getStartIterator(rxn, type); - RDKit::MOL_SPTR_VECT::const_iterator end = getEndIterator(rxn, type); + a...
1
// $Id$ // // Copyright (c) 2010-2014, Novartis Institutes for BioMedical Research Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must ret...
1
16,090
Just above, you have `const auto` for a `RDKit::MOL_SPTR_VECT::const_iterator`, here it is only `auto`. Why is this?
rdkit-rdkit
cpp
@@ -186,9 +186,10 @@ bool Actions::registerEvent(Event_ptr event, const pugi::xml_node& node) return false; } -bool Actions::registerLuaEvent(Event* event) +bool Actions::registerLuaEvent(Action* event) { - Action_ptr action{ static_cast<Action*>(event) }; //event is guaranteed to be an Action + Event_ptr ptr = E...
1
/** * The Forgotten Server - a free and open-source MMORPG server emulator * Copyright (C) 2018 Mark Samman <mark.samman@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; eithe...
1
15,682
@djarek just a quick question, wouldn't be `ptr.reset()` here better as it does not memory leak if we do not call delete on the raw pointer aswell? it maybe makes sense to use `ptr.release` if the event is guaranteed to be loaded again but on a reload it would memory leak if for example I removed that script from my fi...
otland-forgottenserver
cpp
@@ -218,8 +218,12 @@ func (cfg *Config) GetString(key string) string { // GetStringSlice returns config value as []string. func (cfg *Config) GetStringSlice(key string) []string { - value := cfg.Get(key).(*cli.StringSlice) - return cast.ToStringSlice([]string(*value)) + switch cfg.Get(key).(type) { + case *cli.Stri...
1
/* * Copyright (C) 2019 The "MysteriumNetwork/node" Authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
1
15,381
Why to `Get()` value twice, while u have it 2 lines before
mysteriumnetwork-node
go
@@ -310,10 +310,17 @@ class ServiceProvider extends ModuleServiceProvider $this->registerConsoleCommand('october.update', 'System\Console\OctoberUpdate'); $this->registerConsoleCommand('october.util', 'System\Console\OctoberUtil'); $this->registerConsoleCommand('october.mirror', 'System\Conso...
1
<?php namespace System; use App; use Lang; use Event; use Config; use Backend; use Request; use DbDongle; use BackendMenu; use BackendAuth; use Twig_Environment; use Twig_Loader_String; use System\Classes\ErrorHandler; use System\Classes\MarkupManager; use System\Classes\PluginManager; use System\Classes\SettingsManag...
1
10,798
There is a typo here, this needs to state `october.fresh`
octobercms-october
php
@@ -139,6 +139,18 @@ public class TestHadoopTables { Assert.assertEquals("Transform must match", transform, sortOrder.fields().get(0).transform()); } + @Test + public void testTableName() { + PartitionSpec spec = PartitionSpec.builderFor(SCHEMA) + .bucket("data", 16) + .build(); + String...
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
25,824
Metadata tables loaded through `HadoopTables` will have their names as location.type (which is weird as we normally use location#type). I am not sure whether it is a big deal or not.
apache-iceberg
java
@@ -343,7 +343,7 @@ Blockly.VerticalFlyout.prototype.wheel_ = function(e) { delta *= 10; } var metrics = this.getMetrics_(); - var pos = metrics.viewTop + delta; + var pos = -this.workspace_.scrollY + delta; var limit = metrics.contentHeight - metrics.viewHeight; pos = Math.min(pos, lim...
1
/** * @license * Visual Blocks Editor * * Copyright 2011 Google Inc. * https://developers.google.com/blockly/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apach...
1
8,294
Can you explain why you went from a positive value (metrics.viewTop) to a negative value?
LLK-scratch-blocks
js
@@ -91,4 +91,11 @@ public interface ExternalTaskRestService { @Produces(MediaType.APPLICATION_JSON) BatchDto setRetriesAsync(SetRetriesForExternalTasksDto retriesDto); + @GET + @Path("/topic-names") + @Produces(MediaType.APPLICATION_JSON) + List<String> getTopicNames(@QueryParam("withLockedTasks") boolean w...
1
/* * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH * under one or more contributor license agreements. See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. Camunda licenses this file to you under the Apache License, * Version 2.0; y...
1
10,227
Let's use a dedicated DTO instead of `List<String>` to remain consistent with all other existing REST API endpoints: * Introduce a new DTO class (e. g. `ExternalTaskTopicNameDto`) located under `org.camunda.bpm.engine.rest.dto.externaltask` * The class should have the attribute `topicName` of type `String` * Introduce ...
camunda-camunda-bpm-platform
java
@@ -42,6 +42,14 @@ public interface RepositoryManager { */ ScriptDTO getScript(List<String> path); + /** + * This method returns the {@link org.phoenicis.repository.dto.ScriptDTO} with the given ID + * + * @param id The script ID + * @return The found ScriptDTO + */ + ScriptDTO ge...
1
package org.phoenicis.repository; import org.phoenicis.repository.dto.ApplicationDTO; import org.phoenicis.repository.dto.RepositoryDTO; import org.phoenicis.repository.location.RepositoryLocation; import org.phoenicis.repository.dto.ScriptDTO; import org.phoenicis.repository.types.Repository; import java.util.List; ...
1
13,335
Do you plan to remove the `ScriptDTO getScript(List<String> path);` method long-term?
PhoenicisOrg-phoenicis
java
@@ -134,12 +134,14 @@ }, types: function() { var self = this; - var result = this.allTypes.filter(function(item) { + if (this.enabledTypes && !this.enabledTypes.length) { + return this.allTypes; + } + ...
1
/*global countlyVue, CV, Vue */ (function() { /** * DRAWER HELPERS */ var MetricComponent = countlyVue.views.create({ template: CV.T('/dashboards/templates/helpers/drawer/metric.html'), props: { dataType: { type: String }, multiple...
1
14,870
@itsiprikshit I used a custom v-model to app count component because the sourceapps component was not reacting to user app count selection, e.g. whenever user changed app count selection, the source apps selection multiplicity remained the same. As a matter of fact, user was able to select one application only. Please ...
Countly-countly-server
js
@@ -4,6 +4,7 @@ from mmcv.cnn import ConvModule, kaiming_init from mmcv.runner import auto_fp16, force_fp32 from mmdet.models.builder import HEADS +from mmdet.models.utils import ResLayer, SimplifiedBasicBlock @HEADS.register_module()
1
import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule, kaiming_init from mmcv.runner import auto_fp16, force_fp32 from mmdet.models.builder import HEADS @HEADS.register_module() class FusedSemanticHead(nn.Module): r"""Multi-level fused semantic segmentation head. .. code-bloc...
1
22,116
Similarly, we think we may keep `fused_semantic_head.py` unchanged. Then, we could add a new mask head for the desired function.
open-mmlab-mmdetection
py
@@ -175,4 +175,10 @@ public class PhpModelTypeNameConverter implements ModelTypeNameConverter { private static String getPhpPackage(ProtoFile file) { return file.getProto().getPackage().replaceAll("\\.", "\\\\"); } + + @Override + public TypeName getTypeNameForTypedResourceName( + ProtoElement elem, S...
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
17,731
Why implement this? It duplicates the value in FeatureConfig.
googleapis-gapic-generator
java
@@ -159,8 +159,14 @@ public class SparkScanBuilder implements ScanBuilder, SupportsPushDownFilters, S @Override public Scan build() { - return new SparkBatchQueryScan( - spark, table, caseSensitive, schemaWithMetadataColumns(), filterExpressions, options); + // TODO: understand how to differentiate...
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
37,711
@aokolnychyi / @RussellSpitzer / @holdenk Spark3 gives ScanBuilder - abstraction - to define all types of Scans (Batch, MicroBatch & Continuous). But, the current implementation / class modelling - has SparkBatchScan as the Scan implementation. Looking at some of the concerns of BatchScan - all the way from the State m...
apache-iceberg
java
@@ -56,10 +56,7 @@ public final class ClaimTypeConverter implements Converter<Map<String, Object>, this.claimTypeConverters.forEach((claimName, typeConverter) -> { if (claims.containsKey(claimName)) { Object claim = claims.get(claimName); - Object mappedClaim = typeConverter.convert(claim); - if (mapp...
1
/* * Copyright 2002-2019 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
18,034
Will you please update these files to use a copyright end date of 2021?
spring-projects-spring-security
java
@@ -10,6 +10,17 @@ if (window.__AXE_EXTENSION__) { /*eslint indent: 0*/ var testUtils = {}; +var fixture = document.createElement('div'); +fixture.setAttribute('id', 'fixture'); +document.body.insertBefore(fixture, document.body.firstChild); + +/*eslint no-unused-vars: 0*/ +var checks, commons; +var originalChecks ...
1
/* global axe, checks */ // Let the user know they need to disable their axe/attest extension before running the tests. if (window.__AXE_EXTENSION__) { throw new Error( 'You must disable your axe/attest browser extension in order to run the test suite.' ); } /*eslint indent: 0*/ var testUtils = {}; /** * Create...
1
16,082
Adding fixture to the body as we don't have the `runner.tmpl` anymore
dequelabs-axe-core
js
@@ -6,11 +6,15 @@ import ( log "github.com/sirupsen/logrus" + librarygocontroller "github.com/openshift/library-go/pkg/controller" + corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-g...
1
package fakeclusterinstall import ( "context" "time" log "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/util/flowcontrol" "k8s.io/client-go/util/workqueue" "sigs.k8s.io/controller-runtime/pkg/client...
1
17,757
nit: just for consistency we can move this import block down. Right above openshift/hive imports
openshift-hive
go
@@ -57,7 +57,7 @@ class MessageLocationTuple(NamedTuple): class ManagedMessage(NamedTuple): - """Tuple with information ahout a managed message of the linter""" + """Tuple with information about a managed message of the linter""" name: Optional[str] msgid: str
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 """A collection of typing utilities.""" import sys from typing import NamedTuple, Optional, Union if sys.version_info >= (3, 8): from typing import Literal, TypedDict e...
1
19,806
Perhaps clean up the commit history and don't squash?
PyCQA-pylint
py
@@ -162,7 +162,7 @@ final class ScribeInboundHandler extends ChannelInboundHandlerAdapter { buf.release(); } } else { - returned.writeBytes(content.array(), content.offset(), content.length()); + returned.writeBytes(content.array(), 0, content.length()); } if (re...
1
/* * Copyright 2015-2019 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 a...
1
15,008
Just `writeBytes(content.array())` Back to my original, somewhat broken version ;)
openzipkin-zipkin
java
@@ -95,6 +95,16 @@ func TestCrossdock(t *testing.T) { "transport": []string{"http", "tchannel"}, }, }, + { + name: "ctxpropagation", + axes: axes{ + "transport": []string{"http", "tchannel"}, + }, + params: params{ + "ctxserver": "127.0.0.1", + "ctxclient": "127.0.0.1", + }, + }, } ...
1
// Copyright (c) 2016 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
9,977
I couldn't tell from reading the test - do we every criss-cross transports in the same test? I want to make sure we aren't breaking the chain...
yarpc-yarpc-go
go