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
|
|---|---|---|---|---|---|
85819bf5fc4671ae1521188377a794fbad417946
|
diff --git a/CHANGELOG b/CHANGELOG
index <HASH>..<HASH> 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,8 @@
-V 1.5.1 - UNRELEASED
+V 1.5.2 - UNRELEASED
+
+V 1.5.1
Add `stack_from_top` option to reverse stack graph data order
+ Minor fix for empty logarithmic chart
V 1.5.0
Add per serie configuration
diff --git a/pygal/__init__.py b/pygal/__init__.py
index <HASH>..<HASH> 100644
--- a/pygal/__init__.py
+++ b/pygal/__init__.py
@@ -21,7 +21,7 @@ Pygal - A python svg graph plotting library
"""
-__version__ = '1.5.0'
+__version__ = '1.5.1'
import sys
from pygal.config import Config
from pygal.ghost import Ghost, REAL_CHARTS
diff --git a/pygal/graph/base.py b/pygal/graph/base.py
index <HASH>..<HASH> 100644
--- a/pygal/graph/base.py
+++ b/pygal/graph/base.py
@@ -65,7 +65,7 @@ class BaseGraph(object):
[get(val)
for serie in self.series for val in serie.safe_values]))
- self.zero = min(positive_values or 1,) or 1
+ self.zero = min(positive_values or (1,)) or 1
self._draw()
self.svg.pre_render()
|
Minor fix for empty logarithmic chart
|
Kozea_pygal
|
train
|
CHANGELOG,py,py
|
e5af6f9f7a9ab83e7328537e00188868e9a42c67
|
diff --git a/cli/src/main/java/org/jboss/as/cli/CommandLineMain.java b/cli/src/main/java/org/jboss/as/cli/CommandLineMain.java
index <HASH>..<HASH> 100644
--- a/cli/src/main/java/org/jboss/as/cli/CommandLineMain.java
+++ b/cli/src/main/java/org/jboss/as/cli/CommandLineMain.java
@@ -1027,14 +1027,14 @@ public class CommandLineMain {
NameCallback ncb = (NameCallback) current;
if (username == null) {
showRealm();
- username = readLine("Username:", false, true);
+ username = readLine("Username: ", false, true);
}
ncb.setName(username);
} else if (current instanceof PasswordCallback) {
PasswordCallback pcb = (PasswordCallback) current;
if (password == null) {
showRealm();
- String temp = readLine("Password:", true, false);
+ String temp = readLine("Password: ", true, false);
if (temp != null) {
password = temp.toCharArray();
}
|
[AS7-<I>] Patch submmited through Jira - adding additional space to prompts.
was: <I>dba9f1d4f7b8a4ae<I>a<I>f<I>c2fad7
|
wildfly_wildfly-core
|
train
|
java
|
43f68992891b3b14be9a12a63517048b876819aa
|
diff --git a/message/classes/api.php b/message/classes/api.php
index <HASH>..<HASH> 100644
--- a/message/classes/api.php
+++ b/message/classes/api.php
@@ -963,7 +963,7 @@ class api {
global $DB;
// Get the context for this conversation.
- $conversation = $DB->get_records('message_conversations', ['id' => $conversationid]);
+ $conversation = $DB->get_record('message_conversations', ['id' => $conversationid]);
$userctx = \context_user::instance($userid);
if (empty($conversation->contextid)) {
// When the conversation hasn't any contextid value defined, the favourite will be added to the user context.
|
MDL-<I> message: Correct favourite fetch
|
moodle_moodle
|
train
|
php
|
be4f9d85ae73333e8c9afff9143658e54fcd924f
|
diff --git a/util/argo/argo.go b/util/argo/argo.go
index <HASH>..<HASH> 100644
--- a/util/argo/argo.go
+++ b/util/argo/argo.go
@@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"path"
+ "path/filepath"
"strings"
"time"
@@ -315,7 +316,7 @@ func queryAppSourceType(ctx context.Context, spec *argoappv1.ApplicationSpec, re
}
for _, gitPath := range getRes.Items {
// gitPath may look like: app.yaml, or some/subpath/app.yaml
- trimmedPath := strings.TrimPrefix(gitPath, spec.Source.Path)
+ trimmedPath := strings.TrimPrefix(gitPath, filepath.Clean(spec.Source.Path))
trimmedPath = strings.TrimPrefix(trimmedPath, "/")
if trimmedPath == "app.yaml" {
return repository.AppSourceKsonnet, nil
|
Issue #<I> - Application type is incorrectly inferred as 'directory' if app source path starts with '.' (#<I>)
|
argoproj_argo-cd
|
train
|
go
|
f29b7ea67a36ebc010e83d81443a360c2ae52f98
|
diff --git a/lib/puppet/pops/types/type_mismatch_describer.rb b/lib/puppet/pops/types/type_mismatch_describer.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/pops/types/type_mismatch_describer.rb
+++ b/lib/puppet/pops/types/type_mismatch_describer.rb
@@ -796,7 +796,7 @@ module Types
def describe_PTypeAliasType(expected, actual, path)
resolved_type = expected.resolved_type
describe(resolved_type, actual, path).map do |description|
- if description.is_a?(ExpectedActualMismatch)
+ if description.is_a?(ExpectedActualMismatch) && description.path.length == path.length
description.swap_expected(expected)
else
description
|
(PUP-<I>) Fix error when formatting errors for TypeAliases with variants
The TypeFormatter would incorrectly swap the expected type in
a description for the original alias although the message description
was for something nested contained in the resolved type of the alias.
This commit ensures that the replacement only happends when the sizes
of the path to the error description are equal.
|
puppetlabs_puppet
|
train
|
rb
|
3e1d8474a952dea8008ccb34bc28fd94b0120d71
|
diff --git a/lib/platform/github/gh-got-wrapper.js b/lib/platform/github/gh-got-wrapper.js
index <HASH>..<HASH> 100644
--- a/lib/platform/github/gh-got-wrapper.js
+++ b/lib/platform/github/gh-got-wrapper.js
@@ -11,13 +11,11 @@ function sleep(ms) {
async function get(path, opts, retries = 5) {
const method = opts && opts.method ? opts.method : 'get';
+ logger.debug({ retries }, `${method.toUpperCase()} ${path}`);
if (method === 'get' && cache[path]) {
logger.debug({ path }, 'Returning cached result');
return cache[path];
}
- if (retries === 5) {
- logger.debug(`${method.toUpperCase()} ${path}`);
- }
try {
if (appMode) {
/* eslint-disable no-param-reassign */
|
refactor: always debug log github get requests
|
renovatebot_renovate
|
train
|
js
|
3fe52a6ef2869a6276c034b282f83c7a46ff9f6e
|
diff --git a/src/DependencyInjection/JsonRpcHttpServerExtension.php b/src/DependencyInjection/JsonRpcHttpServerExtension.php
index <HASH>..<HASH> 100644
--- a/src/DependencyInjection/JsonRpcHttpServerExtension.php
+++ b/src/DependencyInjection/JsonRpcHttpServerExtension.php
@@ -153,10 +153,6 @@ class JsonRpcHttpServerExtension implements ExtensionInterface, CompilerPassInte
{
$mappingAwareServiceDefinitionList = $this->findAndValidateMappingAwareDefinitionList($container);
- if (0 === count($mappingAwareServiceDefinitionList)) {
- return;
- }
-
$jsonRpcMethodDefinitionList = (new JsonRpcMethodDefinitionHelper())
->findAndValidateJsonRpcMethodDefinition($container);
|
Fix when there is no mapping collector defined
|
yoanm_symfony-jsonrpc-http-server
|
train
|
php
|
76ec1fc00c4dd15e1ef074142c23cb42821ace12
|
diff --git a/src/Model/Struct.php b/src/Model/Struct.php
index <HASH>..<HASH> 100644
--- a/src/Model/Struct.php
+++ b/src/Model/Struct.php
@@ -362,7 +362,7 @@ class Struct extends AbstractModel
*/
public function getInheritanceStruct()
{
- return $this->getGenerator()->getStructByName(str_replace('[]', '', $this->getInheritance()));
+ return $this->getName() === $this->getInheritance() ? null : $this->getGenerator()->getStructByName(str_replace('[]', '', $this->getInheritance()));
}
/**
* @return string
|
issue #<I> - fix infinite loop by checking its inheritance name
|
WsdlToPhp_PackageGenerator
|
train
|
php
|
ea3b4da5037bd4d698fd23b990812803561b25c2
|
diff --git a/shared/chat/conversation/input/container.js b/shared/chat/conversation/input/container.js
index <HASH>..<HASH> 100644
--- a/shared/chat/conversation/input/container.js
+++ b/shared/chat/conversation/input/container.js
@@ -74,7 +74,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps: OwnProps): Props => {
dispatchProps.onUpdateTyping(stateProps.selectedConversationIDKey, typing)
}
}
- const wrappedTyping = throttle(updateTyping, 2000)
+ const wrappedTyping = throttle(updateTyping, 5000)
return {
...stateProps,
|
increase typing throttle to 5 seconds (#<I>)
|
keybase_client
|
train
|
js
|
e8bc31466a78fc75cea4290965637c72bfedea8d
|
diff --git a/blocks_vertical/more.js b/blocks_vertical/more.js
index <HASH>..<HASH> 100644
--- a/blocks_vertical/more.js
+++ b/blocks_vertical/more.js
@@ -287,7 +287,7 @@ Blockly.Blocks['procedures_defreturn'] = {
this.appendStatementInput('STACK')
.appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_DO);
this.appendValueInput('RETURN')
- .setAlign(Blockly.ALIGN_RIGHT)
+ .setAlign(Blockly.ALIGN_LEFT)
.appendField('report');
this.statementConnection_ = null;
},
|
Procedure UI Fix (#<I>)
|
LLK_scratch-blocks
|
train
|
js
|
acc628902f41960e9546d24811f27795159ecbd8
|
diff --git a/src/entity/entity.js b/src/entity/entity.js
index <HASH>..<HASH> 100644
--- a/src/entity/entity.js
+++ b/src/entity/entity.js
@@ -1077,7 +1077,6 @@
/**
* cap the entity velocity to the specified value<br>
- * (!) this will only cap the y velocity for now(!)
* @param {Int} x max velocity on x axis
* @param {Int} y max velocity on y axis
* @protected
|
Corrected wrong (old?) documentation
|
melonjs_melonJS
|
train
|
js
|
3bf55714ef57e992a38f45922ecb490f6909615c
|
diff --git a/.eslintrc.js b/.eslintrc.js
index <HASH>..<HASH> 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -10,6 +10,13 @@ module.exports = {
},
overrides: [
{
+ // this package depends on a lot of peerDependencies we don't want to specify, because npm would install them
+ files: ['**/addons/docs/**/*'],
+ rules: {
+ 'import/no-extraneous-dependencies': 'off',
+ },
+ },
+ {
// this package uses pre-bundling, dependencies will be bundled, and will be in devDepenencies
files: [
'**/lib/theming/**/*',
|
add excemption to lint warnings
|
storybooks_storybook
|
train
|
js
|
53b27effc44aa41d7da9432a00b2420ddc3b6cab
|
diff --git a/lib/ezdbschema/classes/ezdbschemainterface.php b/lib/ezdbschema/classes/ezdbschemainterface.php
index <HASH>..<HASH> 100644
--- a/lib/ezdbschema/classes/ezdbschemainterface.php
+++ b/lib/ezdbschema/classes/ezdbschemainterface.php
@@ -368,6 +368,12 @@ class eZDBSchemaInterface
if ( $includeData )
{
fputs( $fp, "// This array contains the database data\n" );
+ if ( isset( $data['_info'] ) )
+ {
+ $info = $data['_info'];
+ unset( $data['_info'] );
+ $data['_info'] = $info;
+ }
fputs( $fp, '$data = ' . var_export( $this->data( $schema ), true ) . ";\n" );
}
fputs( $fp, "\n" . '?>' );
|
- Made sure _info entry in data arrays are placed at the end.
git-svn-id: file:///home/patrick.allaert/svn-git/ezp-repo/ezpublish/trunk@<I> a<I>eee8c-daba-<I>-acae-fa<I>f<I>
|
ezsystems_ezpublish-legacy
|
train
|
php
|
d5419ab3362ac63f2268c66d80965cb2cd67258d
|
diff --git a/byte-buddy-dep/src/main/java/net/bytebuddy/ByteBuddy.java b/byte-buddy-dep/src/main/java/net/bytebuddy/ByteBuddy.java
index <HASH>..<HASH> 100644
--- a/byte-buddy-dep/src/main/java/net/bytebuddy/ByteBuddy.java
+++ b/byte-buddy-dep/src/main/java/net/bytebuddy/ByteBuddy.java
@@ -407,6 +407,15 @@ public class ByteBuddy {
}
/**
+ * Creates an interface that does not extend any interfaces.
+ *
+ * @return A builder for creating a new interface.
+ */
+ public DynamicType.Builder<?> makeInterface() {
+ return makeInterface(Collections.<TypeDescription>emptyList());
+ }
+
+ /**
* Creates a dynamic type builder for an interface that extends the given interface.
*
* @param type The interface to extend.
@@ -444,6 +453,17 @@ public class ByteBuddy {
/**
* Creates a dynamic type builder for an interface that extends a number of given interfaces.
*
+ * @param type The interface types to extend.
+ * @return A dynamic type builder for this configuration that defines an interface that extends the specified
+ * interfaces.
+ */
+ public DynamicType.Builder<?> makeInterface(TypeDescription... typeDescription) {
+ return makeInterface(Arrays.asList(typeDescription));
+ }
+
+ /**
+ * Creates a dynamic type builder for an interface that extends a number of given interfaces.
+ *
* @param typeDescriptions The interface types to extend.
* @return A dynamic type builder for this configuration that defines an interface that extends the specified
* interfaces.
|
Extended Byte Buddy DSL for interface creation.
|
raphw_byte-buddy
|
train
|
java
|
2d1a8330bdb3eb8ab0c9e2a2c889ef82bf342e84
|
diff --git a/keyboard/_winkeyboard.py b/keyboard/_winkeyboard.py
index <HASH>..<HASH> 100644
--- a/keyboard/_winkeyboard.py
+++ b/keyboard/_winkeyboard.py
@@ -524,7 +524,7 @@ def prepare_intercept(callback):
shift_is_pressed = False
is_keypad = (scan_code, vk, is_extended) in keypad_keys
- return callback(KeyboardEvent(event_type=event_type, scan_code=scan_code, name=name, is_keypad=is_keypad))
+ return callback(KeyboardEvent(event_type=event_type, scan_code=scan_code or -vk, name=name, is_keypad=is_keypad))
def low_level_keyboard_handler(nCode, wParam, lParam):
try:
|
Create Windows events with VK when scan code is missing
|
boppreh_keyboard
|
train
|
py
|
e3c9b1224c13a2da074ea4f12cb085d433c9189e
|
diff --git a/notrequests.py b/notrequests.py
index <HASH>..<HASH> 100644
--- a/notrequests.py
+++ b/notrequests.py
@@ -229,9 +229,16 @@ def _guess_filename(fileobj):
return os.path.basename(name)
+def _choose_boundary():
+ chars = 'abcdefghijklmnopqrstuvwxyz123456789'
+ boundary = ''.join(random.choice(chars) for _ in range(40))
+
+ return boundary.encode('ascii')
+
+
def _build_form_data(data=None, files=None):
# https://pymotw.com/2/urllib2/#uploading-files
- boundary = mimetools.choose_boundary()
+ boundary = _choose_boundary()
parts = []
parts_boundary = '--' + boundary
|
Replaced mimetools.choose_boundary(..) with our own.
Not sure if the string is long enough. And it may be that encoding it
is premature.
|
davidwtbuxton_notrequests
|
train
|
py
|
737c2872ef21f973dd265031764631515d6ed716
|
diff --git a/packages/ember-runtime/lib/mixins/evented.js b/packages/ember-runtime/lib/mixins/evented.js
index <HASH>..<HASH> 100644
--- a/packages/ember-runtime/lib/mixins/evented.js
+++ b/packages/ember-runtime/lib/mixins/evented.js
@@ -83,7 +83,7 @@ Ember.Evented = Ember.Mixin.create({
event.
```javascript
- person.on('didEat', food) {
+ person.on('didEat', function(food) {
console.log('person ate some ' + food);
});
|
Fix typo in evented mixin.
|
emberjs_ember.js
|
train
|
js
|
d72e41b7e667f01c88cdce5c4adb444673745438
|
diff --git a/lib/apruve/version.rb b/lib/apruve/version.rb
index <HASH>..<HASH> 100644
--- a/lib/apruve/version.rb
+++ b/lib/apruve/version.rb
@@ -1,3 +1,3 @@
module Apruve
- VERSION = '0.9.2'
+ VERSION = '0.10.0'
end
|
Fixes issues #3 and #5
|
apruve_apruve-ruby
|
train
|
rb
|
de16ead7e842c470ca0082736ee4cc0b1d1f023c
|
diff --git a/src/Command/ProjectGetCommand.php b/src/Command/ProjectGetCommand.php
index <HASH>..<HASH> 100644
--- a/src/Command/ProjectGetCommand.php
+++ b/src/Command/ProjectGetCommand.php
@@ -90,7 +90,10 @@ class ProjectGetCommand extends PlatformCommand
}
$environment = $environmentOption;
}
- elseif (count($environments) > 1 && $input->isInteractive()) {
+ elseif (count($environments) === 1) {
+ $environment = key($environments);
+ }
+ elseif ($environments && $input->isInteractive()) {
$environment = $this->offerEnvironmentChoice($environments, $input, $output);
}
else {
|
Accommodate one non-master environment. Addresses #<I>
|
platformsh_platformsh-cli
|
train
|
php
|
506ab5ba3f8ba6b687c31f490388d02af5dbeee9
|
diff --git a/lib/system/index.js b/lib/system/index.js
index <HASH>..<HASH> 100644
--- a/lib/system/index.js
+++ b/lib/system/index.js
@@ -28,7 +28,7 @@ system.get_logged_user = function(cb){
setTimeout(function(){
logged_user = null;
- }, 30000); // cache result for 30 seconds
+ }, 5000); // cache result for 5 seconds
})
|
Cache logged user for 5 secs only.
|
prey_prey-node-client
|
train
|
js
|
23b01edb568a9640c64a0106086616dc43221a7f
|
diff --git a/Services/Twilio/Rest/Sip.php b/Services/Twilio/Rest/Sip.php
index <HASH>..<HASH> 100644
--- a/Services/Twilio/Rest/Sip.php
+++ b/Services/Twilio/Rest/Sip.php
@@ -4,7 +4,7 @@
* For Linux filename compatibility, this file needs to be named Sip.php, or
* camelize() needs to be special cased in setupSubresources
*/
-class Services_Twilio_Rest_SIP extends Services_Twilio_InstanceResource {
+class Services_Twilio_Rest_Sip extends Services_Twilio_InstanceResource {
protected function init($client, $uri) {
$this->setupSubresources(
'domains',
|
Change class name to match filename
This is required in Linux for PSR-0.
|
twilio_twilio-php
|
train
|
php
|
8c53f5e8845e370996d0d4bc87296cf925efaadc
|
diff --git a/examples/demo.py b/examples/demo.py
index <HASH>..<HASH> 100644
--- a/examples/demo.py
+++ b/examples/demo.py
@@ -14,7 +14,7 @@ import time
import enlighten
-# pylint: disable=wrong-import-order
+# pylint: disable=wrong-import-order,import-error
from multicolored import run_tests, load
from multiple_logging import process_files, win_time_granularity
|
Quiet pylint
|
Rockhopper-Technologies_enlighten
|
train
|
py
|
0fa0d8b856bf0f33ea64a157240ad7db9b72d4f7
|
diff --git a/lib/serf/agent.js b/lib/serf/agent.js
index <HASH>..<HASH> 100644
--- a/lib/serf/agent.js
+++ b/lib/serf/agent.js
@@ -114,8 +114,15 @@ Agent.prototype.tryStart = function() {
this._handleOutput(String(data));
}).bind(this));
} catch(error) {
- this._agentProcess = null;
+ this._logger.error('Failed to start Serf agent.');
this._logger.error(error);
+ try {
+ this._agentProcess.kill();
+ } catch(error) {
+ this._logger.error('Failed to stop Serf agent.');
+ this._logger.error(error);
+ }
+ this._agentProcess = null;
}
};
@@ -172,6 +179,7 @@ Agent.prototype.shutdown = function() {
this._agentProcess = null;
resolve();
} catch(error) {
+ this._logger.error('Failed to stop Serf agent.');
this._logger.error(error);
reject(error);
}
|
Handle errors around Serf agent more safely
|
droonga_express-droonga
|
train
|
js
|
078d875a61474a16bb346ef5beb65f769d4a82c1
|
diff --git a/test/test_core.rb b/test/test_core.rb
index <HASH>..<HASH> 100644
--- a/test/test_core.rb
+++ b/test/test_core.rb
@@ -110,6 +110,18 @@ class ParanoidTest < ParanoidBaseTest
end
end
+ # Rails does not allow saving deleted records
+ def test_no_save_after_destroy
+ paranoid = ParanoidString.first
+ paranoid.destroy
+ paranoid.name = "Let's update!"
+
+ assert_not paranoid.save
+ assert_raises ActiveRecord::RecordNotSaved do
+ paranoid.save!
+ end
+ end
+
def setup_recursive_tests
@paranoid_time_object = ParanoidTime.first
|
Specify behavior when saving destroyed records
This basically tests Rails' behavior for models where '#destroyed?'
returns true.
|
ActsAsParanoid_acts_as_paranoid
|
train
|
rb
|
5b74bb93be41a5f1e9422e19d234c6329946732e
|
diff --git a/lfsapi/ssh.go b/lfsapi/ssh.go
index <HASH>..<HASH> 100644
--- a/lfsapi/ssh.go
+++ b/lfsapi/ssh.go
@@ -35,7 +35,7 @@ func (c *sshCache) Resolve(e Endpoint, method string) (sshAuthResponse, error) {
}
key := strings.Join([]string{e.SshUserAndHost, e.SshPort, e.SshPath, method}, "//")
- if res, ok := c.endpoints[key]; ok && (res.ExpiresAt.IsZero() || res.ExpiresAt.After(time.Now().Add(5*time.Second))) {
+ if res, ok := c.endpoints[key]; ok && (res.ExpiresAt.IsZero() || time.Until(res.ExpiresAt) > 5*time.Second) {
tracerx.Printf("ssh cache: %s git-lfs-authenticate %s %s",
e.SshUserAndHost, e.SshPath, endpointOperation(e, method))
return *res, nil
|
lfsapi: better time comparison
|
git-lfs_git-lfs
|
train
|
go
|
9a734be3e42a330142b9e4de376783189e4675d3
|
diff --git a/spec/model.rb b/spec/model.rb
index <HASH>..<HASH> 100644
--- a/spec/model.rb
+++ b/spec/model.rb
@@ -723,7 +723,7 @@ describe 'A created DBI::Model subclass instance' do
end
mc.id.should.not.be.nil
mc.c1.should.equal 123
- mc.class.should.equal DBI::Model
+ mc.class.should.equal @m_conflict
mc.class_.should.equal 'Mammalia'
mc.dup.should.equal mc
should.raise do
|
Corrected class check in Model spec.
|
Pistos_m4dbi
|
train
|
rb
|
c4c61fdc217029de408840d3ad0e5b4b6441f21e
|
diff --git a/lib/jira/base.rb b/lib/jira/base.rb
index <HASH>..<HASH> 100644
--- a/lib/jira/base.rb
+++ b/lib/jira/base.rb
@@ -374,7 +374,8 @@ module JIRA
}
)
end
- raise exception
+ # raise exception
+ save_status = false
end
save_status
end
|
Revert changes from #<I> and do not raise unexpected exceptions
|
sumoheavy_jira-ruby
|
train
|
rb
|
fea10d9c169214af82303744069bdd6c66c4a2ef
|
diff --git a/kafka/codec.py b/kafka/codec.py
index <HASH>..<HASH> 100644
--- a/kafka/codec.py
+++ b/kafka/codec.py
@@ -229,13 +229,21 @@ def lz4_encode_old_kafka(payload):
assert xxhash is not None
data = lz4_encode(payload)
header_size = 7
- if isinstance(data[4], int):
- flg = data[4]
- else:
- flg = ord(data[4])
+ flg = data[4]
+ if not isinstance(flg, int):
+ flg = ord(flg)
+
content_size_bit = ((flg >> 3) & 1)
if content_size_bit:
- header_size += 8
+ # Old kafka does not accept the content-size field
+ # so we need to discard it and reset the header flag
+ flg -= 8
+ data = bytearray(data)
+ data[4] = flg
+ data = bytes(data)
+ payload = data[header_size+8:]
+ else:
+ payload = data[header_size:]
# This is the incorrect hc
hc = xxhash.xxh32(data[0:header_size-1]).digest()[-2:-1] # pylint: disable-msg=no-member
@@ -243,7 +251,7 @@ def lz4_encode_old_kafka(payload):
return b''.join([
data[0:header_size-1],
hc,
- data[header_size:]
+ payload
])
|
LZ4 support in kafka <I>/<I> does not accept a ContentSize header
|
dpkp_kafka-python
|
train
|
py
|
8e87fb8ba6599f90a4646816daf7a36ab08b6784
|
diff --git a/addons/storyshots/src/test-bodies.js b/addons/storyshots/src/test-bodies.js
index <HASH>..<HASH> 100644
--- a/addons/storyshots/src/test-bodies.js
+++ b/addons/storyshots/src/test-bodies.js
@@ -16,7 +16,7 @@ function getSnapshotFileName(context) {
}
const { dir, name } = path.parse(fileName);
- return path.format({ dir, name, ext: '.storyshot' });
+ return path.format({ dir: path.join(dir, '__snapshots__'), name, ext: '.storyshot' });
}
export const snapshotWithOptions = options => ({ story, context }) => {
|
CHANGE path of the snapshots files into the regular `__snapshots__` folder
|
storybooks_storybook
|
train
|
js
|
ce2a853352c2e51a38e1f02c331f5513c72c46af
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -41,6 +41,7 @@ setup(
],
tests_require=[
'mock',
+ 'django-dynamic-fixture',
'django-nose',
'south',
],
|
added django dynamic fixture as test req
|
ambitioninc_django-entity
|
train
|
py
|
732cfa1ad60896077ca999fc22a1113d4d0477cd
|
diff --git a/raft/storage.go b/raft/storage.go
index <HASH>..<HASH> 100644
--- a/raft/storage.go
+++ b/raft/storage.go
@@ -52,9 +52,6 @@ type Storage interface {
FirstIndex() (uint64, error)
// Snapshot returns the most recent snapshot.
Snapshot() (pb.Snapshot, error)
- // ApplySnapshot overwrites the contents of this Storage object with
- // those of the given snapshot.
- ApplySnapshot(pb.Snapshot) error
}
// MemoryStorage implements the Storage interface backed by an
@@ -133,7 +130,8 @@ func (ms *MemoryStorage) Snapshot() (pb.Snapshot, error) {
return ms.snapshot, nil
}
-// ApplySnapshot implements the Storage interface.
+// ApplySnapshot overwrites the contents of this Storage object with
+// those of the given snapshot.
func (ms *MemoryStorage) ApplySnapshot(snap pb.Snapshot) error {
ms.Lock()
defer ms.Unlock()
|
raft: remove the applysnap from Storage interface
|
etcd-io_etcd
|
train
|
go
|
ee22e7ca7ca5938b9049a602d83d34ad3c96db29
|
diff --git a/crowd.py b/crowd.py
index <HASH>..<HASH> 100644
--- a/crowd.py
+++ b/crowd.py
@@ -503,7 +503,7 @@ class CrowdServer(object):
return True
- def get_membership(self):
+ def get_memberships(self):
"""Fetches all group memberships.
Returns:
|
Rename get_membership to get_memberships
|
pycontribs_python-crowd
|
train
|
py
|
3dc095b6211bf17a5b2e7eb3578842f82f7be52d
|
diff --git a/capsule/src/main/java/Capsule.java b/capsule/src/main/java/Capsule.java
index <HASH>..<HASH> 100644
--- a/capsule/src/main/java/Capsule.java
+++ b/capsule/src/main/java/Capsule.java
@@ -187,6 +187,7 @@ public class Capsule implements Runnable {
private static final String PROP_TMP_DIR = "java.io.tmpdir";
private static final String ATTR_MANIFEST_VERSION = "Manifest-Version";
+ private static final String ATTR_PREMAIN_CLASS = "Premain-Class";
private static final String ATTR_MAIN_CLASS = "Main-Class";
private static final String ATTR_CLASS_PATH = "Class-Path";
private static final String ATTR_IMPLEMENTATION_VERSION = "Implementation-Version";
@@ -2696,6 +2697,10 @@ public class Capsule implements Runnable {
}
private void validateManifest(Manifest manifest) {
+ if (!Capsule.class.getName().equals(manifest.getMainAttributes().getValue(ATTR_PREMAIN_CLASS)))
+ throw new IllegalStateException("Capsule manifest must specify " + Capsule.class.getName()
+ + " in the " + ATTR_PREMAIN_CLASS + " attribute.");
+
if (manifest.getMainAttributes().getValue(ATTR_CLASS_PATH) != null)
throw new IllegalStateException("Capsule manifest contains a " + ATTR_CLASS_PATH + " attribute."
+ " Use " + ATTR_APP_CLASS_PATH + " and/or " + ATTR_DEPENDENCIES + " instead.");
|
Require 'Capsule' as manifest's 'Premain-Class'
|
puniverse_capsule
|
train
|
java
|
e812075a422f25e8ae19bb62850e198e5082b3e2
|
diff --git a/pytime/filter.py b/pytime/filter.py
index <HASH>..<HASH> 100644
--- a/pytime/filter.py
+++ b/pytime/filter.py
@@ -273,7 +273,8 @@ class BaseParser(object):
numeric_month = NAMED_MONTHS[month]
return datetime.date(int(year), numeric_month, day)
except:
- raise CanNotFormatError('Not well formated. Expecting something like May,21st.2015')
+ raise CanNotFormatError('Not well formatted. Expecting something like May,21st.2015')
+
if __name__ == "__main__":
BaseParser.main(_current)
diff --git a/pytime/pytime.py b/pytime/pytime.py
index <HASH>..<HASH> 100644
--- a/pytime/pytime.py
+++ b/pytime/pytime.py
@@ -81,6 +81,7 @@ def daysrange(first=None, second=None, wipe=False):
:param first: datetime, date or string
:param second: datetime, date or string
+ :param wipe: boolean, excludes first and last date from range when True. Default is False.
:return: list
"""
_first, _second = parse(first), parse(second)
|
Fixed typo in filter.py and added additional blank space after. In pytime.py, documented wipe parameter in daysrange.
|
shinux_PyTime
|
train
|
py,py
|
52f624dd93ad53e207abcdda8ccb7ac42578b80b
|
diff --git a/app/index.js b/app/index.js
index <HASH>..<HASH> 100644
--- a/app/index.js
+++ b/app/index.js
@@ -118,7 +118,7 @@ module.exports = generators.Base.extend({
this.npmInstall([
'can@^2.3.0-pre.0',
'can-connect',
- 'steal',
+ 'steal@^0.11.0-pre.0',
'jquery',
'can-ssr',
'done-autorender',
@@ -132,7 +132,7 @@ module.exports = generators.Base.extend({
'documentjs@^0.3.0-pre.4',
'funcunit',
'steal-qunit',
- 'steal-tools',
+ 'steal-tools@^0.11.0-pre.7',
'testee'
], {'saveDev': true});
|
Use the newest versions of Steal and StealTools
Fixes #4
|
donejs_generator-donejs
|
train
|
js
|
e9b548a4ada71af87a0952864a786567b8e985e5
|
diff --git a/lxd/certificates.go b/lxd/certificates.go
index <HASH>..<HASH> 100644
--- a/lxd/certificates.go
+++ b/lxd/certificates.go
@@ -517,7 +517,18 @@ func certificatesPost(d *Daemon, r *http.Request) response.Response {
}
// Access check.
- secret, err := clusterConfig.GetString(d.db.Cluster, "core.trust_password")
+ // Can't us d.State().GlobalConfig.TrustPassword() here as global config is not yet updated.
+ var secret string
+ err = d.db.Cluster.Transaction(r.Context(), func(ctx context.Context, tx *db.ClusterTx) error {
+ config, err := clusterConfig.Load(tx)
+ if err != nil {
+ return err
+ }
+
+ secret = config.TrustPassword()
+
+ return nil
+ })
if err != nil {
return response.SmartError(err)
}
|
lxd/certificates: Updates certificatesPost to use config.TrustPassword
|
lxc_lxd
|
train
|
go
|
e9ffcf8903f5710a73de48cb1cdb0a6995d2d74d
|
diff --git a/kundera-hbase/src/main/java/com/impetus/client/hbase/admin/HBaseDataHandler.java b/kundera-hbase/src/main/java/com/impetus/client/hbase/admin/HBaseDataHandler.java
index <HASH>..<HASH> 100644
--- a/kundera-hbase/src/main/java/com/impetus/client/hbase/admin/HBaseDataHandler.java
+++ b/kundera-hbase/src/main/java/com/impetus/client/hbase/admin/HBaseDataHandler.java
@@ -531,7 +531,7 @@ public class HBaseDataHandler implements DataHandler
{
/* Set Row Key */
- PropertyAccessorHelper.setId(entity, m, hbaseData.getRowKey());
+ PropertyAccessorHelper.setId(entity, m, new String(hbaseData.getRowKey()));
// Raw data retrieved from HBase for a particular row key (contains
// all column families)
|
Fixed issue related to String byte conversion.
|
Impetus_Kundera
|
train
|
java
|
f462f5848059e5cc821119f9285b4ce54f998323
|
diff --git a/src/org/opencms/main/OpenCmsServlet.java b/src/org/opencms/main/OpenCmsServlet.java
index <HASH>..<HASH> 100644
--- a/src/org/opencms/main/OpenCmsServlet.java
+++ b/src/org/opencms/main/OpenCmsServlet.java
@@ -220,6 +220,8 @@ public class OpenCmsServlet extends HttpServlet implements I_CmsRequestHandler {
}
if (exportData != null) {
try {
+ // data found assume response code 200, may be corrected later
+ res.setStatus(HttpServletResponse.SC_OK);
// generate a static export request wrapper
CmsStaticExportRequest exportReq = new CmsStaticExportRequest(req, exportData);
// export the resource and set the response status according to the result
|
Fixing issue with wrong HTTP response code for static export resources.
|
alkacon_opencms-core
|
train
|
java
|
48561f85ec61d3d0eb70dd2a440b3bae6a57b09b
|
diff --git a/src/Data/DataAggregateInterface.php b/src/Data/DataAggregateInterface.php
index <HASH>..<HASH> 100644
--- a/src/Data/DataAggregateInterface.php
+++ b/src/Data/DataAggregateInterface.php
@@ -21,8 +21,8 @@ interface DataAggregateInterface
/**
* Merges new data if possible.
*
- * @param array $data
+ * @param array|object $data
* @return $this
*/
- public function mergeData(array $data);
+ public function mergeData($data);
}
diff --git a/src/Data/DataAggregateTrait.php b/src/Data/DataAggregateTrait.php
index <HASH>..<HASH> 100644
--- a/src/Data/DataAggregateTrait.php
+++ b/src/Data/DataAggregateTrait.php
@@ -35,13 +35,16 @@ trait DataAggregateTrait
* @param array $data
* @return $this
*/
- public function mergeData(array $data)
+ public function mergeData($data)
{
$oldData = $this->getData();
if ($oldData === null) {
$this->setData($data);
return $this;
}
+ if (is_object($data)) {
+ $data = get_object_vars($data);
+ }
if (is_object($oldData)) {
\mp\setValues($oldData, $data, MP_USE_SETTERS | MP_CREATE_PROPERTIES);
$this->setData($oldData);
|
DataAggregate: it's possile now to merge objects
|
view-components_view-components
|
train
|
php,php
|
3e136606fa740b70c55267a2b9f40811a4821a16
|
diff --git a/packages/components-react/src/components/Header/Header.js b/packages/components-react/src/components/Header/Header.js
index <HASH>..<HASH> 100644
--- a/packages/components-react/src/components/Header/Header.js
+++ b/packages/components-react/src/components/Header/Header.js
@@ -77,7 +77,7 @@ Header.defaultProps = {
},
unser_team: {
id: 'unser_team',
- url: 'https://www.mcmakler.de/unser-team/',
+ url: 'https://www.mcmakler.de/standorte-experten/',
title: 'Unser Team',
},
presse: {
@@ -85,11 +85,6 @@ Header.defaultProps = {
url: 'https://www.mcmakler.de/presse/',
title: 'Presse',
},
- standorte: {
- id: 'standorte',
- url: 'https://www.mcmakler.de/standorte/',
- title: 'Standorte',
- },
wohnlagenkarte: {
id: 'wohnlagenkarte',
url: 'https://www.mcmakler.de/wohnlagenkarte/',
|
chore(header) default props has been updated
|
mcmakler_components
|
train
|
js
|
daaf05530cc439ed35b931ed3b9be3b3b5dc4f62
|
diff --git a/dev/DebugView.php b/dev/DebugView.php
index <HASH>..<HASH> 100644
--- a/dev/DebugView.php
+++ b/dev/DebugView.php
@@ -51,17 +51,18 @@ class DebugView {
*/
public function Breadcrumbs() {
$basePath = str_replace(Director::protocolAndHost(), '', Director::absoluteBaseURL());
- $parts = explode('/', str_replace($basePath, '', $_SERVER['REQUEST_URI']));
+ $relPath = parse_url(str_replace($basePath, '', $_SERVER['REQUEST_URI']), PHP_URL_PATH);
+ $parts = explode('/', $relPath);
$base = Director::absoluteBaseURL();
- $path = "";
$pathPart = "";
+ $pathLinks = array();
foreach($parts as $part) {
if ($part != '') {
$pathPart .= "$part/";
- $path .= "<a href=\"$base$pathPart\">$part</a>→ ";
+ $pathLinks[] = "<a href=\"$base$pathPart\">$part</a>";
}
}
- return $path;
+ return implode('→ ', $pathLinks);
}
/**
|
BUGFIX Fixed DebugView Breadcrumbs to not include query string as separate link, and don't append an arrow after the last element
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@<I> <I>b<I>ca-7a2a-<I>-9d3b-<I>d<I>a<I>a9
|
silverstripe_silverstripe-framework
|
train
|
php
|
e0866e5c408d73530ca05a676a83816d1434205a
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -16,6 +16,10 @@ describe('serveStatic()', function(){
server = createServer();
});
+ it('should require root path', function(){
+ serveStatic.bind().should.throw(/root path required/);
+ });
+
it('should serve static files', function(done){
request(server)
.get('/todo.txt')
|
tests: add test for root path requirement
|
expressjs_serve-static
|
train
|
js
|
7edc92457c7f1614f4725798a741a62482546922
|
diff --git a/course/lib.php b/course/lib.php
index <HASH>..<HASH> 100644
--- a/course/lib.php
+++ b/course/lib.php
@@ -1460,7 +1460,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
$completion=$hidecompletion
? COMPLETION_TRACKING_NONE
: $completioninfo->is_enabled($mod);
- if($completion!=COMPLETION_TRACKING_NONE) {
+ if($completion!=COMPLETION_TRACKING_NONE && isloggedin() && !isguestuser()) {
$completiondata=$completioninfo->get_data($mod,true);
$completionicon='';
if($isediting) {
|
MDL-<I>: Completion fix: hide completion icons for guest/not logged in
|
moodle_moodle
|
train
|
php
|
7d59b2e350cbff1454355bc5225fc0f93bbba3a7
|
diff --git a/testing/test_collection.py b/testing/test_collection.py
index <HASH>..<HASH> 100644
--- a/testing/test_collection.py
+++ b/testing/test_collection.py
@@ -281,7 +281,7 @@ class TestPrunetraceback(object):
outcome = yield
rep = outcome.get_result()
rep.headerlines += ["header1"]
- outcome.set_result(rep)
+ outcome.force_result(rep)
""")
result = testdir.runpytest(p)
result.stdout.fnmatch_lines([
|
Fix call to outcome.force_result
Even though the test is not running at the moment (xfail), at least
we avoid future confusion
|
pytest-dev_pytest
|
train
|
py
|
c9a18b7a3be7a3777e0d9c45cc419bc3b18581b3
|
diff --git a/lib/friendly_id/active_record_adapter/tasks.rb b/lib/friendly_id/active_record_adapter/tasks.rb
index <HASH>..<HASH> 100644
--- a/lib/friendly_id/active_record_adapter/tasks.rb
+++ b/lib/friendly_id/active_record_adapter/tasks.rb
@@ -30,7 +30,7 @@ module FriendlyId
:include => :slug,
:limit => (ENV["LIMIT"] || 100).to_i,
:offset => 0,
- :order => ENV["ORDER"] || "#{klass.table_name}.id ASC",
+ :order => ENV["ORDER"] || "#{klass.table_name}.#{klass.primary_key} ASC",
}.merge(task_options || {})
while records = find(:all, options) do
|
fixed rake task to using class.primary_key rather than string "id"
|
norman_friendly_id
|
train
|
rb
|
980ad672dacd0efe55760f9fb9b59d96f5469536
|
diff --git a/src/share/classes/com/sun/tools/javac/code/TargetType.java b/src/share/classes/com/sun/tools/javac/code/TargetType.java
index <HASH>..<HASH> 100644
--- a/src/share/classes/com/sun/tools/javac/code/TargetType.java
+++ b/src/share/classes/com/sun/tools/javac/code/TargetType.java
@@ -80,7 +80,7 @@ public enum TargetType {
/** For annotations on a type argument or nested array of a local. */
LOCAL_VARIABLE_GENERIC_OR_ARRAY(0x09, HasLocation, IsLocal),
- /** For type annotations on a method return type */
+ /** For type annotations on a method return type. */
METHOD_RETURN(0x0A),
/**
@@ -89,15 +89,13 @@ public enum TargetType {
*/
METHOD_RETURN_GENERIC_OR_ARRAY(0x0B, HasLocation),
- /**
- * For type annotations on a method parameter
- */
+ /** For type annotations on a method parameter. */
METHOD_PARAMETER(0x0C),
/** For annotations on a type argument or nested array of a method parameter. */
METHOD_PARAMETER_GENERIC_OR_ARRAY(0x0D, HasLocation),
- /** For type annotations on a method parameter */
+ /** For type annotations on a field. */
FIELD(0x0E),
/** For annotations on a type argument or nested array of a field. */
|
Fix mistake in documentation. Re-format documentation.
|
wmdietl_jsr308-langtools
|
train
|
java
|
1fffda4af562bea1b0f45a0e1f25d3895cb48ffd
|
diff --git a/relaxng/datatype/java/src/org/whattf/datatype/MetaName.java b/relaxng/datatype/java/src/org/whattf/datatype/MetaName.java
index <HASH>..<HASH> 100644
--- a/relaxng/datatype/java/src/org/whattf/datatype/MetaName.java
+++ b/relaxng/datatype/java/src/org/whattf/datatype/MetaName.java
@@ -29,10 +29,13 @@ import org.relaxng.datatype.DatatypeException;
public class MetaName extends AbstractDatatype {
private static final String[] VALID_NAMES = {
+ "apple-mobile-web-app-capable", // extension
+ "apple-mobile-web-app-status-bar-style", // extension
"application-name",
"author",
"baiduspider", // extension
"description",
+ "format-detection", // extension
"generator",
"googlebot", // extension
"keywords",
|
Update MetaName.java with the latest changes to the meta name registry.
|
validator_validator
|
train
|
java
|
15502afd5bc339bf58dfd32b79ddf2979489f1de
|
diff --git a/javascript/bin/generate_static_data.js b/javascript/bin/generate_static_data.js
index <HASH>..<HASH> 100755
--- a/javascript/bin/generate_static_data.js
+++ b/javascript/bin/generate_static_data.js
@@ -34,9 +34,8 @@ function ll(str){
}
// We get our own manager.
-var gserv = new amigo.data.server();
var gconf = new bbop.golr.conf(amigo.data.golr);
-var gm_ann = new bbop.golr.manager.rhino(gserv.golr_base(), gconf);
+var gm_ann = new bbop.golr.manager.rhino('http://golr.geneontology.org/', gconf);
gm_ann.debug(false);
gm_ann.set_facet_limit(-1);
if( ! gm_ann.set_personality('bbop_ann') ){ // profile in gconf
|
try and get the image gen scripts to use the current public data now that the URL is stable
|
geneontology_amigo
|
train
|
js
|
fd1f3138595da43ea8273f824b7dd01b27600090
|
diff --git a/painter/__init__.py b/painter/__init__.py
index <HASH>..<HASH> 100644
--- a/painter/__init__.py
+++ b/painter/__init__.py
@@ -1,4 +1,9 @@
__version__ = '0.2-dev'
+__author__ = 'Fotis Gimian'
+__email__ = 'fgimiansoftware@gmail.com'
+__url__ = 'https://github.com/fgimian/painter'
+__license__ = 'MIT'
+__title__ = 'Painter'
from .ansi_styles import ansi # noqa
from .has_color import has_color # noqa
|
Added further metadata to the painter package
|
fgimian_painter
|
train
|
py
|
eb17691b51d6e1e51d1b840afa08e1e3fa8cc0db
|
diff --git a/src/MvcCore/Ext/Debugs/Tracys/SessionPanel.php b/src/MvcCore/Ext/Debugs/Tracys/SessionPanel.php
index <HASH>..<HASH> 100644
--- a/src/MvcCore/Ext/Debugs/Tracys/SessionPanel.php
+++ b/src/MvcCore/Ext/Debugs/Tracys/SessionPanel.php
@@ -46,7 +46,7 @@ class SessionPanel implements \Tracy\IBarPanel
protected $session = [];
/**
- * Formated max. lifetime from `\MvcCore\Session` namespace.
+ * Formatted maximum lifetime from `\MvcCore\Session` namespace.
* @var string
*/
protected $sessionMaxLifeTime = '';
|
English grammar fixes. Assets View Helper update to remove \Nette\Utils\SafeStream, because it's not necessary anymore - atomic saving is part of core class \MvcCore\Tool.
|
mvccore_ext-debug-tracy-session
|
train
|
php
|
997c930b6bb227247aa24b2280cdc1d543e785eb
|
diff --git a/src/Jobs/DbLogger.php b/src/Jobs/DbLogger.php
index <HASH>..<HASH> 100644
--- a/src/Jobs/DbLogger.php
+++ b/src/Jobs/DbLogger.php
@@ -49,7 +49,7 @@ class DbLogger implements ShouldQueue
'mobile' => $this->code->to,
'data' => json_encode($this->code),
'is_sent' => $this->flag,
- 'result' => json_encode($this->result),
+ 'result' => $this->result,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
]);
diff --git a/src/Sms.php b/src/Sms.php
index <HASH>..<HASH> 100644
--- a/src/Sms.php
+++ b/src/Sms.php
@@ -115,7 +115,7 @@ class Sms
$flag = false;
}
- DbLogger::dispatch($code, $results, $flag);
+ DbLogger::dispatch($code, json_encode($results), $flag);
return $flag;
}
|
fix serialization-of-closure for aliyun send failed result.
|
ibrandcc_laravel-sms
|
train
|
php,php
|
397829bd39b1464f239a1608e21d9749e8e2e593
|
diff --git a/lib/pronto/github.rb b/lib/pronto/github.rb
index <HASH>..<HASH> 100644
--- a/lib/pronto/github.rb
+++ b/lib/pronto/github.rb
@@ -41,6 +41,7 @@ module Pronto
def create_pull_request_review(comments)
options = {
event: 'COMMENT',
+ accept: 'application/vnd.github.black-cat-preview+json', # https://developer.github.com/v3/pulls/reviews/#create-a-pull-request-review
comments: comments.map do |c|
{ path: c.path, position: c.position, body: c.body }
end
|
To access the API you must provide a custom media type in the Accept header
|
prontolabs_pronto
|
train
|
rb
|
23f8db5b8667d05eac58084923280a3533e360d1
|
diff --git a/lib/xcode/install/cli.rb b/lib/xcode/install/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/xcode/install/cli.rb
+++ b/lib/xcode/install/cli.rb
@@ -5,7 +5,10 @@ module XcodeInstall
self.summary = 'Installs Xcode Command Line Tools.'
def run
- fail Informative, 'Xcode CLI Tools are already installed.' if installed?
+ if installed?
+ print 'Xcode CLI Tools are already installed.'
+ exit(0)
+ end
install
end
|
Don't exit 1 if CLI tools are already installed
Previously `xcversion install-cli-tools` would exit 1 if they were
already installed, but `xcversion install VERSION` would exit 0. This
makes them have the same behavior.
|
xcpretty_xcode-install
|
train
|
rb
|
b168a19547b5ffba833d4f7b4239c7be8fbd053d
|
diff --git a/src/response.js b/src/response.js
index <HASH>..<HASH> 100644
--- a/src/response.js
+++ b/src/response.js
@@ -108,7 +108,7 @@ const generate = (resource, associations, req, version, options) => {
// returned along with the result. A $count query option with a value of
// false (or not specified) hints that the service SHALL not return a
// count.
- if (count !== 'false') {
+ if (count !== false) {
response[iotCount] = totalCount;
}
diff --git a/test/test_query_language.js b/test/test_query_language.js
index <HASH>..<HASH> 100644
--- a/test/test_query_language.js
+++ b/test/test_query_language.js
@@ -138,8 +138,7 @@ db().then(models => {
});
});
- // XXX OData parser. $count is not supported.
- xit('should respond without count', done => {
+ it('should respond without count', done => {
get(modelName + '?$count=false')
.then(result => {
should.not.exist(result[CONST.iotCount]);
|
[Issue #<I>] $count=false is not working properly (#<I>)
|
mozilla-sensorweb_sensorthings
|
train
|
js,js
|
2a3ddc8f754d0947d05da0f9ada5d3eaee85c70f
|
diff --git a/peewee.py b/peewee.py
index <HASH>..<HASH> 100644
--- a/peewee.py
+++ b/peewee.py
@@ -33,7 +33,7 @@ class Database(object):
return result.fetchone()[0]
def create_table(self, model_class):
- framing = "CREATE TABLE %s (%s);"
+ framing = "CREATE TABLE IF NOT EXISTS %s (%s);"
columns = []
for field in model_class._meta.fields.values():
|
Create table only if it doesn't exist
|
coleifer_peewee
|
train
|
py
|
9f88ecbe5aaeadf60307d0f2b249cf259fed540b
|
diff --git a/charmhelpers/contrib/openstack/utils.py b/charmhelpers/contrib/openstack/utils.py
index <HASH>..<HASH> 100644
--- a/charmhelpers/contrib/openstack/utils.py
+++ b/charmhelpers/contrib/openstack/utils.py
@@ -153,7 +153,7 @@ SWIFT_CODENAMES = OrderedDict([
('newton',
['2.8.0', '2.9.0', '2.10.0']),
('ocata',
- ['2.11.0']),
+ ['2.11.0', '2.12.0']),
])
# >= Liberty version->codename mapping
|
Add <I> to swift list of releases for ocata
|
juju_charm-helpers
|
train
|
py
|
a13ff87d418ae88682a24b802cb2a387cbde1bbd
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -41,5 +41,5 @@ setup(
packages=find_packages('.'),
include_package_data=True,
zip_safe=False,
- install_requires=['django-inplaceedit==1.2.2']
+ install_requires=['django-inplaceedit>=1.2.3']
)
|
Update the django-inplaceedit
|
django-inplaceedit_django-inplaceedit-bootstrap
|
train
|
py
|
2e51761d5be6994845bd276a46da75328baa2f1d
|
diff --git a/development-utility/development-server/src/com/thoughtworks/go/server/DevelopmentServer.java b/development-utility/development-server/src/com/thoughtworks/go/server/DevelopmentServer.java
index <HASH>..<HASH> 100644
--- a/development-utility/development-server/src/com/thoughtworks/go/server/DevelopmentServer.java
+++ b/development-utility/development-server/src/com/thoughtworks/go/server/DevelopmentServer.java
@@ -52,6 +52,7 @@ public class DevelopmentServer {
systemEnvironment.setProperty(SystemEnvironment.PARENT_LOADER_PRIORITY, "true");
systemEnvironment.setProperty(SystemEnvironment.CRUISE_SERVER_WAR_PROPERTY, webApp.getAbsolutePath());
+ systemEnvironment.set(SystemEnvironment.PLUGIN_LOCATION_MONITOR_INTERVAL_IN_SECONDS, 5);
systemEnvironment.set(SystemEnvironment.DEFAULT_PLUGINS_ZIP, "/plugins.zip");
systemEnvironment.setProperty(GoConstants.I18N_CACHE_LIFE, "0"); //0 means reload when stale
|
#NA - Setting plugin location monitor interval to 5secs for Development Server
This makes it convenient to test plugins and end-points while developing.
|
gocd_gocd
|
train
|
java
|
f9e069377c54cf1a60bfb6b177c194a6464a989c
|
diff --git a/grunt.js b/grunt.js
index <HASH>..<HASH> 100644
--- a/grunt.js
+++ b/grunt.js
@@ -1,7 +1,7 @@
module.exports = function(grunt){
grunt.initConfig({
lint: {
- all: ['grunt.js', 'lib/*', 'test/*']
+ all: ['grunt.js', 'lib/*', 'test/*.js']
},
test: {
files: ['test/*.js']
|
Forced lint on js files only.
|
rogeriopvl_nodo
|
train
|
js
|
fb6e7798207fb9dfc8231a3d63e0affa068cf0a0
|
diff --git a/lib/simple_form/form_builder.rb b/lib/simple_form/form_builder.rb
index <HASH>..<HASH> 100644
--- a/lib/simple_form/form_builder.rb
+++ b/lib/simple_form/form_builder.rb
@@ -48,6 +48,11 @@ module SimpleForm
# label + input + hint (when defined) + errors (when exists), and all can
# be configured inside a wrapper html.
#
+ # If a block is given, the contents of the block will replace the input
+ # field that would otherwise be generated automatically. The content will
+ # be given a label and wrapper div to make it consistent with the other
+ # elements in the form.
+ #
# == Examples
#
# # Imagine @user has error "can't be blank" on name
|
Add docs for #input method with block
To explain what happens when you pass a block to the #input method
within the form builder
|
plataformatec_simple_form
|
train
|
rb
|
8e6991194b7e92e2fdb03d1239da3940cc309627
|
diff --git a/libraries/TeamSpeak3/Node/Host.php b/libraries/TeamSpeak3/Node/Host.php
index <HASH>..<HASH> 100644
--- a/libraries/TeamSpeak3/Node/Host.php
+++ b/libraries/TeamSpeak3/Node/Host.php
@@ -594,7 +594,7 @@ class TeamSpeak3_Node_Host extends TeamSpeak3_Node_Abstract
$permtree[$val]["permcatid"] = $val;
$permtree[$val]["permcathex"] = "0x" . dechex($val);
$permtree[$val]["permcatname"] = TeamSpeak3_Helper_String::factory(TeamSpeak3_Helper_Convert::permissionCategory($val));
- $permtree[$val]["permcatparent"] = $permtree[$val]["permcathex"]{3} == 0 ? 0 : hexdec($permtree[$val]["permcathex"]{2} . 0);
+ $permtree[$val]["permcatparent"] = $permtree[$val]["permcathex"][3] == 0 ? 0 : hexdec($permtree[$val]["permcathex"][2] . 0);
$permtree[$val]["permcatchilren"] = 0;
$permtree[$val]["permcatcount"] = 0;
|
Remove deprecated curly braces (#<I>)
|
planetteamspeak_ts3phpframework
|
train
|
php
|
6135c381c15107074881cec8ea71e85380d03fea
|
diff --git a/Source/classes/DragSort.js b/Source/classes/DragSort.js
index <HASH>..<HASH> 100644
--- a/Source/classes/DragSort.js
+++ b/Source/classes/DragSort.js
@@ -49,9 +49,10 @@ Garnish.DragSort = Garnish.Drag.extend({
this.base();
// add the caboose?
- if (this.settings.container && this.$caboose)
+ if (this.$caboose)
{
- this.$caboose.appendTo(this.settings.container);
+ var $lastItem = $().add(this.$items).last();
+ this.$caboose.insertAfter($lastItem);
this.otherItems.push(this.$caboose[0]);
this.totalOtherItems++;
}
|
Cabooses (cabeese?) no longer require the drag class have a container
|
pixelandtonic_garnishjs
|
train
|
js
|
2f77007c9867a367878e0bce7664a573b1c05e84
|
diff --git a/Entity/CronJob.php b/Entity/CronJob.php
index <HASH>..<HASH> 100644
--- a/Entity/CronJob.php
+++ b/Entity/CronJob.php
@@ -25,28 +25,28 @@ class CronJob
/**
* @var string
*
- * @ORM\Column(name="name", type="string", length=255)
+ * @ORM\Column(name="name", type="string", length=191)
*/
private $name;
/**
* @var string
*
- * @ORM\Column(name="command", type="string", length=255)
+ * @ORM\Column(name="command", type="string", length=191)
*/
private $command;
/**
* @var string
*
- * @ORM\Column(name="schedule", type="string", length=255)
+ * @ORM\Column(name="schedule", type="string", length=191)
*/
private $schedule;
/**
* @var string
*
- * @ORM\Column(name="description", type="string", length=255)
+ * @ORM\Column(name="description", type="string", length=191)
*/
private $description;
|
changed length of strings for utf8mb4 support (#<I>)
|
Cron_Symfony-Bundle
|
train
|
php
|
80dd994671331e27ef9b4953af0206e0dca68d59
|
diff --git a/rtmbot.py b/rtmbot.py
index <HASH>..<HASH> 100755
--- a/rtmbot.py
+++ b/rtmbot.py
@@ -7,6 +7,7 @@ import client
sys.path.append(os.getcwd())
+
def parse_args():
parser = ArgumentParser()
parser.add_argument(
|
flake8
for reals this time
|
slackapi_python-rtmbot
|
train
|
py
|
b99e5efe40e831ab8271aea10ded591084f94ed0
|
diff --git a/src/cli.js b/src/cli.js
index <HASH>..<HASH> 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -72,9 +72,18 @@ async function main() {
// We need to polyfill it for the server side.
const channel = new EventEmitter();
addons.setChannel(channel);
- await runner.run(filterStorybook(storybook, grep, exclude));
+ const result = await runner.run(filterStorybook(storybook, grep, exclude));
+ const fails = result.errored + result.unmatched;
+ const exitCode = fails > 0 ? 1: 0;
+ if(!program.watch){
+ process.exit(exitCode);
+ }
} catch (e) {
- console.log(e.stack);
+ console.log(e.stack || e);
+
+ if(!program.watch){
+ process.exit(1);
+ }
}
}
diff --git a/src/test_runner/index.js b/src/test_runner/index.js
index <HASH>..<HASH> 100644
--- a/src/test_runner/index.js
+++ b/src/test_runner/index.js
@@ -125,5 +125,6 @@ export default class Runner {
}
this.end();
+ return this.testState;
}
}
|
Exit with exit code 1 if some tests errored or unmatched
|
storybook-eol_storyshots
|
train
|
js,js
|
255f44383fd4c53a53e63bc5ff071de2e0cb658b
|
diff --git a/src/Graph/Presenters/GraphViz.php b/src/Graph/Presenters/GraphViz.php
index <HASH>..<HASH> 100644
--- a/src/Graph/Presenters/GraphViz.php
+++ b/src/Graph/Presenters/GraphViz.php
@@ -154,7 +154,7 @@ HTML;
/**
* @var Node $node
*/
- foreach($nodes as $node) {
+ foreach ($nodes as $node) {
/**
* @var Vertex $vertex
*/
@@ -190,4 +190,4 @@ HTML;
{
return $this->graphViz->createImageHtml($this->graph);
}
-}
\ No newline at end of file
+}
|
making it psr-2 compatible
|
YouweGit_data-dictionary
|
train
|
php
|
1782f287ce51364fb02f99c79190282ab747c134
|
diff --git a/src/main/java/com/semanticcms/section/servlet/impl/SectionImpl.java b/src/main/java/com/semanticcms/section/servlet/impl/SectionImpl.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/semanticcms/section/servlet/impl/SectionImpl.java
+++ b/src/main/java/com/semanticcms/section/servlet/impl/SectionImpl.java
@@ -1,6 +1,6 @@
/*
* semanticcms-section-servlet - Sections nested within SemanticCMS pages and elements in a Servlet environment.
- * Copyright (C) 2013, 2014, 2015, 2016, 2017, 2019, 2020, 2021 AO Industries, Inc.
+ * Copyright (C) 2013, 2014, 2015, 2016, 2017, 2019, 2020, 2021, 2022 AO Industries, Inc.
* support@aoindustries.com
* 7262 Bull Pen Cir
* Mobile, AL 36695
@@ -47,7 +47,7 @@ import javax.servlet.ServletRequest;
import javax.servlet.jsp.SkipPageException;
// TODO: Implement with https://www.w3.org/TR/wai-aria-1.1/#aria-label
-public abstract class SectionImpl {
+public final class SectionImpl {
/** Make no instances. */
private SectionImpl() {throw new AssertionError();}
|
Using final instead of abstract for static utility classes
NetBeans <I> is warning "Constructor is never used" when abstract, and
this cannot be suppressed with `@SuppressWarnings("unused")`.
|
aoindustries_semanticcms-section-servlet
|
train
|
java
|
9d85d02f8d22b1d2a889bf6add49ecc5a3ade717
|
diff --git a/isso/utils/hash.py b/isso/utils/hash.py
index <HASH>..<HASH> 100644
--- a/isso/utils/hash.py
+++ b/isso/utils/hash.py
@@ -3,7 +3,7 @@
import codecs
import hashlib
-from werkzeug.security import pbkdf2_bin as pbkdf2
+from hashlib import pbkdf2_hmac as pbkdf2
def _TypeError(name, expected, val):
@@ -68,7 +68,8 @@ class PBKDF2(Hash):
self.func = func
def compute(self, val):
- return pbkdf2(val, self.salt, self.iterations, self.dklen, self.func)
+ return pbkdf2(hash_name=self.func, password=val, salt=self.salt,
+ iterations=self.iterations, dklen=self.dklen)
def new(conf):
|
utils: hash: Use hashlib for pbkdf2
werkzeug <I> will deprecate `pbkdf2_bin` and recommends
pbkdf2_hmac as an alternative.
Adjust function invocation and use named args to avoid
confusion.
Compare:
<URL>
|
posativ_isso
|
train
|
py
|
1c37f7ffb08ea98dcf4e9a7ec19a76c3bb310ccd
|
diff --git a/onecodex/lib/upload.py b/onecodex/lib/upload.py
index <HASH>..<HASH> 100644
--- a/onecodex/lib/upload.py
+++ b/onecodex/lib/upload.py
@@ -307,6 +307,9 @@ def _file_stats(file_path, enforce_fastx=True):
# this lets us turn off the click progressbar context manager and is python2 compatible
# https://stackoverflow.com/questions/45187286/how-do-i-write-a-null-no-op-contextmanager-in-python
class FakeProgressBar(object):
+ pct = 0
+ label = ''
+
def __init__(self):
pass
|
Make FakeProgressBar support pct and label. Closes #<I>.
|
onecodex_onecodex
|
train
|
py
|
87aa2539d0399e9b689a53751880aa78317a781d
|
diff --git a/cmd-ls.go b/cmd-ls.go
index <HASH>..<HASH> 100644
--- a/cmd-ls.go
+++ b/cmd-ls.go
@@ -59,6 +59,10 @@ func printObject(date time.Time, v int64, key string) {
func doListCmd(ctx *cli.Context) {
var items []*client.Item
+ if len(ctx.Args()) < 1 {
+ cli.ShowCommandHelpAndExit(ctx, "ls", 1) // last argument is exit code
+ }
+
urlStr, err := parseURL(ctx.Args().First())
if err != nil {
log.Debug.Println(iodine.New(err, nil))
diff --git a/cmd-mb.go b/cmd-mb.go
index <HASH>..<HASH> 100644
--- a/cmd-mb.go
+++ b/cmd-mb.go
@@ -25,6 +25,10 @@ import (
// doMakeBucketCmd creates a new bucket
func doMakeBucketCmd(ctx *cli.Context) {
+ if len(ctx.Args()) < 1 {
+ cli.ShowCommandHelpAndExit(ctx, "mb", 1) // last argument is exit code
+ }
+
urlStr, err := parseURL(ctx.Args().First())
if err != nil {
log.Debug.Println(iodine.New(err, nil))
|
show help when no args are passed
|
minio_mc
|
train
|
go,go
|
6671cc043d89a74584da0865f0470dfa25b9b58b
|
diff --git a/src/ThemeCompile.php b/src/ThemeCompile.php
index <HASH>..<HASH> 100644
--- a/src/ThemeCompile.php
+++ b/src/ThemeCompile.php
@@ -45,6 +45,8 @@ class ThemeCompile extends ParallelExec
*/
public function run()
{
+ // Print the output of the compile commands.
+ $this->printed();
if (file_exists($this->dir . '/Gemfile')) {
$bundle = $this->findExecutable('bundle');
$this->processes[] = new Process(
|
Issue #<I>: Print the output of the compile commands.
|
digipolisgent_robo-digipolis-package
|
train
|
php
|
3b614d841557d2d8c0cc76f385ef778e099e5de6
|
diff --git a/saltcloud/clouds/joyent.py b/saltcloud/clouds/joyent.py
index <HASH>..<HASH> 100644
--- a/saltcloud/clouds/joyent.py
+++ b/saltcloud/clouds/joyent.py
@@ -219,9 +219,10 @@ def create(vm_):
deploy_kwargs['make_master'] = True
deploy_kwargs['master_pub'] = vm_['master_pub']
deploy_kwargs['master_pem'] = vm_['master_pem']
- master_conf = saltcloud.utils.master_conf_string(__opts__, vm_)
- if master_conf:
- deploy_kwargs['master_conf'] = master_conf
+ master_conf = saltcloud.utils.master_conf(__opts__, vm_)
+ deploy_kwargs['master_conf'] = saltcloud.utils.salt_config_to_yaml(
+ master_conf
+ )
if master_conf.get('syndic_master', None):
deploy_kwargs['make_syndic'] = True
|
Fix the logic for make_syndic in Joyent
|
saltstack_salt
|
train
|
py
|
c6d96ad3cd8d08bb5a32e14dc9f61cf48f1a097d
|
diff --git a/tests/Helpers/Environment.php b/tests/Helpers/Environment.php
index <HASH>..<HASH> 100644
--- a/tests/Helpers/Environment.php
+++ b/tests/Helpers/Environment.php
@@ -12,6 +12,11 @@ class Environment
(new Dotenv(__DIR__.'/../../'))->load();
}
+ /**
+ * @param string $key Env var name to read
+ * @param mixed $default Optional default value
+ * @return string
+ */
public function read($key, $default = self::ENV_VAR_NOT_SET)
{
$result = getenv($key) ?: $default;
|
Added DocComments to Environment class
|
ebanx_benjamin
|
train
|
php
|
1a9766f1280f9550ba1de4538fccd5ad51c557ac
|
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/migration.rb
+++ b/activerecord/lib/active_record/migration.rb
@@ -668,11 +668,7 @@ module ActiveRecord
copied
end
- # Determines the version number of the next migration
- # if the timestamped migrations are activated then the comparison with the current time is made
- # and then higer of the two values is selected
- # For non timestamped values, the simple numbers are used in the format of "057", "570"
-
+ # Determines the version number of the next migration.
def next_migration_number(number)
if ActiveRecord::Base.timestamped_migrations
[Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % number].max
|
copy edits [ci skip]
|
rails_rails
|
train
|
rb
|
c4902f436b3e607ab4062fd3aebf4146c6f5f17e
|
diff --git a/cmd/fluxd/main.go b/cmd/fluxd/main.go
index <HASH>..<HASH> 100644
--- a/cmd/fluxd/main.go
+++ b/cmd/fluxd/main.go
@@ -49,7 +49,7 @@ func main() {
kubernetesBearerTokenFile = fs.String("kubernetes-bearer-token-file", "", "Path to file containing Kubernetes Bearer Token file")
databaseDriver = fs.String("database-driver", "ql-mem", `Database driver name, e.g., "postgres"; the default is an in-memory DB`)
databaseSource = fs.String("database-source", "history.db", `Database source name; specific to the database driver (--database-driver) used. The default is an arbitrary, in-memory DB name`)
- repoURL = fs.String("repo-url", "", "Config repo URL, e.g. https://github.com/myorg/conf.git (required)")
+ repoURL = fs.String("repo-url", "", "Config repo URL, e.g. git@github.com:myorg/conf (required)")
repoKey = fs.String("repo-key", "", "SSH key file with commit rights to config repo")
repoPath = fs.String("repo-path", "", "Path within config repo to look for resource definition files")
)
|
Typical SSH-based git creds require <EMAIL> form
|
weaveworks_flux
|
train
|
go
|
84e7965b667b5d9270c4e30af8ddfaf84bb0b9ed
|
diff --git a/test/test_subprocess.rb b/test/test_subprocess.rb
index <HASH>..<HASH> 100644
--- a/test/test_subprocess.rb
+++ b/test/test_subprocess.rb
@@ -260,5 +260,21 @@ describe Subprocess do
end
(Time.now - start).must_be_close_to(2.0, 0.2)
end
+
+ it "doesn't leak children when throwing errors" do
+ lambda {
+ Subprocess.call(['/not/a/file', ':('])
+ }.must_raise(Errno::ENOENT)
+
+ ps_pid = 0
+ procs = Subprocess.check_output(['ps', '-o', 'pid ppid']) do |p|
+ ps_pid = p.pid
+ end
+
+ pid_table = procs.split("\n")[1..-1].map{ |l| l.split(' ').map(&:to_i) }
+ children = pid_table.find_all{ |pid, ppid| ppid == $$ && pid != ps_pid }
+
+ children.must_equal([])
+ end
end
end
|
Add test for leaking children on errors
This tests the behavior fixed by <I>f<I>d<I>e<I>e<I>c<I>bab0ded<I>e6b5c7.
|
stripe_subprocess
|
train
|
rb
|
74ca7b43c01c1e0d801b1197bb7023c2e76b9ea8
|
diff --git a/src/client/pps.go b/src/client/pps.go
index <HASH>..<HASH> 100644
--- a/src/client/pps.go
+++ b/src/client/pps.go
@@ -26,7 +26,7 @@ const (
// amount of time in order to keep owning a chunk. In reality, pods send
// ContinueJob more often than that because they need to account for network
// latency.
- PPSLeasePeriod = 20 * time.Second
+ PPSLeasePeriod = 30 * time.Second
)
var (
|
Increase lease period
That way a pod needs to miss at least two heartbeats before the chunk is revoked.
|
pachyderm_pachyderm
|
train
|
go
|
9001c75956c6ca1e47abbef73547f4df1376c471
|
diff --git a/src/viewmodel/prototype/register.js b/src/viewmodel/prototype/register.js
index <HASH>..<HASH> 100644
--- a/src/viewmodel/prototype/register.js
+++ b/src/viewmodel/prototype/register.js
@@ -14,7 +14,7 @@ export default function Viewmodel$register ( keypath, dependant, group = 'defaul
deps.push( dependant );
- if ( keypath === undefined ) {
+ if ( !keypath ) {
return;
}
|
keypaths shouldn't be falsey in viewmodel register
because it makes the node test fail, but not the same code in the browser?
|
ractivejs_ractive
|
train
|
js
|
09e1736d4d97cd87b39d1dc7c55b26583b809d4a
|
diff --git a/devices/ledvance.js b/devices/ledvance.js
index <HASH>..<HASH> 100644
--- a/devices/ledvance.js
+++ b/devices/ledvance.js
@@ -167,4 +167,14 @@ module.exports = [
extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
ota: ota.ledvance,
},
+{
+ zigbeeModel: ['CLA 60 DIM'],
+ model: '4058075728981',
+ vendor: 'LEDVANCE',
+ description: 'SMART+ Classic A E27 dimmable white',
+ extend: extend.ledvance.light_onoff_brightness(),
+ ota: ota.ledvance,
+
+ };
+
];
|
Add <I> (#<I>)
Added the new dimmable lamp product
|
Koenkk_zigbee-shepherd-converters
|
train
|
js
|
0d2f51bffd9c267451cc6cff1fc6a8a81af9a28c
|
diff --git a/jooby/src/main/java/org/jooby/Jooby.java b/jooby/src/main/java/org/jooby/Jooby.java
index <HASH>..<HASH> 100644
--- a/jooby/src/main/java/org/jooby/Jooby.java
+++ b/jooby/src/main/java/org/jooby/Jooby.java
@@ -1182,7 +1182,7 @@ public class Jooby implements Router, LifeCycle, Registry {
@Override
public <T> T require(final Key<T> type) {
- checkState(injector != null, "App didn't start yet");
+ checkState(injector != null, "Registry is not ready. Require calls are available at application startup time, see http://jooby.org/doc/#application-life-cycle");
return injector.getInstance(type);
}
|
Error "App didnot start yet" could be more helpful fix #<I>
|
jooby-project_jooby
|
train
|
java
|
339554aa21a2b689550b1dac4ad12d03fbaa322a
|
diff --git a/mod/quiz/module.js b/mod/quiz/module.js
index <HASH>..<HASH> 100644
--- a/mod/quiz/module.js
+++ b/mod/quiz/module.js
@@ -256,6 +256,10 @@ M.mod_quiz.secure_window = {
// Left click on a button or similar. No worries.
return;
}
+ if (e.button == 1 && e.target.test('[contenteditable=true]')) {
+ // Left click in Atto or similar.
+ return;
+ }
e.halt();
},
|
MDL-<I> Impossible to click on Atto in a Quiz in 'Secure' mode.
|
moodle_moodle
|
train
|
js
|
6b0e63225234e46e281395621ef5572baa34000c
|
diff --git a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/resource/ClasspathUriUtil.java b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/resource/ClasspathUriUtil.java
index <HASH>..<HASH> 100644
--- a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/resource/ClasspathUriUtil.java
+++ b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/resource/ClasspathUriUtil.java
@@ -22,6 +22,8 @@ public class ClasspathUriUtil {
public static final String CLASSPATH_SCHEME = "classpath";
public static boolean isClasspathUri(URI uri) {
+ if (uri == null)
+ return false;
String scheme = uri.scheme();
return CLASSPATH_SCHEME.equals(scheme);
}
|
[Xbase] introduced JvmModelCompleter to complete a JvmModel according to Java defaults.
|
eclipse_xtext-core
|
train
|
java
|
266b7bae59d58aba341bea94c4f578bed1d72d3e
|
diff --git a/lib/double_entry.rb b/lib/double_entry.rb
index <HASH>..<HASH> 100644
--- a/lib/double_entry.rb
+++ b/lib/double_entry.rb
@@ -96,7 +96,6 @@ module DoubleEntry
# to: savings_account,
# code: :save,
# )
- #
# @param amount [Money] The quantity of money to transfer from one account
# to the other.
# @option options :from [DoubleEntry::Account::Instance] Transfer money out
@@ -189,6 +188,11 @@ module DoubleEntry
# Identify the scopes with the given account identifier holding at least
# the provided minimum balance.
#
+ # @example Find users with at lease $1,000,000 in their savings accounts
+ # DoubleEntry.scopes_with_minimum_balance_for_account(
+ # Money.new(1_000_000_00),
+ # :savings
+ # ) # might return user ids: [ 1423, 12232, 34729 ]
# @param minimum_balance [Money] Minimum account balance a scope must have
# to be included in the result set.
# @param account_identifier [Symbol]
|
Example for DoubleEntry::scopes_with_minimum_balance_for_account
|
envato_double_entry
|
train
|
rb
|
e102ead8c272082b764487664b2213c8578ef6ca
|
diff --git a/centrosome/neighmovetrack.py b/centrosome/neighmovetrack.py
index <HASH>..<HASH> 100644
--- a/centrosome/neighmovetrack.py
+++ b/centrosome/neighmovetrack.py
@@ -379,7 +379,7 @@ class NeighbourMovementTracking(object):
costs_list = [costs[i, j] for (i, j) in pairs]
- assignment = lapjv.lapjv(zip(*pairs)[0], zip(*pairs)[1], costs_list)
+ assignment = lapjv.lapjv(list(zip(*pairs))[0], list(zip(*pairs))[1], costs_list)
indexes = enumerate(list(assignment[0]))
|
Explicitly decompoze zip into a list
|
CellProfiler_centrosome
|
train
|
py
|
7be196b73b71e04e887d193b9b501ecc3e7b62c5
|
diff --git a/full/src/main/java/apoc/monitor/Kernel.java b/full/src/main/java/apoc/monitor/Kernel.java
index <HASH>..<HASH> 100644
--- a/full/src/main/java/apoc/monitor/Kernel.java
+++ b/full/src/main/java/apoc/monitor/Kernel.java
@@ -4,7 +4,7 @@ import apoc.Extended;
import apoc.result.KernelInfoResult;
import org.neo4j.common.DependencyResolver;
-import org.neo4j.configuration.helpers.DatabaseReadOnlyChecker;
+import org.neo4j.dbms.database.readonly.DatabaseReadOnlyChecker;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.kernel.database.Database;
import org.neo4j.kernel.internal.GraphDatabaseAPI;
|
Fixed import package to account for pending refactor
|
neo4j-contrib_neo4j-apoc-procedures
|
train
|
java
|
0045efe00c62d8dcfe7d0c2807c277c68dd74432
|
diff --git a/lib/zk/logging.rb b/lib/zk/logging.rb
index <HASH>..<HASH> 100644
--- a/lib/zk/logging.rb
+++ b/lib/zk/logging.rb
@@ -21,7 +21,7 @@ module ZK
ch_root.add_appenders(serr)
end
- ch_root.level = ENV['ZK_DEBUG'] ? :debug : :error
+ ch_root.level = ENV['ZK_DEBUG'] ? :debug : :off
end
end
|
ok, i relent, no output by default
|
zk-ruby_zk
|
train
|
rb
|
f1f88e4443d0d25b0d904caaf8f01fa639d2b120
|
diff --git a/lib/manager/npm/post-update/index.js b/lib/manager/npm/post-update/index.js
index <HASH>..<HASH> 100644
--- a/lib/manager/npm/post-update/index.js
+++ b/lib/manager/npm/post-update/index.js
@@ -170,12 +170,7 @@ async function writeExistingFiles(config, packageFiles) {
if (packageFile.npmrc) {
logger.debug(`Writing .npmrc to ${basedir}`);
await fs.outputFile(upath.join(basedir, '.npmrc'), packageFile.npmrc);
- } else if (
- config.npmrc &&
- (packageFile.hasYarnLock ||
- packageFile.hasPackageLock ||
- config.lernaLockFile)
- ) {
+ } else if (config.npmrc) {
logger.debug('Writing repo .npmrc to package file dir');
await fs.outputFile(upath.join(basedir, '.npmrc'), config.npmrc);
}
|
fix: always write config.npmrc
|
renovatebot_renovate
|
train
|
js
|
b544f8777ee50512f49d1d32fad1a4028ebb99c7
|
diff --git a/modules/wyil/src/wyil/transforms/RuntimeAssertions.java b/modules/wyil/src/wyil/transforms/RuntimeAssertions.java
index <HASH>..<HASH> 100644
--- a/modules/wyil/src/wyil/transforms/RuntimeAssertions.java
+++ b/modules/wyil/src/wyil/transforms/RuntimeAssertions.java
@@ -362,7 +362,8 @@ public class RuntimeAssertions implements Transform<WyilFile> {
return null;
}
- protected Block findPrecondition(NameID name, Type.FunctionOrMethod fun,SyntacticElement elem) throws Exception {
+ protected Block findPrecondition(NameID name, Type.FunctionOrMethod fun,
+ SyntacticElement elem) throws Exception {
Path.Entry<WyilFile> e = builder.namespace().get(name.module(),WyilFile.ContentType);
if(e == null) {
syntaxError(
@@ -373,7 +374,8 @@ public class RuntimeAssertions implements Transform<WyilFile> {
WyilFile.MethodDeclaration method = m.method(name.name(),fun);
for(WyilFile.Case c : method.cases()) {
- // FIXME: this is a hack for now
+ // FIXME: this is a hack for now, since method cases don't do
+ // anything.
return c.precondition();
}
return null;
|
WYIL: minor tweak to documentation.
|
Whiley_WhileyCompiler
|
train
|
java
|
cf39d6ca911d628ae5e549b8be41801cbd40cb01
|
diff --git a/Classes/Core/Functional/FunctionalTestCase.php b/Classes/Core/Functional/FunctionalTestCase.php
index <HASH>..<HASH> 100644
--- a/Classes/Core/Functional/FunctionalTestCase.php
+++ b/Classes/Core/Functional/FunctionalTestCase.php
@@ -330,7 +330,7 @@ abstract class FunctionalTestCase extends BaseTestCase
$localConfiguration['DB']['Connections']['Default']['dbname'] = $dbName;
$localConfiguration['DB']['Connections']['Default']['wrapperClass'] = DatabaseConnectionWrapper::class;
$testbase->testDatabaseNameIsNotTooLong($originalDatabaseName, $localConfiguration);
- if ($dbDriver === 'mysqli') {
+ if ($dbDriver === 'mysqli' || $dbDriver === 'pdo_mysql') {
$localConfiguration['DB']['Connections']['Default']['charset'] = 'utf8mb4';
$localConfiguration['DB']['Connections']['Default']['tableoptions']['charset'] = 'utf8mb4';
$localConfiguration['DB']['Connections']['Default']['tableoptions']['collate'] = 'utf8mb4_unicode_ci';
|
[BUGFIX] Functional test driver sets utf8 with pdo_mysql
In addition to driver mysqli.
|
TYPO3_testing-framework
|
train
|
php
|
25f007911a259ccf30b71a5ffa8a6e5d13e09a96
|
diff --git a/src/wa_kat/connectors/aleph.py b/src/wa_kat/connectors/aleph.py
index <HASH>..<HASH> 100755
--- a/src/wa_kat/connectors/aleph.py
+++ b/src/wa_kat/connectors/aleph.py
@@ -174,6 +174,16 @@ class Author(namedtuple("Author", ["name",
"alt_name"])):
@classmethod
def parse_author(cls, marc):
+ """
+ Parse author from `marc` data.
+
+ Args:
+ marc (obj): :class:`.MARCXMLRecord` instance. See module
+ :mod:`.marcxml_parser` for details.
+
+ Returns:
+ obj: :class:`Author`.
+ """
name = None
code = None
linked_forms = None
@@ -215,6 +225,15 @@ class Author(namedtuple("Author", ["name",
@classmethod
def search_by_name(cls, name):
+ """
+ Look for author in NK Aleph authority base by `name`.
+
+ Args:
+ name (str): Author's name.
+
+ Yields:
+ obj: :class:`Author` instances.
+ """
records = aleph.downloadRecords(
aleph.searchInAleph("aut", name, False, "wau")
)
|
#<I>: Updated aleph connector docstring.
|
WebarchivCZ_WA-KAT
|
train
|
py
|
0d5af5baa2bb2dffd31baf2510453d4a7c410ac4
|
diff --git a/lib/class/compositionEnumns.js b/lib/class/compositionEnumns.js
index <HASH>..<HASH> 100644
--- a/lib/class/compositionEnumns.js
+++ b/lib/class/compositionEnumns.js
@@ -22,7 +22,5 @@ module.exports.PluginManager = {
return manager;
},
- filterKeys: function(key) {
- return key === 'destroyPlugins';
- }
+ filterKeys: ['destroyPlugins']
};
\ No newline at end of file
|
move plugin manger to seperate file
|
pllee_luc
|
train
|
js
|
58fc39ae95522ce152b4ff137071f74c5490e14e
|
diff --git a/chatterbot/constants.py b/chatterbot/constants.py
index <HASH>..<HASH> 100644
--- a/chatterbot/constants.py
+++ b/chatterbot/constants.py
@@ -4,10 +4,11 @@ ChatterBot constants
'''
The maximum length of characters that the text of a statement can contain.
-This should be enforced on a per-model basis by the data model for each
-storage adapter.
+The number 255 is used because that is the maximum length of a char field
+in most databases. This value should be enforced on a per-model basis by
+the data model for each storage adapter.
'''
-STATEMENT_TEXT_MAX_LENGTH = 400
+STATEMENT_TEXT_MAX_LENGTH = 255
'''
The maximum length of characters that the text label of a conversation can contain.
|
Change statement text max-length to <I>
|
gunthercox_ChatterBot
|
train
|
py
|
ca139ebb9129586933e3d541ef3b4e8e63aab844
|
diff --git a/parsl/monitoring/monitoring.py b/parsl/monitoring/monitoring.py
index <HASH>..<HASH> 100644
--- a/parsl/monitoring/monitoring.py
+++ b/parsl/monitoring/monitoring.py
@@ -246,6 +246,9 @@ class Hub(object):
hub_port=None,
hub_port_range=(55050, 56000),
+ database=None, # Zhuozhao, can you put in the right default here?
+ visualization_server=None, # Zhuozhao, can you put in the right default here?
+
client_address="127.0.0.1",
client_port=None,
@@ -292,6 +295,8 @@ class Hub(object):
self.hub_port = hub_port
self.hub_address = hub_address
+ self.database = database
+ self.visualization_server = visualization_server
self.loop_freq = 10.0 # milliseconds
|
Adding stubs for Db and Viz server
|
Parsl_parsl
|
train
|
py
|
ccfc0309fd16c960f0ac2f707441918c3aab379d
|
diff --git a/lib/jsdom/level2/html.js b/lib/jsdom/level2/html.js
index <HASH>..<HASH> 100644
--- a/lib/jsdom/level2/html.js
+++ b/lib/jsdom/level2/html.js
@@ -798,7 +798,7 @@ define('HTMLOptionElement', {
return closest(this, 'FORM');
},
get defaultSelected() {
- return !!this.getAttribute('selected');
+ return this.getAttribute('selected') !== null;
},
set defaultSelected(s) {
if (s) this.setAttribute('selected', 'selected');
|
Fix selected attribute
The element <option selected=""> is selected.
|
jsdom_jsdom
|
train
|
js
|
2a3582e92551f40c11b8ef50cf0ba3d2bf5cb503
|
diff --git a/modules/stores/URLStore.js b/modules/stores/URLStore.js
index <HASH>..<HASH> 100644
--- a/modules/stores/URLStore.js
+++ b/modules/stores/URLStore.js
@@ -67,6 +67,9 @@ var URLStore = {
* Pushes the given path onto the browser navigation stack.
*/
push: function (path) {
+ if (path === _currentPath)
+ return;
+
if (_location === 'history') {
window.history.pushState({ path: path }, '', path);
notifyChange();
|
[changed] make URLStore.push idempotent
If somebody’s component is observing some user
input its easy to start pushing the same url
into the store, this makes it so devs can kind
of treat `Router.transitionTo` like rendering,
nothing happens if nothing has changed.
Previously, you get a bunch of history entries
that don’t change UI as the user clicks the back
button.
closes #<I>
|
taion_rrtr
|
train
|
js
|
6f52109f1f4a8d2905c483ba310b2bfc274d9441
|
diff --git a/lib/messaging/message/copy.rb b/lib/messaging/message/copy.rb
index <HASH>..<HASH> 100644
--- a/lib/messaging/message/copy.rb
+++ b/lib/messaging/message/copy.rb
@@ -21,7 +21,7 @@ module Messaging
receiver = receiver.build
end
- if include.nil?
+ if copy.nil? && include.nil?
include = source.class.attribute_names
end
|
Default attribute names for copy are corrected
|
eventide-project_messaging
|
train
|
rb
|
4db27c3c127c93c1fb311a12a4ce0dba159c642d
|
diff --git a/concrete/bootstrap/process.php b/concrete/bootstrap/process.php
index <HASH>..<HASH> 100644
--- a/concrete/bootstrap/process.php
+++ b/concrete/bootstrap/process.php
@@ -66,7 +66,7 @@ if (isset($_REQUEST['ctask']) && $_REQUEST['ctask'] && $valt->validate()) {
case 'publish-now':
if ($cp->canApprovePageVersions()) {
$v = CollectionVersion::get($c, "SCHEDULED");
- $v->approve(false);
+ $v->approve(false, null);
header('Location: ' . \Core::getApplicationURL() . '/' . DISPATCHER_FILENAME .
'?cID=' . $c->getCollectionID());
|
Delete publish date when the user click "Publish Now" button
|
concrete5_concrete5
|
train
|
php
|
1c7dec9efcef221342bf3a9dfe767324ada04afb
|
diff --git a/drivers/python/rethinkdb/__init__.py b/drivers/python/rethinkdb/__init__.py
index <HASH>..<HASH> 100644
--- a/drivers/python/rethinkdb/__init__.py
+++ b/drivers/python/rethinkdb/__init__.py
@@ -1,17 +1,15 @@
# Copyright 2010-2014 RethinkDB, all rights reserved.
+# Define this before importing so nothing can overwrite 'object'
+class r(object):
+ pass
+
from .net import *
from .query import *
from .errors import *
from .ast import *
from . import docs
-
-# The __builtins__ here defends against re-importing something
-# obscuring `object`.
-class r(__builtins__['object']):
- pass
-
for module in (net, query, ast, errors):
for functionName in module.__all__:
setattr(r, functionName, staticmethod(getattr(module, functionName)))
|
fixing compatibility for pypy - modules cannot be used as a dict
|
rethinkdb_rethinkdb
|
train
|
py
|
de55fa9513fb6f8e8393e1232c830790846ba488
|
diff --git a/javacord-api/src/main/java/org/javacord/api/entity/user/User.java b/javacord-api/src/main/java/org/javacord/api/entity/user/User.java
index <HASH>..<HASH> 100644
--- a/javacord-api/src/main/java/org/javacord/api/entity/user/User.java
+++ b/javacord-api/src/main/java/org/javacord/api/entity/user/User.java
@@ -46,6 +46,7 @@ import org.javacord.api.listener.user.UserChangeStatusListener;
import org.javacord.api.listener.user.UserStartTypingListener;
import org.javacord.api.util.event.ListenerManager;
+import java.awt.Color;
import java.time.Instant;
import java.util.Collection;
import java.util.Collections;
@@ -418,6 +419,17 @@ public interface User extends DiscordEntity, Messageable, Mentionable, Updatable
}
/**
+ * Gets the displayed color of the user based on his roles in the given server.
+ *
+ * @param server The server.
+ * @return The color.
+ * @see Server#getRoleColor(User)
+ */
+ default Optional<Color> getRoleColor(Server server) {
+ return server.getRoleColor(this);
+ }
+
+ /**
* Gets if this user is the user of the connected account.
*
* @return Whether this user is the user of the connected account or not.
|
Added User#getRoleColor(Server)
|
Javacord_Javacord
|
train
|
java
|
fc36307ed4e9c32d8aa4e13f85ddb818947fc341
|
diff --git a/command/v7/disable_service_access_command.go b/command/v7/disable_service_access_command.go
index <HASH>..<HASH> 100644
--- a/command/v7/disable_service_access_command.go
+++ b/command/v7/disable_service_access_command.go
@@ -52,7 +52,5 @@ func (cmd DisableServiceAccessCommand) displayMessage() error {
User: user.Name,
}.displayMessage(cmd.UI)
- cmd.UI.DisplayNewline()
-
return nil
}
diff --git a/command/v7/enable_service_access_command.go b/command/v7/enable_service_access_command.go
index <HASH>..<HASH> 100644
--- a/command/v7/enable_service_access_command.go
+++ b/command/v7/enable_service_access_command.go
@@ -54,8 +54,6 @@ func (cmd EnableServiceAccessCommand) displayMessage() error {
User: user.Name,
}.displayMessage(cmd.UI)
- cmd.UI.DisplayNewline()
-
return nil
}
|
Remove extra newlines before OK in commands
[#<I>](<URL>)
|
cloudfoundry_cli
|
train
|
go,go
|
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.