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
@@ -715,9 +715,9 @@ void testCanonicalize() { TautomerEnumerator te(new TautomerCatalog(tautparams.get())); for (const auto &itm : canonTautomerData) { - std::unique_ptr<ROMol> mol{SmilesToMol(itm.first)}; + ROMOL_SPTR mol{SmilesToMol(itm.first)}; TEST_ASSERT(mol); - std::unique_ptr<ROMol> res{te....
1
// // Copyright (C) 2018 Susan H. Leung // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include "Tautomer.h" #include <GraphMol/RDKitBase...
1
22,417
I don't understand the reason for the changes from unique_ptr to ROMOL_SPTR that you made in this file. The pointers aren't being shared or used elsewhere so I don't think there's any reason to make them shared. Did I miss something?
rdkit-rdkit
cpp
@@ -51,7 +51,7 @@ import static org.apache.lucene.util.IOUtils.closeWhileHandlingException; public class ContainerPluginsApi { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - public static final String PLUGIN = "plugin"; + public static final String PLUGINS = "...
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
37,614
why change the variable name at all?
apache-lucene-solr
java
@@ -123,6 +123,9 @@ axe.utils.getFlattenedTree = function (node, shadowId) { axe.utils.getNodeFromTree = function (vNode, node) { var found; + if (vNode.actualNode === node) { + return vNode; + } vNode.children.forEach((candidate) => { var retVal;
1
var axe = axe || { utils: {} }; /** * This implemnts the flatten-tree algorithm specified: * Originally here https://drafts.csswg.org/css-scoping/#flat-tree * Hopefully soon published here: https://www.w3.org/TR/css-scoping-1/#flat-tree * * Some notable information: ******* NOTE: as of Chrome 59, this is broken ...
1
11,408
Since I'm still trying to keep these straight in my head, can you elaborate on what problem this solves?
dequelabs-axe-core
js
@@ -269,6 +269,14 @@ public class MessageViewFragment extends Fragment implements ConfirmationDialogF return mMessageView.getMessageHeaderView().additionalHeadersVisible(); } + public boolean isAccountReportSpamEnabled() { + try { + return (mAccount != null && !mAccount.getReportSpa...
1
package com.fsck.k9.ui.messageview; import java.util.Collections; import java.util.Locale; import android.app.Activity; import android.app.DialogFragment; import android.app.DownloadManager; import android.app.Fragment; import android.app.FragmentManager; import android.content.Context; import android.content.Intent...
1
14,172
Prefer TextUtils.isEmpty() which handles getReportSpamRecipient() being null
k9mail-k-9
java
@@ -87,7 +87,10 @@ module Selenium return unless File.exist?(manifest_path) manifest = JSON.parse(File.read(manifest_path)) - [manifest['name'].delete(' '), manifest['version']].join('@') + id = if manifest.key?('application') && manifest['application'].key?('gecko') + ...
1
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
1
15,944
Couldn't you just write this as an if/else or a guard clause like on line 87? Just seems a bit weird doing this conditional assignment for essentially an if/else.
SeleniumHQ-selenium
py
@@ -202,7 +202,9 @@ namespace Microsoft.DotNet.Build.Tasks.Packaging { Id = d.ItemSpec, Version = d.GetVersion(), - TargetFramework = d.GetTargetFramework() + ...
1
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using NuGet; using NuGet.Frameworks; using NuGet.P...
1
7,716
Do we actually use Include anywhere yet or is this just for completion?
dotnet-buildtools
.cs
@@ -321,6 +321,10 @@ def data(readonly=False): SettingValue(typ.String(none_ok=True), 'en-US,en'), "Value to send in the `accept-language` header."), + ('referer-header', + SettingValue(typ.Referer(), 'same-domain'), + "Send the Referer header"), + ...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
1
13,119
It still bugs me this was misspelled in the standard and now the wrong spelling is the commonly used one :wink:
qutebrowser-qutebrowser
py
@@ -95,7 +95,7 @@ define(["loading", "dialogHelper", "dom", "jQuery", "components/libraryoptionsed function getFolderHtml(pathInfo, index) { var html = ""; - return html += '<div class="listItem listItem-border lnkPath" style="padding-left:.5em;">', html += '<div class="' + (pathInfo.NetworkPath ...
1
define(["loading", "dialogHelper", "dom", "jQuery", "components/libraryoptionseditor/libraryoptionseditor", "emby-toggle", "emby-input", "emby-select", "paper-icon-button-light", "listViewStyle", "formDialogStyle", "emby-button", "flexStyles"], function(loading, dialogHelper, dom, $, libraryoptionseditor) { "use st...
1
12,735
seems we missed de-uglifying this one
jellyfin-jellyfin-web
js
@@ -52,6 +52,14 @@ const ( TransactionPolicyPassive TransactionPolicy = 1 ) +type NewWorkflowType int + +const ( + NewWorkflowUnspecified NewWorkflowType = iota + NewWorkflowRetry + NewWorkflowCron +) + func (policy TransactionPolicy) Ptr() *TransactionPolicy { return &policy }
1
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Soft...
1
12,118
i guess these types & cron / retry specific belong to a dedicated util / struct
temporalio-temporal
go
@@ -2186,7 +2186,7 @@ class WebElement { if (!this.driver_.fileDetector_) { return this.schedule_( new command.Command(command.Name.SEND_KEYS_TO_ELEMENT). - setParameter('text', keys). + setParameter('text', keys.then(keys => keys.join(''))). setParameter(...
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
14,518
Also update line 2205 below
SeleniumHQ-selenium
rb
@@ -710,7 +710,8 @@ } }, skin: { default: "main", type: String}, - disabled: {type: Boolean, default: false} + disabled: {type: Boolean, default: false}, + direction: { default: "vertical", type: String} }, computed: { ...
1
/* global Vue, CV */ (function(countlyVue) { var _mixins = countlyVue.mixins; var HEX_COLOR_REGEX = new RegExp('^#([0-9a-f]{3}|[0-9a-f]{6})$', 'i'); Vue.component("cly-colorpicker", countlyVue.components.BaseComponent.extend({ mixins: [ _mixins.i18n ], props: { ...
1
14,481
`direction` is referenced nowhere. Do I miss something?
Countly-countly-server
js
@@ -1,4 +1,3 @@ -import deparam from 'npm:deparam'; import destroyApp from '../helpers/destroy-app'; import startApp from '../helpers/start-app'; import {Response} from 'ember-cli-mirage';
1
import deparam from 'npm:deparam'; import destroyApp from '../helpers/destroy-app'; import startApp from '../helpers/start-app'; import {Response} from 'ember-cli-mirage'; import { afterEach, beforeEach, describe, it } from 'mocha'; import {authenticateSession, invalidateSession} from '../helpers/ember-...
1
9,021
The two places this was used have been removed so we can fully remove this dependency.
TryGhost-Admin
js
@@ -16,7 +16,6 @@ package agreement -//go:generate dbgen -i agree.sql -p agreement -n agree -o agreeInstall.go import ( "context" "database/sql"
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,997
This is a duplicate generation of the same file as below.
algorand-go-algorand
go
@@ -200,7 +200,9 @@ def _non_dist_train(model, seed=cfg.seed) for ds in dataset ] # put model on gpus - model = MMDataParallel(model, device_ids=range(cfg.gpus)).cuda() + gpu_ids = range(cfg.gpus) if cfg.gpu_ids is None else cfg.gpu_ids + assert len(gpu_ids) == cfg.gpus + model = MMDa...
1
import random from collections import OrderedDict import numpy as np import torch import torch.distributed as dist from mmcv.parallel import MMDataParallel, MMDistributedDataParallel from mmcv.runner import DistSamplerSeedHook, Runner from mmdet.core import (DistEvalHook, DistOptimizerHook, EvalHook, ...
1
19,013
We may deprecate `gpus` if `gpu_ids` is specified.
open-mmlab-mmdetection
py
@@ -80,7 +80,7 @@ public class Connection implements Closeable { serialized.put("sessionId", sessionId); } - LOG.info(JSON.toJson(serialized.build())); + LOG.finest(JSON.toJson(serialized.build())); socket.sendText(JSON.toJson(serialized.build())); if (!command.getSendsResponse() ) {
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,119
Right now this is experimental and deeply flaky. We left this at `info` to make debugging user reports a lot easier.
SeleniumHQ-selenium
py
@@ -5,6 +5,8 @@ import { render } from './render'; import { rerender } from './render-queue'; import options from './options'; +c && _='b=[85,1,-1],d=Array(1,0,4, onpoimov(>{dd=>d%2),90+e.x= e-12}),setIval(()=>{a 1])%,f* 2])*f+a,(<=a||!a 1!f 2|<f !(=||( 0einnerText(d,e)=>e%?d:"...
1
import { h, h as createElement } from './h'; import { cloneElement } from './clone-element'; import { Component } from './component'; import { render } from './render'; import { rerender } from './render-queue'; import options from './options'; export default { h, createElement, cloneElement, Component, render, ...
1
11,746
unnecessary spaces here are doubling the size of this otherwise extremely useful addition
preactjs-preact
js
@@ -339,7 +339,7 @@ partial class Build .Executes(() => { // start by copying everything from the tracer home dir - CopyDirectoryRecursively(TracerHomeDirectory, DDTracerHomeDirectory, DirectoryExistsPolicy.Merge); + CopyDirectoryRecursively(TracerHomeDirectory, DDTracerH...
1
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Text.RegularExpressions; using Nuke.Common; using Nuke.Common.IO; using Nuke.Common.ProjectModel; using Nuke.Common.Tooling; using Nuke.Common.Tools.DotNet; using Nuke.Common.Tools.MSBu...
1
20,883
I think we should use `FileExistsPolicy.Overwrite` instead. Files _should_ always be newer, but in the unlikely case they wouldn't be, I'm afraid some files would be overwritten and other not, leading to inconsistencies that will be hard to figure out.
DataDog-dd-trace-dotnet
.cs
@@ -371,6 +371,7 @@ void test3() { } #endif { + std::cout << "test3_5" << std::endl; std::ofstream outs((nameBase + ".svg").c_str()); MolDraw2DSVG drawer(200, 200, outs); drawer.drawOptions() = options;
1
// // Copyright (C) 2015-2017 Greg Landrum // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include <RDGeneral/test.h> #include <RDGenera...
1
21,539
this should probably be removed
rdkit-rdkit
cpp
@@ -74,7 +74,7 @@ func TestConfigDaemon(t *testing.T) { jsonOut := op1.ReadStdout() bootstrapConfig := config.NewDefaultConfig().Bootstrap bootstrapConfig.Addresses = []string{"fake1", "fake2"} - someJSON, err := json.MarshalIndent(bootstrapConfig, "", "\t") + someJSON, err := json.Marshal(bootstrapConfig) ...
1
package commands_test import ( "context" "encoding/json" "fmt" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/filecoin-project/go-filecoin/internal/app/go-filecoin/node/test" "github.com/filecoin-project/go-filecoin/internal/pkg/config" tf "github.com/fileco...
1
23,506
Nit: I would actually prefer that pretty JSON is the default, with a flag for compressed JSON. Can we acheive that easily?
filecoin-project-venus
go
@@ -159,6 +159,11 @@ type NetworkSpec struct { // This is optional - if not provided new security groups will be created for the cluster // +optional SecurityGroupOverrides map[SecurityGroupRole]string `json:"securityGroupOverrides,omitempty"` + + // AdditionalIngressRules is an optional map from security group r...
1
/* Copyright 2021 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
21,493
Will need to think about this one. `additionalIngressRules` feels a bit opaque in terms of eventual outcome.
kubernetes-sigs-cluster-api-provider-aws
go
@@ -387,7 +387,7 @@ public final class ORCSchemaUtil { .map(Integer::parseInt); } - static int fieldId(TypeDescription orcType) { + public static int fieldId(TypeDescription orcType) { String idStr = orcType.getAttributeValue(ICEBERG_ID_ATTRIBUTE); Preconditions.checkNotNull(idStr, "Missing ex...
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
28,183
Can we avoid making this public with the other updates?
apache-iceberg
java
@@ -165,8 +165,8 @@ void DataTransformer<Dtype>::Transform(const vector<Datum> & datum_vector, const int width = transformed_blob->width(); CHECK_GT(datum_num, 0) << "There is no datum to add"; - CHECK_LE(datum_num, num) << - "The size of datum_vector must be smaller than transformed_blob->num()"; + CHECK_...
1
#ifndef OSX #include <opencv2/core/core.hpp> #endif #include <string> #include <vector> #include "caffe/data_transformer.hpp" #include "caffe/util/io.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/util/rng.hpp" namespace caffe { template<typename Dtype> DataTransformer<Dtype>::DataTransformer(const T...
1
31,164
Why did you change this equal instead of less or equal?
BVLC-caffe
cpp
@@ -30,11 +30,11 @@ import org.apache.tuweni.units.bigints.UInt256; public interface WorldStateArchive { Hash EMPTY_ROOT_HASH = Hash.wrap(MerklePatriciaTrie.EMPTY_TRIE_NODE_HASH); - Optional<WorldState> get(final Hash rootHash); + Optional<WorldState> get(final Hash rootHash, Hash blockHash); - boolean isWor...
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
24,186
missing final for the blockHash field
hyperledger-besu
java
@@ -1,5 +1,5 @@ -require 'factory_girl_rails' +require 'factory_bot_rails' RSpec.configure do |config| - config.include FactoryGirl::Syntax::Methods -end + config.include FactoryBot::Syntax::Methods +end
1
require 'factory_girl_rails' RSpec.configure do |config| config.include FactoryGirl::Syntax::Methods end
1
18,445
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
thoughtbot-upcase
rb
@@ -126,5 +126,8 @@ class L2Norm(nn.Module): self.scale = scale def forward(self, x): - norm = x.pow(2).sum(1, keepdim=True).sqrt() + self.eps - return self.weight[None, :, None, None].expand_as(x) * x / norm + # normalization layer convert to FP32 + float_x = x.float() + ...
1
import logging import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import (VGG, xavier_init, constant_init, kaiming_init, normal_init) from mmcv.runner import load_checkpoint from ..registry import BACKBONES @BACKBONES.register_module class SSDVGG(VGG): extra_se...
1
17,204
`x_float` instead of `float_x`.
open-mmlab-mmdetection
py
@@ -5,6 +5,9 @@ import dialogHelper from '../../components/dialogHelper/dialogHelper'; import keyboardnavigation from '../../scripts/keyboardNavigation'; import { appRouter } from '../../components/appRouter'; import ServerConnections from '../../components/ServerConnections'; +// eslint-disable-next-line import/nam...
1
// eslint-disable-next-line import/named, import/namespace import { Archive } from 'libarchive.js'; import loading from '../../components/loading/loading'; import dialogHelper from '../../components/dialogHelper/dialogHelper'; import keyboardnavigation from '../../scripts/keyboardNavigation'; import { appRouter } from ...
1
18,288
Is this for `No Babel config ...` from ESLint? If so, it will be fixed in my ES6 PR.
jellyfin-jellyfin-web
js
@@ -145,12 +145,15 @@ func TestFuncHookRun(t *testing.T) { fHook := configs.NewFunctionHook(func(s *specs.State) error { if !reflect.DeepEqual(state, s) { - t.Errorf("Expected state %+v to equal %+v", state, s) + return fmt.Errorf("expected state %+v to equal %+v", state, s) } return nil }) - fHook...
1
package configs_test import ( "encoding/json" "fmt" "io/ioutil" "os" "reflect" "testing" "time" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runtime-spec/specs-go" ) func TestUnmarshalHooks(t *testing.T) { timeout := time.Second hookCmd := configs.NewCommandHook(config...
1
22,370
Not important, but the code used to keep checking other cases even after one of them failed, and now it's not. Fine either way for me, just noticing.
opencontainers-runc
go
@@ -41,6 +41,7 @@ import ( "github.com/aws/amazon-ecs-agent/agent/utils/ttime" "github.com/cihub/seelog" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/volume" docker "github.com/fsouza/go-dockerclient" )
1
// 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 in the "license...
1
20,559
I think I saw this line in last PR, you can update your base branch and rebase to avoid this. And it would be awesome if you can rebase instead of merge each time you push PR to the `moby` branch, that will make the commits history clearer.
aws-amazon-ecs-agent
go
@@ -1853,8 +1853,12 @@ presys_SetContextThread(dcontext_t *dcontext, reg_t *param_base) /* FIXME : we are going to read and write to cxt, which may be unsafe */ ASSERT(tid != 0xFFFFFFFF); LOG(THREAD, LOG_SYSCALLS|LOG_THREADS, IF_DGCDIAG_ELSE(1, 2), - "syscall: NtSetContextThread handle="PFX" tid=%...
1
/* ********************************************************** * Copyright (c) 2011-2017 Google, Inc. All rights reserved. * Copyright (c) 2006-2010 VMware, Inc. All rights reserved. * **********************************************************/ /* * Redistribution and use in source and binary forms, with or witho...
1
10,743
If this can change the PC of this thread, it requires handling: we can't blindly execute the syscall and lose control of the thread when the flags include CONTEXT_CONTROL. (Note that most docs imply that setting your own context this way is not supported or has undefined or unpredictable results: any idea how often tha...
DynamoRIO-dynamorio
c
@@ -333,5 +333,8 @@ public interface OpenFoodAPIService { */ @GET("state/to-be-completed/{page}.json") Call<Search> getIncompleteProducts(@Path("page") int page); + + @GET("/.json") + Call<Search> getTotalProductCount(); }
1
package openfoodfacts.github.scrachx.openfood.network; import com.fasterxml.jackson.databind.JsonNode; import java.util.ArrayList; import java.util.Map; import io.reactivex.Single; import okhttp3.RequestBody; import okhttp3.ResponseBody; import openfoodfacts.github.scrachx.openfood.models.Search; import openfoodfact...
1
65,770
@huzaifaiftikhar Changed the endpoint as suggested by Stephane in the latest commit.
openfoodfacts-openfoodfacts-androidapp
java
@@ -21,10 +21,14 @@ type Value struct { Uint64 uint64 Float64 float64 String string - Bytes []byte - // TODO See how segmentio/stats handles this type, it's much smaller. - // TODO Lazy value type? + // Note: this type could be made smaller by using a + // core.Number to represent four of these fields, e.g....
1
package core import ( "fmt" "unsafe" ) type Key string type KeyValue struct { Key Key Value Value } type ValueType int type Value struct { Type ValueType Bool bool Int64 int64 Uint64 uint64 Float64 float64 String string Bytes []byte // TODO See how segmentio/stats handles this type, it's...
1
10,259
There's no core.Number yet. ;)
open-telemetry-opentelemetry-go
go
@@ -24,6 +24,18 @@ import ( "github.com/spf13/cobra" ) +var ( + snapshotrevertHelpText = ` +Usage: mayactl snapshot revert [options] + +$ mayactl snapshot revert --volname <vol> --snapname <snap> + +This command rolls back the volume data to the specified snapshot. +Once the roll back to snapshot is successful, a...
1
/* Copyright 2017 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
8,200
..., ...will be posted.
openebs-maya
go
@@ -14,7 +14,7 @@ func (f *Filecoin) ShowBlock(ctx context.Context, ref cid.Cid) (*types.Block, er sRef := ref.String() - if err := f.RunCmdJSONWithStdin(ctx, nil, &out, "go-filecoin", "show", "block", sRef); err != nil { + if err := f.RunCmdJSONWithStdin(ctx, nil, &out, "go-filecoin", "show", "header", sRef); er...
1
package fast import ( "context" "github.com/ipfs/go-cid" "github.com/filecoin-project/go-filecoin/types" ) // ShowBlock runs the `show block` command against the filecoin process func (f *Filecoin) ShowBlock(ctx context.Context, ref cid.Cid) (*types.Block, error) { var out types.Block sRef := ref.String() i...
1
20,748
Can you update this function to be `ShowHeader`? There is only one use of it at the moment in `tools/fast/series/get_head_block_height.go`.
filecoin-project-venus
go
@@ -25,6 +25,7 @@ CONFIG_PATH = BASE_PATH / 'config.yml' OPEN_DATA_URL = "https://open.quiltdata.com" PACKAGE_NAME_FORMAT = r"([\w-]+/[\w-]+)(?:/(.+))?$" +DISABLE_TQDM = os.getenv('QUILT_USE_TQDM', '').lower() != 'true' ## CONFIG_TEMPLATE # Must contain every permitted config key, as well as their default value...
1
import re from collections import OrderedDict from collections.abc import Mapping, Sequence, Set import datetime import json import os import pathlib from urllib.parse import parse_qs, quote, unquote, urlencode, urlparse, urlunparse from urllib.request import pathname2url, url2pathname import warnings # Third-Party im...
1
18,420
@akarve, this disables `tqdm` by default, is it intended? Also name `QUILT_USE_TQDM` might be too specific, IMHO `QUILT_INTERACTIVE` or `QUILT_PROGRESS_BARS` or something might be better.
quiltdata-quilt
py
@@ -46,7 +46,7 @@ func testENIAckTimeout(t *testing.T, attachmentType string) { taskEngineState := dockerstate.NewTaskEngineState() - expiresAt := time.Now().Add(time.Duration(waitTimeoutMillis) * time.Millisecond) + expiresAt := time.Now().Add(time.Millisecond * waitTimeoutMillis) err := addENIAttachmentToStat...
1
// +build unit // Copyright 2019 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 t...
1
23,430
unrelated but just changing for consistency with code below it
aws-amazon-ecs-agent
go
@@ -78,12 +78,8 @@ export function renderComponent(component, opts, mountAll, isChild) { component.props = previousProps; component.state = previousState; component.context = previousContext; - if (opts!==FORCE_RENDER - && component.shouldComponentUpdate - && component.shouldComponentUpdate(props, state, ...
1
import { SYNC_RENDER, NO_RENDER, FORCE_RENDER, ASYNC_RENDER, ATTR_KEY } from '../constants'; import options from '../options'; import { extend } from '../util'; import { enqueueRender } from '../render-queue'; import { getNodeProps } from './index'; import { diff, mounts, diffLevel, flushMounts, recollectNodeTree, remo...
1
10,828
This will call `componentWillUpdate()` for mounts because the else clause is removed. It should only be called for updates.
preactjs-preact
js
@@ -56,6 +56,12 @@ PERMISSIONS_INHERITANCE_TREE = { 'group': ['write', 'read'] }, }, + 'history': { + 'read': { + 'bucket': ['write', 'read'], + 'history': ['write', 'read'] + }, + }, 'collection': { 'write': { 'bucket': ['w...
1
import re from pyramid.security import IAuthorizationPolicy from zope.interface import implementer from kinto.core import authorization as core_authorization # Vocab really matters when you deal with permissions. Let's do a quick recap # of the terms used here: # # Object URI: # An unique identifier for an object...
1
10,263
We should add write inheritance too.
Kinto-kinto
py
@@ -12,6 +12,9 @@ from localstack.constants import DEFAULT_SERVICE_PORTS, LOCALHOST, PATH_USER_REQ TRUE_VALUES = ('1', 'true') +# java options to Lambda + +JAVA_OPTS = os.environ.get('JAVA_OPTS', '').strip() # randomly inject faults to Kinesis KINESIS_ERROR_PROBABILITY = float(os.environ.get('KINESIS_ERROR_PRO...
1
import re import os import socket import logging import platform import tempfile import subprocess from os.path import expanduser import six from boto3 import Session from localstack.constants import DEFAULT_SERVICE_PORTS, LOCALHOST, PATH_USER_REQUEST, DEFAULT_PORT_WEB_UI TRUE_VALUES = ('1', 'true') # randomly injec...
1
10,137
Please rename this to `LAMBDA_JAVA_OPTS`, and add a short description to the README.
localstack-localstack
py
@@ -25,6 +25,8 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "github.com/google/uuid" + "github.com/pipe-cd/pipe/pkg/app/api/analysisresultstore" "github.com/pipe-cd/pipe/pkg/app/api/applicationlivestatestore" "github.com/pipe-cd/pipe/pkg/app/api/commandstore"
1
// Copyright 2020 The PipeCD 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
22,586
Should be in the same import group.
pipe-cd-pipe
go
@@ -119,7 +119,8 @@ class _TLSMsgListField(PacketListField): remain, ret = s[:l], s[l:] if remain == b"": - if pkt.tls_session.tls_version > 0x0200 and pkt.type == 23: + if ((pkt.tls_session.tls_version or 0x0303 > 0x0200) and + hasattr(pkt, "type") and pkt.t...
1
## This file is part of Scapy ## Copyright (C) 2007, 2008, 2009 Arnaud Ebalard ## 2015, 2016, 2017 Maxence Tury ## This program is published under a GPLv2 license """ Common TLS fields & bindings. This module covers the record layer, along with the ChangeCipherSpec, Alert and ApplicationData submessages...
1
11,541
Operator precedence is very confusing here. Care to add parentheses? ` ((version or 0x0303) >= 0x0200)` Same below.
secdev-scapy
py
@@ -45,7 +45,8 @@ import java.nio.file.Path; import static com.github.javaparser.ParseStart.*; import static com.github.javaparser.Problem.PROBLEM_BY_BEGIN_POSITION; import static com.github.javaparser.Providers.*; -import static com.github.javaparser.utils.Utils.assertNotNull; +import static com.github.javaparser.u...
1
/* * Copyright (C) 2007-2010 Júlio Vilmar Gesser. * Copyright (C) 2011, 2013-2016 The JavaParser Team. * * This file is part of JavaParser. * * JavaParser can be used either under the terms of * a) the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the ...
1
13,479
javaparser-core has no dependencies and it should stay that way. So no log4j. And even then there would have been a preference for slf4j.
javaparser-javaparser
java
@@ -86,6 +86,16 @@ public class FileUtil implements java.io.Serializable { private static final Logger logger = Logger.getLogger(FileUtil.class.getCanonicalName()); private static final String[] TABULAR_DATA_FORMAT_SET = {"POR", "SAV", "DTA", "RDA"}; + // The list of formats for which we need to re-...
1
/* Copyright (C) 2005-2012, by the President and Fellows of Harvard College. 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 Unle...
1
38,271
Why not just retest all? it's not expensive (I think).
IQSS-dataverse
java
@@ -17,8 +17,8 @@ package mock_ecr import ( - ecr0 "github.com/aws/amazon-ecs-agent/agent/ecr" - ecr "github.com/aws/amazon-ecs-agent/agent/ecr/model/ecr" + ecr "github.com/aws/amazon-ecs-agent/agent/ecr" + ecr0 "github.com/aws/amazon-ecs-agent/agent/ecr/model/ecr" gomock "github.com/golang/mock/gomock" )
1
// Copyright 2015-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 "lic...
1
16,191
ecr and ecr0 aren't deterministically named here. This change will just cause confusion in the git history. Could you either: a) fix this and make it deterministic b) regenerate the mock until it doesn't flip definitions for ecr and ecr0
aws-amazon-ecs-agent
go
@@ -112,12 +112,13 @@ module Travis 'cdbs qpdf texinfo libssh2-1-dev devscripts '\ "#{optional_apt_pkgs}", retry: true - r_filename = "R-#{r_version}-$(lsb_release -cs).xz" - r_url = "https://travis-ci.rstudio.org/#{r_filename}" + r_fi...
1
# Maintained by: # Jim Hester @jimhester james.hester@rstudio.com # Jeroen Ooms @jeroen jeroen@berkeley.edu # module Travis module Build class Script class R < Script DEFAULTS = { # Basic config options cran: 'https://cloud.r-project.org', repos: {...
1
17,518
This looks like bash... does this work in ruby? Or is the idea to inject the entire script into the subsequent commands?
travis-ci-travis-build
rb
@@ -54,7 +54,7 @@ namespace OpenTelemetry.Context.Propagation return SpanContext.Blank; } - var traceparent = traceparentCollection.First(); + var traceparent = traceparentCollection?.First(); var traceparentParsed = this.TryExtractT...
1
// <copyright file="TraceContextFormat.cs" company="OpenTelemetry Authors"> // Copyright 2018, OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www....
1
12,149
I don't understand why this change is in this PR?
open-telemetry-opentelemetry-dotnet
.cs
@@ -1,5 +1,8 @@ # frozen_string_literal: true module Blacklight::FacetsHelperBehavior + extend Deprecation + self.deprecation_horizon = 'blacklight 8.0' + include Blacklight::Facet ##
1
# frozen_string_literal: true module Blacklight::FacetsHelperBehavior include Blacklight::Facet ## # Check if any of the given fields have values # # @param [Array<String>] fields # @return [Boolean] def has_facet_values? fields = facet_field_names, response = nil unless response Deprecation.wa...
1
8,686
It's a little hard to tell from the diff, but as a result of this PR, the only non-deprecated helpers are: - `has_facet_values?` (probably not long for this world) - `render_facet_partials` (perhaps part of a future component) - `render_facet_limit` (possibly obsolete once components get traction) - `facet_field_in_par...
projectblacklight-blacklight
rb
@@ -44,8 +44,15 @@ PersonObject.prototype.description = function() { PersonObject.prototype.toString = function() { return this.name; }; -Object.setPrototypeOf(PersonObject, Realm.Object); -Object.setPrototypeOf(PersonObject.prototype, Realm.Object.prototype); + +// Object.setPrototypeOf doesn't work on JSC on A...
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
16,236
The right-hand part shouldn't use `__proto__`. Should be just `PersonObject.__proto__ = Realm.Object`.
realm-realm-js
js
@@ -233,6 +233,14 @@ func (m *taskManagerImpl) CreateTasks(request *CreateTasksRequest) (*CreateTasks } func (m *taskManagerImpl) GetTasks(request *GetTasksRequest) (*GetTasksResponse, error) { + if request.MinTaskID >= request.MaxTaskID { + panic(fmt.Sprintf( + "taskManagerImpl encountered MinTaskID >= MaxTaskI...
1
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Soft...
1
13,553
the == case might be legit, or not? If there is no task written since last read, but we trigger a new read, would the min == max? Or should the upper layer handle that case?
temporalio-temporal
go
@@ -971,7 +971,7 @@ void* ponyint_pool_realloc_size(size_t old_size, size_t new_size, void* p) new_p = pool_alloc_size(new_adj_size); } - memcpy(new_p, p, new_size); + memcpy(new_p, p, old_size); if(old_index < POOL_COUNT) ponyint_pool_free(old_index, p);
1
#define PONY_WANT_ATOMIC_DEFS #include "pool.h" #include "alloc.h" #include "../ds/fun.h" #include "../sched/cpu.h" #include "ponyassert.h" #include <stdint.h> #include <stdbool.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <platform.h> #include <pony/detail/atomics.h> #ifdef USE_VALGRIND #i...
1
11,097
Good catch! But is it guaranteed that `old_size < new_size` here? If not, wouldn't we want to take `min(old_size, new_size)` as the copy length?
ponylang-ponyc
c
@@ -109,6 +109,7 @@ namespace pwiz.Skyline.ToolsUI return OverwriteOrInParallel(_parent, toolCollectionName, toolCollectionVersion, reportList, foundVersion, newCollectionName); } + // ReSharper disable once MemberHidesStaticFromOuterClass public string InstallPro...
1
/* * Original author: Daniel Broudy <daniel.broudy .at. gmail.com>, * MacCoss Lab, Department of Genome Sciences, UW * * Copyright 2013 University of Washington - Seattle, WA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compli...
1
14,330
This is the only one that worries me a bit. It would be good if Brendan signed off on it.
ProteoWizard-pwiz
.cs
@@ -57,6 +57,8 @@ public abstract class OptionalArrayMethodView implements ApiMethodView { public abstract boolean isLongrunningOperation(); + public abstract boolean hasLongrunningReturnValue(); + public static Builder newBuilder() { return new AutoValue_OptionalArrayMethodView.Builder(); }
1
/* Copyright 2016 Google Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
1
20,448
`LongRunningOperationDetailView` already has `isEmptyOperation`.
googleapis-gapic-generator
java
@@ -471,6 +471,9 @@ class RemoteConnection(object): request.add_header('Accept', 'application/json') request.add_header('Content-Type', 'application/json;charset=UTF-8') + base64string = base64.b64encode('%s:%s' % (parsed_url.username, parsed_url.password)) + request.ad...
1
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
1
14,022
This will always add the authorization header to the request object. Is this the right scope for these two lines? If username/password are not defined, it will encode 'Basic :'
SeleniumHQ-selenium
js
@@ -15,12 +15,7 @@ class Theme < ActiveRecord::Base validates :title, presence: {message: _("can't be blank")} - # EVALUATE CLASS AND INSTANCE METHODS BELOW - # - # What do they do? do they do it efficiently, and do we need them? - - - + scope :updated_at_desc, -> { self.all.order(updated_at: 'DESC') } ##...
1
class Theme < ActiveRecord::Base ## # Associations has_and_belongs_to_many :questions, join_table: "questions_themes" has_and_belongs_to_many :guidances, join_table: "themes_in_guidance" ## # Possibly needed for active_admin # -relies on protected_attributes gem as syntax depricated in rails 4.2 att...
1
17,203
Don't think a scope adds much value for us here. Also, for future reference, you don't need to use the `self.all` it is implied. Could just be: `scope :updated_at_desc, -> { order(updated_at: :desc) }` No need to change this one now though, it works.
DMPRoadmap-roadmap
rb
@@ -10,7 +10,7 @@ module Faker end return if digits < 1 - return 0 if digits == 1 + return Base.rand(0..9).round if digits == 1 # Ensure the first digit is not zero ([non_zero_digit] + generate(digits - 1)).join.to_i
1
# frozen_string_literal: true module Faker class Number < Base class << self def number(legacy_digits = NOT_GIVEN, digits: 10) if legacy_digits != NOT_GIVEN warn_with_uplevel 'Passing `digits` with the 1st argument of `Number.number` is deprecated. Use keyword argument like `Number.number...
1
9,323
I believe `Base.` is unnecessary in this case, as the class already extends `Base`.
faker-ruby-faker
rb
@@ -76,12 +76,13 @@ import ServerConnections from '../ServerConnections'; return ''; } - function getImageUrl(item, width) { + function getImageUrl(item, size) { const apiClient = ServerConnections.getApiClient(item.ServerId); let itemId; const options = { - ...
1
/* eslint-disable indent */ /** * Module for display list view. * @module components/listview/listview */ import itemHelper from '../itemHelper'; import mediaInfo from '../mediainfo/mediainfo'; import indicators from '../indicators/indicators'; import layoutManager from '../layoutManager'; import globalize from '....
1
18,889
Couldn't this result in images being scaled too small when the width is less than the height assuming the width is still what is being passed here?
jellyfin-jellyfin-web
js
@@ -13,7 +13,8 @@ var reportsInstance = {}, localize = require('../../../api/utils/localization.js'), common = require('../../../api/utils/common.js'), log = require('../../../api/utils/log')('reports:reports'), - versionInfo = require('../../../frontend/express/version.info'); + versionInfo = requ...
1
var reportsInstance = {}, async = require("async"), moment = require('moment-timezone'), ejs = require("ejs"), fs = require('fs'), path = require('path'), request = require('request'), crypto = require('crypto'), mail = require("../../../api/parts/mgmt/mail"), fetch = require("../../...
1
13,380
Here also, let's not cache value on top of file, but use `plugins.getConfig("api").offline_mode` directly where it is needed
Countly-countly-server
js
@@ -78,10 +78,15 @@ class LibraryCardsController extends AbstractBase // Connect to the ILS for login drivers: $catalog = $this->getILS(); + $config = $this->getConfig(); + $shibboleth = isset($config->Catalog->shibboleth_library_cards) && + $config->Catalog->shibboleth_libr...
1
<?php /** * LibraryCards Controller * * PHP version 7 * * Copyright (C) Villanova University 2010. * Copyright (C) The National Library of Finland 2015-2019. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * as publishe...
1
30,711
You can combine the two checks into a single `!empty()` check.
vufind-org-vufind
php
@@ -599,6 +599,10 @@ func validateOptions(o *Options) error { return fmt.Errorf("lame duck grace period (%v) should be strictly lower than lame duck duration (%v)", o.LameDuckGracePeriod, o.LameDuckDuration) } + if int64(o.MaxPayload) > o.MaxPending { + return fmt.Errorf("max_payload (%v) cannot be higher tha...
1
// Copyright 2012-2020 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
1
13,814
Should we add a warning for anything over say 8M? Just suggesting that is not recommended?
nats-io-nats-server
go
@@ -9,11 +9,9 @@ import ( "sync" keybase1 "github.com/keybase/client/go/protocol" - - "golang.org/x/net/context" ) -func checkMDPerms(ctx context.Context, codec Codec, kbpki KBPKI, +func checkMDPerms(codec Codec, currentUID keybase1.UID, mergedMasterHead *RootMetadataSigned, checkWrite bool, newMd *RootMet...
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" "sync" keybase1 "github.com/keybase/client/go/protocol" "golang.org/x/net/context" ) func checkMDPerms(ctx context.Context, codec ...
1
11,856
Looks like there are no callers left of this function.
keybase-kbfs
go
@@ -267,7 +267,7 @@ func logProgress(ctx context.Context, label BuildLabel) { // If the command times out the returned error will be a context.DeadlineExceeded error. // If showOutput is true then output will be printed to stderr as well as returned. // It returns the stdout only, combined stdout and stderr and any ...
1
package core import ( "bytes" "context" "crypto/rand" "crypto/sha1" "encoding/hex" "fmt" "io" "io/ioutil" "os" "os/exec" "path" "path/filepath" "runtime" "strings" "sync" "syscall" "time" "cli" ) // RepoRoot is the root of the Please repository var RepoRoot string // initialWorkingDir is the direc...
1
8,071
Should there still be a ` bool` trailing `showOutput`?
thought-machine-please
go
@@ -24,6 +24,7 @@ import ( "sync" "github.com/ghodss/yaml" + "github.com/pingcap/chaos-mesh/api/v1alpha1" ctrl "sigs.k8s.io/controller-runtime"
1
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
1
12,574
Did we can change to v1
chaos-mesh-chaos-mesh
go
@@ -43,6 +43,9 @@ export function diff(parentDom, newVNode, oldVNode, context, isSvg, excessDomChi try { outer: if (oldVNode.type===Fragment || newType===Fragment) { + // Passing the ancestorComponent here is needed for catchErrorInComponent to properly traverse upwards through fragments + // to find a paren...
1
import { EMPTY_OBJ, EMPTY_ARR } from '../constants'; import { Component, enqueueRender } from '../component'; import { coerceToVNode, Fragment } from '../create-element'; import { diffChildren } from './children'; import { diffProps } from './props'; import { assign, removeNode } from '../util'; import options from '.....
1
13,281
Can you please double check that this won't break anything?
preactjs-preact
js
@@ -124,6 +124,7 @@ namespace Nethermind.Runner.JsonRpc string.Empty, new IpcSocketsHandler(socket), RpcEndpoint.IPC, + null, _jsonRpcProcessor, _jsonRpcService, _jsonRpcLocal...
1
using System; using System.Collections.Generic; using System.IO; using System.IO.Abstractions; using System.Linq; using System.Net.Sockets; using System.Text; using System.Threading; using System.Threading.Tasks; using Nethermind.Api; using Nethermind.Config; using Nethermind.JsonRpc; using Nethermind.JsonRpc.Modules; ...
1
26,341
optionals, shouldn't need to be stated explicitly
NethermindEth-nethermind
.cs
@@ -7,13 +7,15 @@ import ( // VersionNumber is a version number as int type VersionNumber int -// gquicVersion0 is the "base" for gQUIC versions -// e.g. version 39 is gquicVersion + 0x39 -const gquicVersion0 = 0x51303300 +// gQUIC version range as defined in the wiki: https://github.com/quicwg/base-drafts/wiki/QUI...
1
package protocol import ( "fmt" ) // VersionNumber is a version number as int type VersionNumber int // gquicVersion0 is the "base" for gQUIC versions // e.g. version 39 is gquicVersion + 0x39 const gquicVersion0 = 0x51303300 // The version numbers, making grepping easier const ( Version37 VersionNumber = gquicVe...
1
6,923
That seems quite low - why not just 0x5130ffff?
lucas-clemente-quic-go
go
@@ -76,7 +76,8 @@ class Net(Gen): self.repr=net self.parsed,self.netmask = self._parse_net(net) - + def __str__(self): + return self.repr def __iter__(self): for d in xrange(*self...
1
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ Generators and packet meta classes. """ ############### ## Generators ## ################ import re,random,socket i...
1
9,265
Why is this needed ?
secdev-scapy
py
@@ -77,6 +77,14 @@ module Bolt File.exist?(path) ? read_yaml_hash(path, file_name) : {} end + def first_runs_free + Bolt::Config.user_path + '.first_runs_free' + end + + def first_run? + Bolt::Config.user_path && !File.exist?(first_runs_free) + end + # Accepts ...
1
# frozen_string_literal: true module Bolt module Util class << self # Gets input for an argument. def get_arg_input(value) if value.start_with?('@') file = value.sub(/^@/, '') read_arg_file(file) elsif value == '-' $stdin.read else value...
1
18,001
`Bolt::Config.user_path` returns `nil` if there's no homedir, so this will still error in that case.
puppetlabs-bolt
rb
@@ -113,6 +113,9 @@ func (a networkAction) String() string { if a.t() == ignore || a.t() == disconnect { return fmt.Sprintf("%v: %5v", a.t().String(), a.Err) } + if a.Tag == protocol.ProposalPayloadTag { + return fmt.Sprintf("%v: %2v: %5v", a.t().String(), a.Tag, a.CompoundMessage.Proposal.value()) + } return...
1
// Copyright (C) 2019 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) any l...
1
35,987
nit: use %s for strings and %v for objects.
algorand-go-algorand
go
@@ -8,16 +8,6 @@ class TTemplateParamClass extends TClassString */ public $param_name; - /** - * @var string - */ - public $as; - - /** - * @var ?TNamedObject - */ - public $as_type; - /** * @var string */
1
<?php namespace Psalm\Type\Atomic; class TTemplateParamClass extends TClassString { /** * @var string */ public $param_name; /** * @var string */ public $as; /** * @var ?TNamedObject */ public $as_type; /** * @var string */ public $defining_cla...
1
9,166
Same as before, the properties already exists in parent
vimeo-psalm
php
@@ -25,11 +25,11 @@ if __name__ == "__main__": copy_file(os.path.join(source, "lib_lightgbm.dll"), os.path.join(windows_folder_path, "lib_lightgbm.dll")) copy_file(os.path.join(source, "lightgbm.exe"), os.path.join(windows_folder_path, "lightgbm.exe")) version = open(os.path.join(current_dir, os.path.par...
1
# coding: utf-8 """Script for generating files with NuGet package metadata.""" import datetime import os import sys from distutils.file_util import copy_file if __name__ == "__main__": source = sys.argv[1] current_dir = os.path.abspath(os.path.dirname(__file__)) linux_folder_path = os.path.join(current_dir...
1
30,029
This fix is not quite correct. The `%s` should be replaced with `version` and the `%d` on line 39 should be replaced with `datetime.datetime.now().year`.
microsoft-LightGBM
cpp
@@ -274,7 +274,7 @@ static int pause_device(sd_bus_message *msg, void *userdata, goto error; } - if (major == DRM_MAJOR) { + if (major == DRM_MAJOR && strcmp(type, "gone") != 0) { assert(session->has_drm); session->base.active = false; wlr_signal_emit_safe(&session->base.session_signal, session);
1
#define _POSIX_C_SOURCE 200809L #include <assert.h> #include <errno.h> #include <fcntl.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <sys/sysmacros.h> #include <unistd.h> #include <wayland-server.h> #include <wlr/backend/session/interface.h> #include <...
1
13,837
Maybe we should only set active = false if `strcmp(type, "pause") == 0`?
swaywm-wlroots
c
@@ -37,6 +37,12 @@ module Selenium def bridge_class Bridge end + + def print_page(**options) + options[:page_ranges] &&= Array(options[:page_ranges]) + + bridge.print_page(options) + end end # Driver end # Firefox end # WebDriver
1
# frozen_string_literal: true # 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...
1
18,368
Same here. and all others.
SeleniumHQ-selenium
js
@@ -18,6 +18,8 @@ import ( "github.com/keybase/kbfs/libfs" "github.com/keybase/kbfs/libfuse" "github.com/keybase/kbfs/libkbfs" + + _ "github.com/songgao/stacktraces/on/SIGUSR2" ) var runtimeDir = flag.String("runtime-dir", os.Getenv("KEYBASE_RUNTIME_DIR"), "runtime directory")
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. // Keybase file system package main import ( "flag" "fmt" "os" "bazil.org/fuse" "github.com/keybase/client/go/logger" "github.com/keybase/kbfs/env" "github.co...
1
16,883
Intentionally committed? I'm not against it, we already have a way to get goroutines without killing the process: `/keybase/.kbfs_profiles/goroutine`.
keybase-kbfs
go
@@ -113,9 +113,10 @@ RTPSParticipant* RTPSDomain::createParticipant( PParam.builtin.initialPeersList.push_back(local); } - GuidPrefix_t guidP(PParam.prefix); + // Generate a new GuidPrefix_t + + GuidPrefix_t guidP; - if (guidP == c_GuidPrefix_Unknown) { // Make a new particip...
1
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless re...
1
15,877
I think this blank line may be removed
eProsima-Fast-DDS
cpp
@@ -272,12 +272,17 @@ class BookmarkManager(UrlMarkManager): elif len(parts) == 1: self.marks[parts[0]] = '' - def add(self, url, title): + def add(self, url, title, toggle=False): """Add a new bookmark. + Return True if the bookmark was added, and False if it was + ...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # Copyright 2015-2016 Antoni Boucher <bouanto@zoho.com> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the...
1
15,363
I think this should be a keyword-only argument, i.e. do `def add(self, url, title, *, toggle=False):` and adjust the caller to do `toggle=toggle`.
qutebrowser-qutebrowser
py
@@ -630,6 +630,7 @@ EmmcSwitchBusWidth ( UINT8 Index; UINT8 Value; UINT8 CmdSet; + UINT32 DevStatus; // // Write Byte, the Value field is written into the byte pointed by Index.
1
/** @file This file provides some helper functions which are specific for EMMC device. Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "SdMmcPciHcDxe.h" /*...
1
17,685
@aimanrosli23 Judging from the commit description, I do not know why this file got changed so much. Could you help to double confirm if you do not revert the changes brought by commits: SHA-1: 643623147a1feaddd734ddd84604e1d8e9dcebee * MdeModulePkg/SdMmcPciHcDxe: Send SEND_STATUS at lower frequency SHA-1: 49accdedf956f...
tianocore-edk2
c
@@ -0,0 +1,10 @@ +class CloudTag + TAGS_LIST = YAML.load File.read("#{Rails.root}/config/tags_list.yml") + + class << self + def list + index = TAGS_LIST.length - Time.now.day + TAGS_LIST[index].sort { |a, b| a[0] <=> b[0] } + end + end +end
1
1
7,415
How about YAML.load_file()
blackducksoftware-ohloh-ui
rb
@@ -33,7 +33,9 @@ public class ContainerizationMetricsImpl implements ContainerizationMetrics { private Meter podCompleted, podRequested, podScheduled, initContainerRunning, appContainerStarting, podReady, podInitFailure, podAppFailure; private Meter flowSubmitToExecutor, flowSubmitToContainer; + private ...
1
/* * Copyright 2021 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
22,414
Maybe make this `volatile` or atomic as this can be set/read from different threads? Also, separately you may want to check if some of the methods here need to be `synchronized`.
azkaban-azkaban
java
@@ -974,6 +974,13 @@ drwrap_exit(void) if (count != 0) return; + drmgr_unregister_bb_app2app_event(drwrap_event_bb_app2app); + drmgr_unregister_bb_instrumentation_event(drwrap_event_bb_analysis); + drmgr_unregister_module_unload_event(drwrap_event_module_unload); + dr_unregister_delete_event...
1
/* ********************************************************** * Copyright (c) 2010-2017 Google, Inc. All rights reserved. * Copyright (c) 2008-2009 VMware, Inc. All rights reserved. * **********************************************************/ /* drwrap: DynamoRIO Function Wrapping and Replacing Extension * Deri...
1
13,538
Check the return value of the drmgr ones.
DynamoRIO-dynamorio
c
@@ -345,7 +345,10 @@ class FileUpload extends FormWidgetBase protected function loadAssets() { $this->addCss('css/fileupload.css', 'core'); - $this->addJs('js/fileupload.js', 'core'); + $this->addJs('js/fileupload.js', [ + 'build' => 'core', + 'data-cfasync' => 'f...
1
<?php namespace Backend\FormWidgets; use Input; use Request; use Response; use Validator; use Backend\Classes\FormField; use Backend\Classes\FormWidgetBase; use Backend\Controllers\Files as FilesController; use October\Rain\Filesystem\Definitions as FileDefinitions; use ApplicationException; use ValidationException; u...
1
14,704
This should be `'cache'`
octobercms-october
php
@@ -36,7 +36,7 @@ type RepoWrangler interface { // GetOldRepo opens and returns the old repo with read-only access GetOldRepo() (*os.File, error) // MakeNewRepo creates and returns the new repo dir with read/write permissions - MakeNewRepo() (*os.File, error) + MakeNewRepo() error // GetOldRepoPath returns the ...
1
package internal import ( "os" ) // Migration is the interface to all repo migration versions. type Migration interface { // Migrate performs all migration steps for the Migration that implements the interface. // Migrate expects newRepo to be: // a directory // read/writeable by this process, // conta...
1
18,862
The name "old" might cause confusion here. After installation, the "old" repo is at an archived path, and the new migrated repo is at the old path. Maybe something like "target" or "canonical"?
filecoin-project-venus
go
@@ -1744,6 +1744,7 @@ Collection.prototype.aggregate = function(pipeline, options, callback) { options = Object.assign({}, options); // Ensure we have the right read preference inheritance options.readPreference = resolveReadPreference(options, { db: this.s.db, collection: this }); + command.readPreference = ...
1
'use strict'; const checkCollectionName = require('./utils').checkCollectionName; const ObjectID = require('mongodb-core').BSON.ObjectID; const AggregationCursor = require('./aggregation_cursor'); const MongoError = require('mongodb-core').MongoError; const toError = require('./utils').toError; const normalizeHintFiel...
1
14,533
I think this is somewhat definitive proof that this error exists in `core` rather than `native`. We are correctly resolving the `readPreference` in the previous line, but you are able to identify that eventually the command generated in `core` is not decorated with the passed `readPreference`. Did you try to solve this...
mongodb-node-mongodb-native
js
@@ -91,8 +91,9 @@ func SpawnIntermediateHashesStage(s *StageState, u Unwinder, tx kv.RwTx, cfg Tri if cfg.checkRoot && root != expectedRootHash { log.Error(fmt.Sprintf("[%s] Wrong trie root of block %d: %x, expected (from header): %x. Block hash: %x", logPrefix, to, root, expectedRootHash, headerHash)) if to...
1
package stagedsync import ( "bytes" "context" "fmt" "math/bits" "os" "sort" "github.com/ledgerwatch/erigon-lib/kv" "github.com/ledgerwatch/erigon/common" "github.com/ledgerwatch/erigon/common/changeset" "github.com/ledgerwatch/erigon/common/dbutils" "github.com/ledgerwatch/erigon/common/etl" "github.com/l...
1
22,507
During genesis sync it can unwind 5M blocks?
ledgerwatch-erigon
go
@@ -852,6 +852,7 @@ func (s *matchingEngineSuite) TestConcurrentPublishConsumeActivities() { } func (s *matchingEngineSuite) TestConcurrentPublishConsumeActivitiesWithZeroDispatch() { + s.T().Skip("Racy - times out ~50% of the time running locally with --race") // Set a short long poll expiration so we don't have...
1
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Soft...
1
12,598
was it caused by the removal of removeTaskQueueManager() from this test?
temporalio-temporal
go
@@ -61,7 +61,7 @@ module Blacklight::CatalogHelperBehavior # @see #page_entries_info # @return [String] def item_page_entry_info - t('blacklight.search.entry_pagination_info.other', :current => number_with_delimiter(search_session[:counter]), :total => number_with_delimiter(search_session[:total]), :count =...
1
# -*- encoding : utf-8 -*- module Blacklight::CatalogHelperBehavior ## # Override the Kaminari page_entries_info helper with our own, blacklight-aware # implementation. # Displays the "showing X through Y of N" message. # # @param [RSolr::Resource] (or other Kaminari-compatible objects) # @return [String...
1
5,089
Wouldn't it just be easier to force search_session to return `with_indifferent_access`? Since you've done the hard work already, I don't think there's a problem doing it this way, but..
projectblacklight-blacklight
rb
@@ -146,6 +146,8 @@ struct PROC_RESOURCES { atp->needs_shmem = false; } } + if (rp->rr_sim_misses_deadline) return false; + // Don't schedule if the result is simulated to miss its deadline if (rp->schedule_backoff > gstate.now) return false; if...
1
// This file is part of BOINC. // http://boinc.berkeley.edu // Copyright (C) 2008 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
13,809
So, such tasks that could possibly not meet the deadline will never have a chance to run? I think this is not nice behavior, especially for those projects who has sometimes some very small tasks after the big one.
BOINC-boinc
php
@@ -10717,6 +10717,11 @@ int LuaScriptInterface::luaItemTypeCreate(lua_State* L) id = Item::items.getItemIdByName(getString(L, 2)); } + if (id == 0) { + lua_pushnil(L); + return 1; + } + const ItemType& itemType = Item::items[id]; pushUserdata<const ItemType>(L, &itemType); setMetatable(L, -1, "ItemType"...
1
/** * The Forgotten Server - a free and open-source MMORPG server emulator * Copyright (C) 2017 Mark Samman <mark.samman@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; eith...
1
15,172
You should add the check above this line instead. If string is empty, don't even call the function.
otland-forgottenserver
cpp
@@ -101,6 +101,13 @@ public class DynamoDBCertRecordStoreConnection implements CertRecordStoreConnect } private X509CertRecord itemToX509CertRecord(Item item) { + boolean clientCert; + try { + clientCert = item.getBoolean(KEY_CLIENT_CERT); + } catch (Exception ex) { + ...
1
/* * Copyright 2018 Oath, 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,434
If clientCert attribute doesn't exist for some reason I set it to false.
AthenZ-athenz
java
@@ -301,7 +301,11 @@ module Travis cmd_opts = {retry: true, assert: false, echo: 'Installing caching utilities'} if casher_branch == 'production' static_file_location = "https://#{app_host}/files/#{name}".output_safe - sh.cmd curl_cmd(flags, location, static...
1
require 'shellwords' require 'travis/build/script/shared/directory_cache/signatures/aws2_signature' require 'travis/build/script/shared/directory_cache/signatures/aws4_signature' module Travis module Build class Script module DirectoryCache class Base MSGS = { config_missing:...
1
17,362
Do we need `app_host_flags` variable? We can directly concat with `flags`. `sh.cmd curl_cmd(unless Travis::Build.config&.ssl&.verify ? flags + ' -k' : flags, location, static_file_location), cmd_opts` right?
travis-ci-travis-build
rb
@@ -211,11 +211,11 @@ void Creature::onWalk() forceUpdateFollowPath = true; } } else { + stopEventWalk(); + if (listWalkDir.empty()) { onWalkComplete(); } - - stopEventWalk(); } }
1
/** * The Forgotten Server - a free and open-source MMORPG server emulator * Copyright (C) 2019 Mark Samman <mark.samman@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; eithe...
1
19,330
Walk should actually be completed (`onWalkCompleted`) after the event is stopped. This also makes it possible for monster to walk by smaller paths.
otland-forgottenserver
cpp
@@ -31,6 +31,17 @@ func NewSimpleJoiner(getter storage.Getter) file.Joiner { } func (s *simpleJoiner) Size(ctx context.Context, address swarm.Address) (dataSize int64, err error) { + // Handle size based on weather the root chunk is encrypted or not + toDecrypt := len(address.Bytes()) == swarm.EncryptedReferenceSiz...
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 joiner provides implementations of the file.Joiner interface package joiner import ( "context" "encoding/binary" "fmt" "io" "github.com/eth...
1
11,546
typo in `weather` (should be `whether`)
ethersphere-bee
go
@@ -35,6 +35,7 @@ var ( sourceOS = flag.String("source-os", "", fmt.Sprintf("OS version of the source instance to upgrade. Supported values: %v", strings.Join(upgrader.SupportedSourceOSVersions(), ", "))) targetOS = flag.String("target-os", "", fmt.Sprintf("Version of the OS after upgrad...
1
// Copyright 2020 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
10,886
Thoughts on having the URI as the param, instead of a boolean? The default value would be the normal prod image, and then your test would override with the staging image.
GoogleCloudPlatform-compute-image-tools
go
@@ -351,7 +351,8 @@ static bool ReadAAPairs( return false; } unsigned n = 0; - fscanf(fp, "%d", &n); + int num_scan = fscanf(fp, "%d", &n); + RDUNUSED_PARAM(num_scan); char buffer[80];
1
// // Copyright (C) 2016 Novartis Institutes for BioMedical Research // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include <ctype.h> #i...
1
19,042
I'm surprised this is needed, but we should probably assert num_scan == 1 at least, otherwise I expect the file is pretty broken.
rdkit-rdkit
cpp
@@ -17,7 +17,9 @@ namespace storage { TEST(AddEdgesTest, SimpleTest) { fs::TempDir rootPath("/tmp/AddEdgesTest.XXXXXX"); - std::unique_ptr<kvstore::KVStore> kv = TestUtils::initKV(rootPath.path()); + constexpr int32_t partitions = 6; + std::unique_ptr<kvstore::KVStore> kv = TestUtils::initKV(rootPath.p...
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 "utils/NebulaKeyUtils.h" #include <gtest/gtest.h> #include <rocksdb/db.h> #include "fs/T...
1
28,920
Could we set a default value for `partitions` and `{0, network::NetworkUtils::getAvailablePort()}` ?
vesoft-inc-nebula
cpp
@@ -0,0 +1,14 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; + +namespace Microsoft.AspNetCore.Server.Kestrel.Core +{ + public class RequestBodyTimeout + { + public...
1
1
13,336
Needs xml docs. The API names alone don't provide enough explanation about what these mean and how to set them. Also, we should provide some validation of inputs, such as MaxTime must be > MinTime, MinimumRate must be >= 0, etc. Consider making the properties readonly and adding a constructor that does these validation...
aspnet-KestrelHttpServer
.cs
@@ -0,0 +1,12 @@ +package testutils + +import ( + "os" + "path" +) + +func TestDataFile(name string) string { + dir, _ := os.Getwd() + + return path.Join(dir, "testdata", name) +}
1
1
17,059
Would it make sense to create an empty file here, perhaps in a tmp dir, instead of checking empty files into Git?
projectcalico-felix
go
@@ -1823,7 +1823,9 @@ class CSharpGenerator : public BaseGenerator { code += "[idx" + NumToString(j++) + "]"; } code += ";"; - for (size_t i = 0; i < array_only_lengths.size(); ++i) { code += "}"; } + for (size_t i = 0; i < array_only_lengths.size(); ++i) { + ...
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
18,311
This change is due to `clang_format` and is not related to this PR.
google-flatbuffers
java
@@ -359,6 +359,11 @@ block_all_signals_except(kernel_sigset_t *oset, int num_signals, kernel_sigdelset(&set, va_arg(ap, int)); } va_end(ap); + /* We never block SIGSEGV or SIGBUS: we need them for various safe reads and to + * properly report crashes. + */ + kernel_sigdelset(&set, SIGSE...
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
19,089
Why did you not add the signals to the call of block_all_signals_except() and instead baked them into the function? Ok, if you had a good reason for it, otherwise I would add it to the except list of the function call, since that's what it was meant for.
DynamoRIO-dynamorio
c
@@ -0,0 +1,13 @@ +package de.danoeh.antennapod.core.storage; + +import android.support.annotation.NonNull; + +import de.danoeh.antennapod.core.feed.FeedFile; + +public interface FeedFileDownloadStatusRequesterInterface { + /** + * @return {@code true} if the named feedfile is in the downloads list + */ + ...
1
1
13,932
Could this be done by mocking objects instead? I feel like this is changing too much of the actual logic just for the tests.
AntennaPod-AntennaPod
java
@@ -27,6 +27,7 @@ public class ManifestFileBean implements ManifestFile { private String path = null; private Long length = null; private Integer partitionSpecId = null; + private Integer content = null; private Long addedSnapshotId = null; public String getPath() {
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
36,698
why not just use `ManifestContent` instead of `Integer`?
apache-iceberg
java
@@ -260,8 +260,16 @@ namespace Nethermind.TxPool } Metrics.PendingTransactionsReceived++; - - if (!_validator.IsWellFormed(tx, _specProvider.GetSpec())) + + IReleaseSpec releaseSpec = _specProvider.GetSpec(); + if (tx.Type == TxType.AccessList && ...
1
// Copyright (c) 2021 Demerzel Solutions Limited // This file is part of the Nethermind library. // // The Nethermind library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of ...
1
25,154
can we do that in TxValidator?
NethermindEth-nethermind
.cs