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
@@ -330,7 +330,12 @@ func moveOutputs(state *core.BuildState, target *core.BuildTarget) ([]string, bo tmpDir := target.TmpDir() outDir := target.OutDir() for _, output := range target.Outputs() { - tmpOutput := path.Join(tmpDir, output) + var tmpOutput string + if output == target.Label.PackageName { + tmpOu...
1
// Package build houses the core functionality for actually building targets. package build import ( "bytes" "crypto/sha1" "encoding/hex" "fmt" "io" "net/http" "os" "path" "strconv" "strings" "sync" "time" "github.com/hashicorp/go-multierror" "gopkg.in/op/go-logging.v1" "core" "fs" "metrics" ) var ...
1
8,360
this logic seems duplicated from the other new function. I think it should probably be a member function on `BuildTarget`
thought-machine-please
go
@@ -51,14 +51,13 @@ func TestPatricia(t *testing.T) { stream, err := b.serialize() assert.Nil(err) assert.NotNil(stream) - assert.Equal(byte(1), stream[0]) b1 := branch{} err = b1.deserialize(stream) assert.Nil(err) assert.Equal(0, bytes.Compare(root, b1.Path[0])) assert.Equal(0, bytes.Compare(hash1, b1...
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,030
size reduce to 1/4 of using Gob
iotexproject-iotex-core
go
@@ -15,13 +15,14 @@ type Writer struct { func NewWriter(w io.Writer, h hash.Hash) *Writer { return &Writer{ h: h, - w: io.MultiWriter(w, h), + w: w, } } // Write wraps the write method of the underlying writer and also hashes all data. func (h *Writer) Write(p []byte) (int, error) { n, err := h.w.Write...
1
package hashing import ( "hash" "io" ) // Writer transparently hashes all data while writing it to the underlying writer. type Writer struct { w io.Writer h hash.Hash } // NewWriter wraps the writer w and feeds all data written to the hash h. func NewWriter(w io.Writer, h hash.Hash) *Writer { return &Writer{ ...
1
12,162
The Hash interface states that a call to `Write()` never returns an error. Does this also apply to the number of written bytes?
restic-restic
go
@@ -5,7 +5,7 @@ module Travis module Appliances class DisableSshRoaming < Base def apply - sh.if "$(sw_vers -productVersion | cut -d . -f 2) -lt 12" do + sh.if %("$(sw_vers -productVersion 2>/dev/null | cut -d . -f 2)" -lt 12) do sh.cmd %(mkdir -p $HOME/.ssh) ...
1
require 'travis/build/appliances/base' module Travis module Build module Appliances class DisableSshRoaming < Base def apply sh.if "$(sw_vers -productVersion | cut -d . -f 2) -lt 12" do sh.cmd %(mkdir -p $HOME/.ssh) sh.cmd %(chmod 0700 $HOME/.ssh) sh.cm...
1
14,575
In my tests, I found that `[[ "" -lt 12 ]]` evaluates to true, but `[[ -lt 12 ]]` is an error, which is why the subshell is wrapped in `"`.
travis-ci-travis-build
rb
@@ -369,6 +369,11 @@ FactoryGirl.define do association :watchable, factory: :product title wistia_id '1194803' + published_on Time.zone.today + + trait :unpublished do + published_on nil + end end factory :oauth_access_token do
1
FactoryGirl.define do sequence :code do |n| "code#{n}" end sequence :email do |n| "user#{n}@example.com" end sequence :name do |n| "name #{n}" end sequence :title do |n| "title #{n}" end sequence :external_url do |n| "http://robots.thoughtbot.com/#{n}" end factory :announc...
1
9,341
I don't see a validation on `published_on`, we generally shouldn't specify it in the base factory unless the model would be invalid without the model. Is there a different way we can handle this?
thoughtbot-upcase
rb
@@ -115,7 +115,7 @@ public final class ConstantScoreQuery extends Query { return new ConstantScoreWeight(this, boost) { @Override public BulkScorer bulkScorer(LeafReaderContext context) throws IOException { - if (scoreMode == ScoreMode.TOP_SCORES) { + if (scoreMode == ScoreMod...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
33,180
maybe add a `isExhaustive()` method on the enum to avoid these large conditions?
apache-lucene-solr
java
@@ -15,11 +15,13 @@ import ( ) const ( - defaultCaFile = "ca.pem" - defaultKeyFile = "key.pem" - defaultCertFile = "cert.pem" - dockerSock = "/var/run/docker.sock" - dockerSockUnix = "unix://" + dockerSock + defaultCaFile = "ca.pem" + defaultKeyFile = "key.pem" + defaultCertFile ...
1
package proxy import ( "crypto/tls" "fmt" "net" "net/http" "os" "regexp" "strings" "syscall" "github.com/fsouza/go-dockerclient" . "github.com/weaveworks/weave/common" ) const ( defaultCaFile = "ca.pem" defaultKeyFile = "key.pem" defaultCertFile = "cert.pem" dockerSock = "/var/run/docker.sock" ...
1
10,110
so those regexps were wrong previously? e.g. they would match `/v\/foo`? If so, raise a bug and fix on the 1.0 branch.
weaveworks-weave
go
@@ -1417,6 +1417,9 @@ class MultiBackend extends AbstractBase implements \Laminas\Log\LoggerAwareInter bool $stripPrefixes = true, bool $addPrefixes = true ) { + if (empty($params) && null === $source) { + return null; + } if (null === $source) { $so...
1
<?php /** * Multiple Backend Driver. * * PHP version 7 * * Copyright (C) The National Library of Finland 2012-2021. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * as published by the Free Software Foundation. * * Th...
1
32,971
I think with MultiBackend we could have a slightly different logic: return true if there are no configured login targets ( = getLoginDrivers returns an empty array). MultiBackend could also check all configured login targets for loginIsHidden support and verify that at least one of the configured login targets allows l...
vufind-org-vufind
php
@@ -25,11 +25,13 @@ using namespace LAMMPS_NS; Reader::Reader(LAMMPS *lmp) : Pointers(lmp) { fp = nullptr; + binary = false; + compressed = false; } /* ---------------------------------------------------------------------- try to open given file - generic version for ASCII files that may be compressed ...
1
// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of ...
1
31,602
Should we add error info for not supporting the compressed binary?
lammps-lammps
cpp
@@ -62,6 +62,8 @@ var ( // defaulting fails. defaultBackoffDelay = "PT1S" defaultBackoffPolicy = eventingduckv1beta1.BackoffPolicyExponential + // clusterRegionGetter is a function that can get the cluster region + clusterRegionGetter = utils.NewClusterRegionGetter() ) // Reconciler implements controller.Rec...
1
/* Copyright 2020 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
1
19,357
I suggest injecting this into the reconciler. For this and the others. Have Wire generate it and push it into the controller creation.
google-knative-gcp
go
@@ -25,6 +25,11 @@ namespace Nethermind.Core.Json { public class EthereumJsonSerializer : IJsonSerializer { + public EthereumJsonSerializer() + { + _serializer = JsonSerializer.Create(_settings); + } + public static IList<JsonConverter> BasicConverters { get; } = new ...
1
/* * Copyright (c) 2018 Demerzel Solutions Limited * This file is part of the Nethermind library. * * The Nethermind library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of th...
1
22,433
Can't we just make _serializer static? We use same settings every time. I would also put those fields on top of the class for readability.
NethermindEth-nethermind
.cs
@@ -321,6 +321,7 @@ class HttpLayer(base.Layer): try: if websockets.check_handshake(request.headers) and websockets.check_client_version(request.headers): + f.metadata['websocket'] = True # We only support RFC6455 with WebSocket version 13 # allow...
1
import h2.exceptions import time import enum from mitmproxy import connections # noqa from mitmproxy import exceptions from mitmproxy import http from mitmproxy import flow from mitmproxy.proxy.protocol import base from mitmproxy.proxy.protocol.websocket import WebSocketLayer from mitmproxy.net import websockets cl...
1
13,654
Can't we just use `metadata['websocket_flow']` to identify handshake flows and not add another attribute?
mitmproxy-mitmproxy
py
@@ -81,7 +81,7 @@ module RSpec def output_formatted(str) return str unless str.lines.count > 1 - separator = "#{'-' * 80}" + separator = '-' * 80 "#{separator}\n#{str.chomp}\n#{separator}" end
1
RSpec::Support.require_rspec_core "formatters/helpers" module RSpec module Core module Formatters # @private class DeprecationFormatter Formatters.register self, :deprecation, :deprecation_summary attr_reader :count, :deprecation_stream, :summary_stream def initialize(deprec...
1
16,923
Funny that we were wrapping this with string interpolation before...
rspec-rspec-core
rb
@@ -0,0 +1,6 @@ +import Controller from '@ember/controller'; +import {alias} from '@ember/object/computed'; + +export default Controller.extend({ + guid: alias('model') +});
1
1
9,366
I had an eslint error saying I must "alias" my model - so I copied this from controllers/site.js
TryGhost-Admin
js
@@ -124,9 +124,9 @@ namespace OpenTelemetry.Metrics internal bool InstrumentDisposed { get; set; } - public BatchMetricPoint GetMetricPoints() + public MetricPointsAccessor GetMetricPointsAccessor() { - return this.aggStore.GetMetricPoints(); + return this.aggSt...
1
// <copyright file="Metric.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/lice...
1
22,701
unsure if the methodname can still be `GetMetricPoints()` as before...
open-telemetry-opentelemetry-dotnet
.cs
@@ -233,6 +233,7 @@ class ViolationAccess(object): violation.get('full_name', ''), violation.get('resource_data', ''), violation.get('violation_data', ''), + violation.get('rule_name', '') ) violation = Violation(
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
35,826
This file contains the functional changes, the rest is for testing.
forseti-security-forseti-security
py
@@ -22,6 +22,7 @@ package http_test import ( "fmt" + "io" "log" nethttp "net/http" "os"
1
// Copyright (c) 2017 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
15,504
I know you didn't do this, but there's no need for the `nethttp` alias and it was confusing to me - just remove it and s/nethttp/http/ everywhere (it's fine that the package here is http itself, I do the same thing in transport/grpc)
yarpc-yarpc-go
go
@@ -1335,6 +1335,12 @@ public class SmartStoreTest extends SmartStoreTestCase { JSONObject soupElt = new JSONObject("{'key':'abcd" + i + "', 'value':'va" + i + "', 'otherValue':'ova" + i + "'}"); store.create(TEST_SOUP, soupElt); } + + // With WAL enabled we must force a WAL checkpoint if we want the actual...
1
/* * Copyright (c) 2011-present, salesforce.com, inc. * All rights reserved. * Redistribution and use of this software in source and binary forms, with or * without modification, are permitted provided that the following conditions * are met: * - Redistributions of source code must retain the above copyright noti...
1
18,103
I felt that this was the most non-invasive way to fix the test, but this does expose some raw DB queries and knowledge about how SQLite works which may be a code smell. The alternative to getting this to pass is to perform enough writes to trigger a checkpoint, but that threshold is determined in the config stage and t...
forcedotcom-SalesforceMobileSDK-Android
java
@@ -14,7 +14,7 @@ namespace LightGBM { -const std::string kModelVersion = "v2"; +const std::string kModelVersion = "v3"; std::string GBDT::DumpModel(int start_iteration, int num_iteration) const { std::stringstream str_buf;
1
/*! * Copyright (c) 2017 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #include <LightGBM/metric.h> #include <LightGBM/objective_function.h> #include <LightGBM/utils/common.h> #include <string> #include <sstream> #inclu...
1
20,610
Is new model format backward compatible with current v2?
microsoft-LightGBM
cpp
@@ -17,6 +17,14 @@ describe 'User creation when logging in with Oauth to view a protected page' do expect(new_user.last_name).to eq("Jetsonian") end + it "sends welcome email to a new user" do + deliveries.clear + expect { get '/auth/myusa/callback' }.to change { deliveries.length }.from(0).to(1) + ...
1
describe 'User creation when logging in with Oauth to view a protected page' do StructUser = Struct.new(:email_address, :first_name, :last_name) before do user = StructUser.new('george-test@example.com', 'Georgie', 'Jetsonian') setup_mock_auth(:myusa, user) end it 'creates a new user if the current us...
1
16,617
should we perhaps write a spec that ensures we don't send a welcome email to a user on login when the user is not new?
18F-C2
rb
@@ -83,6 +83,10 @@ type Config struct { // other than containers managed by ECS ReservedMemory uint16 + // ContainerTimeout specifies the amount time before a SIGKILL is issued to + // containers managed by ECS + DockerStopTimeoutSeconds uint64 + // AvailableLoggingDrivers specifies the logging drivers availabl...
1
// Copyright 2014-2015 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
13,762
I think my preference would be to have the type be a `time.Duration` and use `time.ParseDuration` for parsing.
aws-amazon-ecs-agent
go
@@ -19,6 +19,8 @@ package org.openqa.grid.internal; import com.google.common.base.Predicate; +import com.sun.org.glassfish.gmbal.ManagedObject; + import net.jcip.annotations.ThreadSafe; import org.openqa.grid.internal.listeners.Prioritizer;
1
/* Copyright 2011 Selenium committers Copyright 2011 Software Freedom Conservancy Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by...
1
11,529
JMX offers normal APIs for this. I don't think you want the glassfish one.
SeleniumHQ-selenium
java
@@ -41,7 +41,7 @@ class Yamllint(base.Base): .. code-block:: yaml verifier: - name: goss + name: ... lint: name: yamllint options:
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
10,109
We should really leave a TODO or something or else we will forget them ...
ansible-community-molecule
py
@@ -61,7 +61,7 @@ def define_pandas_source_test_solid(): return dm.define_dagstermill_solid( name='pandas_source_test', notebook_path=nb_test_path('pandas_source_test'), - inputs=[InputDefinition(name='df', dagster_type=DataFrame)], + inputs=[InputDefinition(name='df', runtime_type=...
1
import sys import pandas as pd import pytest import dagstermill as dm from dagster import ( DependencyDefinition, InputDefinition, OutputDefinition, PipelineDefinition, RepositoryDefinition, define_stub_solid, execute_pipeline, types, ) from dagster.utils import script_relative_path ...
1
11,984
This exposes what a bad name `dagster_type` was, but is it crazy to want this to just be `type` -- do we gain usability by being super-explicit that this is a `runtime_type`? If so, would it make sense to rename the `config_field` to be `config_type`?
dagster-io-dagster
py
@@ -803,6 +803,16 @@ Tries to force this object to take the focus. """ speech.speakObject(self,reason=controlTypes.REASON_FOCUS) + def _get_isSelectionAnchoredAtStart(self): + """Determine if the selection is anchored at the start. + If the selection is anchored at the end or there is no information this is C...
1
# -*- coding: UTF-8 -*- #NVDAObjects/__init__.py #A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2006-2016 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Patrick Zajda #This file is covered by the GNU General Public License. #See the file COPYING for more details. """Module that contains the base N...
1
19,091
It might help here if you give a brief explanation of what you mean with a selection being anchored at the start.
nvaccess-nvda
py
@@ -7,12 +7,14 @@ package transfer import ( + "fmt" "math/big" "github.com/pkg/errors" "github.com/iotexproject/iotex-core/action" "github.com/iotexproject/iotex-core/iotxaddress" + "github.com/iotexproject/iotex-core/pkg/hash" "github.com/iotexproject/iotex-core/state" )
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,104
move cachedStates to handle function
iotexproject-iotex-core
go
@@ -130,7 +130,7 @@ public class GlobalSettings { s.put("hideSpecialAccounts", Settings.versions( new V(1, new BooleanSetting(false)) )); - s.put("keyguardPrivacy", Settings.versions( + s.put("privacyMode", Settings.versions( new V(1, new BooleanSett...
1
package com.fsck.k9.preferences; import java.io.File; import java.text.SimpleDateFormat; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; import java.util.TreeMap; import android.content.SharedPreferences; import android.os.Environment...
1
11,794
I don't think this can just be renamed; it's saying that privacyMode is a BooleanSetting, which it's not.
k9mail-k-9
java
@@ -595,7 +595,7 @@ public class SharedCoreConcurrencyTest extends SolrCloudSharedStoreTestCase { public void recordState(String collectionName, String shardName, String coreName, SharedCoreStage stage) { super.recordState(collectionName, shardName, coreName, stage); ConcurrentLinkedQueue<Strin...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
33,740
what was the reason for this change?
apache-lucene-solr
java
@@ -1,14 +1,8 @@ using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Configuration; -using System.Linq; -using System.Text; -using System.Web; - -[assembly: System.Security.SecurityCritical] -[assembly: System.Security.AllowPartiallyTrustedCallers] +// [assembly: Syst...
1
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Text; using System.Web; [assembly: System.Security.SecurityCritical] [assembly: System.Security.AllowPartiallyTrustedCallers] namespace Datadog.Trace.ClrProfiler { /// <...
1
14,315
Minor, but these two nullable and the logic around them could be replaced by a Lazy<Bool>.
DataDog-dd-trace-dotnet
.cs
@@ -1,12 +1,17 @@ package main import ( + "os" + "strconv" "sync/atomic" "syscall" "time" - "github.com/weaveworks/go-checkpoint" + checkpoint "github.com/weaveworks/go-checkpoint" weave "github.com/weaveworks/weave/router" + api "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8...
1
package main import ( "sync/atomic" "syscall" "time" "github.com/weaveworks/go-checkpoint" weave "github.com/weaveworks/weave/router" ) var checker *checkpoint.Checker var newVersion atomic.Value var success atomic.Value const ( updateCheckPeriod = 6 * time.Hour ) func checkForUpdates(dockerVersion string, r...
1
15,727
I think I would just pass in `len(peers)`, on the principle of minimum information.
weaveworks-weave
go
@@ -84,6 +84,9 @@ public class TableProperties { public static final String PARQUET_BATCH_SIZE = "read.parquet.vectorization.batch-size"; public static final int PARQUET_BATCH_SIZE_DEFAULT = 5000; + public static final String PARQUET_IN_LIMIT = "read.parquet.in-predicate-limit"; + public static final int PARQ...
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
27,133
Spark's default value is 10 but it also rewrites IN as OR/EQUALS. We can do better that this because of the way we evaluate IN predicates. On datasets we tested this, we saw performance improvements on IN predicates with up to 200 elements (on sorted column). We may increase the default value a bit but I am very reluct...
apache-iceberg
java
@@ -20,6 +20,7 @@ package org.springframework.security.oauth2.core.oidc.endpoint; * and used by the authorization endpoint and token endpoint. * * @author Joe Grandja + * @author Mark Heckler * @since 5.0 * @see <a target="_blank" href="https://openid.net/specs/openid-connect-core-1_0.html#OAuthParametersRegi...
1
/* * Copyright 2002-2017 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
14,211
Please update copyright year.
spring-projects-spring-security
java
@@ -289,9 +289,13 @@ int Extractor::run(ScriptingEnvironment &scripting_environment) WriteEdgeBasedGraph(config.edge_graph_output_path, max_edge_id, edge_based_edge_list); - util::SimpleLogger().Write() - << "Expansion : " << (number_of_node_based_nodes / TIMER_SEC(expansion)) - ...
1
#include "extractor/extractor.hpp" #include "extractor/edge_based_edge.hpp" #include "extractor/extraction_containers.hpp" #include "extractor/extraction_node.hpp" #include "extractor/extraction_way.hpp" #include "extractor/extractor_callbacks.hpp" #include "extractor/restriction_parser.hpp" #include "extractor/script...
1
19,185
Same here, could just be `std::setprecision`.
Project-OSRM-osrm-backend
cpp
@@ -2290,14 +2290,6 @@ func (fbo *folderBranchOps) getConvID( func (fbo *folderBranchOps) sendEditNotifications( ctx context.Context, rmd ImmutableRootMetadata, body string) error { - // For now only write out the notifications if we're in test mode, - // just in case we decide to change the notification format be...
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 ( "fmt" "os" "reflect" "sort" "strings" "sync" "time" "github.com/keybase/backoff" "github.com/keybase/client/go/libkb" "github.com/ke...
1
19,763
Do we still want the "admins" gate?
keybase-kbfs
go
@@ -1,8 +1,11 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX - License - Identifier: Apache - 2.0 +# Purpose # This code example demonstrates how to upload multiple items -# to a bucket in Amazon S3. +# to a bucket in Amazon Simple Storage Solution (Amazon S3). + +# snippet-start:[s...
1
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX - License - Identifier: Apache - 2.0 # This code example demonstrates how to upload multiple items # to a bucket in Amazon S3. # Prerequisites: # - An existing Amazon S3 bucket. # - An existing folder within the bucket. # - One or more exi...
1
20,529
Simple Storage **Service**
awsdocs-aws-doc-sdk-examples
rb
@@ -172,4 +172,11 @@ type Config struct { // Configures telemetry. Metrics MetricsConfig + + // DisableAutoObservabilityMiddleware is used to stop the dispatcher from + // automatically attaching observability middleware to all inbounds and + // outbounds. It is the assumption that if if this option is disabled ...
1
// Copyright (c) 2018 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
16,090
nit: `it is assumed`
yarpc-yarpc-go
go
@@ -23,6 +23,7 @@ #include <stdint.h> #include <stdio.h> #include <stdlib.h> +#include <stdbool.h> #include "h2o.h" #include "h2o/http2.h" #include "h2o/http2_internal.h"
1
/* * Copyright (c) 2014-2016 DeNA Co., Ltd., Kazuho Oku, Fastly, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to...
1
11,193
I would appreciate it if you could refrain from using `stdbool.h`. We allow the header files of H2O to be included from C++ (which means that `bool` might be a C++ type), and therefore my preference is to not use `bool` in our code (but instead use `int` or `char` for the purpose) to avoid confusion.
h2o-h2o
c
@@ -843,6 +843,9 @@ class RelationController extends ControllerBehavior } $widget = $this->makeWidget('Backend\Widgets\Lists', $config); + $widget->setSearchOptions([ + 'scope' => $this->getConfig('manage[searchScope]') + ]); /* ...
1
<?php namespace Backend\Behaviors; use Db; use Lang; use Request; use Form as FormHelper; use Backend\Classes\ControllerBehavior; use October\Rain\Database\Model; use ApplicationException; /** * Uses a combination of lists and forms for managing Model relations. * * This behavior is implemented in the controller l...
1
19,445
@danielbidala What happens if `searchScope` is not defined in `config_relation.yaml` ?
octobercms-october
php
@@ -57,14 +57,17 @@ func serviceLoggedIn(ctx context.Context, config Config, session SessionInfo, "%+v", err) } + // Launch auth refreshes in the background, in case we are + // currently disconnected from one of these servers. mdServer := config.MDServer() if mdServer != nil { - mdServer.RefreshAuthToken(...
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 ( "sync" "github.com/keybase/client/go/kbconst" "github.com/keybase/client/go/libkb" "golang.org/x/net/context" ) // EnableAdminFeature ret...
1
20,752
Do we want maybe a 1min timeout?
keybase-kbfs
go
@@ -48,11 +48,11 @@ func BasicAuthDecode(encoded string) (user string, name string, err error) { return user, name, err } - a := strings.Split(string(s), ":") - if len(a) == 2 { - user, name = a[0], a[1] - } else { + a := strings.SplitN(string(s), ":", 2) + if len(a) != 2 { err = errors.New("decode failed") ...
1
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package base import ( "crypto/hmac" "crypto/md5" "crypto/rand" "crypto/sha1" "encoding/base64" "encoding/hex" "errors" "fmt" "hash" "html/template"...
1
8,480
I guess code never reaches this line, you can remove `else` block and just `return a[0], a[1]`. Also, probably rename `a` to `auth` as well.
gogs-gogs
go
@@ -43,7 +43,7 @@ class SerializableByteBufferMap implements Map<Integer, ByteBuffer>, Serializabl return new SerializableByteBufferMap(map); } - public SerializableByteBufferMap() { + SerializableByteBufferMap() { this.wrapped = Maps.newLinkedHashMap(); }
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
1
13,253
Doesn't this no-arg constructor need to be public for serialization to work?
apache-iceberg
java
@@ -20,7 +20,7 @@ return [ 'alpha_dash' => 'Hierdie veld mag slegs letters, syfers, strepies en onderstrepe bevat.', 'alpha_num' => 'Hierdie veld mag slegs letters en syfers bevat.', 'array' => 'Hierdie veld moet \'n array wees.', - 'attached' => 'This f...
1
<?php /* |-------------------------------------------------------------------------- | Validation Language Lines |-------------------------------------------------------------------------- | | The following language lines contain the default error messages used by | the validator class. Some of these rules have multip...
1
8,564
Just use the word "veld" instead of "gebied" here
Laravel-Lang-lang
php
@@ -22,6 +22,7 @@ import android.util.Log; import android.webkit.URLUtil; import org.apache.commons.io.FileUtils; +import org.shredzone.flattr4j.model.User; import org.xml.sax.SAXException; import java.io.File;
1
package de.danoeh.antennapod.core.service.download; import android.annotation.SuppressLint; import android.app.Notification; import android.app.NotificationManager; import android.app.Service; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.conten...
1
13,460
This change (import org.shredzone.flatter4j.model.User;) does not seem relevant to this fix / commit.
AntennaPod-AntennaPod
java
@@ -63,6 +63,7 @@ var ( noCleanup = app.Flag("no-cleanup", "Whether or not to delete the chroot folder after the build is done").Bool() noCache = app.Flag("no-cache", "Disables using prebuilt cached packages.").Bool() stopOnFailure = app.Flag("stop-on-failure", "Stop on failed build...
1
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. package main import ( "fmt" "os" "os/signal" "runtime" "sync" "github.com/juliangruber/go-intersect" "golang.org/x/sys/unix" "gopkg.in/alecthomas/kingpin.v2" "microsoft.com/pkggen/internal/exe" "microsoft.com/pkggen/internal/logger"...
1
16,209
This should be a Bool() rather than a String(). (See the other PR for an example)
microsoft-CBL-Mariner
go
@@ -243,7 +243,7 @@ rules: """Test that a bucket's rule can guarantee the maximum_retention if its action is 'Delete' and the only condition is an age(<= maximum_retention)""" rules_engine = get_rules_engine_with_rule(RetentionRulesEngineTest.yaml_str_only_max_retention) - self.assertE...
1
# Copyright 2018 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,968
This should be a failure if we don't get the exact number of expected rules. You can use a constant if you don't want to update several lines any time you update the test rule strings.
forseti-security-forseti-security
py
@@ -38,14 +38,14 @@ namespace Nethermind.Blockchain.Synchronization _syncPeerPool = syncPeerPool ?? throw new ArgumentNullException(nameof(syncPeerPool)); _syncConfig = syncConfig ?? throw new ArgumentNullException(nameof(syncConfig)); _logger = logManager.GetClassLogger() ?? thro...
1
// Copyright (c) 2018 Demerzel Solutions Limited // This file is part of the Nethermind library. // // The Nethermind library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of ...
1
22,883
We need to switch from BeamSync to FullSync when we download all the needed headers, blocks, receipts and state
NethermindEth-nethermind
.cs
@@ -61,15 +61,15 @@ thrift_protocol_set_property (GObject *object, guint property_id, switch (property_id) { case PROP_THRIFT_PROTOCOL_TRANSPORT: - protocol->transport = g_value_get_object (value); + protocol->transport = g_value_dup_object (value); break; } } gint32 -thrift_protoco...
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 ma...
1
12,938
Why you duplicate it? The underlaying transport should live as long as the multiplexed one. And must be destroyed after protocol is destroyed. Duplicating the transport may lead to object references hold and maybe memory freeing problems. I think this property must hold a reference to it and not a copy. The copy can le...
apache-thrift
c
@@ -97,6 +97,7 @@ func (in *{{.Type}}) GetChaos() *ChaosInstance { Kind: Kind{{.Type}}, StartTime: in.CreationTimestamp.Time, Action: "", + Status: string(in.Status.ChaosStatus.Experiment.Phase), UID: string(in.UID), }
1
// Copyright 2020 Chaos Mesh Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
1
18,060
`in.Status.Experiment.Phase`. we can omit `ChaosStatus`
chaos-mesh-chaos-mesh
go
@@ -1,9 +1,12 @@ package cmd import ( + "bytes" "testing" "encoding/json" + oexec "os/exec" + "time" "github.com/drud/ddev/pkg/ddevapp" "github.com/drud/ddev/pkg/exec"
1
package cmd import ( "testing" "encoding/json" "github.com/drud/ddev/pkg/ddevapp" "github.com/drud/ddev/pkg/exec" log "github.com/sirupsen/logrus" asrt "github.com/stretchr/testify/assert" ) // TestDevList runs the binary with "ddev list" and checks the results func TestDevList(t *testing.T) { assert := asrt...
1
12,081
Just curious... why the alias here?
drud-ddev
go
@@ -28,6 +28,7 @@ /// </summary> private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DetectionToolbarProperties)); this.btnCancel = new System.Windows.Forms.Button()...
1
namespace pwiz.Skyline.Controls.Graphs { partial class DetectionToolbarProperties { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being ...
1
13,603
Seems like this should conflict with changes I made during merging of the 20.2 RESX file translation
ProteoWizard-pwiz
.cs
@@ -11,6 +11,8 @@ #include "graph/planner/plan/Query.h" #include "graph/util/ExpressionUtils.h" +DEFINE_bool(enable_opt_collapse_project_rule, true, ""); + using nebula::graph::PlanNode; using nebula::graph::QueryContext;
1
/* Copyright (c) 2021 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License. */ #include "graph/optimizer/rule/CollapseProjectRule.h" #include "graph/optimizer/OptContext.h" #include "graph/optimizer/OptGroup.h" #include "graph/planner/plan/PlanNode.h" #include "graph/planner/p...
1
33,350
Why disable this rule?
vesoft-inc-nebula
cpp
@@ -124,6 +124,6 @@ class ExternalEditor(QObject): self._proc.error.connect(self.on_proc_error) editor = config.get('general', 'editor') executable = editor[0] - args = [self._filename if arg == '{}' else arg for arg in editor[1:]] + args = [arg.replace('{}', self._filename) if ...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2016 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
14,161
I think you don't need the `... if '{}' in arg else arg` part - if the arg doesn't contain `{}`, `arg.replace('{}', ...)` will return the unchanged string anyways.
qutebrowser-qutebrowser
py
@@ -21,9 +21,11 @@ from google.cloud.security.common.util import log_util from google.cloud.security.common.data_access import errors as dao_errors from google.cloud.security.inventory import errors as inventory_errors from google.cloud.security.inventory.pipelines import base_pipeline +import threading LOGGER ...
1
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
1
25,678
nit: Should we make this an attribute of the LoadGroupMembersPIpeline class?
forseti-security-forseti-security
py
@@ -479,6 +479,8 @@ public class JDBCConnection implements ObjectStoreConnection { + "JOIN principal ON principal.principal_id=principal_group_member.principal_id " + "JOIN domain ON domain.domain_id=principal_group.domain_id " + "WHERE principal_group_member.last_notified_time=? ...
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
5,451
need to update this command to use the name field instead of principal_id
AthenZ-athenz
java
@@ -51,7 +51,7 @@ public class PrivGetTransactionCount extends PrivacyApiMethod { final Address address = requestContext.getRequiredParameter(0, Address.class); final String privacyGroupId = requestContext.getRequiredParameter(1, String.class); - final long nonce = privateTransactionHandler.getSenderNonc...
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
20,787
nit: I can't help but think the privateTransactionHandler should be a base-class member ... every Priv Json RPC seems to need it...
hyperledger-besu
java
@@ -230,12 +230,8 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc .setOnPreferenceChangeListener( (preference, newValue) -> { Intent i = new Intent(activity, MainActivity.class); - if (B...
1
package de.danoeh.antennapod.preferences; import android.Manifest; import android.annotation.SuppressLint; import android.app.Activity; import android.app.ProgressDialog; import android.app.TimePickerDialog; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent...
1
13,628
Why does this start the main activity and not the preferences? With `overridePendingTransition(0, 0)`, this could instantly switch the theme without the user being disrupted
AntennaPod-AntennaPod
java
@@ -117,6 +117,10 @@ public class DistributorStatus { return up; } + public boolean isDocker() { + return up; + } + public int getMaxSessionCount() { return maxSessionCount; }
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
17,772
Prefer a human-readable string rather than querying specific technologies. How would I indicate a session is running on BrowserStack? Or some custom thing?
SeleniumHQ-selenium
java
@@ -15,7 +15,7 @@ VERSION = "2015-06-15" # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools -REQUIRES = ["msrest>=0.1.0", "msrestazure>=0.1.0"] +REQUIRES = ["msrest>=0.2.0", "msrestazure>=0.2.1"] setup( name=NAME,
1
# coding=utf-8 # -------------------------------------------------------------------------- # -------------------------------------------------------------------------- # coding: utf-8 from setuptools import setup, find_packages NAME = "storagemanagementclient" VERSION = "2015-06-15" # To install the library, run th...
1
21,810
It appears as though whoever checked in python changes didn't re-run regenerate:expected. I am modifying these files as a result of running that after a sync and build.
Azure-autorest
java
@@ -329,4 +329,13 @@ public abstract class FlatteningConfig { paramList.forEach(p -> paramsAsString.append(p.getSimpleName()).append(", ")); return paramsAsString.toString(); } + + /** Return if the flattening config contains a parameter that is a resource name. */ + public static boolean hasAnyResourceN...
1
/* Copyright 2016 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
1
29,260
This was copied from JavaMethodViewGenerator; only the `public static` method modifiers were added.
googleapis-gapic-generator
java
@@ -327,6 +327,18 @@ public class Transaction implements org.hyperledger.besu.plugin.data.Transaction return Optional.ofNullable(maxFeePerGas); } + public long getEffectivePriorityFeePerGas(final Optional<Long> maybeBaseFee) { + return maybeBaseFee + .filter(__ -> getType().supports1559FeeMarket())...
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,407
this is going to throw for frontier transactions post-london
hyperledger-besu
java
@@ -389,8 +389,6 @@ class PropelInitService $theliaDatabaseConnection->useDebug(true); } } catch (\Throwable $th) { - Tlog::getInstance()->error("Failed to initialize Propel : " . $th->getMessage()); - throw $th; } finally { // Release...
1
<?php namespace Thelia\Core; use Propel\Generator\Command\ConfigConvertCommand; use Propel\Generator\Command\ModelBuildCommand; use Propel\Runtime\Connection\ConnectionWrapper; use Propel\Runtime\Propel; use Symfony\Component\ClassLoader\ClassLoader; use Symfony\Component\Config\ConfigCache; use Symfony\Component\Con...
1
12,472
The catch clause is not needed. The finally clause alone is enough.
thelia-thelia
php
@@ -117,6 +117,10 @@ public class DistributorStatus { return up; } + public boolean isDocker() { + return up; + } + public int getMaxSessionCount() { return maxSessionCount; }
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
17,772
Prefer a human-readable string rather than querying specific technologies. How would I indicate a session is running on BrowserStack? Or some custom thing?
SeleniumHQ-selenium
rb
@@ -99,7 +99,7 @@ SRVR_STMT_HDL::SRVR_STMT_HDL(long inDialogueId) moduleName[0] = '\0'; inputDescName[0] = '\0'; outputDescName[0] = '\0'; - isClosed = TRUE; + isClosed = FALSE; IPD = NULL; IRD = NULL; useDefaultDesc = FALSE;
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 ownershi...
1
9,236
Changing the default value for isClosed from TRUE to FALSE can have other repercussions. We might miss throwing error. Can you please confirm this change.
apache-trafodion
cpp
@@ -286,11 +286,13 @@ func (payloadHandler *payloadRequestHandler) handleUnrecognizedTask(task *ecsacs } // Only need to stop the task; it brings down the containers too. - payloadHandler.taskHandler.AddTaskEvent(api.TaskStateChange{ + te := api.TaskStateChange{ TaskArn: *task.Arn, Status: api.TaskStopped,...
1
// Copyright 2014-2016 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
15,410
Please use more meaningful names than `te`here and in other places.
aws-amazon-ecs-agent
go
@@ -33,8 +33,9 @@ type Catalog interface { // the generic Plugin type Plugins() []*ManagedPlugin - // Finds plugin metadata - Find(Plugin) *ManagedPlugin + // ConfigFor finds the plugin configuration for the supplied plugin. nil + // is returned if the plugin is not managed by the catalog. + ConfigFor(interface{}...
1
package catalog import ( "context" "crypto/sha256" "encoding/hex" "errors" "fmt" "os/exec" "sync" "github.com/sirupsen/logrus" "github.com/spiffe/spire/pkg/common/log" goplugin "github.com/hashicorp/go-plugin" pb "github.com/spiffe/spire/proto/common/plugin" ) type Catalog interface { // Run reads all c...
1
9,502
Perhaps this would be more idiomatic as `ConfigFor(interface{}) (*PluginConfig, bool)`?
spiffe-spire
go
@@ -3,9 +3,10 @@ from requests.models import Request from localstack.utils.common import to_str from localstack.services.generic_proxy import ProxyListener +AWS_JSON_CONTENT_TYPE = 'application/x-amz-json-1.1' -class ProxyListenerCloudWatchLogs(ProxyListener): +class ProxyListenerCloudWatchLogs(ProxyListener): ...
1
import re from requests.models import Request from localstack.utils.common import to_str from localstack.services.generic_proxy import ProxyListener class ProxyListenerCloudWatchLogs(ProxyListener): def forward_request(self, method, path, data, headers): if method == 'POST' and path == '/': i...
1
10,784
nit: We could import `APPLICATION_AMZ_JSON_1_1` from `constants.py` here.
localstack-localstack
py
@@ -0,0 +1,15 @@ +// 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 +{ + public int...
1
1
13,992
Should this not inherit from IMvxMainThreadDispatcher?
MvvmCross-MvvmCross
.cs
@@ -19,18 +19,13 @@ import ( type roundCalculator struct { chain ChainManager - blockInterval time.Duration timeBasedRotation bool rp *rolldpos.Protocol candidatesByHeightFunc CandidatesByHeightFunc beringHeight uint64 } -func (c *roundCalcula...
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,117
line is 167 characters (from `lll`)
iotexproject-iotex-core
go
@@ -13,6 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // </copyright> +using System.Collections.Generic; using System.Diagnostics; using OpenTelemetry; using OpenTelemetry.Resources;
1
// <copyright file="TestJaegerExporter.cs" company="OpenTelemetry Authors"> // Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apa...
1
19,785
nit: consider adding a blank line between L15 and L16.
open-telemetry-opentelemetry-dotnet
.cs
@@ -445,10 +445,11 @@ void Storage::PopulateLayout(DataLayout &layout) { io::FileReader maneuver_overrides_file(config.GetPath(".osrm.maneuver_overrides"), io::FileReader::VerifyFingerprint); - const auto number_of_overrides = maneuver_overrides_file....
1
#include "storage/storage.hpp" #include "storage/io.hpp" #include "storage/shared_datatype.hpp" #include "storage/shared_memory.hpp" #include "storage/shared_memory_ownership.hpp" #include "storage/shared_monitor.hpp" #include "contractor/files.hpp" #include "contractor/query_graph.hpp" #include "customizer/edge_bas...
1
23,469
This is another bug fix: Without skipping the bytes of the vector this would read garbage data.
Project-OSRM-osrm-backend
cpp
@@ -353,10 +353,12 @@ func (bc *blockchain) startExistingBlockchain(recoveryHeight uint64) error { } ws, err := bc.sf.NewWorkingSet() if err != nil { - return errors.Wrap(err, "Failed to obtain working set from state factory") + return errors.Wrap(err, "failed to obtain working set from state factory") } //...
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,286
why need this? i don't see Gen.CreatorPubKey being used?
iotexproject-iotex-core
go
@@ -147,6 +147,8 @@ OpenStreetMap::Application.routes.draw do get "/help" => "site#help" get "/about/:about_locale" => "site#about" get "/about" => "site#about" + get "/communities" => "site#communities" + get "/communities/:communities_locale" => "site#communities" get "/history" => "changesets#index" ...
1
OpenStreetMap::Application.routes.draw do use_doorkeeper :scope => "oauth2" do controllers :authorizations => "oauth2_authorizations", :applications => "oauth2_applications", :authorized_applications => "oauth2_authorized_applications" end # API namespace :api do get "ca...
1
13,530
As previously mentioned, best to drop this locale override. It's not something we only provide in exceptional circumstances. Moreover, it doesn't work for this PR anyway, while massively increasing the code complexity!
openstreetmap-openstreetmap-website
rb
@@ -24,5 +24,16 @@ var ( "openebs.io/version": "{{.}}" } } + }` + // VersionDetailsPatch is generic template for version details patch + VersionDetailsPatch = `{ + "metadata": { + "labels": { + "openebs.io/version": "{{.}}" + } + }, + "versionDetails": { + "desired": "{{.}}" + } }` )
1
/* Copyright 2019 The OpenEBS Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
1
17,402
is this supposed to be `Desired`?
openebs-maya
go
@@ -1903,9 +1903,6 @@ public class TestPointQueries extends LuceneTestCase { upperBound[i] = value[i] + random().nextInt(1); } Query query = IntPoint.newRangeQuery("point", lowerBound, upperBound); - Weight weight = searcher.createWeight(query, ScoreMode.COMPLETE_NO_SCORES, 1); - Scorer scorer = ...
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
27,921
The iterator is not wrapped when the score mode is set to `COMPLETE_NO_SCORES` so you don't need to change this assertion anymore ?
apache-lucene-solr
java
@@ -9,7 +9,8 @@ def render_template(template, destination, **kwargs): template = os.path.join(HERE, template) folder = os.path.dirname(destination) - os.makedirs(folder) + if os.path.exists(folder) == False: + os.makedirs(folder) with codecs.open(template, 'r', encoding='utf-8') as f...
1
import os import binascii import codecs HERE = os.path.abspath(os.path.dirname(__file__)) def render_template(template, destination, **kwargs): template = os.path.join(HERE, template) folder = os.path.dirname(destination) os.makedirs(folder) with codecs.open(template, 'r', encoding='utf-8') as f: ...
1
8,386
Is there too much spaces there? (should be 4 I think)
Kinto-kinto
py
@@ -57,6 +57,8 @@ public class KieClient { private static final int LONG_POLLING_WAIT_TIME_IN_SECONDS = 30; + private static String revision = "0"; + private static final KieConfig KIE_CONFIG = KieConfig.INSTANCE; private final int refreshInterval = KIE_CONFIG.getRefreshInterval();
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,790
IS_FIRST_PULL revision is better to use instance property, not static. When KieClient has only one instance, instance property is better. When KieClient has many instances(not possible), static is not good eitheir.
apache-servicecomb-java-chassis
java
@@ -1,4 +1,5 @@ <?php return [ 'extends' => 'bootstrap3', + 'mixins' => ['fontawesome5_icon_mixin'], ];
1
<?php return [ 'extends' => 'bootstrap3', ];
1
31,837
This needs to be removed since we removed the mixin.
vufind-org-vufind
php
@@ -219,8 +219,7 @@ RaftPart::RaftPart(ClusterID clusterId, , ioThreadPool_{pool} , bgWorkers_{workers} , executor_(executor) - , snapshot_(snapshotMan) - , weight_(1) { + , snapshot_(snapshotMan) { FileBasedWalPolicy policy; policy.ttl = FLAGS_wal_ttl; pol...
1
/* Copyright (c) 2018 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "base/Base.h" #include "kvstore/raftex/RaftPart.h" #include <folly/io/async/EventBaseManager.h> #include <folly...
1
29,863
Can `weight_` be deleted?
vesoft-inc-nebula
cpp
@@ -50,6 +50,17 @@ class EasyAdminExtension extends Extension } $this->ensureBackwardCompatibility($container); + + if ($container->hasParameter('locale')) { + $container->getDefinition('easyadmin.configuration.design_config_pass') + ->replaceArgument(1, $container->...
1
<?php /* * This file is part of the EasyAdminBundle. * * (c) Javier Eguiluz <javier.eguiluz@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace JavierEguiluz\Bundle\EasyAdminBundle\DependencyInjection; use Javie...
1
11,005
This is fine, but by Symfony convention this part is responsability of the compiler pass class, i.e `DependencyInjection\Compiler\?`
EasyCorp-EasyAdminBundle
php
@@ -9,6 +9,18 @@ module Unix::File execute("mktemp -td #{name}.XXXXXX") end + # Create a temporary directory owned by the Puppet user. + # + # @param name [String] The name of the directory. It will be suffixed with a + # unique identifier to avoid conflicts. + # @return [String] The path to the tempo...
1
module Unix::File include Beaker::CommandFactory def tmpfile(name) execute("mktemp -t #{name}.XXXXXX") end def tmpdir(name) execute("mktemp -td #{name}.XXXXXX") end def path_split(paths) paths.split(':') end def file_exist?(path) result = exec(Beaker::Command.new("test -e #{path}"), ...
1
5,840
The host object already has a nice way of querying configprint. Try `puppet('master')['user']`
voxpupuli-beaker
rb
@@ -20,6 +20,7 @@ from mitmproxy.addons import stickycookie from mitmproxy.addons import streambodies from mitmproxy.addons import save from mitmproxy.addons import upstream_auth +from mitmproxy.addons import upload def default_addons():
1
from mitmproxy.addons import allowremote from mitmproxy.addons import anticache from mitmproxy.addons import anticomp from mitmproxy.addons import browser from mitmproxy.addons import check_ca from mitmproxy.addons import clientplayback from mitmproxy.addons import core_option_validation from mitmproxy.addons import co...
1
13,747
Let's call this `share` and not `upload` - the user wants to share their flows, uploading is just the implementation of that. :)
mitmproxy-mitmproxy
py
@@ -6,8 +6,9 @@ import wx import gui +import config -class SpeechViewerFrame(wx.MiniFrame): +class SpeechViewerFrame(wx.Dialog): def __init__(self): super(SpeechViewerFrame, self).__init__(gui.mainFrame, wx.ID_ANY, _("NVDA Speech Viewer"), style=wx.CAPTION | wx.RESIZE_BORDER | wx.STAY_ON_TOP)
1
#speechViewer.py #A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2006-2008 NVDA Contributors <http://www.nvda-project.org/> #This file is covered by the GNU General Public License. #See the file COPYING for more details. import wx import gui class SpeechViewerFrame(wx.MiniFrame): def __init__(s...
1
18,203
It would be better to keep focus on the main text control. But to get around the fact that Dialogs focus their first child on show, even when not active, something like Dialog.isActive should be chcked when appending text, rather than whether the text control has focus.
nvaccess-nvda
py
@@ -1205,6 +1205,7 @@ end_and_emit_trace(dcontext_t *dcontext, fragment_t *cur_f) target = opnd_get_pc(instr_get_target(last)); md->emitted_size -= local_exit_stub_size(dcontext, target, md->trace_flags); } + IF_AARCH64(md->emitted_size += fixup_indirect_trace_exit(dcontext, trace)); if...
1
/* ********************************************************** * Copyright (c) 2012-2021 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
24,388
So is this invoked every time we extend the trace?
DynamoRIO-dynamorio
c
@@ -55,11 +55,16 @@ constexpr int64_t kMaxTimestamp = std::numeric_limits<int64_t>::max() / 10000000 return Status::Error("Invalid second number `%ld'.", kv.second.getInt()); } dt.sec = kv.second.getInt(); + } else if (kv.first == "millisecond") { + if (kv.second.getInt() < 0 || kv.second...
1
/* Copyright (c) 2020 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "common/time/TimeUtils.h" #include <limits> #include "common/fs/FileUtils.h" #include "common/time/TimezoneIn...
1
30,741
Why not use switch here?
vesoft-inc-nebula
cpp
@@ -37,6 +37,7 @@ type Route struct { Method string Path string HandlerFunc HandlerFunc + AuthFree bool // routes that has the AuthFree set to true doesn't require authentication } // Routes contains all routes
1
// Copyright (C) 2019-2020 Algorand, Inc. // This file is part of go-algorand // // go-algorand is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) ...
1
38,443
I think `NoAuth` is a better name
algorand-go-algorand
go
@@ -214,6 +214,13 @@ func (es *{{ $esapi.Name }}) waitStreamPartClose() { es.inputWriter = inputWriter } + func (es *{{ $esapi.Name }}) closeInputWriter(r *request.Request) { + err := es.inputWriter.Close() + if err != nil { + r.Error = awserr.New(eventstreamapi.InputWriterCloseErrorCode, err.Error(), r.Err...
1
// +build codegen package api import ( "fmt" "io" "strings" "text/template" ) func renderEventStreamAPI(w io.Writer, op *Operation) error { // Imports needed by the EventStream APIs. op.API.AddImport("fmt") op.API.AddImport("bytes") op.API.AddImport("io") op.API.AddImport("time") op.API.AddSDKImport("aws")...
1
10,328
This does create a minor bifurcation in how closing the InputWriter is done in success vs failure cases. Is there anyway to merge this with the success exit path? This is something that seems like it would be better as a function closure instead of method on the `$esapi.Name` type. Can the `es.Close` not be used instea...
aws-aws-sdk-go
go
@@ -132,7 +132,6 @@ class RootContext(object): class Log(object): - def __init__(self, msg, level="info"): self.msg = msg self.level = level
1
from __future__ import (absolute_import, print_function, division) import sys import six from mitmproxy.exceptions import ProtocolException, TlsProtocolException from netlib.exceptions import TcpException from ..protocol import ( RawTCPLayer, TlsLayer, Http1Layer, Http2Layer, is_tls_record_magic, ServerConnection...
1
11,495
Please keep this blank line. PEP8 says: > Method definitions inside a class are surrounded by a single blank line.
mitmproxy-mitmproxy
py
@@ -6,7 +6,7 @@ <%= link_to(t(:'blacklight.search.per_page.button_label', :count => current_per_page), "#") %> <span class="caret"></span> <ul> <%- blacklight_config.per_page.each do |count| %> - <li><%= link_to(t(:'blacklight.search.per_page.label', :count => count).html_safe, url_for(p...
1
<% if show_sort_and_per_page? and !blacklight_config.per_page.blank? %> <div id="per_page-dropdown" class="dropdown pull-right hidden-phone"> <span class="hide-text"><%= t('blacklight.search.per_page.title') %></span> <ul class="css-dropdown"> <li class="btn"> <%= link_to(t(:'blacklight.search.per_page.b...
1
4,780
You are not passing in a `:params` key here.
projectblacklight-blacklight
rb
@@ -79,6 +79,7 @@ func (i *Initializer) prepareHostNetwork() error { // prepareOVSBridge adds local port and uplink to ovs bridge. // This function will delete OVS bridge and HNS network created by antrea on failure. func (i *Initializer) prepareOVSBridge() error { + klog.Info("preparing ovs bridge ...") hnsNetwor...
1
// +build windows // 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 applicabl...
1
29,720
Probably change "ovs" to "OVS".
antrea-io-antrea
go
@@ -87,7 +87,9 @@ abstract class BaseMediaAdmin extends AbstractAdmin $this->getRequest()->query->set('provider', $provider); } - $categoryId = $this->getRequest()->get('category'); + $uniqueId = $this->getRequest()->get('uniqid'); + $formParams = $this->getRequest()->get($...
1
<?php /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\MediaBundle\Admin; use Sonata\AdminBundle\Admi...
1
9,885
Please linebreak this
sonata-project-SonataMediaBundle
php
@@ -21,7 +21,7 @@ namespace Nethermind.Blockchain.Data { public class EmptyLocalDataSource<T> : ILocalDataSource<T> { - public T Data { get; } = default; - public event EventHandler Changed; + public T? Data { get; } + public event EventHandler? Changed; } }
1
// Copyright (c) 2018 Demerzel Solutions Limited // This file is part of the Nethermind library. // // The Nethermind library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of...
1
24,805
`= default` is implied here, so having it is redundant. Is it a stylistic choice to include it, or just an oversight?
NethermindEth-nethermind
.cs
@@ -226,7 +226,7 @@ type wsPipelineReader interface { wsPipelineManifestReader } -type wsProjectManager interface { +type wsAppManager interface { Create(projectName string) error Summary() (*workspace.Summary, error) }
1
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli import ( "encoding" "io" "github.com/aws/amazon-ecs-cli-v2/internal/pkg/aws/cloudwatchlogs" "github.com/aws/amazon-ecs-cli-v2/internal/pkg/aws/codepipeline" "github.com/aws/amazon-ecs-cli-v2/i...
1
13,126
Maybe it's time to fix the param name for this interface?
aws-copilot-cli
go
@@ -232,9 +232,6 @@ type ( CancelRequestId string StickyTaskQueue string StickyScheduleToStartTimeout *time.Duration - ClientLibraryVersion string - ClientFeatureVersion string - ClientImpl ...
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,253
Why are we removing it? Looks like useful info. Obviously, field names should change.
temporalio-temporal
go
@@ -49,12 +49,18 @@ namespace NLog.LayoutRenderers private const int MaxInitialRenderBufferLength = 16384; private int _maxRenderedLength; private bool _isInitialized; + private IValueFormatter _valueFormatter; /// <summary> /// Gets the logging configuration this t...
1
// // Copyright (c) 2004-2019 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
20,302
Missing fallback to MessageTemplates.ValueFormatter.Instance
NLog-NLog
.cs
@@ -1193,7 +1193,7 @@ class _Frame(object): # TODO: by argument only support the grouping name and as_index only for now. Documentation # should be updated when it's supported. - def groupby(self, by, as_index: bool = True): + def groupby(self, by, axis=0, as_index: bool = True): """ ...
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
14,080
The parameter in the docstring should be fixed too. Actually, why don't you try to implement the other axis? It wouldn't be impossible to do if we use pandas UDF from a cursory look. We have enough time before the next release currently.
databricks-koalas
py
@@ -16,11 +16,13 @@ package patch import ( "context" + "fmt" "os" "time" - "github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/google-osconfig-agent/_internal/gapi-cloud-osconfig-go/cloud.google.com/go/osconfig/apiv1alpha1" - osconfigpb "github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/...
1
// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
8,270
This also runs a patch if its in the middle of one.
GoogleCloudPlatform-compute-image-tools
go
@@ -248,7 +248,7 @@ func (task *Task) UpdateMountPoints(cont *Container, vols map[string]string) { // there was no change // Invariant: task known status is the minimum of container known status func (task *Task) updateTaskKnownStatus() (newStatus TaskStatus) { - seelog.Debug("Updating task: %s", task.String()) + se...
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,900
Could we rename this method to `updateKnownStatus` ?
aws-amazon-ecs-agent
go
@@ -76,6 +76,12 @@ namespace Datadog.Trace Tracer.Sampler?.GetSamplingPriority(RootSpan); } } + + // set the origin tag to the root span of each trace/subtrace + if (span.Context.Origin != null) + ...
1
using System; using System.Collections.Generic; using System.Diagnostics; using Datadog.Trace.Logging; using Datadog.Trace.PlatformHelpers; using Datadog.Trace.Util; namespace Datadog.Trace { internal class TraceContext : ITraceContext { private static readonly Vendors.Serilog.ILogger Log = DatadogLogg...
1
17,215
Maybe it would make sense to move that to DecorateRootSpan? Currently it only has Azure stuff, but given the name of the method I feel like it would be semantically appropriate
DataDog-dd-trace-dotnet
.cs
@@ -5,13 +5,14 @@ import ( "sync" "github.com/pkg/errors" - coreapi "k8s.io/api/core/v1" - extnapi "k8s.io/api/extensions/v1beta1" - networkingv1 "k8s.io/api/networking/v1" - "github.com/weaveworks/weave/common" "github.com/weaveworks/weave/net/ipset" "github.com/weaveworks/weave/npc/iptables" + coreapi "k8...
1
package npc import ( "fmt" "sync" "github.com/pkg/errors" coreapi "k8s.io/api/core/v1" extnapi "k8s.io/api/extensions/v1beta1" networkingv1 "k8s.io/api/networking/v1" "github.com/weaveworks/weave/common" "github.com/weaveworks/weave/net/ipset" "github.com/weaveworks/weave/npc/iptables" ) type NetworkPolicy...
1
15,822
nit: these imports were in a separate group to ones from this repo
weaveworks-weave
go
@@ -22,4 +22,12 @@ public enum DispatchMethod { public static boolean isPollMethodEnabled(String dispatchMethod) { return DispatchMethod.getDispatchMethod(dispatchMethod) == DispatchMethod.POLL; } + + public static boolean isPushMethodEnabled(String dispatchMethod) { + return DispatchMethod.getDispatchMe...
1
package azkaban; import org.apache.log4j.Logger; public enum DispatchMethod { PUSH, POLL, PUSH_CONTAINERIZED; private static final Logger logger = Logger.getLogger(DispatchMethod.class); public static DispatchMethod getDispatchMethod(String value) { try { logger.info("Value of dispatch method is ...
1
19,952
Is it possible to rename the methods to `isXXXMethod` to keep the usage by the caller generic? The caller could use the result of these methods to verify whether a feature is enabled or to validate an input value for example.
azkaban-azkaban
java