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
ac8d3db15d5d5b464759b7442130e0880dffdd1d
diff --git a/modules/activiti-engine/src/main/java/org/activiti/engine/impl/db/DbSqlSession.java b/modules/activiti-engine/src/main/java/org/activiti/engine/impl/db/DbSqlSession.java index <HASH>..<HASH> 100755 --- a/modules/activiti-engine/src/main/java/org/activiti/engine/impl/db/DbSqlSession.java +++ b/modules/activiti-engine/src/main/java/org/activiti/engine/impl/db/DbSqlSession.java @@ -117,6 +117,7 @@ public class DbSqlSession implements Session { ACTIVITI_VERSIONS.add(new ActivitiVersion("5.20.0.1")); ACTIVITI_VERSIONS.add(new ActivitiVersion("5.20.0.2")); ACTIVITI_VERSIONS.add(new ActivitiVersion("5.21.0.0")); + ACTIVITI_VERSIONS.add(new ActivitiVersion("5.22.0.0")); /* * Version 5.18.0.1 is the latest v5 version in the list here, although if you would look at the v5 code,
adding <I> to activiti5 versions
Activiti_Activiti
train
java
4b2004c1d307c6714952fa4858065d8d719d01a4
diff --git a/api/src/opentrons/protocol_api/protocol_context.py b/api/src/opentrons/protocol_api/protocol_context.py index <HASH>..<HASH> 100644 --- a/api/src/opentrons/protocol_api/protocol_context.py +++ b/api/src/opentrons/protocol_api/protocol_context.py @@ -676,7 +676,11 @@ class ProtocolContext(CommandPublisher): @property # type: ignore @requires_version(2, 0) def fixed_trash(self) -> Labware: - """ The trash fixed to slot 12 of the robot deck. """ + """ The trash fixed to slot 12 of the robot deck. + + It has one well and should be accessed like labware in your protocol. + e.g. ``protocol.fixed_trash['A1']`` + """ trash = self._deck_layout['12'] if not trash: raise RuntimeError("Robot must have a trash container in 12")
docs(api): explain trash has a well (#<I>) explain trash has a well and how to use it in pipette commands
Opentrons_opentrons
train
py
8ab444228f93fca59c278f4957d1dc7994520ad9
diff --git a/psamm/commands/robustness.py b/psamm/commands/robustness.py index <HASH>..<HASH> 100644 --- a/psamm/commands/robustness.py +++ b/psamm/commands/robustness.py @@ -23,7 +23,8 @@ import time import logging from ..command import (Command, MetabolicMixin, LoopRemovalMixin, - ObjectiveMixin, SolverCommandMixin, ParallelTaskMixin) + ObjectiveMixin, SolverCommandMixin, + ParallelTaskMixin, convert_to_unicode) from .. import fluxanalysis from six.moves import range @@ -59,7 +60,7 @@ class RobustnessCommand(MetabolicMixin, LoopRemovalMixin, ObjectiveMixin, '--all-reaction-fluxes', help='Print reaction flux for all model reactions', action='store_true') - parser.add_argument('varying', help='Reaction to vary') + parser.add_argument('varying', type=convert_to_unicode, help='Reaction to vary') parser.add_argument( '--fva', action='store_true', help='Run FVA and print flux range instead of flux value')
Made it so robustness accepts unicode as a command line arg
zhanglab_psamm
train
py
0221a80073451ab91416176bf90d3c247ce7c928
diff --git a/hazelcast/src/test/java/com/hazelcast/map/MapLockTest.java b/hazelcast/src/test/java/com/hazelcast/map/MapLockTest.java index <HASH>..<HASH> 100644 --- a/hazelcast/src/test/java/com/hazelcast/map/MapLockTest.java +++ b/hazelcast/src/test/java/com/hazelcast/map/MapLockTest.java @@ -227,7 +227,7 @@ public class MapLockTest extends HazelcastTestSupport { assertOpenEventually(latch); } - @Test(timeout = 1000 * 15, expected = IllegalMonitorStateException.class) + @Test(timeout = 1000 * 30, expected = IllegalMonitorStateException.class) public void testLockOwnership() throws Exception { final TestHazelcastInstanceFactory nodeFactory = createHazelcastInstanceFactory(2); final Config config = getConfig();
increased timeout of testLockOwnership
hazelcast_hazelcast
train
java
f366285c2ce032ea19528c1bb6e4b96bc5661a4c
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Path.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Path.java index <HASH>..<HASH> 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Path.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Path.java @@ -174,7 +174,7 @@ public interface Path extends Cloneable { public static class Exceptions { public static IllegalArgumentException stepWithProvidedLabelDoesNotExist(final String label) { - return new IllegalArgumentException("The step with label " + label + " does not exist"); + return new IllegalArgumentException("The step with label " + label + " does not exist"); } } }
a trivial formating fix to an Exception message.
apache_tinkerpop
train
java
6ee0fd3a0e78fb481582240018bf3f08d56ff0ca
diff --git a/lib/mqtt/client.rb b/lib/mqtt/client.rb index <HASH>..<HASH> 100644 --- a/lib/mqtt/client.rb +++ b/lib/mqtt/client.rb @@ -149,7 +149,7 @@ class MQTT::Client end if args.length >= 2 - attr.merge!(:remote_port => args[1]) + attr.merge!(:remote_port => args[1]) unless args[1].nil? end if args.length >= 3
Fix #<I> Avoid wiping over already set params with nil
njh_ruby-mqtt
train
rb
75cd6a46c79658ff36a9a7912f0c9681bdbd4042
diff --git a/src/Strain.js b/src/Strain.js index <HASH>..<HASH> 100644 --- a/src/Strain.js +++ b/src/Strain.js @@ -12,9 +12,9 @@ const URI = require('uri-js'); const YAML = require('yaml'); -const YAML_MAP = require('yaml/map').default; -const YAML_PAIR = require('yaml/pair').default; -const YAML_SEQ = require('yaml/seq').default; +const YAML_MAP = require('yaml/map'); +const YAML_PAIR = require('yaml/pair'); +const YAML_SEQ = require('yaml/seq'); const GitUrl = require('./GitUrl.js'); const Origin = require('./Origin.js');
chore(strains): adjust for changed exports
adobe_helix-shared
train
js
5e3f86a8bb78983afdece8e04ce65e783804d6b8
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -2,10 +2,10 @@ from distutils.core import setup setup( name='py-synology', - version='0.1', - packages=[''], + version='0.2', + packages=['synology'], url='https://github.com/snjoetw/py-synology', - license='MIT License', + license='MIT', author='snjoetw', author_email='[email protected]', description='Python API for Synology Surveillance Station',
- Added missing package from setup.py
snjoetw_py-synology
train
py
8161fff63cb21000d5466dfcc2223674b3480471
diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go index <HASH>..<HASH> 100644 --- a/lxd/container_lxc.go +++ b/lxd/container_lxc.go @@ -2857,6 +2857,11 @@ func (c *containerLXC) createNetworkDevice(name string, m shared.Device) (string return "", fmt.Errorf("Failed to create the veth interface: %s", err) } + err = exec.Command("ip", "link", "set", n1, "up").Run() + if err != nil { + return "", fmt.Errorf("Failed to bring up the veth interface %s: %s", n1, err) + } + if m["nictype"] == "bridged" { err = exec.Command("brctl", "addif", m["parent"], n1).Run() if err != nil {
Automatically bring up bridged veth interface on host
lxc_lxd
train
go
6e3121e966e054077e940e46decef8c332271ae8
diff --git a/docgen/plugins/documentationjs-data.js b/docgen/plugins/documentationjs-data.js index <HASH>..<HASH> 100644 --- a/docgen/plugins/documentationjs-data.js +++ b/docgen/plugins/documentationjs-data.js @@ -80,7 +80,7 @@ function mapConnectors(connectors, symbols, files) { function mapWidgets(widgets, symbols, files) { return forEach(widgets, symbol => { - console.log(symbol.name); + // console.log(symbol.name); const fileName = `widgets/${symbol.name}.html`; const symbolWithRelatedType = { @@ -124,7 +124,12 @@ function findRelatedTypes(functionSymbol, symbols) { const isCustomType = currentTypeName && currentTypeName !== 'Object' && currentTypeName[0] === currentTypeName[0].toUpperCase(); if (isCustomType) { const typeSymbol = find(symbols, {name: currentTypeName}); - types = [...types, typeSymbol]; + if(!typeSymbol) console.warn('Undefined type: ', currentTypeName); + else { + types = [...types, typeSymbol]; + // iterate over each property to get their types + forEach(typeSymbol.properties, p => findParamsTypes(p)); + } } } };
fix(documentationjs): deeper related types
algolia_instantsearch.js
train
js
31a455ff70fb9722f3ec6ba2cee4b4cb72a20117
diff --git a/lib/edfize/edf.rb b/lib/edfize/edf.rb index <HASH>..<HASH> 100644 --- a/lib/edfize/edf.rb +++ b/lib/edfize/edf.rb @@ -156,7 +156,7 @@ module Edfize def read_header_section(section) result = IO.binread(@filename, HEADER_CONFIG[section][:size], compute_offset(section) ) - result = result.send(HEADER_CONFIG[section][:after_read]) unless HEADER_CONFIG[section][:after_read].to_s == '' + result = result.to_s.send(HEADER_CONFIG[section][:after_read]) unless HEADER_CONFIG[section][:after_read].to_s == '' self.instance_variable_set("@#{section}", result) end
Results should be processed if they contain an after read method
nsrr_edfize
train
rb
4709c6a308080a32a89bf7edba4515ddc17242f5
diff --git a/lib/truncate.js b/lib/truncate.js index <HASH>..<HASH> 100644 --- a/lib/truncate.js +++ b/lib/truncate.js @@ -239,8 +239,7 @@ function contextLength (path, opts) { case 'tags': return opts.truncateKeywordsAt - - default: - return opts.truncateStringsAt } + + return opts.truncateStringsAt }
fix(truncate): ensure context truncate has max (#<I>)
elastic_apm-nodejs-http-client
train
js
c8158c5adabf563b11c7c5279300aa85acef3944
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -60,10 +60,11 @@ var gulpTape = function(opts) { this.fail = 0; this.pass = 0; tapeStream.push(null); - callback(); if (shouldErrorOut) { - throw new Error('Test failed'); + callback(new PluginError(PLUGIN_NAME, 'Test failed')); + } else { + callback(); } });
Adding callback instead of throw an error.
yuanqing_gulp-tape
train
js
e436b9eb6492c92633e53cd5a50a81b79654b918
diff --git a/code/queryHandlers/RESTfulAPI_DefaultQueryHandler.php b/code/queryHandlers/RESTfulAPI_DefaultQueryHandler.php index <HASH>..<HASH> 100644 --- a/code/queryHandlers/RESTfulAPI_DefaultQueryHandler.php +++ b/code/queryHandlers/RESTfulAPI_DefaultQueryHandler.php @@ -284,12 +284,12 @@ class RESTfulAPI_DefaultQueryHandler implements RESTfulAPI_QueryHandler { // rand + seed if ( $param['Value'] ) - { + { $return = $return->sort('RAND('.$param['Value'].')'); } - // rand only - else{ - $return = $return->sort('RAND()'); + // rand only >> FIX: gen seed to avoid random result on relations + else{ + $return = $return->sort('RAND('.time().')'); } } // limits
FIX RAND() without seed would generate unpextected results using sort('RAND()') without seed would generate unexpected result when accessing realtions of each result or a DataList. Adding an arbitrary seed solves this.
colymba_silverstripe-restfulapi
train
php
7f138e3bb8753b4a75626f84dfd6eeccb2d8aa14
diff --git a/spectrum.js b/spectrum.js index <HASH>..<HASH> 100644 --- a/spectrum.js +++ b/spectrum.js @@ -396,7 +396,12 @@ callbacks.show(colorOnShow); } - function hide() { + function hide(e) { + + // Return on right click + if (e && e.type == "click" && e.button == 2) { return; } + + // Return if hiding is unnecessary if (!visible || flat) { return; } visible = false;
dont hide on right click (an issue in FF)
bgrins_spectrum
train
js
a51ce30e9b33543c766deb814004cff6ce734e3c
diff --git a/test/xframe.js b/test/xframe.js index <HASH>..<HASH> 100644 --- a/test/xframe.js +++ b/test/xframe.js @@ -72,7 +72,9 @@ describe('xframe', function () { }); it("works with String objects and doesn't change them", function (done) { + /* jshint -W053 */ var str = new String('SAMEORIGIN'); + /* jshint +W053 */ app.use(helmet.xframe(str)).use(hello); request(app).get('/') .expect('X-Frame-Options', 'SAMEORIGIN', done);
Fix the last JSHint problem
helmetjs_helmet
train
js
be8f3a6e933bd3414aa8158ced311b8b8d89b9e3
diff --git a/spec/models/person.rb b/spec/models/person.rb index <HASH>..<HASH> 100644 --- a/spec/models/person.rb +++ b/spec/models/person.rb @@ -2,5 +2,6 @@ class Person include Mongoid::Document include Mongoid::Slug field :name + field :age, :type => Integer slug :name, :as => :permalink end
Modded sample model in spec folder
mongoid_mongoid-slug
train
rb
6161ff549e9bc3681ae6ebb5c25c07c725ffe577
diff --git a/tabular_predDB/python_utils/convergence_test_utils.py b/tabular_predDB/python_utils/convergence_test_utils.py index <HASH>..<HASH> 100644 --- a/tabular_predDB/python_utils/convergence_test_utils.py +++ b/tabular_predDB/python_utils/convergence_test_utils.py @@ -76,6 +76,17 @@ def ARI_CrossCat(Xc, Xrv, XRc, XRrv): return ARI, ARI_viewonly +def get_column_ARI(X_L, view_assignment_truth): + view_assignments = X_L['column_partition']['assignments'] + ARI = metrics.adjusted_rand_score(view_assignments, view_assignment_truth) + return ARI + +def get_column_ARIs(X_L_list, view_assignment_truth): + get_column_ARI_helper = lambda X_L: \ + get_column_ARI(X_L, view_assignment_truth) + ARIs = map(get_column_ARI_helper, X_L_list) + return ARIs + def multi_chain_ARI(X_L_list, X_D_List, view_assignment_truth, X_D_truth, return_list=False): num_chains = len(X_L_list) ari_table = numpy.zeros(num_chains)
add functions that only get column ARI
probcomp_crosscat
train
py
00a0c0bf2e4ce04e629ead7aacfef232589877dc
diff --git a/packages/@ember/object/lib/computed/reduce_computed_macros.js b/packages/@ember/object/lib/computed/reduce_computed_macros.js index <HASH>..<HASH> 100644 --- a/packages/@ember/object/lib/computed/reduce_computed_macros.js +++ b/packages/@ember/object/lib/computed/reduce_computed_macros.js @@ -3,7 +3,13 @@ */ import { DEBUG } from '@glimmer/env'; import { assert } from '@ember/debug'; -import { get, computed, addObserver, removeObserver } from '@ember/-internals/metal'; +import { + get, + computed, + addObserver, + removeObserver, + notifyPropertyChange, +} from '@ember/-internals/metal'; import { compare, isArray, A as emberA, uniqBy as uniqByArray } from '@ember/-internals/runtime'; function reduceMacro(dependentKey, callback, initialValue, name) { @@ -1427,7 +1433,7 @@ function propertySort(itemsKey, sortPropertiesKey) { if (!sortPropertyDidChangeMap.has(this)) { sortPropertyDidChangeMap.set(this, function() { - this.notifyPropertyChange(key); + notifyPropertyChange(this, key); }); }
[BUGFIX] Ensure @sort works on non-Ember.Objects. Assuming that `this.notifyPropertyChange` is a method on the object that the `sort` is operating on is not a safe assumption. Specifically, when operating on a `@glimmer/component` (which is _essentially_ just a very very basic native class) there is no `notifyPropertyChange` method and an error was thrown.
emberjs_ember.js
train
js
274a9d3030e72f9c59b04c819141d08c5146df0b
diff --git a/tests/test_redis_lock.py b/tests/test_redis_lock.py index <HASH>..<HASH> 100644 --- a/tests/test_redis_lock.py +++ b/tests/test_redis_lock.py @@ -311,7 +311,7 @@ def test_no_overlap2(make_process, make_conn): # Wait until all workers will come to point when they are ready to acquire # the redis lock. while count.value < NWORKERS: - time.sleep(0.05) + time.sleep(0.5) # Then "count" will be used as counter of workers, which acquired # redis-lock with success. @@ -319,7 +319,7 @@ def test_no_overlap2(make_process, make_conn): go.set() - time.sleep(0.5) + time.sleep(1) assert count.value == 1
Increase pauses in test_no_overlap2
ionelmc_python-redis-lock
train
py
9e8bd58e2a488fc1306e9621e3ec8ce9e44f0e5c
diff --git a/aiohttp/helpers.py b/aiohttp/helpers.py index <HASH>..<HASH> 100644 --- a/aiohttp/helpers.py +++ b/aiohttp/helpers.py @@ -53,8 +53,6 @@ class BasicAuth(namedtuple('BasicAuth', ['login', 'password', 'encoding'])): if split[0].strip().lower() != 'basic': raise ValueError('Unknown authorization method %s' % split[0]) to_decode = split[1] - elif len(split) == 1: - to_decode = split[0] else: raise ValueError('Could not parse authorization header.')
Don't be so forgiving when parsing basic auth.
aio-libs_aiohttp
train
py
d64b5f50e3a511a5ff1d0998d1b30b988a80bb63
diff --git a/test/doubleshot_test.js b/test/doubleshot_test.js index <HASH>..<HASH> 100644 --- a/test/doubleshot_test.js +++ b/test/doubleshot_test.js @@ -66,7 +66,7 @@ describe('doubleshot', function () { // Run doubleshot implicitly function runDblImplicitly (cb) { // var child = cp.spawn(doubleshot); - var child = cp.spawn('echo %CD%'); + var child = cp.spawn('echo', ['%CD%']); var stdout = ''; child.stdout.on('data', function (a) { stdout += a;
Back to poking around -- still not progress
twolfson_doubleshot
train
js
5bcd4db2f2d0c902f9baa5ee4a4ca6e8cb203c98
diff --git a/btfxwss/classes.py b/btfxwss/classes.py index <HASH>..<HASH> 100644 --- a/btfxwss/classes.py +++ b/btfxwss/classes.py @@ -7,7 +7,6 @@ import hmac import queue import os import shutil -import urllib import threading import datetime @@ -34,7 +33,6 @@ from btfxwss.exceptions import FaultyPayloadError # Init Logging Facilities log = logging.getLogger(__name__) -log.setLevel(logging.DEBUG) class Orders:
removed hard-coded log level from lib file
Crypto-toolbox_btfxwss
train
py
2cf5d43ab533372d160cb7d6fbced02ff82351f3
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/tooltip.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/tooltip.js index <HASH>..<HASH> 100644 --- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/tooltip.js +++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/tooltip.js @@ -807,7 +807,7 @@ function Tooltip (view) { annotation = annotations[j]; if (annotation.title !== "" && !annotation.groupAnnotation) { // Don't display untitled annotations in the editor such as occurrences as the code is already visible - if (!inEditor || annotation.title){ + if (!inEditor || annotation.title || annotation.type === "orion.annotation.folding"){ newAnnotations.push(annotation); } }
Bug <I> - Tooltip for folding annotations are not shown
eclipse_orion.client
train
js
7039e5057c4e574f50a98b3ad13804f00cd5ec78
diff --git a/facade/src/main/java/org/jboss/pnc/facade/rsql/mapper/ArtifactRSQLMapper.java b/facade/src/main/java/org/jboss/pnc/facade/rsql/mapper/ArtifactRSQLMapper.java index <HASH>..<HASH> 100644 --- a/facade/src/main/java/org/jboss/pnc/facade/rsql/mapper/ArtifactRSQLMapper.java +++ b/facade/src/main/java/org/jboss/pnc/facade/rsql/mapper/ArtifactRSQLMapper.java @@ -39,6 +39,8 @@ public class ArtifactRSQLMapper extends AbstractRSQLMapper<Integer, Artifact> { switch (name) { case "targetRepository": return Artifact_.targetRepository; + case "build": + return Artifact_.buildRecord; default: return null; }
Add build to Artifact RSQL
project-ncl_pnc
train
java
83230097aebfc13ba856f72a5d55405b1679d6a1
diff --git a/ocrmypdf/__main__.py b/ocrmypdf/__main__.py index <HASH>..<HASH> 100755 --- a/ocrmypdf/__main__.py +++ b/ocrmypdf/__main__.py @@ -39,7 +39,7 @@ warnings.simplefilter('ignore', pypdf.utils.PdfReadWarning) # ------------- # External dependencies -MINIMUM_TESS_VERSION = '3.02.02' +MINIMUM_TESS_VERSION = '3.04' def complain(message): diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -155,7 +155,7 @@ if not forced and command.startswith('install') or \ command in ['check', 'test', 'nosetests', 'easy_install']: check_external_program( program='tesseract', - need_version='3.03', # limited by Travis CI / Ubuntu 14.04 backports + need_version='3.04', # using backport for Travis CI package={'darwin': 'tesseract', 'linux': 'tesseract-ocr'} ) check_external_program(
Insist on Tesseract <I> wherever we check for it
jbarlow83_OCRmyPDF
train
py,py
83961871d389a29502479492c771bec0765d7ba2
diff --git a/tests/test_schema.py b/tests/test_schema.py index <HASH>..<HASH> 100755 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -736,6 +736,27 @@ def test_nested_only_inheritance(): assert 'baz' not in child +def test_nested_only_empty_inheritance(): + class ChildSchema(Schema): + foo = fields.Field() + bar = fields.Field() + baz = fields.Field() + class ParentSchema(Schema): + bla = fields.Field() + bli = fields.Field() + blubb = fields.Nested(ChildSchema, only=('bar',)) + sch = ParentSchema(only=('blubb.foo',)) + data = dict(bla=1, bli=2, blubb=dict(foo=42, bar=24, baz=242)) + result = sch.dump(data) + assert 'bla' not in result.data + assert 'blubb' in result.data + assert 'bli' not in result.data + child = result.data['blubb'] + assert 'foo' not in child + assert 'bar' not in child + assert 'baz' not in child + + def test_nested_exclude(): class ChildSchema(Schema): foo = fields.Field()
Add a test for excluding all the fields with disjoint only options
marshmallow-code_marshmallow
train
py
a2534172657d32909f5989f7cecd9273ec5eb296
diff --git a/Library/Passes/MutateGathererPass.php b/Library/Passes/MutateGathererPass.php index <HASH>..<HASH> 100644 --- a/Library/Passes/MutateGathererPass.php +++ b/Library/Passes/MutateGathererPass.php @@ -299,6 +299,9 @@ class MutateGathererPass if (isset($statement['else_statements'])) { $this->passStatementBlock($statement['else_statements']); } + if (isset($statement['elseif_statements'])) { + $this->passStatementBlock($statement['elseif_statements']); + } break; case 'switch':
Fix #<I>: Make sure to also check the elseif statements for mutations
phalcon_zephir
train
php
05a1424dd2fb56cdfa0896abaab533e22c270f7e
diff --git a/src/Language/Translator.php b/src/Language/Translator.php index <HASH>..<HASH> 100644 --- a/src/Language/Translator.php +++ b/src/Language/Translator.php @@ -205,6 +205,7 @@ class Translator extends Object $paths[0] = PATH_APP . "/bootstrap/$client/language/overrides/$lang.localise.php"; $paths[1] = PATH_APP . "/bootstrap/$client/language/$lang/$lang.localise.php"; $paths[2] = PATH_CORE . "/bootstrap/$client/language/$lang/$lang.localise.php"; + $paths[3] = PATH_CORE . "/bootstrap/" . ucfirst($client) . "/language/$lang/$lang.localise.php"; ksort($paths); $path = reset($paths); @@ -1022,7 +1023,7 @@ class Translator extends Object if (!is_file("$path/$file")) { - $path = self::getLanguagePath(PATH_CORE . DS . 'bootstrap' . DS . \App::get('client')->name, $lang); + $path = self::getLanguagePath(PATH_CORE . DS . 'bootstrap' . DS . ucfirst(\App::get('client')->name), $lang); } if (is_file("$path/$file"))
Slight change to take into account bootstrap changes due to moving service providers (#<I>)
hubzero_framework
train
php
1cffd774b9e3e4f353bbe60829cf70927c2d00ce
diff --git a/tests/ish_report_test.py b/tests/ish_report_test.py index <HASH>..<HASH> 100644 --- a/tests/ish_report_test.py +++ b/tests/ish_report_test.py @@ -18,8 +18,8 @@ class ish_report_test(unittest.TestCase): wx = ish_report() wx.loads(noaa_string) self.assertEquals(type(wx.sky_cover), list) - print(wx.formatted()) - + self.assertEquals(len(wx.sky_cover), 2) #should have two + def test_kync_single_date(self): # 1:51 AM,61.0,51.1,70,29.97,10.0,WNW,4.6,-,N/A,,Clear,290,2014-09-18 05:51:00 noaa_string = """0185725053947282014091806517+40779-073969FM-15+0048KNYC V0309999V002152200059N0160935N5+01615+01065101455ADDAA101000095GA1005+999999999GD10991+9999999GF100991999999999999999999MA1101565100985REMMET09009/18/14 01:51:02 METAR KNYC 180651Z VRB04KT 10SM CLR 16/11 A2999 RMK AO2 SLP145 T01610106"""
adding a second unittest for cloud coverage
haydenth_ish_parser
train
py
6d869699914bd4ff98941927145facc517059db3
diff --git a/code/python/twisted/src/selenium/Dispatcher.py b/code/python/twisted/src/selenium/Dispatcher.py index <HASH>..<HASH> 100644 --- a/code/python/twisted/src/selenium/Dispatcher.py +++ b/code/python/twisted/src/selenium/Dispatcher.py @@ -110,4 +110,8 @@ class Dispatcher: """ Adds a command to the command queue, and gets a result from the result queue.""" self.addCommand(command_string) - return self.getResult() \ No newline at end of file + # if test is complete, don't try retrieving a response from the browser. + if command_string.find('testComplete') >= 0: + return 'test complete' + else: + return self.getResult() \ No newline at end of file
Fixed the command dispatcher so it does not wait for a response from the browser after sending 'testComplete'. r<I>
SeleniumHQ_selenium
train
py
8f025aae36fd040d8d2617890b258b5460ae44db
diff --git a/daemon/logger/syslog/syslog.go b/daemon/logger/syslog/syslog.go index <HASH>..<HASH> 100644 --- a/daemon/logger/syslog/syslog.go +++ b/daemon/logger/syslog/syslog.go @@ -30,16 +30,9 @@ func New(tag string) (logger.Logger, error) { func (s *Syslog) Log(msg *logger.Message) error { logMessage := fmt.Sprintf("%s: %s", s.tag, string(msg.Line)) if msg.Source == "stderr" { - if err := s.writer.Err(logMessage); err != nil { - return err - } - - } else { - if err := s.writer.Info(logMessage); err != nil { - return err - } + return s.writer.Err(logMessage) } - return nil + return s.writer.Info(logMessage) } func (s *Syslog) Close() error {
Refactor syslog Log else clause
moby_moby
train
go
affa12bd241db3c1f44a2d5296afba2e0f7d3559
diff --git a/server/pages/index.js b/server/pages/index.js index <HASH>..<HASH> 100644 --- a/server/pages/index.js +++ b/server/pages/index.js @@ -519,6 +519,14 @@ module.exports = function() { 'X-Frame-Options': 'DENY', } ); + if ( calypsoEnv === 'development' ) { + return res.render( 'support-user', { + authorized: true, + supportUser: req.query.support_user, + supportToken: req.query._support_token, + } ); + } + if ( ! config.isEnabled( 'wpcom-user-bootstrap' ) || ! req.cookies.wordpress_logged_in ) { return res.render( 'support-user', { authorized: false,
SU: re-enable functionality in development environments (#<I>)
Automattic_wp-calypso
train
js
446cd949c40cf9a7f6d0334b38ebeab547a3119b
diff --git a/js/jquery.tooltipster.js b/js/jquery.tooltipster.js index <HASH>..<HASH> 100644 --- a/js/jquery.tooltipster.js +++ b/js/jquery.tooltipster.js @@ -347,7 +347,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI // reposition the tooltip if the origin element has moved if(self.options.positionDynamic){ - var o = self.$el.offset(); + var o = self.$elProxy.offset(); if(o.left !== self.elOffset.left || o.top !== self.elOffset.top){ self.positionTooltip(); self.elOffset = o; @@ -833,7 +833,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI self.$tooltip.css({'top': Math.round(myTop) + 'px', 'left': Math.round(myLeft) + 'px'}); // remember the new position (relatively to document) of the origin element : if it is moved, we'll move the tooltip as well - if(self.options.positionDynamic) self.elOffset = self.$el.offset(); + if(self.options.positionDynamic) self.elOffset = self.$elProxy.offset(); } } };
PositionDynamic : tooltip had rather follow the elProxy. Will need to be changed someday, when tooltipster is in charge of the icon positioning too
iamceege_tooltipster
train
js
0ad59730170d7940a1dcf0ef6dfbc6b30b511657
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -181,7 +181,7 @@ class ServerlessDynamodbLocal { get seedSources() { const config = this.service.custom.dynamodb; const seedConfig = _.get(config, "seed", {}); - const seed = this.options.seed; + const seed = this.options.seed ? this.options.seed : Object.keys(seedConfig).join(','); if (!seed) { this.serverlessLog("DynamoDB - No seed categories defined. Skipping data seeding."); return [];
Added automatic seeding of all available seeds.
99xt_serverless-dynamodb-local
train
js
70cf1dc0538cdf8a0803bfa90e57b8da29b49a61
diff --git a/gshell-util/src/main/java/com/planet57/gshell/util/converter/Converters.java b/gshell-util/src/main/java/com/planet57/gshell/util/converter/Converters.java index <HASH>..<HASH> 100644 --- a/gshell-util/src/main/java/com/planet57/gshell/util/converter/Converters.java +++ b/gshell-util/src/main/java/com/planet57/gshell/util/converter/Converters.java @@ -240,17 +240,17 @@ public class Converters return converter; } + converter = findBuiltinConverter(type); + if (converter != null) { + return converter; + } + // fall back to a property editor PropertyEditor editor = findEditor(type); if (editor != null) { return editor; } - converter = findBuiltinConverter(type); - if (converter != null) { - return converter; - } - return null; }
resolve buildin converter (presently this is just for enum handling) before falling back to property-editors
jdillon_gshell
train
java
b77aef694d78271261562b20ca5f25a252047652
diff --git a/hu/auth.php b/hu/auth.php index <HASH>..<HASH> 100644 --- a/hu/auth.php +++ b/hu/auth.php @@ -13,7 +13,7 @@ return [ | */ - 'failed' => 'These credentials do not match our records.', - 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + 'failed' => 'A megadott adatokkal megegyező felhasználó nem található az adatbázisunkban.', + 'throttle' => 'Túl sok próbálkozás. Kérjü próbálja újra :seconds másodperc múlva.', ];
Update auth.php Hungarian translation of Auth.php.
caouecs_Laravel-lang
train
php
22267864622ca8e0168ed7c484d7f5f535bffd75
diff --git a/src/V1Server.js b/src/V1Server.js index <HASH>..<HASH> 100644 --- a/src/V1Server.js +++ b/src/V1Server.js @@ -7,11 +7,11 @@ export function getUrlsForV1Server({ hostname, instance, protocol, port }) { } function getUrlToV1Server({ hostname, instance, protocol, port }) { - const url = `${protocol}://${hostname}/${instance}`; + let url = `${protocol}://${hostname}`; if (port) { - return `${url}:${port}`; + url = `${url}:${port}`; } - return url; + return `${url}/${instance}`; } function restUrl(rootUrl) {
Closes #<I> Specs that port should be before the instance name in the correct format: http://host:port/instance-name
versionone_VersionOne.SDK.JavaScript
train
js
6b6235342617a9334b9e27f640302b652a84386b
diff --git a/salt/returners/mysql_return.py b/salt/returners/mysql_return.py index <HASH>..<HASH> 100644 --- a/salt/returners/mysql_return.py +++ b/salt/returners/mysql_return.py @@ -127,13 +127,12 @@ def get_fun(fun): with serv: cur = serv.cursor() - sql = '''SELECT s.id, s.full_ret + sql = '''SELECT s.id,s.jid, s.full_ret FROM `salt`.`salt_returns` s JOIN ( SELECT MAX(`jid`) as jid from `salt`.`salt_returns` GROUP BY fun, id) max ON s.jid = max.jid - WHERE `fun` = %s - GROUP BY s.id + WHERE s.fun = %s ''' cur.execute(sql, (fun,)) @@ -141,7 +140,7 @@ def get_fun(fun): ret = {} if data: - for minion, full_ret in data: + for minion, jid, full_ret in data: ret[minion] = json.loads(full_ret) return ret
Verified get_fun query now working.
saltstack_salt
train
py
2a9603f536747ad48cd7a61058f41c5b3c76fa17
diff --git a/aeron-driver/src/main/java/io/aeron/driver/status/SubscriberPos.java b/aeron-driver/src/main/java/io/aeron/driver/status/SubscriberPos.java index <HASH>..<HASH> 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/status/SubscriberPos.java +++ b/aeron-driver/src/main/java/io/aeron/driver/status/SubscriberPos.java @@ -50,6 +50,6 @@ public class SubscriberPos sessionId, streamId, channel, - joiningPosition > 0 ? ("@" + joiningPosition) : "@0"); + joiningPosition == 0 ? "@0" : ("@" + joiningPosition)); } }
[Java] Match exactly in SubscriberPos label suffix generation.
real-logic_aeron
train
java
4fc8c4975249267e1d5be20aa5e33f537d7c7e41
diff --git a/core/server/master/src/main/java/alluxio/master/lineage/checkpoint/CheckpointSchedulingExecutor.java b/core/server/master/src/main/java/alluxio/master/lineage/checkpoint/CheckpointSchedulingExecutor.java index <HASH>..<HASH> 100644 --- a/core/server/master/src/main/java/alluxio/master/lineage/checkpoint/CheckpointSchedulingExecutor.java +++ b/core/server/master/src/main/java/alluxio/master/lineage/checkpoint/CheckpointSchedulingExecutor.java @@ -38,8 +38,8 @@ public final class CheckpointSchedulingExecutor implements HeartbeatExecutor { */ public CheckpointSchedulingExecutor(LineageMaster lineageMaster, FileSystemMaster fileSystemMaster) { - mLineageMaster = Preconditions.checkNotNull(lineageMaster); - mFileSystemMaster = Preconditions.checkNotNull(fileSystemMaster); + mLineageMaster = Preconditions.checkNotNull(lineageMaster, "lineageMaster"); + mFileSystemMaster = Preconditions.checkNotNull(fileSystemMaster, "fileSystemMaster"); mPlanner = CheckpointPlanner.Factory.create(mLineageMaster.getLineageStoreView(), mFileSystemMaster.getFileSystemMasterView());
[SMALLFIX] Supply the variable name to Preconditions.checkNotNull in CheckpointSchedulingExecutor.java
Alluxio_alluxio
train
java
fac9c613f4fd43da8ddfbcc3a24d8113e6758b2b
diff --git a/dev/test/cypress/plugins/index.js b/dev/test/cypress/plugins/index.js index <HASH>..<HASH> 100644 --- a/dev/test/cypress/plugins/index.js +++ b/dev/test/cypress/plugins/index.js @@ -17,7 +17,7 @@ const getDbConnectionConfig = () => { host: process.env.MYSQL_HOST, user: process.env.MYSQL_USER, password: process.env.MYSQL_PASSWORD, - database: process.env.MYSQL_TEST_DATABASE + database: process.env.MYSQL_DATABASE }; };
fix(cypress): fix db connection object SUITEDEV-<I>
emartech_magento2-extension
train
js
80bed58fbe37254064f6ec3b11dbcedb1b6f36b0
diff --git a/src/Psr7/Request.php b/src/Psr7/Request.php index <HASH>..<HASH> 100644 --- a/src/Psr7/Request.php +++ b/src/Psr7/Request.php @@ -47,7 +47,7 @@ class Request extends ServerRequest $body = 'php://input', array $headers = [] ) { - $this->respond = new Respond($this); + $this->respond = new Respond(); return parent::__construct($serverParams, $fileParams, $uri, $method, $body, $headers); } @@ -113,6 +113,7 @@ class Request extends ServerRequest */ public function respond() { + $this->respond->setRequest($this); return $this->respond; } } \ No newline at end of file diff --git a/src/Psr7/Respond.php b/src/Psr7/Respond.php index <HASH>..<HASH> 100644 --- a/src/Psr7/Respond.php +++ b/src/Psr7/Respond.php @@ -31,9 +31,16 @@ class Respond protected $request; /** + * + */ + public function __construct() + { + } + + /** * @param Request $request */ - public function __construct($request) + public function setRequest($request) { $this->request = $request; }
maybe, the respond object uses the $request when it is called.
TuumPHP_Web
train
php,php
e42c998b255e4ae5b0387a217a6d4b01eeb7e95f
diff --git a/seleniumbase/fixtures/base_case.py b/seleniumbase/fixtures/base_case.py index <HASH>..<HASH> 100755 --- a/seleniumbase/fixtures/base_case.py +++ b/seleniumbase/fixtures/base_case.py @@ -3485,7 +3485,7 @@ class BaseCase(unittest.TestCase): html += '\n<pre class="prettyprint">\n%s</pre>' % code if iframe: html += ('\n<div></div>' - '\n<iframe src="%s" style="width:92%%;height:550;' + '\n<iframe src="%s" style="width:92%%;height:550px;" ' 'title="iframe content"></iframe>' % iframe) add_line = "" if content2.startswith("<"):
Fix html when creating an iframe in a Presenter presentation
seleniumbase_SeleniumBase
train
py
9c29394c9b5ec97f6fed74c88697954277b5786d
diff --git a/src/AnimeDb/Bundle/CatalogBundle/Menu/Builder.php b/src/AnimeDb/Bundle/CatalogBundle/Menu/Builder.php index <HASH>..<HASH> 100644 --- a/src/AnimeDb/Bundle/CatalogBundle/Menu/Builder.php +++ b/src/AnimeDb/Bundle/CatalogBundle/Menu/Builder.php @@ -79,16 +79,16 @@ class Builder extends ContainerAware // add search plugin items $chain = $this->container->get('anime_db.plugin.search_fill'); - if ($chain->getPlugins()) { - $add->addChild('Search in all plugins', ['route' => 'fill_search_in_all']) - ->setAttribute('title', $this->container->get('translator')->trans('Search by name in all plugins')); - } $this->addPluginItems( $chain, $add, 'Search by name', 'Search by name the source of filling item' ); + if ($chain->getPlugins()) { + $add->addChild('Search in all plugins', ['route' => 'fill_search_in_all']) + ->setAttribute('title', $this->container->get('translator')->trans('Search by name in all plugins')); + } // add filler plugin items $this->addPluginItems( $this->container->get('anime_db.plugin.filler'),
change positions for search_in_all
anime-db_catalog-bundle
train
php
20a1ce89a01af4da5d32646a8883a9f5f9556214
diff --git a/src/Illuminate/Support/Testing/Fakes/EventFake.php b/src/Illuminate/Support/Testing/Fakes/EventFake.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Support/Testing/Fakes/EventFake.php +++ b/src/Illuminate/Support/Testing/Fakes/EventFake.php @@ -159,9 +159,10 @@ class EventFake implements Dispatcher * * @param string|object $event * @param mixed $payload + * @param bool $halt * @return array|null */ - public function dispatch($event, $payload = []) + public function dispatch($event, $payload = [], $halt = false) { $name = is_object($event) ? get_class($event) : (string) $event; @@ -188,4 +189,16 @@ class EventFake implements Dispatcher { // } + + /** + * Dispatch an event and call the listeners. + * + * @param string|object $event + * @param mixed $payload + * @return void + */ + public function until($event, $payload = []) + { + // + } }
[<I>] Event : fix EventFake (#<I>) * Fix EventFake * Fix CS
laravel_framework
train
php
23aaaf387aca28b97d96dd5134b0d36b7bb3128b
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -4,6 +4,10 @@ require "ciborg" require "godot" require "tempfile" +# Cleanup vagrant instance that may have been running from previous tests, +# since it seemed to be causing test pollution and flaky tests. +`vagrant destroy --force` + module SpecHelpers def self.ec2_credentials_present? ENV.has_key?("EC2_KEY") && ENV.has_key?("EC2_SECRET")
[#<I>] Add a 'vagrant destroy' call to spec helper to clean up previously running vagrant before starting tests.
pivotal-legacy_ciborg
train
rb
009abd0ae3463b36f71740a28ff19b275af3a322
diff --git a/bootstrap.js b/bootstrap.js index <HASH>..<HASH> 100644 --- a/bootstrap.js +++ b/bootstrap.js @@ -1,9 +1,37 @@ (function(){ - var karmaLoadedFunction = window.__karma__.loaded; - window.__karma__.loaded = function(){}; - - Ext.onReady(function () { - window.__karma__.loaded = karmaLoadedFunction; - window.__karma__.loaded(); - }); -}()); + var karmaLoadedFunction = window.__karma__.loaded, + Ext4Ready = false, + Ext6Ready = false; + + window.__karma__.loaded = function(){}; + + if(Ext){ + Ext.onReady(function () { + Ext4Ready = true; + }); + } else { + Ext4Ready = true; + } + + if(Ext6){ + Ext6.onReady(function () { + Ext6Ready = true; + }); + } else { + Ext6Ready = true; + } + + function launchTests() { + + if(Ext4Ready && Ext6Ready){ + window.__karma__.loaded = karmaLoadedFunction; + window.__karma__.loaded(); + } else { + setTimeout(function () { + launchTests(); + }, 200); + } + } + + launchTests(); +}()); \ No newline at end of file
modified bootstrap.js in order to wait for load ExtJs (4 or 6 version)
Unit4_karma-extjs
train
js
f71ea2382d719c8e1654e752bff3523550c7bf06
diff --git a/app/models/blogit/comment.rb b/app/models/blogit/comment.rb index <HASH>..<HASH> 100644 --- a/app/models/blogit/comment.rb +++ b/app/models/blogit/comment.rb @@ -15,10 +15,10 @@ module Blogit foreign_key: "post_id", counter_cache: true, touch: true # TODO: Check if this is optimal - URL_REGEX = /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix + URL_REGEX = /\A(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?\z/ix # TODO: Check if this is optimal - EMAIL_REGEX = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i + EMAIL_REGEX = /\A[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\z/i # ============ # = Callbacks =
Use \A and \z in regexes
KatanaCode_blogit
train
rb
618c330c395cf61590decc505c4ebe0060230213
diff --git a/new/new.go b/new/new.go index <HASH>..<HASH> 100644 --- a/new/new.go +++ b/new/new.go @@ -10,6 +10,7 @@ import ( "strings" "text/template" "time" + "go/build" "github.com/micro/cli" tmpl "github.com/micro/micro/internal/template" @@ -184,7 +185,7 @@ func run(ctx *cli.Context) { // only set gopath if told to use it if useGoPath { - goPath = os.Getenv("GOPATH") + goPath = build.Default.GOPATH // don't know GOPATH, runaway.... if len(goPath) == 0 {
If no GOPATH is set, use default path. (#<I>) If no GOPATH is set, it is assumed to be $HOME/go on Unix systems and %USERPROFILE%\go on Windows. href: <URL>
micro_micro
train
go
734ea6fdf236332303a9b80cb9612f8a41a57fb0
diff --git a/playhouse/postgres_ext.py b/playhouse/postgres_ext.py index <HASH>..<HASH> 100644 --- a/playhouse/postgres_ext.py +++ b/playhouse/postgres_ext.py @@ -164,7 +164,7 @@ class ArrayField(IndexedFieldMixin, Field): class DateTimeTZField(DateTimeField): - db_field = 'datetime_tz' + db_field = 'timestamptz' class HStoreField(IndexedFieldMixin, Field):
Fixed db_field for DateTimeTz in postgres_ext cause since <I> `datetime_tz` does not supported.
coleifer_peewee
train
py
455efadedbd35ed1c6a20fce053083d27a74e7c8
diff --git a/detectem/core.py b/detectem/core.py index <HASH>..<HASH> 100644 --- a/detectem/core.py +++ b/detectem/core.py @@ -238,9 +238,10 @@ class Detector(): for plugin in indicator_plugins: is_present = self.check_indicator_presence(plugin, entry) if is_present: + name = self.get_plugin_name(plugin, entry) self._results.add_result( Result( - name=plugin.name, + name=name, homepage=plugin.homepage, from_url=self.get_url(entry), type=INDICATOR_TYPE
Fix name so indicators could have modular names
alertot_detectem
train
py
8fbb13a67cc2beb5d25cbbdbde3953442aff1c2f
diff --git a/tests/test_cli.py b/tests/test_cli.py index <HASH>..<HASH> 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -185,6 +185,7 @@ class TestCli(TempAppDirTestCase): self.assertEqual(lv2_names, set(['v1'])) self.assertEqual(lv3_names, set(['users', 'orgs'])) + @unittest.skip('the linked spec file no longer exist') def test_spec_from_http(self): spec_url = 'https://api.apis.guru/v2/specs/github.com/v3/swagger.json' result, context = run_and_exit(['https://api.github.com', '--spec',
skip a test with broken external dependency
eliangcs_http-prompt
train
py
ca66e1699596562c17513b45ce99f895b86d8a20
diff --git a/ambry/exporters/ckan/core.py b/ambry/exporters/ckan/core.py index <HASH>..<HASH> 100644 --- a/ambry/exporters/ckan/core.py +++ b/ambry/exporters/ckan/core.py @@ -40,6 +40,12 @@ def export(dataset): if not ckan: raise EnvironmentError(MISSING_CREDENTIALS_MSG) + if dataset.config.metadata.about.access in ('internal', 'test', 'controlled', 'restricted', 'census'): + # Never publish dataset with such access. + raise Exception( + '{} dataset can not be published because of {} access' + .format(dataset.vid, dataset.config.metadata.about.access)) + # publish dataset ckan.action.package_create(**_convert_dataset(dataset))
Do not publish datasets with non-public access. #<I>.
CivicSpleen_ambry
train
py
ae13a244ef0e7059c325533b4cd8fb8c0af5b274
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ with open('twilio/__init__.py') as f: # # You need to have the setuptools module installed. Try reading the setuptools # documentation: http://pypi.python.org/pypi/setuptools -REQUIRES = ["requests >= 2.0.0", "six", "pytz", "PyJWT >= 1.4.2"] +REQUIRES = ["requests >= 2.0.0", "six", "pytz", "PyJWT >= 1.4.2,<1.5.1"] if sys.version_info < (3, 0): REQUIRES.extend(["cryptography >= 1.3.4", "idna >= 2.0.0", "pyOpenSSL >= 0.14"])
Constrain PyJWT dependency to working versions
twilio_twilio-python
train
py
340bf75c39271c8620951b6055bcb52aba702bd2
diff --git a/core/model/src/main/java/it/unibz/inf/ontop/model/term/functionsymbol/impl/StrlenSPARQLFunctionSymbolImpl.java b/core/model/src/main/java/it/unibz/inf/ontop/model/term/functionsymbol/impl/StrlenSPARQLFunctionSymbolImpl.java index <HASH>..<HASH> 100644 --- a/core/model/src/main/java/it/unibz/inf/ontop/model/term/functionsymbol/impl/StrlenSPARQLFunctionSymbolImpl.java +++ b/core/model/src/main/java/it/unibz/inf/ontop/model/term/functionsymbol/impl/StrlenSPARQLFunctionSymbolImpl.java @@ -20,7 +20,7 @@ public class StrlenSPARQLFunctionSymbolImpl extends ReduciblePositiveAritySPARQL @Override protected ImmutableTerm computeLexicalTerm(ImmutableList<ImmutableTerm> subLexicalTerms, ImmutableList<ImmutableTerm> typeTerms, TermFactory termFactory, ImmutableTerm returnedTypeTerm) { - return termFactory.getDBCharLength(subLexicalTerms.get(0)); + return termFactory.getConversion2RDFLexical(termFactory.getDBCharLength(subLexicalTerms.get(0)), xsdInteger); } @Override
Bugfix in StrlenSPARQLFunctionSymbolImpl: typing issue during decomposition.
ontop_ontop
train
java
9e32ca8c385f7d688f06903deadf82817ee4745a
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ class BitcoinSecpBuild(build): setup( name="pysecp256k1", - version='0.0.2', + version='0.0.3', description="secp256k1 wrapped with cffi to use with python", author="Jacob Stenum Czepluch", author_email="[email protected]",
bumping version after fixing .rst readme
czepluch_pysecp256k1
train
py
fc5de436e6f0feaa502827b99f146920a9e77a92
diff --git a/elasticapm/handlers/logging.py b/elasticapm/handlers/logging.py index <HASH>..<HASH> 100644 --- a/elasticapm/handlers/logging.py +++ b/elasticapm/handlers/logging.py @@ -11,7 +11,6 @@ Large portions are from __future__ import absolute_import -import datetime import logging import sys import traceback @@ -117,8 +116,6 @@ class LoggingHandler(logging.Handler): continue custom[k] = record.__dict__[k] - date = datetime.datetime.utcfromtimestamp(record.created) - # If there's no exception being processed, # exc_info may be a 3-tuple of None # http://docs.python.org/library/sys.html#sys.exc_info @@ -134,7 +131,6 @@ class LoggingHandler(logging.Handler): stack=stack, custom=custom, exception=exception, - date=date, level=record.levelno, logger_name=record.name, **kwargs
don't set custom date in logging handler anymore (#<I>) support for this has been deprecated. The date/time will be set automatically closes #<I>
elastic_apm-agent-python
train
py
79b314530261c54e8cb6cf0a089ce29ca6181c5e
diff --git a/text_formatter.go b/text_formatter.go index <HASH>..<HASH> 100644 --- a/text_formatter.go +++ b/text_formatter.go @@ -74,7 +74,7 @@ func (f *TextFormatter) Format(entry *Entry) ([]byte, error) { func (f *TextFormatter) AppendKeyValue(serialized []byte, key, value interface{}) []byte { if _, ok := value.(string); ok { - return append(serialized, []byte(fmt.Sprintf("%v='%v' ", key, value))...) + return append(serialized, []byte(fmt.Sprintf("%v=%q ", key, value))...) } else { return append(serialized, []byte(fmt.Sprintf("%v=%v ", key, value))...) }
Switching non-TTY text formatter to use %q instead of '%v' so that the output becomes l2met compatible yey!
sirupsen_logrus
train
go
b4b54b431319d7664c7dde04e9dc2b5004a5c9d6
diff --git a/lib/peek/version.rb b/lib/peek/version.rb index <HASH>..<HASH> 100644 --- a/lib/peek/version.rb +++ b/lib/peek/version.rb @@ -1,3 +1,3 @@ module Peek - VERSION = '0.0.6' + VERSION = '0.1.0' end
Bump the version of peek to <I>
peek_peek
train
rb
cec8833cccb3c2b2580cabcdf8fb244e0a4f2b34
diff --git a/src/helpers/scopeTab.js b/src/helpers/scopeTab.js index <HASH>..<HASH> 100644 --- a/src/helpers/scopeTab.js +++ b/src/helpers/scopeTab.js @@ -9,6 +9,8 @@ export default function scopeTab(node, event) { return; } + let target; + const shiftKey = event.shiftKey; const head = tabbable[0]; const tail = tabbable[tabbable.length - 1]; @@ -20,7 +22,6 @@ export default function scopeTab(node, event) { target = tail; } - var target; if (tail === document.activeElement && !shiftKey) { target = head; } @@ -62,9 +63,11 @@ export default function scopeTab(node, event) { x += shiftKey ? -1 : 1; } + target = tabbable[x]; + // If the tabbable element does not exist, // focus head/tail based on shiftKey - if (typeof tabbable[x] === "undefined") { + if (typeof target === "undefined") { event.preventDefault(); target = shiftKey ? tail : head; target.focus(); @@ -73,5 +76,5 @@ export default function scopeTab(node, event) { event.preventDefault(); - tabbable[x].focus(); + target.focus(); }
fixed: using variable before declaration... not sure if this can cause the variable `target` to go global.
reactjs_react-modal
train
js
4b87290b2ae29de7279a4f68a6286a0571db4c10
diff --git a/anytemplate/utils.py b/anytemplate/utils.py index <HASH>..<HASH> 100644 --- a/anytemplate/utils.py +++ b/anytemplate/utils.py @@ -75,7 +75,8 @@ def chaincalls(callables, obj): 3 """ for fun in callables: - assert callable(fun), "%s is not callable object!" % str(fun) + if not callable(fun): + raise ValueError("Not callable: %r" % repr(fun)) obj = fun(obj) return obj
refactor: raise ValueError instead of AssertionError in .utils.chaincalls
ssato_python-anytemplate
train
py
aba9a5f8a40b36f16f0e2046a9cb84dc0d9c3d19
diff --git a/src/main/java/com/blackducksoftware/integration/hub/HubIntRestService.java b/src/main/java/com/blackducksoftware/integration/hub/HubIntRestService.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/blackducksoftware/integration/hub/HubIntRestService.java +++ b/src/main/java/com/blackducksoftware/integration/hub/HubIntRestService.java @@ -1173,7 +1173,7 @@ public class HubIntRestService { resource.addSegment("api"); resource.addSegment("projects"); resource.addSegment(projectId); - resource.addSegment("version"); + resource.addSegment("versions"); resource.addSegment(versionId); resource.addSegment("policy-status");
IJH-<I> fixing API Url
blackducksoftware_blackduck-common
train
java
623124d6dc9086418c2b09355e0e0022eac3012b
diff --git a/src/main/java/org/cp/elements/lang/Builder.java b/src/main/java/org/cp/elements/lang/Builder.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/cp/elements/lang/Builder.java +++ b/src/main/java/org/cp/elements/lang/Builder.java @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.cp.elements.lang; /** - * {@link Builder} is an interface defining a contract for objects implementing the Builder Software Design Pattern. + * The {@link Builder} interface defines a contract for {@link Object objects} who's {@link Class types} + * implement the {@literal Builder Software Design Pattern}. * * @author John Blum + * @param <T> {@link Class type} of {@link Object} to {@literal build}. * @see java.lang.FunctionalInterface * @see <a href="https://en.wikipedia.org/wiki/Builder_pattern">Builder Software Design Pattern</a> * @since 1.0.0 @@ -29,9 +30,9 @@ package org.cp.elements.lang; public interface Builder<T> { /** - * Builds an object of type {@code T}. + * Builds an {@link Object} of type {@link T}. * - * @return the built object. + * @return the built {@link Object}. */ T build();
Review and refactor the org.cp.elements.lang.Builder interface. Edit Javadoc. Format source code.
codeprimate-software_cp-elements
train
java
b2e274711a9e52de126b7f979ffb1a99a2d95e60
diff --git a/app/models/exit_site_infection.rb b/app/models/exit_site_infection.rb index <HASH>..<HASH> 100644 --- a/app/models/exit_site_infection.rb +++ b/app/models/exit_site_infection.rb @@ -1,28 +1,12 @@ class ExitSiteInfection < ActiveRecord::Base belongs_to :patient - + has_many :medications, as: :treatable has_many :medication_routes, through: :medications has_many :patients, through: :medications, as: :treatable has_many :infection_organisms, as: :infectable has_many :organism_codes, through: :infection_organisms, as: :infectable - - def self.medication_routes - @medication_routes ||= YAML.load_file(Rails.root.join("data", "medication_routes.yml")) - end - - def antibiotic_routes - [].tap do |ary| - (1..3).each do |num| - ary << medication_route(send(:"antibiotic_#{num}_route")) - end - end - end - - def medication_route(id) - self.class.medication_routes.find { |r| r.id == id } - end end
Removed redundant methods for medicationroutes.
airslie_renalware-core
train
rb
bd3bb3a12996183ea2c28e091fcf2d9459b59267
diff --git a/src/main/org/codehaus/groovy/runtime/typehandling/DefaultTypeTransformation.java b/src/main/org/codehaus/groovy/runtime/typehandling/DefaultTypeTransformation.java index <HASH>..<HASH> 100644 --- a/src/main/org/codehaus/groovy/runtime/typehandling/DefaultTypeTransformation.java +++ b/src/main/org/codehaus/groovy/runtime/typehandling/DefaultTypeTransformation.java @@ -158,8 +158,13 @@ public class DefaultTypeTransformation { if (object == null) { return false; } - - // if the object is not null, try to call an asBoolean() method on the object + + // equality check is enough and faster than instanceof check, no need to check superclasses since Boolean is final + if (object.getClass() == Boolean.class) { + return ((Boolean)object).booleanValue(); + } + + // if the object is not null and no Boolean, try to call an asBoolean() method on the object return (Boolean)InvokerHelper.invokeMethod(object, "asBoolean", InvokerHelper.EMPTY_ARGS); }
GROOVY-<I>: add a short path for boolean casts and boolean unboxing if done for a Boolean. This will improve speed in many situations greatly
apache_groovy
train
java
30c4111f39d6afe85237f43e7a97c571fbdf7630
diff --git a/lib/drafter/apply.rb b/lib/drafter/apply.rb index <HASH>..<HASH> 100644 --- a/lib/drafter/apply.rb +++ b/lib/drafter/apply.rb @@ -21,7 +21,7 @@ module Drafter # @return [Draftable] the draftable object populated with the draft attrs. def restore_attrs draftable_columns.each do |key| - self.raw_write_attribute key, self.draft.data[key] + self.send "#{key}=", self.draft.data[key] end self end
Works better for attr assignment on redisplays.
futurechimp_drafter
train
rb
fa99e3873c7554d6e3333efe55dbf59a8cf0a821
diff --git a/core/server/common/src/main/java/alluxio/master/journal/raft/JournalStateMachine.java b/core/server/common/src/main/java/alluxio/master/journal/raft/JournalStateMachine.java index <HASH>..<HASH> 100644 --- a/core/server/common/src/main/java/alluxio/master/journal/raft/JournalStateMachine.java +++ b/core/server/common/src/main/java/alluxio/master/journal/raft/JournalStateMachine.java @@ -198,6 +198,7 @@ public class JournalStateMachine extends BaseStateMachine { resetState(); setLastAppliedTermIndex(snapshot.getTermIndex()); install(snapshotFile); + mSnapshotLastIndex = getLatestSnapshot() != null ? getLatestSnapshot().getIndex() : -1; } catch (Exception e) { throw new IOException(String.format("Failed to load snapshot %s", snapshot), e); }
Fix SnapshotLastIndex update error ### What changes are proposed in this pull request? fix #<I> ### Why are the changes needed? warn information display error ### Does this PR introduce any user facing changes? No pr-link: Alluxio/alluxio#<I> change-id: cid-<I>e<I>c<I>f<I>fdbecd<I>d7b<I>b<I>a
Alluxio_alluxio
train
java
65ba03864e600216dab3f757db4e67d7ccbd2cd4
diff --git a/h2o-algos/src/main/java/hex/tree/SharedTreeModel.java b/h2o-algos/src/main/java/hex/tree/SharedTreeModel.java index <HASH>..<HASH> 100755 --- a/h2o-algos/src/main/java/hex/tree/SharedTreeModel.java +++ b/h2o-algos/src/main/java/hex/tree/SharedTreeModel.java @@ -48,6 +48,7 @@ public abstract class SharedTreeModel<M extends SharedTreeModel<M,P,O>, P extend @Override public double deviance(double w, double y, double f) { + _parms._distribution.p = _parms._tweedie_power; //FIXME PUBDEV-1670: p isn't serialized properly as part of Enum return _parms._distribution.deviance(w, y, f); }
PUBDEV-<I>: Another workaround for lack or proper serialization of fields in Enum.
h2oai_h2o-3
train
java
ed33d102796e5d9d32fe6b222f2bfb06ecff293f
diff --git a/jax/lax/lax_parallel.py b/jax/lax/lax_parallel.py index <HASH>..<HASH> 100644 --- a/jax/lax/lax_parallel.py +++ b/jax/lax/lax_parallel.py @@ -245,6 +245,7 @@ def _ppermute_transpose_rule(t, perm, axis_name): ppermute_p = standard_pmap_primitive('ppermute') ad.deflinear(ppermute_p, _ppermute_transpose_rule) xla.parallel_translations[ppermute_p] = _ppermute_translation_rule +pxla.multi_host_supported_collectives.add(ppermute_p) def _all_to_all_translation_rule(c, x, split_axis, concat_axis, replica_groups):
Add ppermute as an allowed multi-host collective. (#<I>) I manually tested that this works as of <I>e1e. The indices used in ppermute correspond to those returned by `axis_index`.
tensorflow_probability
train
py
0c488a68c50765ee3485697e0be958f0a3f5e7a6
diff --git a/src/Moxl/Xec/Action/Register/Set.php b/src/Moxl/Xec/Action/Register/Set.php index <HASH>..<HASH> 100644 --- a/src/Moxl/Xec/Action/Register/Set.php +++ b/src/Moxl/Xec/Action/Register/Set.php @@ -58,6 +58,11 @@ class Set extends Action $this->deliver(); } + public function error($stanza) + { + $this->deliver(); + } + public function errorConflict($id, $message = false) { $this->pack($message);
Handle all the errors in Register Set
movim_moxl
train
php
312d117f51972fdaaf691100452942c61e163224
diff --git a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go index <HASH>..<HASH> 100644 --- a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go +++ b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go @@ -57,7 +57,7 @@ type Event struct { // RequestURI is the request URI as sent by the client to a server. RequestURI string `json:"requestURI"` // Verb is the kubernetes verb associated with the request. - // For non-resource requests, this is identical to HttpMethod. + // For non-resource requests, this is the lower-cased HTTP method. Verb string `json:"verb"` // Authenticated user information. User authnv1.UserInfo `json:"user"`
Fix doc about Verb for advanced audit feature
kubernetes_kubernetes
train
go
f3d098bb4810ee3c6c209fd040d14180b8cf5ea5
diff --git a/tests/integration/spm/test_repo.py b/tests/integration/spm/test_repo.py index <HASH>..<HASH> 100644 --- a/tests/integration/spm/test_repo.py +++ b/tests/integration/spm/test_repo.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- """ Tests for the spm repo """ -from __future__ import absolute_import, print_function, unicode_literals import os import shutil
Drop Py2 and six on tests/integration/spm/test_repo.py
saltstack_salt
train
py
9868751eab7c11b7c100c169cae71730c7bde7e6
diff --git a/src/flapjack/resources/base.py b/src/flapjack/resources/base.py index <HASH>..<HASH> 100644 --- a/src/flapjack/resources/base.py +++ b/src/flapjack/resources/base.py @@ -406,6 +406,10 @@ class BaseResource(object): # correct mimetype. response.content = self.encoder.encode(data) response['Content-Type'] = self.encoder.mimetype + + if not response.content: + if response.status_code >= 200 and response.status_code <= 299: + response.status_code = 204 # Declare who we are in the `Location` header. # try:
a quick change to make sure we get <I> response codes when no content body sent
armet_python-armet
train
py
2afbca03e3134b3ff81999e08a3be76d5ce99fa6
diff --git a/lib/chefspec/cacher.rb b/lib/chefspec/cacher.rb index <HASH>..<HASH> 100644 --- a/lib/chefspec/cacher.rb +++ b/lib/chefspec/cacher.rb @@ -34,7 +34,7 @@ module ChefSpec FINALIZER = lambda { |id| @@cache.delete(id) } def cached(name, &block) - location = ancestors.first.metadata[:location] + location = ancestors.first.metadata[:location] + '_' + ancestors.first.metadata[:description] location ||= ancestors.first.metadata[:parent_example_group][:location] define_method(name) do
[CHANGE] Use another location definition for caching block
chefspec_chefspec
train
rb
7c2300ed8d8d9ec40a92fc8a4fa9e8cf420fe986
diff --git a/blox/compile.py b/blox/compile.py index <HASH>..<HASH> 100644 --- a/blox/compile.py +++ b/blox/compile.py @@ -47,7 +47,7 @@ def build(factory): def string(html): '''Returns a blox template from an html string''' - return _to_template(fromstring(shpaml.convert_text(html))) + return _to_template(fromstring(shpaml.convert_text(html), parser=parser)) def file(file_object):
Fix the compilation process to use a fresh namespace
timothycrosley_blox
train
py
57472f313829ba794cca4d8e63f26e69a76c3866
diff --git a/nbtlib/schema.py b/nbtlib/schema.py index <HASH>..<HASH> 100644 --- a/nbtlib/schema.py +++ b/nbtlib/schema.py @@ -11,7 +11,7 @@ __all__ = ['schema', 'CompoundSchema'] from itertools import chain -from .tag import Compound +from .tag import Compound, CastError def schema(name, dct, *, strict=False): @@ -76,5 +76,10 @@ class CompoundSchema(Compound): if cls.strict: raise TypeError(f'Invalid key {key!r}') elif not isinstance(value, schema_type): - return schema_type(value) + try: + return schema_type(value) + except CastError: + raise + except Exception as exc: + raise CastError(value, schema_type) from exc return value
Report schema casting errors with `CastError`
vberlier_nbtlib
train
py
2c08a0f7aec74c6d24f1bc86e51cfe016a083ddc
diff --git a/src/AnyContent/Client/Sequence.php b/src/AnyContent/Client/Sequence.php index <HASH>..<HASH> 100755 --- a/src/AnyContent/Client/Sequence.php +++ b/src/AnyContent/Client/Sequence.php @@ -23,17 +23,17 @@ class Sequence implements \Iterator, \Countable $this->dataTypeDefinition = $dataTypeDefinition; /** @var SequenceFormElementDefinition $formElementDefinition */ - $formElementDefinition = false; + $view = false; foreach ($dataTypeDefinition->getViewDefinitions() as $viewDefinition) { if ($viewDefinition->hasProperty($property)) { - $formElementDefinition = $viewDefinition->getFormElementDefinition($property); + $view = true; break; } } - if (!$formElementDefinition) + if ($view == false) { throw new AnyContentClientException('Unexpected error. Could not find form element definition for sequence ' . $property); }
moving getTable and getArrayPropery to abstract record class
nhagemann_anycontent-client-php
train
php
e299907ffee6e522e78f9c29faa019607a69387d
diff --git a/gitlab/__init__.py b/gitlab/__init__.py index <HASH>..<HASH> 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -1285,10 +1285,7 @@ class Gitlab(object): "/repository/commits/" + str(sha1) + "/diff", verify=self.verify_ssl, headers=self.headers) if request.status_code == 200: - # it returns a list of dicts, which is nonsense as we are requesting - # just one diff, so we use the [0] to return only the first and only - # element - return json.loads(request.content.decode("utf-8"))[0] + return json.loads(request.content.decode("utf-8")) else: return False
changing listrepositorycommitdiff to return all commits
pyapi-gitlab_pyapi-gitlab
train
py
1fb61e8326cee3c98a6908086a77912b4962d981
diff --git a/anyconfig/tests/common.py b/anyconfig/tests/common.py index <HASH>..<HASH> 100644 --- a/anyconfig/tests/common.py +++ b/anyconfig/tests/common.py @@ -1,6 +1,7 @@ # # Copyright (C) 2011 - 2015 Satoru SATOH <ssato at redhat.com> # +# pylint: disable=missing-docstring import imp import os.path import sys
disable a pylint check, missing-docstring
ssato_python-anyconfig
train
py
3e548123bddc9609433776c531bd44aa4877401c
diff --git a/src/main/java/net/openhft/chronicle/network/VanillaNetworkContext.java b/src/main/java/net/openhft/chronicle/network/VanillaNetworkContext.java index <HASH>..<HASH> 100755 --- a/src/main/java/net/openhft/chronicle/network/VanillaNetworkContext.java +++ b/src/main/java/net/openhft/chronicle/network/VanillaNetworkContext.java @@ -155,7 +155,7 @@ public class VanillaNetworkContext<T extends VanillaNetworkContext> implements N @Override public long newCid() { - long time = System.currentTimeMillis(); + long time = System.nanoTime(); for (; ; ) { long value = cid.get();
Reduce probability of getting same cid on different NetworkContexts when newCid is called at the same millisecond
OpenHFT_Chronicle-Network
train
java
307dc1b8cd35cca8f37560f0ab320f4277964102
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -74,7 +74,19 @@ export { Image, Line, Path, + largestRect, + lineIntersection, + path2polygon, pointDistance, + pointDistanceSquared, + pointRotate, + polygonInside, + polygonRayCast, + polygonRotate, + segmentBoxContains, + segmentsIntersect, + shapeEdgePoint, + simplify, Rect, Shape } from "d3plus-shape";
exports new geometry functions from d3plus-shape
alexandersimoes_d3plus
train
js
1d8494ce50975f5fb51edc7eb1f62f7890bec039
diff --git a/slack-api-client/src/test/java/test_with_remote_apis/methods/dnd_Test.java b/slack-api-client/src/test/java/test_with_remote_apis/methods/dnd_Test.java index <HASH>..<HASH> 100644 --- a/slack-api-client/src/test/java/test_with_remote_apis/methods/dnd_Test.java +++ b/slack-api-client/src/test/java/test_with_remote_apis/methods/dnd_Test.java @@ -87,10 +87,11 @@ public class dnd_Test { assertThat(response.isOk(), is(false)); } { - DndEndSnoozeResponse response = slack.methods().dndEndSnooze(r -> r - .token(userToken)); - assertThat(response.getError(), is("snooze_not_active")); - assertThat(response.isOk(), is(false)); + DndEndSnoozeResponse response = slack.methods().dndEndSnooze(r -> r.token(userToken)); + // Since Aug 2022, "snooze_not_active" is no longer returned for any cases + // assertThat(response.getError(), is("snooze_not_active")); + // assertThat(response.isOk(), is(false)); + assertThat(response.getError(), is(nullValue())); } {
Run all the integration tests - <I>-<I>-<I> PT
seratch_jslack
train
java
a0d86f4fa6447981fcd10c11ae42c0e873162c5e
diff --git a/test/test_helper.rb b/test/test_helper.rb index <HASH>..<HASH> 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -19,6 +19,11 @@ require 'mocha' require 'active_support/core_ext/hash/indifferent_access' require 'tire' +if ENV['CURB'] + puts "Using 'curb' as the HTTP library" + require 'tire/http/clients/curb' + Tire.configure { client Tire::HTTP::Client::Curb } +end # Require basic model files #
[TEST] Allow using the "curb" HTTP client in tests Use `CURB` environment variable: $ CURB=true ruby -I lib:test test/integration/multi_search_test.rb
karmi_retire
train
rb
884d7601a9664e4dcba10ea44c817a5496487137
diff --git a/lib/sinatra/param/version.rb b/lib/sinatra/param/version.rb index <HASH>..<HASH> 100644 --- a/lib/sinatra/param/version.rb +++ b/lib/sinatra/param/version.rb @@ -1,5 +1,5 @@ module Sinatra module Param - VERSION = '1.2.1' + VERSION = '1.2.2' end end
Bumping version to <I>
mattt_sinatra-param
train
rb
ab137b8300070a0b08944567eb6127407641f56e
diff --git a/lib/active_record/connection_adapters/sqlserver/schema_statements.rb b/lib/active_record/connection_adapters/sqlserver/schema_statements.rb index <HASH>..<HASH> 100644 --- a/lib/active_record/connection_adapters/sqlserver/schema_statements.rb +++ b/lib/active_record/connection_adapters/sqlserver/schema_statements.rb @@ -260,7 +260,7 @@ module ActiveRecord scope = quoted_scope name, type: type table_name = lowercase_schema_reflection_sql 'TABLE_NAME' sql = "SELECT #{table_name}" - sql << ' FROM INFORMATION_SCHEMA.TABLES' + sql << ' FROM INFORMATION_SCHEMA.TABLES WITH (NOLOCK)' sql << ' WHERE TABLE_CATALOG = DB_NAME()' sql << " AND TABLE_SCHEMA = #{quote(scope[:schema])}" sql << " AND TABLE_NAME = #{quote(scope[:name])}" if scope[:name]
added nolock hint to schema_statements
rails-sqlserver_activerecord-sqlserver-adapter
train
rb
d277185686b1b90cb2751576c752da7499ea7101
diff --git a/src/Utils/Comm.php b/src/Utils/Comm.php index <HASH>..<HASH> 100644 --- a/src/Utils/Comm.php +++ b/src/Utils/Comm.php @@ -462,7 +462,7 @@ class Comm if(getenv('AWS_USE_S3')==1){ - $result = $this->send_mail_aws($from, $to, $subject, $message, $message); + $result = $this->send_mail_aws($from, [$to], $subject, $message, $message); $status=(!$this->utils->contains('ERR',$result))?true:false; return $status; }else{
fix send_mail_aws proxy
rozdol_bi
train
php
ac51f9abbdc930e082a1672be4e25c5f7517e5d6
diff --git a/utils/b2d.go b/utils/b2d.go index <HASH>..<HASH> 100644 --- a/utils/b2d.go +++ b/utils/b2d.go @@ -22,7 +22,8 @@ func defaultTimeout(network, addr string) (net.Conn, error) { func getClient() *http.Client { transport := http.Transport{ - Dial: defaultTimeout, + Proxy: http.ProxyFromEnvironment, + Dial: defaultTimeout, } client := http.Client{
respect proxy settings for b2d downloads
docker_machine
train
go
cf4ba01071aa529afe741a728a8aac6f565cece5
diff --git a/JsonSchema.php b/JsonSchema.php index <HASH>..<HASH> 100644 --- a/JsonSchema.php +++ b/JsonSchema.php @@ -66,11 +66,11 @@ class JsonSchema { } static function incrementPath($path,$i) { - if($path) { + if($path !== '') { if(is_int($i)) { $path .= '['.$i.']'; } - elseif($i = '') { + elseif($i == '') { $path .= ''; } else {
minor bug, was showing wrong paths git-svn-id: <URL>
justinrainbow_json-schema
train
php
dc21b9cdbdeb789532cb8a304d0d54c2f1ea15eb
diff --git a/Tests/Form/Type/ColorSelectorTypeTest.php b/Tests/Form/Type/ColorSelectorTypeTest.php index <HASH>..<HASH> 100644 --- a/Tests/Form/Type/ColorSelectorTypeTest.php +++ b/Tests/Form/Type/ColorSelectorTypeTest.php @@ -18,6 +18,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class ColorSelectorTypeTest extends TypeTestCase { + /** + * @group legacy + */ public function testBuildForm() { // NEXT_MAJOR: Hack for php 5.3 only, remove it when requirement of PHP is >= 5.4
Add test for deprecated type in legacy group
sonata-project_SonataCoreBundle
train
php
eed811d457e491a5c287ee11bf24a1b2bb1624ae
diff --git a/themes/webtrees/footer.php b/themes/webtrees/footer.php index <HASH>..<HASH> 100644 --- a/themes/webtrees/footer.php +++ b/themes/webtrees/footer.php @@ -50,7 +50,7 @@ echo '<div id="footer" class="', $TEXT_DIRECTION, '">'; } if (exists_pending_change()) { echo '<br />'; - echo i18n::translate('Changes have been made to this GEDCOM.'); + echo i18n::translate('Changes have been made to this GEDCOM. '); echo '<a href="javascript:;" onclick="window.open(\'edit_changes.php\', \'_blank\', \'width=600, height=500, resizable=1, scrollbars=1\'); return false;">'; echo i18n::translate('Accept / Reject Changes'); echo '</a>';
Add space between "Changes have been made" and "Accept/Reject" phrases
fisharebest_webtrees
train
php
065730f69e8212fd334d8e63505f561c89655697
diff --git a/blueflood-core/src/main/java/com/rackspacecloud/blueflood/io/AstyanaxReader.java b/blueflood-core/src/main/java/com/rackspacecloud/blueflood/io/AstyanaxReader.java index <HASH>..<HASH> 100644 --- a/blueflood-core/src/main/java/com/rackspacecloud/blueflood/io/AstyanaxReader.java +++ b/blueflood-core/src/main/java/com/rackspacecloud/blueflood/io/AstyanaxReader.java @@ -76,7 +76,7 @@ public class AstyanaxReader extends AstyanaxIO { } }}; } catch (NotFoundException ex) { - return null; + return new HashMap<String, Object>(0); } catch (ConnectionException e) { log.error("Error reading metadata value", e); Instrumentation.markReadError(e);
handle notfound better rather than resulting in NPE
rackerlabs_blueflood
train
java
95d15655cddd6e82753eb498d2928b0681b39bd8
diff --git a/azurerm/internal/services/datashare/data_share_account_data_source.go b/azurerm/internal/services/datashare/data_share_account_data_source.go index <HASH>..<HASH> 100644 --- a/azurerm/internal/services/datashare/data_share_account_data_source.go +++ b/azurerm/internal/services/datashare/data_share_account_data_source.go @@ -2,7 +2,6 @@ package datashare import ( "fmt" - "log" "time" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" @@ -68,9 +67,7 @@ func dataSourceArmDataShareAccountRead(d *schema.ResourceData, meta interface{}) resp, err := client.Get(ctx, resourceGroup, name) if err != nil { if utils.ResponseWasNotFound(resp.Response) { - log.Printf("[INFO] DataShare %q does not exist - removing from state", d.Id()) - d.SetId("") - return nil + return fmt.Errorf("DataShare Account %q does not exist in Resource Group %q", name, resourceGroup) } return fmt.Errorf("retrieving DataShare Account %q (Resource Group %q): %+v", name, resourceGroup, err) }
d/data_share_account: raising an error when not found
terraform-providers_terraform-provider-azurerm
train
go
207c051c74422a584e8cd8a196e3da6aa3535232
diff --git a/python/dllib/test/bigdl/test_dl_classifier.py b/python/dllib/test/bigdl/test_dl_classifier.py index <HASH>..<HASH> 100644 --- a/python/dllib/test/bigdl/test_dl_classifier.py +++ b/python/dllib/test/bigdl/test_dl_classifier.py @@ -133,8 +133,8 @@ class TestDLClassifer(): data = results.rdd.collect() for i in range(count): - row_label = data[i]['label'] - row_prediction = data[i]['prediction'] + row_label = data[i][1] + row_prediction = data[i][2] assert_allclose(row_label[0], row_prediction[0], atol=0, rtol=1e-1) assert_allclose(row_label[1], row_prediction[1], atol=0, rtol=1e-1) @@ -162,8 +162,8 @@ class TestDLClassifer(): data = results.rdd.collect() for i in range(count): - row_label = data[i]['label'] - row_prediction = data[i]['prediction'] + row_label = data[i][1] + row_prediction = data[i][2] assert row_label == row_prediction if __name__ == "__main__":
update unittest for dl_classifier (#<I>) solution explanation: dataframe <I> in spark-<I>x does not support accessing column by its name so we access it by index number.
intel-analytics_BigDL
train
py
91ea7046204ea5bc9096893d83f43f89d901a3e1
diff --git a/test/sorcerer/resource_test.rb b/test/sorcerer/resource_test.rb index <HASH>..<HASH> 100644 --- a/test/sorcerer/resource_test.rb +++ b/test/sorcerer/resource_test.rb @@ -68,12 +68,20 @@ class SourcerTest < Test::Unit::TestCase gsub(/#/,' ') + "\n" end + def quietly + original_verbosity = $VERBOSE + $VERBOSE = nil + yield + ensure + $VERBOSE = original_verbosity + end + def source(string, options={}) if options[:debug] puts puts "***************************** options: #{options.inspect}" end - sexp = Ripper::SexpBuilder.new(string).parse + sexp = quietly { Ripper::SexpBuilder.new(string).parse } fail "Failed to parts '#{string}'" if sexp.nil? Sorcerer.source(sexp, options) end @@ -623,7 +631,7 @@ class SourcerTest < Test::Unit::TestCase end def test_can_use_ripper_sexp_output - sexp = Ripper.sexp("a = 1") + sexp = quietly { Ripper.sexp("a = 1") } assert_equal "a = 1", Sorcerer.source(sexp) end
Silence Ripper parsing warnings on test source.
jimweirich_sorcerer
train
rb
8b7d82d46fd5b9db0b4938573a555909ea301ded
diff --git a/test/launch.js b/test/launch.js index <HASH>..<HASH> 100644 --- a/test/launch.js +++ b/test/launch.js @@ -111,11 +111,10 @@ describe("nearleyc", function() { .should.deep.equal([["setVar:to:","foo",["*",["*",2,["computeFunction:of:","e ^",["+",["*",["readVariable","foo"],-0.05],0.5]]],["-",1,["computeFunction:of:","e ^",["+",["*",["readVariable","foo"],-0.05],0.5]]]]]]); }); - var classicCrontab; - it('classic crontab compiles', function() { - classicCrontab = nearleyc("examples/classic_crontab.ne"); - }); - it('classic crontab example', function() { + it('classic crontab', function() { + // Try compiling the grammar + var classicCrontab = nearleyc("examples/classic_crontab.ne"); + // Try parsing crontab file using the newly generated parser var crontabTest = fs.readFileSync('test/classic_crontab.test', 'utf-8'); var crontabResults = fs.readFileSync('test/classic_crontab.results', 'utf-8'); parse(classicCrontab, crontabTest).should.deep.equal([JSON.parse(crontabResults)]);
Condensed classic crontab test
kach_nearley
train
js
d802b984fc8069801dd98e1d009dac249ab359d9
diff --git a/src/resources/views/character/includes/summary.blade.php b/src/resources/views/character/includes/summary.blade.php index <HASH>..<HASH> 100644 --- a/src/resources/views/character/includes/summary.blade.php +++ b/src/resources/views/character/includes/summary.blade.php @@ -75,6 +75,9 @@ @endif </dd> + <dt>{{ trans('web::seat.last_update') }}</dt> + <dd>{{ $summary->updated_at }}</dd> + <dt></dt> </dl> </div> diff --git a/src/resources/views/corporation/includes/summary.blade.php b/src/resources/views/corporation/includes/summary.blade.php index <HASH>..<HASH> 100644 --- a/src/resources/views/corporation/includes/summary.blade.php +++ b/src/resources/views/corporation/includes/summary.blade.php @@ -53,6 +53,9 @@ {{ $sheet->memberCount }} / {{ $sheet->memberLimit }} </dd> + <dt>{{ trans('web::seat.last_update') }}</dt> + <dd>{{ $sheet->updated_at }}</dd> + <dt></dt> </dl> </div>
add updated_at timestamps to Character and Corporation Sheet summary
eveseat_web
train
php,php
969c875c655b5ef929d4774ff7f152e0a3e0ee2e
diff --git a/core/util/findExecutable.js b/core/util/findExecutable.js index <HASH>..<HASH> 100644 --- a/core/util/findExecutable.js +++ b/core/util/findExecutable.js @@ -1,9 +1,17 @@ var path = require('path'); module.exports = function(module, bin) { + + if (module === 'phantomjs-prebuilt') { + return require('phantomjs-prebuilt').path; + } + + // get the absolute path for package.json of a node_module var packageJSON = require.resolve(path.join(module, 'package.json')); + // then get the executable name var relativeBinary = require(packageJSON).bin[bin]; + // return a path to the executable inside the execuatable's package return path.join(packageJSON.replace('package.json', ''), relativeBinary); };
findExecutable now makes exception for phantom
garris_BackstopJS
train
js
5d9621ce5884026753d8c7ec39f4154d74ba5be1
diff --git a/tests/I18n/I18nTest.php b/tests/I18n/I18nTest.php index <HASH>..<HASH> 100644 --- a/tests/I18n/I18nTest.php +++ b/tests/I18n/I18nTest.php @@ -60,6 +60,7 @@ class I18nTest extends TestCase $this->assertSame('hello world', $i18n->getText('世界你好')); $this->assertSame('foo ye', $i18n->__('胡巴 %s', 'ye')); + $this->assertSame('', $i18n->getText()); } public function testAll()
I<I>n component <I>% unit tests coverage
hunzhiwange_framework
train
php
601a6fae1b188aeb3e21fb3d851201ec0236a037
diff --git a/Components/Queues/Drivers/StompQueueDriver.php b/Components/Queues/Drivers/StompQueueDriver.php index <HASH>..<HASH> 100644 --- a/Components/Queues/Drivers/StompQueueDriver.php +++ b/Components/Queues/Drivers/StompQueueDriver.php @@ -188,9 +188,9 @@ class StompQueueDriver extends Service implements SyncQueueDriverInterface /** * @param int $seconds */ - public function setReadTimeout(int $seconds) + public function setReadTimeout(int $readTimeout) { - $this->readTimeout = $seconds; + $this->readTimeout = $readTimeout; } /**
Applying changes related to scrutinizer review changes
smartboxgroup_integration-framework-bundle
train
php