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 |
|---|---|---|---|---|---|---|---|
@@ -120,9 +120,10 @@ func main() {
log.Fatalf("Failed to parse usage, exiting: %v", err)
}
buildInfoLogCxt := log.WithFields(log.Fields{
- "version": buildinfo.GitVersion,
- "buildDate": buildinfo.BuildDate,
- "gitCommit": buildinfo.GitRevision,
+ "version": buildinfo.GitVersion,
+ "buildDate": buildi... | 1 | // Copyright (c) 2016-2017 Tigera, 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 ... | 1 | 15,279 | I think you'll need to add an import for runtime, before you can merge this PR. (Presumably it was already there for something else when you were working on this, but has since disappeared.) | projectcalico-felix | go |
@@ -74,7 +74,7 @@ import java.util.Set;
import static java.util.Collections.singletonList;
/**
- * Test class for SyncState.
+ * Test class for SyncManager.
*/
@RunWith(AndroidJUnit4.class)
@LargeTest | 1 | /*
* Copyright (c) 2014-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 | 16,816 | Unrelated typo fix. | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -309,6 +309,12 @@ func (r *replacer) getSubstitution(key string) string {
case "{dir}":
dir, _ := path.Split(r.request.URL.Path)
return dir
+ case "{user}":
+ user, _ := r.request.Context().Value(RemoteUserCtxKey).(string)
+ if user == "" {
+ user = "-"
+ }
+ return user
case "{request}":
dump, er... | 1 | package httpserver
import (
"bytes"
"io"
"io/ioutil"
"net"
"net/http"
"net/http/httputil"
"net/url"
"os"
"path"
"strconv"
"strings"
"time"
"github.com/mholt/caddy"
)
// requestReplacer is a strings.Replacer which is used to
// encode literal \r and \n characters and keep everything
// on one line
var re... | 1 | 10,409 | I don't think we need an empty value here; any middleware that wants a default value for empty placeholders will pass in what that value should be. | caddyserver-caddy | go |
@@ -23,7 +23,7 @@ const viewports = require( './viewports' );
// This will be passed through with the `backstop` command run with docker.
if ( process.argv.includes( '--docker' ) ) {
const hostname = require( './detect-storybook-host' );
- process.argv.push( `--storybook-host=${ hostname }` );
+ process.argv.push( ... | 1 | /**
* Backstop config.
*
* Site Kit by Google, Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unl... | 1 | 33,068 | Why was this changed? | google-site-kit-wp | js |
@@ -99,7 +99,7 @@ void KVStoreImpl::init() {
ResultCode KVStoreImpl::get(GraphSpaceID spaceId, PartitionID partId,
const std::string& key,
- std::string& value) {
+ std::string* value) {
CHECK_AND_RETURN_ENGINE(spaceId, partId);
... | 1 | /* Copyright (c) 2018 - present, VE Software Inc. All rights reserved
*
* This source code is licensed under Apache 2.0 License
* (found in the LICENSE.Apache file in the root directory)
*/
#include "kvstore/KVStoreImpl.h"
#include "network/NetworkUtils.h"
#include "kvstore/RocksdbEngine.h"
#include <algorithm>
#... | 1 | 14,613 | Compared to using traditional enums, I suggest to use `Status` or `StatusOr`, since they are more expressive and informative. Besides, isolating the definitions of error code of individual modules from the ones of the RPC interface is a good practice, isn't it? | vesoft-inc-nebula | cpp |
@@ -9,11 +9,12 @@ class Acceptance
validate :password_if_user_exists, if: :existing_user
validate :unused_invitation
- def initialize(invitation:, current_user: nil, attributes: {})
+ def initialize(invitation:, current_user: Guest.new, attributes: {})
@current_user = current_user
@invitation = invi... | 1 | class Acceptance
include ActiveModel::Model
attr_reader :invitation
delegate :errors, :github_username, :name, :password, to: :user
validates :github_username, presence: true
validate :password_if_user_exists, if: :existing_user
validate :unused_invitation
def initialize(invitation:, current_user: nil... | 1 | 16,606 | Use the return of the conditional for variable assignment and comparison. | thoughtbot-upcase | rb |
@@ -17,7 +17,9 @@
from abc import ABCMeta, abstractmethod
import os
+from typing import Optional
from selenium.webdriver.common.utils import keys_to_typing
+from selenium.types import AnyKey
class FileDetector(metaclass=ABCMeta): | 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 | 19,000 | just realised... This breaks things since there is not selenium types module, is there a PR for this? | SeleniumHQ-selenium | js |
@@ -9,6 +9,7 @@ package actpool
import (
"bytes"
"context"
+ "github.com/iotexproject/iotex-address/address"
"math/big"
"strings"
"testing" | 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 | 23,698 | move to line 23 below | iotexproject-iotex-core | go |
@@ -397,9 +397,7 @@ public class PasscodeManager {
* @param ctx
*/
public void lock(Context ctx) {
- locked = true;
showLockActivity(ctx, false);
- EventsObservable.get().notifyEvent(EventType.AppLocked);
}
/** | 1 | /*
* Copyright (c) 2014-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 | 15,950 | the first problem i found in the passcode change flow is that these two lines were happening in 'lock()' but not in 'showLockActivity' which is what the passcode change flow calls. I've just moved them to happen in that method. | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -326,7 +326,12 @@ class BoundSolidExecutionContext(SolidExecutionContext):
@property
def run_config(self) -> dict:
- raise DagsterInvalidPropertyError(_property_msg("run_config", "property"))
+ run_config = {}
+ if self._solid_config:
+ run_config["solids"] = {self._solid_... | 1 | # pylint: disable=super-init-not-called
from typing import AbstractSet, Any, Dict, NamedTuple, Optional, Union, cast
from dagster import check
from dagster.config import Shape
from dagster.core.definitions.composition import PendingNodeInvocation
from dagster.core.definitions.dependency import Node, NodeHandle
from da... | 1 | 15,808 | Doing this adds the actual resources themselves to the dictionary. I think for now, there's no way to know what the resource config provided may be, as we don't permit resource config on `build_solid_context`, so this part can be omitted. | dagster-io-dagster | py |
@@ -0,0 +1,19 @@
+module Subscriber
+ class ResubscriptionsController < ApplicationController
+ def create
+ resubscription = make_resubscription
+ if resubscription.fulfill
+ flash[:notice] = t("subscriptions.flashes.resubscribe.success")
+ else
+ flash[:error] = t("subscriptions.flash... | 1 | 1 | 17,293 | 1 trailing blank lines detected. | thoughtbot-upcase | rb | |
@@ -68,6 +68,7 @@ if (global.enableSyncTests) {
TESTS.UserTests = require("./user-tests");
TESTS.SessionTests = require("./session-tests");
TESTS.UUIDSyncTests= node_require("./uuid-sync-tests");
+ TESTS.PartitionValueTests = node_require("./pv-tests");
}
}
| 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 | 20,398 | I would personally prefer a filename without an abbreviation, a newcomer to the project wouldn't be able to translate "pv" to "partition-value". | realm-realm-js | js |
@@ -32,6 +32,10 @@ namespace MvvmCross.Core.ViewModels
public static void CallBundleMethod(this IMvxViewModel viewModel, MethodInfo methodInfo, IMvxBundle bundle)
{
var parameters = methodInfo.GetParameters().ToArray();
+
+ if (bundle == null && parameters.Count() > 0)
+ ... | 1 | // MvxViewModelExtensions.cs
// MvvmCross is licensed using Microsoft Public License (Ms-PL)
// Contributions and inspirations noted in readme.md and license.txt
//
// Project Lead - Stuart Lodge, @slodge, me@slodge.com
namespace MvvmCross.Core.ViewModels
{
using System.Linq;
using System.Reflection;
usi... | 1 | 12,692 | This check looks odd to me. I can't quite grok it. Why is it needed now? What's changed? | MvvmCross-MvvmCross | .cs |
@@ -228,7 +228,7 @@ func (s *Server) restartJetStream() error {
MaxStore: opts.JetStreamMaxStore,
}
s.Noticef("Restarting JetStream")
- err := s.enableJetStream(cfg)
+ err := s.EnableJetStream(&cfg)
if err != nil {
s.Warnf("Can't start JetStream: %v", err)
return s.DisableJetStream() | 1 | // Copyright 2019-2021 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 | 12,809 | This change is needed because otherwise the path was being changed from `path/store/jetstream` to `path/store/` and files stored differently after re-enabling. | nats-io-nats-server | go |
@@ -1237,7 +1237,11 @@ describe('Examples', function() {
const client = configuration.newClient(configuration.writeConcernMax(), { poolSize: 1 });
client.connect(function(err, client) {
+ let session;
const cleanup = e => {
+ if (session) {
+ session.endSession();
+ ... | 1 | 'use strict';
var assert = require('assert');
const expect = require('chai').expect;
var co = require('co');
var test = require('./shared').assert;
var setupDatabase = require('./shared').setupDatabase;
function processResult() {}
describe('Examples', function() {
before(function() {
return setupDatabase(this.... | 1 | 14,196 | is this necessary? doesn't `client.close()` imply all sessions will be ended? | mongodb-node-mongodb-native | js |
@@ -19,6 +19,7 @@ package cmd
import (
"fmt"
+
"net"
"path/filepath"
"time" | 1 | /*
* Copyright (C) 2018 The "MysteriumNetwork/node" Authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | 1 | 14,438 | Extra line, it's not needed here. | mysteriumnetwork-node | go |
@@ -1,8 +1,10 @@
# frozen_string_literal: true
require 'puppet_pal'
+require 'bolt/pal'
# Ensure tasks are enabled when rspec-puppet sets up an environment
# so we get task loaders.
Puppet[:tasks] = true
+Bolt::PAL.load_puppet
require 'puppetlabs_spec_helper/module_spec_helper' | 1 | # frozen_string_literal: true
require 'puppet_pal'
# Ensure tasks are enabled when rspec-puppet sets up an environment
# so we get task loaders.
Puppet[:tasks] = true
require 'puppetlabs_spec_helper/module_spec_helper'
| 1 | 10,747 | Is this OK to add in the spec helper? I need to call `Bolt::PAL.load_puppet` so that I can use the new `Bolt::PAL::Issues` module when verifying that plans forbid functions. | puppetlabs-bolt | rb |
@@ -386,6 +386,15 @@ public final class CharSeq implements CharSequence, IndexedSeq<Character>, Seria
return result;
}
+ @Override
+ public CharSeq padTo(int length, Character element) {
+ final StringBuilder sb = new StringBuilder(back);
+ for (int i = 0; i < length; i++) {
+ ... | 1 | /* / \____ _ ______ _____ / \____ ____ _____
* / \__ \/ \ / \__ \ / __// \__ \ / \/ __ \ Javaslang
* _/ // _\ \ \/ / _\ \\_ \/ // _\ \ /\ \__/ / Copyright 2014-2015 Daniel Dietrich
* /___/ \_____/\____/\_____/____/\___\_____/_/ \_/____/ Licensed under the Apache License... | 1 | 6,324 | or is it `i < length - back.length()`? `"12345".padTo(10, 'a')` should be `12345aaaaa` | vavr-io-vavr | java |
@@ -162,7 +162,8 @@ def train_detector(model,
# register hooks
runner.register_training_hooks(cfg.lr_config, optimizer_config,
cfg.checkpoint_config, cfg.log_config,
- cfg.get('momentum_config', None))
+ cf... | 1 | # Copyright (c) OpenMMLab. All rights reserved.
import random
import warnings
import numpy as np
import torch
import torch.distributed as dist
from mmcv.parallel import MMDataParallel, MMDistributedDataParallel
from mmcv.runner import (HOOKS, DistSamplerSeedHook, EpochBasedRunner,
Fp16Optimize... | 1 | 26,565 | custom_imports -> custom_hooks | open-mmlab-mmdetection | py |
@@ -34,7 +34,7 @@
<% end %>
</ul>
<% else %>
- <p><%= raw question[:text][0].gsub(/<tr>(\s|<td>|<\/td>| )*(<\/tr>|<tr>)/,"") %></p>
+ <p><%= raw question[:text][0].gsub(/<tr>(\s|<td>|<\/td>| )*(<\/tr>|<tr>)/,"") if question[:text... | 1 | <!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><%= @plan.title %></title>
<%= render partial: '/shared/export/plan_styling' %>
</head>
<body>
<% if @show_coversheet %>
<%= render partial: '/shared/export/plan_coversheet' %>
<% e... | 1 | 17,447 | I don't get why are we baking new hash structures to represent phases, sections, questions. We are not only loosing the references defined in models but also we have to figure out keys and values for this newly structures. | DMPRoadmap-roadmap | rb |
@@ -231,6 +231,10 @@ public class MMapDirectory extends FSDirectory {
/** Creates an IndexInput for the file with the given name. */
@Override
public IndexInput openInput(String name, IOContext context) throws IOException {
+ return openInput(name, context, this.preload);
+ }
+
+ protected IndexInput open... | 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 | 29,286 | It's somewhat confusing that the `preload` parameter shadows the instance variable; maybe rename the instance variable to `globalPreload` or `preloadDefault` or so to prevent future confusion? | apache-lucene-solr | java |
@@ -36,6 +36,7 @@ type ScheduledJob struct {
// ScheduledJobConfig holds the configuration for a scheduled job
type ScheduledJobConfig struct {
+ name string
ImageConfig ImageWithHealthcheck `yaml:"image,flow"`
ImageOverride `yaml:",inline"`
TaskConfig `ya... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Package manifest provides functionality to create Manifest files.
package manifest
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/copilot-cli/internal/pkg/template"
"github.com/imdario/mergo"
)... | 1 | 19,470 | Are we setting these values anywhere? | aws-copilot-cli | go |
@@ -5,8 +5,8 @@
*/
#include <gtest/gtest.h>
-#include <folly/Random.h>
-#include "common/base/MurmurHash2.h"
+#include "base/Base.h"
+#include "base/MurmurHash2.h"
namespace vesoft {
| 1 | /* Copyright (c) 2018 - present, VE Software Inc. All rights reserved
*
* This source code is licensed under Apache 2.0 License
* (found in the LICENSE.Apache file in the root directory)
*/
#include <gtest/gtest.h>
#include <folly/Random.h>
#include "common/base/MurmurHash2.h"
namespace vesoft {
TEST(MurmurHash... | 1 | 13,974 | This has to be in front of all other includes | vesoft-inc-nebula | cpp |
@@ -702,8 +702,8 @@ void updateStereoBonds(RWMOL_SPTR product, const ROMol &reactant,
Atom *pStart = pBond->getBeginAtom();
Atom *pEnd = pBond->getEndAtom();
- pStart->calcImplicitValence(true);
- pEnd->calcImplicitValence(true);
+ pStart->calcImplicitValence(false);
+ pEnd->calcImpl... | 1 | //
// Copyright (c) 2014-2017, Novartis Institutes for BioMedical Research Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the ... | 1 | 20,821 | These changes make sense to me. @ricrogz : you wrote (I think ) the original version of this as part of #2553 Do you see any reason to not make the change? | rdkit-rdkit | cpp |
@@ -479,7 +479,7 @@ define(['loading', 'globalize', 'events', 'viewManager', 'skinManager', 'backdro
}
function getRequestFile() {
- var path = self.location.pathname || '';
+ var path = window.self.location.pathname || '';
var index = path.lastIndexOf('/');
if (index !== -... | 1 | define(['loading', 'globalize', 'events', 'viewManager', 'skinManager', 'backdrop', 'browser', 'page', 'appSettings', 'apphost', 'connectionManager'], function (loading, globalize, events, viewManager, skinManager, backdrop, browser, page, appSettings, appHost, connectionManager) {
'use strict';
var appRouter ... | 1 | 16,315 | `window.self === window` | jellyfin-jellyfin-web | js |
@@ -474,7 +474,7 @@ func TestSvcInitOpts_Ask(t *testing.T) {
inDockerfilePath: "",
setupMocks: func(m initSvcMocks) {
- m.mockMftReader.EXPECT().ReadWorkloadManifest(wantedSvcName).Return(nil, &workspace.ErrFileNotExists{FileName: wantedSvcName})
+ m.mockMftReader.EXPECT().ReadWorkloadManifest(wantedSvc... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"errors"
"fmt"
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/copilot-cli/internal/pkg/docker/dockerfile"
"github.com/aws/copilot-cli/internal/pkg/workspace"
"github.co... | 1 | 19,839 | maybe we should keep one test case for ErrFileNotExists and update only one file for ErrWorkspaceNotFound? | aws-copilot-cli | go |
@@ -140,12 +140,7 @@ namespace OpenTelemetry.Trace.Export
this.cts.Dispose();
this.cts = null;
- // if there are more items, continue until cancellation token allows
- while (this.currentQueueSize > 0 && !cancellationToken.IsCancellationRequested)
- ... | 1 | // <copyright file="BatchingActivityProcessor.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http:/... | 1 | 14,565 | Please add `ConsigureAwait(false)` here and on `ShutdownAsync` below. | open-telemetry-opentelemetry-dotnet | .cs |
@@ -28,8 +28,8 @@ def bad_default(var, default=unknown2): # [undefined-variable]
"""function with default arg's value set to an nonexistent name"""
print(var, default)
print(xxxx) # [undefined-variable]
- augvar += 1 # [undefined-variable]
- del vardel # [undefined-variable]
+ augvar += 1 #... | 1 | # pylint: disable=missing-docstring, multiple-statements, useless-object-inheritance, import-outside-toplevel
# pylint: disable=too-few-public-methods, no-init, no-self-use, bare-except, broad-except
# pylint: disable=using-constant-test, import-error, global-variable-not-assigned, unnecessary-comprehension
from __futu... | 1 | 20,528 | Isn't this a false positive? Why are we reporting `unused-variable` on a `del` operation with a `undefined-variable`. | PyCQA-pylint | py |
@@ -97,7 +97,7 @@ func (client *ClientFake) FindProposals(providerID string) (proposals []dto_disc
// SendSessionStats heartbeats that session is still active + session upload and download amounts
func (client *ClientFake) SendSessionStats(sessionId session.SessionID, sessionStats dto.SessionStats, signer identity.... | 1 | /*
* Copyright (C) 2017 The "MysteriumNetwork/node" Authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | 1 | 12,151 | Is it correct that `SessionDto` should be here? | mysteriumnetwork-node | go |
@@ -103,6 +103,11 @@ func (c *ovsCtlClient) DumpGroups() ([]string, error) {
return groupList, nil
}
+func (c *ovsCtlClient) AddMeterEntry(meterId uint32, rate uint32) error {
+ _, err := c.RunOfctlCmd("add-meter", fmt.Sprintf("meter=%d,pktps,band=type=drop,rate=%d", meterId, rate))
+ return err
+}
+
func (c *ovs... | 1 | // Copyright 2020 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 36,199 | sorry I missed this earlier. We no longer use ovs-ofctl for flow programming AFAIK, why not add this support to ofnet / libOpenflow? | antrea-io-antrea | go |
@@ -159,7 +159,10 @@ class Form extends WidgetBase
*/
protected function loadAssets()
{
- $this->addJs('js/october.form.js', 'core');
+ $this->addJs('js/october.form.js', [
+ 'build' => 'core',
+ 'cache' => 'false'
+ ]);
}
/** | 1 | <?php namespace Backend\Widgets;
use Lang;
use Form as FormHelper;
use Backend\Classes\FormTabs;
use Backend\Classes\FormField;
use Backend\Classes\WidgetBase;
use Backend\Classes\WidgetManager;
use Backend\Classes\FormWidgetBase;
use October\Rain\Database\Model;
use October\Rain\Html\Helper as HtmlHelper;
use Applica... | 1 | 14,705 | Make this consistent with the other definition please `'false'` vs `false` | octobercms-october | php |
@@ -62,8 +62,13 @@ func CleanupHandler(c <-chan os.Signal) {
for s := range c {
debug.Log("signal %v received, cleaning up", s)
fmt.Printf("%sInterrupt received, cleaning up\n", ClearLine())
- RunCleanupHandlers()
- fmt.Println("exiting")
- os.Exit(0)
+ Exit(0)
}
}
+
+// Exit runs the cleanup handlers an... | 1 | package main
import (
"fmt"
"os"
"os/signal"
"sync"
"syscall"
"restic/debug"
)
var cleanupHandlers struct {
sync.Mutex
list []func() error
done bool
}
var stderr = os.Stderr
func init() {
c := make(chan os.Signal)
signal.Notify(c, syscall.SIGINT)
go CleanupHandler(c)
}
// AddCleanupHandler adds the f... | 1 | 7,572 | I think this is a good way to do it. :+1: | restic-restic | go |
@@ -21,7 +21,7 @@ import (
"os"
"path/filepath"
- "github.com/mitchellh/go-homedir"
+ homedir "github.com/mitchellh/go-homedir"
"github.com/mysteriumnetwork/node/core/node"
"github.com/urfave/cli"
) | 1 | /*
* Copyright (C) 2017 The "MysteriumNetwork/node" Authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | 1 | 13,503 | Why this is needed? | mysteriumnetwork-node | go |
@@ -26,11 +26,12 @@ import (
)
// InitializeConnTrackDumper initializes the ConnTrackDumper interface for different OS and datapath types.
-func InitializeConnTrackDumper(nodeConfig *config.NodeConfig, serviceCIDR *net.IPNet, ovsctlClient ovsctl.OVSCtlClient, ovsDatapathType string) ConnTrackDumper {
+func Initiali... | 1 | // Copyright 2020 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | 1 | 25,835 | Can we define this directly in the function `NewConnTrackOvsAppCtl` instead of passing this as an argument? | antrea-io-antrea | go |
@@ -54,6 +54,8 @@ func (s *stream) Write(b []byte) (int, error) {
var _ = Describe("Crypto Setup TLS", func() {
var clientConf, serverConf *tls.Config
+ // unparam incorrectly complains that the first argument is never used.
+ //nolint:unparam
initStreams := func() (chan chunk, *stream /* initial */, *stream /* ... | 1 | package handshake
import (
"bytes"
"crypto/rand"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"errors"
"math/big"
"time"
gomock "github.com/golang/mock/gomock"
"github.com/lucas-clemente/quic-go/internal/congestion"
"github.com/lucas-clemente/quic-go/internal/protocol"
"github.com/lucas-cle... | 1 | 8,913 | False positives are annoying... | lucas-clemente-quic-go | go |
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * Copyright © Ergonode Sp. z o.o. All rights reserved.
+ * See LICENSE.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Ergonode\Multimedia\Infrastructure\Service;
+
+interface SuffixGeneratingServiceInterface
+{
+ public function generateSuffix(string $name, in... | 1 | 1 | 9,580 | Is the infrastructure layer an appropriate one? I don't think so tbh, more like an application, or even a domain one. | ergonode-backend | php | |
@@ -4,12 +4,14 @@
using System;
using System.Diagnostics;
using System.Numerics;
+using System.Runtime.CompilerServices;
using System.Threading;
namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure
{
public struct MemoryPoolIterator
{
+ private static readonly ulong _powerOfTwo... | 1 | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Diagnostics;
using System.Numerics;
using System.Threading;
namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastru... | 1 | 10,290 | Why is this required to turn the static readonlies into jitted const? Is this a bug in the jitter? | aspnet-KestrelHttpServer | .cs |
@@ -2,11 +2,13 @@ from collections import namedtuple
import traceback
-SerializableErrorInfo = namedtuple('SerializableErrorInfo', 'message stack')
+SerializableErrorInfo = namedtuple('SerializableErrorInfo', 'message stack cls_name')
def serializable_error_info_from_exc_info(exc_info):
exc_type, exc_val... | 1 | from collections import namedtuple
import traceback
SerializableErrorInfo = namedtuple('SerializableErrorInfo', 'message stack')
def serializable_error_info_from_exc_info(exc_info):
exc_type, exc_value, exc_tb = exc_info
return SerializableErrorInfo(
traceback.format_exception_only(exc_type, exc_val... | 1 | 12,947 | feel free to make this a "typed" named tuple (overriding __new__) if you are feeling frisky | dagster-io-dagster | py |
@@ -1,6 +1,3 @@
-import { or } from 'ramda';
-
-
-const MAX_SAFE_INTEGER = or(Number.MAX_SAFE_INTEGER, (2 ** 53) - 1);
+const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || (2 ** 53) - 1;
export default MAX_SAFE_INTEGER; | 1 | import { or } from 'ramda';
const MAX_SAFE_INTEGER = or(Number.MAX_SAFE_INTEGER, (2 ** 53) - 1);
export default MAX_SAFE_INTEGER;
| 1 | 5,217 | Would use parenthesis to explicitly state the associations of operands ```js const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || ((2 ** 53) - 1) | char0n-ramda-adjunct | js |
@@ -187,7 +187,9 @@ func (d *detector) checkApplication(ctx context.Context, app *model.Application,
liveManifests = filterIgnoringManifests(liveManifests)
d.logger.Info(fmt.Sprintf("application %s has %d live manifests", app.Id, len(liveManifests)))
- result, err := provider.DiffList(liveManifests, headManifests... | 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 | 17,896 | The bug was caused by this order change in the last refactoring. | pipe-cd-pipe | go |
@@ -23,6 +23,7 @@ import io
import json
import docker
+from docker.utils import kwargs_from_env
from molecule import util
from molecule.driver import basedriver | 1 | # Copyright (c) 2015-2016 Cisco Systems
#
# 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, publ... | 1 | 6,538 | This is already imported as docker. You're safe to simply use `docker.utils.kwargs_from_env()` below. | ansible-community-molecule | py |
@@ -50,6 +50,14 @@ func (ra RunnableActions) Actions() []action.SealedEnvelope {
return ra.actions
}
+// AddAction adds actions for block which is building.
+func (ra *RunnableActions) AddAction(act action.SealedEnvelope) {
+ if ra.actions == nil {
+ ra.actions = make([]action.SealedEnvelope, 0)
+ }
+ ra.actions ... | 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 | 14,762 | No need to add this fun. Using RunnableActionsBuilder#AddActions instead | iotexproject-iotex-core | go |
@@ -23,6 +23,10 @@ let oldBeforeUnmount = options.unmount;
const RAF_TIMEOUT = 100;
let prevRaf;
+// TODO: these options hooks are also still side-effects and we
+// should minimize side-effects wherever we can, currently compat
+// imports this whole file resulting in a lot of side-effects, would
+// it be better ... | 1 | import { options } from 'preact';
import { getParentContext } from 'preact/src/tree';
import { MODE_UNMOUNTING } from '../../src/constants';
/** @type {number} */
let currentIndex;
/** @type {import('./internal').Internal} */
let currentInternal;
/** @type {number} */
let currentHook = 0;
/** @type {Array<import('.... | 1 | 17,396 | I don't think it's possible to do this for hooks | preactjs-preact | js |
@@ -88,7 +88,7 @@ public class SleepJavaJob {
System.out.println("Sec " + sec);
synchronized (this) {
try {
- this.wait(sec * 1000);
+ this.wait(sec * 1000 + 1);
} catch (final InterruptedException e) {
System.out.println("Interrupted " + this.fail);
} | 1 | /*
* Copyright 2014 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 15,791 | wait(1ms) when sec=0. wait(0ms) waits forever so that's why this is better. | azkaban-azkaban | java |
@@ -104,8 +104,14 @@ struct listener_ssl_config_t {
struct listener_config_t {
int fd;
+#if defined(__linux__) && defined(SO_REUSEPORT)
+ int domain;
+ int so_reuseport;
+ H2O_VECTOR(int) reuseport_fds;
+#endif
struct sockaddr_storage addr;
socklen_t addrlen;
+
h2o_hostconf_t **hosts;
... | 1 | /*
* Copyright (c) 2014-2016 DeNA Co., Ltd., Kazuho Oku, Tatsuhiko Kubo,
* Domingo Alvarez Duarte, Nick Desaulniers,
* Jeff Marrison, Shota Fukumori, Fastly, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and... | 1 | 12,817 | Do we need `domain` and `so_reuseport` now that we open new sockets immediately after calling `add_listener`? | h2o-h2o | c |
@@ -34,10 +34,14 @@ public interface HttpClient {
* @throws IOException if an I/O error occurs.
*/
HttpResponse execute(HttpRequest request, boolean followRedirects) throws IOException;
-
+
/**
- * Creates HttpClient instances.
- */
+ * Closes the connections associated with this client.
+ *
+ * @t... | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 12,899 | The formatting seems different from the rest of the code | SeleniumHQ-selenium | rb |
@@ -0,0 +1,18 @@
+package paramhelper
+
+import (
+ "fmt"
+ "strings"
+)
+
+// GetRegion extracts region from a zones
+func GetRegion(zone string) (string, error) {
+ if zone == "" {
+ return "", fmt.Errorf("zone is empty. Can't determine region")
+ }
+ zoneStrs := strings.Split(zone, "-")
+ if len(zoneStrs) < 2 {
+ ... | 1 | 1 | 9,085 | What about calling this package "parameters"? utils\parameters are utils related to parameters. | GoogleCloudPlatform-compute-image-tools | go | |
@@ -20,7 +20,7 @@ describe Topic do
end
it 'generates a stripped, url encoded slug based on name' do
- @topic.slug.should == 'test+driven+development'
+ expect(@topic.slug).to eq 'test+driven+development'
end
end
| 1 | require 'spec_helper'
describe Topic do
# Associations
it { should have_many(:classifications) }
it { should have_many(:workshops).through(:classifications) }
it { should have_many(:products).through(:classifications) }
it { should have_many(:topics).through(:classifications) }
it { should have_one(:trail)... | 1 | 9,680 | Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. | thoughtbot-upcase | rb |
@@ -52,10 +52,10 @@ public class PublicKeySubCommandTest extends CommandTestAbstract {
+ System.lineSeparator()
+ "This command outputs the node public key. Default output is standard output."
+ System.lineSeparator()
- + " --to=<FILE> File to write public key to instead... | 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 | 21,364 | what is the actual difference here? | hyperledger-besu | java |
@@ -96,6 +96,12 @@ public final class DefaultOAuth2AuthorizationRequestResolver implements OAuth2Au
if (registrationId == null) {
return null;
}
+ String[] params = new String[0];
+ if (registrationId.contains("?")) {
+ String[] explodedURI = registrationId.split("\\?");
+ registrationId = registrationI... | 1 | /*
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | 1 | 10,992 | Parsing URLs is hard. Any fixes should avoid manually parsing the URL. | spring-projects-spring-security | java |
@@ -22,7 +22,7 @@ module RSpec
end
def example_group_finished(_notification)
- @group_level -= 1
+ @group_level = @group_level > 0 ? @group_level - 1 : @group_level
end
def example_passed(passed) | 1 | RSpec::Support.require_rspec_core "formatters/base_text_formatter"
RSpec::Support.require_rspec_core "formatters/console_codes"
module RSpec
module Core
module Formatters
# @private
class DocumentationFormatter < BaseTextFormatter
Formatters.register self, :example_group_started, :example_gro... | 1 | 16,637 | This is a private api, it doesn't need to return anything so `@group_level -= 1 if @group_level > 0` is preferred. | rspec-rspec-core | rb |
@@ -432,14 +432,14 @@ NativeHashedStorageHandler::NativeHashedStorageHandler(
if (!m_process)
return;
- auto key_stride = key_type.GetByteStride();
+ auto key_stride = key_type.GetByteStride(m_process);
if (key_stride) {
m_key_stride = *key_stride;
m_key_stride_padded = *key_stride;
}
i... | 1 | //===-- SwiftHashedContainer.cpp --------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | 1 | 19,826 | .GetValueOr(0) ... but really, shouldn't m_value_strife also be optional? | apple-swift-lldb | cpp |
@@ -256,7 +256,7 @@ module.exports = class Tus extends Plugin {
}
}
- /** @type {{ [name: string]: string }} */
+ /** @type {Record<string, string>} */
const meta = {}
const metaFields = Array.isArray(opts.metaFields)
? opts.metaFields | 1 | const { Plugin } = require('@uppy/core')
const tus = require('tus-js-client')
const { Provider, RequestClient, Socket } = require('@uppy/companion-client')
const emitSocketProgress = require('@uppy/utils/lib/emitSocketProgress')
const getSocketHost = require('@uppy/utils/lib/getSocketHost')
const settle = require('@upp... | 1 | 13,702 | Working around a possible limitation in the JSDoc plugin's typescript syntax checking. This means the same thing | transloadit-uppy | js |
@@ -17,11 +17,11 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
private static readonly WaitCallback _completePending = CompletePending;
protected readonly FrameContext _context;
- object _sync = new Object();
+ private object _sync = new Object();
- ArraySegment<byte> _buf... | 1 | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace Microsoft.AspNet.Ser... | 1 | 5,707 | Should be readonly | aspnet-KestrelHttpServer | .cs |
@@ -14,7 +14,7 @@ import unittest
from rdkit import RDConfig
from rdkit import Chem
from rdkit.Chem import FragmentCatalog, BuildFragmentCatalog
-from rdkit.six.moves import cPickle
+from rdkit.six.moves import cPickle # @UnresolvedImport
def feq(n1, n2, tol=1e-4): | 1 | # $Id$
#
# Copyright (C) 2003-2006 Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
import os
import io
import unittest
fro... | 1 | 16,165 | I'm not going to stop accepting the PR, but I really hate these artifacts getting dropped in the Python code just to stop things like coverage checkers and linters from complaining. | rdkit-rdkit | cpp |
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 The Kythe Authors. All rights reserved.
+ * Copyright 2020 The Kythe 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. | 1 | /*
* Copyright 2016 The Kythe 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 | 12,061 | FYI modifying an existing file generally doesn't invalidate the copyright date. The date here is when the copy right _begins_, so moving it later is arguably misleading-it still applies. Not a big deal, just something I've seen a few times in passing. | kythe-kythe | go |
@@ -106,7 +106,7 @@ public class BaseServer<T extends BaseServer> implements Server<T> {
FilterHolder
filterHolder = servletContextHandler.addFilter(CrossOriginFilter.class, "/*", EnumSet
.of(DispatcherType.REQUEST));
- filterHolder.setInitParameter("allowedOrigins", "*");
+ filte... | 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,024 | Because the default value of allowedOrigins is * (all origins), so it isn't necessary to set again at all. | SeleniumHQ-selenium | java |
@@ -449,6 +449,10 @@ public class HiveCatalog extends BaseMetastoreCatalog implements Closeable, Supp
Database convertToDatabase(Namespace namespace, Map<String, String> meta) {
String warehouseLocation = conf.get("hive.metastore.warehouse.dir");
+ Preconditions.checkNotNull(
+ warehouseLocation... | 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,070 | Style: indentation should be 4 spaces (2 indents) from the start of `Preconditions`. | apache-iceberg | java |
@@ -587,8 +587,15 @@ class AdminController extends Controller
foreach ($entityProperties as $name => $metadata) {
$formFieldOptions = $metadata['type_options'];
- if ('association' === $metadata['fieldType'] && in_array($metadata['associationType'], array(ClassMetadataInfo::ONE_TO_MAN... | 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.
*
* Some parts of this file are copied and/or inspired by the
* DoctrineCRUDGene... | 1 | 9,126 | I don't know why I suggested a html attribute at first (my bad), or maybe you think it makes sense. Otherwise, what about a simple class ? | EasyCorp-EasyAdminBundle | php |
@@ -122,6 +122,9 @@ module DMPRoadmap
config.branding = config_for(:branding).deep_symbolize_keys
end
+ # org abbreviation for the root google analytics tracker that gets planted on every page
+ config.tracker_root = "UoE"
+
# The default visibility setting for new plans
# organisational... | 1 | require File.expand_path('../boot', __FILE__)
require 'rails/all'
require 'recaptcha/rails'
require 'csv'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
#if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
#Bu... | 1 | 19,021 | Probably want something more generic here like 'DMPRoadmap' so that other installations aren't using UoE by default. | DMPRoadmap-roadmap | rb |
@@ -72,12 +72,13 @@ namespace NLog.Config
}
catch (Exception exception)
{
+ InternalLogger.Error(exception, "Failed to add type '{0}'.", t.FullName);
+
if (exception.MustBeRethrown())
{
... | 1 | //
// Copyright (c) 2004-2011 Jaroslaw Kowalski <jaak@jkowalski.net>
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// * Redistributions of source code must retain the above c... | 1 | 12,539 | Must this not change to `MustBeRethrownImmediately`? | NLog-NLog | .cs |
@@ -30,11 +30,6 @@ import (
var (
pluginName = "antrea-octant-plugin"
- client *clientset.Clientset
- graph = ""
- lastTf = opsv1alpha1.Traceflow{
- ObjectMeta: v1.ObjectMeta{Name: ""},
- }
)
const ( | 1 | // Copyright 2019 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 21,728 | Can it be pointer? | antrea-io-antrea | go |
@@ -303,11 +303,11 @@ export const refreshAuthentication = async () => {
} );
// We should really be using state management. This is terrible.
- window.googlesitekit.setup = window.googlesitekit.setup || {};
- window.googlesitekit.setup.isAuthenticated = response.isAuthenticated;
- window.googlesitekit.setup... | 1 | /**
* Utility functions.
*
* Site Kit by Google, Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* U... | 1 | 26,037 | Not related to this issue but this condition seems weak. | google-site-kit-wp | js |
@@ -58,7 +58,12 @@ trait MarcReaderTrait
public function getMarcRecord()
{
if (null === $this->lazyMarcRecord) {
- $marc = trim($this->fields['fullrecord']);
+ // Get preferred MARC field from config, if it is set and is existing:
+ $marcField = (isset($this->mainConf... | 1 | <?php
/**
* Functions for reading MARC records.
*
* PHP version 7
*
* Copyright (C) Villanova University 2017.
*
* 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.
*
* This pr... | 1 | 30,655 | I think this might be a little more readable in two lines as: <pre> $preferredMarcField = $this->mainConfig->Record->preferredMarcField ?? 'fullrecord'; $marc = trim($this->fields[$preferredMarcField] ?? $this->fields['fullrecord']); </pre> | vufind-org-vufind | php |
@@ -21,8 +21,9 @@ from . import packer
from . import compat
from .compat import range_func
from .compat import memoryview_type
+from .compat import import_numpy, NumpyRequiredForThisFeature
-
+np = import_numpy()
## @file
## @addtogroup flatbuffers_python_api
## @{ | 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 applicable law or a... | 1 | 13,707 | does this still allow this file to be used with Python installations that don't have numpy? | google-flatbuffers | java |
@@ -96,7 +96,7 @@ class BazelBuildFileView {
String goImport = "";
if (isCloud) {
goImport = "cloud.google.com/go/";
- goPkg = goPkg.replaceFirst("v(.+);", "apiv$1;");
+ goPkg = goPkg.replaceFirst("\\/v([a-z1-9]+);", "\\/apiv$1;");
} else {
goImport = "google.golang.org/";
... | 1 | package com.google.api.codegen.bazel;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import java.util.regex.Pattern;
class BazelBuildFileView {
private static final Pattern LABEL_NAME = ... | 1 | 30,601 | what about 0? Version probably can' start with 0, but v10 is theoretically possible. | googleapis-gapic-generator | java |
@@ -52,5 +52,17 @@ namespace Microsoft.VisualStudio.TestPlatform.Utilities.Helpers
{
return new FileInfo(path).Attributes;
}
+
+ /// <inheritdoc/>
+ public bool IsRootedPath(string path)
+ {
+ return Path.IsPathRooted(path);
+ }
+
+ /// <inher... | 1 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.VisualStudio.TestPlatform.Utilities.Helpers
{
using System;
using System.Collections.Generic;
using System.IO;
using Sys... | 1 | 11,664 | Usually we consider APIs that have filesystem interactions to be part of IFileHelper, this would allow us to inject a testable implementation easily. `Path.IsRootedPath` doesn't access the file system. It is string comparison I believe. | microsoft-vstest | .cs |
@@ -276,7 +276,7 @@ spec:
iqn: iqn.2016-09.com.openebs.cstor:{{ .Volume.owner }}
targetPortal: {{ .TaskResult.cvolcreateputsvc.clusterIP }}:3260
targetPort: 3260
- status: ""
+ status: "Init"
replicationFactor: {{ $replicaCount }}
consistencyFactor: {{ div $replicaCount 2 | ... | 1 | /*
Copyright 2018 The OpenEBS Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... | 1 | 10,808 | Do we need to use quote? Why not `status: Init` | openebs-maya | go |
@@ -20,10 +20,6 @@ from pylint import checkers, interfaces
from pylint.checkers import utils
-def _is_constant_empty_str(node):
- return isinstance(node, nodes.Const) and node.value == ""
-
-
class CompareToEmptyStringChecker(checkers.BaseChecker):
"""Checks for comparisons to empty string.
Most of t... | 1 | # Copyright (c) 2016 Alexander Todorov <atodorov@otb.bg>
# Copyright (c) 2017-2018, 2020 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2019, 2021 Pierre Sassoulas <pierre.sassoulas@gmail.com>
# Copyright (c) 2020 hippo91 <guillaume.peillex@gmail.com>
# Copyright (c) 2020 Anthony Sottile <asottile@umich.edu>
# Co... | 1 | 16,421 | Nice catch ! I don't think I would have caught that, did you search the whole code base for pre-existing functions ? | PyCQA-pylint | py |
@@ -1052,6 +1052,19 @@ func TestClusterDeploymentReconcile(t *testing.T) {
}
},
},
+ {
+ name: "Add cluster region label",
+ existing: []runtime.Object{
+ testClusterDeploymentWithoutRegionLabel(),
+ },
+ validate: func(c client.Client, t *testing.T) {
+ cd := getCD(c)
+ if assert.NotNil(t... | 1 | package clusterdeployment
import (
"context"
"fmt"
"os"
"testing"
"time"
"github.com/golang/mock/gomock"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
apiequality "k8s.io/apimachinery/p... | 1 | 10,985 | Remove this line. | openshift-hive | go |
@@ -964,12 +964,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
[Fact]
public async Task ContentLength_Received_SingleDataFrameUnderSize_Reset()
{
- // I hate doing this, but it avoids exceptions from MemoryPool.Dipose() in debug mode. The problem is since
- ... | 1 | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Buffers;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.IO.Pipelines;
... | 1 | 16,277 | This is no longer called in any of our unit tests, right? | aspnet-KestrelHttpServer | .cs |
@@ -67,7 +67,7 @@ type rule struct {
// Priority of the NetworkPolicy to which this rule belong. nil for K8s NetworkPolicy.
PolicyPriority *float64
// Priority of the tier that the NetworkPolicy belongs to. nil for K8s NetworkPolicy.
- TierPriority *v1beta1.TierPriority
+ TierPriority *uint32
// Targets of this... | 1 | // Copyright 2019 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 20,707 | I think typically K8s APIs will use `int32` and not `uint32`. I think we should keep it consistent with the rule `Priority` above. I believe that the rationale for using `int32` in general is: * some programming languages don't have native support for unsigned integers * it's easier to catch sign errors with signed int... | antrea-io-antrea | go |
@@ -0,0 +1,7 @@
+class AddStartAndEndDatesToPlans < ActiveRecord::Migration
+ def change
+ add_column :plans, :grant_id, :integer, index: true
+ add_column :plans, :start_date, :datetime
+ add_column :plans, :end_date, :datetime
+ end
+end | 1 | 1 | 18,972 | If you end up changing grant to an association, this may need to change to a reference to enforce the foreign_key `add_reference :plans, :grant` | DMPRoadmap-roadmap | rb | |
@@ -74,7 +74,7 @@ class DashboardModulesAlerts extends Component {
title={ notification.title || '' }
description={ notification.description || '' }
blockData={ notification.blockData || [] }
- winImage={ notification.winImage ? `${ global._googlesitekitLegacyData.admin.assetsRoot }images/${ n... | 1 | /**
* DashboardModulesAlerts component.
*
* Site Kit by Google, Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICE... | 1 | 36,252 | This won't work because `notification` comes from an API response here. I think this would be the same as the change to `Alert` where it would get `SmallSunSVG`. | google-site-kit-wp | js |
@@ -120,6 +120,10 @@ func TestEnvironmentConfig(t *testing.T) {
additionalLocalRoutesJSON := `["1.2.3.4/22","5.6.7.8/32"]`
os.Setenv("ECS_AWSVPC_ADDITIONAL_LOCAL_ROUTES", additionalLocalRoutesJSON)
defer os.Unsetenv("ECS_AWSVPC_ADDITIONAL_LOCAL_ROUTES")
+ os.Setenv("ECS_ENABLE_CONTAINER_METADATA", "true")
+ os.Se... | 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 | 17,295 | This is not checked below? | aws-amazon-ecs-agent | go |
@@ -218,6 +218,19 @@ func (c *CloudFormation) TemplateBodyFromChangeSet(changeSetID, stackName string
return aws.StringValue(out.TemplateBody), nil
}
+// Outputs returns the outputs of a stack description.
+func (c *CloudFormation) Outputs(stack *Stack) (map[string]string, error) {
+ stackDescription, err := c.Des... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Package cloudformation provides a client to make API requests to AWS CloudFormation.
package cloudformation
import (
"context"
"errors"
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aw... | 1 | 16,324 | Will this ever return a "Stack does not exist" error? Should we handle it silently here rather than making higher level packages do error checking? | aws-copilot-cli | go |
@@ -1,11 +1,11 @@
-from .data_transfer import copy_file, get_bytes, delete_url, list_url
-from .packages import Package
+from .backends import get_package_registry
+from .data_transfer import copy_file
from .search_util import search_api
from .util import (QuiltConfig, QuiltException, CONFIG_PATH,
... | 1 | from .data_transfer import copy_file, get_bytes, delete_url, list_url
from .packages import Package
from .search_util import search_api
from .util import (QuiltConfig, QuiltException, CONFIG_PATH,
CONFIG_TEMPLATE, configure_from_default, config_exists,
configure_from_url, fix_url, ... | 1 | 18,700 | minor: at this scale, one import per line reads better | quiltdata-quilt | py |
@@ -183,7 +183,7 @@ ActiveRecord::Schema.define(version: 20180508151824) do
t.string "logo_name"
t.string "contact_email"
t.integer "org_type", default: 0, null: false
- t.text "links", default: "{\"org\":[]}"
+ t.text "links"
t.string ... | 1 | # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative sou... | 1 | 17,747 | Should remove the default templates as well. | DMPRoadmap-roadmap | rb |
@@ -18,14 +18,14 @@ const stream = require('webpack-stream');
const inject = require('gulp-inject');
const postcss = require('gulp-postcss');
const sass = require('gulp-sass');
-
-sass.compiler = require('node-sass')
+sass.compiler = require('node-sass');
+var config;
if (mode.production()) {
- var config =... | 1 | 'use strict';
const { src, dest, series, parallel, watch } = require('gulp');
const browserSync = require('browser-sync').create();
const del = require('del');
const babel = require('gulp-babel');
const concat = require('gulp-concat');
const terser = require('gulp-terser');
const htmlmin = require('gulp-htmlmin');
con... | 1 | 13,987 | Why not `let`? | jellyfin-jellyfin-web | js |
@@ -49,6 +49,8 @@ public class ZipkinServer {
new SpringApplicationBuilder(ZipkinServer.class)
.banner(new ZipkinBanner())
.initializers(new ZipkinModuleImporter(), new ZipkinActuatorImporter())
+ // Avoids potentially expensive ns lookup and inaccurate startup timing
+ .logStartupInfo(fals... | 1 | /*
* Copyright 2015-2019 The OpenZipkin Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | 1 | 16,922 | ns -> DNS My first reading was this is referring to System.nanoTime and thought hrm? | openzipkin-zipkin | java |
@@ -55,6 +55,7 @@ class ScheduleInstigatorData(
# `start_date` on partition-based schedules, which is used to define
# the range of partitions)
check.opt_float_param(start_timestamp, "start_timestamp"),
+ # this is a vestigial parameter that is not used and will be remo... | 1 | from collections import namedtuple
from enum import Enum
from dagster import check
from dagster.core.definitions.run_request import InstigatorType
from dagster.core.host_representation.origin import ExternalJobOrigin
from dagster.serdes.serdes import (
register_serdes_enum_fallbacks,
register_serdes_tuple_fall... | 1 | 18,111 | is there a reason not to remove the param now? I think the serdes will still work? | dagster-io-dagster | py |
@@ -39,6 +39,8 @@ class TestBasic(unittest.TestCase):
self.assertEqual(bst.current_iteration(), 20)
self.assertEqual(bst.num_trees(), 20)
self.assertEqual(bst.num_model_per_iteration(), 1)
+ self.assertAlmostEqual(bst.upper_bound(), 3.32, places=2)
+ self.assertAlmostEqual(bst.l... | 1 | # coding: utf-8
import os
import tempfile
import unittest
import lightgbm as lgb
import numpy as np
from scipy import sparse
from sklearn.datasets import load_breast_cancer, dump_svmlight_file, load_svmlight_file
from sklearn.model_selection import train_test_split
class TestBasic(unittest.TestCase):
def test(... | 1 | 22,104 | `places=2` seems to be very poor comparison. Do you have any thoughts why is it fail with more strict checks? | microsoft-LightGBM | cpp |
@@ -213,6 +213,7 @@ public class ProjectManager {
fetchedProject = this.projectsByName.get(name);
} else {
try {
+ logger.info("Project " + name + " doesn't exist in cache, fetching from DB now.");
fetchedProject = this.projectLoader.fetchProjectByName(name);
} catch (final Pro... | 1 | /*
* Copyright 2012 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 15,479 | should we make level debug? Also just FYI, with debug level, we can add more detailed logging for better debuggability without concerning overwhelming logging message | azkaban-azkaban | java |
@@ -20,14 +20,16 @@
# ----------------------------------------------------------------------
"""
-## @file
-stats.py defines functions and data structures related to statistical analysis.
+Module of statistical data structures and functions used in learning algorithms
+and for analysis of HTM network inputs and out... | 1 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | 1 | 22,092 | I needed to add this import for Sphinx to inspect C++ runtime objects properly. This should be the only code change in this PR. | numenta-nupic | py |
@@ -1,6 +1,8 @@
import colander
from cliquet import resource
+from cliquet.events import ResourceChanged, ACTIONS
+from pyramid.events import subscriber
from kinto.views import NameGenerator
| 1 | import colander
from cliquet import resource
from kinto.views import NameGenerator
class GroupSchema(resource.ResourceSchema):
members = colander.SchemaNode(colander.Sequence(),
colander.SchemaNode(colander.String()))
@resource.register(name='group',
collec... | 1 | 8,685 | Changes in this file aren't related to the PR, are they? You took the opportunity to change the group deletion to using the subscriber too? | Kinto-kinto | py |
@@ -150,6 +150,19 @@ public class MetricsModes {
}
}
+ /**
+ * Auto promote sorted columns to truncate(16) if default is set at Counts or None.
+ * @param defaultMode default mode
+ * @return mode to use
+ */
+ public static MetricsMode promoteSortedColumnDefault(MetricsMode defaultMode) {
+ if (... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1 | 33,673 | I'd probably move this into `MetricsConfig` as a private method. Seems like we only use it there. | apache-iceberg | java |
@@ -93,7 +93,7 @@ class Lint(base.Base):
),
)
def lint(ctx, scenario_name): # pragma: no cover
- """ Lint the role. """
+ """ Lint the role (dependency, lint). """
args = ctx.obj.get('args')
subcommand = base._get_subcommand(__name__)
command_args = {'subcommand': subcommand} | 1 | # Copyright (c) 2015-2018 Cisco Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... | 1 | 9,966 | Not clear here what you mean with this list | ansible-community-molecule | py |
@@ -190,6 +190,7 @@ public class IcebergDecoder<D> extends MessageDecoder.BaseDecoder<D> {
* @return true if the buffer is complete, false otherwise (stream ended)
* @throws IOException if there is an error while reading
*/
+ @SuppressWarnings("checkstyle:InnerAssignment")
private boolean readFully(Inpu... | 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,512 | Curious, is there a way we can get around this without suppressing? | apache-iceberg | java |
@@ -131,6 +131,7 @@ func (manager *Manager) Create(consumerID identity.Identity, issuerID identity.I
sessionInstance.ConsumerID = consumerID
sessionInstance.done = make(chan struct{})
sessionInstance.Config = config
+ sessionInstance.ProposalID = proposalID
sessionInstance.CreatedAt = time.Now().UTC()
balan... | 1 | /*
* Copyright (C) 2017 The "MysteriumNetwork/node" Authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | 1 | 14,020 | I don't think we this field in session, it's a serial number for proposal but not unique index itself | mysteriumnetwork-node | go |
@@ -42,6 +42,16 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance
}
}
+ [Benchmark(Baseline = true, OperationsPerInvoke = RequestParsingData.InnerLoopCount)]
+ public void PlaintextAbsoluteUri()
+ {
+ for (var i = 0; i < RequestParsingData.InnerLoopCoun... | 1 | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.IO.Pipelines;
using BenchmarkDotNet.Attributes;
using Microsoft.AspNetCore.Server.Kestrel.Internal.Http;
using Microsoft.Asp... | 1 | 11,987 | Can't have two benchmarks with `Baseline = true` | aspnet-KestrelHttpServer | .cs |
@@ -0,0 +1,19 @@
+
+import { wpApiFetch } from './wp-api-fetch';
+
+import { testClientConfig } from './test-client-config';
+
+/**
+ *
+ * @param {*} config
+ */
+export async function setClientConfig( config = testClientConfig ) {
+ return await wpApiFetch( {
+ path: 'google-site-kit/v1/e2e/auth/client-config',
+ m... | 1 | 1 | 24,612 | Same here: Empty line before and no `Internal dependencies` docblock (mandatory anyway once #217 lands). | google-site-kit-wp | js | |
@@ -59,7 +59,7 @@ func newAddCommand(root *command) *cobra.Command {
cmd.Flags().StringVar(&c.repoID, "repo-id", c.repoID, "The repository ID. One the registered repositories in the piped configuration.")
cmd.Flags().StringVar(&c.appDir, "app-dir", c.appDir, "The relative path from the root of repository to the a... | 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 | 23,626 | sorry, the default value for this field is no longer allowed? | pipe-cd-pipe | go |
@@ -308,10 +308,10 @@ namespace Microsoft.CodeAnalysis.Sarif.Driver.Sdk
[Fact]
public void UnauthorizedAccessExceptionCreatingSarifLog()
{
- string path = Environment.GetFolderPath(Environment.SpecialFolder.Windows);
+ string path = Environment.GetFolderPath(Environment.... | 1 | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.IO;
using System.Reflection;
using Microsoft.CodeAnalysis.Sarif.Sdk;
using Microsoft.CodeAnalysis.Sarif.Readers;
using Newtonsoft.Json;
us... | 1 | 10,051 | Why does this work? I'd've expected that an admin could create a file anywhere. | microsoft-sarif-sdk | .cs |
@@ -53,7 +53,7 @@ module Travis
def script
if config[:solution]
- sh.cmd "xbuild #{config[:solution]}", timing: true if config[:solution]
+ sh.cmd "xbuild /p:Configuration=#{config[:configuration] || 'Release'} /p:Platform=\"#{config[:platform] || 'x64'}\" #{config[:solution]... | 1 | # Maintained by:
# Joshua Anderson @joshua-anderson j@joshua-anderson.com
# Alexander Köplinger @akoeplinger alex.koeplinger@outlook.com
# Nicholas Terry @nterry nick.i.terry@gmail.com
module Travis
module Build
class Script
class Csharp < Script
DEFAULTS = {
csharp:... | 1 | 12,453 | falling back to `x64` seems like a really bad idea given that the VS templates default to x86 these days. | travis-ci-travis-build | rb |
@@ -356,7 +356,7 @@ class TestBokehPlotInstantiation(ComparisonTestCase):
def tearDown(self):
Store.current_backend = self.previous_backend
Callback._comm_type = comms.JupyterCommJS
- mpl_renderer.comms['default'] = self.default_comm
+ bokeh_renderer.comms['default'] = self.default_... | 1 | """
Tests of plot instantiation (not display tests, just instantiation)
"""
from __future__ import unicode_literals
import logging
import datetime as dt
from collections import deque
from unittest import SkipTest
from nose.plugins.attrib import attr
from io import StringIO
import param
import numpy as np
from holovie... | 1 | 19,824 | Bit surprised by this. I would have thought either you want to set it for both mpl and bokeh...or alternatively it was only ever meant for bokeh and was always wrong? | holoviz-holoviews | py |
@@ -490,6 +490,8 @@ given file (report RP0402 must not be disabled)'}
importedname = node.modname
else:
importedname = node.names[0][0].split('.')[0]
+ if node.as_string().startswith('from .'):
+ importedname = '.' + importedname
self._imports_st... | 1 | # Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, o... | 1 | 8,393 | Check modname instead, but only if it's a ImportFrom. | PyCQA-pylint | py |
@@ -92,6 +92,13 @@ public class TableProperties {
public static final String METADATA_COMPRESSION = "write.metadata.compression-codec";
public static final String METADATA_COMPRESSION_DEFAULT = "none";
+ public static final String PREVIOUS_METADATA_LOG_MAX_COUNT = "write.metadata.previous-log-max-count";
+ pu... | 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 | 16,630 | How about `write.metadata.previous-versions-max`? No need to refer to these as a log. | apache-iceberg | java |
@@ -36,6 +36,7 @@ RSpec.configure do |config|
end
config.filter_run_excluding appveyor_agents: true unless ENV['APPVEYOR_AGENTS']
+ config.filter_run_excluding windows: true unless ENV['BOLT_WINDOWS']
# rspec-mocks config
config.mock_with :rspec do |mocks| | 1 | # frozen_string_literal: true
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
require 'bolt'
require 'bolt/logger'
require 'logging'
require 'rspec/logging_helper'
# Make sure puppet is required for the 'reset puppet settings' context
require 'puppet_pal'
ENV['RACK_ENV'] = 'test'
$LOAD_PATH.unshif... | 1 | 10,261 | We generally do this via tags in the Rakefile, not separate environment variables. | puppetlabs-bolt | rb |
@@ -368,6 +368,8 @@ class RemoteConnection(object):
('POST', '/session/$sessionId/window/rect'),
Command.GET_WINDOW_RECT:
('GET', '/session/$sessionId/window/rect'),
+ Command.W3C_MINIMIZE_WINDOW:
+ ('POST', '/session/$sessionId/window/minimize'),... | 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,688 | Update after command rename | SeleniumHQ-selenium | js |
@@ -369,7 +369,13 @@ class CLAModel(Model):
results.inferences = {}
self._input = inputRecord
- # -------------------------------------------------------------------------
+ # Check if the input includes the predicted field.
+ if not self._predictedFieldName in self._input:
+ raise ValueError(... | 1 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | 1 | 18,867 | `if X not in Y:` | numenta-nupic | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.