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
9ec80377db6c44a1f403a221970d7601e3a20fec
diff --git a/TYPO3.Flow/Classes/MVC/F3_FLOW3_MVC_Request.php b/TYPO3.Flow/Classes/MVC/F3_FLOW3_MVC_Request.php index <HASH>..<HASH> 100644 --- a/TYPO3.Flow/Classes/MVC/F3_FLOW3_MVC_Request.php +++ b/TYPO3.Flow/Classes/MVC/F3_FLOW3_MVC_Request.php @@ -234,7 +234,7 @@ class F3_FLOW3_MVC_Request { */ public function setControllerActionName($actionName) { if (!is_string($actionName)) throw new F3_FLOW3_MVC_Exception_InvalidActionName('The action name must be a valid string, ' . gettype($actionName) . ' given (' . $actionName . ').', 1187176358); - if ($actionName{0} !== F3_PHP6_Functions::strtolower($actionName{0})) throw new F3_FLOW3_MVC_Exception_InvalidActionName('The action name must start with a lower case letter, "' . gettype($actionName) . '" does not match this criteria.', 1218473352); + if ($actionName{0} !== F3_PHP6_Functions::strtolower($actionName{0})) throw new F3_FLOW3_MVC_Exception_InvalidActionName('The action name must start with a lower case letter, "' . $actionName . '" does not match this criteria.', 1218473352); $this->controllerActionName = $actionName; }
FLOW3: Fixed wrong output in case of exception #<I>. Original-Commit-Hash: a<I>adc5d<I>f<I>c<I>a<I>bf<I>a0cfd<I>b1
neos_flow-development-collection
train
php
b2043ff7151e998e1cf62e892a6f62e821b18eb9
diff --git a/lib/mongo_mapper/plugins/embedded_callbacks.rb b/lib/mongo_mapper/plugins/embedded_callbacks.rb index <HASH>..<HASH> 100644 --- a/lib/mongo_mapper/plugins/embedded_callbacks.rb +++ b/lib/mongo_mapper/plugins/embedded_callbacks.rb @@ -33,3 +33,9 @@ module MongoMapper end end end + +ActiveModel::Validations::Callbacks.class_eval do + def run_validations! + run_callbacks(:validation) { super } + end +end
duck punch ActiveModel::Validations::Callbacks to get embedded callback specs passing
mongomapper_mongomapper
train
rb
c82639fa5cb9736050e3ef766ddc8af164ade269
diff --git a/src/Utils/CustomFieldIndexService.php b/src/Utils/CustomFieldIndexService.php index <HASH>..<HASH> 100644 --- a/src/Utils/CustomFieldIndexService.php +++ b/src/Utils/CustomFieldIndexService.php @@ -42,9 +42,6 @@ class CustomFieldIndexService if (array_key_exists($fieldGetter, $fieldConfig) && $fieldConfig[$fieldGetter]['type'] == 'FOS\CKEditorBundle\Form\Type\CKEditorType') { $raw = true; } - if (is_object($value) && $value instanceof \DateTimeInterface) { - $value = $value->format('d.m.Y'); - } $indexRows[] = array( 'value' => $value, 'raw' => $raw,
[CustomFieldIndexService] return dates as object, frontend handles this
EmchBerger_cube-custom-fields-bundle
train
php
bfb6897c558dfdccff7ac5fc377b08e806525be3
diff --git a/build/release.js b/build/release.js index <HASH>..<HASH> 100644 --- a/build/release.js +++ b/build/release.js @@ -86,6 +86,5 @@ module.exports.dependencies = [ "archiver@1.3.0", "shelljs@0.7.7", "inquirer@7.0.4", - "npm@4.4.1", - "chalk@1.1.3" + "npm@4.4.1" ];
Release: Remove an unused chalk dependency Chalk was used for a Sizzle version check that's no longer there on `master`. Closes gh-<I>
jquery_jquery
train
js
b77177ed74f3e54fc20583faea888d2e844ea09c
diff --git a/src/ol/format/IIIFInfo.js b/src/ol/format/IIIFInfo.js index <HASH>..<HASH> 100644 --- a/src/ol/format/IIIFInfo.js +++ b/src/ol/format/IIIFInfo.js @@ -2,6 +2,8 @@ * @module ol/format/IIIFInfo */ +import {assert} from '../asserts.js'; + /** * Supported image formats, qualities and supported region / size calculation features * for different image API versions and compliance levels diff --git a/src/ol/source/IIIF.js b/src/ol/source/IIIF.js index <HASH>..<HASH> 100644 --- a/src/ol/source/IIIF.js +++ b/src/ol/source/IIIF.js @@ -238,8 +238,8 @@ class IIIF extends TileImage { tileClass: IiifTileClass, tileGrid: tileGrid, tilePixelRatio: options.tilePixelRatio, - tileUrlFunction: tileUrlFunction - transition: options.transition, + tileUrlFunction: tileUrlFunction, + transition: options.transition }); }
Fix errors in IIIF code - missing import in IIIFInfo - syntax errors in IIIF
openlayers_openlayers
train
js,js
3f08115c8218ff55f5c58e745c10c0743979bd9f
diff --git a/src/Autowhatever.js b/src/Autowhatever.js index <HASH>..<HASH> 100644 --- a/src/Autowhatever.js +++ b/src/Autowhatever.js @@ -133,6 +133,15 @@ export default class Autowhatever extends Component { if (input !== null) { this.input = input; } + + const userRef = this.props.inputProps.ref; + if (userRef) { + if (typeof userRef === 'function') { + userRef(input); + } else if (typeof userRef === 'object' && userRef.hasOwnProperty('current')) { + userRef.current = input; + } + } }; storeItemsContainerReference = itemsContainer => {
Let user pass it's own ref to input
moroshko_react-autowhatever
train
js
9899fcb4ca1c9b469f5a16c16b13bbeda3039529
diff --git a/rabbithole_test.go b/rabbithole_test.go index <HASH>..<HASH> 100644 --- a/rabbithole_test.go +++ b/rabbithole_test.go @@ -75,7 +75,7 @@ func listConnectionsUntil(c *Client, i int) { } func awaitEventPropagation() { - time.Sleep(1150 * time.Millisecond) + time.Sleep(5000 * time.Millisecond) } type portTestStruct struct {
bumps up the sleep time to <I> millis
michaelklishin_rabbit-hole
train
go
b020ca8d233311ad1b7cf359b72093975284d9ee
diff --git a/src/main/java/org/dasein/cloud/google/network/LoadBalancerSupport.java b/src/main/java/org/dasein/cloud/google/network/LoadBalancerSupport.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/dasein/cloud/google/network/LoadBalancerSupport.java +++ b/src/main/java/org/dasein/cloud/google/network/LoadBalancerSupport.java @@ -824,10 +824,11 @@ public class LoadBalancerSupport extends AbstractLoadBalancerSupport<Google> { List<String> instances = tp.getInstances(); for (String i : instances) - for (String serverToRemove : serverIdsToRemove) - if (i.endsWith(serverToRemove)) + for (String serverToRemove : serverIdsToRemove) { + String serverVmNameToRemove = provider.getComputeServices().getVirtualMachineSupport().getVmNameFromId(serverToRemove); + if (i.endsWith(serverVmNameToRemove)) replacementInstances.add(new InstanceReference().setInstance(i)); - + } TargetPoolsRemoveInstanceRequest content = new TargetPoolsRemoveInstanceRequest(); content.setInstances(replacementInstances); gce.targetPools().removeInstance(ctx.getAccountNumber(), ctx.getRegionId(), fromLoadBalancerId, content).execute();
FB <I> converted vmId to vmName for the removal operation.
dasein-cloud_dasein-cloud-google
train
java
665e7244899262acd2333b1afcb9f277672cb60b
diff --git a/lib/navigation/organization.rb b/lib/navigation/organization.rb index <HASH>..<HASH> 100644 --- a/lib/navigation/organization.rb +++ b/lib/navigation/organization.rb @@ -47,8 +47,8 @@ module Navigation def organization_navigation [ - { :key => :general, - :name =>N_("General"), + { :key => :details, + :name =>N_("Details"), :url => lambda{edit_organization_path(@organization.cp_key)}, :if => lambda{@organization}, :options => {:class=>"navigation_element"} @@ -62,4 +62,4 @@ module Navigation ] end end -end \ No newline at end of file +end
Changes organizations tupane subnavigation to be consistent with others.
Katello_katello
train
rb
2c4bdf59b695f2660fab67435e1aa0384e61bbad
diff --git a/org.afplib/src/main/java/org/afplib/io/AfpInputStream.java b/org.afplib/src/main/java/org/afplib/io/AfpInputStream.java index <HASH>..<HASH> 100644 --- a/org.afplib/src/main/java/org/afplib/io/AfpInputStream.java +++ b/org.afplib/src/main/java/org/afplib/io/AfpInputStream.java @@ -159,6 +159,7 @@ public class AfpInputStream extends FilterInputStream { if(offset + len <= header.length) return len; int res = super.read(b, off + bytesToReadFromHeaderBuffer, len - bytesToReadFromHeaderBuffer); + header = null; return res + bytesToReadFromHeaderBuffer; } header = null;
bugfix for positioning to first SF
yan74_afplib
train
java
51cc3a091a0ea5a1b9c3949db820589a1944f42a
diff --git a/test/playbacks/hls_spec.js b/test/playbacks/hls_spec.js index <HASH>..<HASH> 100644 --- a/test/playbacks/hls_spec.js +++ b/test/playbacks/hls_spec.js @@ -1,4 +1,6 @@ +import Events from 'base/events.js' import HLS from 'playbacks/hls' +import HLSJS from 'hls.js' describe('HLS playback', () => { // Disabled due to missing support for Firefox on Linux - breaks travis build @@ -66,6 +68,17 @@ describe('HLS playback', () => { }) }) + it('should trigger a playback error if source load failed', function(done) { + let options = {src: 'http://dns.will.fail/notfound.m3u8'} + const playback = new HLS(options) + playback.on(Events.PLAYBACK_ERROR, (e) => { + expect(e.data.type).to.be.equal(HLSJS.ErrorTypes.NETWORK_ERROR) + expect(e.data.details).to.be.equal(HLSJS.ErrorDetails.MANIFEST_LOAD_ERROR) + done() + }) + playback.play() + }) + xit('levels', function() { let playback beforeEach(() => {
Add hls playback network error test.
clappr_clappr
train
js
e0f4e0c688a713132fa2c72e1dd307a173b7a8c8
diff --git a/SwatDB/SwatDBRecordsetWrapper.php b/SwatDB/SwatDBRecordsetWrapper.php index <HASH>..<HASH> 100644 --- a/SwatDB/SwatDBRecordsetWrapper.php +++ b/SwatDB/SwatDBRecordsetWrapper.php @@ -23,8 +23,7 @@ require_once 'Swat/exceptions/SwatInvalidTypeException.php'; * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 */ abstract class SwatDBRecordsetWrapper extends SwatObject - implements Iterator, Serializable, Countable, SwatDBRecordable, - SwatTableModel + implements Serializable, SwatTableModel, SwatDBRecordable, { // {{{ protected properties
SwatTableModel already extends Iteratable and Countable. svn commit r<I>
silverorange_swat
train
php
ca4c0511d47feefd0ece41c862d7b501362732d2
diff --git a/src/CupOfTea/TwoStream/TwoStreamServiceProvider.php b/src/CupOfTea/TwoStream/TwoStreamServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/CupOfTea/TwoStream/TwoStreamServiceProvider.php +++ b/src/CupOfTea/TwoStream/TwoStreamServiceProvider.php @@ -47,12 +47,12 @@ class TwoStreamServiceProvider extends ServiceProvider { __DIR__.'/../../config/twostream.php', 'twostream' ); - $this->app->singleton( - 'CupOfTea\TwoStream\Contracts\Ws\Kernel', - $this->getAppNamespace() . 'Ws\Kernel' - ); - - $kernel = $this->app->make('CupOfTea\TwoStream\Contracts\Ws\Kernel'); +// $this->app->singleton( +// 'CupOfTea\TwoStream\Contracts\Ws\Kernel', +// $this->getAppNamespace() . 'Ws\Kernel' +// ); +// +// $kernel = $this->app->make('CupOfTea\TwoStream\Contracts\Ws\Kernel'); $this->app->bindShared('CupOfTea\TwoStream\Contracts\Factory', function($app) {
Don't load Ws Kernel yet, so other parts can be tested before this is built
CupOfTea696_TwoStream
train
php
3a4ff63b312aa6a86853288ce9eff2e1e63454cf
diff --git a/lib/adminlib.php b/lib/adminlib.php index <HASH>..<HASH> 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -4829,13 +4829,7 @@ EOT; * @param $msg string the message needed to be shown */ function update_full($percent, $msg){ - if ($percent >= 100){ - $percent = 1; - } - if ($percent <= 0) - { - $percent = 0; - } + $percent = max(min($percent, 100), 0); $this->_update($percent/100, $msg); } /** @@ -4846,14 +4840,12 @@ EOT; * @param $msg string message */ function update($cur, $total, $msg){ + $cur = max($cur, 0); if ($cur >= $total){ $percent = 1; + } else { + $percent = $cur / $total; } - if ($cur <= 0) - { - $percent = 0; - } - $percent = $cur / $total; $es = $this->estimate(microtime(true), $percent); $this->_update($percent, $msg, $es); }
"MDL-<I>, see tracker"
moodle_moodle
train
php
8bfe8df594d01fef4a8b7d0e4123ac07b9cb07e9
diff --git a/bw-util-calendar/src/main/java/org/bedework/util/calendar/JsonCalendarBuilder.java b/bw-util-calendar/src/main/java/org/bedework/util/calendar/JsonCalendarBuilder.java index <HASH>..<HASH> 100644 --- a/bw-util-calendar/src/main/java/org/bedework/util/calendar/JsonCalendarBuilder.java +++ b/bw-util-calendar/src/main/java/org/bedework/util/calendar/JsonCalendarBuilder.java @@ -391,7 +391,7 @@ public class JsonCalendarBuilder { } if (type.equals("date") || - type.equals("dateTime") || + type.equals("date-time") || type.equals("time")) { bs.getContentHandler().propertyValue( XcalUtil.getIcalFormatDateTime(textField(parser)));
Handle jcal freebusy requests
Bedework_bw-util
train
java
02edafcaf451b01675f9548dd3debf8b98131249
diff --git a/src/js/utils.js b/src/js/utils.js index <HASH>..<HASH> 100644 --- a/src/js/utils.js +++ b/src/js/utils.js @@ -50,10 +50,8 @@ var utils = { map: $.map, filter: function(obj, test) { - var results = []; - - $.each(obj, function(key, val) { - if (test(val, key, obj)) { results.push(val); } + var results = $.grep(obj, function(val, key) { + return test(val, key, obj); }); return results;
rewrote utils.filter to use $.grep
twitter_typeahead.js
train
js
9e603ec412d7b3e24b5772e68b070573fb7b45f3
diff --git a/ibm_s3transfer/__init__.py b/ibm_s3transfer/__init__.py index <HASH>..<HASH> 100755 --- a/ibm_s3transfer/__init__.py +++ b/ibm_s3transfer/__init__.py @@ -143,7 +143,7 @@ from ibm_s3transfer.exceptions import RetriesExceededError, S3UploadFailedError __author__ = 'IBM' -__version__ = '2.3.0' +__version__ = '2.3.1.dev1' class NullHandler(logging.Handler):
Update version to <I>.dev1
IBM_ibm-cos-sdk-python-s3transfer
train
py
9ff607e5f3a0fe8c41e94205444af79880b492dc
diff --git a/commerce-checkout-web/src/main/java/com/liferay/commerce/checkout/web/internal/portlet/action/ActionHelper.java b/commerce-checkout-web/src/main/java/com/liferay/commerce/checkout/web/internal/portlet/action/ActionHelper.java index <HASH>..<HASH> 100644 --- a/commerce-checkout-web/src/main/java/com/liferay/commerce/checkout/web/internal/portlet/action/ActionHelper.java +++ b/commerce-checkout-web/src/main/java/com/liferay/commerce/checkout/web/internal/portlet/action/ActionHelper.java @@ -58,16 +58,9 @@ public class ActionHelper { return; } - String redirect = null; - if (Validator.isUrl(output)) { - redirect = output; - } - else { - redirect = ParamUtil.getString(serviceContext, "redirect"); + actionRequest.setAttribute(WebKeys.REDIRECT, output); } - - actionRequest.setAttribute(WebKeys.REDIRECT, redirect); } @Reference
COMMERCE-<I> Fix Redirect when no payment method selected
liferay_com-liferay-commerce
train
java
76dadc8a1c81d7610ef73df523639ee30c0911d4
diff --git a/src/FilterFactory.php b/src/FilterFactory.php index <HASH>..<HASH> 100644 --- a/src/FilterFactory.php +++ b/src/FilterFactory.php @@ -116,7 +116,6 @@ class FilterFactory 'locale' => function () { return new Validate\Locale(); }, 'max' => function () { return new Validate\Max(); }, 'min' => function () { return new Validate\Min(); }, - 'now' => function () { return new Validate\Now(); }, 'regex' => function () { return new Validate\Regex(); }, 'strictEqualToField' => function () { return new Validate\StrictEqualToField(); }, 'strictEqualToValue' => function () { return new Validate\StrictEqualToValue(); }, @@ -167,6 +166,7 @@ class FilterFactory 'isbn' => function () { return new Sanitize\Isbn(); }, 'max' => function () { return new Sanitize\Max(); }, 'min' => function () { return new Sanitize\Min(); }, + 'now' => function () { return new Sanitize\Now(); }, 'regex' => function () { return new Sanitize\Regex(); }, 'remove' => function () { return new Sanitize\Remove(); }, 'strictEqualToField' => function () { return new Sanitize\StrictEqualToField(); },
factory for 'now' is sanitize, not validate. fixes #<I>
auraphp_Aura.Filter
train
php
656de3fac283129b9ee5a4d2927be6dafa375490
diff --git a/lxd/migrate_instance.go b/lxd/migrate_instance.go index <HASH>..<HASH> 100644 --- a/lxd/migrate_instance.go +++ b/lxd/migrate_instance.go @@ -872,10 +872,10 @@ func (c *migrationSink) Do(state *state.State, migrateOp *operations.Operation) volTargetArgs := migration.VolumeTargetArgs{ Name: args.Instance.Name(), MigrationType: respTypes[0], - Refresh: args.Refresh, // Indicate to receiver volume should exist. - TrackProgress: false, // Do not use a progress tracker on receiver. - Live: args.Live, // Indicates we will get a final rootfs sync. - VolumeSize: args.VolumeSize, + Refresh: args.Refresh, // Indicate to receiver volume should exist. + TrackProgress: false, // Do not use a progress tracker on receiver. + Live: args.Live, // Indicates we will get a final rootfs sync. + VolumeSize: args.VolumeSize, // Block size setting override. } // At this point we have already figured out the parent container's root @@ -1045,7 +1045,7 @@ func (c *migrationSink) Do(state *state.State, migrateOp *operations.Operation) Refresh: c.refresh, RsyncFeatures: rsyncFeatures, Snapshots: snapshots, - VolumeSize: offerHeader.GetVolumeSize(), + VolumeSize: offerHeader.GetVolumeSize(), // Block size setting override. } err = myTarget(fsConn, migrateOp, args)
lxd/migrate/instance: Improves comments when instantiating migration.VolumeTargetArgs
lxc_lxd
train
go
28dc6d107db2c18780059287e4a5215eae1b4f95
diff --git a/lib/health-data-standards/import/cat1/procedure_order_importer.rb b/lib/health-data-standards/import/cat1/procedure_order_importer.rb index <HASH>..<HASH> 100644 --- a/lib/health-data-standards/import/cat1/procedure_order_importer.rb +++ b/lib/health-data-standards/import/cat1/procedure_order_importer.rb @@ -6,7 +6,7 @@ module HealthDataStandards super(entry_finder) @entry_class = Procedure end - + def create_entry(entry_element, nrh = CDA::NarrativeReferenceHandler.new) procedure = super procedure.status_code = {'HL7 ActStatus' => ['ordered']} @@ -20,7 +20,7 @@ module HealthDataStandards def extract_dates(parent_element, entry, element_name="author") if parent_element.at_xpath("cda:#{element_name}/cda:time/@value") - entry.start_time = HL7Helper.timestamp_to_integer(parent_element.at_xpath("cda:#{element_name}/cda:time")['value']) + entry.time = HL7Helper.timestamp_to_integer(parent_element.at_xpath("cda:#{element_name}/cda:time")['value']) end end
import entry.time (not entry.start_time) for procedure orders
projectcypress_health-data-standards
train
rb
a734e4ef44fd2f9460c528b6afcc5aad2ab5cd0e
diff --git a/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java b/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java index <HASH>..<HASH> 100755 --- a/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/VanillaChronicleMap.java @@ -1421,7 +1421,6 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super KI>, */ static final long LOCK_OFFSET = 0L; // 64-bit static final long SIZE_OFFSET = LOCK_OFFSET + 8L; // 32-bit - ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); final NativeBytes segmentHeader; final NativeBytes bytes; final long entriesOffset;
Removed unused lock field from VanillaChronicleMap.Segment
OpenHFT_Chronicle-Map
train
java
8b91cf8b1a41035d0b165a89b026e23366ec536e
diff --git a/lib/poolparty/net/remoter.rb b/lib/poolparty/net/remoter.rb index <HASH>..<HASH> 100644 --- a/lib/poolparty/net/remoter.rb +++ b/lib/poolparty/net/remoter.rb @@ -218,7 +218,7 @@ module PoolParty vputs "Provisioning master..." hide_output { Provisioner.provision_master(self, testing) } PoolParty::Provisioner.clear_master_ssl_certs(self) - PoolParty::Provisioner.reconfigure_master(self, testing) + PoolParty::Provisioner.provision_master(self, testing) after_launched end end
Updated quick launch_and_configure_master rephrasing to provision, instead of configure
auser_poolparty
train
rb
11a05d827d73e0adc65619e5a9f2c103ef39da31
diff --git a/src/core.js b/src/core.js index <HASH>..<HASH> 100755 --- a/src/core.js +++ b/src/core.js @@ -638,7 +638,7 @@ var me = me || {}; * @return {Number} clamped value */ Number.prototype.clamp = function(low, high) { - return this < low ? low : this > high ? high : this; + return this < low ? low : this > high ? high : +this; }; /**
Number.clamp should return the number value, not the Number object.
melonjs_melonJS
train
js
8e0506d2e3cf9486914ab7b0391ca9604d7f4c88
diff --git a/src/TigerView.php b/src/TigerView.php index <HASH>..<HASH> 100644 --- a/src/TigerView.php +++ b/src/TigerView.php @@ -54,7 +54,17 @@ class TigerView extends View public function addJS($js) { - $this->_js[] = $js; + $filename = basename($js); + $data = file_get_contents(TigerApp::AppRoot() . "/" . $js); + $id = md5($filename); + $publicLocation = "cache/{$id}.js"; + $publicLocationOnDisk = TigerApp::AppRoot() . "/public/" . $publicLocation; + if (!file_exists(dirname($publicLocationOnDisk))) { + mkdir(dirname($publicLocationOnDisk), 0777, true); + } + file_put_contents($publicLocationOnDisk, $data); + chmod($publicLocationOnDisk, 0664); + $this->_js[] = $publicLocation; return $this; }
Implemented addJS to use cache. Without this scripts currently aren't copied into the cache and are not served to the user. It tries to serve then right out of the asset folder.
Thruio_TigerKit
train
php
802ed253c6fa82bb6c3aaeb0382aac5f7d6b193c
diff --git a/zhaquirks/philips/rwl021.py b/zhaquirks/philips/rwl021.py index <HASH>..<HASH> 100644 --- a/zhaquirks/philips/rwl021.py +++ b/zhaquirks/philips/rwl021.py @@ -114,7 +114,7 @@ class PhilipsRWL021(CustomDevice): device_automation_triggers = { (SHORT_PRESS, TURN_ON): {COMMAND: COMMAND_ON}, - (LONG_PRESS, TURN_OFF): {COMMAND: COMMAND_OFF_WITH_EFFECT}, + (SHORT_PRESS, TURN_OFF): {COMMAND: COMMAND_OFF_WITH_EFFECT}, (SHORT_PRESS, DIM_UP): { COMMAND: COMMAND_STEP, CLUSTER_ID: 8,
fix phillips remote device trigger key (#<I>)
dmulcahey_zha-device-handlers
train
py
8c30a81573c6c34584f8f2800e6a623bc0e6be94
diff --git a/packages/components/bolt-popover/src/popover.js b/packages/components/bolt-popover/src/popover.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-popover/src/popover.js +++ b/packages/components/bolt-popover/src/popover.js @@ -42,6 +42,7 @@ class BoltPopover extends BoltElement { maxWidth: 'none', // Set width via CSS variable, requires legacy Edge support offset: [0, 0], plugins: [hideOnEsc, handleFocus], + zIndex: 120, popperOptions: { modifiers: [ { diff --git a/packages/components/bolt-tooltip/src/tooltip.js b/packages/components/bolt-tooltip/src/tooltip.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-tooltip/src/tooltip.js +++ b/packages/components/bolt-tooltip/src/tooltip.js @@ -39,6 +39,7 @@ class BoltTooltip extends BoltElement { maxWidth: 'none', // Set width via CSS variable for legacy Edge support offset: [0, 0], plugins: [hideOnEsc], + zIndex: 140, popperOptions: { modifiers: [ {
Update the z-index for tooltip and popover
bolt-design-system_bolt
train
js,js
474f4e6ebd1bb0ff69ed4f510b674a47d7e4d680
diff --git a/test/transports.websocket.test.js b/test/transports.websocket.test.js index <HASH>..<HASH> 100644 --- a/test/transports.websocket.test.js +++ b/test/transports.websocket.test.js @@ -364,6 +364,40 @@ module.exports = { ws.finishClose(); }); }); + }, + + 'test sending deliverable volatile json': function (done) { + var cl = client(++ports) + , io = create(cl) + , messaged = false; + + io.configure(function () { + io.set('close timeout', .05); + }); + + io.sockets.on('connection', function (socket) { + socket.volatile.json.send([1, 2, 3]); + + socket.on('disconnect', function () { + messaged.should.be.true; + cl.end(); + io.server.close(); + done(); + }); + }); + + cl.handshake(function (sid) { + var ws = websocket(cl, sid); + ws.on('message', function (msg) { + msg.should.eql({ + type: 'json' + , data: [1, 2, 3] + , endpoint: '' + }); + messaged = true; + ws.finishClose(); + }); + }); } };
Added test for delivery of volatile json messages with websocket.
socketio_socket.io
train
js
a0b1bc7dd4553d7b61f47692fa2b95d2c8e3b00b
diff --git a/src/BigNumber.php b/src/BigNumber.php index <HASH>..<HASH> 100644 --- a/src/BigNumber.php +++ b/src/BigNumber.php @@ -378,7 +378,7 @@ abstract class BigNumber implements \Serializable, \JsonSerializable * * @return int The converted value. * - * @throws IntegerOverflowException If this number cannot be exactly converted to a native integer. + * @throws ArithmeticException If this number cannot be exactly converted to a native integer. */ abstract public function toInt() : int;
Fix BigNumber::toInt() documented exception This was changed to IntegerOverflowException, but other ArithmeticException classes can be thrown as well, when the method is called on a BigDecimal or BigRational. Changed back to ArithmeticException.
brick_math
train
php
8b02e3981432874de0b6e0ebe613402aaab92b96
diff --git a/lib/spiceweasel/cookbook_list.rb b/lib/spiceweasel/cookbook_list.rb index <HASH>..<HASH> 100644 --- a/lib/spiceweasel/cookbook_list.rb +++ b/lib/spiceweasel/cookbook_list.rb @@ -9,7 +9,7 @@ class Spiceweasel::CookbookList args = cookbook[cb][1] || "" end STDOUT.puts "DEBUG: cookbook: #{cb} #{version}" if DEBUG - @delete += "knife cookbook @delete #{cb} #{version} -y\n" + @delete += "knife cookbook delete #{cb} #{version} -y\n" if File.directory?("cookbooks") if version and File.directory?("cookbooks/#{cb}") #check metadata.rb for requested version
Typo prevents you from being able to rebuild a deployment
mattray_spiceweasel
train
rb
e9eddaa9c138aec02787f0b8bd79386971dd354c
diff --git a/lib/schema/controls/attribute.rb b/lib/schema/controls/attribute.rb index <HASH>..<HASH> 100644 --- a/lib/schema/controls/attribute.rb +++ b/lib/schema/controls/attribute.rb @@ -36,14 +36,12 @@ module Schema 'yet another value' end - def self.random - Controls::Random.example + def self.alternate + 'some alternate value' end - module Alternate - def self.example - 'some alternate value' - end + def self.random + Controls::Random.example end end end diff --git a/lib/schema/controls/comparison/entry.rb b/lib/schema/controls/comparison/entry.rb index <HASH>..<HASH> 100644 --- a/lib/schema/controls/comparison/entry.rb +++ b/lib/schema/controls/comparison/entry.rb @@ -104,7 +104,7 @@ module Schema end def self.compare_value - Attribute::Value::Alternate.example + Attribute::Value.alternate end end @@ -179,7 +179,7 @@ module Schema end def self.compare_value - Attribute::Value::Alternate.example + Attribute::Value.alternate end end end
Alternate value control is a method rather than a namespace
eventide-project_schema
train
rb,rb
6c54ff78a2351623e91ccf085d94a78d02b1882c
diff --git a/util_go17.go b/util_go17.go index <HASH>..<HASH> 100644 --- a/util_go17.go +++ b/util_go17.go @@ -1,4 +1,4 @@ -// +build go1.7,!go1.8 +// +build go1.7, !go1.8 package echo
fix build constraint go<I> (#<I>) * fix build constraint go<I> go<I> wasn't properly excluded * Update util_go<I>.go
labstack_echo
train
go
35de53cdb1d471cdd69d1151fa9db3e8131a4106
diff --git a/solr/solr.go b/solr/solr.go index <HASH>..<HASH> 100644 --- a/solr/solr.go +++ b/solr/solr.go @@ -191,8 +191,8 @@ func (si *SolrInterface) DeleteAll() (*SolrUpdateResponse, error) { return si.Delete(M{"query": "*:*"}, params) } -// Update take data of type map and optional params which can use to specify addition parameters such as commit=true -func (si *SolrInterface) Update(data map[string]interface{}, params *url.Values) (*SolrUpdateResponse, error) { +// Update take data of type interface{} and optional params which can use to specify addition parameters such as commit=true +func (si *SolrInterface) Update(data interface{}, params *url.Values) (*SolrUpdateResponse, error) { if si.conn == nil { return nil, fmt.Errorf("No connection found for making request to solr") }
Allow any data to be sent through update
vanng822_go-solr
train
go
cef9426aee1427bd8558571e03fd65febea3152f
diff --git a/src/Storage/Field/Type/TemplateFieldsType.php b/src/Storage/Field/Type/TemplateFieldsType.php index <HASH>..<HASH> 100644 --- a/src/Storage/Field/Type/TemplateFieldsType.php +++ b/src/Storage/Field/Type/TemplateFieldsType.php @@ -53,7 +53,7 @@ class TemplateFieldsType extends FieldTypeBase $metadata = $this->buildMetadata($entity); $type = (string)$entity->getContenttype(); - $builder = $this->em->getEntityBuilder(); + $builder = $this->em->getEntityBuilder($type); $templatefieldsEntity = $builder->createFromDatabaseValues($type, $value, $metadata); $ct = new ContentType('templatefields', ['fields' => $metadata->getFieldMappings()]);
pass the type to the builder request
bolt_bolt
train
php
9ce9d1e37590df16cf21fa49833d8be8e28aa06b
diff --git a/manifest.php b/manifest.php index <HASH>..<HASH> 100755 --- a/manifest.php +++ b/manifest.php @@ -45,7 +45,7 @@ return array( 'label' => 'TAO Base', 'description' => 'TAO meta-extension', 'license' => 'GPL-2.0', - 'version' => '21.14.0', + 'version' => '21.15.0', 'author' => 'Open Assessment Technologies, CRP Henri Tudor', 'requires' => array( 'generis' => '>=7.11.0', diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php index <HASH>..<HASH> 100755 --- a/scripts/update/Updater.php +++ b/scripts/update/Updater.php @@ -873,7 +873,7 @@ class Updater extends \common_ext_ExtensionUpdater { $this->setVersion('21.5.0'); } - - $this->skip('21.5.0', '21.14.0'); + + $this->skip('21.5.0', '21.15.0'); } }
Bump to version <I>
oat-sa_tao-core
train
php,php
fdc4f9c1bb8941f22f64547e32a873b785a424d5
diff --git a/PyFunceble/cli/processes/workers/producer.py b/PyFunceble/cli/processes/workers/producer.py index <HASH>..<HASH> 100644 --- a/PyFunceble/cli/processes/workers/producer.py +++ b/PyFunceble/cli/processes/workers/producer.py @@ -230,7 +230,7 @@ class ProducerWorker(WorkerBase): the dataset storage. Otherwise, we just keep it in there :-) """ - if test_dataset["type"] != "single": + if test_dataset["type"] != "single" and self.inactive_dataset.authorized: dataset = test_result.to_dict() dataset.update(test_dataset) @@ -259,7 +259,7 @@ class ProducerWorker(WorkerBase): Runs the backup or update of the auto-continue dataset storage. """ - if test_dataset["type"] != "single": + if test_dataset["type"] != "single" and self.continue_dataset.authorized: dataset = test_result.to_dict() dataset.update(test_dataset)
Logical fix. Indeed, before this patch, we didn't actively checked if the inactive and autocontinue dataset lookup was deactivated before doing some backup or update of the dataset. This patch fixes the issue by checking if we are authorized to process such dataset before even trying to do so.
funilrys_PyFunceble
train
py
9217e10e0610ba807b8e657d3885bb62c5aeed22
diff --git a/packages/netlify-cms-widget-relation/src/RelationControl.js b/packages/netlify-cms-widget-relation/src/RelationControl.js index <HASH>..<HASH> 100644 --- a/packages/netlify-cms-widget-relation/src/RelationControl.js +++ b/packages/netlify-cms-widget-relation/src/RelationControl.js @@ -148,7 +148,7 @@ export default class RelationControl extends React.Component { let metadata; if (Array.isArray(selectedOption)) { - this.setState({ initialOptions: selectedOption }); + this.setState({ initialOptions: selectedOption.filter(Boolean) }); value = selectedOption.map(optionToString); metadata = (!isEmpty(selectedOption) && { @@ -161,7 +161,7 @@ export default class RelationControl extends React.Component { {}; onChange(fromJS(value), metadata); } else { - this.setState({ initialOptions: [selectedOption] }); + this.setState({ initialOptions: [selectedOption].filter(Boolean) }); value = optionToString(selectedOption); metadata = selectedOption && { [field.get('name')]: {
fix(widget-relation): handle optional configuration (#<I>)
netlify_netlify-cms
train
js
76beb98546791e2ff2cbb03ba6aae239b3c5610d
diff --git a/lib/app.js b/lib/app.js index <HASH>..<HASH> 100644 --- a/lib/app.js +++ b/lib/app.js @@ -85,11 +85,6 @@ module.exports = function(tilelive, options) { uri = clone(uri); } - if (uri.protocol === "mapnik:") { - // disable mapnik's internal cache - uri.query.internal_cache = false; - } - tilePattern = tilePath .replace(/\.(?!.*\.)/, ":scale(" + SCALE_PATTERN + ")?.") .replace(/\./g, "\.")
Move Mapnik cache bypass to tilelive-cache
mojodna_tessera
train
js
9a74112e34b2fc234b8a70ac3bd9e5b5e1a5d224
diff --git a/lib/fluent/plugin/in_tail.rb b/lib/fluent/plugin/in_tail.rb index <HASH>..<HASH> 100644 --- a/lib/fluent/plugin/in_tail.rb +++ b/lib/fluent/plugin/in_tail.rb @@ -238,7 +238,7 @@ class TailInput < Input end def on_change(prev, cur) - @h.call + @h.check end end
Fluent::TailInput::RotateHandler doesn't have #call , but have #check
fluent_fluentd
train
rb
346f87e8e452d144676487833e90ce4cf6ee05ef
diff --git a/lib/tinyhttptest.js b/lib/tinyhttptest.js index <HASH>..<HASH> 100644 --- a/lib/tinyhttptest.js +++ b/lib/tinyhttptest.js @@ -47,7 +47,7 @@ class TinyHTTPTest { this.options.headers.origin = origin; this.options.headers["content-type"] = "fetch"; - this.expectHeader("access-control-allow-methods", "GET, HEAD, OPTIONS"); + this.expectHeader("access-control-allow-methods", /GET\, HEAD\, OPTIONS/); this.expectHeader("access-control-allow-headers", /^content-type/); this.expectHeader("access-control-expose-headers", /^content-type/); this.expectHeader("access-control-allow-origin", origin);
Changing `cors()` to be looser with the `access-control-allow-methods ` header test
avoidwork_tiny-httptest
train
js
ea3bb6c7982576b084f738d9944be71c7b766b5f
diff --git a/models/Event.php b/models/Event.php index <HASH>..<HASH> 100644 --- a/models/Event.php +++ b/models/Event.php @@ -49,6 +49,14 @@ class Event extends Model public $end; /** + * The range of dates that an event is to show on the calendar. + * Used with a function to check the dates in eventRender against the range and only render + * the dates that fall within the range. + * @var range + */ + public $ranges; + + /** * Day of Week settings for repeating events. Enter the numerical days of the week ex. [1,4] would repeat on Monday and Thursday. * @var array */
Added ranges property to Model.php
philippfrenzel_yii2fullcalendar
train
php
2f55baccd7b08dddc77f521be100c71eca4d6244
diff --git a/core/server/web/api/canary/members/app.js b/core/server/web/api/canary/members/app.js index <HASH>..<HASH> 100644 --- a/core/server/web/api/canary/members/app.js +++ b/core/server/web/api/canary/members/app.js @@ -13,6 +13,10 @@ module.exports = function setupMembersApiApp() { const apiApp = express(); apiApp.use(sentry.requestHandler); + // Make sure `req.ip` is correct for proxied requests + // (X-Forwarded-Proto header will be checked, if present) + apiApp.enable('trust proxy'); + // Entire app is behind labs flag apiApp.use(labs.members);
Added "trust proxy" to members API app no issue - match the other express apps, makes sure that we have access to the correct IP and forwarded host names when running behind proxies
TryGhost_Ghost
train
js
aecc831edadc3f0acaeb25565e2cab1547fe4de5
diff --git a/src/js/components/Video.js b/src/js/components/Video.js index <HASH>..<HASH> 100644 --- a/src/js/components/Video.js +++ b/src/js/components/Video.js @@ -237,7 +237,6 @@ export default class Video extends Component { Video.propTypes = { colorIndex: PropTypes.string, - duration: PropTypes.number, full: PropTypes.oneOf([true, 'horizontal', 'vertical', false]), poster: PropTypes.string, size: React.PropTypes.oneOf(['small', 'medium', 'large']),
Removed duration prop in Video component since it's no longer needed.
grommet_grommet
train
js
a13863a4fb703664782d8f22ce71396cef8aa587
diff --git a/telethon/events/__init__.py b/telethon/events/__init__.py index <HASH>..<HASH> 100644 --- a/telethon/events/__init__.py +++ b/telethon/events/__init__.py @@ -1,3 +1,4 @@ +from .common import Raw from .chataction import ChatAction from .messagedeleted import MessageDeleted from .messageedited import MessageEdited
Re-export events.Raw (removed on b7c3f<I>)
LonamiWebs_Telethon
train
py
28e5738faaa5347f318f1219f734749f1277a84f
diff --git a/pymc/database/sqlite.py b/pymc/database/sqlite.py index <HASH>..<HASH> 100755 --- a/pymc/database/sqlite.py +++ b/pymc/database/sqlite.py @@ -113,7 +113,7 @@ class Trace(base.Trace): # If chain is None, get the data from all chains. if chain is None: - self.db.cur.execute('SELECT * FROM %s' % self.name) + self.db.cur.execute('SELECT * FROM [%s]' % self.name) trace = self.db.cur.fetchall() else: # Deal with negative chains (starting from the end) @@ -130,7 +130,7 @@ class Trace(base.Trace): chain = self._chain if chain is None: - self.db.cur.execute('SELECT * FROM %s' % self.name) + self.db.cur.execute('SELECT * FROM [%s]' % self.name) trace = self.db.cur.fetchall() else: # Deal with negative chains (starting from the end) @@ -264,7 +264,7 @@ def get_table_list(cursor): def get_shape(cursor, name): """Return the shape of the table ``name``.""" - cursor.execute('select * from %s'% name) + cursor.execute('select * from [%s]'% name) inds = cursor.description[-1][0][1:].split('_') return tuple([int(i) for i in inds])
Fixed name escaping bug in sqlite again.
pymc-devs_pymc
train
py
d96f1279cc95f42d828d867c17b4dd71d6696557
diff --git a/src/Validation/Validation.php b/src/Validation/Validation.php index <HASH>..<HASH> 100644 --- a/src/Validation/Validation.php +++ b/src/Validation/Validation.php @@ -180,7 +180,6 @@ class Validation 'enroute' => '/^2(?:014|149)\\d{11}$/', 'jcb' => '/^(3\\d{4}|2100|1800)\\d{11}$/', 'maestro' => '/^(?:5020|6\\d{3})\\d{12}$/', - 'mc' => '/^5[1-5]\\d{14}$/', 'mc' => '/^(5[1-5]\\d{14})|(2(?:22[1-9]|2[3-9][0-9]|[3-6][0-9]{2}|7[0-1][0-9]|720)\\d{12})$/', 'solo' => '/^(6334[5-9][0-9]|6767[0-9]{2})\\d{10}(\\d{2,3})?$/', 'switch' => '/^(?:49(03(0[2-9]|3[5-9])|11(0[1-2]|7[4-9]|8[1-2])|36[0-9]{2})\\d{10}(\\d{2,3})?)|(?:564182\\d{10}(\\d{2,3})?)|(6(3(33[0-4][0-9])|759[0-9]{2})\\d{10}(\\d{2,3})?)$/',
Removed old MC validation regex
cakephp_cakephp
train
php
2479f593f91baf6782bf049b9eaf8114c7a1f095
diff --git a/core/src/main/java/com/google/errorprone/matchers/Description.java b/core/src/main/java/com/google/errorprone/matchers/Description.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/com/google/errorprone/matchers/Description.java +++ b/core/src/main/java/com/google/errorprone/matchers/Description.java @@ -84,6 +84,14 @@ public class Description { } /** + * Returns link to be included in the error message or null if there is no link. + */ + @Nullable + public String getLink() { + return link; + } + + /** * Returns the message, not including the check name but including the link. */ public String getMessageWithoutCheckName() {
Extended the KlippyAnalyzer interface to provide access the Bugchecker's link. RELNOTES: N/A ------------- Created by MOE: <URL>
google_error-prone
train
java
418143222026fa27ed0ebdd12b1566ef78fbcccb
diff --git a/airflow/utils/helpers.py b/airflow/utils/helpers.py index <HASH>..<HASH> 100644 --- a/airflow/utils/helpers.py +++ b/airflow/utils/helpers.py @@ -309,7 +309,7 @@ def reap_process_group(pid, log, sig=signal.SIGTERM, # If operation not permitted error is thrown due to run_as_user, # use sudo -n(--non-interactive) to kill the process if err.errno == errno.EPERM: - subprocess.check_call(["sudo", "-n", "-" + str(sig), str(os.getpgid(pid))]) + subprocess.check_call(["sudo", "-n", "kill", "-" + str(sig), str(os.getpgid(pid))]) raise _, alive = psutil.wait_procs(children, timeout=timeout, callback=on_terminate)
[AIRFLOW-<I>] Correctly use `sudo` to kill cleared tasks when running with impersonation (#<I>) Bug fix to #<I>
apache_airflow
train
py
600eb3da8a384fb9394572036018c57651be6eec
diff --git a/lib/conf/cli.js b/lib/conf/cli.js index <HASH>..<HASH> 100755 --- a/lib/conf/cli.js +++ b/lib/conf/cli.js @@ -168,8 +168,10 @@ var show_gui_and_exit = function(){ config.writable(function(can_write){ - if (!can_write) - return dialog.warn('Config file not writable! Please run as system user.') + if (!can_write) { + dialog.warn('Config file not writable! Please run as system user.') + return process.exit(1); + } var args = [], os_name = system.os_name,
Exit after showing config not writable dialog.
prey_prey-node-client
train
js
7c5f8e2c5674dbb7455e40690b7c9df567c400b6
diff --git a/astroid/brain/brain_typing.py b/astroid/brain/brain_typing.py index <HASH>..<HASH> 100644 --- a/astroid/brain/brain_typing.py +++ b/astroid/brain/brain_typing.py @@ -394,7 +394,7 @@ def infer_typing_cast( try: func = next(node.func.infer(context=ctx)) - except InferenceError as exc: + except (InferenceError, StopIteration) as exc: raise UseInferenceDefault from exc if ( not isinstance(func, FunctionDef)
Update brain_typing.py (#<I>) Solves the specific crash in #<I>
PyCQA_astroid
train
py
c70966a58975c4d5500094eb647b006ac1266c0f
diff --git a/vendor/assets/javascripts/emerson/base.js b/vendor/assets/javascripts/emerson/base.js index <HASH>..<HASH> 100644 --- a/vendor/assets/javascripts/emerson/base.js +++ b/vendor/assets/javascripts/emerson/base.js @@ -87,6 +87,30 @@ }; + // jQuery Extension + // -------------------------------------------------------------------------- + + // ### $.fn.emerson + // + // $(document).emerson() + // + // Enables/inits Emerson on page load. Also handles `page:load` events, as + // fired by the Rails jquery-ujs package. + // + $.fn.emerson = function emerson() { + _.each(this, function(e) { + $(document).ready(function() { + Emerson.init(); + }); + + $(document).on('page:load', function() { + Emerson.init(); + }); + }); + + return this; + }; + // Underscore Extension // --------------------------------------------------------------------------
Adds $.fn.emerson for initialization …which binds document "ready" and `page:load` (for Rails 4 turbolinks)
GetEmerson_emerson-rb
train
js
a50f1ba1884abd30b07e009bac3f12edf23c10dc
diff --git a/pysolr.py b/pysolr.py index <HASH>..<HASH> 100644 --- a/pysolr.py +++ b/pysolr.py @@ -177,7 +177,7 @@ except ImportError: __author__ = 'Joseph Kocherhans, Jacob Kaplan-Moss, Daniel Lindsley' __all__ = ['Solr'] -__version__ = (2, 1, 0, 'beta') +__version__ = (2, 1, 0) def get_version(): return "%s.%s.%s" % __version__[:3] diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from distutils.core import setup setup( name = "pysolr", - version = "2.1.0-beta", + version = "2.1.0", description = "Lightweight python wrapper for Apache Solr.", author = 'Daniel Lindsley', author_email = 'daniel@toastdriven.com',
Bumped to <I>!
django-haystack_pysolr
train
py,py
872c515974f276c3d94bc97fd3c893a8b82e6f7a
diff --git a/sperment/config_scope.py b/sperment/config_scope.py index <HASH>..<HASH> 100644 --- a/sperment/config_scope.py +++ b/sperment/config_scope.py @@ -8,11 +8,13 @@ import json import re -def blocking_dictify(x): +def dogmatize(x): if isinstance(x, dict): - return DogmaticDict({k: blocking_dictify(v) for k, v in x.iteritems()}) - elif isinstance(x, (list, tuple)): - return type(x)(blocking_dictify(v) for v in x) + return DogmaticDict({k: dogmatize(v) for k, v in x.iteritems()}) + elif isinstance(x, list): + return DogmaticList([dogmatize(v) for v in x]) + elif isinstance(x, tuple): + return tuple(dogmatize(v) for v in x) else: return x @@ -136,7 +138,7 @@ class ConfigScope(dict): def __call__(self, fixed=None, preset=None): self._initialized = True self.clear() - l = blocking_dictify(fixed) if fixed is not None else {} + l = dogmatize(fixed) if fixed is not None else {} if preset is not None: l.update(preset) eval(self._body_code, copy(self._func.func_globals), l)
renamed blocking_dictify to dogmatize and have it use DogmaticLists also
IDSIA_sacred
train
py
d7ddef151812e5caee3beba97474304ad162a948
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,6 @@ setup( url='', license='MIT', author='Pr0Ger', - author_email='me@pr0ger.prg', + author_email='me@pr0ger.org', description='' )
Stupid typo in setup.py
Pr0Ger_protobuf3
train
py
781d2c9c48ccab9539d5f9b4088911601c9f8000
diff --git a/lib/pg_search.rb b/lib/pg_search.rb index <HASH>..<HASH> 100644 --- a/lib/pg_search.rb +++ b/lib/pg_search.rb @@ -55,7 +55,11 @@ module PgSearch end def multisearch_enabled? - Thread.current.key?("PgSearch.enable_multisearch") ? Thread.current["PgSearch.enable_multisearch"] : true + if Thread.current.key?("PgSearch.enable_multisearch") + Thread.current["PgSearch.enable_multisearch"] + else + true + end end end
Replace gratuitous ternary operator with if statement
Casecommons_pg_search
train
rb
3e5eca9df754aee3c8bfd0c9fee9ab5ef33412fe
diff --git a/cobra/core/Model.py b/cobra/core/Model.py index <HASH>..<HASH> 100644 --- a/cobra/core/Model.py +++ b/cobra/core/Model.py @@ -128,7 +128,7 @@ class Model(Object): new_reaction = reaction.__class__() for attr, value in iteritems(reaction.__dict__): if attr not in do_not_copy: - new_reaction.__dict__[attr] = value + new_reaction.__dict__[attr] = copy(value) new_reaction._model = new new.reactions.append(new_reaction) # update awareness
make copies of attributes in reaction (#<I>) can be proper objects so copy by reference of e.g. dictionary `notes` leads to unexpected behaviour as shown in #<I>
opencobra_cobrapy
train
py
9c11161e3cbc67ec291284b0fb189d751584310b
diff --git a/src/sap.ui.core/src/sap/ui/test/starter/runTest.js b/src/sap.ui.core/src/sap/ui/test/starter/runTest.js index <HASH>..<HASH> 100644 --- a/src/sap.ui.core/src/sap/ui/test/starter/runTest.js +++ b/src/sap.ui.core/src/sap/ui/test/starter/runTest.js @@ -183,17 +183,17 @@ }).then(function() { // install a mock version of the qunit-reporter-junit API to collect jUnitDone callbacks aJUnitDoneCallbacks = []; - window.jUnitDone = function(cb) { + QUnit.jUnitDone = function(cb) { aJUnitDoneCallbacks.push(cb); }; return requireP("sap/ui/qunit/qunit-junit"); }).then(function() { - delete window.jUnitDone; + delete QUnit.jUnitDone; return requireP("sap/ui/thirdparty/qunit-reporter-junit"); }).then(function() { // now register the collected callbacks with the real qunit-reporter-junit API aJUnitDoneCallbacks.forEach(function(cb) { - window.jUnitDone(cb); + QUnit.jUnitDone(cb); }); aJUnitDoneCallbacks = undefined; });
[INTERNAL] Test Starter: register QUnit callbacks in correct order (II) Change-Id: Ifba<I>bf<I>a<I>c<I>f<I>f9e<I>
SAP_openui5
train
js
5ee4f1723434ff0453be7c22e39c949503f7f3ad
diff --git a/pytorch_pretrained_bert/modeling.py b/pytorch_pretrained_bert/modeling.py index <HASH>..<HASH> 100644 --- a/pytorch_pretrained_bert/modeling.py +++ b/pytorch_pretrained_bert/modeling.py @@ -580,7 +580,7 @@ class BertPreTrainedModel(nn.Module): model = cls(config, *inputs, **kwargs) if state_dict is None and not from_tf: weights_path = os.path.join(serialization_dir, WEIGHTS_NAME) - state_dict = torch.load(weights_path) + state_dict = torch.load(weights_path, map_location='cpu' if not torch.cuda.is_available() else None) if tempdir: # Clean up temp dir shutil.rmtree(tempdir)
adding option to load on cpu
huggingface_pytorch-pretrained-BERT
train
py
00c1fc2bdbf8e19864cd5f913ccf9c6f93650539
diff --git a/rflint/parser/tables.py b/rflint/parser/tables.py index <HASH>..<HASH> 100644 --- a/rflint/parser/tables.py +++ b/rflint/parser/tables.py @@ -72,7 +72,7 @@ class AbstractContainerTable(RobotTable): # the first cell intact. Sorry if this ends up causing you grief # some day... row[0] = "" - self._children[-1].append(row.linenumber, row, row.cells) + self._children[-1].append(row.linenumber, row.raw_text, row.cells) elif len(self._children) == 0: # something before the first test case @@ -83,6 +83,6 @@ class AbstractContainerTable(RobotTable): else: # another row for the testcase if len(row.cells) > 0: - self._children[-1].append(row.linenumber, row, row.cells) + self._children[-1].append(row.linenumber, row.raw_text, row.cells)
fixed bug where row.raw_text wasn't always raw text
boakley_robotframework-lint
train
py
df9055f69cbd8a08e3388d03150d92205a085c23
diff --git a/tunnel/session.go b/tunnel/session.go index <HASH>..<HASH> 100644 --- a/tunnel/session.go +++ b/tunnel/session.go @@ -173,6 +173,25 @@ func (s *session) waitFor(msgType string, timeout time.Duration) (*message, erro case <-after(timeout): return nil, ErrReadTimeout case <-s.closed: + // check pending message queue + select { + case msg := <-s.recv: + // there may be no message type + if len(msgType) == 0 { + return msg, nil + } + + // ignore what we don't want + if msg.typ != msgType { + log.Debugf("Tunnel received non %s message in waiting for %s", msg.typ, msgType) + continue + } + + // got the message + return msg, nil + default: + // non blocking + } return nil, io.EOF } }
continue to process messages even after the connection is closed
micro_go-micro
train
go
0c08f46eea8878f3689c11325465a6f9ec1e4b18
diff --git a/src/com/google/javascript/jscomp/RewritePolyfills.java b/src/com/google/javascript/jscomp/RewritePolyfills.java index <HASH>..<HASH> 100644 --- a/src/com/google/javascript/jscomp/RewritePolyfills.java +++ b/src/com/google/javascript/jscomp/RewritePolyfills.java @@ -36,7 +36,9 @@ import java.util.Set; import javax.annotation.Nullable; /** - * Rewrites all the library polyfills. + * Rewrites calls to ES6 library functions to use compiler-provided polyfills, + * e.g., <code>var m = new Map();</code> becomes + * <code>$jscomp.Map$install(); var m = new $jscomp.Map();</code> */ public class RewritePolyfills implements HotSwapCompilerPass {
Improve the description of the RewritePolyfills class. ------------- Created by MOE: <URL>
google_closure-compiler
train
java
bdedaab8d1ab55f69f940c40f11baf38cd665c29
diff --git a/python-package/xgboost/core.py b/python-package/xgboost/core.py index <HASH>..<HASH> 100644 --- a/python-package/xgboost/core.py +++ b/python-package/xgboost/core.py @@ -1118,7 +1118,7 @@ class DeviceQuantileDMatrix(DMatrix): ctypes.c_int(self.max_bin), ctypes.byref(handle), ) - if it.exception: + if it.exception is not None: raise it.exception # delay check_call to throw intermediate exception first _check_call(ret) @@ -1315,7 +1315,7 @@ class Booster(object): self.handle, ctypes.byref(length), ctypes.byref(json_string))) - json_string = json_string.value.decode() + json_string = json_string.value.decode() # NOLINT return json_string def load_config(self, config): @@ -1508,7 +1508,7 @@ class Booster(object): dmats, evnames, c_bst_ulong(len(evals)), ctypes.byref(msg))) - res = msg.value.decode() + res = msg.value.decode() # NOLINT if feval is not None: for dmat, evname in evals: feval_ret = feval(self.predict(dmat, training=False,
Fix pylint. (#<I>)
dmlc_xgboost
train
py
3a182dbed6401debf6662debfe77e75d75235560
diff --git a/lib/authorizer/edgegrid.js b/lib/authorizer/edgegrid.js index <HASH>..<HASH> 100644 --- a/lib/authorizer/edgegrid.js +++ b/lib/authorizer/edgegrid.js @@ -79,11 +79,12 @@ var _ = require('lodash'), headerValue; headersToSign.forEach(function (headerName) { + headerName = headerName.trim().toLowerCase(); headerValue = headers[headerName]; if (!headerValue) { return; } - formattedHeaders.push(`${headerName.toLowerCase()}:${headerValue.trim().replace(/\s+/g, SPACE)}`); + formattedHeaders.push(`${headerName}:${headerValue.trim().replace(/\s+/g, SPACE)}`); }); return formattedHeaders.join(TAB); @@ -304,7 +305,9 @@ module.exports = { params.timestamp = params.timestamp || getTimestamp(); params.url = url; params.method = request.method; - params.headers = request.getHeaders({enabled: true}); + + // ensure that headers are case-insensitive as specified in the documentation + params.headers = request.getHeaders({enabled: true, ignoreCase: true}); if (typeof params.headersToSign === 'string') { params.headersToSign = params.headersToSign.split(',');
Treated headers as case-insensitive
postmanlabs_postman-runtime
train
js
8f1900c7fe77267713182f3e93619eea22c0a3f2
diff --git a/src/Postmark/PostmarkClientBase.php b/src/Postmark/PostmarkClientBase.php index <HASH>..<HASH> 100644 --- a/src/Postmark/PostmarkClientBase.php +++ b/src/Postmark/PostmarkClientBase.php @@ -25,6 +25,22 @@ abstract class PostmarkClientBase { */ public static $BASE_URL = "https://api.postmarkapp.com"; + /** + * VERIFY_SSL is defaulted to "true". + * + * In some PHP configurations, SSL/TLS certificates cannot be verified. + * Rather than disabling SSL/TLS entirely in these circumstances, you may + * disable certificate verification. This is dramatically better than disabling + * connecting to the Postmark API without TLS, as it's still encrypted, + * but the risk is that if your connection has been compromised, your application could + * be subject to a Man-in-the-middle attack. However, this is still a better outcome + * than using no encryption at all. + * + * If possible, you should try to resolve your PHP install's certificate issues as outline here: + * https://github.com/wildbit/postmark-php/wiki/SSL%20Errors%20on%20Windows + */ + public static $VERIFY_SSL= true; + protected $authorization_token = NULL; protected $authorization_header = NULL; protected $version = NULL; @@ -89,6 +105,7 @@ abstract class PostmarkClientBase { 'Content-Type' => 'application/json', $this->authorization_header => $this->authorization_token); + $options['verify'] = PostmarkClientBase::$VERIFY_SSL; $response = $client->request($method, $url, $options);
Allow users to bypass SSL certificate verification.
wildbit_postmark-php
train
php
857d4bd054c8ffbdee618e62ef63e24009b79576
diff --git a/src/UsersController.php b/src/UsersController.php index <HASH>..<HASH> 100755 --- a/src/UsersController.php +++ b/src/UsersController.php @@ -37,6 +37,9 @@ abstract class UsersController extends CrudExtendedController public function onConstruct() { $this->model = new Users(); + $this->additionalSearchFields = [ + ['id', ':', $this->userData->getId()], + ]; } /** @@ -51,10 +54,6 @@ abstract class UsersController extends CrudExtendedController */ public function index($id = null) : Response { - $this->additionalSearchFields = [ - ['id', ':', $this->userData->getId()], - ]; - return parent::index(); }
Move additional search fields from index function to constructor
bakaphp_auth
train
php
e75d430a239b2d056d7049fbd7bf7af4d0c62b15
diff --git a/storage/storage_transport.go b/storage/storage_transport.go index <HASH>..<HASH> 100644 --- a/storage/storage_transport.go +++ b/storage/storage_transport.go @@ -428,20 +428,5 @@ func (s storageTransport) ValidatePolicyConfigurationScope(scope string) error { } func verboseName(r reference.Named) string { - digested, isDigested := r.(reference.Digested) - tagged, isTagged := r.(reference.Tagged) - tag := "" - sum := "" - name := r.Name() - if isTagged { - if tagged.Tag() != "" { - tag = ":" + tagged.Tag() - } - } - if isDigested { - if digested.Digest().Validate() == nil { - sum = "@" + digested.Digest().String() - } - } - return name + tag + sum + return r.String() }
Rewrite verboseName() as reference.Named.String() Now it's clear that it is exactly equivalent, looking at the c/i/docker/reference implementations (reference, repository, taggedReference, canonicalReference).
containers_image
train
go
5602dcfb95c5e5f46cce2cca5821ded982580119
diff --git a/lib/moqueue/mock_queue.rb b/lib/moqueue/mock_queue.rb index <HASH>..<HASH> 100644 --- a/lib/moqueue/mock_queue.rb +++ b/lib/moqueue/mock_queue.rb @@ -1,7 +1,7 @@ module Moqueue class MockQueue - attr_reader :name, :unhandled_messages + attr_reader :name class << self
remove attr* for no-longer in use ivars
danielsdeleo_moqueue
train
rb
765789f111d225b4962529609338f5c1e18b0731
diff --git a/leveldbjni/src/main/java/org/fusesource/leveldbjni/internal/NativeBuffer.java b/leveldbjni/src/main/java/org/fusesource/leveldbjni/internal/NativeBuffer.java index <HASH>..<HASH> 100644 --- a/leveldbjni/src/main/java/org/fusesource/leveldbjni/internal/NativeBuffer.java +++ b/leveldbjni/src/main/java/org/fusesource/leveldbjni/internal/NativeBuffer.java @@ -121,7 +121,7 @@ class NativeBuffer extends NativeObject { super(NativeBufferJNI.malloc(length)); this.capacity = length; this.retained = new AtomicInteger(1); - write(0, data, 0, length); + write(0, data, offset, length); } private NativeBuffer(NativeBuffer other, long offset, long capacity) {
Fixes issue #1 : Bug on NativeBuffer offset
fusesource_leveldbjni
train
java
3ef5d517729e78ed2c42666c16418499179eeb70
diff --git a/src/simpleddp.js b/src/simpleddp.js index <HASH>..<HASH> 100644 --- a/src/simpleddp.js +++ b/src/simpleddp.js @@ -69,6 +69,10 @@ export default class simpleDDP { let pluginConnector = connectPlugins.bind(this,plugins); + // Compatibility with Meteor connections + // See https://docs.meteor.com/api/methods.html#Meteor-apply + this.apply = this.call; + // plugin init section pluginConnector('init','beforeConnected'); diff --git a/test/test_call.js b/test/test_call.js index <HASH>..<HASH> 100644 --- a/test/test_call.js +++ b/test/test_call.js @@ -30,6 +30,24 @@ describe('simpleDDP', function(){ }); + describe('#apply', function (){ + + it('should return promise and afterwards then function should run', function (done) { + + server.apply("somemethod").then(function() { + done(); + }); + + server.ddpConnection.emit('result',{ + msg: 'result', + id: '1', + result: 'ok' + }); + + }); + + }); + after(function() { // runs after all tests in this block server.disconnect();
Add an apply function Meteor connections always have an apply function next to the call function. The call function in SimpleDDP has almost the same syntax as apply in Meteor. So to get a little closer to Meteor compatibilty, we could simply use the call function as an apply function. Only difference is that you can't pass it the apply options as mentioned in <URL>
Gregivy_simpleddp
train
js,js
cfa11fd610a71b68df00d44c4406b1085f7cdae3
diff --git a/blog/lib.php b/blog/lib.php index <HASH>..<HASH> 100755 --- a/blog/lib.php +++ b/blog/lib.php @@ -491,7 +491,7 @@ function blog_get_options_for_course(stdClass $course, stdClass $user=null) { if (has_capability('moodle/blog:create', $sitecontext)) { // We can blog about this course $options['courseadd'] = array( - 'string' => get_string('blogaboutthiscourse', 'blog', get_string('course')), + 'string' => get_string('blogaboutthiscourse', 'blog'), 'link' => new moodle_url('/blog/edit.php', array('action'=>'add', 'courseid'=>$course->id)) ); }
Fixed a string usage - no placeholder is expected here
moodle_moodle
train
php
9c3e106374afaac474a8681547c5ea697bec5008
diff --git a/session/session.go b/session/session.go index <HASH>..<HASH> 100644 --- a/session/session.go +++ b/session/session.go @@ -2209,6 +2209,7 @@ var builtinGlobalVariable = []string{ variable.InnodbLockWaitTimeout, variable.WindowingUseHighPrecision, variable.SQLSelectLimit, + variable.DefaultWeekFormat, /* TiDB specific global variables: */ variable.TiDBSkipASCIICheck, diff --git a/session/session_test.go b/session/session_test.go index <HASH>..<HASH> 100644 --- a/session/session_test.go +++ b/session/session_test.go @@ -3816,3 +3816,13 @@ func (s *testSessionSerialSuite) TestCoprocessorOOMAction(c *C) { se.Close() } } + +// TestDefaultWeekFormat checks for issue #21510. +func (s *testSessionSerialSuite) TestDefaultWeekFormat(c *C) { + tk1 := testkit.NewTestKitWithInit(c, s.store) + tk1.MustExec("set @@global.default_week_format = 4;") + defer tk1.MustExec("set @@global.default_week_format = default;") + + tk2 := testkit.NewTestKitWithInit(c, s.store) + tk2.MustQuery("select week('2020-02-02'), @@default_week_format, week('2020-02-02');").Check(testkit.Rows("6 4 6")) +}
session: add default_week_format to builtinGlobalVariable (#<I>)
pingcap_tidb
train
go,go
14316dfcaa5d3ea962490a9e24843cbdbb28e49c
diff --git a/lib/ruboto/version.rb b/lib/ruboto/version.rb index <HASH>..<HASH> 100644 --- a/lib/ruboto/version.rb +++ b/lib/ruboto/version.rb @@ -1,4 +1,4 @@ module Ruboto - VERSION = '0.8.1.rc.1' + VERSION = '0.8.1' UPDATE_VERSION_LIMIT = '0.5.2' end
* Bumped version to <I> for release.
ruboto_ruboto
train
rb
89223232ad0bf99ba4c0c2368738d4c1ac3c7c7a
diff --git a/examples/py/async-tickers-mult-exchanges.py b/examples/py/async-tickers-mult-exchanges.py index <HASH>..<HASH> 100644 --- a/examples/py/async-tickers-mult-exchanges.py +++ b/examples/py/async-tickers-mult-exchanges.py @@ -4,11 +4,6 @@ import asyncio import ccxt import ccxt.async_support as ccxta # noqa: E402 import time -import os -import sys - -root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -sys.path.append(root + '/python') def sync_client(exchange):
PEP8 compliant - v2 removing too long line
ccxt_ccxt
train
py
f26c955daa612b1601c12703d7cda15292bffd8a
diff --git a/lib/utils.js b/lib/utils.js index <HASH>..<HASH> 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -88,6 +88,8 @@ function methodObj(obj) { function wireFriendly(obj) { if(_.isArray(obj)) { return _.map(obj, wireFriendly); + } else if(_.isString(obj)) { + return obj; } var newObj = {};
Improve: Make wireFriendly work better with strings
CodeboxIDE_codebox
train
js
b2332584556de897c9af9d42bf83b68391fb75e6
diff --git a/lib/spec_corrector.js b/lib/spec_corrector.js index <HASH>..<HASH> 100644 --- a/lib/spec_corrector.js +++ b/lib/spec_corrector.js @@ -28,6 +28,9 @@ SpecCorrector.prototype.toValidator = function (value) { result = this.toVal(value); } } + else if (value == null) { + result = this.toVal(value); + } if (result == null) { throw new Error('Cannot convert to validator: ' + inspect(value)); }
corrector now replaces null and undefined with val()
dimsmol_valid
train
js
4cfc2b69b57c0befc246fb34d686171ce8367bb9
diff --git a/database/database.go b/database/database.go index <HASH>..<HASH> 100644 --- a/database/database.go +++ b/database/database.go @@ -48,7 +48,7 @@ import ( "github.com/garyburd/redigo/redis" "github.com/golang/gddo/doc" "github.com/golang/gddo/gosrc" - "github.com/golang/snappy/snappy" + "github.com/golang/snappy" ) type Database struct {
Update snappy import path. It has recently changed in <URL>
golang_gddo
train
go
1fd08d56fd3dba7ba7446cfb4a0cb2bf48119c9e
diff --git a/desktop/ui/src/main/java/org/datacleaner/util/DatastoreCreationUtil.java b/desktop/ui/src/main/java/org/datacleaner/util/DatastoreCreationUtil.java index <HASH>..<HASH> 100644 --- a/desktop/ui/src/main/java/org/datacleaner/util/DatastoreCreationUtil.java +++ b/desktop/ui/src/main/java/org/datacleaner/util/DatastoreCreationUtil.java @@ -57,7 +57,7 @@ public class DatastoreCreationUtil { final String extension = FilenameUtils.getExtension(file.getName()); for (FileDatastoreEnum datastoreType : EnumSet.allOf(FileDatastoreEnum.class)) { - if (datastoreType._extensions.contains(extension)) { + if (datastoreType._extensions.contains(extension.toLowerCase())) { return datastoreType; } }
Issue #<I>: Lowercasing the extension before comparison with the supported ones.
datacleaner_DataCleaner
train
java
6cf7fb4c922298aa198c4304e88b3e7582db37b2
diff --git a/sample/handler.php b/sample/handler.php index <HASH>..<HASH> 100644 --- a/sample/handler.php +++ b/sample/handler.php @@ -38,13 +38,27 @@ try { // logging data and throw exception throw new InvalidArgumentException('Order validation Error!'); } - // Just check order (check server status, check order in DB and etc) - if ('check' == $method) { - print $unitPay->getSuccessHandlerResponse('Check Success'); - // Method Pay means that the money received - } elseif ('pay' == $method) { - // Please complete order - print $unitPay->getSuccessHandlerResponse('Pay Success'); + + switch ($method) { + // Just check order (check server status, check order in DB and etc) + case 'check': + print $unitPay->getSuccessHandlerResponse('Check Success. Ready to pay.'); + break; + // Method Pay means that the money received + case 'pay': + // Please complete order + print $unitPay->getSuccessHandlerResponse('Pay Success'); + break; + // Method Error means that an error has occurred. + case 'error': + // Please log error text. + print $unitPay->getSuccessHandlerResponse('Error logged'); + break; + // Method Refund means that the money returned to the client + case 'refund': + // Please cancel the order + print $unitPay->getSuccessHandlerResponse('Order canceled'); + break; } // Oops! Something went wrong. } catch (Exception $e) {
Add "error" and "refund" method to sample handler.php
unitpay_php-sdk
train
php
165c001e658a502c496d5f60f5d1ec8e8a43624f
diff --git a/defaultConfig.js b/defaultConfig.js index <HASH>..<HASH> 100644 --- a/defaultConfig.js +++ b/defaultConfig.js @@ -606,4 +606,20 @@ module.exports = { '100': '1', }, + + /* + |-------------------------------------------------------------------------- + | Packages + |-------------------------------------------------------------------------- + | + | Here is where you can define the configuration for any Tailwind packages + | you're using. These can be utility packs, component bundles, or even + | complete themes. You'll want to reference the package documentation + | for a list of settings available for it. + | + */ + + packages: { + }, + }
Add "packages" key to config
tailwindcss_tailwindcss
train
js
f310bbe13f8331913c16e19707629de5f374d015
diff --git a/Parsedown.php b/Parsedown.php index <HASH>..<HASH> 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -48,6 +48,9 @@ class Parsedown # trim line breaks $markup = trim($markup, "\n"); + # clean up + $this->references = array(); + return $markup; } @@ -242,10 +245,6 @@ class Parsedown # ~ - $this->references = array(); - - # ~ - return $markup; }
nested calls to lines should not reset reference definitions
erusev_parsedown
train
php
72715056120342f5e15bb446fe35f7f3d0dbd5f5
diff --git a/aeron-system-tests/src/test/java/io/aeron/archive/ArchiveTest.java b/aeron-system-tests/src/test/java/io/aeron/archive/ArchiveTest.java index <HASH>..<HASH> 100644 --- a/aeron-system-tests/src/test/java/io/aeron/archive/ArchiveTest.java +++ b/aeron-system-tests/src/test/java/io/aeron/archive/ArchiveTest.java @@ -110,7 +110,6 @@ public class ArchiveTest private Thread replayConsumer = null; private Thread progressTracker = null; - private volatile boolean isTestComplete; @Before public void before() @@ -166,11 +165,6 @@ public class ArchiveTest @After public void after() { - if (!isTestComplete) - { - client.printCounters(System.err); - } - if (null != replayConsumer) { replayConsumer.interrupt(); @@ -226,8 +220,6 @@ public class ArchiveTest initialTermId, maxPayloadLength, messageCount); - - isTestComplete = true; } @Test(timeout = 10_000) @@ -272,8 +264,6 @@ public class ArchiveTest publishDataToBeRecorded(recordedPublication, messageCount); await(streamConsumed); - - isTestComplete = true; } @Test(timeout = 10_000) @@ -310,8 +300,6 @@ public class ArchiveTest initialTermId, maxPayloadLength, messageCount); - - isTestComplete = true; } private void preSendChecks(
[Java] Remove debugging code from ArchiveTest that is not needed.
real-logic_aeron
train
java
1db9746c5716be2ab1d8093bd81e76588ee80215
diff --git a/satpy/dataset.py b/satpy/dataset.py index <HASH>..<HASH> 100644 --- a/satpy/dataset.py +++ b/satpy/dataset.py @@ -251,7 +251,7 @@ class ValueList(IntEnum): try: wlklass = namedtuple("WavelengthRange", "min central max unit", defaults=('µm',)) -except NameError: # python 3.6 +except TypeError: # python 3.6 wlklass = namedtuple("WavelengthRange", "min central max unit") wlklass.__new__.__defaults__ = ('µm',)
Fix exception to catch when new namedtuple syntax is used
pytroll_satpy
train
py
4fe3cbe630ab4a898d16bf89fa5b2057ed4e0ac8
diff --git a/src/Commands/DeployCommand.php b/src/Commands/DeployCommand.php index <HASH>..<HASH> 100644 --- a/src/Commands/DeployCommand.php +++ b/src/Commands/DeployCommand.php @@ -27,7 +27,7 @@ class DeployCommand extends Command * * @return void */ - public function fire() + public function handle() { Bugsnag::deploy($this->option('repository'), $this->option('branch'), $this->option('revision')); @@ -35,6 +35,16 @@ class DeployCommand extends Command } /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $this->handle(); + } + + /** * Get the console command options. * * @return array
[deploy] Use the handle method (#<I>)
bugsnag_bugsnag-laravel
train
php
253a469fdbf361625295929a18956dc20e047e47
diff --git a/lib/NodeMcuConnector.js b/lib/NodeMcuConnector.js index <HASH>..<HASH> 100755 --- a/lib/NodeMcuConnector.js +++ b/lib/NodeMcuConnector.js @@ -91,11 +91,11 @@ NodeMcuConnector.prototype.connect = function(cb, applyConnectionCheck, connectD checkConnection(); }.bind(this)); - }.bind(this), 1000); + }.bind(this), 500); }.bind(this)); - }.bind(this), 1000); + }.bind(this), 500); }.bind(this));
the option now controls all 3 delays at once: connect<>wait<>sequence1<>wait<>sequence2<>wait<>connectionCheck #<I>
AndiDittrich_NodeMCU-Tool
train
js
cb0ab534fc779d60a4f5ed1379e8155dfc05b6e9
diff --git a/mintapi/signIn.py b/mintapi/signIn.py index <HASH>..<HASH> 100644 --- a/mintapi/signIn.py +++ b/mintapi/signIn.py @@ -335,8 +335,9 @@ def sign_in( driver.implicitly_wait(20) # seconds driver.get(url) if not beta: - element = driver.find_element_by_link_text("Sign in") - element.click() + # Add 1 second delay otherwise an issue occurs when trying to click the sign in button on home page + time.sleep(1) + home_page(driver) WebDriverWait(driver, 20).until( expected_conditions.presence_of_element_located( @@ -415,6 +416,11 @@ def sign_in( return status_message +def home_page(driver): + element = driver.find_element_by_link_text("Sign in") + element.click() + + def user_selection_page(driver): # click "Use a different user ID" if needed try:
[FIX] - Add a delay before the clicking sign in button (#<I>) * [FIX] - Add a delay before the click to resolve issues with getting to the sign in page * Attempt to use WebDriverWait but still errors out on clicking without a delay * Move WebDriveWait above original find element * Move assignment of sign in element and click to its own method * Add back 1 second delay to workaround the error with clicking the sign in button * Remove WebDriveWait * Fix black linter issues
mrooney_mintapi
train
py
1f0f374647c906ebcecdd87f23c62a8cb978bf0b
diff --git a/lib/waterline/adapter/sync/strategies/alter.js b/lib/waterline/adapter/sync/strategies/alter.js index <HASH>..<HASH> 100644 --- a/lib/waterline/adapter/sync/strategies/alter.js +++ b/lib/waterline/adapter/sync/strategies/alter.js @@ -82,7 +82,25 @@ module.exports = function(cb) { // The default "find all" will select each attribute in the schema, which // now includes attributes that haven't been added to the table yet, so // on SQL databases the query will fail with "unknown field" error. - self.find({select: attrs}, function (err, existingData) { + // + var hasSchema = self.query.hasSchema; + + // If we have a schema, make sure we only select the existing keys for the schema. + // The default "find all" will select each attribute in the schema, which + // now includes attributes that haven't been added to the table yet, so + // on SQL databases the query will fail with "unknown field" error. + // + // If we don't have a schema then we need to select all the values to make + // sure we don't lose data in the process. + var queryCriteria; + + if(hasSchema) { + queryCriteria = {select: attrs}; + } else { + queryCriteria = {}; + } + + self.find(queryCriteria, function (err, existingData) { if (err) { //
fix alter migration to work with schema: false
balderdashy_waterline
train
js
d70f60a93fd3df9212dad083da6c853662a0b782
diff --git a/minify.js b/minify.js index <HASH>..<HASH> 100644 --- a/minify.js +++ b/minify.js @@ -12,7 +12,6 @@ var ; var - minified_hash = {}, memCache = {} ; @@ -172,12 +171,6 @@ function cacheTryFile(hash, callback) if (typeof callback != 'function') return; - if (minified_hash[hash] !== undefined) - { - callback(false); - return; - } - var filepath = this.toString(); fs.stat(filepath + hash, callback); } @@ -203,7 +196,7 @@ function cacheTryMem(hash, callback) if (typeof callback != 'function') return; - callback(!minified_hash[hash]); + callback(typeof memCache[hash] == 'undefined'); } module.exports = function express_minify(options) @@ -339,8 +332,6 @@ module.exports = function express_minify(options) { cache_put(sha1, minized, function() { - minified_hash[sha1] = true; - write.call(_this, minized, 'utf8'); end.call(_this); });
leave OS FileSystem to determine whether to optimize file reading
breeswish_express-minify
train
js
b3a3d8397433bf4ff1eaa429bfd7f044e6c5ebec
diff --git a/lib/down/chunked_io.rb b/lib/down/chunked_io.rb index <HASH>..<HASH> 100644 --- a/lib/down/chunked_io.rb +++ b/lib/down/chunked_io.rb @@ -163,11 +163,13 @@ module Down remaining_length = data && length ? length - data.bytesize : length unless @buffer.nil? || remaining_length == 0 - buffered_data = if remaining_length && remaining_length < @buffer.bytesize - @buffer.byteslice(0, remaining_length) - else - @buffer - end + if remaining_length && remaining_length < @buffer.bytesize + buffered_data = @buffer.byteslice(0, remaining_length) + @buffer = @buffer.byteslice(remaining_length..-1) + else + buffered_data = @buffer + @buffer = nil + end if data data << buffered_data @@ -177,12 +179,6 @@ module Down cache.write(buffered_data) if cache - if buffered_data.bytesize < @buffer.bytesize - @buffer = @buffer.byteslice(buffered_data.bytesize..-1) - else - @buffer = nil - end - buffered_data.clear unless buffered_data.equal?(data) end
Remove duplication in conditionals in ChunkedIO
janko_down
train
rb
bf8aa72f4e2dbcc661cee969191dfafe353579a0
diff --git a/src/nwmatcher.js b/src/nwmatcher.js index <HASH>..<HASH> 100644 --- a/src/nwmatcher.js +++ b/src/nwmatcher.js @@ -685,17 +685,17 @@ NW.Dom = function(global) { if ((match = selector.match(Selectors[name].Expression))) { result = Selectors[name].Callback(match, source); source = result.source; - status = result.status; - } - // if an extension fails to parse the selector - // it must return a false boolean in "status" - if (!status) { - // log error but continue execution, don't throw real exceptions - // because blocking following processes maybe is not a good idea - emit('DOMException: unknown pseudo selector "' + selector + '"'); - return source; + status |= result.status; } } + // if an extension fails to parse the selector + // it must return a false boolean in "status" + if (!status) { + // log error but continue execution, don't throw real exceptions + // because blocking following processes maybe is not a good idea + emit('DOMException: unknown pseudo selector "' + selector + '"'); + return source; + } } else { // see above, log error but continue execution
corrected behavior for selector extensions, status of each external selector should be ORed and error check should be moved out of the loop
dperini_nwmatcher
train
js
993ed103bbb57f4b9e66e7acc5fc3c4b99443507
diff --git a/tests/test_solver.py b/tests/test_solver.py index <HASH>..<HASH> 100644 --- a/tests/test_solver.py +++ b/tests/test_solver.py @@ -220,7 +220,16 @@ def test_composite_solver(): nose.tools.assert_equal(len(s._solver_list), 4) # the CONCRETE one nose.tools.assert_false(s.satisfiable()) +def test_minmax(): + s = claripy.FullFrontend(claripy.backend_z3) + x = claripy.BVS("x", 32) + + nose.tools.assert_equal(s.max(x), 2**32-1) + nose.tools.assert_equal(s.min(x), 0) + nose.tools.assert_true(s.satisfiable()) + if __name__ == '__main__': + test_minmax() test_solver() test_solver_branching() test_combine()
adding a test for the crazy issue i just fixed -- just tests min and max
angr_claripy
train
py
29df7b3563f6b60eae40ded096d2537c2e835de1
diff --git a/python/kappa_common.py b/python/kappa_common.py index <HASH>..<HASH> 100644 --- a/python/kappa_common.py +++ b/python/kappa_common.py @@ -26,6 +26,9 @@ class FileMetadata(object): def get_file_id(self): return(self.file_metadata_id) +def stringAsFile(content,position=1): + return(File(FileMetadata("inlined_input",position),content)) + class File(object): def __init__(self,
python wrapper to represent kappa code as a kappa file
Kappa-Dev_KaSim
train
py
cc836859a8cd5ee14224a27a0825aaea70382afb
diff --git a/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java b/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java index <HASH>..<HASH> 100644 --- a/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java +++ b/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java @@ -1067,11 +1067,15 @@ public class ASTHelpers { return types.isSubtype(types.erasure(s), types.erasure(t)); } - /** Returns true if {@code t} is a subtype of Exception but not a subtype of RuntimeException. */ + /** + * Returns true if {@code t} is a subtype of Throwable but not a subtype of RuntimeException or + * Error. + */ public static boolean isCheckedExceptionType(Type t, VisitorState state) { Symtab symtab = state.getSymtab(); - return isSubtype(t, symtab.exceptionType, state) - && !isSubtype(t, symtab.runtimeExceptionType, state); + return isSubtype(t, symtab.throwableType, state) + && !isSubtype(t, symtab.runtimeExceptionType, state) + && !isSubtype(t, symtab.errorType, state); } /** Returns true if {@code erasure(s)} is castable to {@code erasure(t)}. */
ASTHelpers.isCheckedExceptionType: match with definition in JLS <I>: "... the checked exception classes are Throwable and all its subclasses other than RuntimeException and its subclasses and Error and its subclasses." ------------- Created by MOE: <URL>
google_error-prone
train
java
72bd6c4efbeed92d72f67ad45778701db0d7673c
diff --git a/penn/fitness.py b/penn/fitness.py index <HASH>..<HASH> 100644 --- a/penn/fitness.py +++ b/penn/fitness.py @@ -58,7 +58,7 @@ class Fitness(object): for item in soup.findAll("div", {"class": "barChart"}): data = [x.strip() for x in item.get_text("\n").strip().split("\n")] data = [x for x in data if x] - name = re.sub(r"\s*(Hours)?\s*-?\s*(CLOSED|OPEN)?$", "", data[0], re.I).strip().title() + name = re.sub(r"\s*(Hours)?\s*-?\s*(CLOSED|OPEN)?$", "", data[0], re.I).strip() output.append({ "name": name, "open": "Open" in data[1],
don't titleize (messes up numbering 1st 2nd 3rd)
pennlabs_penn-sdk-python
train
py
b5d35cceacd847440ee4442427ce17ef26a4fd3a
diff --git a/main.go b/main.go index <HASH>..<HASH> 100644 --- a/main.go +++ b/main.go @@ -346,11 +346,10 @@ func funcSignature(t types.Type) *types.Signature { switch x := t.(type) { case *types.Signature: return x - case *types.Basic: - // maybe we want to do something with these? - return nil + case *types.Named: + return funcSignature(x.Underlying()) default: - return funcSignature(t.Underlying()) + return nil } }
More robust func signature fetching Avoid stack overflows by going lower only when we know we can.
mvdan_interfacer
train
go
e115cbf55167f3a3034c433f5525b057250be7d1
diff --git a/src/test/java/rx/debug/DebugHookTest.java b/src/test/java/rx/debug/DebugHookTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/rx/debug/DebugHookTest.java +++ b/src/test/java/rx/debug/DebugHookTest.java @@ -13,6 +13,7 @@ import org.hamcrest.BaseMatcher; import org.hamcrest.Description; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.mockito.InOrder; @@ -85,6 +86,7 @@ public class DebugHookTest { } @SuppressWarnings("unchecked") + @Ignore @Test public void testSimple() { TestDebugNotificationListener listener = new TestDebugNotificationListener(); @@ -107,6 +109,7 @@ public class DebugHookTest { } @SuppressWarnings("unchecked") + @Ignore @Test public void testOneOp() { TestDebugNotificationListener listener = new TestDebugNotificationListener();
Ignoring broken unit tests until fixed /cc @abersnaze
ReactiveX_RxJavaDebug
train
java
463d1bcac24312741ddb21f39a0b70ef51aa0ecf
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -301,7 +301,7 @@ return it; } - function deleteValueAtPath(target, path) { + function unsetValueAtPath(target, path) { var it; var len; var end; @@ -390,10 +390,10 @@ return typeof ($compiledGetter(target)) !== 'undefined'; } }, - delete: { + unset: { enumerable: true, value: function (target) { - return deleteValueAtPath(target, localPath); + return unsetValueAtPath(target, localPath); } }, concat: { @@ -551,8 +551,8 @@ return setValueAtPath(target, val, pickDecoder(ptr)(ptr), force); }; - JsonPointer.delete = function (target, ptr) { - return deleteValueAtPath(target, pickDecoder(ptr)(ptr)); + JsonPointer.unset = function (target, ptr) { + return unsetValueAtPath(target, pickDecoder(ptr)(ptr)); }; JsonPointer.list = function (target, fragmentId) {
[PR-<I>-delete-support] Change method signature to unset.
flitbit_json-ptr
train
js
b94e2bd0eca5a9e62f83a0f4748eaaae3dea2426
diff --git a/terminal/command.go b/terminal/command.go index <HASH>..<HASH> 100644 --- a/terminal/command.go +++ b/terminal/command.go @@ -819,6 +819,9 @@ func (c *Commands) sourceCommand(t *Term, args string) error { } func digits(n int) int { + if n <= 0 { + return 1 + } return int(math.Floor(math.Log10(float64(n)))) + 1 } diff --git a/terminal/command_test.go b/terminal/command_test.go index <HASH>..<HASH> 100644 --- a/terminal/command_test.go +++ b/terminal/command_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/derekparker/delve/proc/test" + "github.com/derekparker/delve/service/api" ) func TestCommandDefault(t *testing.T) { @@ -98,3 +99,8 @@ func TestExecuteFile(t *testing.T) { t.Fatalf("Wrong counts break: %d trace: %d\n", breakCount, traceCount) } } + +func TestIssue354(t *testing.T) { + printStack([]api.Stackframe{ }, "") + printStack([]api.Stackframe{{api.Location{PC: 0, File: "irrelevant.go", Line: 10, Function: nil}, nil, nil}}, "") +}
terminal/command: stack command panics when stack has 1 frame Insure that the digits function always returns at least 1. Fixes #<I> (partial)
go-delve_delve
train
go,go
83904cf5437d1815897790f8b60c20d9383ace62
diff --git a/cmd/goapp/web.go b/cmd/goapp/web.go index <HASH>..<HASH> 100644 --- a/cmd/goapp/web.go +++ b/cmd/goapp/web.go @@ -185,6 +185,10 @@ func runWeb(ctx context.Context, args []string) { defer os.Unsetenv("GOAPP_SERVER_ADDR") printVerbose("starting server") + if err := os.Chdir(wappname); err != nil { + fail("%s", err) + } + if err := execute(ctx, server, args...); err != nil { fail("%s", err) }
Fix goapp web run (#<I>)
maxence-charriere_app
train
go
1ed445508e7053252eb1576f7fefedaa8700c98b
diff --git a/mtools/util/logevent.py b/mtools/util/logevent.py index <HASH>..<HASH> 100644 --- a/mtools/util/logevent.py +++ b/mtools/util/logevent.py @@ -360,7 +360,7 @@ class LogEvent(object): if not self._sort_pattern: # trigger evaluation of operation - if self.operation in ['query', 'getmore', 'update', 'remove']: + if self.operation in ['query', 'getmore']: self._sort_pattern = self._find_pattern('orderby: ') return self._sort_pattern @@ -513,11 +513,9 @@ class LogEvent(object): def _find_pattern(self, trigger): - print "trigger", trigger # get start of json query pattern start_idx = self.line_str.rfind(trigger) - print "start_idx", start_idx if start_idx == -1: # no query pattern found return None @@ -535,7 +533,6 @@ class LogEvent(object): if brace_counter == 0: break search_str = search_str[:stop_idx+1].strip() - print "search_str", search_str if search_str: return json2pattern(search_str) else:
removed debug prints, and sort_pattern only makes sense for queries / getmores. not updates / removes.
rueckstiess_mtools
train
py
4abd7baafcd982993471d5c0137d4b506ea49e8b
diff --git a/src/runcommands/util/enums.py b/src/runcommands/util/enums.py index <HASH>..<HASH> 100644 --- a/src/runcommands/util/enums.py +++ b/src/runcommands/util/enums.py @@ -11,10 +11,28 @@ from .misc import isatty if isatty(sys.stdout) and os.getenv("TERM"): Terminal = blessings.Terminal else: + # XXX: Mock terminal that returns "" for all attributes + class TerminalValue: + registry = {} + + @classmethod + def get(cls, name): + if name not in cls.registry: + cls.registry[name] = cls(name) + return cls.registry[name] + + def __init__(self, name): + self.name = name + + def __repr__(self): + return f"{self.__class__.__name__}({self.name})" + + def __str__(self): + return "" class Terminal: def __getattr__(self, name): - return "" + return TerminalValue.get(name) TERM = Terminal() @@ -34,7 +52,7 @@ class Color(enum.Enum): white = TERM.white def __str__(self): - return self.value + return str(self.value) class StreamOptions(enum.Enum):
Fix Color enum setup when TERM isn't set The previous version of this didn't work right because all the values were the same empty string. This works around that by creating distinct values that evaluate to "". Amends <I>b<I>ead<I>f7f<I>f1a<I>b<I>cdf
wylee_runcommands
train
py