hash
stringlengths
40
40
diff
stringlengths
131
26.7k
message
stringlengths
7
694
project
stringlengths
5
67
split
stringclasses
1 value
diff_languages
stringlengths
2
24
021a3f45cac5c440d4662608989d93e5d626f198
diff --git a/src/main/java/io/reactivex/Observable.java b/src/main/java/io/reactivex/Observable.java index <HASH>..<HASH> 100644 --- a/src/main/java/io/reactivex/Observable.java +++ b/src/main/java/io/reactivex/Observable.java @@ -1262,7 +1262,7 @@ public class Observable<T> implements Publisher<T> { return repeat(times).subscribeOn(scheduler); } - public final <U> Observable<U> collect(U initialValue, BiConsumer<? super U, ? super T> collector) { + public final <U> Observable<U> collectInto(U initialValue, BiConsumer<? super U, ? super T> collector) { return collect(() -> initialValue, collector); }
collect: javac is unable to select the right overload for some reason
ReactiveX_RxJava
train
java
de879c7d0a4d986f62e70ea57dabd0cf1c059917
diff --git a/pymola/parser/parsimonious_parser/visitors.py b/pymola/parser/parsimonious_parser/visitors.py index <HASH>..<HASH> 100644 --- a/pymola/parser/parsimonious_parser/visitors.py +++ b/pymola/parser/parsimonious_parser/visitors.py @@ -4,17 +4,17 @@ from parsimonious.nodes import NodeVisitor class ModelicaPrinter(NodeVisitor): def __init__(self): - print + print() def info(self, node): return '\033[94m {:s} \033[0m {:s}'.format( node.expr_name, node.full_text[node.start:node.end]) def generic_visit(self, node, visited_children): - print self.info(node) + print(self.info(node)) def visit_class_definition(self, node, visitied_children): - print self.info(node) + print(self.info(node)) def visit_(self, node, visitied_children): pass
Fixed parsimonious printing for python 3.
pymoca_pymoca
train
py
a8ed81d129a0e1dac6f27caaea3643087d9087c3
diff --git a/calendar-bundle/contao/Events.php b/calendar-bundle/contao/Events.php index <HASH>..<HASH> 100644 --- a/calendar-bundle/contao/Events.php +++ b/calendar-bundle/contao/Events.php @@ -263,13 +263,26 @@ abstract class Events extends Module $arrEvent['target'] = ($objPage->outputFormat == 'xhtml') ? ' onclick="window.open(this.href); return false;"' : ' target="_blank"'; } + // Clean the RTE output + if ($arrEvent['teaser'] != '') + { + if ($objPage->outputFormat == 'xhtml') + { + $arrEvent['teaser'] = $this->String->toXhtml($arrEvent['teaser']); + } + else + { + $arrEvent['teaser'] = $this->String->toHtml5($arrEvent['teaser']); + } + } + // Display the "read more" button for external/article links if (($objEvents->source == 'external' || $objEvents->source == 'article') && $objEvents->details == '') { $arrEvent['details'] = true; } - // Clean RTE output + // Clean the RTE output else { if ($objPage->outputFormat == 'xhtml')
[Calendar] News and event teasers were not converted to HTML5/XHTML (#<I>)
contao_contao
train
php
504a0b09d21855a7a7b6ed96beeab0e21a24842f
diff --git a/pymux/options.py b/pymux/options.py index <HASH>..<HASH> 100644 --- a/pymux/options.py +++ b/pymux/options.py @@ -194,5 +194,5 @@ ALL_OPTIONS = { ALL_WINDOW_OPTIONS = { - 'synchronize_panes': OnOffOption('synchronize_panes', window_option=True), + 'synchronize-panes': OnOffOption('synchronize_panes', window_option=True), }
Dash instead of underscore in synchronize-panes.
prompt-toolkit_pymux
train
py
acc4a147499e633d85dba44ff95bf7f0949461ff
diff --git a/packages/graphiql/src/components/QueryEditor.js b/packages/graphiql/src/components/QueryEditor.js index <HASH>..<HASH> 100644 --- a/packages/graphiql/src/components/QueryEditor.js +++ b/packages/graphiql/src/components/QueryEditor.js @@ -95,6 +95,7 @@ export class QueryEditor extends React.Component { schema: this.props.schema, closeOnUnfocus: false, completeSingle: false, + container: this._node, }, info: { schema: this.props.schema, diff --git a/packages/graphiql/src/components/VariableEditor.js b/packages/graphiql/src/components/VariableEditor.js index <HASH>..<HASH> 100644 --- a/packages/graphiql/src/components/VariableEditor.js +++ b/packages/graphiql/src/components/VariableEditor.js @@ -84,6 +84,7 @@ export class VariableEditor extends React.Component { variableToType: this.props.variableToType, closeOnUnfocus: false, completeSingle: false, + container: this._node, }, gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter'], extraKeys: {
The hint dom nodes lives outside the codemirror dom tree currently. (#<I>)
graphql_graphiql
train
js,js
e032914fb9e0b00ce717cb920edee6c3d4621f7f
diff --git a/README.md b/README.md index <HASH>..<HASH> 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Shelf is available via Composer. ```json { "require": { - "oscarpalmer/shelf": "1.2.*" + "oscarpalmer/shelf": "1.3.*" } } ``` diff --git a/src/oscarpalmer/Shelf/Request.php b/src/oscarpalmer/Shelf/Request.php index <HASH>..<HASH> 100644 --- a/src/oscarpalmer/Shelf/Request.php +++ b/src/oscarpalmer/Shelf/Request.php @@ -174,7 +174,7 @@ class Request $uri ); - $this->path_info = $path; + $this->path_info = "/" . ltrim($path, "/"); } /** Static functions. */ diff --git a/src/oscarpalmer/Shelf/Shelf.php b/src/oscarpalmer/Shelf/Shelf.php index <HASH>..<HASH> 100644 --- a/src/oscarpalmer/Shelf/Shelf.php +++ b/src/oscarpalmer/Shelf/Shelf.php @@ -10,5 +10,5 @@ class Shelf /** * @var string Current version number. */ - const VERSION = "1.2.0"; + const VERSION = "1.3.0"; }
<I> path_info fix for nginx
oscarpalmer_shelf
train
md,php,php
97b9f721416560144fb00f02e48d51a45efe2181
diff --git a/Eloquent/Builder.php b/Eloquent/Builder.php index <HASH>..<HASH> 100755 --- a/Eloquent/Builder.php +++ b/Eloquent/Builder.php @@ -913,7 +913,7 @@ class Builder continue; } - $builder->callScope(function (Builder $builder) use ($scope) { + $builder->callScope(function (self $builder) use ($scope) { // If the scope is a Closure we will just go ahead and call the scope with the // builder instance. The "callScope" method will properly group the clauses // that are added to this query so "where" clauses maintain proper logic.
Apply fixes from StyleCI (#<I>)
illuminate_database
train
php
ad8c006109b22612795660dfa3d9c70943c93b41
diff --git a/lib/puppet.rb b/lib/puppet.rb index <HASH>..<HASH> 100644 --- a/lib/puppet.rb +++ b/lib/puppet.rb @@ -1,4 +1,5 @@ require 'puppet/version' +require 'puppet/concurrent/synchronized' if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new("2.3.0") raise LoadError, "Puppet #{Puppet.version} requires Ruby 2.3.0 or greater, found Ruby #{RUBY_VERSION.dup}." @@ -6,6 +7,8 @@ end Puppet::OLDEST_RECOMMENDED_RUBY_VERSION = '2.3.0' +$LOAD_PATH.extend(Puppet::Concurrent::Synchronized) + # see the bottom of the file for further inclusions # Also see the new Vendor support - towards the end #
(PUP-<I>) Synchronize $LOAD_PATH Since we may not have control over everywhere that manipulates $LOAD_PATH in a threaded context, just try to synchronize it whenever running on JRuby.
puppetlabs_puppet
train
rb
8696024f69dfdd23212f0efe2e0094df90ebf346
diff --git a/lib/pupistry/gpg.rb b/lib/pupistry/gpg.rb index <HASH>..<HASH> 100644 --- a/lib/pupistry/gpg.rb +++ b/lib/pupistry/gpg.rb @@ -266,7 +266,7 @@ module Pupistry return false end - unless system "gpg --import < #{$config["general"]["app_cache"]}/artifacts/#{$config["general"]["gpg_signing_key"]}.publickey" + unless system "gpg --import < #{$config["general"]["app_cache"]}/artifacts/#{$config["general"]["gpg_signing_key"]}.publickey > /dev/null 2>&1" $logger.error "A fault occured when trying to import the GPG key" return false end
Silence gpg key import, just adds noise and GPG messages tend to confuse people
jethrocarr_pupistry
train
rb
96f210434a0589a4f18aef139929467fffa748af
diff --git a/faker/providers/ssn/es_MX/__init__.py b/faker/providers/ssn/es_MX/__init__.py index <HASH>..<HASH> 100644 --- a/faker/providers/ssn/es_MX/__init__.py +++ b/faker/providers/ssn/es_MX/__init__.py @@ -221,6 +221,7 @@ class Provider(BaseProvider): second_surname = random.choice(ALPHABET) given_name = random.choice(ALPHABET) name_initials = first_surname + second_surname + given_name + name_initials = FORBIDDEN_WORDS.get(name_initials, name_initials) else: name_initials = ( self.random_uppercase_letter() +
Replace rfc name initials when they are forbidden words (#<I>)
joke2k_faker
train
py
2ca487e6433a4ec5a7754235b31e836cbf2d79d8
diff --git a/tests/qunit_configuration.js b/tests/qunit_configuration.js index <HASH>..<HASH> 100644 --- a/tests/qunit_configuration.js +++ b/tests/qunit_configuration.js @@ -243,7 +243,9 @@ } Ember.deprecate = function(msg, test) { EmberDev.deprecations.actuals = EmberDev.deprecations.actuals || []; - EmberDev.deprecations.actuals.push([msg, test]); + if (!test) { + EmberDev.deprecations.actuals.push([msg, test]); + } }; }, restoreEmber: function(){
Ensure only failing deprecations are logged by test helpers.
emberjs_ember.js
train
js
501b604ddf71b08d41d8e1acd2e94ca971f45277
diff --git a/src/passes/EffectPass.js b/src/passes/EffectPass.js index <HASH>..<HASH> 100644 --- a/src/passes/EffectPass.js +++ b/src/passes/EffectPass.js @@ -364,7 +364,8 @@ export class EffectPass extends Pass { if(effect.blendMode.blendFunction === BlendFunction.SKIP) { - continue; + // Check if this effect relies on depth and then continue. + attributes |= (effect.attributes & EffectAttribute.DEPTH); } else if((attributes & EffectAttribute.CONVOLUTION) !== 0 && (effect.attributes & EffectAttribute.CONVOLUTION) !== 0) {
Don't discard depth flags.
vanruesc_postprocessing
train
js
359cfdd243c8614eebd64c8b8111b717e8c9478b
diff --git a/AntiSpoof.php b/AntiSpoof.php index <HASH>..<HASH> 100644 --- a/AntiSpoof.php +++ b/AntiSpoof.php @@ -103,15 +103,17 @@ function asAbortNewAccountHook( $user, &$message ) { /** * Set the ignore spoof thingie */ -function asUserCreateFormHook( &$template ) { +function asUserCreateFormHook( &$sp ) { global $wgRequest, $wgAntiSpoofAccounts, $wgUser; wfLoadExtensionMessages( 'AntiSpoof' ); if( $wgAntiSpoofAccounts && $wgUser->isAllowed( 'override-antispoof' ) ) - $template->addInputItem( 'wpIgnoreAntiSpoof', - $wgRequest->getCheck('wpIgnoreAntiSpoof'), - 'checkbox', 'antispoof-ignore' ); + $sp->mFormFields['IgnoreAntiSpoof'] = array( + 'type' => 'check', + 'default' => $wgRequest->getCheck('wpIgnoreAntiSpoof'), + 'label-message' => 'antispoof-ignore' + ); return true; }
Merge in Login rewrite, second time lucky.
wikimedia_mediawiki-extensions-AntiSpoof
train
php
36d1233c22d185cffd99e06142c32324d7281164
diff --git a/spec/simplecov_helper.rb b/spec/simplecov_helper.rb index <HASH>..<HASH> 100644 --- a/spec/simplecov_helper.rb +++ b/spec/simplecov_helper.rb @@ -1,6 +1,8 @@ require 'simplecov' +require 'activefacts/api' + SimpleCov.start do add_filter "/spec/" add_filter "/lib/activefacts/tracer.rb" -end \ No newline at end of file +end
Coverage needs to require activefacts/api first
cjheath_activefacts-api
train
rb
0c9e5db9cbc2c47cdf3c480cafcdf32425c378ca
diff --git a/rllib/agents/sac/sac_policy.py b/rllib/agents/sac/sac_policy.py index <HASH>..<HASH> 100644 --- a/rllib/agents/sac/sac_policy.py +++ b/rllib/agents/sac/sac_policy.py @@ -160,7 +160,7 @@ def actor_critic_loss(policy, model, _, train_batch): # Q-values for current policy (no noise) in given current state q_t_det_policy = model.get_q_values(model_out_t, policy_t) if policy.config["twin_q"]: - twin_q_t_det_policy = model.get_q_values(model_out_t, policy_t) + twin_q_t_det_policy = model.get_twin_q_values(model_out_t, policy_t) q_t_det_policy = tf.reduce_min( (q_t_det_policy, twin_q_t_det_policy), axis=0)
Fix SAC bug (twin Q not used for min'ing over both Q-nets in loss func). (#<I>)
ray-project_ray
train
py
36ac2c7ffe0327818b4cefa35573f4128e0d4e1b
diff --git a/lib/winston-loggly.js b/lib/winston-loggly.js index <HASH>..<HASH> 100644 --- a/lib/winston-loggly.js +++ b/lib/winston-loggly.js @@ -42,7 +42,8 @@ var Loggly = exports.Loggly = function (options) { this.client = loggly.createClient({ subdomain: options.subdomain, auth: options.auth || null, - json: options.json || false + json: options.json || false, + token: options.token }); if (this.tags && !Array.isArray(this.tags)) {
[fix] pass in token to the actual loggly client
winstonjs_winston-loggly
train
js
af3307e9d947dff49bfaa1386a87b93f12c9bf82
diff --git a/lib/ecwid_api/order.rb b/lib/ecwid_api/order.rb index <HASH>..<HASH> 100644 --- a/lib/ecwid_api/order.rb +++ b/lib/ecwid_api/order.rb @@ -43,11 +43,18 @@ module EcwidApi # Public: Returns the billing person def billing_person - @billing_person ||= Person.new(data["billingPerson"]) + return unless data["billingPerson"] || data["shippingPerson"] + + @billing_person ||= if data["billingPerson"] + Person.new(data["billingPerson"]) + else + shipping_person + end end # Public: Returns the shipping person def shipping_person + return unless data["shippingPerson"] || data["billingPerson"] @shipping_person ||= if data["shippingPerson"] Person.new(data["shippingPerson"]) else
Uses the shippingPerson if the billingPerson is unavilable
davidbiehl_ecwid_api
train
rb
4e9654b7220477b34957c2e5a8f215b1cd24426c
diff --git a/lib/sass.rb b/lib/sass.rb index <HASH>..<HASH> 100644 --- a/lib/sass.rb +++ b/lib/sass.rb @@ -377,6 +377,23 @@ $LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir) # Sass supports a simple language known as SassScript # for dynamically computing CSS values. # +# === Interactive Shell +# +# You can easily experiment with SassScript using the interactive shell. +# To launch the shell run sass command-line with the -i option. At the +# prompt, enter any legal SassScript expression to have it evaluated +# and the result printed out for you: +# +# $ sass -i +# >> "Hello, Sassy World!" +# "Hello, Sassy World!" +# >> 1px + 1px + 1px +# 3px +# >> #777 + #777 +# #eeeeee +# >> #777 + #888 +# white +# # === Variables # # The most straightforward way to use SassScript
[Sass] Document the Sass REPL.
sass_ruby-sass
train
rb
9fc04f3b50b65ba1a78cc191cf4a70fd7b7ce66f
diff --git a/samp_server_cli.py b/samp_server_cli.py index <HASH>..<HASH> 100644 --- a/samp_server_cli.py +++ b/samp_server_cli.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # Copyright (c) 2012-2015 Zeex # All rights reserved. #
Remove shebang The script is not supposed to be executed directly.
Zeex_samp-server-cli
train
py
e19f7ae95f1d55d2018be3749e47d9c4d92d4272
diff --git a/collectors/php_errors.php b/collectors/php_errors.php index <HASH>..<HASH> 100644 --- a/collectors/php_errors.php +++ b/collectors/php_errors.php @@ -30,6 +30,7 @@ if ( defined( 'E_USER_DEPRECATED' ) ) { class QM_Collector_PHP_Errors extends QM_Collector { public $id = 'php_errors'; + private $display_errors = null; public function name() { return __( 'PHP Errors', 'query-monitor' ); @@ -40,6 +41,9 @@ class QM_Collector_PHP_Errors extends QM_Collector { parent::__construct(); set_error_handler( array( $this, 'error_handler' ) ); + $this->display_errors = ini_get( 'display_errors' ); + ini_set( 'display_errors', 0 ); + } public function error_handler( $errno, $message, $file = null, $line = null ) { @@ -103,12 +107,13 @@ class QM_Collector_PHP_Errors extends QM_Collector { } - return apply_filters( 'qm/collect/php_errors_return_value', true ); + return apply_filters( 'qm/collect/php_errors_return_value', false ); } public function tear_down() { parent::tear_down(); + ini_set( 'display_errors', $this->display_errors ); restore_error_handler(); }
Switch back to returning `false` by default from our error handler, and disable `display_errors` instead. This allows default error handlers, such as error logging, to continue to function as expected.
johnbillion_query-monitor
train
php
e9044be4c4f8e3dc442acb249a2e78691bb1d39a
diff --git a/examples/shelly/main.py b/examples/shelly/main.py index <HASH>..<HASH> 100644 --- a/examples/shelly/main.py +++ b/examples/shelly/main.py @@ -2,7 +2,7 @@ import settings from aswitch import Switch from homie.constants import FALSE, TRUE, BOOLEAN from homie.device import HomieDevice -from homie.node import HomieNode +from homie.node import HomieNode, MPy from homie.property import HomieNodeProperty from machine import Pin @@ -55,8 +55,12 @@ def main(): ) homie = HomieDevice(settings) + + homie.add_node(MPy()) + homie.add_node(relay1) homie.add_node(relay2) + homie.run_forever()
Add micropython node to shelly example
microhomie_microhomie
train
py
37fc93dce1924918ea47237f31fd8ed75f2c6df8
diff --git a/library/CM/Session.php b/library/CM/Session.php index <HASH>..<HASH> 100644 --- a/library/CM/Session.php +++ b/library/CM/Session.php @@ -90,7 +90,7 @@ class CM_Session { /** * @param CM_Model_User $user - * @param int $cookieLifetime + * @param int|null $cookieLifetime */ public function login(CM_Model_User $user, $cookieLifetime = null) { if ($cookieLifetime) {
t8: Session remember refactoring
cargomedia_cm
train
php
5d7d037ad7cc2925c691876c082eb967c8a416a4
diff --git a/autoloads/eztagstemplatefunctions.php b/autoloads/eztagstemplatefunctions.php index <HASH>..<HASH> 100644 --- a/autoloads/eztagstemplatefunctions.php +++ b/autoloads/eztagstemplatefunctions.php @@ -84,17 +84,15 @@ class eZTagsTemplateFunctions * Generates tag heirarchy string for given tag ID * * @static - * @param integer $tag_id + * @param integer $tagID * @return string */ - static function generateParentString( $tag_id ) + static function generateParentString( $tagID ) { - if ( $tag_id == 0 ) - { + $tag = eZTagsObject::fetch( $tagID ); + if ( !$tag instanceof eZTagsObject ) return '(' . ezpI18n::tr( 'extension/eztags/tags/edit', 'no parent' ) . ')'; - } - $tag = eZTagsObject::fetch( $tag_id ); $synonymsCount = $tag->getSynonymsCount(); $keywordsArray = array();
Fix a bug in method that generates parent strings in case there are references to deleted tags in class attribute
ezsystems_eztags
train
php
9fb393ee3eec24ec657b9d8135847210373003cc
diff --git a/src/Strategies/Form/Store/AbstractFormFieldStoreStrategy.php b/src/Strategies/Form/Store/AbstractFormFieldStoreStrategy.php index <HASH>..<HASH> 100644 --- a/src/Strategies/Form/Store/AbstractFormFieldStoreStrategy.php +++ b/src/Strategies/Form/Store/AbstractFormFieldStoreStrategy.php @@ -251,7 +251,7 @@ class AbstractFormFieldStoreStrategy implements FormFieldStoreStrategyInterface $translated = array_map( function ($key) { - return $key . '.<trans>'; + return $key . '.' . TranslationLocaleHelper::VALIDATION_LOCALE_PLACEHOLDER; }, $translated );
Minor cleanup: replaced hardcoded locale placeholder with constant
czim_laravel-cms-models
train
php
0357bb033fc5156cdcf25e388d49ec9a786c29e3
diff --git a/test/src/test/java/hudson/model/UpdateCenterTest.java b/test/src/test/java/hudson/model/UpdateCenterTest.java index <HASH>..<HASH> 100644 --- a/test/src/test/java/hudson/model/UpdateCenterTest.java +++ b/test/src/test/java/hudson/model/UpdateCenterTest.java @@ -33,6 +33,10 @@ import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.util.Base64; import java.util.Date; + +import static java.util.Objects.requireNonNull; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.startsWith; import static org.junit.Assert.assertTrue; import static org.junit.Assume.*; import org.junit.Test; @@ -59,7 +63,7 @@ public class UpdateCenterTest { UpdateSite us = new UpdateSite("default", url.toExternalForm()); UpdateSite.Data data = us.new Data(json); - assertTrue(data.core.url.startsWith("http://updates.jenkins-ci.org/")); + assertThat(requireNonNull(data.core).url, startsWith("https://updates.jenkins.io/")); assertTrue(data.plugins.containsKey("rake")); System.out.println(data.core.url);
[INFRA-<I>] Adjust test for HTTPS core download URLs (#<I>)
jenkinsci_jenkins
train
java
e7b31c6d4ee151f50883f6d5bc79b3c460c0fa49
diff --git a/tests/abstract_examples.js b/tests/abstract_examples.js index <HASH>..<HASH> 100644 --- a/tests/abstract_examples.js +++ b/tests/abstract_examples.js @@ -90,7 +90,7 @@ goog.inherits(sre.AbstractExamples, sre.AbstractTest); sre.AbstractExamples.prototype.setActive = function(file) { this.examplesFile_ = this.fileDirectory_ + '/' + file + '.' + this.fileExtension_; - this.active_ = true; + this.active_ = false; };
Switches off automatic example generation during testing.
zorkow_speech-rule-engine
train
js
b6982a5b02f429811374320cfd24fe1bd060fccd
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerEdge.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerEdge.java index <HASH>..<HASH> 100644 --- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerEdge.java +++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerEdge.java @@ -39,7 +39,7 @@ import java.util.stream.Collectors; /** * @author Marko A. Rodriguez (http://markorodriguez.com) */ -public final class TinkerEdge extends TinkerElement implements Edge { +public class TinkerEdge extends TinkerElement implements Edge { protected Map<String, Property> properties; protected final Vertex inVertex;
TinkerEdge can not be final or else Jackson GraphSON no happy.
apache_tinkerpop
train
java
00d495927d1da287d24ee290396707f4388a02f3
diff --git a/cfcomponent/config.go b/cfcomponent/config.go index <HASH>..<HASH> 100644 --- a/cfcomponent/config.go +++ b/cfcomponent/config.go @@ -9,15 +9,16 @@ import ( ) type Config struct { - Syslog string - VarzPort uint32 - VarzUser string - VarzPass string - NatsHosts []string - NatsPort int - NatsUser string - NatsPass string - MbusClient yagnats.NATSConn + Syslog string + VarzPort uint32 + VarzUser string + VarzPass string + NatsHosts []string + NatsPort int + NatsUser string + NatsPass string + MbusClient yagnats.NATSConn + CollectorRegistrarIntervalMilliseconds int } var DefaultYagnatsClientProvider = func(logger *gosteno.Logger, c *Config) (natsClient yagnats.NATSConn, err error) {
Add CollectorRegistrarIntervalMilliseconds option to cfcomponent.Config Configuration option is used by CollectorRegistrar to control how often registration messages are sent to collector.
cloudfoundry-attic_loggregatorlib
train
go
4627e70f85074b2a0d06b0a53193bf03ef539b07
diff --git a/registry/rpc/balancer.go b/registry/rpc/balancer.go index <HASH>..<HASH> 100644 --- a/registry/rpc/balancer.go +++ b/registry/rpc/balancer.go @@ -58,7 +58,7 @@ func newSimpleBalancer(eps []string) *simpleBalancer { } } -func (b *simpleBalancer) Start(target string) error { return nil } +func (b *simpleBalancer) Start(target string, config grpc.BalancerConfig) error { return nil } func (b *simpleBalancer) Up(addr grpc.Address) func(error) { b.readyOnce.Do(func() { close(b.readyc) })
registry/rpc: update Balancer.Start() according to gRPC <I> As the API of gRPC <I> has changed w.r.t. Balancer.Start(), we also need to update simpleBalancer.Start() to make it include config param.
coreos_fleet
train
go
5d83ff91ae6b6f33f2f4851e37eab28effef41ac
diff --git a/pyhocon/config_parser.py b/pyhocon/config_parser.py index <HASH>..<HASH> 100644 --- a/pyhocon/config_parser.py +++ b/pyhocon/config_parser.py @@ -10,6 +10,7 @@ from pyhocon.config_tree import ConfigTree, ConfigSubstitution, ConfigList, Conf ConfigInclude, NoneValue, ConfigQuotedString from pyhocon.exceptions import ConfigSubstitutionException, ConfigMissingException, ConfigException import logging +import copy use_urllib2 = False try: @@ -452,7 +453,8 @@ class ConfigParser(object): or isinstance(resolved_value, (dict, list)) \ or substitution.index == len(config_values.tokens) - 1 \ else (str(resolved_value) + substitution.ws) - config_values.put(substitution.index, formatted_resolved_value) + # use a deepcopy of resolved_value to avoid mutation + config_values.put(substitution.index, copy.deepcopy(formatted_resolved_value)) transformation = config_values.transform() result = config_values.overriden_value \ if transformation is None and not is_optional_resolved \
config_parser: don't mutate ConfigValues Avoid mutating ConfigValues when passed as part of ConfigTrees. Addresses #<I>
chimpler_pyhocon
train
py
d0629cc0b4c125618ef7f30a9bff190ef8d5dfbe
diff --git a/console/src/main/resources/root/libs/composum/nodes/browser/js/nodeview.js b/console/src/main/resources/root/libs/composum/nodes/browser/js/nodeview.js index <HASH>..<HASH> 100644 --- a/console/src/main/resources/root/libs/composum/nodes/browser/js/nodeview.js +++ b/console/src/main/resources/root/libs/composum/nodes/browser/js/nodeview.js @@ -960,6 +960,7 @@ this.favoriteToggle = this.$detailView.find('.favorite-toggle'); this.checkFavorite(); this.favoriteToggle.click(_.bind(this.toggleFavorite, this)); + this.sourceViewTabVisibility(); }, checkFavorite: function () {
Browser: bugfix sourceview - stay at XML if selected
ist-dresden_composum
train
js
ea59817fcb1a1246d71fea2dda83783ac736b7b1
diff --git a/src/defaults/discard.js b/src/defaults/discard.js index <HASH>..<HASH> 100644 --- a/src/defaults/discard.js +++ b/src/defaults/discard.js @@ -3,6 +3,7 @@ import type { OfflineAction } from '../types'; import { NetworkError } from './effect'; +// eslint-disable-next-line no-unused-vars export default (error: NetworkError, action: OfflineAction, _retries: number = 0): boolean => { // not a network error -> discard if (!('status' in error)) { diff --git a/src/defaults/effect.js b/src/defaults/effect.js index <HASH>..<HASH> 100644 --- a/src/defaults/effect.js +++ b/src/defaults/effect.js @@ -32,6 +32,7 @@ const getResponseBody = (res: any): Promise<{} | string> => { return res.text(); }; +// eslint-disable-next-line no-unused-vars export default (effect: any, _action: OfflineAction): Promise<any> => { const { url, ...options } = effect; const headers = { 'content-type': 'application/json', ...options.headers };
fix: add eslint disable to discard and effect
redux-offline_redux-offline
train
js,js
03ed2e5551ae661e200e6ac562d8892432ddc1dd
diff --git a/lib/active_admin/filter_form_builder.rb b/lib/active_admin/filter_form_builder.rb index <HASH>..<HASH> 100644 --- a/lib/active_admin/filter_form_builder.rb +++ b/lib/active_admin/filter_form_builder.rb @@ -4,6 +4,7 @@ module ActiveAdmin def filter(method, options = {}) return "" if method.nil? || method == "" options[:as] ||= default_filter_type(method) + return "" unless options[:as] content = skip_form_buffers do send("filter_#{options.delete(:as)}_input", method, options) end @@ -40,11 +41,9 @@ module ActiveAdmin case column.type when :date, :datetime return :date_range - else + when :string, :text return :string end - else - return :string end end
The filter form will only render types that we've implemented so far
activeadmin_activeadmin
train
rb
7292e6bbce2c06bd4be78d5110c09bf339d53fb5
diff --git a/tests/src/test/java/com/orientechnologies/orient/test/database/auto/SQLSelectTest.java b/tests/src/test/java/com/orientechnologies/orient/test/database/auto/SQLSelectTest.java index <HASH>..<HASH> 100644 --- a/tests/src/test/java/com/orientechnologies/orient/test/database/auto/SQLSelectTest.java +++ b/tests/src/test/java/com/orientechnologies/orient/test/database/auto/SQLSelectTest.java @@ -244,7 +244,7 @@ public class SQLSelectTest { record.setClassName("Animal"); record.field("name", "Cat"); - Set<ODocument> races = new HashSet<ODocument>(); + Collection<ODocument> races = new HashSet<ODocument>(); races.add(((ODocument) database.newInstance("AnimalRace")).field("name", "European")); races.add(((ODocument) database.newInstance("AnimalRace")).field("name", "Siamese")); record.field("races", races);
Fixed bug on collections in SQL queries reported by <EMAIL> in ML
orientechnologies_orientdb
train
java
90a895f54f586e1c318e3fea531a76953ef97f1e
diff --git a/backbone.layoutmanager.js b/backbone.layoutmanager.js index <HASH>..<HASH> 100644 --- a/backbone.layoutmanager.js +++ b/backbone.layoutmanager.js @@ -94,6 +94,7 @@ var LayoutManager = Backbone.View.extend({ // If the parent View's object, doesn't exist... create it. this.views = this.views || {}; + // Ensure remove is called when swapping View's. if (!append && this.views[name]) { this.views[name].remove();
Correctly call remove() when child views are swapped. Fix #<I> with minor formatting changes
tbranyen_backbone.layoutmanager
train
js
216d946c0e7a543468b789f0ca8e59e634c47924
diff --git a/lib/linner/bundler.rb b/lib/linner/bundler.rb index <HASH>..<HASH> 100644 --- a/lib/linner/bundler.rb +++ b/lib/linner/bundler.rb @@ -52,12 +52,13 @@ module Linner def install_to_repository(url, path) FileUtils.mkdir_p File.dirname(path) File.open(path, "w") do |dist| - open(url) {|file| dist.write file.read} + open(url, "r:UTF-8") {|file| dist.write file.read} end end def link_to_vendor(path, dist) if !File.exist?(dist) or Digest::MD5.file(path).hexdigest != Digest::MD5.file(dist).hexdigest + FileUtils.mkdir_p File.dirname(dist) FileUtils.cp path, dist end end
read as utf-8 when fetch resources
SaitoWu_linner
train
rb
dc7045b1cdcc3a0d1f412d5b2663103a13b4cc75
diff --git a/lib/bugsnag/helpers.rb b/lib/bugsnag/helpers.rb index <HASH>..<HASH> 100644 --- a/lib/bugsnag/helpers.rb +++ b/lib/bugsnag/helpers.rb @@ -3,6 +3,7 @@ require 'uri' module Bugsnag module Helpers MAX_STRING_LENGTH = 4096 + ENCODING_OPTIONS = {:invalid => :replace, :undef => :replace}.freeze def self.cleanup_obj(obj, filters = nil, seen = {}) return nil unless obj @@ -48,9 +49,9 @@ module Bugsnag def self.cleanup_string(str) if defined?(str.encoding) && defined?(Encoding::UTF_8) if str.encoding == Encoding::UTF_8 - str.valid_encoding? ? str : str.encode('utf-16', {:invalid => :replace, :undef => :replace}).encode('utf-8') + str.valid_encoding? ? str : str.encode('utf-16', ENCODING_OPTIONS).encode('utf-8') else - str.encode('utf-8', {:invalid => :replace, :undef => :replace}) + str.encode('utf-8', ENCODING_OPTIONS) end elsif defined?(Iconv) Iconv.conv('UTF-8//IGNORE', 'UTF-8', str) || str
Store encoding options in a constant
bugsnag_bugsnag-ruby
train
rb
bedc7f834f8a72580f12a806abc2b19227a72cd0
diff --git a/ejb3/src/main/java/org/jboss/as/ejb3/timerservice/persistence/filestore/FileTimerPersistence.java b/ejb3/src/main/java/org/jboss/as/ejb3/timerservice/persistence/filestore/FileTimerPersistence.java index <HASH>..<HASH> 100644 --- a/ejb3/src/main/java/org/jboss/as/ejb3/timerservice/persistence/filestore/FileTimerPersistence.java +++ b/ejb3/src/main/java/org/jboss/as/ejb3/timerservice/persistence/filestore/FileTimerPersistence.java @@ -139,6 +139,11 @@ public class FileTimerPersistence implements TimerPersistence, Service<FileTimer final Lock lock = getLock(timerEntity.getTimedObjectId()); try { final int status = transactionManager.getValue().getStatus(); + if(status == Status.STATUS_MARKED_ROLLBACK || status == Status.STATUS_ROLLEDBACK || + status == Status.STATUS_ROLLING_BACK) { + //no need to persist anyway + return; + } if (status == Status.STATUS_NO_TRANSACTION || status == Status.STATUS_UNKNOWN) { try {
Don't persist if the TX is rolled back
wildfly_wildfly
train
java
afb93c1486da9493ed414f6e64dce325f49dfa87
diff --git a/lib/specjour/cucumber/preloader.rb b/lib/specjour/cucumber/preloader.rb index <HASH>..<HASH> 100644 --- a/lib/specjour/cucumber/preloader.rb +++ b/lib/specjour/cucumber/preloader.rb @@ -5,6 +5,7 @@ class Specjour::Cucumber::Preloader step_mother = cli.class.step_mother step_mother.log = cli.configuration.log + step_mother.options = cli.configuration.options step_mother.load_code_files(cli.configuration.support_to_load) step_mother.after_configuration(cli.configuration) features = step_mother.load_plain_text_features(cli.configuration.feature_files)
Hang on to configuration options Needed to work with Cucumber <I>
sandro_specjour
train
rb
a7c2c2bf08b08d418fb5a7b30dba72a041d3032f
diff --git a/lib/bugsnag.rb b/lib/bugsnag.rb index <HASH>..<HASH> 100644 --- a/lib/bugsnag.rb +++ b/lib/bugsnag.rb @@ -48,6 +48,12 @@ module Bugsnag def configure(validate_api_key=true) yield(configuration) if block_given? + # Create the session tracker if sessions are enabled to avoid the overhead + # of creating it on the first request. We skip this if we're not validating + # the API key as we use this internally before the user's configure block + # has run, so we don't know if sessions are enabled yet. + session_tracker if validate_api_key && configuration.auto_capture_sessions + check_key_valid if validate_api_key check_endpoint_setup
Create the session tracker after configure has run Create the session tracker if sessions are enabled to avoid the overhead of creating it on the first request By requiring the concurrent gem in the session tracker's initialize method, we shifted the overhead from startup to the first request. This caused the first request to go from ~<I>ms to ~<I>ms (in the Sinatra example app run locally), which is quite alot of overhead
bugsnag_bugsnag-ruby
train
rb
a9238339f55edac0f2efb4a231c8818c5539bd28
diff --git a/xarray/plot/facetgrid.py b/xarray/plot/facetgrid.py index <HASH>..<HASH> 100644 --- a/xarray/plot/facetgrid.py +++ b/xarray/plot/facetgrid.py @@ -93,7 +93,7 @@ class FacetGrid: data : DataArray xarray DataArray to be plotted. row, col : str - Dimesion names that define subsets of the data, which will be drawn + Dimension names that define subsets of the data, which will be drawn on separate facets in the grid. col_wrap : int, optional "Wrap" the grid the for the column variable after this number of columns,
Fix typo (#<I>)
pydata_xarray
train
py
a3aa2e1e0b86a5a5026115ac8dce82ddda44f9cd
diff --git a/alerta/app/views.py b/alerta/app/views.py index <HASH>..<HASH> 100644 --- a/alerta/app/views.py +++ b/alerta/app/views.py @@ -786,13 +786,10 @@ def delete_heartbeat(id): @jsonp def get_users(): - user_id = request.args.get("id") name = request.args.get("name") login = request.args.get("login") - if user_id: - query = {'user': user_id} - elif name: + if name: query = {'name': name} elif login: query = {'login': login}
Remove users query by id as broken and not used
alerta_alerta
train
py
b4815a9bb98ac5c17168309b6b4143cc56964ead
diff --git a/config/sami.php b/config/sami.php index <HASH>..<HASH> 100644 --- a/config/sami.php +++ b/config/sami.php @@ -2,10 +2,10 @@ <?php $base_dir = dirname(__DIR__); -if (! is_dir($base_dir . DIRECTORY_SEPARATOR . 'vendor')) { +if (!is_dir($base_dir . DIRECTORY_SEPARATOR . 'vendor')) { $base_dir = dirname(dirname(dirname($base_dir))); } -if (! is_dir($base_dir . DIRECTORY_SEPARATOR . 'vendor')) { +if (!is_dir($base_dir . DIRECTORY_SEPARATOR . 'vendor')) { throw new Exception('Unable to locate vendor directory.'); } @@ -23,7 +23,6 @@ return new Sami\Sami( 'build_dir' => __DIR__.'/../build/docs/', 'cache_dir' => __DIR__.'/../build/cache', 'template_dirs' => array(__DIR__.'/sami-theme'), - 'favicon' => 'trellis-favicon.png', - // 'base_url' => 'http://localhost:8081/docs/', + 'favicon' => 'trellis-favicon.png' ] );
fixed sami.php code-style violoation
honeybee_trellis
train
php
e65013734493d114ce8c7e3bef222a5c31cbacc8
diff --git a/src/BigDecimal.php b/src/BigDecimal.php index <HASH>..<HASH> 100644 --- a/src/BigDecimal.php +++ b/src/BigDecimal.php @@ -306,7 +306,7 @@ class BigDecimal implements \Serializable list ($quotient, $remainder) = Calculator::get()->div($p, $q); - $scale = max($this->scale, $that->scale); + $scale = $this->scale > $that->scale ? $this->scale : $that->scale; $quotient = new BigDecimal($quotient, 0); $remainder = new BigDecimal($remainder, $scale);
Replace call to max() function This provides a slight performance improvement on PHP 5.
brick_math
train
php
06773ef86a77b0927329dfc750b2510d9a5d290c
diff --git a/tests/blessed_images/generated_blessed_images.py b/tests/blessed_images/generated_blessed_images.py index <HASH>..<HASH> 100644 --- a/tests/blessed_images/generated_blessed_images.py +++ b/tests/blessed_images/generated_blessed_images.py @@ -15,8 +15,8 @@ from worldengine.draw import * def main(blessed_images_dir, tests_data_dir): w = World.open_protobuf("%s/seed_28070.world" % tests_data_dir) - draw_simple_elevation_on_file(w.elevation['data'], "%s/simple_elevation_28070.png" - % blessed_images_dir, w.width, w.height, w.sea_level()) + draw_simple_elevation_on_file(w, "%s/simple_elevation_28070.png" + % blessed_images_dir, w.sea_level()) draw_elevation_on_file(w, "%s/elevation_28070_shadow.png" % blessed_images_dir, shadow=True) draw_elevation_on_file(w, "%s/elevation_28070_no_shadow.png" % blessed_images_dir, shadow=False) draw_riversmap_on_file(w, "%s/riversmap_28070.png" % blessed_images_dir)
Updated to test new version of draw_simple_elevation_on_file.
Mindwerks_worldengine
train
py
38a01a8f83972dd7eee3ec124ebe0b1c0cdc6ddd
diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index <HASH>..<HASH> 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -27,6 +27,7 @@ class Configuration implements ConfigurationInterface $rootNode->children() ->scalarNode('cache_dir')->defaultValue('%kernel.cache_dir%/orkestra_pdf')->end() ->arrayNode('tcpdf') + ->addDefaultsIfNotSet() ->children() ->scalarNode('root_dir')->defaultValue('%kernel.root_dir%/../vendor/tecnick.com/tcpdf')->end() ->scalarNode('fonts_dir')->defaultValue('%orkestra.pdf.tcpdf.root_dir%/fonts')->end() @@ -34,6 +35,7 @@ class Configuration implements ConfigurationInterface ->end() ->end() ->arrayNode('wkhtmltopdf') + ->addDefaultsIfNotSet() ->children() ->scalarNode('binary_path')->defaultValue('wkhtmltopdf')->end() ->end()
Bundle Configuration now has defaults
orkestra_OrkestraPdfBundle
train
php
c3b02ec2e0c9bbd838b2b8facc960388a177aefb
diff --git a/flaskext/login.py b/flaskext/login.py index <HASH>..<HASH> 100644 --- a/flaskext/login.py +++ b/flaskext/login.py @@ -358,7 +358,7 @@ class LoginManager(object): def _update_remember_cookie(self, response): operation = session.pop("remember", None) - if operation == "set": + if operation == "set" and "user_id" in session: self._set_cookie(response) elif operation == "clear": self._clear_cookie(response)
Hopefully fixed a bug with cookies and failing to login.
maxcountryman_flask-login
train
py
2fe6fb2b00aed94af96591b4e460edb84dfa911b
diff --git a/src/main/java/edu/ksu/canvas/impl/BaseImpl.java b/src/main/java/edu/ksu/canvas/impl/BaseImpl.java index <HASH>..<HASH> 100644 --- a/src/main/java/edu/ksu/canvas/impl/BaseImpl.java +++ b/src/main/java/edu/ksu/canvas/impl/BaseImpl.java @@ -4,8 +4,10 @@ import com.google.gson.FieldNamingPolicy; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import edu.ksu.canvas.interfaces.*; -import edu.ksu.canvas.model.BaseCanvasModel; +import edu.ksu.canvas.interfaces.CanvasMessenger; +import edu.ksu.canvas.interfaces.CanvasReader; +import edu.ksu.canvas.interfaces.CanvasWriter; +import edu.ksu.canvas.interfaces.ResponseParser; import edu.ksu.canvas.net.Response; import edu.ksu.canvas.net.RestClient; import org.apache.log4j.Logger;
Removing import from BaseImpl
kstateome_canvas-api
train
java
bda0ba7f554a613c5a2034e583e773f2fbbd9493
diff --git a/plenum/test/waits.py b/plenum/test/waits.py index <HASH>..<HASH> 100644 --- a/plenum/test/waits.py +++ b/plenum/test/waits.py @@ -76,7 +76,7 @@ def expectedPoolInterconnectionTime(nodeCount): # TODO check actual state # multiply by 2 because we need to re-create connections which can be done on a second re-try only # (we may send pings on some of the re-tries) - return max(0.8 * config.TestRunningTimeLimitSec, + return min(0.8 * config.TestRunningTimeLimitSec, interconnectionCount * nodeConnectionTimeout + 2 * config.RETRY_TIMEOUT_RESTRICTED + 2)
[INDY-<I>] Return min into waits
hyperledger_indy-plenum
train
py
76038dfe38e576004816f9af94caca0705611fc4
diff --git a/gems/rake-support/lib/torquebox/launchd.rb b/gems/rake-support/lib/torquebox/launchd.rb index <HASH>..<HASH> 100644 --- a/gems/rake-support/lib/torquebox/launchd.rb +++ b/gems/rake-support/lib/torquebox/launchd.rb @@ -15,7 +15,7 @@ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA, or see the FSF site: http://www.fsf.org. -# Helpers for upstart rake tasks +# Helpers for launchd rake tasks require 'torquebox/deploy_utils' @@ -46,7 +46,7 @@ module TorqueBox launchctl_found = false; IO.popen( 'launchctl list | grep torquebox' ) do |output| output.each do |line| if line =~ /torquebox/ - puts "TorqueBox launchd script OK: #{line}." + puts "TorqueBox launchd script OK: #{line}" launchctl_found = true break end @@ -59,7 +59,7 @@ module TorqueBox def install unless File.writable?( plist_dir ) - raise "Cannot write upstart configuration to #{plist_dir}. You'll need to copy #{plist_file} to #{plist_dir} yourself." + raise "Cannot write launchd configuration to #{plist_dir}. You'll need to copy #{plist_file} to #{plist_dir} yourself." end File.delete( plist_file ) if File.exists? plist_file @@ -81,4 +81,5 @@ module TorqueBox end end -end \ No newline at end of file +end +
Make sure launchd tasks say launchd instead of upstart
torquebox_torquebox
train
rb
3d1d5766f0865b7f389c452350b0cd4c64fce53d
diff --git a/lib/zbeacon.js b/lib/zbeacon.js index <HASH>..<HASH> 100644 --- a/lib/zbeacon.js +++ b/lib/zbeacon.js @@ -89,14 +89,17 @@ class ZBeacon { startBroadcasting() { this._nodeSock = dgram.createSocket('udp4'); + this._broadcast = () => { + this._nodeSock.send(this._dgBuffer, BEACON_PORT, this._address, () => { + debug(`sent beacon to ${this._address}:${BEACON_PORT}`); + }); + }; + return new Promise((resolve) => { this._nodeSock.bind(() => { this._nodeSock.setBroadcast(true); - this._broadcastTimer = setInterval(() => { - this._nodeSock.send(this._dgBuffer, BEACON_PORT, this._address, () => { - debug(`sent beacon to ${this._address}:${BEACON_PORT}`); - }); - }, BEACON_INTERVAL); + this._broadcast(); + this._broadcastTimer = setInterval(this._broadcast, BEACON_INTERVAL); resolve(); }); }); @@ -167,6 +170,7 @@ class ZBeacon { */ stop() { clearInterval(this._broadcastTimer); + if (typeof this._peerSock !== 'undefined') { this._peerSock.removeAllListeners(); this._peerSock.close();
Speed up broadcasting the UDP beacon
interpretor_zyre.js
train
js
45567c0b13d71887845c95e5e6704812caa66b5d
diff --git a/packages/@uppy/form/src/index.js b/packages/@uppy/form/src/index.js index <HASH>..<HASH> 100644 --- a/packages/@uppy/form/src/index.js +++ b/packages/@uppy/form/src/index.js @@ -88,8 +88,19 @@ module.exports = class Form extends Plugin { let resultInput = this.form.querySelector(`[name="${this.opts.resultName}"]`) if (resultInput) { if (this.opts.multipleResults) { - // Append new result to the previous result array - const updatedResult = JSON.parse(resultInput.value) + // Append new result to the previous result array. + // If the previous result is empty, or not an array, + // set it to an empty array. + let updatedResult + try { + updatedResult = JSON.parse(resultInput.value) + } catch (err) { + // Nothing, since we check for array below anyway + } + + if (!Array.isArray(updatedResult)) { + updatedResult = [] + } updatedResult.push(result) resultInput.value = JSON.stringify(updatedResult) } else {
Try/catch JSON.parse, since the prev result can be empty or not json; set updatedResult to an empty array if it’s not an array (#<I>)
transloadit_uppy
train
js
924a43d090e9ef39f54e6ba7e3d9423554ddee5a
diff --git a/lib/manager/npm/post-update/index.js b/lib/manager/npm/post-update/index.js index <HASH>..<HASH> 100644 --- a/lib/manager/npm/post-update/index.js +++ b/lib/manager/npm/post-update/index.js @@ -544,11 +544,13 @@ async function getAdditionalFiles(config, packageFiles) { } else { lockFile = config.yarnLock || 'yarn.lock'; } + const skipInstalls = + lockFile === 'npm-shrinkwrap.json' ? false : config.skipInstalls; const res = await lerna.generateLockFiles( lernaPackageFile.lernaClient, upath.join(config.localDir, lernaDir), env, - config.skipInstalls, + skipInstalls, config.binarySource ); // istanbul ignore else
fix(npm): full install for npm shrinkwrap
renovatebot_renovate
train
js
c3a21a93eb48b773f3b5f470a79f42ebcad13157
diff --git a/tests/test_menu_launcher.py b/tests/test_menu_launcher.py index <HASH>..<HASH> 100644 --- a/tests/test_menu_launcher.py +++ b/tests/test_menu_launcher.py @@ -345,10 +345,10 @@ def test_running_menu(): child0.sendline('1') child0.expect('Return to Vent menu') # go to main menu - child0.sendline(UP_KEY) + child0.sendline(KEY_UP) child0.expect('Exit') # exit - child0.sendline(UP_KEY) + child0.sendline(KEY_UP) child0.read() child0.close()
Corrected Test 6 for sending up key.
CyberReboot_vent
train
py
ac217b314b328d88acbb2724e7eb80eb1e916b26
diff --git a/lxd/device/proxy.go b/lxd/device/proxy.go index <HASH>..<HASH> 100644 --- a/lxd/device/proxy.go +++ b/lxd/device/proxy.go @@ -39,10 +39,6 @@ type proxyProcInfo struct { proxyProtocol string } -func (d *proxy) CanHotPlug() (bool, []string) { - return true, []string{} -} - // validateConfig checks the supplied config for correctness. func (d *proxy) validateConfig() error { if d.instance.Type() != instance.TypeContainer {
device/proxy: Removes unnecessary CanHotPlug function The common device implementation provides the same behaviour.
lxc_lxd
train
go
54357b09252c079a8a3df8cdfb7881d61c981edd
diff --git a/test/tools/javac/defaultMethods/Assertions.java b/test/tools/javac/defaultMethods/Assertions.java index <HASH>..<HASH> 100644 --- a/test/tools/javac/defaultMethods/Assertions.java +++ b/test/tools/javac/defaultMethods/Assertions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import java.util.Set; /* * @test * @bug 8025141 + * @ignore 8047675 test fails if run with assertions enabled in jtreg * @summary Interfaces must not contain non-public fields, ensure $assertionsDisabled * is not generated into an interface * @compile Assertions.java
<I>: @ignore tools/javac/defaultMethods/Assertions.java until JDK-<I> is fixed Reviewed-by: ksrini
google_error-prone-javac
train
java
fff73f7cdc2b5aea00e8f2dd8dbfc714e455ab8f
diff --git a/src/Factory.php b/src/Factory.php index <HASH>..<HASH> 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -21,7 +21,13 @@ class Factory public static function getParsers() { $parserClassList = ClassMapGenerator::createMap(base_path().'/vendor/abuseio'); - $parserList = array_map('class_basename', array_keys($parserClassList)); + $parserClassListFiltered = array_where(array_keys($parserClassList), function ($key, $value) { + // Get all parsers, ignore all other packages. + if (strpos($value, 'AbuseIO\Parsers\\') !== false) { + return $value; + } + }); + $parserList = array_map('class_basename', $parserClassListFiltered); foreach ($parserList as $parser) { if (!in_array($parser, ['Factory', 'Parser'])) { $parsers[] = $parser;
Added filter to ONLY fetch parsers
AbuseIO_parser-common
train
php
b174c4de9b9f3ec0849d3670a7b9f7c8eea93ba3
diff --git a/openid/urinorm.py b/openid/urinorm.py index <HASH>..<HASH> 100644 --- a/openid/urinorm.py +++ b/openid/urinorm.py @@ -130,7 +130,7 @@ def urinorm(uri): if '%' in host: host = host.lower() host = pct_encoded_re.sub(_pct_encoded_replace, host) - host = str(host, 'utf-8').encode('idna').decode() + host = host.encode('idna').decode() else: host = host.lower()
Fix urinorm for consistency
necaris_python3-openid
train
py
34c825a7720f45520e593e77ee661d6e75a75ce1
diff --git a/http.go b/http.go index <HASH>..<HASH> 100644 --- a/http.go +++ b/http.go @@ -526,6 +526,7 @@ func (resp *Response) Write(w *bufio.Writer) error { } } if contentLength >= 0 { + resp.Header.SetContentLength(contentLength) if err = resp.Header.Write(w); err != nil { return err }
Set response content-length before writing response header
valyala_fasthttp
train
go
046de4eed0c5dda5d8814526b61f14c88b31ce31
diff --git a/slave/buildslave/commands/removed.py b/slave/buildslave/commands/removed.py index <HASH>..<HASH> 100644 --- a/slave/buildslave/commands/removed.py +++ b/slave/buildslave/commands/removed.py @@ -28,7 +28,7 @@ class RemovedSourceCommand(base.SourceBaseCommand): class Svn(RemovedSourceCommand): - name = "git" + name = "Svn" class Bk(RemovedSourceCommand):
fix deprecated source step name: 'git' => 'Svn'
buildbot_buildbot
train
py
3b7bd60d524ab8372a8927bb765fd1d5a0a23fd9
diff --git a/testsuite/tests/parser/issue97.php b/testsuite/tests/parser/issue97.php index <HASH>..<HASH> 100644 --- a/testsuite/tests/parser/issue97.php +++ b/testsuite/tests/parser/issue97.php @@ -2,6 +2,7 @@ require_once(dirname(__FILE__) . '/../../../php-sql-parser.php'); require_once(dirname(__FILE__) . '/../../test-more.php'); +# TODO: MDR1.Tweb512 should be handled as MDR1 and Tweb512 $sql = "select webid, floor(iz/2.) as fl from MDR1.Tweb512 as w where w.webid < 100"; $parser = new PHPSQLParser($sql); $p = $parser->parsed;
ADD: a TODO has been added git-svn-id: <URL>
greenlion_PHP-SQL-Parser
train
php
a8d22ea4a77a51fef16886886b0842564817810b
diff --git a/jquery.squirrel.js b/jquery.squirrel.js index <HASH>..<HASH> 100644 --- a/jquery.squirrel.js +++ b/jquery.squirrel.js @@ -133,13 +133,13 @@ // checkboxes. $form.find('input[type=checkbox][name]').each(function() { var $elem = $(this), - chkval = $elem.attr('value'); + checkedVal = $elem.attr('value'); - if (typeof(chkval) !== 'string') { - chkval = ''; + if (typeof(checkedVal) !== 'string') { + checkedVal = ''; } - var value = stash(storage_key, $elem.attr('name') + chkval); + var value = stash(storage_key, $elem.attr('name') + checkedVal); if (value !== null && value !== this.checked) { this.checked = (value === true);
Renamed variable to camel-case
jpederson_Squirrel.js
train
js
b3f7467d7468be18e5ed034c40798d7aff91562a
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -48,12 +48,12 @@ setup( 'django-crispy-forms>=1.1.1', 'django-tag-parser>=2.1', 'django-contrib-comments>=1.5', + 'python-akismet>=0.2.3', # Python 3 port, replaces Python 2-only "akismet" library. ], requires=[ 'Django (>=1.5)', ], extras_require = { - ':python_version in "2.6,2.7"': ['akismet>=0.2',], 'threadedcomments': ['django-threadedcomments>=1.0.1'], }, description='A modern, ajax-based appearance for django_comments',
Replace "akismet" dependency with "python-akismet" which has Python 3 support
django-fluent_django-fluent-comments
train
py
9313a478e9d4b75fb72721f63cf50f4c74af0544
diff --git a/lang/en/admin.php b/lang/en/admin.php index <HASH>..<HASH> 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -437,7 +437,6 @@ $string['docroot'] = 'Moodle Docs document root'; $string['doctonewwindow'] = 'Open in new window'; $string['download'] = 'Download'; $string['edithelpdocs'] = 'Edit help documents'; -$string['editingnoncorelangfile'] = 'You are trying to modify translation of an add-on module/plugin. You can save translation of 3rd party modules in your _local folder only. You may want to move the file with translation into the module\'s lang directory and/or send it to the maintainer of the add-on module.'; $string['editlang'] = '<b>Edit</b>'; $string['editorbackgroundcolor'] = 'Background colour'; $string['editordictionary'] = 'Editor dictionary';
MDL-<I> Remove string editingnoncorelangfile from core_admin This string mentions 'add-on' and has been greylisted in AMOS since <I>. The usage of it was removed in <I>b<I>d.
moodle_moodle
train
php
a89e4011331038a0e62c63355a769ea02348ee8a
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -32,9 +32,6 @@ function getXRotation(x, y, z) { function getYRotation(x, y, z) { return getRotation(x, y, z); } -function getZRotation(x, y, z) { - return getRotation(y, z, x); -} function scaleData(data, factor) { var scaled = {}; @@ -232,8 +229,7 @@ Sensor.prototype.readRotation = function (done) { done(null, { x: getXRotation(accel.x, accel.y, accel.z), - y: getYRotation(accel.x, accel.y, accel.z), - z: getZRotation(accel.x, accel.y, accel.z) + y: getYRotation(accel.x, accel.y, accel.z) }); }); }; @@ -245,8 +241,7 @@ Sensor.prototype.readRotationSync = function (accel) { return { x: getXRotation(accel.x, accel.y, accel.z), - y: getYRotation(accel.x, accel.y, accel.z), - z: getZRotation(accel.x, accel.y, accel.z) + y: getYRotation(accel.x, accel.y, accel.z) }; };
Remove Z axis rotation reading closes issue #4
emersion_node-i2c-mpu6050
train
js
abca1bbc76baaf53b4179445481c6404034eab7d
diff --git a/lib/rschema.rb b/lib/rschema.rb index <HASH>..<HASH> 100644 --- a/lib/rschema.rb +++ b/lib/rschema.rb @@ -144,7 +144,7 @@ module RSchema end # strip out keys that don't exist in the schema - if schema.has_key?(k) + if schema.has_key?(k) || schema.has_key?(OptionalHashKey.new(k)) accum[k] = v end diff --git a/spec/rschema_spec.rb b/spec/rschema_spec.rb index <HASH>..<HASH> 100644 --- a/spec/rschema_spec.rb +++ b/spec/rschema_spec.rb @@ -185,6 +185,17 @@ RSpec.describe RSchema do expect(RSchema.coerce(schema, value)).to eq(expected_result) end + it 'doesnt strip optional Hash keys during coercion' do + schema = RSchema.schema{{ + required: Integer, + _?(:optional) => Integer, + }} + value = {required: 1, optional: 2, extra: 3} + expected_result = [{required: 1, optional: 2}, nil] + + expect(RSchema.coerce(schema, value)).to eq(expected_result) + end + it 'coerces through "enum"' do schema = RSchema.schema{ enum [:a, :b, :c], Symbol } expect(RSchema.coerce(schema, 'a')).to eq([:a, nil])
Bug: `coerce` was stripping optional Hash keys
tomdalling_rschema
train
rb,rb
bbe7c42e159d6690e5efcd6ebd81ace407744834
diff --git a/tests/ProxyManagerTest/ProxyGenerator/ValueHolder/MethodGenerator/GetWrappedValueHolderValueTest.php b/tests/ProxyManagerTest/ProxyGenerator/ValueHolder/MethodGenerator/GetWrappedValueHolderValueTest.php index <HASH>..<HASH> 100644 --- a/tests/ProxyManagerTest/ProxyGenerator/ValueHolder/MethodGenerator/GetWrappedValueHolderValueTest.php +++ b/tests/ProxyManagerTest/ProxyGenerator/ValueHolder/MethodGenerator/GetWrappedValueHolderValueTest.php @@ -33,5 +33,6 @@ class GetWrappedValueHolderValueTest extends TestCase self::assertSame('getWrappedValueHolderValue', $getter->getName()); self::assertCount(0, $getter->getParameters()); self::assertSame('return $this->foo;', $getter->getBody()); + self::assertSame('?object', $getter->getReturnType()->generate()); } }
Verifying that `getWrappedValueHolderValue` has a `?object` return hint
Ocramius_ProxyManager
train
php
68681fdf0ed2e56cdae558128d7573ab1a388425
diff --git a/lib/ews/soap/builders/ews_builder.rb b/lib/ews/soap/builders/ews_builder.rb index <HASH>..<HASH> 100644 --- a/lib/ews/soap/builders/ews_builder.rb +++ b/lib/ews/soap/builders/ews_builder.rb @@ -310,7 +310,7 @@ module Viewpoint::EWS::SOAP def additional_properties!(addprops) @nbuild[NS_EWS_TYPES].AdditionalProperties { addprops.each_pair {|k,v| - dispatch_field_uri!({k => v}) + dispatch_field_uri!({k => v}, NS_EWS_TYPES) } } end @@ -982,7 +982,7 @@ module Viewpoint::EWS::SOAP case type when :field_uRI, :field_uri vals.each do |val| - nbuild[ns].FieldURI('FieldURI' => val[:field_uRI]) + nbuild[ns].FieldURI('FieldURI' => val) end when :indexed_field_uRI, :indexed_field_uri vals.each do |val|
Fix for adding additional_properties via a field_uri.
WinRb_Viewpoint
train
rb
ff8e0b12f2d5103a5e9d1505ea1d314df6c72ea7
diff --git a/backdrop/__init__.py b/backdrop/__init__.py index <HASH>..<HASH> 100644 --- a/backdrop/__init__.py +++ b/backdrop/__init__.py @@ -9,7 +9,7 @@ class Backdrop(dict): directories.append(os.path.expanduser('~')) # then look into current directory - directories.append(os.path.dirname(os.path.realpath(__file__))) + directories.append(os.getcwd()) directories.reverse()
We mean current WORKING directory, not current directory
alexei_backdrop
train
py
d869ff1126f951541d50c0e2bc76523818e8d026
diff --git a/lib/DAV/Server.php b/lib/DAV/Server.php index <HASH>..<HASH> 100644 --- a/lib/DAV/Server.php +++ b/lib/DAV/Server.php @@ -909,7 +909,7 @@ class Server extends EventEmitter { $path = trim($path,'/'); $propFindType = $propertyNames?PropFind::NORMAL:PropFind::ALLPROPS; - $propFind = new PropFind($path, $propertyNames, $depth, $propFindType); + $propFind = new PropFind($path, (array)$propertyNames, $depth, $propFindType); $parentNode = $this->tree->getNodeForPath($path);
Cast $propertyNames to an array.
sabre-io_dav
train
php
848e09c6fd93f8b2bf4d2895a9d25a97ceb033f4
diff --git a/src/python/dxpy/scripts/dx.py b/src/python/dxpy/scripts/dx.py index <HASH>..<HASH> 100644 --- a/src/python/dxpy/scripts/dx.py +++ b/src/python/dxpy/scripts/dx.py @@ -3935,7 +3935,8 @@ def archive(args): else: print('Will tag file(s) for archival in folder {}:{} {}recursively'.format(target_project, target_folder, 'non-' if not args.recurse else '')) elif request_mode == "unarchival": - dryrun_request_input = dict(**request_input, dryRun=True) + dryrun_request_input = copy.deepcopy(request_input) + dryrun_request_input.update(dryRun=True) dryrun_res = send_archive_request(target_project, dryrun_request_input, request_func) print('Will tag {} file(s) for unarchival in {}, totalling {} GB, costing ${}'.format(dryrun_res["files"], target_project, dryrun_res["size"],dryrun_res["cost"]/1000))
Python 2 archival compatibility fix (#<I>)
dnanexus_dx-toolkit
train
py
2136e18c8dc33346f2f0c81d17525c593e005efe
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ import codecs import os.path -from setuptools import setup +from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) @@ -28,5 +28,5 @@ setup( "Topic :: Communications :: Chat", ], keywords="asyncio xmpp library", - packages=["aioxmpp"], + packages=find_packages() )
Install all the sub-packages of aioxmpp with packages=['aioxmpp'] things like aioxmpp.xso, aioxmpp.forms, aioxmpp.roster etc. are ignored
horazont_aioxmpp
train
py
d13d073c86a3657fb32e29b53be33ee72bc2468b
diff --git a/src/Test/WebTestCase.php b/src/Test/WebTestCase.php index <HASH>..<HASH> 100755 --- a/src/Test/WebTestCase.php +++ b/src/Test/WebTestCase.php @@ -18,7 +18,7 @@ abstract class WebTestCase extends BaseWebTestCase use RethrowControllerExceptionTrait; use ResetStateAfterTestTrait; - protected KernelBrowser $client; + protected ?KernelBrowser $client = null; protected Response $response; protected Crawler $crawler;
WebTestCase::$client may be null before it is initialized
DemonTPx_util-bundle
train
php
1ebce696d1848e90cbbd90c93baebb18c0aaaed1
diff --git a/phypno/trans/select.py b/phypno/trans/select.py index <HASH>..<HASH> 100644 --- a/phypno/trans/select.py +++ b/phypno/trans/select.py @@ -129,7 +129,8 @@ class Select: class Resample: def __init__(self, s_freq=None, axis='time'): - self.s_freq = s_freq + # force convertion to int + self.s_freq = int(s_freq) self.axis = axis def __call__(self, data): @@ -140,7 +141,8 @@ class Resample: for i in range(data.number_of('trial')): - n_samples = data.axis[axis][i].shape[0] / ratio + # force convertion to int + n_samples = int(data.axis[axis][i].shape[0] / ratio) data.axis[axis][i] = linspace(data.axis[axis][i][0], data.axis[axis][i][-1] + 1 / data.s_freq,
force conversion to int for s_freq when downsampling
wonambi-python_wonambi
train
py
000fa7d21b4b4d6553bf55bda021bc0cccb9b511
diff --git a/raiden/network/blockchain_service.py b/raiden/network/blockchain_service.py index <HASH>..<HASH> 100644 --- a/raiden/network/blockchain_service.py +++ b/raiden/network/blockchain_service.py @@ -15,7 +15,6 @@ from raiden.network.proxies import ( ) from raiden.settings import DEFAULT_POLL_TIMEOUT from raiden.utils import ( - block_tag_encoder, isaddress, privatekey_to_address, quantity_decoder, @@ -50,7 +49,7 @@ class BlockChainService: return self.client.block_number() def is_synced(self) -> bool: - result = self.client.rpccall_with_retry('eth_syncing') + result = self.client.web3.eth.syncing # the node is synchronized if result is False: @@ -87,8 +86,7 @@ class BlockChainService: return delta / interval def get_block_header(self, block_number: int): - block_number = block_tag_encoder(block_number) - return self.client.rpccall_with_retry('eth_getBlockByNumber', block_number, False) + return self.client.web3.getBlock(block_number, False) def next_block(self) -> int: target_block_number = self.block_number() + 1
Fix calls to eth_syncing, eth_getBlockByNumber
raiden-network_raiden
train
py
7b2a2fdcbe58be961af365f301c50cb79426dad1
diff --git a/backtrader/metabase.py b/backtrader/metabase.py index <HASH>..<HASH> 100644 --- a/backtrader/metabase.py +++ b/backtrader/metabase.py @@ -118,10 +118,21 @@ class AutoInfoClass(object): info2add = obasesinfo.copy() info2add.update(info) - # str for Python 2/3 compatibility - newcls = type(str(cls.__name__ + '_' + name), (cls,), {}) clsmodule = sys.modules[cls.__module__] - setattr(clsmodule, str(cls.__name__ + '_' + name), newcls) + newclsname = str(cls.__name__ + '_' + name) # str - Python 2/3 compat + + # This loop makes sure that if the name has already been defined, a new + # unique name is found. A collision example is in the plotlines names + # definitions of bt.indicators.MACD and bt.talib.MACD. Both end up + # definining a MACD_pl_macd and this makes it impossible for the pickle + # module to send results over a multiprocessing channel + namecounter = 1 + while hasattr(clsmodule, newclsname): + newclsname += str(namecounter) + namecounter += 1 + + newcls = type(newclsname, (cls,), {}) + setattr(clsmodule, newclsname, newcls) setattr(newcls, '_getpairsbase', classmethod(lambda cls: baseinfo.copy()))
Avoid name collision for self-generated classes
backtrader_backtrader
train
py
c5e839f4a8ef1acc3eeadf00c2cd49d984336f56
diff --git a/golhttpclient/httpClient.go b/golhttpclient/httpClient.go index <HASH>..<HASH> 100644 --- a/golhttpclient/httpClient.go +++ b/golhttpclient/httpClient.go @@ -11,6 +11,22 @@ import ( "time" ) +func UrlRedirectTo(url string) string { + client := &http.Client{ + CheckRedirect: func(req *http.Request, via []*http.Request) error { + return nil + }, + } + + resp, err := client.Get(url) + + if err != nil { + log.Println(err) + } + + return resp.Request.URL +} + func LinkExists(url string) bool { var netClient = &http.Client{ Timeout: time.Second * 10,
[golhhtpclient] UrlRedirectTo to get what redirected url is
abhishekkr_gol
train
go
5f2c4f529f532c9d9c47401365c691fcfdd34198
diff --git a/lands/version.py b/lands/version.py index <HASH>..<HASH> 100644 --- a/lands/version.py +++ b/lands/version.py @@ -1 +1 @@ -__version__ = '0.5.3' \ No newline at end of file +__version__ = '0.5.4' \ No newline at end of file
preparing for next release cycle Former-commit-id: 5aca4ac<I>a3af<I>e6c<I>fa<I>d<I>beed9f9ebf
Mindwerks_worldengine
train
py
86631fdc8303c3e250739625e724f131d2d5217a
diff --git a/lib/emit.js b/lib/emit.js index <HASH>..<HASH> 100644 --- a/lib/emit.js +++ b/lib/emit.js @@ -285,7 +285,7 @@ Ep.explode = function(node, ignoreResult) { default: throw new Error( "unknown Node of type " + - JSON.stringify(expr.type)); + JSON.stringify(node.type)); } } @@ -389,7 +389,7 @@ Ep.explodeStatement = function(stmt, labelId) { if (stmt.update) { // We pass true here to indicate that if stmt.update is an // expression then we do not care about its result. - self.explode(self.explode(stmt.update), true); + self.explode(stmt.update, true); } self.jump(head);
Fix some harmless but clowny typos.
facebook_regenerator
train
js
3a72ce5f24272ba0a20dd8fbe1a5eb992e8bc79c
diff --git a/src/component/legend/LegendView.js b/src/component/legend/LegendView.js index <HASH>..<HASH> 100644 --- a/src/component/legend/LegendView.js +++ b/src/component/legend/LegendView.js @@ -28,7 +28,6 @@ import * as layoutUtil from '../../util/layout'; var curry = zrUtil.curry; var each = zrUtil.each; var Group = graphic.Group; -var isArray = zrUtil.isArray; export default echarts.extendComponentView({
fix(legendView): remove function isArray(), which is not used
apache_incubator-echarts
train
js
36cf980eb47f159c07f1f2cd79cca9e32c19dbef
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -61,7 +61,7 @@ copyright = u'2013-2017, Pablo Acosta-Serafini' # The short X.Y version. version = '1.0.5' # The full version, including alpha/beta/rc tags. -release = '1.0.5rc1' +release = '1.0.5' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ptrie/version.py b/ptrie/version.py index <HASH>..<HASH> 100644 --- a/ptrie/version.py +++ b/ptrie/version.py @@ -7,7 +7,7 @@ ### # Global variables ### -VERSION_INFO = (1, 0, 5, 'candidate', 1) +VERSION_INFO = (1, 0, 5, 'final', 0) ###
Bumped version to <I>
pmacosta_ptrie
train
py,py
f9ec60ab9f5369c56731402c76e75cdb10de218a
diff --git a/src/biojs-io-biom.js b/src/biojs-io-biom.js index <HASH>..<HASH> 100644 --- a/src/biojs-io-biom.js +++ b/src/biojs-io-biom.js @@ -78,7 +78,7 @@ export class Biom { shape: _shape = DEFAULT_BIOM.shape, data: _data = DEFAULT_BIOM.data } = {}){ - this._id = _id; + this.id = _id; this._format = _format; this._format_url = _format_url; this._type = _type;
Use id setter in constructor
molbiodiv_biojs-io-biom
train
js
b9a8225563ec5e313042ba76c27c26dc9cb87cf5
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="singularity", # Version number: - version="0.13", + version="0.15", # Application author details: author="Vanessa Sochat", diff --git a/singularity/package.py b/singularity/package.py index <HASH>..<HASH> 100644 --- a/singularity/package.py +++ b/singularity/package.py @@ -185,11 +185,11 @@ def load_package(package_path,get=None): if ext in [".img"]: print("Found image %s, skipping as not feasible to load into memory." %(g)) elif ext in [".txt"] or g == "runscript": - retrieved[g] = zf.open(g).read().split('\n') + retrieved[g] = zf.read(g).decode('utf-8').split('\n') elif g == "VERSION": - retrieved[g] = zf.open(g).read() + retrieved[g] = zf.read(g).decode('utf-8') elif ext in [".json"]: - retrieved[g] = json.loads(zf.open(g).read()) + retrieved[g] = json.loads(zf.read(g).decode('utf-8')) else: print("Unknown extension %s, skipping %s" %(ext,g))
fix for python versions is to use decode
singularityhub_singularity-python
train
py,py
16ab1a79791c03fab1b223e97031722c11c7b550
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -105,7 +105,7 @@ for ext in ext_modules: setup( name='cyflann', - version='0.1.8', + version='0.1.9-dev', author='Dougal J. Sutherland', author_email='dougal@gmail.com', packages=['cyflann'],
<I>-dev guess I skipped <I> (whoops)
dougalsutherland_cyflann
train
py
5fd39771f30ca804b973746e53a0db9284c343b2
diff --git a/xmlnuke-php5/bin/util/util.mailutil.class.php b/xmlnuke-php5/bin/util/util.mailutil.class.php index <HASH>..<HASH> 100644 --- a/xmlnuke-php5/bin/util/util.mailutil.class.php +++ b/xmlnuke-php5/bin/util/util.mailutil.class.php @@ -220,7 +220,7 @@ class MailUtil public static function getEmailPair($fullEmail) { - $pat = "/[\"']?(.*)[\"']?\s+<(.*)>/"; + $pat = "/[\"']?([\pL\w\d\s\.&\(\)#$%]*)[\"']?\s*<(.*)>/"; $parts = preg_split ( $pat, $fullEmail, - 1, PREG_SPLIT_DELIM_CAPTURE ); if ($parts[2] == "")
Updated regular expression in MailUtil class
byjg_xmlnuke
train
php
a33aa1d202e4a530d092016345cb2ec9910b206d
diff --git a/src/Input.php b/src/Input.php index <HASH>..<HASH> 100644 --- a/src/Input.php +++ b/src/Input.php @@ -60,8 +60,9 @@ class Input /** * Decodes and returns the value of a given item in an HTTP query. + * * Although PHP decodes query strings automatically, it converts periods to underscores. This method makes it - * possible to decode query strings that contain underscores. + * possible to decode query strings that contain periods. * Based on code from http://stackoverflow.com/a/14432765 * * @param string $method The HTTP method of the query (GET, POST ...) @@ -119,7 +120,7 @@ class Input */ public static function get(string $key = null) { - return self::decode(self::GET, $key); + return $key ? filter_input(INPUT_GET, $key) : (filter_input_array(INPUT_GET) ?? []); //self::decode(self::GET, $key); } /** @@ -130,7 +131,7 @@ class Input */ public static function post(string $key = null) { - return self::decode(self::POST, $key); + return $key ? filter_input(INPUT_POST, $key) : (filter_input_array(INPUT_POST) ?? []); //return self::decode(self::POST, $key); } /**
Reverting input processing to php for performance reasons
ntentan_utils
train
php
29a0cddd1a87492249fd39ca24500f765308fb6e
diff --git a/js/cw/eq.js b/js/cw/eq.js index <HASH>..<HASH> 100644 --- a/js/cw/eq.js +++ b/js/cw/eq.js @@ -21,7 +21,7 @@ cw.eq.IT_IS_PLAIN_ = goog.functions.TRUE; /** - * Mark {@code object} as a plain object andreturn the mutated object. + * Mark {@code object} as a plain object and return the mutated object. * * @param {!Object} object * @return {!Object} The mutated object
js/cw/eq.js: fix typo
ludiosarchive_Coreweb
train
js
756d5fb9130be704c39b51a5219d2e07c82ec577
diff --git a/lib/carto/renderer.js b/lib/carto/renderer.js index <HASH>..<HASH> 100644 --- a/lib/carto/renderer.js +++ b/lib/carto/renderer.js @@ -93,8 +93,8 @@ carto.Renderer = function Renderer(env) { } var external = new External(that.env, l.Datasource.file, l.name); - external.once('err', next) - external.once('complete', function(external) { + external.on('err', next) + external.on('complete', function(external) { external.findDataFile(function(err, file) { if (err) { next(new Error('Datasource could not be downloaded.')); @@ -129,11 +129,11 @@ carto.Renderer = function Renderer(env) { // that fail. var next = group(); var external = new External(that.env, s, path.basename(s)); - external.once('complete', function(external) { + external.on('complete', function(external) { m.Stylesheet[k] = external.path(); next(); }); - external.once('err', function(err) { + external.on('err', function(err) { next(new Error('Stylesheet "' + s + '" could not be loaded.')); }); });
Use on() instead of once() for node <I>.x compatibility.
mapbox_carto
train
js
9382fe0a8ad67cc0ab3fe015dc1df591cc26058b
diff --git a/lib/Gen/Builder.php b/lib/Gen/Builder.php index <HASH>..<HASH> 100644 --- a/lib/Gen/Builder.php +++ b/lib/Gen/Builder.php @@ -46,7 +46,7 @@ class Builder { $plugin = $indexer_meta['plugin']; $indexer = new $plugin($this->util, $this->config, $entry['path'], $indexer_meta); if ($indexer instanceof \Gen\Indexer\IndexerAbstract) { - $indexer->build(); + $indexer->build(['indexer.php']); } } continue; diff --git a/lib/Gen/Indexer/Simple.php b/lib/Gen/Indexer/Simple.php index <HASH>..<HASH> 100644 --- a/lib/Gen/Indexer/Simple.php +++ b/lib/Gen/Indexer/Simple.php @@ -4,11 +4,10 @@ namespace Gen\Indexer; class Simple extends IndexerAbstract { - public function build() { + public function build(array $skip = []) { if ($this->validMeta) { - $indexer = (new \Gen\Indexer($this->meta['data'], new \Gen\Util) - )->build($this->path); + $indexer = (new \Gen\Indexer($this->meta['data'], new \Gen\Util))->build($this->path, $skip); $twig = $this->getTwig( $this->config,
Make sure to skip over the indexer file when using an indexer plugin.
trq_Gen
train
php,php
1b7dfe6a322facb92beb98e0b17b7d06a971ca46
diff --git a/restcomm/restcomm.rvd/src/main/webapp/js/app/services.js b/restcomm/restcomm.rvd/src/main/webapp/js/app/services.js index <HASH>..<HASH> 100644 --- a/restcomm/restcomm.rvd/src/main/webapp/js/app/services.js +++ b/restcomm/restcomm.rvd/src/main/webapp/js/app/services.js @@ -447,7 +447,9 @@ angular.module('Rvd').service('variableRegistry', [function () { // after fax registerVariable("core_FaxSid"); registerVariable("core_FaxStatus"); - + // SMS project + registerVariable("core_Body"); + return service; }]);
RESTCOMM-<I> #comment Added option in variable dropdown. Internal RVD support for the variable had already been in place github<I>
RestComm_Restcomm-Connect
train
js
c0be44d238c45853503fe1550fba0460a9a0f05c
diff --git a/control/Controller.php b/control/Controller.php index <HASH>..<HASH> 100644 --- a/control/Controller.php +++ b/control/Controller.php @@ -133,6 +133,7 @@ class Controller extends RequestHandler implements TemplateGlobalProvider { $this->pushCurrent(); $this->urlParams = $request->allParams(); $this->setRequest($request); + $this->getResponse(); $this->setDataModel($model); $this->extend('onBeforeInit');
BUGFIX: fix response regression in initiation of request handler
silverstripe_silverstripe-framework
train
php
1410bcc76725b50be794b385006dedd96bebf0fb
diff --git a/git/test/test_docs.py b/git/test/test_docs.py index <HASH>..<HASH> 100644 --- a/git/test/test_docs.py +++ b/git/test/test_docs.py @@ -431,7 +431,7 @@ class Tutorials(TestBase): # [31-test_references_and_objects] git = repo.git - git.checkout('head', b="my_new_branch") # create a new branch + git.checkout('HEAD', b="my_new_branch") # create a new branch git.branch('another-new-one') git.branch('-D', 'another-new-one') # pass strings for full control over argument order git.for_each_ref() # '-' becomes '_' when calling it
This should finally fix travis ci
gitpython-developers_GitPython
train
py
333193797b6571f5b27d4c17cd5c77b67c0b1b96
diff --git a/src/commands/build/IOSBuilder.js b/src/commands/build/IOSBuilder.js index <HASH>..<HASH> 100644 --- a/src/commands/build/IOSBuilder.js +++ b/src/commands/build/IOSBuilder.js @@ -59,6 +59,10 @@ export default class IOSBuilder extends BaseBuilder { bundleIdentifierIOS: bundleIdentifier, } } = await Exp.getPublishInfoAsync(this.projectDir); + if (!bundleIdentifier) { + throw new XDLError(ErrorCode.INVALID_OPTIONS, `Your project must have a bundleIdentifier set in exp.json. See https://docs.getexponent.com/versions/latest/guides/building-standalone-apps.html`); + } + const credentialMetadata = { username, experienceName, @@ -100,6 +104,16 @@ export default class IOSBuilder extends BaseBuilder { } } + // ensure that the app id exists or is created + try { + await Credentials.ensureAppId(credentialMetadata); + } catch (e) { + throw new XDLError( + ErrorCode.CREDENTIAL_ERROR, + `It seems like we can't create an app on the Apple developer center with this app id: ${bundleIdentifier}. Please change your bundle identifier to something else.` + ); + } + if (!hasPushCert) { await this.askForPushCerts(credentialMetadata); } else {
Ensure App ID exists on developer portal before fetching certificates fbshipit-source-id: b<I>f9b
expo_exp
train
js
c79794eb467db8e4c6ff7dbad0b9916f2b504933
diff --git a/tests/integration/test_download.py b/tests/integration/test_download.py index <HASH>..<HASH> 100644 --- a/tests/integration/test_download.py +++ b/tests/integration/test_download.py @@ -90,7 +90,7 @@ class TestDownload(BaseTransferManagerIntegTest): # The maximum time allowed for the transfer manager to exit. # This means that it should take less than a couple second after # sleeping to exit. - max_allowed_exit_time = sleep_time + 1 + max_allowed_exit_time = sleep_time + 4 self.assertLess( end_time - start_time, max_allowed_exit_time, "Failed to exit under %s. Instead exited in %s." % (
Increase allowable exit time We were seeing on and off again failures of the test that hovered around the current threshold. Increasing it to something slightly higher but still relatively low to reduce these type of failures.
boto_s3transfer
train
py
c335295f6b9d0b0710b86d94f79494cc676deb70
diff --git a/html5lib/treewalkers/_base.py b/html5lib/treewalkers/_base.py index <HASH>..<HASH> 100644 --- a/html5lib/treewalkers/_base.py +++ b/html5lib/treewalkers/_base.py @@ -62,12 +62,11 @@ class TreeWalker(object): def comment(self, data): return {"type": "Comment", "data": data} - def doctype(self, name, publicId=None, systemId=None, correct=True): + def doctype(self, name, publicId=None, systemId=None): return {"type": "Doctype", "name": name, "publicId": publicId, - "systemId": systemId, - "correct": correct} + "systemId": systemId} def entity(self, name): return {"type": "Entity", "name": name}
Drop tree walker doctype correct flag, whatever that once was!
html5lib_html5lib-python
train
py
0b51f6b587d529174c861aca5305c89a92c3cce0
diff --git a/parse/parse.js b/parse/parse.js index <HASH>..<HASH> 100644 --- a/parse/parse.js +++ b/parse/parse.js @@ -246,7 +246,7 @@ function tagForToStr(comp, indexLoopName) { var txtFor = '\n\t' + contextToAlias(array_each[1]) + '.forEach(function(' + sub_array_each[0] + ',' + index_array + '){'; comp.children.forEach(sub_comp => txtFor += '\t' + componentToStr(sub_comp, index_array, indexLoopName)); - txtFor += '\t});\n'; + txtFor += `\t}.bind(${context_alias}));\n`; return txtFor; } function formatTextToStr(text) { @@ -983,4 +983,3 @@ module.exports = function (rawHtml, config) { return finalBuffer; } -
feat: For and each scope setted to this
ferrugemjs_ferrugemjs-node
train
js
4768aa55f449d5a2a953cd1221c1802c4dc08489
diff --git a/lib/discordrb/gateway.rb b/lib/discordrb/gateway.rb index <HASH>..<HASH> 100644 --- a/lib/discordrb/gateway.rb +++ b/lib/discordrb/gateway.rb @@ -149,6 +149,9 @@ module Discordrb private def setup_heartbeats(interval) + # We don't want to have redundant heartbeat threads, so if one already exists, don't start a new one + return if @heartbeat_thread + @heartbeat_interval = interval @heartbeat_thread = Thread.new do Thread.current[:discordrb_name] = 'heartbeat'
Make sure we don't setup multiple heartbeat threads This might have occurred in reconnect-heavy scenarios, where multiple op<I>s are received in succession and a new thread gets started every time.
meew0_discordrb
train
rb
c63ffd1bef4f1ecc74fad763ceff2d197e24bd93
diff --git a/examples/website/trips/app.js b/examples/website/trips/app.js index <HASH>..<HASH> 100644 --- a/examples/website/trips/app.js +++ b/examples/website/trips/app.js @@ -42,6 +42,10 @@ export default class App extends Component { }; } + componentDidMount() { + this._animate(); + } + componentWillUnmount() { if (this._animationFrame) { window.cancelAnimationFrame(this._animationFrame);
Fix: Trigger trips-layer animation (#<I>)
uber_deck.gl
train
js
27b3cddf37cb337b20736d50db65397d15063638
diff --git a/angular-raven.js b/angular-raven.js index <HASH>..<HASH> 100644 --- a/angular-raven.js +++ b/angular-raven.js @@ -20,9 +20,8 @@ } }, captureMessage: function captureMessage(message, data) { - if (_development) { - $log.error('Raven: Message ', message, data); - } else { + $log.error('Raven: Message ', message, data); + if (!_development) { $window.Raven.captureMessage(message, data); } },
Log Messages Along the same lines as #6
PatrickJS_angular-raven
train
js
4d1dfb8a439b72eb2e72da1fc1d72674ea7eac26
diff --git a/core/src/main/java/net/kuujo/copycat/protocol/LocalProtocolConnection.java b/core/src/main/java/net/kuujo/copycat/protocol/LocalProtocolConnection.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/net/kuujo/copycat/protocol/LocalProtocolConnection.java +++ b/core/src/main/java/net/kuujo/copycat/protocol/LocalProtocolConnection.java @@ -36,7 +36,7 @@ public class LocalProtocolConnection implements ProtocolConnection { @Override public CompletableFuture<ByteBuffer> write(ByteBuffer request) { - return handler.apply(request); + return handler.apply(request.duplicate()).thenApply(ByteBuffer::duplicate); } @Override
Duplicate ByteBuffer instances in LocalProtocol implementation in order to avoid race conditions.
atomix_atomix
train
java