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
@@ -15,8 +15,8 @@ """Forseti CLI installer.""" from forseti_installer import ForsetiInstaller - from util import gcloud +from util import constants class ForsetiClientInstaller(ForsetiInstaller): """Forseti command line interface installer"""
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 a...
1
31,895
alphasort this import
forseti-security-forseti-security
py
@@ -0,0 +1,14 @@ +#include<iostream> +using namespace std; +void reverseNum(int digit){ + while(digit>0){ + int n=digit%10; + digit=digit/10; + cout<<n<<"\t"; + } +} +int main(){ + int digit; + cin>>digit; + reverseNum(digit); +}
1
1
5,028
remove this file!
shoaibrayeen-Programmers-Community
c
@@ -256,11 +256,14 @@ func (acc *Account) String() string { etas = "0s" } } + name := []rune(acc.name) if fs.Config.StatsFileNameLength > 0 { if len(name) > fs.Config.StatsFileNameLength { - where := len(name) - fs.Config.StatsFileNameLength - name = append([]rune{'.', '.', '.'}, name[where:]...) + ...
1
// Package accounting providers an accounting and limiting reader package accounting import ( "fmt" "io" "sync" "time" "github.com/ncw/rclone/fs" "github.com/ncw/rclone/fs/asyncreader" "github.com/ncw/rclone/fs/fserrors" "github.com/pkg/errors" ) // ErrorMaxTransferLimitReached is returned from Read when the...
1
7,665
You don't need to say `rune(' ')` - `' '` is already a `rune`.
rclone-rclone
go
@@ -38,7 +38,7 @@ module Selenium port end - IGNORED_ERRORS = [Errno::EADDRNOTAVAIL] + IGNORED_ERRORS = [Errno::EADDRNOTAVAIL].freeze IGNORED_ERRORS << Errno::EBADF if Platform.cygwin? IGNORED_ERRORS.freeze
1
# encoding: utf-8 # # 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
14,876
We can't freeze this and then add something to it in the next line. The `freeze` on line 43 is sufficient. If Rubocop flags this we need to exclude it.
SeleniumHQ-selenium
java
@@ -0,0 +1,5 @@ +package javaslang.control; + +public interface Kind<TYPE extends Kind<TYPE, ?, ?>, E, T> { + +}
1
1
6,540
We call it Kind2 and move out of the `javaslang/control` package into the `javaslang`package. Maybe I will later generate Kind1..Kindn but that's another story.
vavr-io-vavr
java
@@ -166,7 +166,7 @@ func New(path string, baseKey []byte, o *Options, logger logging.Logger) (db *DB if db.capacity == 0 { db.capacity = defaultCapacity } - db.logger.Infof("db capacity: %v", db.capacity) + db.logger.Infof("database capacity in chunks (and in Bytes): %v (%v)", db.capacity, db.capacity*swarm.Chun...
1
// Copyright 2018 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
1
10,551
i think it might be nicer to have a message like: `database capacity: %d chunks (%d bytes, %d megabytes)`. counting in bytes is so 90s :)
ethersphere-bee
go
@@ -195,6 +195,16 @@ public class Constants { // dir to keep dependency plugins public static final String DEPENDENCY_PLUGIN_DIR = "azkaban.dependency.plugin.dir"; + + /* + * Prefix used to construct Hadoop/Spark user job link. + * a) RM: resource manager + * b) JHS: Hadoop job history server...
1
/* * Copyright 2017 LinkedIn Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
1
15,940
The '.' in the key names are used to separate namespaces, NOT to separate words. How about azkaban.external_resources.resource_manager? ---- Why is it better than using the full name in the variable name e.g. RESOURCE_MANAGER_LINK ?
azkaban-azkaban
java
@@ -17,7 +17,7 @@ using BenchmarkDotNet.Attributes; using Benchmarks.Tracing; using OpenTelemetry.Trace; -using OpenTelemetry.Trace.Configuration; +using OpenTelemetry.Trace; using OpenTelemetry.Trace.Samplers; namespace Benchmarks
1
// <copyright file="OpenTelemetrySdkBenchmarks.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
15,155
This seems to be duplicated with line 19?
open-telemetry-opentelemetry-dotnet
.cs
@@ -20,7 +20,7 @@ #endif #if !(defined(_WIN32) || (defined(__WXMAC__) && (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4))) -#include <xlocale.h> +#include <wx/xlocale.h> #endif #include "stdwx.h"
1
// This file is part of BOINC. // http://boinc.berkeley.edu // Copyright (C) 2013 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation, // either version 3 of the Licens...
1
8,569
This is wrong. xlocale.h is needed on OSX and maybe elsewhere too. This needs a test in configure to see if xlocale.h and uselocale() are available and an #if test here. Also, the NO_PER_THREAD_LOCALE stuff in configure.ac needs to be updated to include test for uselocale().
BOINC-boinc
php
@@ -1,4 +1,4 @@ -//snippet-sourcedescription:[DeleteAccessKey.java demonstrates how to delete an access key from an AWS Identity and Access Management (IAM) user.] +//snippet-sourcedescription:[DeleteAccessKey.java demonstrates how to delete an access key from an AWS Identity and Access Management (AWS IAM) user.] //s...
1
//snippet-sourcedescription:[DeleteAccessKey.java demonstrates how to delete an access key from an AWS Identity and Access Management (IAM) user.] //snippet-keyword:[AWS SDK for Java v2] //snippet-keyword:[Code Sample] //snippet-service:[AWS IAM] //snippet-sourcetype:[full-example] //snippet-sourcedate:[11/02/2020...
1
18,235
AWS Identity and Access Management (IAM)
awsdocs-aws-doc-sdk-examples
rb
@@ -138,7 +138,7 @@ utils.imageReplacement = function(ResourceModel, src, resources, resourceBaseUrl } const mime = resource.mime ? resource.mime.toLowerCase() : ''; - if (ResourceModel.isSupportedImageMimeType(mime)) { + if (ResourceModel.isSupportedImageMimeType(mime) || ResourceModel.isSupportedAudioMimeType(m...
1
const Entities = require('html-entities').AllHtmlEntities; const htmlentities = new Entities().encode; // Imported from models/Resource.js const FetchStatuses = { FETCH_STATUS_IDLE: 0, FETCH_STATUS_STARTED: 1, FETCH_STATUS_DONE: 2, FETCH_STATUS_ERROR: 3, }; const utils = {}; utils.getAttr = function(attrs, name,...
1
14,063
Why did you have multiple function calls here instead of having one long array of supported mimeTypes? In line with your PR here, I think we might eventually see inline videos or inline pdf. It would be great to generalize this a bit.
laurent22-joplin
js
@@ -37,6 +37,7 @@ from pyspark.sql.types import ( LongType, StringType, TimestampType, + NumericType, ) from databricks import koalas as ks # For running doctests and reference resolution in PyCharm.
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
16,515
nit: shall we keep alphabetical order?
databricks-koalas
py
@@ -106,6 +106,15 @@ export default class Realm { let method = util.createMethod(objectTypes.REALM, 'objects'); return method.apply(this, [type, ...args]); } + + objectForPrimaryKey(type, ...args) { + if (typeof type == 'function') { + type = objects.typeForConstructor(this[k...
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,475
We could just move the check for function into `typeForConstruction` to make this a one liner every time we need to do this.
realm-realm-js
js
@@ -153,7 +153,7 @@ public class I18nTest extends JUnit4TestBase { assertThat(ime.isActivated()).isTrue(); assertThat(ime.getActiveEngine()).isEqualTo(desiredEngine); - // Send the Romaji for "Tokyo". The space at the end instructs the IME to convert the word. + // Send the Romaji for "Tokyo". The spa...
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,514
A correct by unrelated change. We'll slide this one in without another word ;)
SeleniumHQ-selenium
py
@@ -40,6 +40,9 @@ Solver<Dtype>::Solver(const SolverParameter& param) template <typename Dtype> void Solver<Dtype>::Solve(const char* resume_file) { Caffe::set_mode(Caffe::Brew(param_.solver_mode())); + if (param_.solver_mode()) { + Caffe::SetDevice(param_.device_id()); + } Caffe::set_phase(Caffe::TRAIN); ...
1
// Copyright Yangqing Jia 2013 #include <cstdio> #include <algorithm> #include <string> #include <vector> #include "caffe/net.hpp" #include "caffe/proto/caffe.pb.h" #include "caffe/solver.hpp" #include "caffe/util/io.hpp" #include "caffe/util/math_functions.hpp" using std::max; using std::min; namespace caffe { t...
1
26,999
I feel that a slightly safer way is to do if (param_.has_device_id()) { Caffe::SetDevice(param_.device_id()); } just in case a user has hard-coded a device id outside the solver and does not specify the device id in the solver param. Currently, if nothing is set, the solver will always use the 0th device, which might n...
BVLC-caffe
cpp
@@ -321,6 +321,7 @@ class TestSeleniumScriptBuilder(SeleniumTestCase): "closeWindow('that_window')", "submitByName(\"toPort\")", "scriptEval(\"alert('This is Sparta');\")", + "rawCode(multi(1)\n line(2)\n ...
1
import json import os import tempfile import time from bzt import TaurusConfigError from bzt.engine import ScenarioExecutor from bzt.modules.functional import FuncSamplesReader, LoadSamplesReader, FunctionalAggregator from bzt.modules.python import ApiritifNoseExecutor, PyTestExecutor, RobotExecutor from bzt.modules.p...
1
15,285
let's replace this example with something that won't fail in Python. Like "for+if+print"
Blazemeter-taurus
py
@@ -268,7 +268,8 @@ def _to_graphviz(tree_info, show_info, feature_names, precision=None, raise ImportError('You must install graphviz to plot tree.') def float2str(value, precision=None): - return "{0:.{1}f}".format(value, precision) if precision is not None else str(value) + return "{0:....
1
# coding: utf-8 # pylint: disable = C0103 """Plotting Library.""" from __future__ import absolute_import import warnings from copy import deepcopy from io import BytesIO import numpy as np from .basic import Booster from .compat import MATPLOTLIB_INSTALLED, GRAPHVIZ_INSTALLED from .sklearn import LGBMModel def che...
1
18,505
Please remove the brackets and use `string_type` from `compat.py` module instead of `str` in `isinstance()`.
microsoft-LightGBM
cpp
@@ -36,16 +36,11 @@ type Execution struct { } // NewExecution returns a Execution instance -func NewExecution(executorAddress string, contractAddress string, nonce uint64, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte) (*Execution, error) { - if executorAddress == "" { - return nil, errors.Wrap(...
1
// Copyright (c) 2018 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
15,029
line is 143 characters (from `lll`)
iotexproject-iotex-core
go
@@ -94,7 +94,11 @@ func NewController(params Params) (types.Controller, error) { for i := 0; i < items.Len(); i++ { item := items.Index(i).Addr().Interface().(InnerObjectWithSelector) for _, record := range item.GetStatus().Experiment.Records { - if controller.ParseNamespacedName(record.Id...
1
// Copyright 2021 Chaos Mesh Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
1
23,523
It should follow a `continue`.
chaos-mesh-chaos-mesh
go
@@ -18,6 +18,7 @@ services: gid: '{{ .GID }}' image: ${DDEV_DBIMAGE}-${DDEV_SITENAME}-built stop_grace_period: 60s + working_dir: "{{ .WebWorkingDir }}" volumes: - type: "volume" source: mariadb-database
1
package ddevapp // DDevComposeTemplate is used to create the main docker-compose file // file for a ddev project. const DDevComposeTemplate = `version: '{{ .ComposeVersion }}' {{ .DdevGenerated }} services: {{if not .OmitDB }} db: container_name: {{ .Plugin }}-${DDEV_SITENAME}-db build: context: '{{ .D...
1
15,623
Should this be DBWorkingDir?
drud-ddev
go
@@ -542,7 +542,7 @@ public class AutoScalingHandler extends RequestHandlerBase implements Permission String eventTypeStr = op.getStr(EVENT); if (op.hasError()) return currentConfig; - TriggerEventType eventType = TriggerEventType.valueOf(eventTypeStr.trim().toUpperCase(Locale.ROOT)); + TriggerEventTyp...
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
34,920
I think you can remove the whole line.
apache-lucene-solr
java
@@ -8,6 +8,7 @@ package consensus import ( "context" + "github.com/iotexproject/iotex-core/db" "math/big" "github.com/facebookgo/clock"
1
// Copyright (c) 2018 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
13,517
File is not `goimports`-ed (from `goimports`)
iotexproject-iotex-core
go
@@ -40,12 +40,13 @@ public class ClientHarvestRun implements Serializable { this.id = id; } - public enum RunResultType { SUCCESS, FAILURE, INPROGRESS }; + public enum RunResultType { SUCCESS, RUN_FAILED, RUN_IN_PROGRESS, DELETE_FAILED }; private static String RESULT_LABEL_SUCCESS = "SU...
1
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package edu.harvard.iq.dataverse.harvest.client; import java.io.Serializable; import java.util.Date; import javax.persistence.Entity; ...
1
42,422
Not a big deal, but what is the value of adding this status condition for a failure to delete a client? It has some value for a dataverse admin, to know that the last attempt to harvest from a certain server resulted in a failure. Is it really useful to know that an attempt to delete a client failed? - should the start...
IQSS-dataverse
java
@@ -85,7 +85,7 @@ public abstract class BaseWriterFactory<T> implements WriterFactory<T> { OutputFile outputFile = file.encryptingOutputFile(); EncryptionKeyMetadata keyMetadata = file.keyMetadata(); Map<String, String> properties = table.properties(); - MetricsConfig metricsConfig = MetricsConfig.fro...
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
1
33,707
Can we also update the equality delete branch below?
apache-iceberg
java
@@ -457,6 +457,11 @@ class StepExecutionContext(PlanExecutionContext, IStepContext): if step_output_handle == record.dagster_event.event_specific_data.step_output_handle: return True + # source is skipped so cannot load + for record in self.instance.all_logs(self.run_id, of...
1
""" This module contains the execution context objects that are internal to the system. Not every property on these should be exposed to random Jane or Joe dagster user so we have a different layer of objects that encode the explicit public API in the user_context module """ from abc import ABC, abstractproperty from t...
1
17,040
This doesn't solve the entire problem we talked abut yesterday, right? Because it's possible that the step itself didn't skip, but rather that it chose not to yield the output in question?
dagster-io-dagster
py
@@ -5,6 +5,7 @@ # ------------------------------------------------------------------------- import base64 +from datetime import datetime from hashlib import sha256 import json import os
1
# ------------------------------------------------------------------------- # The CodeChecker Infrastructure # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # -------------------------------------------------------------------------...
1
9,332
I also do not see any usages of this import. Is this a fix for a crash?
Ericsson-codechecker
c
@@ -794,6 +794,9 @@ func (engine *DockerTaskEngine) AddTask(task *apitask.Task) { // This will update the container desired status task.UpdateDesiredStatus() + // This will update any dependencies for awsvpc network mode before the task is started. + engine.updateTaskENIDependencies(task) + engine.state.Ad...
1
// Copyright 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" file acco...
1
25,944
Feels like this needs to be invoked in `PostUnmarshalTask` since that's where most of the task setup happens.
aws-amazon-ecs-agent
go
@@ -5390,7 +5390,8 @@ PrivStatus ObjectPrivsMDTable::updateWhere(const std::string & setClause, // <catalogName> "<schema_name>"."<object_name>", // object_type, // object_owner, -- granteeID -// (select auth_db_name from AUTHS where auth_id = object_owner), --granteeName +// coalesce((select auth_db...
1
//***************************************************************************** // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright owne...
1
7,777
I wonder what would happen if the granteeName becomes DB__ROOT but the granteeID is not DB__ROOT ID (33333) but something else.
apache-trafodion
cpp
@@ -299,6 +299,10 @@ func (install *PleaseGoInstall) compilePackage(target string, pkg *build.Package } } + if f := os.Getenv("CFLAGS"); f != "" { + cFlags = append(cFlags, f) + } + cFiles := pkg.CFiles cgoGoFiles, cgoCFiles, err := install.tc.CGO(pkg.Dir, workDir, cFlags, pkg.CgoFiles)
1
package install import ( "bufio" "fmt" "go/build" "os" "path/filepath" "strings" "github.com/thought-machine/please/tools/please_go/install/exec" "github.com/thought-machine/please/tools/please_go/install/toolchain" ) // PleaseGoInstall implements functionality similar to `go install` however it works with i...
1
10,112
Feel like this should probably come into this tool as a flag rather than it just grabbing an env var internally?
thought-machine-please
go
@@ -1656,7 +1656,7 @@ class TargetLocator { window(nameOrHandle) { return this.driver_.schedule( new command.Command(command.Name.SWITCH_TO_WINDOW). - setParameter('name', nameOrHandle), + setParameter('handle', nameOrHandle), 'WebDriver.switchTo().window(' + nameOrHandle...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
13,587
This should only be sent if the driver is speaking to a W3C conformant remote, so we need an if-condition check like we have in the Python bindings.
SeleniumHQ-selenium
py
@@ -7,7 +7,7 @@ module MentorHelper mail_to( mentor.email, I18n.t( - 'dashboards.show.contact_your_mentor', + 'shared.header.contact_your_mentor', mentor_name: mentor.first_name ) )
1
module MentorHelper def mentor_image(mentor) image_tag gravatar_url(mentor.email, size: '300') end def mentor_contact_link(mentor) mail_to( mentor.email, I18n.t( 'dashboards.show.contact_your_mentor', mentor_name: mentor.first_name ) ) end end
1
12,835
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
thoughtbot-upcase
rb
@@ -90,6 +90,18 @@ class ConfigValidatorUtilTest(ForsetiTestCase): actual_path = cv_data_converter.generate_ancestry_path(full_name) self.assertEqual(expected_path, actual_path) + def test_generate_ancestors_for_org(self): + full_name = 'organization/1234567890/project/test-project-123/fir...
1
# Copyright 2020 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
35,832
nit: folders are always a numeric ID, projects as given by CAI use project number for ancestry
forseti-security-forseti-security
py
@@ -35,7 +35,12 @@ import ( "github.com/multiformats/go-multistream" ) -var _ p2p.Service = (*Service)(nil) +var ( + _ p2p.Service = (*Service)(nil) + + // ErrBadNetwork indicates that it is suspected that network is currently in bad condition + ErrBadNetwork = errors.New("bad network") +) type Service struct {...
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" "crypto/ecdsa" "errors" "fmt" "net" "github.com/ethersphere/bee/pkg/addressbook" "github.com/ethersphere/bee/pkg/l...
1
9,706
is this used anywhere?
ethersphere-bee
go
@@ -28,7 +28,6 @@ import ( apis "github.com/openebs/maya/pkg/apis/openebs.io/v1alpha1" clientset "github.com/openebs/maya/pkg/client/generated/clientset/versioned" "github.com/openebs/maya/pkg/debug" - merrors "github.com/openebs/maya/pkg/errors/v1alpha1" pkg_errors "github.com/pkg/errors" corev1 "k8s.io/api/...
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
17,662
change pkg_errors to errors. Keep it consistent across all the files.
openebs-maya
go
@@ -657,7 +657,8 @@ class LocalRemote(unittest.TestCase): resolved_results, _, returncode = get_diff_results( [self._run_names[0]], [baseline_file_path], '--resolved', 'json', - ["--url", self._url]) + ["--url", self._url, + "--review-status", "unreviewed", "con...
1
# # ------------------------------------------------------------------------- # # Part of the CodeChecker project, under the Apache License v2.0 with # LLVM Exceptions. See LICENSE for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # # -------------------------------------------------...
1
13,975
I don't see any test cases which would test that fix dates are set properly on review status changes / storage events. For this reason please create some more test cases and also check my scenarios above.
Ericsson-codechecker
c
@@ -109,6 +109,10 @@ namespace Microsoft.Rest.Generator foreach (var method in client.Methods) { NormalizeMethod(method); + if (method.DefaultResponse != null && method.DefaultResponse is CompositeType) + { + client.Exceptions.A...
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.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; using System.Net; using Syst...
1
21,402
This belongs to SwaggerModeler.cs `public override ServiceClient Build()`
Azure-autorest
java
@@ -286,9 +286,11 @@ export default () => { * Defines column widths in pixels. Accepts number, string (that will be converted to a number), array of numbers * (if you want to define column width separately for each column) or a function (if you want to set column width * dynamically on each render). +...
1
import { isDefined } from '../../helpers/mixed'; import { isObjectEqual } from '../../helpers/object'; /* eslint-disable jsdoc/require-description-complete-sentence */ /** * @alias Options * @class Options * @description * * ## Constructor options. * * Constructor options are applied using an object literal pas...
1
17,846
We could go further and directly give the tips of the `columns` property for someone (like me) who would like to specify some column width and let the others be autosized.
handsontable-handsontable
js
@@ -1058,8 +1058,17 @@ void VkRenderFramework::InitRenderTarget(uint32_t targets, VkImageView *dsBindin VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT; // Must include dep_by_region bit when src & dst both include framebuffer-space stages subpass_dep.dependencyFlags ...
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. * Y...
1
21,242
I think a `std::copy` with `std::back_inserter` will get this done in one call.
KhronosGroup-Vulkan-ValidationLayers
cpp
@@ -47,6 +47,11 @@ type cryptoSetupServer struct { var _ CryptoSetup = &cryptoSetupServer{} +// ErrHOLExperiment is returned when the client sends the FHL2 tag in the CHLO +// this is an expiremnt implemented by Chrome in QUIC 36, which we don't support +// TODO: remove this when dropping support for QUIC 36 +var ...
1
package handshake import ( "bytes" "crypto/rand" "encoding/binary" "errors" "io" "sync" "github.com/lucas-clemente/quic-go/crypto" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" "github.com/lucas-clemente/quic-go/utils" ) // KeyDerivationFunction is used for key deriv...
1
5,773
In the future: s/QUIC 36/Version36/ to make grepping easier
lucas-clemente-quic-go
go
@@ -29,11 +29,13 @@ class FileCard extends Component { } } - tempStoreMeta = (ev, name) => { + tempStoreMeta = (ev, name, type) => { + var value = ev.target.value + if (type === 'checkbox') value = ev.target.checked ? 'on' : 'off' this.setState({ formState: { ...this.state.formSta...
1
const { h, Component } = require('preact') const getFileTypeIcon = require('../../utils/getFileTypeIcon') const ignoreEvent = require('../../utils/ignoreEvent.js') const FilePreview = require('../FilePreview') class FileCard extends Component { constructor (props) { super(props) const file = this.props.file...
1
12,922
This is an example of why I prefer a flexible custom `render()` solution 'on'/'off' may not be the right value for every application. You have to make a lot of decisions even for very simple form fields :(
transloadit-uppy
js
@@ -568,7 +568,6 @@ func (data *TestData) deployAntreaIPSec() error { func (data *TestData) deployAntreaFlowExporter(ipfixCollector string) error { // Enable flow exporter feature and add related config params to antrea agent configmap. ac := []configChange{ - {"FlowExporter", "true", true}, {"flowPollInterval...
1
// Copyright 2019 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
1
40,055
we should also skip the e2e flow aggregator tests if the Flow Exporter feature is disabled.
antrea-io-antrea
go
@@ -225,6 +225,7 @@ class ConsoleMaster(flow.FlowMaster): if err: print >> sys.stderr, "Script load error:", err sys.exit(1) + script.ObserveScripts(self, i) if options.outfile: err = self.start_stream_to_path(
1
from __future__ import absolute_import import mailcap import mimetypes import tempfile import os import os.path import shlex import signal import stat import subprocess import sys import traceback import urwid import weakref from .. import controller, flow, script, contentviews from . import flowlist, flowview, help,...
1
10,883
We should initialize the observation in the constructor of the Script class - otherwise, we don't have this feature for mitmdump.
mitmproxy-mitmproxy
py
@@ -172,9 +172,11 @@ class Index(IndexOpsMixin): raise ValueError('Names must be a list-like') internal = self._kdf._internal if len(internal.index_map) != len(names): + raise ValueError('Length of new names must be {}, got {}' .format(len(intern...
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
12,580
I would remove this line. Otherwise looks fine cc @ueshin
databricks-koalas
py
@@ -50,7 +50,7 @@ TEST (ledger_walker, genesis_account_longer) nano::ledger_walker ledger_walker{ node->ledger }; EXPECT_TRUE (ledger_walker.walked_blocks.empty ()); - EXPECT_EQ (1, ledger_walker.walked_blocks.bucket_count ()); + EXPECT_LE (ledger_walker.walked_blocks.bucket_count (), 1); EXPECT_TRUE (ledger_wa...
1
#include <nano/node/ledger_walker.hpp> #include <nano/test_common/system.hpp> #include <nano/test_common/testutil.hpp> #include <gtest/gtest.h> #include <numeric> // TODO: keep this until diskhash builds fine on Windows #ifndef _WIN32 using namespace std::chrono_literals; TEST (ledger_walker, genesis_block) { nan...
1
16,806
Would it be better to remove that line alltogether if it not directly relevant?
nanocurrency-nano-node
cpp
@@ -693,6 +693,13 @@ signal_arch_init(void) * compiler from optimizing it away. * XXX i#641, i#639: this breaks transparency to some extent until the * app uses fpu/xmm but we live with it. + * Given a security vulnerability and its mitigations, executing a fpu/xmm + * oper...
1
/* ********************************************************** * Copyright (c) 2011-2019 Google, Inc. All rights reserved. * Copyright (c) 2000-2010 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or witho...
1
23,309
Does "FPU" here include XMM/YMM/ZMM SIMD and not just x87 FPU/MMX?
DynamoRIO-dynamorio
c
@@ -226,7 +226,7 @@ class TokValueFile(Token): return generators.FileGenerator(s) def spec(self): - return "<'%s'" % strutils.bytes_to_escaped_str(self.path) + return "<'%s'" % self.path TokValue = pp.MatchFirst(
1
import operator import os import abc import pyparsing as pp import six from six.moves import reduce from netlib import strutils from netlib import human from . import generators, exceptions class Settings(object): def __init__( self, is_client=False, staticdir=None, unconstraine...
1
11,582
I'm not sure if we need to store path as bytes, and then decode/escape it when printing or just store it as a unicode string (as done here.)
mitmproxy-mitmproxy
py
@@ -7,7 +7,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( def test_hostname(host): - assert 'instance' == host.check_output('hostname -s') + assert host.check_output('hostname -s') == 'instance' def test_etc_molecule_directory(host):
1
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_hostname(host): assert 'instance' == host.check_output('hostname -s') def test_etc_molecule_directory(host): f = host.file('/...
1
7,138
Why is this flipped? Looks unrelated and our pattern is `expected == returned`.
ansible-community-molecule
py
@@ -2,7 +2,11 @@ <%= link_to workshop do %> <span class="icon"></span> <hgroup> - <h5><%= t '.heading' %></h5> + <% if workshop.online? %> + <h5><%= t '.heading.online' %></h5> + <% else %> + <h5><%= t '.heading.in_person' %></h5> + <% end %> <h4><%= workshop.name %...
1
<li class="workshop"> <%= link_to workshop do %> <span class="icon"></span> <hgroup> <h5><%= t '.heading' %></h5> <h4><%= workshop.name %></h4> </hgroup> <% end %> </li>
1
6,732
Can the `h5` tags be pulled outside of the `if` block?
thoughtbot-upcase
rb
@@ -2,6 +2,8 @@ namespace Shopsys\ShopBundle\Command; +use Shopsys\ShopBundle\Component\Image\DirectoryStructureCreator as ImageDirectoryStructureCreator; +use Shopsys\ShopBundle\Component\UploadedFile\DirectoryStructureCreator as UploadedFileDirectoryStructureCreator; use Symfony\Bundle\FrameworkBundle\Command\C...
1
<?php namespace Shopsys\ShopBundle\Command; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class CreateApplicationDirectoriesCommand extends ContainerAwareCommand { protected function conf...
1
8,751
From @PetrHeinz review: this should be also aliased (`ImageDirectoryStructureCreator`)
shopsys-shopsys
php
@@ -170,7 +170,7 @@ func (s *ClusterScope) AdditionalTags() infrav1.Tags { s.AWSCluster.Spec.AdditionalTags = infrav1.Tags{} } - return s.AWSCluster.Spec.AdditionalTags + return infrav1.Tags(s.AWSCluster.Spec.AdditionalTags).DeepCopy() } // APIServerPort returns the APIServerPort to use when creating the loa...
1
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
1
11,302
Isn't AdditionalTags already of `Tags` type? If not, we should make it so, if it's not a breaking change
kubernetes-sigs-cluster-api-provider-aws
go
@@ -1,4 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.Parallel { ...
1
// Copyright (c) Microsoft. All rights reserved. namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.Parallel { using System; using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.VisualStudio.TestPlatform.ObjectModel; using Microsoft.VisualStudio.TestPla...
1
11,389
Add blank line below license header.
microsoft-vstest
.cs
@@ -24,6 +24,7 @@ func init() { initRTC() initUARTClock() initI2CClock() + initPWMClocks() // connect to UART machine.UART0.Configure(machine.UARTConfig{})
1
// +build sam,atsamd21g18a package runtime import ( "device/arm" "device/sam" "machine" "unsafe" ) type timeUnit int64 //go:export Reset_Handler func main() { preinit() initAll() callMain() abort() } func init() { initClocks() initRTC() initUARTClock() initI2CClock() // connect to UART machine.UART0...
1
6,449
Perhaps this could be moved into `InitPWM`? I suspect not initializing the clocks will reduce power consumption.
tinygo-org-tinygo
go
@@ -0,0 +1,9 @@ +class Quiz < ActiveRecord::Base + validates :title, presence: true + + has_many :questions, -> { order(position: :asc) }, dependent: :destroy + + def first_question + questions.first + end +end
1
1
14,623
I believe this `order` isn't tested.
thoughtbot-upcase
rb
@@ -7,12 +7,13 @@ # include "../../_Plugin_Helper.h" # include "../Helpers/ESPEasyStatistics.h" # include "../Static/WebStaticData.h" -HELPERS_ESPEASY_MATH_H +//HELPERS_ESPEASY_MATH_H //clumsy-stefan: what's this for? + +#ifdef WEBSERVER_METRICS #ifdef ESP32 # include <esp_partition.h> #endif // ifdef ESP32 - ...
1
# include "../WebServer/Metrics.h" # include "../WebServer/WebServer.h" # include "../../ESPEasy-Globals.h" # include "../Commands/Diagnostic.h" # include "../ESPEasyCore/ESPEasyNetwork.h" # include "../ESPEasyCore/ESPEasyWifi.h" # include "../../_Plugin_Helper.h" # include "../Helpers/ESPEasyStatistics.h" # include "....
1
22,515
No idea why it ended up in the code. You can remove the entire line.
letscontrolit-ESPEasy
cpp
@@ -146,9 +146,10 @@ func (n *NetworkPolicyController) processClusterNetworkPolicy(cnp *secv1alpha1.C appliedToGroupNamesForRule = append(appliedToGroupNamesForRule, atGroup) appliedToGroupNamesSet.Insert(atGroup) } + iFromPeers := n.toAntreaPeerForCRD(ingressRule.From, cnp, controlplane.DirectionIn, namedP...
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
31,053
"i" and "From" is a bit duplicate, and should it be singular given the method name? I mean "fromPeer" or just "from"?
antrea-io-antrea
go
@@ -32,6 +32,7 @@ public class TestOAuth2AuthorizationRequests { return OAuth2AuthorizationRequest.authorizationCode() .authorizationUri("https://example.com/login/oauth/authorize") .clientId(clientId) + .scope("openid") .redirectUri("https://example.com/authorize/oauth2/code/registration-id") ...
1
/* * Copyright 2002-2018 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
1
10,936
Did you verify this isn't going to break any existing test assumptions? We probably shouldn't modify this as we don't know what impact this is having on existing tests. It may invalidate a test that has different expectations of the scopes.
spring-projects-spring-security
java
@@ -43,12 +43,16 @@ func (a *defaultAuthorizer) Authorize(_ context.Context, claims *Claims, target if target.Namespace == "temporal-system" || target.Namespace == "" { return Result{Decision: DecisionAllow}, nil } - + if claims == nil { + return Result{Decision: DecisionDeny}, nil + } // Check system level p...
1
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Soft...
1
10,970
technically not necessary since reading from a nil dictionary will always return found = false, so this should already be handled
temporalio-temporal
go
@@ -141,6 +141,9 @@ type StatsDriver interface { // VolumeUsageByNode returns capacity usage of all volumes and snaps for a // given node VolumeUsageByNode(nodeID string) (*api.VolumeUsageByNode, error) + // RelaxedReclaimPurge triggers the purge of RelaxedReclaim queue for a + // given node + RelaxedReclaimPurge...
1
package volume import ( "errors" "github.com/libopenstorage/openstorage/api" ) var ( // ErrAlreadyShutdown returned when driver is shutdown ErrAlreadyShutdown = errors.New("VolumeDriverProvider already shutdown") // ErrExit returned when driver already registered ErrExist = errors.New("Already exists") // Err...
1
8,876
This can return bool. RelaxedReclaimPurge(nodeID string) (bool, error)
libopenstorage-openstorage
go
@@ -60,7 +60,7 @@ public class GeneralStateReferenceTestTools { final String eips = System.getProperty( "test.ethereum.state.eips", - "Frontier,Homestead,EIP150,EIP158,Byzantium,Constantinople,ConstantinopleFix,Istanbul,Berlin"); + "Frontier,Homestead,EIP150,EIP158,Byzan...
1
/* * Copyright ConsenSys AG. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing...
1
25,379
Is there something we can do to make this automatic? At the very least, can we add Shanghai, Cancun, etc. here now so that we don't forget them?
hyperledger-besu
java
@@ -129,7 +129,7 @@ def add_arguments_to_parser(parser): parser.add_argument('--skip-db-cleanup', dest="skip_db_cleanup", action='store_true', - default=True, + default=False, required=False, ...
1
# ------------------------------------------------------------------------- # The CodeChecker Infrastructure # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # -------------------------------------------------------------------------...
1
8,853
For boolean values, I'd rather have `argparse.SUPPRESS` as default value. No need to have a `(default: False)` in the help if it's a toggle.
Ericsson-codechecker
c
@@ -251,6 +251,7 @@ func initSyncTest(t *testing.T, con consensus.Protocol, genFunc func(cst *hamt.C chainStore := chain.NewStore(chainDS, cst, &state.TreeStateLoader{}, calcGenBlk.Cid()) fetcher := th.NewTestFetcher() + fetcher.AddSourceBlocks(calcGenBlk) syncer := chain.NewSyncer(con, chainStore, fetcher, syn...
1
package chain_test import ( "context" "testing" bserv "github.com/ipfs/go-blockservice" "github.com/ipfs/go-cid" "github.com/ipfs/go-hamt-ipld" bstore "github.com/ipfs/go-ipfs-blockstore" "github.com/ipfs/go-ipfs-exchange-offline" "github.com/libp2p/go-libp2p-peer" "github.com/filecoin-project/go-filecoin/a...
1
20,355
The genesis block needs to exist in the store the fetcher pulls from, this is because the fetcher will stop fetching when it finds a block it has seen before and this can sometimes be the genesis block.
filecoin-project-venus
go
@@ -1111,7 +1111,7 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { return err } - err = ioutil.WriteFile(filepath.Join(criuOpts.ImagesDirectory, descriptorsFilename), fdsJSON, 0655) + err = ioutil.WriteFile(filepath.Join(criuOpts.ImagesDirectory, descriptorsFilename), fdsJSON, 0600) if ...
1
// +build linux package libcontainer import ( "bytes" "encoding/json" "errors" "fmt" "io" "io/ioutil" "net" "os" "os/exec" "path/filepath" "reflect" "strings" "sync" "syscall" // only for SysProcAttr and Signal "time" securejoin "github.com/cyphar/filepath-securejoin" "github.com/opencontainers/runc...
1
18,069
should we do the same for os.Mkdir(criuOpts.WorkDirectory, 0755)?
opencontainers-runc
go
@@ -87,7 +87,8 @@ module.exports.rebaseBraveStringFilesOnChromiumL10nFiles = (path) => .replace('<include name="IDR_MD_HISTORY_SIDE_BAR_HTML"', '<include name="IDR_MD_HISTORY_SIDE_BAR_HTML" flattenhtml="true"') .replace(pageVisibility, bravePageVisibility + pageVisibility) .replace(/settings_...
1
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ const path = require('path') const fs = require('fs') const srcDir = path.resolve(path.join(__dirname, '..', 'src...
1
5,362
@bbondy Two messages because the label and description differ very slightly in their wording...
brave-brave-browser
js
@@ -134,7 +134,10 @@ unit_test_get_ymm_caller_saved() register __m256 ymm15 asm("ymm15"); # endif - for (int regno = 0; regno < proc_num_simd_registers(); ++regno) { + /* The function get_ymm_caller_saved is intended to be used for AVX (no AVX-512). It + * currently doesn't cover extended AVX-5...
1
/* ********************************************************** * Copyright (c) 2013-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,731
"currently" implies it should and will be changed: so TODO i#?
DynamoRIO-dynamorio
c
@@ -1,8 +1,14 @@ import { translationMacro as t } from 'ember-i18n'; import AbstractIndexRoute from 'hospitalrun/routes/abstract-index-route'; +import Ember from 'ember'; + +const { computed } = Ember; + export default AbstractIndexRoute.extend({ modelName: 'imaging', - pageTitle: t('imaging.pageTitle'), + page...
1
import { translationMacro as t } from 'ember-i18n'; import AbstractIndexRoute from 'hospitalrun/routes/abstract-index-route'; export default AbstractIndexRoute.extend({ modelName: 'imaging', pageTitle: t('imaging.pageTitle'), searchStatus: 'Requested', _getStartKeyFromItem(item) { let imagingDateAsTime = i...
1
13,696
This should be `computed('i18n.locale'....`
HospitalRun-hospitalrun-frontend
js
@@ -12,7 +12,6 @@ class CommitFlag::BackToLifeTest < ActiveSupport::TestCase btl = CommitFlag::BackToLife.find(cf.id) btl.time_elapsed = 123.0 btl.save! - btl.reload btl.time_elapsed.must_equal 123.0 end end
1
require 'test_helper' class CommitFlag::BackToLifeTest < ActiveSupport::TestCase it '#time_elapsed' do cf = create(:commit_flag, type: 'CommitFlag::BackToLife', data: { time_elapsed: 789.0 }) btl = CommitFlag::BackToLife.find(cf.id) btl.time_elapsed.must_equal 789.0 end it '#time_elapsed=' do cf...
1
9,018
Wait, does this not work if we do `btl.reload`? That seems odd that we have to have the object in the same state.
blackducksoftware-ohloh-ui
rb
@@ -22,9 +22,7 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playba var eventListenerCount = 0; function on(scope, fn) { - if (eventListenerCount) { - eventListenerCount++; - } + eventListenerCount++; dom.addEventListener(scope, 'comman...
1
define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playbackManager, focusManager, appRouter, dom) { 'use strict'; var lastInputTime = new Date().getTime(); function notify() { lastInputTime = new Date().getTime(); handleCommand('unknown'); } function notifyM...
1
12,683
I seem to recall this being the cause of a bug at some point.
jellyfin-jellyfin-web
js
@@ -1648,6 +1648,7 @@ public class LFMainActivity extends SharedMediaActivity { menu.setGroupVisible(R.id.photos_option_men, false); menu.findItem(R.id.all_photos).setVisible(!editMode && !hidden); menu.findItem(R.id.search_action).setVisible(!editMode); + menu.findItem...
1
package org.fossasia.phimpme.gallery.activities; import android.animation.Animator; import android.annotation.TargetApi; import android.content.ContentResolver; import android.content.ContentUris; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.cont...
1
12,232
Can you remove it from the menu instead of setting it hidden? Or are there any other trouble?
fossasia-phimpme-android
java
@@ -32,6 +32,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" + execution "github.com/temporalio/temporal/.gen/proto/execution" persistence "github.com/temporalio/temporal/common/persistence" )
1
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Soft...
1
9,566
And for "execution ".
temporalio-temporal
go
@@ -34,6 +34,8 @@ module Bolt search_dirs << mod.plugins if mod.plugins? search_dirs << mod.pluginfacts if mod.pluginfacts? search_dirs << mod.files if mod.files? + type_files = "#{mod.path}/types" + search_dirs << type_files if File.exist?(type_files) searc...
1
# frozen_string_literal: true require 'base64' require 'bolt/apply_result' require 'bolt/apply_target' require 'bolt/config' require 'bolt/error' require 'bolt/task' require 'bolt/util/puppet_log_level' require 'find' require 'json' require 'logging' require 'open3' module Bolt class Applicator def initialize(i...
1
14,769
Do agents usually download these from puppetserver when applying a catalog?
puppetlabs-bolt
rb
@@ -68,6 +68,14 @@ PONY_API int pony_asio_event_fd(asio_event_t* ev) return ev->fd; } +PONY_API bool pony_asio_event_get_disposable(asio_event_t* ev) +{ + if(ev == NULL) + return false; + + return (ev->flags & ASIO_DISPOSABLE) != 0; +} + PONY_API bool pony_asio_event_get_writeable(asio_event_t* ev) { if...
1
#include "event.h" #include "asio.h" #include "../actor/actor.h" #include "../mem/pool.h" #include "../sched/scheduler.h" #include "ponyassert.h" #include <string.h> PONY_API asio_event_t* pony_asio_event_create(pony_actor_t* owner, int fd, uint32_t flags, uint64_t nsec, bool noisy) { if((flags == ASIO_DISPOSABLE)...
1
12,846
This should be `return (ev->flags == ASIO_DISPOSABLE);` because `ASIO_DISPOSABLE` has a value of `0` as defined in the enum in `asio.h` and because when `ev->flags` is assigned `ASIO_DISPOSABLE` it is assigned as `ev->flags = ASIO_DISPOSABLE` unsetting any other flags previously assigned.
ponylang-ponyc
c
@@ -68,7 +68,8 @@ namespace Examples.Console providerBuilder .AddOtlpExporter(o => { - o.MetricExportIntervalMilliseconds = options.DefaultCollectionPeriodMilliseconds; + o.MetricReaderType = MetricReaderType.Period...
1
// <copyright file="TestMetrics.cs" company="OpenTelemetry Authors"> // Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org...
1
22,758
this is not required, right? its the default already...
open-telemetry-opentelemetry-dotnet
.cs
@@ -49,6 +49,11 @@ const ( // to indicate that a reader has requested to read a TLF ID that // has been finalized, which isn't allowed. StatusCodeServerErrorCannotReadFinalizedTLF = 2812 + // StatusCodeServerErrorRequiredLockIsNotHeld is the error code returned by + // a MD write operation to indicate that a lock...
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 kbfsmd import ( "errors" "fmt" "strconv" "time" "github.com/keybase/client/go/libkb" "github.com/keybase/client/go/protocol/keybase1" "github.com/keybas...
1
17,816
"contingent to" -> "contingent on"
keybase-kbfs
go
@@ -19,6 +19,14 @@ Exceptions/Errors used in Koalas. """ +class GroupByError(Exception): + pass + + +class DataError(GroupByError): + pass + + class SparkPandasIndexingError(Exception): pass
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
16,003
Does pandas throw an exception like this?
databricks-koalas
py
@@ -538,14 +538,14 @@ cvdescriptorset::AllocateDescriptorSetsData::AllocateDescriptorSetsData(uint32_t cvdescriptorset::DescriptorSet::DescriptorSet(const VkDescriptorSet set, const VkDescriptorPool pool, const std::shared_ptr<DescriptorSetLayout const> &layout, uint32_...
1
/* Copyright (c) 2015-2019 The Khronos Group Inc. * Copyright (c) 2015-2019 Valve Corporation * Copyright (c) 2015-2019 LunarG, Inc. * Copyright (C) 2015-2019 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
11,096
The point of the exercise has been to eliminate CoreChecks as an object dependency for DescriptorSet et. al.
KhronosGroup-Vulkan-ValidationLayers
cpp
@@ -34,7 +34,7 @@ import static org.apache.iceberg.TableProperties.DEFAULT_NAME_MAPPING; /** * Context object with optional arguments for a Flink Scan. */ -class ScanContext implements Serializable { +public class ScanContext implements Serializable { private static final long serialVersionUID = 1L;
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
34,629
Why do we need to make so much more of this ScanContext public?
apache-iceberg
java
@@ -54,7 +54,6 @@ class ProductFilterFormType extends AbstractType 'choices' => $config->getFlagChoices(), 'choice_label' => 'name', 'choice_value' => 'id', - 'choice_name' => 'id', 'multiple' => true, 'expanded' => true...
1
<?php namespace Shopsys\ShopBundle\Form\Front\Product; use Shopsys\FrameworkBundle\Component\Money\Money; use Shopsys\FrameworkBundle\Form\Constraints\NotNegativeMoneyAmount; use Shopsys\FrameworkBundle\Model\Product\Filter\ProductFilterConfig; use Shopsys\FrameworkBundle\Model\Product\Filter\ProductFilterData; use S...
1
15,399
is choice_name not needed anymore?
shopsys-shopsys
php
@@ -226,6 +226,9 @@ public class Parquet { set("parquet.avro.write-old-list-structure", "false"); MessageType type = ParquetSchemaUtil.convert(schema, name); + // Check that our metrics make sense + metricsConfig.validateProperties(schema); + if (createWriterFunc != null) { Pre...
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
31,329
Is this the right place to do the validation? If a user adds a bad property or performs some schema update that causes a validation error, that would break all writes to the table. To me, it doesn't seem like we are catching the problem early enough and possibly allowing a typo to break scheduled jobs. What do you thin...
apache-iceberg
java
@@ -2467,11 +2467,17 @@ hipError_t hipHccGetAcceleratorView(hipStream_t stream, hc::accelerator_view** a namespace hip_impl { std::vector<hsa_agent_t> all_hsa_agents() { std::vector<hsa_agent_t> r{}; - for (auto&& acc : hc::accelerator::get_all()) { + auto accelerators = hc::accelerator::ge...
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
7,442
Why is this necessary? Just in order to get an indexed loop?
ROCm-Developer-Tools-HIP
cpp
@@ -68,6 +68,7 @@ type poolSyncMetrics struct { zpoolLastSyncTime *prometheus.GaugeVec zpoolStateUnknown *prometheus.GaugeVec zpoolLastSyncTimeCommandError *prometheus.GaugeVec + zpoolListRequestRejectCounter prometheus.Gauge } // poolfields struct is for pool last sync time metric
1
// Copyright © 2017-2019 The OpenEBS Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law o...
1
18,124
instead of using `prometheus.Gauge`, using `promethus.Counter` will be better.
openebs-maya
go
@@ -23,5 +23,9 @@ module Ncr def whsc? code == WHSC_CODE end + + def ba_6x_tier1_team? + code.match(/^P11[7J4T1ACZ]....$/) + end end end
1
module Ncr class Organization < ActiveRecord::Base WHSC_CODE = "P1122021" OOL_CODES = [ "P1171001", "P1172001", "P1173001", ] has_many :ncr_work_orders, class_name: Ncr::WorkOrder, foreign_key: "ncr_organization_id" validates :code, presence: true, uniqueness: true validate...
1
16,522
maybe we should have a unit test for this and then just test one case in `spec/services/ncr/approval_manager_spec.rb` ?
18F-C2
rb
@@ -21,8 +21,9 @@ class CommunicartsController < ApplicationController def approval_response cart = Cart.find(params[:cart_id]).decorate client_data = cart.proposal.client_data_legacy - approval = cart.approvals.find_by(user_id: user_id) - + approval = cart.approvals.find_by(user_id: user_id) + ...
1
require ::File.expand_path('authentication_error.rb', 'lib/errors') require ::File.expand_path('approval_group_error.rb', 'lib/errors') class CommunicartsController < ApplicationController skip_before_action :verify_authenticity_token before_filter :validate_access, only: :approval_response rescue_from Authe...
1
12,719
Why is this necessary?
18F-C2
rb
@@ -320,7 +320,7 @@ public class Spark3Util { } } - private static DistributionMode getDistributionMode(org.apache.iceberg.Table table) { + public static DistributionMode getDistributionMode(org.apache.iceberg.Table table) { boolean isSortedTable = !table.sortOrder().isUnsorted(); String defaultMo...
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
32,819
Minor: If this is going to be public, we should fix the name. `get` doesn't add any value. How about `distributionModeFor` instead?
apache-iceberg
java
@@ -16,7 +16,10 @@ from mitmproxy.tools.console import eventlog class StackWidget(urwid.Frame): - def __init__(self, widget, title, focus): + def __init__(self, window, widget, title, focus): + self.f = focus + self.window = window + if title: header = urwid.AttrWrap( ...
1
import re import urwid from mitmproxy.tools.console import common from mitmproxy.tools.console import signals from mitmproxy.tools.console import statusbar from mitmproxy.tools.console import flowlist from mitmproxy.tools.console import flowview from mitmproxy.tools.console import commands from mitmproxy.tools.console...
1
13,700
This needs a more self-explaining name. Maybe `.is_focused`?
mitmproxy-mitmproxy
py
@@ -174,11 +174,17 @@ var rubyAzureMappings = { 'parameter_grouping':['../../dev/TestServer/swagger/azure-parameter-grouping.json', 'ParameterGroupingModule'] }; +var goAzureMappings = { + 'paging':['../../dev/TestServer/swagger/paging.json','paginggroup'], + 'azurereport':['../../dev/TestServer/swagger/azure-r...
1
/// <binding Clean='clean' /> var gulp = require('gulp'), msbuild = require('gulp-msbuild'), debug = require('gulp-debug'), env = require('gulp-env'), path = require('path'), fs = require('fs'), merge = require('merge2'), shell = require('gulp-shell'), glob = require('glob'), spawn = require('child_process').spawn, ass...
1
23,099
minor: I'd add a space between `,` & `'paginggroup'`.
Azure-autorest
java
@@ -42,10 +42,8 @@ def main(): push_p = subparsers.add_parser("push") push_p.add_argument("package", type=str, help="Owner/Package Name") - push_p.set_defaults(func=command.push) - - push_p = subparsers.add_parser("push") - push_p.add_argument("package", type=str, help="Owner/Package Name") + pu...
1
""" Parses the command-line arguments and runs a command. """ from __future__ import print_function import argparse import sys import requests from . import command def main(): """ Build and run parser """ parser = argparse.ArgumentParser(description="Quilt Command Line") subparsers = parser.ad...
1
15,054
"Re-upload all fragments (even if fragment is already in registry)"
quiltdata-quilt
py
@@ -813,11 +813,15 @@ type PrometheusRuleSpec struct { // upstream Prometheus struct definitions don't have json struct tags. // RuleGroup is a list of sequentially evaluated recording and alerting rules. +// Note: PartialResponseStrategy is only used by ThanosRuler and will +// be ignored by Prometheus instances. ...
1
// Copyright 2018 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
13,660
I don't see us ignoring the field. Are we sure Prometheus wouldn't refuse to load the rules?
prometheus-operator-prometheus-operator
go
@@ -314,7 +314,7 @@ public class WindowWidget extends UIWidget implements SessionChangeListener, super.onResume(); if (isVisible() || mIsInVRVideoMode) { mSession.setActive(true); - if (!SettingsStore.getInstance(getContext()).getLayersEnabled()) { + if (!SettingsSto...
1
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*- * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package org.mozilla.vrbrowser.ui.wi...
1
9,093
I wonder if we can just check if the mSession is active and then only call `setActive(true)` and `callSurfaceChanged()` if it isn't?
MozillaReality-FirefoxReality
java
@@ -1336,6 +1336,8 @@ SDDkwd__(EXE_DIAGNOSTIC_EVENTS, "OFF"), SDDui___(EXE_MEMORY_FOR_PROBE_CACHE_IN_MB, "100"), + SDDui___(EXE_MEMORY_FOR_UNPACK_ROWS_IN_MB, "100"), + // lower-bound memory limit for BMOs/nbmos (in MB) DDui___(EXE_MEMORY_LIMIT_LOWER_BOUND_EXCHANGE, "10"), DDui___(EXE_MEMORY_LIMIT_LOWER_...
1
/* -*-C++-*- // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache Licen...
1
18,115
A default value of 100 MB maybe too small. I understand that this is good for mixed workloads, but do consider than plans with Unpack, especially when used for insert/upsert are simple. Unpack is always serial and part of master exe. Often there is only one in a query. The cost of having a low value here seems to be th...
apache-trafodion
cpp
@@ -32,8 +32,8 @@ type ( GetByOwner(address.Address) *Candidate GetBySelfStakingIndex(uint64) *Candidate Upsert(*Candidate) error - CreditBucketPool(*big.Int, bool) error - DebitBucketPool(*big.Int, bool, bool) error + CreditBucketPool(*big.Int) error + DebitBucketPool(*big.Int, bool) error Commit() err...
1
// Copyright (c) 2020 IoTeX Foundation // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use...
1
22,186
think we should pass in ctx, and use ctx.GreenlandHeight inside bucketPool to determine if create or not
iotexproject-iotex-core
go
@@ -153,7 +153,7 @@ public class I18nTest extends JUnit4TestBase { assertThat(ime.isActivated()).isTrue(); assertThat(ime.getActiveEngine()).isEqualTo(desiredEngine); - // Send the Romaji for "Tokyo". The space at the end instructs the IME to convert the word. + // Send the Romaji for "Tokyo". The spa...
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,514
A correct by unrelated change. We'll slide this one in without another word ;)
SeleniumHQ-selenium
rb
@@ -1,5 +1,4 @@ <%= semantic_form_for checkout, url: checkouts_path(checkout.plan), html: { method: 'post' } do |form| %> - <%= form.semantic_errors %> <%= form.inputs do %> <% if signed_out? %>
1
<%= semantic_form_for checkout, url: checkouts_path(checkout.plan), html: { method: 'post' } do |form| %> <%= form.semantic_errors %> <%= form.inputs do %> <% if signed_out? %> <ul class="checkout-sigin-signup-toggle"> <li class="video_tutorial-alert sign-in-prompt"> <%= link_to "Alread...
1
14,600
Why remove this?
thoughtbot-upcase
rb
@@ -11,7 +11,7 @@ use Shopsys\FrameworkBundle\Component\Router\Security\RouteCsrfProtector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Routing\Router; -use Twig_Environment; +use Twig\Environment; class GridTest extends TestCase {
1
<?php namespace Tests\FrameworkBundle\Unit\Component\Grid; use PHPUnit\Framework\TestCase; use Shopsys\FrameworkBundle\Component\Grid\DataSourceInterface; use Shopsys\FrameworkBundle\Component\Grid\Grid; use Shopsys\FrameworkBundle\Component\Grid\GridView; use Shopsys\FrameworkBundle\Component\Paginator\PaginationRes...
1
21,579
I still see some usages of not namespaced variants (look for Twig_ in project, about 42 matches). Is it intentional?
shopsys-shopsys
php
@@ -22,11 +22,11 @@ import ( "sync" "time" - "github.com/aws/amazon-ecs-agent/agent/api" "github.com/aws/amazon-ecs-agent/agent/resources/cgroup" "github.com/aws/amazon-ecs-agent/agent/utils/ioutilwrapper" "github.com/cihub/seelog" "github.com/containerd/cgroups" + specs "github.com/opencontainers/runtime...
1
// +build linux // Copyright 2014-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or...
1
19,343
Is this a new dependency? Does this require a dep update?
aws-amazon-ecs-agent
go
@@ -62,6 +62,8 @@ bool Print(T val, Type type, int /*indent*/, Type * /*union_type*/, if (type.base_type == BASE_TYPE_BOOL) { text += val != 0 ? "true" : "false"; + } else if (opts.generate_hexfloat_in_json && (type.base_type == BASE_TYPE_FLOAT || type.base_type == BASE_TYPE_DOUBLE)) { + text += FloatToSt...
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,990
> opts.generate_hexfloat_in_json && **IsFloat**(type.base_type)
google-flatbuffers
java
@@ -7,4 +7,5 @@ package archer type Manifest interface { Marshal() ([]byte, error) DockerfilePath() string + AppName() string }
1
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package archer // Manifest is the interface for serializing a manifest object to a YAML document or CloudFormation template. type Manifest interface { Marshal() ([]byte, error) DockerfilePath() string }...
1
11,283
As an alternative to this, we could also create a new method, like `Common() *AppManifest` This way we don't have to add a new method to the interface everytime we add a new field to the `AppManifest`. This is a nit though so it's up to you.
aws-copilot-cli
go
@@ -28,6 +28,7 @@ script_deps = { "urwid>=1.1", "lxml>=3.3.6", "Pillow>=2.3.0", + "harparser", }, "mitmdump": set() }
1
from setuptools import setup, find_packages from codecs import open import os from libmproxy import version # Based on https://github.com/pypa/sampleproject/blob/master/setup.py # and https://python-packaging-user-guide.readthedocs.org/ here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, '...
1
10,601
As long as we have this feature as an inline script, I'm inclined to remove the dependency here. I'd suggest that we just try to import harparser and pytz and throw an error instructing the user to install the dependencies (catch for `ImportError`). In the long term, we probably want to include that in the mitmproxy co...
mitmproxy-mitmproxy
py
@@ -0,0 +1,4 @@ +// set the base folder of this project +global.basefolder = `${__dirname}` +require ("rechoir").prepare(require('interpret').extensions, './.gulp/gulpfile.iced'); +require ('./.gulp/gulpfile.iced')
1
1
25,414
makes it work nice with vscode. all logic is now in `.gulp/*.iced` files
Azure-autorest
java
@@ -27,7 +27,7 @@ public interface SearchContext { * @return A list of all {@link WebElement}s, or an empty list if nothing matches * @see org.openqa.selenium.By */ - List<WebElement> findElements(By by); + <T extends WebElement> List<T> findElements(By by); /**
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
19,273
should a similar change be done for findElement?
SeleniumHQ-selenium
js
@@ -2745,7 +2745,7 @@ TEST (node, local_votes_cache) { ASSERT_NO_ERROR (system.poll (node.aggregator.max_delay)); } - ASSERT_TIMELY (3s, node.stats.count (nano::stat::type::requests, nano::stat::detail::requests_generated_votes) == 3); + ASSERT_TIMELY (3s, node.stats.count (nano::stat::type::requests, nano::stat...
1
#include <nano/lib/jsonconfig.hpp> #include <nano/node/election.hpp> #include <nano/node/testing.hpp> #include <nano/node/transport/udp.hpp> #include <nano/test_common/network.hpp> #include <nano/test_common/testutil.hpp> #include <gtest/gtest.h> #include <boost/filesystem.hpp> #include <boost/make_shared.hpp> #inclu...
1
16,666
`+` -> ` + ` I guess. Same below
nanocurrency-nano-node
cpp