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
|
---|---|---|---|---|---|
eb99ffe8ce819b0854ba9e6418af3cd5c61f3314
|
diff --git a/native-bindings.js b/native-bindings.js
index <HASH>..<HASH> 100644
--- a/native-bindings.js
+++ b/native-bindings.js
@@ -1,8 +1,11 @@
const path = require('path');
const bindings = require(path.join(__dirname, 'build', 'Release', 'exokit.node'));
const {nativeGl, nativeVr} = bindings;
+const WindowWorker = require('window-worker');
const webGlToOpenGl = require('webgl-to-opengl');
+bindings.nativeWorker = WindowWorker;
+
let shaderId = 0;
bindings.nativeGl = (nativeGl => function WebGLContext() {
const result = new nativeGl();
|
Add nativeWorker to native bindings module
|
exokitxr_exokit
|
train
|
js
|
7181a3b5da3754a19b43e119bc9ad61cc328b315
|
diff --git a/mod1/index.php b/mod1/index.php
index <HASH>..<HASH> 100644
--- a/mod1/index.php
+++ b/mod1/index.php
@@ -81,7 +81,7 @@ class tx_imageautoresize_module1 extends \TYPO3\CMS\Backend\Module\BaseScriptCla
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$docHeaderButtons = $this->getButtons();
- $this->doc->form = '<form action="" method="post" name="' . $this->tceforms->formName . '">';
+ $this->doc->form = '<form action="" method="post" name="editform">';
// Render content:
$this->moduleContent();
@@ -316,7 +316,9 @@ class tx_imageautoresize_module1 extends \TYPO3\CMS\Backend\Module\BaseScriptCla
*/
protected function initTCEForms() {
$this->tceforms = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormEngine');
- $this->tceforms->initDefaultBEMode();
+ if (version_compare(TYPO3_version, '7.2.99', '<=')) {
+ $this->tceforms->initDefaultBEMode();
+ }
$this->tceforms->doSaveFieldName = 'doSave';
$this->tceforms->localizationMode = '';
$this->tceforms->palettesCollapsed = 0;
|
[BUGFIX] Call to undefined method in TYPO3 master (<I>-dev)
Change-Id: I<I>a1e3a<I>de3d9da6d7c<I>b<I>b<I>a<I>
Resolves: #<I>
Reviewed-on: <URL>
|
xperseguers_t3ext-image_autoresize
|
train
|
php
|
0e29c2d7f2ccbb780335c86e39f5ae3b0b581971
|
diff --git a/src/updaters/updateSyncErrors.js b/src/updaters/updateSyncErrors.js
index <HASH>..<HASH> 100644
--- a/src/updaters/updateSyncErrors.js
+++ b/src/updaters/updateSyncErrors.js
@@ -32,11 +32,11 @@ export default function updateSyncErrors ([state, effects]: StateEffects, type:
const updateState = cond([
[
type => (((type === UPDATE_FIELD && validateSingle) || type === VALIDATE_FIELD) && name !== ''),
- always([assocPath(['errors', name], errors[name], state), effects])
+ always([assocPath(['errors', name], errors[name], state), effects]),
],
[
type => (type === UPDATE_ALL || type === VALIDATE_ALL),
- always([assoc('errors', errors, state), effects])
+ always([assoc('errors', errors, state), effects]),
],
[T, always([state, effects])],
])
|
Minor change to fix linting issue
|
25th-floor_revalidation
|
train
|
js
|
4bcd09f83e0ddd245e8f074596a17cc7487b8afb
|
diff --git a/src/Makes/MakeView.php b/src/Makes/MakeView.php
index <HASH>..<HASH> 100644
--- a/src/Makes/MakeView.php
+++ b/src/Makes/MakeView.php
@@ -28,6 +28,7 @@ class MakeView
$this->files = $files;
$this->scaffoldCommandObj = $scaffoldCommand;
$this->viewName = $viewName;
+ $this->getSchemaArray();
$this->start();
}
@@ -42,7 +43,7 @@ class MakeView
{
if($this->scaffoldCommandObj->option('schema') != null){
if ($schema = $this->scaffoldCommandObj->option('schema')) {
- $schemaArray = (new SchemaParser)->parse($schema);
+ $this->schemaArray = (new SchemaParser)->parse($schema);
}
}
}
|
fix the bug on mount the list of attr schema -view
|
laralib_l5scaffold
|
train
|
php
|
7984bac9e4c85af2f47205750c29dcb9f06c4de8
|
diff --git a/tests/test_pa_autoconfigure_django.py b/tests/test_pa_autoconfigure_django.py
index <HASH>..<HASH> 100644
--- a/tests/test_pa_autoconfigure_django.py
+++ b/tests/test_pa_autoconfigure_django.py
@@ -67,7 +67,7 @@ class TestMain:
'runserver'
])
process_killer.append(server)
- time.sleep(1)
+ time.sleep(2)
response = requests.get('http://localhost:8000/', headers={'HOST': 'mydomain.com'})
assert 'Hello from an example django project' in response.text
|
reduces flakyness of semi-functional test
|
pythonanywhere_helper_scripts
|
train
|
py
|
65cc76f72120a7784cf9e324351278f2cb8c11cc
|
diff --git a/tests/UuidTest.php b/tests/UuidTest.php
index <HASH>..<HASH> 100644
--- a/tests/UuidTest.php
+++ b/tests/UuidTest.php
@@ -1270,7 +1270,7 @@ class UuidTest extends TestCase
$featureSet->setTimeProvider($timeOfDay);
- Uuid::setFactory(new UuidFactory($featureSet));;
+ Uuid::setFactory(new UuidFactory($featureSet));
$uuidB = Uuid::uuid1(0x00007ffffffe, 0x1669);
$this->assertEquals('1419d680-d292-1165-9669-00007ffffffe', (string)$uuidB);
|
remove extra `;` causing PHPCBF to fail
|
ramsey_uuid
|
train
|
php
|
3169d1898566ba01c94f1c4164a23c6b117b286c
|
diff --git a/src/photini/__init__.py b/src/photini/__init__.py
index <HASH>..<HASH> 100644
--- a/src/photini/__init__.py
+++ b/src/photini/__init__.py
@@ -1,4 +1,4 @@
from __future__ import unicode_literals
__version__ = '2017.04.0'
-build = '740 (0d47a00)'
+build = '741 (31cc550)'
diff --git a/src/photini/data/openstreetmap/script.js b/src/photini/data/openstreetmap/script.js
index <HASH>..<HASH> 100644
--- a/src/photini/data/openstreetmap/script.js
+++ b/src/photini/data/openstreetmap/script.js
@@ -115,7 +115,6 @@ function markerClick(event)
function markerDrag(event)
{
var loc = this.getLatLng();
- python.marker_click(this._id);
python.marker_drag(loc.lat, loc.lng, this._id);
}
@@ -123,6 +122,7 @@ function markerDragEnd(event)
{
var loc = this.getLatLng();
python.marker_drag(loc.lat, loc.lng, this._id);
+ python.marker_click(this._id);
}
function delMarker(id)
|
Select OSM marker at end of drag instead of start
Doing so at the start resets the selection which resets the marker icon.
This stops the drag as soon as it is started.
|
jim-easterbrook_Photini
|
train
|
py,js
|
ac1428b1dee76bf029fb925e2ee51f81229e3a48
|
diff --git a/code/AuditHook.php b/code/AuditHook.php
index <HASH>..<HASH> 100644
--- a/code/AuditHook.php
+++ b/code/AuditHook.php
@@ -146,7 +146,7 @@ class AuditHook extends SiteTreeExtension
}
// log PermissionRole being added to a Group
- if ($table === 'Group_Roles') {
+ if ($table === $schema->tableName(Group::class) . '_Roles') {
$role = PermissionRole::get()->byId($details['fields']['PermissionRoleID']);
$group = Group::get()->byId($details['fields']['GroupID']);
@@ -169,7 +169,7 @@ class AuditHook extends SiteTreeExtension
}
// log Member added to a Group
- if ($table === 'Group_Members') {
+ if ($table === $schema->tableName(Group::class) . '_Members') {
$member = Member::get()->byId($details['fields']['MemberID']);
$group = Group::get()->byId($details['fields']['GroupID']);
|
FIX Use DataObjectSchema to resolve many many relation parent class table name
|
silverstripe_silverstripe-auditor
|
train
|
php
|
1326bce60e2ec1dabdc14bb7934b5ca8e20e9b72
|
diff --git a/mode/coffeescript/coffeescript.js b/mode/coffeescript/coffeescript.js
index <HASH>..<HASH> 100644
--- a/mode/coffeescript/coffeescript.js
+++ b/mode/coffeescript/coffeescript.js
@@ -263,10 +263,12 @@ CodeMirror.defineMode("coffeescript", function(conf) {
if (current === "return") {
state.dedent += 1;
}
+ if ((current === "->" || current === "=>"))
+ console.log(!state.lambda, state.scope.type == "coffee", stream.peek());
if (((current === "->" || current === "=>") &&
!state.lambda &&
state.scope.type == "coffee" &&
- stream.peek() === "")
+ !stream.peek())
|| style === "indent") {
indent(stream, state);
}
|
[coffeescript mode] Fix indentation after arrow
|
codemirror_CodeMirror
|
train
|
js
|
cfae90075f421a454e149659f6c6f4bb74778519
|
diff --git a/iarm/arm_instructions/_meta.py b/iarm/arm_instructions/_meta.py
index <HASH>..<HASH> 100644
--- a/iarm/arm_instructions/_meta.py
+++ b/iarm/arm_instructions/_meta.py
@@ -111,7 +111,7 @@ class _Meta(iarm.cpu.RegisterCpu):
return self.convert_to_integer(match.groups()[0])
def convert_to_integer(self, str):
- if str.startswith('0x'):
+ if str.startswith('0x') or str.startswith('0X'):
return int(str, 16)
elif str.startswith('2_'):
return int(str[2:], 2)
|
convert_to_integer works on both lowercase and uppercase
|
DeepHorizons_iarm
|
train
|
py
|
1364dca5a6e4293acc6a289aac41a32d226c759a
|
diff --git a/lnpeer/peer.go b/lnpeer/peer.go
index <HASH>..<HASH> 100644
--- a/lnpeer/peer.go
+++ b/lnpeer/peer.go
@@ -33,4 +33,10 @@ type Peer interface {
// Address returns the network address of the remote peer.
Address() net.Addr
+
+ // QuitSignal is a method that should return a channel which will be
+ // sent upon or closed once the backing peer exits. This allows callers
+ // using the interface to cancel any processing in the event the backing
+ // implementation exits.
+ QuitSignal() <-chan struct{}
}
|
lnpeer: extend Peer interface with new QuitSignal method
In this commit, we extend the Peer interface with a new QuitSignal
method. This method is meant to expose a read-only quit channel which
will allow callers to cancel any actions based on the lifetime of the
underlying peer.
|
lightningnetwork_lnd
|
train
|
go
|
18896671e5a8f0c51e60178002a641bdb1abbedd
|
diff --git a/lib/protocol.js b/lib/protocol.js
index <HASH>..<HASH> 100644
--- a/lib/protocol.js
+++ b/lib/protocol.js
@@ -25,6 +25,8 @@ var Protocol = function(socket, data) {
events.EventEmitter.call(this);
+ this.clock = 0; // used by subscriptions
+
this._cable = cable();
this._cable.on('message', function(message, cb) {
var opcode = message[0];
diff --git a/lib/subscriptions.js b/lib/subscriptions.js
index <HASH>..<HASH> 100644
--- a/lib/subscriptions.js
+++ b/lib/subscriptions.js
@@ -3,9 +3,12 @@ var events = require('events');
module.exports = function() {
var that = new events.EventEmitter();
var subs = {};
+ var clock = 0;
var publish = function(name, id, origin, data) {
return function(protocol) {
+ if (protocol.clock === clock) return;
+ protocol.clock = clock;
protocol[name](id, origin, data);
};
};
@@ -28,6 +31,7 @@ module.exports = function() {
};
that.publish = function(name, id, origin, data) {
+ clock = ++clock & 1023;
if (subs[id]) subs[id].forEach(publish(name, id, origin, data));
if (subs['*']) subs['*'].forEach(publish(name, id, origin, data));
};
|
ensuring no duplicate events by using a simple clock. fixes #5
|
mafintosh_hms
|
train
|
js,js
|
73f15b22083e64d3ef410d70cd5daf63ea487f0d
|
diff --git a/tests/gui/test_notifications.py b/tests/gui/test_notifications.py
index <HASH>..<HASH> 100755
--- a/tests/gui/test_notifications.py
+++ b/tests/gui/test_notifications.py
@@ -1321,15 +1321,15 @@ def test_state_add_remove_notification(caplog):
# check state
state_model_observer = states_observer_dict[state_dict['Nested'].get_path()]
- check_count_of_model_notifications(state_model_observer, {'state': 1, 'states': 3})
+ check_count_of_model_notifications(state_model_observer, {'state': 1, 'states': 5})
# check parent
state_model_observer = states_observer_dict[state_dict['State3'].get_path()]
- check_count_of_model_notifications(state_model_observer, {'states': 3})
+ check_count_of_model_notifications(state_model_observer, {'states': 5})
# check grand parent
state_model_observer = states_observer_dict[state_dict['Container'].get_path()]
- check_count_of_model_notifications(state_model_observer, {'states': 3})
+ check_count_of_model_notifications(state_model_observer, {'states': 5})
sm_model.destroy()
rafcon.gui.singleton.global_gui_config.load()
|
Tests: Fix notification test
When a state is deleted, also its aborted and preempted outcome are now
deleted, causing two additional notifications.
|
DLR-RM_RAFCON
|
train
|
py
|
87d34e2fd3bf04e3885245bb1ba7d6a82c2e7a78
|
diff --git a/lib/dalli/client.rb b/lib/dalli/client.rb
index <HASH>..<HASH> 100644
--- a/lib/dalli/client.rb
+++ b/lib/dalli/client.rb
@@ -1,3 +1,4 @@
+# encoding: ascii
module Dalli
class Client
|
Mark as ascii so the key regexp works in UTF8-default environments,
closes GH-<I>
|
petergoldstein_dalli
|
train
|
rb
|
91ff2d7bdc347c88d6e8df03f7c46805d680425f
|
diff --git a/src/geo/ui/mobile.js b/src/geo/ui/mobile.js
index <HASH>..<HASH> 100644
--- a/src/geo/ui/mobile.js
+++ b/src/geo/ui/mobile.js
@@ -631,11 +631,11 @@ cdb.geo.ui.Mobile = cdb.core.View.extend({
},
- _renderLayer: function(layer_data) {
+ _renderLayer: function(data) {
- var hasLegend = layer_data.get("legend") && (layer_data.get("legend").type !== "none" || layer_data.get("legend").type);
+ var hasLegend = data.get("legend") && data.get("legend").type !== "" && data.get("legend").type !== "none";
- // When the layer selector is disabled, don't show the layers that don't have legends
+ // When the layer selector is disabled, don't show the layer if it doesn't have legends
if (!this.hasLayerSelector && !hasLegend) return;
var hide_toggle = (this.layers.length == 1 || !this.hasLayerSelector);
@@ -647,7 +647,7 @@ cdb.geo.ui.Mobile = cdb.core.View.extend({
}
var layer = new cdb.geo.ui.MobileLayer({
- model: layer_data,
+ model: data,
show_legends: show_legends,
show_title: !this.hasLayerSelector ? false : true,
hide_toggle: hide_toggle
|
hides layers with no legends when the layer_selector is disabled
|
CartoDB_carto.js
|
train
|
js
|
9ebc78b4d8fa230298b4028d51303dba68eac233
|
diff --git a/main/core/Listener/DataSource/ResourceSource.php b/main/core/Listener/DataSource/ResourceSource.php
index <HASH>..<HASH> 100644
--- a/main/core/Listener/DataSource/ResourceSource.php
+++ b/main/core/Listener/DataSource/ResourceSource.php
@@ -60,7 +60,7 @@ class ResourceSource
if (DataSource::CONTEXT_WORKSPACE === $event->getContext()) {
//parent allow to fetch things outside of the workspace.
- if (!array_key_exists('parent', $options['filters'])) {
+ if (isset($options['filters']) && !array_key_exists('parent', $options['filters'])) {
// only grab workspace root directory content
/** @var ResourceNode $workspaceRoot */
$workspaceRoot = $this->repository->findOneBy([
|
Update ResourceSource.php (#<I>)
Check if filter exists
|
claroline_Distribution
|
train
|
php
|
434c386c3c32d255fab68a00032eca2ff72c2243
|
diff --git a/test/index.js b/test/index.js
index <HASH>..<HASH> 100644
--- a/test/index.js
+++ b/test/index.js
@@ -18,4 +18,4 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-require('glob').sync(__dirname + '/{unit,integration}/*{_test,-test}.js').forEach(require);
+require('glob').sync(__dirname + '/{unit,integration}/**/*{_test,-test}.js').forEach(require);
|
include tests in sub-directories of test/unit and test/integration (#<I>)
|
esatterwhite_skyring
|
train
|
js
|
c8fceece6803308661b46945acbed0b8ddf32399
|
diff --git a/lib/imgManip.js b/lib/imgManip.js
index <HASH>..<HASH> 100644
--- a/lib/imgManip.js
+++ b/lib/imgManip.js
@@ -18,13 +18,21 @@ exports.computeDimensions = function (subject, dimensions) {
return vspawn(opts.identifyPath.val + ' -format %wx%h ' + subject, { getOutput: true })
.then((str) => {
var parts = str.split('x')
- var ratio = parseInt(parts[0], 10) / parseInt(parts[1], 10)
- if (!dimensions.width) {
- dimensions.width = '' + Math.round(ratio * parseInt(dimensions.height, 10))
- }
- if (!dimensions.height) {
- dimensions.height = '' + Math.round(parseInt(dimensions.width, 10) / ratio)
+ var w = parseInt(parts[0], 10)
+ var h = parseInt(parts[1], 10)
+ if (!dimensions.width && !dimensions.height) {
+ dimensions.width = w
+ dimensions.height = h
+ } else {
+ var ratio = w / h
+ if (!dimensions.width) {
+ dimensions.width = '' + Math.round(ratio * parseInt(dimensions.height, 10))
+ }
+ if (!dimensions.height) {
+ dimensions.height = '' + Math.round(parseInt(dimensions.width, 10) / ratio)
+ }
}
+
return dimensions
})
}
|
Allow omitting both width and height
|
vigour-io_shutter
|
train
|
js
|
b5da57cf9e2a9ed7ecc07b5862279b9d03170447
|
diff --git a/includes/class-freemius.php b/includes/class-freemius.php
index <HASH>..<HASH> 100755
--- a/includes/class-freemius.php
+++ b/includes/class-freemius.php
@@ -12169,7 +12169,7 @@
$is_marketing_allowed = null,
$plugin_id = null
) {
- return $this->activate_license(
+ $result = $this->activate_license(
$license_key,
$this->is_network_active() ?
$this->get_sites_for_network_level_optin() :
@@ -12178,6 +12178,11 @@
null,
$plugin_id
);
+
+ // No need to show the sticky after license activation notice after migrating a license.
+ $this->_admin_notices->remove_sticky( 'plan_upgraded' );
+
+ return $result;
}
/**
|
[license-migration] [tweak] Remove the sticky after license activation notice when migrating a license programmatically.
|
Freemius_wordpress-sdk
|
train
|
php
|
0ee2b1633caaf19542e9fde17e17d489545999a9
|
diff --git a/lib/transforms/addRelNoopenerToBlankTargetAnchors.js b/lib/transforms/addRelNoopenerToBlankTargetAnchors.js
index <HASH>..<HASH> 100644
--- a/lib/transforms/addRelNoopenerToBlankTargetAnchors.js
+++ b/lib/transforms/addRelNoopenerToBlankTargetAnchors.js
@@ -1,9 +1,8 @@
-module.exports = function (queryObj) {
+module.exports = function () {
return function addRelNoopenerToBlankTargetAnchors(assetGraph) {
var externalAnchors = assetGraph.findRelations({
type: 'HtmlAnchor',
- hrefType: 'absolute'
- // FIXME: also check that the relation is cross origin
+ crossorigin: true
}, true).filter(function (relation) {
return relation.node.getAttribute('target') === '_blank';
});
|
transforms/addRelNoopenerToBlankTargetAnchors: Use new crossorigin getter to determine which anchors to work on
|
assetgraph_assetgraph
|
train
|
js
|
3a45c79295bf350c5b2c8a951337565644555568
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -1,7 +1,7 @@
/**
* Web socket client for SUGOS
* @module sg-socket-client
- * @version 3.1.0
+ * @version 3.1.2
*/
'use strict'
|
[ci skip] Travis CI committed after build
|
realglobe-Inc_sg-socket-client
|
train
|
js
|
36c246acb36950aa08afa7599a1e21533cb94430
|
diff --git a/lib/debug-server.js b/lib/debug-server.js
index <HASH>..<HASH> 100644
--- a/lib/debug-server.js
+++ b/lib/debug-server.js
@@ -15,7 +15,7 @@ var http = require('http'),
function debugAction(req, res) {
if (!req.query.ws) {
- var newUrl = this.address();
+ var newUrl = this.address().url;
return res.redirect(newUrl);
}
res.sendFile(path.join(WEBROOT, 'inspector.html'));
|
Small fix: redirection in debug-server
|
node-inspector_node-inspector
|
train
|
js
|
433adfc09d2e2870293d15fc39bc386f9de66bb2
|
diff --git a/assert/doc.go b/assert/doc.go
index <HASH>..<HASH> 100644
--- a/assert/doc.go
+++ b/assert/doc.go
@@ -27,7 +27,37 @@
// Every assertion function also takes an optional string message as the final argument,
// allowing custom error messages to be appended to the message the assertion method outputs.
//
-// For example, here is the method signature for assert.Equal:
+// Here is an overview of the assert functions:
//
-// assert.Equal(t, expected, actual [, message])
+// assert.Equal(t, expected, actual [, message])
+//
+// assert.NotEqual(t, notExpected, actual [, message])
+//
+// assert.True(t, actualBool [, message])
+//
+// assert.False(t, actualBool [, message])
+//
+// assert.Nil(t, actualObject [, message])
+//
+// assert.NotNil(t, actualObject [, message])
+//
+// assert.Implements(t, (*MyInterface)(nil), new(MyObject) [,message])
+//
+// assert.IsType(t, expectedObject, actualObject [, message])
+//
+// assert.Contains(t, string, substring [, message])
+//
+// assert.NotContains(t, string, substring [, message])
+//
+// assert.Panics(t, func(){
+//
+// // call code that should panic
+//
+// } [, message])
+//
+// assert.NotPanics(t, func(){
+//
+// // call code that should not panic
+//
+// } [, message])
package assert
|
added assert function cheat sheet to doc
|
stretchr_testify
|
train
|
go
|
c028bb904297f4efe872c3c97e46f2b10e558579
|
diff --git a/openquake/calculators/event_based_risk.py b/openquake/calculators/event_based_risk.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/event_based_risk.py
+++ b/openquake/calculators/event_based_risk.py
@@ -561,8 +561,8 @@ class EbriskCalculator(base.RiskCalculator):
save_ruptures(self, ruptures_by_grp)
# determine the realizations
- rlzs_assoc = ssm.info.get_rlzs_assoc(
- count_ruptures=lambda grp: len(ruptures_by_grp.get(grp.id, 0)))
+ rlzs_assoc = ssm.info.get_rlzs_assoc()
+ # count_ruptures=lambda grp: len(ruptures_by_grp.get(grp.id, 0))
allargs = []
# prepare the risk inputs
ruptures_per_block = self.oqparam.ruptures_per_block
|
Removed logic tree reduction in event based risk
Former-commit-id: 9c7bd6c5d<I>edc<I>d<I>dec4d7f<I>ba5
|
gem_oq-engine
|
train
|
py
|
e33982af2dd4384b26336cbd2f7461d2df3807dd
|
diff --git a/mafan/download_data.py b/mafan/download_data.py
index <HASH>..<HASH> 100644
--- a/mafan/download_data.py
+++ b/mafan/download_data.py
@@ -5,6 +5,10 @@ files for use with Mafan, if you would find it necessary.
These files can be rather large, so they don't come with the
default mafan distribution.
"""
+
+from future.standard_library import install_aliases
+install_aliases()
+
import os
from urllib.request import Request, urlopen, urlsplit
|
Import urllib from future for Python 2 compatibility
|
hermanschaaf_mafan
|
train
|
py
|
51941adea3ddc461269b39a4a1c7a8c73195733c
|
diff --git a/abicheck.go b/abicheck.go
index <HASH>..<HASH> 100644
--- a/abicheck.go
+++ b/abicheck.go
@@ -160,8 +160,7 @@ func (c *Checker) parse(rev string) map[string]pkg {
return nil
}
- pkgName := src.Name.Name
- pkgFiles[pkgName] = append(pkgFiles[pkgName], src)
+ pkgFiles[ipkg.ImportPath] = append(pkgFiles[ipkg.ImportPath], src)
}
// Loop through all the parsed files and type check them
|
Set package name to be import path to avoid collisions
|
bradleyfalzon_apicompat
|
train
|
go
|
278c1b25d11537d3cdce6416aa27636bf6caf603
|
diff --git a/cmd/juju/commands/bootstrap.go b/cmd/juju/commands/bootstrap.go
index <HASH>..<HASH> 100644
--- a/cmd/juju/commands/bootstrap.go
+++ b/cmd/juju/commands/bootstrap.go
@@ -805,7 +805,7 @@ See `[1:] + "`juju kill-controller`" + `.`)
if hostedModel != nil {
modelNameToSet = c.hostedModelName
}
- if err = c.SetModelName(modelcmd.JoinModelName(c.controllerName, modelNameToSet), false); err != nil {
+ if err = c.SetModelIdentifier(modelcmd.JoinModelName(c.controllerName, modelNameToSet), false); err != nil {
return errors.Trace(err)
}
|
Bootstrap uses renamed SetModelIdentifier method to set local store model after bootstrap.
|
juju_juju
|
train
|
go
|
502c98c3388340d0bcd9168a533d9441e9c1e3e2
|
diff --git a/src/livestreamer/stream/hls.py b/src/livestreamer/stream/hls.py
index <HASH>..<HASH> 100644
--- a/src/livestreamer/stream/hls.py
+++ b/src/livestreamer/stream/hls.py
@@ -124,7 +124,11 @@ class HLSStreamFiller(Thread):
self.running = True
while self.running:
- entry = self.queue.get()
+ try:
+ entry = self.queue.get(True, 5)
+ except queue.Empty:
+ continue
+
self.download_sequence(entry)
if entry["sequence"] == self.stream.playlist_end:
|
stream.hls: Avoid potential dead lock.
|
streamlink_streamlink
|
train
|
py
|
26bd6a81c981a107ec0793c21fba8c2445c73474
|
diff --git a/lib/ffmpeg/transcoder.rb b/lib/ffmpeg/transcoder.rb
index <HASH>..<HASH> 100644
--- a/lib/ffmpeg/transcoder.rb
+++ b/lib/ffmpeg/transcoder.rb
@@ -6,7 +6,7 @@ module FFMPEG
@@timeout = 200
def self.timeout=(time)
- @@timeout = time == false ? false : time.to_i
+ @@timeout = time
end
def self.timeout
@@ -62,7 +62,7 @@ module FFMPEG
end
end
- if @@timeout != false
+ if @@timeout
stderr.each_with_timeout(pid, @@timeout, "r", &next_line)
else
stderr.each("r", &next_line)
|
Simplify usage of Transcoder#timeout.
- Casting had no specs and seemed overkill
- Any falsy value should do
|
streamio_streamio-ffmpeg
|
train
|
rb
|
0b7de38f13b6af6a7c535112b725b0f1f66a4738
|
diff --git a/can/bus.py b/can/bus.py
index <HASH>..<HASH> 100644
--- a/can/bus.py
+++ b/can/bus.py
@@ -29,6 +29,9 @@ class BusABC(object):
#: a string describing the underlying bus and/or channel
channel_info = 'unknown'
+ #: Log level for received messages
+ RECV_LOGGING_LEVEL = 9
+
@abstractmethod
def __init__(self, channel, can_filters=None, **config):
"""Construct and open a CAN bus instance of the specified type.
@@ -72,7 +75,7 @@ class BusABC(object):
# return it, if it matches
if msg and (already_filtered or self._matches_filters(msg)):
- LOG.log(9, 'Received: %s', msg)
+ LOG.log(self.RECV_LOGGING_LEVEL, 'Received: %s', msg)
return msg
# if not, and timeout is None, try indefinitely
|
Make recv log level configurable with class constant
|
hardbyte_python-can
|
train
|
py
|
5c4b028aac0035d73dec748cf01584199036f007
|
diff --git a/src/java/arjdbc/jdbc/RubyJdbcConnection.java b/src/java/arjdbc/jdbc/RubyJdbcConnection.java
index <HASH>..<HASH> 100644
--- a/src/java/arjdbc/jdbc/RubyJdbcConnection.java
+++ b/src/java/arjdbc/jdbc/RubyJdbcConnection.java
@@ -481,7 +481,7 @@ public class RubyJdbcConnection extends RubyObject {
return getInstanceVariable("@connection");
}
- @JRubyMethod(name = "active?")
+ @JRubyMethod(name = "active?", alias = "valid?")
public IRubyObject active_p(final ThreadContext context) {
IRubyObject connection = getInstanceVariable("@connection");
if ( connection != null && ! connection.isNil() ) {
|
alias jdbc_connection active? as valid? (just so its clearer on what it does)
|
jruby_activerecord-jdbc-adapter
|
train
|
java
|
1b777ef837735983ed709a648afc177f4f4351b4
|
diff --git a/src/playbacks/html5_video/html5_video.js b/src/playbacks/html5_video/html5_video.js
index <HASH>..<HASH> 100644
--- a/src/playbacks/html5_video/html5_video.js
+++ b/src/playbacks/html5_video/html5_video.js
@@ -356,8 +356,7 @@ export default class HTML5Video extends Playback {
this._bufferingState = buffering
if (buffering) {
this.trigger(Events.PLAYBACK_BUFFERING, this.name)
- }
- else {
+ } else {
this.trigger(Events.PLAYBACK_BUFFERFULL, this.name)
}
}
|
style(html5_video): fix wrong else indentation on _handleBufferingEvents
|
clappr_clappr
|
train
|
js
|
fd2002aab13903f8b21f066820b6e3e11fda02de
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
from setuptools import Command
import sys, os
-version = '0.1.0b'
+version = '0.1.0b2'
class PyTest(Command):
user_options = []
|
Released version <I>b2
|
Kotti_kotti_contactform
|
train
|
py
|
394f243a2e573730d8cb1d633b504509e4c05dd9
|
diff --git a/website/data/version.js b/website/data/version.js
index <HASH>..<HASH> 100644
--- a/website/data/version.js
+++ b/website/data/version.js
@@ -1,3 +1,3 @@
-export const VERSION = '1.6.1'
+export const VERSION = '1.6.2'
export const CHANGELOG_URL =
- 'https://github.com/hashicorp/vault/blob/master/CHANGELOG.md#161'
+ 'https://github.com/hashicorp/vault/blob/master/CHANGELOG.md#162'
|
Updating website to <I> (#<I>)
|
hashicorp_vault
|
train
|
js
|
76331f37bc1d9be312dc9073ac60148479fae5cd
|
diff --git a/erizo_controller/erizoController/models/ErizoList.js b/erizo_controller/erizoController/models/ErizoList.js
index <HASH>..<HASH> 100644
--- a/erizo_controller/erizoController/models/ErizoList.js
+++ b/erizo_controller/erizoController/models/ErizoList.js
@@ -28,7 +28,7 @@ class ErizoList extends EventEmitter {
}
onErizoReceived(position, callback) {
- this.on(this.getInternalPosition(position), callback);
+ this.once(this.getInternalPosition(position), callback);
}
getInternalPosition(position) {
@@ -71,7 +71,7 @@ class ErizoList extends EventEmitter {
erizo.erizoId = erizoId;
erizo.agentId = agentId;
erizo.erizoIdForAgent = erizoIdForAgent;
- this.emit(position, erizo);
+ this.emit(this.getInternalPosition(position), erizo);
}
}
|
Fix events on erizoList (#<I>)
|
lynckia_licode
|
train
|
js
|
31acf9cdd60e04557a2d870e313bbc471940f5b5
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -73,6 +73,7 @@ setup_kwargs = dict(
'testing/*/*.js',
'testing/*/*.png',
'testing/*/*.xml',
+ 'testing/*.pem',
'driver/*.js',
'proxy/proxy.crt',
'proxy/proxy.key',
|
setup.py: Readd pem file include
|
ArchiveTeam_wpull
|
train
|
py
|
6fd454176654ab73d34a71d2e98032e345379238
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,7 @@ setup(
'django>=1.6',
'django-class-based-auth-views>=0.2',
'django-piston==0.3.3',
- 'germanium==0.1.0',
+ 'germanium==0.1.1',
'django-block-snippets==0.0.7',
'python-dateutil>=2.2',
'pytz',
@@ -39,7 +39,7 @@ setup(
dependency_links=[
'https://github.com/matllubos/django-piston/tarball/master#egg=django-piston-0.3.3',
'https://github.com/matllubos/django-block-snippets/tarball/0.0.7#egg=django-block-snippets-0.0.7',
- 'https://github.com/LukasRychtecky/germanium/tarball/0.1.0#egg=germanium-0.1.0',
+ 'https://github.com/LukasRychtecky/germanium/tarball/0.1.1#egg=germanium-0.1.1',
],
zip_safe=False
)
|
Upgrade Germanium to <I>
|
matllubos_django-is-core
|
train
|
py
|
189caed411f0fcd2b86d5120e3c16f146594821b
|
diff --git a/devassistant/package_managers.py b/devassistant/package_managers.py
index <HASH>..<HASH> 100644
--- a/devassistant/package_managers.py
+++ b/devassistant/package_managers.py
@@ -435,11 +435,15 @@ class DependencyInstaller(object):
t.join()
type(self).install_lock = False
+ log_extra = {'event_type': 'dep_installation_end'}
if not installed:
msg = 'Failed to install dependencies, exiting.'
- raise exceptions.DependencyException(msg)
+ logger.error(msg, extra=log_extra)
+ ex = exceptions.DependencyException(msg)
+ ex.already_logged = True
+ raise ex
else:
- logger.info('Successfully installed dependencies!')
+ logger.info('Successfully installed dependencies!', extra=log_extra)
def install(self, struct):
"""
|
Add dep_installation_end for a logging message after installation end
|
devassistant_devassistant
|
train
|
py
|
0ee5358b2289f9af9d189ebc19089730286492bd
|
diff --git a/tests/test_compliance_fixes.py b/tests/test_compliance_fixes.py
index <HASH>..<HASH> 100644
--- a/tests/test_compliance_fixes.py
+++ b/tests/test_compliance_fixes.py
@@ -14,7 +14,6 @@ from oauthlib.oauth2.rfc6749.errors import InvalidGrantError
from requests_oauthlib import OAuth2Session
from requests_oauthlib.compliance_fixes import facebook_compliance_fix
from requests_oauthlib.compliance_fixes import fitbit_compliance_fix
-from requests_oauthlib.compliance_fixes import linkedin_compliance_fix
from requests_oauthlib.compliance_fixes import mailchimp_compliance_fix
from requests_oauthlib.compliance_fixes import weibo_compliance_fix
from requests_oauthlib.compliance_fixes import slack_compliance_fix
|
removed outdated linkedin compliance fixes - test compliance import
|
requests_requests-oauthlib
|
train
|
py
|
fc4250d5eb49ec30d32d8cc8d1fa1992e9fac260
|
diff --git a/lib/field/field.js b/lib/field/field.js
index <HASH>..<HASH> 100644
--- a/lib/field/field.js
+++ b/lib/field/field.js
@@ -180,6 +180,18 @@ exports.params = function(val) { // {{{2
return this;
};
+exports.describe = function(title, brief) { // {{{2
+ if (title) {
+ this.title = title;
+ }
+
+ if (brief) {
+ this.brief = brief;
+ }
+
+ return this;
+};
+
exports.iterPatch = function(wrap, patch, val) { // {{{2
/**
* @method iterPatch
|
Feature: `Field.describe(title, brief)`
|
OpenSmartEnvironment_ose
|
train
|
js
|
2a59235749593ac5ff0897ccc2f39f29dbfc9415
|
diff --git a/collapsible-motion/collapsible-motion.js b/collapsible-motion/collapsible-motion.js
index <HASH>..<HASH> 100644
--- a/collapsible-motion/collapsible-motion.js
+++ b/collapsible-motion/collapsible-motion.js
@@ -14,6 +14,7 @@ const createOpeningAnimation = height => keyframes`
overflow: hidden;
}
100% {
+ height: auto;
overflow: visible;
}
`;
|
fix(collapsible-motion): readds height: auto to css animation
|
commercetools_ui-kit
|
train
|
js
|
6853798f166e53ba6f6061beb29016ba10403444
|
diff --git a/examples/filter_unused_stops.py b/examples/filter_unused_stops.py
index <HASH>..<HASH> 100755
--- a/examples/filter_unused_stops.py
+++ b/examples/filter_unused_stops.py
@@ -18,6 +18,7 @@
"""Filter the unused stops out of a transit feed file."""
import optparse
+import sys
import transitfeed
|
Addex missing dependency on sys library.
|
google_transitfeed
|
train
|
py
|
46643a99948702f4662ca703258c7977f7e4a5c1
|
diff --git a/src/Engines/BaseEngine.php b/src/Engines/BaseEngine.php
index <HASH>..<HASH> 100644
--- a/src/Engines/BaseEngine.php
+++ b/src/Engines/BaseEngine.php
@@ -17,6 +17,8 @@ use Yajra\Datatables\Processors\DataProcessor;
* @package Yajra\Datatables\Engines
* @method setTransformer($transformer)
* @method setSerializer($transformer)
+ * @property mixed transformer
+ * @property mixed serializer
* @see https://github.com/yajra/laravel-datatables-fractal for transformer related methods.
* @author Arjay Angeles <[email protected]>
*/
|
Add doc property for transformer and serializer.
|
yajra_laravel-datatables
|
train
|
php
|
502482f077dc2c60159c657d0788fc408742fcc5
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -112,7 +112,10 @@ module.exports = co.wrap(function*(name, opts = {}) {
packageInfo[pkg.name] = pkg // Save package info for caching
config.externals = config.externals.concat(
- pkg.peerDependencies ? Object.keys(pkg.peerDependencies) : []
+ pkg.peerDependencies ? Object.keys(pkg.peerDependencies).filter(name => {
+ // Don't include packages in the `externals` if they are also in `entry`
+ return parsed.every(parsedPkg => parsedPkg.name !== name)
+ }) : []
)
})
})
|
fix: don't install peerDeps if they are used in entry
|
egoist_package-size
|
train
|
js
|
694104d2f08d69a19bc20fd6da6b38b658646ae4
|
diff --git a/src/main/groovy/io/GroovyPrintWriter.java b/src/main/groovy/io/GroovyPrintWriter.java
index <HASH>..<HASH> 100644
--- a/src/main/groovy/io/GroovyPrintWriter.java
+++ b/src/main/groovy/io/GroovyPrintWriter.java
@@ -78,11 +78,20 @@ public class GroovyPrintWriter extends PrintWriter
// Don't need to do this if Groovy is going to print char[] like a string.
// public void print(char[] x)
// {
-// super.write(InvokerHelper.toString(x));
+// write(InvokerHelper.toString(x));
// }
public void print(Object x)
{
- super.write(InvokerHelper.toString(x));
+ write(InvokerHelper.toString(x));
+ }
+
+ public void println(Object x)
+ {
+ // JDK 1.6 has changed the implementation to do a
+ // String.valueOf(x) rather than call print(x).
+ // Probably to improve performance by doing the conversion outside the lock.
+ // This will do the same thing for us, and we don't have to have access to the lock.
+ println(InvokerHelper.toString(x));
}
}
|
Fix breakage with JDK <I>. They changed PrintWriter.println(Object) to not call PrintWriter.print(Object) anymore.
git-svn-id: <URL>
|
apache_groovy
|
train
|
java
|
bd7324f723fff6332008867abde781315f3c2dcd
|
diff --git a/lib/airplay/browser.rb b/lib/airplay/browser.rb
index <HASH>..<HASH> 100644
--- a/lib/airplay/browser.rb
+++ b/lib/airplay/browser.rb
@@ -22,9 +22,16 @@ module Airplay
#
def browse
timeout(5) do
+ nodes = []
DNSSD.browse!(SEARCH) do |node|
- resolve(node)
- break unless node.flags.more_coming?
+ nodes << node
+ next if node.flags.more_coming?
+
+ nodes.each do |node|
+ resolve(node)
+ end
+
+ break
end
end
rescue Timeout::Error => e
@@ -121,8 +128,7 @@ module Airplay
# Returns nothing
#
def resolve(node)
- resolver = DNSSD::Service.new
- resolver.resolve(node) do |resolved|
+ DNSSD.resolve(node) do |resolved|
break unless node_resolver(node, resolved)
end
end
diff --git a/lib/airplay/cli/doctor.rb b/lib/airplay/cli/doctor.rb
index <HASH>..<HASH> 100644
--- a/lib/airplay/cli/doctor.rb
+++ b/lib/airplay/cli/doctor.rb
@@ -45,8 +45,7 @@ module Airplay
def try_resolving(node)
timeout(5) do
- resolver = DNSSD::Service.new
- resolver.resolve(node) do |resolved|
+ DNSSD.resolve(node) do |resolved|
devices << DebugDevice.new(node, resolved)
break unless resolved.flags.more_coming?
|
With the latest DNSSD, gather the nodes before resolving them
|
elcuervo_airplay
|
train
|
rb,rb
|
c442241f5d17ddadfcbabef915998139a490dc20
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -37,7 +37,7 @@ setup(
description='Swagger + Flask + Bravado = Client/Server auto-spawning',
install_requires=[
'flask==0.10.1',
- 'bravado-core==4.3.2',
+ 'bravado-core==4.9.1',
'pyyaml'
],
tests_require=[
|
Set botocore version in setup.py too
|
pymacaron_pymacaron-core
|
train
|
py
|
bcd73898f9bbcfed5f0b689322374f956f4c9653
|
diff --git a/src/js/binary.js b/src/js/binary.js
index <HASH>..<HASH> 100644
--- a/src/js/binary.js
+++ b/src/js/binary.js
@@ -207,6 +207,8 @@ export function sidebarCollapsible() {
const $target = $(e.target);
const was_active = $target.is('.selected');
+ if (!$target.is('a')) return;
+
$(sidebar).find('.active').removeClass('active');
$(sidebar).find('.selected').removeClass('selected');
|
handle case when non-anchor element is clicked
|
binary-com_binary-style
|
train
|
js
|
859d6dfa2bbb3f2cf39d173881794dc954e32fe2
|
diff --git a/parserator/training.py b/parserator/training.py
index <HASH>..<HASH> 100644
--- a/parserator/training.py
+++ b/parserator/training.py
@@ -27,9 +27,8 @@ def trainModel(training_data, module,
# given a list of xml training filepaths & a parser module,
# reads the xml & returns training data (for trainModel)
-def readTrainingData( xml_infile_list, module ):
+def readTrainingData( xml_infile_list, collection_tag ):
- collection_tag = module.GROUP_LABEL
full_xml = etree.Element(collection_tag)
component_string_list = []
|
tweak readTrainingData to take in group label instead of module
|
datamade_parserator
|
train
|
py
|
7902f6838b86466d6e634df3d5dc18047f136b52
|
diff --git a/cake/libs/inflector.php b/cake/libs/inflector.php
index <HASH>..<HASH> 100644
--- a/cake/libs/inflector.php
+++ b/cake/libs/inflector.php
@@ -429,9 +429,8 @@ class Inflector extends Object {
* @link http://book.cakephp.org/view/572/Class-methods
*/
function slug($string, $replacement = '_') {
- if (!class_exists('String')) {
- require LIBS . 'string.php';
- }
+ $quotedReplacement = preg_quote($replacement, '/');
+
$map = array(
'/à|á|å|â/' => 'a',
'/è|é|ê|ẽ|ë/' => 'e',
@@ -449,7 +448,7 @@ class Inflector extends Object {
'/ß/' => 'ss',
'/[^\w\s]/' => ' ',
'/\\s+/' => $replacement,
- String::insert('/^[:replacement]+|[:replacement]+$/', array('replacement' => preg_quote($replacement, '/'))) => '',
+ sprintf('/^[%s]+|[%s]+$/', $quotedReplacement, $quotedReplacement) => '',
);
return preg_replace(array_keys($map), array_values($map), $string);
}
|
Remvoving dependence on String class in Inflector::slug.
|
cakephp_cakephp
|
train
|
php
|
f9a16898a5afd77dd91da89cc1c6d215294e428e
|
diff --git a/src/ol/source/rastersource.js b/src/ol/source/rastersource.js
index <HASH>..<HASH> 100644
--- a/src/ol/source/rastersource.js
+++ b/src/ol/source/rastersource.js
@@ -31,6 +31,7 @@ goog.require('ol.source.Tile');
*
* @constructor
* @extends {ol.source.Image}
+ * @fires ol.source.RasterEvent
* @param {olx.source.RasterOptions} options Options.
* @api
*/
|
Add ol.source.Raster events on API docs page
|
openlayers_openlayers
|
train
|
js
|
e9ab4f5b8406d20c8e2437977bb4f41d12a21325
|
diff --git a/git.go b/git.go
index <HASH>..<HASH> 100644
--- a/git.go
+++ b/git.go
@@ -44,7 +44,16 @@ func gitHost() string {
if host := os.Getenv("HEROKU_GIT_HOST"); host != "" {
return host
}
- return host()
+ h := host()
+ if strings.HasPrefix(h, "http") {
+ u, err := url.Parse(h)
+ if err != nil {
+ Errln(err)
+ } else {
+ return u.Host
+ }
+ }
+ return h
}
func httpGitHost() string {
|
fix ssh git url for urls like "<URL>
|
heroku_cli
|
train
|
go
|
b706386985486e096520ce00aac14e24383432b7
|
diff --git a/src/main/java/org/redisson/client/RedisClient.java b/src/main/java/org/redisson/client/RedisClient.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/redisson/client/RedisClient.java
+++ b/src/main/java/org/redisson/client/RedisClient.java
@@ -75,16 +75,16 @@ public class RedisClient {
}
public RedisClient(String host, int port) {
- this(new NioEventLoopGroup(), NioSocketChannel.class, host, port, 3000);
+ this(new NioEventLoopGroup(), NioSocketChannel.class, host, port, 10000);
hasOwnGroup = true;
}
public RedisClient(EventLoopGroup group, String host, int port) {
- this(group, NioSocketChannel.class, host, port, 3000);
+ this(group, NioSocketChannel.class, host, port, 10000);
}
public RedisClient(EventLoopGroup group, Class<? extends SocketChannel> socketChannelClass, String host, int port, int connectTimeout) {
- this(group, socketChannelClass, host, port, connectTimeout, 3000);
+ this(group, socketChannelClass, host, port, connectTimeout, 10000);
}
public RedisClient(EventLoopGroup group, Class<? extends SocketChannel> socketChannelClass, String host, int port, int connectTimeout, int commandTimeout) {
|
RedisClient timeout interval changed
|
redisson_redisson
|
train
|
java
|
56fc6742e1541106ba0fb0e575632b9bef7af8e4
|
diff --git a/mnemosyned/daemon.go b/mnemosyned/daemon.go
index <HASH>..<HASH> 100644
--- a/mnemosyned/daemon.go
+++ b/mnemosyned/daemon.go
@@ -22,7 +22,6 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
- "google.golang.org/grpc/grpclog"
)
// DaemonOpts it is constructor argument that can be passed to
@@ -107,8 +106,6 @@ func TestDaemon(t *testing.T, opts TestDaemonOpts) (net.Addr, io.Closer) {
}
logger := sklog.NewTestLogger(t)
- grpclog.SetLogger(sklog.NewGRPCLogger(logger))
-
d, err := NewDaemon(&DaemonOpts{
IsTest: true,
Monitoring: false,
|
grpc.SetLogger removed from TestDaemon
|
piotrkowalczuk_mnemosyne
|
train
|
go
|
435fd0ece75acd97910f7e617525bc31839730bc
|
diff --git a/cli/setup.go b/cli/setup.go
index <HASH>..<HASH> 100644
--- a/cli/setup.go
+++ b/cli/setup.go
@@ -30,6 +30,9 @@ func PrepareBaseCmd(cmd *cobra.Command, envPrefix, defautRoot string) func() {
}
// PrepareMainCmd is meant for client side libs that want some more flags
+//
+// This adds --encoding (hex, btc, base64) and --output (text, json) to
+// the command. These only really make sense in interactive commands.
func PrepareMainCmd(cmd *cobra.Command, envPrefix, defautRoot string) func() {
cmd.PersistentFlags().StringP(EncodingFlag, "e", "hex", "Binary encoding (hex|b64|btc)")
cmd.PersistentFlags().StringP(OutputFlag, "o", "text", "Output format (text|json)")
@@ -77,6 +80,7 @@ func execute(cmd *cobra.Command) {
type cobraCmdFunc func(cmd *cobra.Command, args []string) error
// Returns a single function that calls each argument function in sequence
+// RunE, PreRunE, PersistentPreRunE, etc. all have this same signature
func concatCobraCmdFuncs(fs ...cobraCmdFunc) cobraCmdFunc {
return func(cmd *cobra.Command, args []string) error {
for _, f := range fs {
|
Add clarifying comments as requested by Rigel
|
tendermint_tendermint
|
train
|
go
|
6cf88a63c7654894b2bc0c106fb4bfab8516dc45
|
diff --git a/src/Jackiedo/LogReader/LogParser.php b/src/Jackiedo/LogReader/LogParser.php
index <HASH>..<HASH> 100644
--- a/src/Jackiedo/LogReader/LogParser.php
+++ b/src/Jackiedo/LogReader/LogParser.php
@@ -18,7 +18,7 @@ class LogParser implements LogParserInterface
const CONTEXT_EXCEPTION_PATTERN = "exception\s\'{1}([^\']+)\'{1}";
const CONTEXT_MESSAGE_PATTERN = "(\swith\smessage\s\'{1}(.*)\'{1})?";
const CONTEXT_IN_PATTERN = "\sin\s(.*)\:(\d+)";
- const STACK_TRACE_DIVIDER_PATTERN = "Stack trace\:";
+ const STACK_TRACE_DIVIDER_PATTERN = "(\[stacktrace\]|Stack trace\:)";
const STACK_TRACE_INDEX_PATTERN = "\#\d+\s";
const TRACE_IN_DIVIDER_PATTERN = "\:\s";
const TRACE_FILE_PATTERN = "(.*)\((\d+)\)";
|
Temporary Fixed Laravel <I> in LogParser
|
JackieDo_Laravel-Log-Reader
|
train
|
php
|
ea4f29686fd58122329d35d77fe82b9d0519d98c
|
diff --git a/bootstrap/src/main/java/org/jboss/windup/bootstrap/Bootstrap.java b/bootstrap/src/main/java/org/jboss/windup/bootstrap/Bootstrap.java
index <HASH>..<HASH> 100644
--- a/bootstrap/src/main/java/org/jboss/windup/bootstrap/Bootstrap.java
+++ b/bootstrap/src/main/java/org/jboss/windup/bootstrap/Bootstrap.java
@@ -336,7 +336,7 @@ public class Bootstrap
System.out.println();
System.out.println(message);
- for (String item : items)
+ for (String item : sorted)
{
System.out.println("\t" + item);
}
|
fix sorting of list items when prompting (#<I>)
tested: manually on command line
|
windup_windup
|
train
|
java
|
4b329898160d1053e7d01a1f4874239d7dd61016
|
diff --git a/spec/xml_spec.rb b/spec/xml_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/xml_spec.rb
+++ b/spec/xml_spec.rb
@@ -26,12 +26,20 @@ describe XML do
subject.scanner.start_time.should be_kind_of(Time)
end
- it "should parse the scan information" do
- scan_info = subject.scan_info
+ describe "#scan_info" do
+ subject { super().scan_info.first }
- scan_info.length.should == 1
- scan_info.first.type.should == :syn
- scan_info.first.protocol.should == :tcp
+ it "should parse the type" do
+ subject.type.should == :syn
+ end
+
+ it "should parse the protocol" do
+ subject.protocol.should == :tcp
+ end
+
+ it "should parse the services" do
+ subject.services.should_not be_empty
+ end
end
it "should parse the verbose level" do
|
Improved specs for XML#scan_info.
|
sophsec_ruby-nmap
|
train
|
rb
|
0cd150eb1f7ad95a22312784481745f5ecf7b9f2
|
diff --git a/spec/public/shared/resource_shared_spec.rb b/spec/public/shared/resource_shared_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/public/shared/resource_shared_spec.rb
+++ b/spec/public/shared/resource_shared_spec.rb
@@ -423,18 +423,38 @@ share_examples_for 'A public Resource' do
describe '#reload' do
- before :all do
- rescue_if 'TODO', @skip do
- @user.name = 'dkubb'
- @user.description = 'test'
- @user.reload
+ describe 'for a single object' do
+
+ before :all do
+ rescue_if 'TODO', @skip do
+ @user.name = 'dkubb'
+ @user.description = 'test'
+ @user.reload
+ end
+ end
+
+ it { @user.name.should eql('dbussink') }
+
+ it 'should also reload previously loaded attributes' do
+ @user.attribute_loaded?(:description).should be_true
end
end
- it { @user.name.should eql('dbussink') }
+ describe 'for when the object is changed outside another object' do
+
+ before :all do
+ @user2 = @user.dup
+ @user2.name = 'dkubb'
+ @user2.save
+ @user.reload
+ end
+
+ it 'should reload the object from the data store' do
+ pending "Reload forces all attributes to be retrieved again" do
+ @user.name.should eql('dkubb')
+ end
+ end
- it 'should also reload previously loaded attributes' do
- @user.attribute_loaded?(:description).should be_true
end
end
|
Add specs for reloading with different resources containing the data
|
datamapper_dm-core
|
train
|
rb
|
2e16ef661fd9a7261d143b23d22df87d3a75237c
|
diff --git a/mode/python/python.js b/mode/python/python.js
index <HASH>..<HASH> 100644
--- a/mode/python/python.js
+++ b/mode/python/python.js
@@ -162,15 +162,13 @@
if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters))
return null;
- if (stream.match(doubleOperators)
- || stream.match(singleOperators)
- || stream.match(wordOperators))
+ if (stream.match(doubleOperators) || stream.match(singleOperators))
return "operator";
if (stream.match(singleDelimiters))
return null;
- if (stream.match(keywords))
+ if (stream.match(keywords) || stream.match(wordOperators))
return "keyword";
if (stream.match(builtins))
|
[python mode] better highlighting for and/or/not
Currently and/or/not in most themes look like normal text because cm-operator doesn't usually get special styling. This patch highlights them as keywords to make them stand out better.
|
codemirror_CodeMirror
|
train
|
js
|
55799209f119b56a51bd9d42cba8c96b6d7d0edb
|
diff --git a/core/codegen/src/main/java/org/overture/codegen/visitor/DeclVisitor.java b/core/codegen/src/main/java/org/overture/codegen/visitor/DeclVisitor.java
index <HASH>..<HASH> 100644
--- a/core/codegen/src/main/java/org/overture/codegen/visitor/DeclVisitor.java
+++ b/core/codegen/src/main/java/org/overture/codegen/visitor/DeclVisitor.java
@@ -34,6 +34,7 @@ import org.overture.codegen.cgast.statements.PStmCG;
import org.overture.codegen.cgast.types.PTypeCG;
import org.overture.codegen.constants.OoAstInfo;
import org.overture.codegen.utils.VdmTransUtil;
+import org.overture.typechecker.assistant.definition.PDefinitionAssistantTC;
public class DeclVisitor extends AbstractVisitorCG<CodeGenInfo, PDeclCG>
{
@@ -247,7 +248,7 @@ public class DeclVisitor extends AbstractVisitorCG<CodeGenInfo, PDeclCG>
{
String access = node.getAccess().getAccess().toString();
- boolean isStatic = false;
+ boolean isStatic = PDefinitionAssistantTC.isStatic(node);
String operationName = node.getName().getName();
PTypeCG returnType = node.getType().apply(question.getTypeVisitor(), question);
PStmCG body = node.getBody().apply(question.getStatementVisitor(), question);
|
Fix: It was not correctly indicated whether operations were static or not
|
overturetool_overture
|
train
|
java
|
b0b464668f76b967e6992eddb125b0ae5ed8a599
|
diff --git a/test/Functional/InvokeTest.php b/test/Functional/InvokeTest.php
index <HASH>..<HASH> 100644
--- a/test/Functional/InvokeTest.php
+++ b/test/Functional/InvokeTest.php
@@ -10,8 +10,9 @@ class InvokeTest extends \PHPUnit_Framework_TestCase
*/
public function test_it($method, $input, $output)
{
+ $curried = f\invoke($method);
$this->assertEquals($output, f\invoke($method, $input));
- $this->assertEquals($output, (f\invoke($method))($input));
+ $this->assertEquals($output, $curried($input));
}
public function provideData()
|
backward compatibility with php <7
|
widmogrod_php-functional
|
train
|
php
|
705990a4e1350429eeddde8495347b071fcdfec7
|
diff --git a/netatmo.js b/netatmo.js
index <HASH>..<HASH> 100644
--- a/netatmo.js
+++ b/netatmo.js
@@ -64,6 +64,11 @@ netatmo.prototype.authenticate = function (args, callback) {
return this;
}
+ if (args.access_token) {
+ access_token = args.access_token;
+ return this;
+ }
+
if (!args.client_id) {
this.emit("error", new Error("Authenticate 'client_id' not set."));
return this;
|
Allow access token to be provided in the constructor
|
karbassi_netatmo
|
train
|
js
|
9cca6acd47bab52e95f50fb5011198281c900689
|
diff --git a/amdrequire.js b/amdrequire.js
index <HASH>..<HASH> 100644
--- a/amdrequire.js
+++ b/amdrequire.js
@@ -114,6 +114,10 @@ var Module = require('module'),
//Require all the dependencies
exp = amdrequire(deps, callback, defineModuleStack[defineModuleStack.length - 1]);
}
+ // No dependencies, first arg as callback
+ else if(!callback && typeof deps === 'function'){
+ exp = deps();
+ }
// Define a module directly as an object
else if(deps !== null && typeof deps === 'object'){
exp = deps;
|
define without dependencies should execute callback
|
arqex_amdrequire
|
train
|
js
|
83bca06cb288c5f5bfc4a2c700a414f98d4e9525
|
diff --git a/classes/Application.php b/classes/Application.php
index <HASH>..<HASH> 100644
--- a/classes/Application.php
+++ b/classes/Application.php
@@ -77,7 +77,7 @@ class Application implements HttpKernelInterface
protected $errorHandler;
/**
- * @var \Symfony\Component\Console\Application
+ * @var ConsoleApplication
*/
protected $console;
|
Application->$console is always Autarky\Console\Application
|
autarky_framework
|
train
|
php
|
424d087f38d64096983746681fe3f7e31e10816b
|
diff --git a/salt/modules/network.py b/salt/modules/network.py
index <HASH>..<HASH> 100644
--- a/salt/modules/network.py
+++ b/salt/modules/network.py
@@ -797,4 +797,12 @@ def netmask_to_prefixlen(netmask):
salt '*' network.netmask_to_prefixlen 255.224.0.0
'''
- return salt.utils.network.netmask_to_prefixlen(netmask)
+ if 'netmask_to_prefixlen' in dir(salt.utils.network):
+ return salt.utils.network.netmask_to_prefixlen(netmask)
+ else:
+ netmask = netmask.split('.')
+ sum = 0
+ for idx in range(3,-1,-1):
+ sum += int(netmask[idx]) << (idx * 8)
+ prefixlen = format(sum,'0b').count('1')
+ return prefixlen
|
Workaround b/c salt.utils.network isn't a refreshable module.
I couldn't figure out where this function should go to
(salt/modules/network.py or salt/utils/network.py) so I leave
this to the actual salt devs to sort out.
|
saltstack_salt
|
train
|
py
|
a8f09d930b7f670271ba557caf247844004bc85e
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -497,7 +497,6 @@ ext_modules = [Extension(
# TFM_NO_ASM=None,
).items(),
- extra_link_args=['-rdynamic'],
) for name in ext_names]
@@ -507,7 +506,7 @@ if __name__ == '__main__':
name='PyTomCrypt',
description='Python+Cython wrapper around LibTomCrypt',
- version='0.5.5',
+ version='0.5.6',
license='BSD-3',
platforms=['any'],
packages=['tomcrypt'],
|
Don't need the "-rdynamic" flag anymore.
|
mikeboers_PyTomCrypt
|
train
|
py
|
79129bdb24f71e8282ac6d3dafb7521a82852001
|
diff --git a/eth_utils/logging.py b/eth_utils/logging.py
index <HASH>..<HASH> 100644
--- a/eth_utils/logging.py
+++ b/eth_utils/logging.py
@@ -68,8 +68,14 @@ def get_logger(name: str, logger_class: Type[TLogger] = None) -> TLogger:
return logging.getLogger(name)
else:
with _use_logger_class(logger_class):
+ # The logging module caches logger instances. The following code
+ # ensures that if there is a cached instance that we don't
+ # accidentally return the incorrect logger type because the logging
+ # module does not *update* the cached instance in the event that
+ # the global logging class changes.
if name in logging.Logger.manager.loggerDict:
- del logging.Logger.manager.loggerDict[name]
+ if type(logging.Logger.manager.loggerDict[name]) is not logger_class:
+ del logging.Logger.manager.loggerDict[name]
return logging.getLogger(name)
|
Add comment explaining why we delete the cached logger instance
|
ethereum_eth-utils
|
train
|
py
|
948ebc6dff04f19043c128f78b146bf211e3a42d
|
diff --git a/src/predaddy/messagehandling/util/MessageCallbackClosures.php b/src/predaddy/messagehandling/util/MessageCallbackClosures.php
index <HASH>..<HASH> 100644
--- a/src/predaddy/messagehandling/util/MessageCallbackClosures.php
+++ b/src/predaddy/messagehandling/util/MessageCallbackClosures.php
@@ -45,13 +45,6 @@ use predaddy\messagehandling\MessageCallback;
class MessageCallbackClosures extends MessageCallbackClosuresBuilder implements MessageCallback
{
/**
- * Use builder() method instead.
- */
- protected function __construct()
- {
- }
-
- /**
* @return MessageCallbackClosuresBuilder
*/
public static function builder()
diff --git a/src/predaddy/messagehandling/util/MessageCallbackClosuresBuilder.php b/src/predaddy/messagehandling/util/MessageCallbackClosuresBuilder.php
index <HASH>..<HASH> 100644
--- a/src/predaddy/messagehandling/util/MessageCallbackClosuresBuilder.php
+++ b/src/predaddy/messagehandling/util/MessageCallbackClosuresBuilder.php
@@ -43,6 +43,13 @@ class MessageCallbackClosuresBuilder
protected $onFailureClosure;
/**
+ * Use builder() method instead.
+ */
+ protected function __construct()
+ {
+ }
+
+ /**
* @param callable $closure
* @return MessageCallbackClosuresBuilder $this
*/
|
Builder's constructor is also protected
|
szjani_predaddy
|
train
|
php,php
|
ee25552b866ed5c38ccd4ca28f8cef155bc5b261
|
diff --git a/lib/shelly/cli/main.rb b/lib/shelly/cli/main.rb
index <HASH>..<HASH> 100644
--- a/lib/shelly/cli/main.rb
+++ b/lib/shelly/cli/main.rb
@@ -279,9 +279,10 @@ We have been notified about it. We will be adding new resources shortly}
if options[:tail]
loop do
- logs = app.application_logs(:from => logs['range']['last'], :source => options[:source])
+ logs = app.application_logs(:from => logs['range']['last'],
+ :source => options[:source])
print_logs(logs)
- sleep 1
+ sleep 0.5
end
end
rescue Client::APIException => e
|
Decreased logs refreshing time to <I>s
|
Ragnarson_shelly
|
train
|
rb
|
50488ce9ca5ee984ab63a7c829d8368462cf2118
|
diff --git a/openfisca_web_api/controllers/field.py b/openfisca_web_api/controllers/field.py
index <HASH>..<HASH> 100644
--- a/openfisca_web_api/controllers/field.py
+++ b/openfisca_web_api/controllers/field.py
@@ -117,6 +117,7 @@ def api1_field(req):
return wsgihelpers.respond_json(ctx,
collections.OrderedDict(sorted(dict(
+ apiStatus = u'deprecated',
apiVersion = 1,
context = data['context'],
method = req.script_name,
diff --git a/openfisca_web_api/controllers/fields.py b/openfisca_web_api/controllers/fields.py
index <HASH>..<HASH> 100644
--- a/openfisca_web_api/controllers/fields.py
+++ b/openfisca_web_api/controllers/fields.py
@@ -99,6 +99,7 @@ def api1_fields(req):
return wsgihelpers.respond_json(ctx,
collections.OrderedDict(sorted(dict(
+ apiStatus = u'deprecated',
apiVersion = 1,
columns = columns,
columns_tree = columns_tree,
|
Add deprecated flags to field and fields
|
openfisca_openfisca-web-api
|
train
|
py,py
|
deea8ca4c3d6cbe90827b9abb7833ca653d57206
|
diff --git a/soco/snapshot.py b/soco/snapshot.py
index <HASH>..<HASH> 100644
--- a/soco/snapshot.py
+++ b/soco/snapshot.py
@@ -82,13 +82,13 @@ class Snapshot(object):
Useful for determining whether playing an alert on a device
will ungroup it.
"""
+ # get if device coordinator (or slave) True (or False)
+ self.is_coordinator = self.device.is_coordinator
+
# Get information about the currently playing media
media_info = self.device.avTransport.GetMediaInfo([('InstanceID', 0)])
self.media_uri = media_info['CurrentURI']
-
# extract source from media uri
- if self.media_uri.split(':')[0] != 'x-rincon':
- self.is_coordinator = True
if self.media_uri.split(':')[0] == 'x-rincon-queue':
self.is_playing_queue = True
|
Change to use SoCo method to determine coordinator
|
amelchio_pysonos
|
train
|
py
|
5419e77b8c1bc286724ea9bef7ecf3f059ac7403
|
diff --git a/spec/controllers/admin/settings_controller_spec.rb b/spec/controllers/admin/settings_controller_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/controllers/admin/settings_controller_spec.rb
+++ b/spec/controllers/admin/settings_controller_spec.rb
@@ -15,7 +15,7 @@ describe Admin::SettingsController do
before(:each) do
get :index
end
-
+
it 'should render index' do
response.should render_template('index')
end
@@ -25,7 +25,7 @@ describe Admin::SettingsController do
before(:each) do
get :write
end
-
+
it 'should be success' do
assert_template 'write'
end
@@ -35,12 +35,22 @@ describe Admin::SettingsController do
before(:each) do
get :feedback
end
-
+
it 'should be sucess' do
assert_template 'feedback'
end
end
+ describe 'update database action' do
+ before(:each) do
+ get :update_database
+ end
+
+ it 'should be sucess' do
+ assert_template 'update_database'
+ end
+ end
+
describe 'redirect action' do
it 'should be success' do
get :redirect
@@ -75,4 +85,5 @@ describe Admin::SettingsController do
@blog.should == Blog.default
end
end
+
end
|
Adds some specs on the udpate database method that was not covered at all.
|
publify_publify
|
train
|
rb
|
af43115e9527249aa4605b7e6df1378fd07b06fe
|
diff --git a/lib/backup/config/dsl.rb b/lib/backup/config/dsl.rb
index <HASH>..<HASH> 100644
--- a/lib/backup/config/dsl.rb
+++ b/lib/backup/config/dsl.rb
@@ -42,7 +42,7 @@ module Backup
],
# Notifiers
['Mail', 'Twitter', 'Campfire', 'Prowl',
- 'Hipchat', 'Pushover', 'HttpPost', 'Nagios']
+ 'Hipchat', 'Pushover', 'HttpPost', 'Nagios', 'Slack']
]
)
end
|
Added 'Slack' to DSL constants to prevent "NameError: uninitialized constant Backup::Config::DSL::Slack" error
|
backup_backup
|
train
|
rb
|
c374e085844841021a8c1612a9bb842c833c2f56
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -2,6 +2,8 @@ module.exports = function (config) {
'use strict';
var configuration = {
+ browserNoActivityTimeout: 30000,
+
client: {
captureConsole: true,
mocha: {
|
Increased timeout time for mocha
|
github-tools_github
|
train
|
js
|
11f0e10e15b45892066506e77630f4d6237ae390
|
diff --git a/src/choose-blueprint-updates.js b/src/choose-blueprint-updates.js
index <HASH>..<HASH> 100644
--- a/src/choose-blueprint-updates.js
+++ b/src/choose-blueprint-updates.js
@@ -34,14 +34,14 @@ async function chooseBlueprint({
}
/**
- * Facilitate prompting the user for which bllueprint that want to update
+ * Facilitate prompting the user for which bllueprint they want to update
*
- * @param cwd
- * @param emberCliUpdateJson
- * @param reset
- * @param compare
- * @param codemods
- * @param to
+ * @param {string} cwd - Used in `checkForBlueprintUpdates` in order to generate url or path to it if on local disk
+ * @param {object} emberCliUpdateJson - Use the `blueprints` property from this
+ * @param {boolean} reset - Optional
+ * @param {boolean} compare - Optional
+ * @param {boolean} codemods - Optional
+ * @param {string} to - Optional (could be undefined).
* @returns {Promise<{blueprint: (*|{}), areAllUpToDate, to: string}>}
*/
async function chooseBlueprintUpdates({
|
docs: more param docs
|
ember-cli_ember-cli-update
|
train
|
js
|
7f5f4f95eabd1f70c82d336816ae2d17fb273af2
|
diff --git a/stronghold/middleware.py b/stronghold/middleware.py
index <HASH>..<HASH> 100644
--- a/stronghold/middleware.py
+++ b/stronghold/middleware.py
@@ -11,7 +11,9 @@ class LoginRequiredMiddleware(object):
View is also deemed to be Public if listed in in django settings in the
STRONGHOLD_PUBLIC_URLS dictionary
each url in STRONGHOLD_PUBLIC_URLS must be a valid regex
+
"""
+
def __init__(self, *args, **kwargs):
self.public_view_urls = getattr(conf, 'STRONGHOLD_PUBLIC_URLS', ())
@@ -21,13 +23,11 @@ class LoginRequiredMiddleware(object):
return None
# if its a public view, don't process it
- is_public = utils.is_view_func_public(view_func)
- if is_public:
+ if utils.is_view_func_public(view_func):
return None
# if this view matches a whitelisted regex, don't process it
- for view_url in self.public_view_urls:
- if view_url.match(request.path_info):
- return None
+ if any(view_url.match(request.path_info) for view_url in self.public_view_urls):
+ return None
return login_required(view_func)(request, *view_args, **view_kwargs)
|
Refactor public_view_url check to be more pythonic
In addition to this I also removed the is_public variable because the new utils
function says the same thing so it is redundant.
|
mgrouchy_django-stronghold
|
train
|
py
|
2b55a09740bde1c7cfdd7e0497f160bd765dcf07
|
diff --git a/test/APITest.php b/test/APITest.php
index <HASH>..<HASH> 100644
--- a/test/APITest.php
+++ b/test/APITest.php
@@ -449,12 +449,9 @@ class APITestCase extends PHPUnit_Framework_TestCase
}
public function testDeleteCustomer() {
- $r = $this->api->create_customer($this->recipient['address']);
+ $r = $this->api->delete_customer('[email protected]');
$this->assertSuccess($r);
-
- $r = $this->api->delete_customer($this->recipient['address']);
- $this->assertSuccess($r);
-
+
print 'Test delete customer';
}
|
Update delete customer test (#<I>)
|
sendwithus_sendwithus_php
|
train
|
php
|
ec73ce0b3f290bec63bee391b53b0baf1f91f1d8
|
diff --git a/lib/Less/Tree/Mixin/Call.php b/lib/Less/Tree/Mixin/Call.php
index <HASH>..<HASH> 100755
--- a/lib/Less/Tree/Mixin/Call.php
+++ b/lib/Less/Tree/Mixin/Call.php
@@ -145,7 +145,7 @@ class Less_Tree_Mixin_Call extends Less_Tree{
throw new Less_Exception_Compiler('No matching definition was found for `'.$this->Format( $args ).'`', null, $this->index, $this->currentFileInfo);
}else{
- throw new Less_Exception_Compiler(trim($this->selector->toCSS()) . " is undefined", null, $this->index);
+ throw new Less_Exception_Compiler(trim($this->selector->toCSS()) . " is undefined in ".$this->currentFileInfo['filename'], null, $this->index);
}
}
|
Update Call.php - Exception undefined message
Added the the filename in exception
".mixin is undefined in F:/FILE_PATH/file.less"
|
oyejorge_less.php
|
train
|
php
|
4b8df5e41b7fa6f91d30405c6c01110d7866d24e
|
diff --git a/lib/browsers/chrome.js b/lib/browsers/chrome.js
index <HASH>..<HASH> 100644
--- a/lib/browsers/chrome.js
+++ b/lib/browsers/chrome.js
@@ -220,7 +220,12 @@ chrome.setUpEvents = function(tab) {
userAgent: tab.prerender.userAgent || this.options.userAgent || this.originalUserAgent + ' Prerender (+https://github.com/prerender/prerender)'
});
- var bypassServiceWorker = tab.prerender.enableServiceWorker == false || this.options.enableServiceWorker == false;
+ var bypassServiceWorker = !(this.options.enableServiceWorker == true || this.options.enableServiceWorker == 'true');
+
+ if (typeof tab.prerender.enableServiceWorker !== 'undefined') {
+ bypassServiceWorker = !tab.prerender.enableServiceWorker;
+ }
+
Network.setBypassServiceWorker({bypass: bypassServiceWorker})
Network.requestWillBeSent((params) => {
|
change service worker bypass to be a little cleaner and allow override on a per tab basis
|
prerender_prerender
|
train
|
js
|
b5bd9b868c1b48a0ce78d713c33c222b01e5a926
|
diff --git a/src/components/Select/Select.js b/src/components/Select/Select.js
index <HASH>..<HASH> 100644
--- a/src/components/Select/Select.js
+++ b/src/components/Select/Select.js
@@ -154,7 +154,7 @@ class Select extends React.PureComponent {
selectedItem={value}
{...rest}
>
- {({...downshiftProps }) => (
+ {({...downshiftProps}) => (
<div>
<Manager>
<Reference>
|
Cleaning of selected item doesn't work if renderOption is specified.
|
Bandwidth_shared-components
|
train
|
js
|
3e498dc7a2bfa1fd9d16e7537aac62f07a7a9da1
|
diff --git a/lib/Client.php b/lib/Client.php
index <HASH>..<HASH> 100644
--- a/lib/Client.php
+++ b/lib/Client.php
@@ -376,11 +376,14 @@ class Client extends EventEmitter
default:
$body = $request->getBody();
if (is_resource($body)) {
+ $bodyStat = fstat($body);
+
// This needs to be set to PUT, regardless of the actual
// method used. Without it, INFILE will be ignored for some
// reason.
$settings[CURLOPT_PUT] = true;
- $settings[CURLOPT_INFILE] = $request->getBody();
+ $settings[CURLOPT_INFILE] = $body;
+ $settings[CURLOPT_INFILESIZE] = $bodyStat['size'];
} else {
// For security we cast this to a string. If somehow an array could
// be passed here, it would be possible for an attacker to use @ to
|
Add resource size to CURL options in client
|
sabre-io_http
|
train
|
php
|
a98101dbcbc440e95d52af8c3a449ed355eb1877
|
diff --git a/ml-agents/mlagents/trainers/agent_processor.py b/ml-agents/mlagents/trainers/agent_processor.py
index <HASH>..<HASH> 100644
--- a/ml-agents/mlagents/trainers/agent_processor.py
+++ b/ml-agents/mlagents/trainers/agent_processor.py
@@ -153,7 +153,7 @@ class AgentProcessor:
if not terminated:
self.episode_steps[global_id] += 1
- # if the trajectory is too long, we truncate it
+ # Add a trajectory segment to the buffer if terminal or the length has reached the time horizon
if (
len(self.experience_buffers[global_id]) >= self.max_trajectory_length
or terminated
|
Update comment on time horizon in agent processor (#<I>) (#<I>)
|
Unity-Technologies_ml-agents
|
train
|
py
|
01609d53bee244527dc4ce9f7ef96176f7d5b701
|
diff --git a/lib/dtk-common/version.rb b/lib/dtk-common/version.rb
index <HASH>..<HASH> 100644
--- a/lib/dtk-common/version.rb
+++ b/lib/dtk-common/version.rb
@@ -1,3 +1,3 @@
module DtkCommon
- VERSION = "0.1.0"
+ VERSION = "0.1.1"
end
|
Changed version to <I>
|
rich-dtk_dtk-common
|
train
|
rb
|
2b6061640d4a9ca4a42915f0f9b81f8f430a7e96
|
diff --git a/dataflows/VERSION b/dataflows/VERSION
index <HASH>..<HASH> 100644
--- a/dataflows/VERSION
+++ b/dataflows/VERSION
@@ -1 +1 @@
-0.1.10
+0.1.11
diff --git a/dataflows/base/schema_validator.py b/dataflows/base/schema_validator.py
index <HASH>..<HASH> 100644
--- a/dataflows/base/schema_validator.py
+++ b/dataflows/base/schema_validator.py
@@ -69,6 +69,7 @@ def schema_validator(resource, iterator,
if okay:
yield row
+
schema_validator.drop = drop
schema_validator.ignore = ignore
schema_validator.raise_exception = raise_exception
diff --git a/dataflows/processors/load.py b/dataflows/processors/load.py
index <HASH>..<HASH> 100644
--- a/dataflows/processors/load.py
+++ b/dataflows/processors/load.py
@@ -231,6 +231,10 @@ class load(DataStreamProcessor):
schema = Schema().infer(
stream.sample, headers=stream.headers,
confidence=1, guesser_cls=self.guesser)
+ # restore schema field names to original headers
+ for header, field in zip(stream.headers, schema['fields']):
+ print(header, field)
+ field['name'] = header
if self.override_schema:
schema.update(self.override_schema)
if self.override_fields:
|
<I> Handle empty named fields better in HTML tables
|
datahq_dataflows
|
train
|
VERSION,py,py
|
f9d1d0ee97c24f706ef389cc3fc30ce7287c69f0
|
diff --git a/slither/__main__.py b/slither/__main__.py
index <HASH>..<HASH> 100644
--- a/slither/__main__.py
+++ b/slither/__main__.py
@@ -225,7 +225,7 @@ def main_impl(all_detector_classes, all_printer_classes):
if os.path.isfile(filename):
(results, number_contracts) = process(filename, args, detector_classes, printer_classes)
- elif os.path.isfile(os.path.join(filename, 'truffle.js')):
+ elif os.path.isfile(os.path.join(filename, 'truffle.js')) or os.path.isfile(os.path.join(filename, 'truffle-config.js')):
(results, number_contracts) = process_truffle(filename, args, detector_classes, printer_classes)
elif os.path.isdir(filename) or len(globbed_filenames) > 0:
|
Check for 'truffle-config.js' file existence
|
crytic_slither
|
train
|
py
|
0e0960930d8df39e9f61c30ef69db4f549350c3f
|
diff --git a/formatters/html/html.go b/formatters/html/html.go
index <HASH>..<HASH> 100644
--- a/formatters/html/html.go
+++ b/formatters/html/html.go
@@ -174,9 +174,9 @@ func (f *Formatter) writeHTML(w io.Writer, style *chroma.Style, tokens []*chroma
}
}
- fmt.Fprint(w, "</pre>\n")
+ fmt.Fprint(w, "</pre>")
if f.standalone {
- fmt.Fprint(w, "</body>\n")
+ fmt.Fprint(w, "\n</body>\n")
fmt.Fprint(w, "</html>\n")
}
@@ -196,7 +196,11 @@ func (f *Formatter) class(t chroma.TokenType) string {
func (f *Formatter) styleAttr(styles map[chroma.TokenType]string, tt chroma.TokenType) string {
if f.classes {
- return string(fmt.Sprintf(` class="%s"`, f.class(tt)))
+ cls := f.class(tt)
+ if cls == "" {
+ return ""
+ }
+ return string(fmt.Sprintf(` class="%s"`, cls))
}
if _, ok := styles[tt]; !ok {
tt = tt.SubCategory()
|
Don't output trailing \n for HTML-only fragment.
See #<I>.
|
alecthomas_chroma
|
train
|
go
|
cffd87a635dd49eec52cf3a76fa36752537a9fe0
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -376,7 +376,7 @@ texinfo_documents = [
intersphinx_mapping = {
'matplotlib': ('http://matplotlib.org/', None),
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
- 'python': ('https://docs.python.org/3.5', None),
+ 'python': ('https://docs.python.org/3.5/', None),
}
# Autodoc config
|
Adding trailing slash to intersphinx link.
|
dhermes_bezier
|
train
|
py
|
598790aacb5e167b996831066843e07058e5dd92
|
diff --git a/schedule/templatetags/scheduletags.py b/schedule/templatetags/scheduletags.py
index <HASH>..<HASH> 100644
--- a/schedule/templatetags/scheduletags.py
+++ b/schedule/templatetags/scheduletags.py
@@ -185,7 +185,7 @@ def querystring_for_date(date, num=6):
query_string = '?'
qs_parts = ['year=%d', 'month=%d', 'day=%d', 'hour=%d', 'minute=%d', 'second=%d']
qs_vars = (date.year, date.month, date.day, date.hour, date.minute, date.second)
- query_string += '&'.join(qs_parts[:num]) % qs_vars[:num]
+ query_string += '&'.join(qs_parts[:num]) % qs_vars[:num]
return query_string
|
escape the '&' used to join the query string. Now passed html validation.
|
llazzaro_django-scheduler
|
train
|
py
|
b914993d13ec5c7b197b9e64108a52adcf995d82
|
diff --git a/src/main/java/org/jfrog/hudson/ArtifactoryServer.java b/src/main/java/org/jfrog/hudson/ArtifactoryServer.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jfrog/hudson/ArtifactoryServer.java
+++ b/src/main/java/org/jfrog/hudson/ArtifactoryServer.java
@@ -154,7 +154,8 @@ public class ArtifactoryServer {
return Lists.newArrayList();
}
virtualRepositories
- .add(0, new VirtualRepository("- To use Artifactory for resolution select a virtual repository -", ""));
+ .add(0, new VirtualRepository("-- To use Artifactory for resolution select a virtual repository --",
+ ""));
return virtualRepositories;
}
|
fixed message for no virtual repository to resolve from in Gradle builds
|
jenkinsci_artifactory-plugin
|
train
|
java
|
0dc22b744c9c1a00ac9c6590caa28dc025a6169f
|
diff --git a/src/GetOptionKit/Option.php b/src/GetOptionKit/Option.php
index <HASH>..<HASH> 100644
--- a/src/GetOptionKit/Option.php
+++ b/src/GetOptionKit/Option.php
@@ -361,7 +361,7 @@ class Option
if ($val = $this->defaultValue) {
if (is_bool($val)) {
- $n .= ':' . $val ? 'true' : 'false';
+ $n .= ':' . ($val ? 'true' : 'false');
} else {
$n .= ':' . $this->defaultValue;
}
|
Bug fix. Don't test `':' . $val` for true, test `$val` itself.
|
c9s_GetOptionKit
|
train
|
php
|
589dc1c7554475b76654844d7efe58577614287f
|
diff --git a/tests/FluentDOM/NodesTest.php b/tests/FluentDOM/NodesTest.php
index <HASH>..<HASH> 100644
--- a/tests/FluentDOM/NodesTest.php
+++ b/tests/FluentDOM/NodesTest.php
@@ -55,6 +55,17 @@ namespace FluentDOM {
}
/**
+ * @covers \FluentDOM\Nodes::__construct
+ */
+ public function testConstructorWithoutSourceButWithContentType() {
+ $fd = new Nodes(NULL, 'text/html');
+ $this->assertEquals(
+ 'text/html',
+ $fd->contentType
+ );
+ }
+
+ /**
* @group Load
* @covers \FluentDOM\Nodes::load
* @covers \FluentDOM\Nodes::prepareSource
|
Tested: FluentDOM\Nodes::construct() with content type
|
ThomasWeinert_FluentDOM
|
train
|
php
|
0bf6b7c8068fb3cc4a380030befe1201531c47ae
|
diff --git a/lib/sprockets/processor.rb b/lib/sprockets/processor.rb
index <HASH>..<HASH> 100644
--- a/lib/sprockets/processor.rb
+++ b/lib/sprockets/processor.rb
@@ -103,7 +103,7 @@ module Sprockets
end
def process_provide_directive(path)
- @environment.paths << File.expand_path(path, base_path)
+ # ignore
end
def each_pathname_in_tree(path)
|
Deprecate provide directive. Breaks caching
|
rails_sprockets
|
train
|
rb
|
76266b616382700082f7bab09552b154f9068386
|
diff --git a/moto/awslambda/models.py b/moto/awslambda/models.py
index <HASH>..<HASH> 100644
--- a/moto/awslambda/models.py
+++ b/moto/awslambda/models.py
@@ -1,6 +1,5 @@
from __future__ import unicode_literals
-import StringIO
import base64
import datetime
import hashlib
|
attmpt 4 thought i got rid of import StringIO - rockstar status not looking so good now
|
spulec_moto
|
train
|
py
|
943c0b9f6a45b16c7410a8c3441c65ecd4992596
|
diff --git a/lib/mongoid/version.rb b/lib/mongoid/version.rb
index <HASH>..<HASH> 100644
--- a/lib/mongoid/version.rb
+++ b/lib/mongoid/version.rb
@@ -1,4 +1,4 @@
# encoding: utf-8
module Mongoid #:nodoc
- VERSION = "2.0.0"
+ VERSION = "2.0.1"
end
|
Bumping to <I> for missing documented feature
|
mongodb_mongoid
|
train
|
rb
|
abd2d7de363660225100b4a53a5761b88e5b5463
|
diff --git a/packages/message-box/src/main.js b/packages/message-box/src/main.js
index <HASH>..<HASH> 100644
--- a/packages/message-box/src/main.js
+++ b/packages/message-box/src/main.js
@@ -204,6 +204,7 @@ MessageBox.prompt = (message, title, options) => {
};
MessageBox.close = () => {
+ instance.doClose();
instance.visible = false;
msgQueue = [];
currentMsg = null;
|
call `doClose()` in the exposed `close` method
|
ElemeFE_element
|
train
|
js
|
fb64d39ef44c1043d74ac53199b51e164e63eea3
|
diff --git a/lib/rundock/builder/hook_builder.rb b/lib/rundock/builder/hook_builder.rb
index <HASH>..<HASH> 100644
--- a/lib/rundock/builder/hook_builder.rb
+++ b/lib/rundock/builder/hook_builder.rb
@@ -21,9 +21,12 @@ module Rundock
if FileTest.exist?(@options[:hooks])
hooks_file = @options[:hooks]
Logger.info("hooks file is #{hooks_file}")
- else
+ elsif FileTest.exist?(DEFAULT_HOOKS_FILE_PATH)
Logger.warn("hooks file is not found. use #{DEFAULT_HOOKS_FILE_PATH}")
hooks_file = DEFAULT_HOOKS_FILE_PATH
+ else
+ Logger.warn("Hook path is not available. (#{@options[:hooks]})")
+ return []
end
elsif hook_attributes.nil?
Logger.warn("Hook source is not found. (enables:#{enables.join(',')})") unless enables.empty?
|
Fix bug when default task file is not found.
|
hiracy_rundock
|
train
|
rb
|
de85fdaf6d075e7d8ff7748e041f3d5631549d65
|
diff --git a/test/integration/kubernetes_deploy_test.rb b/test/integration/kubernetes_deploy_test.rb
index <HASH>..<HASH> 100644
--- a/test/integration/kubernetes_deploy_test.rb
+++ b/test/integration/kubernetes_deploy_test.rb
@@ -476,7 +476,7 @@ class KubernetesDeployTest < KubernetesDeploy::IntegrationTest
end
def test_deploy_result_logging_for_mixed_result_deploy
- forced_timeout = 12 # failure often takes 8s, and want both
+ forced_timeout = 20 # failure can take 10+s, which makes this test flake with shorter hard timeouts
KubernetesDeploy::Deployment.any_instance.stubs(:timeout).returns(forced_timeout)
refute deploy_fixtures("invalid", subset: ["bad_probe.yml", "init_crash.yml", "missing_volumes.yml"])
# Debug info for bad probe timeout
|
Try to make this test less flakey
|
Shopify_kubernetes-deploy
|
train
|
rb
|
d7fc133c955aee64b783636dff58f141c036d96d
|
diff --git a/code/controllers/EventRegisterController.php b/code/controllers/EventRegisterController.php
index <HASH>..<HASH> 100644
--- a/code/controllers/EventRegisterController.php
+++ b/code/controllers/EventRegisterController.php
@@ -114,7 +114,6 @@ class EventRegisterController extends Page_Controller {
);
}
-
public function canReview(){
$registration = $this->getCurrentRegistration(false);
return $registration && $registration->Attendees()->exists();
@@ -173,9 +172,6 @@ class EventRegisterController extends Page_Controller {
if(!$registration){
return $this->redirect($this->Link());
}
- if(!$registration->canPay()){
- return $this->redirect($this->Link('review'));
- }
$nexturl = $this->Link('complete');
|
FIX: don't redirect back in EventRegisterController payment() when registration can't be paid for
|
registripe_registripe-core
|
train
|
php
|
736674f341c4b739123b20c408616b5376707c01
|
diff --git a/test/e2e/common.js b/test/e2e/common.js
index <HASH>..<HASH> 100644
--- a/test/e2e/common.js
+++ b/test/e2e/common.js
@@ -10,7 +10,9 @@ export async function withPage(handler : ({ page : Object }) => Promise<void>) :
headless: HEADLESS,
devtools: DEVTOOLS,
ignoreHTTPSErrors: true,
- handleSIGINT: false
+ args: [
+ '--no-sandbox'
+ ]
});
try {
|
Run chrome in no-sandbox mode
|
paypal_paypal-checkout-components
|
train
|
js
|
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.