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
c143f7d08e2aaeccf835a01254fae4b6b29e8c29
diff --git a/lib/spatial_features/has_spatial_features.rb b/lib/spatial_features/has_spatial_features.rb index <HASH>..<HASH> 100644 --- a/lib/spatial_features/has_spatial_features.rb +++ b/lib/spatial_features/has_spatial_features.rb @@ -113,8 +113,6 @@ module SpatialFeatures def cached_spatial_join(other) other_class = Utils.class_of(other) - raise "Cannot use cached spatial join for the same class" if self == other_class - other_column = other_class.name < self.name ? :model_a : :model_b self_column = other_column == :model_a ? :model_b : :model_a
Allow spatial caching on own class We used to raise an exception when intersecting on the same class. There doesn’t see to be any technical limitation that necessitated this, but rather it was implemented as a sanity check because we didn’t initially intend it to be used in this way.
culturecode_spatial_features
train
rb
411ae230ade5c09cff05c2d2a571e9727d3cbd54
diff --git a/pstats_print2list/pstats_print2list.py b/pstats_print2list/pstats_print2list.py index <HASH>..<HASH> 100755 --- a/pstats_print2list/pstats_print2list.py +++ b/pstats_print2list/pstats_print2list.py @@ -95,7 +95,7 @@ def get_pstats_print2list(fnames, filter_fnames=None, exclude_fnames=None, stream.seek(0) field_list = get_field_list() line_stats_re = re.compile( - r'(?P<%s>\d+/?\d+)\s+(?P<%s>\d+\.?\d+)\s+(?P<%s>\d+\.?\d+)\s+' + r'(?P<%s>\d+/?\d+|\d+)\s+(?P<%s>\d+\.?\d+)\s+(?P<%s>\d+\.?\d+)\s+' r'(?P<%s>\d+\.?\d+)\s+(?P<%s>\d+\.?\d+)\s+(?P<%s>.*):(?P<%s>\d+)' r'\((?P<%s>.*)\)' % tuple(field_list)) stats_list = []
[FIX] pstats_print2list: Fix regex to support ncalls without '/'
Vauxoo_pstats-print2list
train
py
4b0a3b2d84cf3847dc9cef5263bbb6740e58cb7d
diff --git a/peewee.py b/peewee.py index <HASH>..<HASH> 100644 --- a/peewee.py +++ b/peewee.py @@ -1686,7 +1686,7 @@ class MySQLDatabase(Database): 'primary_key': 'INTEGER AUTO_INCREMENT', 'text': 'LONGTEXT', } - for_update_support = True + for_update = True interpolation = '%s' op_overrides = {OP_LIKE: 'LIKE BINARY', OP_ILIKE: 'LIKE'} quote_char = '`'
Fix for_update support for MySQL
coleifer_peewee
train
py
c8526170d580eea5b401ceb114ac3562ac3d96b7
diff --git a/src/org/dita/dost/reader/MergeMapParser.java b/src/org/dita/dost/reader/MergeMapParser.java index <HASH>..<HASH> 100644 --- a/src/org/dita/dost/reader/MergeMapParser.java +++ b/src/org/dita/dost/reader/MergeMapParser.java @@ -122,6 +122,7 @@ public class MergeMapParser extends AbstractXMLReader { int attsLen = atts.getLength(); mapInfo.append(Constants.LESS_THAN).append(qName); + classValue = atts.getValue(Constants.ATTRIBUTE_NAME_CLASS); for (int i = 0; i < attsLen; i++) { String attQName = atts.getQName(i);
fix bug # <I> Image referenced in map is not found, topicmerge breaks
dita-ot_dita-ot
train
java
e5654394a36ef5253c6cd858df1824f4a0032d36
diff --git a/fluent_contents/models/fields.py b/fluent_contents/models/fields.py index <HASH>..<HASH> 100644 --- a/fluent_contents/models/fields.py +++ b/fluent_contents/models/fields.py @@ -178,6 +178,12 @@ class PlaceholderField(PlaceholderRelation): slot=self.slot ) + # Remove attribute must exist for the delete page. Currently it's not actively used. + # The regular ForeignKey assigns a ForeignRelatedObjectsDescriptor to it for example. + # In this case, the PlaceholderRelation is already the reverse relation. + # Being able to move forward from the Placeholder to the derived models does not have that much value. + setattr(self.rel.to, self.rel.related_name, None) + def value_from_object(self, obj): """
Fix <I> error at delete page with PlaceholderField in use. The forward-relation of the reverse-relation needs to exist, however it is not that important right now. Leave it as None for the moment.
django-fluent_django-fluent-contents
train
py
2ababfa53c2c030d94d1a92d6a8646f5ee07b631
diff --git a/contactform/controllers/ContactFormController.php b/contactform/controllers/ContactFormController.php index <HASH>..<HASH> 100644 --- a/contactform/controllers/ContactFormController.php +++ b/contactform/controllers/ContactFormController.php @@ -30,7 +30,11 @@ class ContactFormController extends BaseController $message->fromEmail = craft()->request->getPost('fromEmail'); $message->fromName = craft()->request->getPost('fromName'); $message->subject = craft()->request->getPost('subject'); - $message->attachment = \CUploadedFile::getInstanceByName('attachment'); + + if ($settings->allowAttachments) + { + $message->attachment = \CUploadedFile::getInstanceByName('attachment'); + } // Set the message body $postedMessage = craft()->request->getPost('message');
Fix a bug where the "allowAttachments" setting wasn't being enforced.
craftcms_contact-form
train
php
72af507f4ab2ed852c5974fc1df595e3799a6017
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ CLASS_VERSION = '2.5.0' MAJOR = 0 MINOR = 1 MICRO = 15 -ISRELEASED = False +ISRELEASED = True VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) DISTNAME = 'classylss'
remove dev from <I>
nickhand_classylss
train
py
83dc2654644c5a6d6679cc74ab515f5f9ef07c9c
diff --git a/lib/config.js b/lib/config.js index <HASH>..<HASH> 100644 --- a/lib/config.js +++ b/lib/config.js @@ -384,7 +384,7 @@ exports.extend = function extend(newConf) { }; var isLocalUIUrl = function(url) { var host = getHostname(url); - return isWebUIHost() || !!config.pluginHostMap[host]; + return isWebUIHost(host) || !!config.pluginHostMap[host]; }; config.isLocalUIUrl = isLocalUIUrl;
feat: Support custom the hostname of plugin by cli
avwo_whistle
train
js
a3ee9d21dd90f91e2b857e4606f599f5d8d4b7b4
diff --git a/main.py b/main.py index <HASH>..<HASH> 100644 --- a/main.py +++ b/main.py @@ -10,9 +10,9 @@ def main(filename=""): return renderer.render(markdown) if __name__ == "__main__": - try: + if len(sys.argv) > 1: print(main(sys.argv[1])) - except IndexError: + else: try: print(main()) except KeyboardInterrupt:
🐛 removed try-except as control structure
miyuchina_mistletoe
train
py
4a5fc6590e2150d86550de181c3281d09d4e1412
diff --git a/src/auth/log-out.js b/src/auth/log-out.js index <HASH>..<HASH> 100644 --- a/src/auth/log-out.js +++ b/src/auth/log-out.js @@ -13,7 +13,7 @@ export default function logOut () { log.debug('API: Log out successful.') return getSession() }, function onError (error) { - log.debug('Log out error.', error) - return Promise.reject(error.message) + log.error('Log out error.', error) + return Promise.reject(error.message ? error.message : error) }) } \ No newline at end of file
Makes logout method always return stringifiable error
archilogic-com_3dio-js
train
js
d8aafe7e19daf24f7cea75ac3535c935aefb4ef3
diff --git a/detox/android/detox/src/main/java/com/wix/detox/instruments/reflected/InstrumentsReflected.java b/detox/android/detox/src/main/java/com/wix/detox/instruments/reflected/InstrumentsReflected.java index <HASH>..<HASH> 100644 --- a/detox/android/detox/src/main/java/com/wix/detox/instruments/reflected/InstrumentsReflected.java +++ b/detox/android/detox/src/main/java/com/wix/detox/instruments/reflected/InstrumentsReflected.java @@ -1,7 +1,6 @@ package com.wix.detox.instruments.reflected; import android.content.Context; -import android.util.Log; import com.wix.detox.instruments.DetoxInstrumentsException; import com.wix.detox.instruments.Instruments; @@ -34,8 +33,6 @@ public class InstrumentsReflected implements Instruments { methodGetInstanceOfProfiler = profilerClass.getDeclaredMethod("getInstance", Context.class); methodStartRecording = profilerClass.getDeclaredMethod("startProfiling", Context.class, configurationClass); } catch (Exception e) { - Log.i("DetoxInstrumentsManager", "InstrumentsRecording not found", e); - constructorDtxProfilingConfiguration = null; methodGetInstanceOfProfiler = null; methodStartRecording = null;
Removed unnecessary logs while trying to check instruments for android
wix_Detox
train
java
5c9ed1200719f20e8e8edb2901b943c63102fd97
diff --git a/cronofy.php b/cronofy.php index <HASH>..<HASH> 100644 --- a/cronofy.php +++ b/cronofy.php @@ -339,6 +339,7 @@ class Cronofy String location.long : The String describing the event's longitude. OPTIONAL Array reminders : An array of arrays detailing a length of time and a quantity. OPTIONAL for example: array(array("minutes" => 30), array("minutes" => 1440)) + String transparency : The transparency of the event. Accepted values are "transparent" and "opaque". OPTIONAL returns true on success, associative array of errors on failure */ @@ -359,6 +360,9 @@ class Cronofy if(!empty($params['reminders'])) { $postfields['reminders'] = $params['reminders']; } + if(!empty($params['transparency'])) { + $postfields['transparency'] = $params['transparency']; + } return $this->http_post("/" . self::API_VERSION . "/calendars/" . $params['calendar_id'] . "/events", $postfields); }
Add transparency to upsert_event
cronofy_cronofy-php
train
php
97ce3fb5f60c2de4d2d76e7201b01212b64361c2
diff --git a/pandas/core/generic.py b/pandas/core/generic.py index <HASH>..<HASH> 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -10587,8 +10587,10 @@ class NDFrame(PandasObject, SelectionMixin, indexing.IndexingMixin): # [assignment] cls.all = all # type: ignore[assignment] + # error: Argument 1 to "doc" has incompatible type "Optional[str]"; expected + # "Union[str, Callable[..., Any]]" @doc( - NDFrame.mad, + NDFrame.mad.__doc__, # type: ignore[arg-type] desc="Return the mean absolute deviation of the values " "over the requested axis.", name1=name1,
BUG: Placeholders not being filled on docstrings (#<I>)
pandas-dev_pandas
train
py
c8277e1b02b91731d11c750181b38d7128d18b7b
diff --git a/etcdmain/config_test.go b/etcdmain/config_test.go index <HASH>..<HASH> 100644 --- a/etcdmain/config_test.go +++ b/etcdmain/config_test.go @@ -460,8 +460,19 @@ func TestConfigFileElectionTimeout(t *testing.T) { }, { ElectionMs: 60000, + TickMs: 10000, errStr: "is too long, and should be set less than", }, + { + ElectionMs: 100, + TickMs: 0, + errStr: "--heartbeat-interval must be >0 (set to 0ms)", + }, + { + ElectionMs: 0, + TickMs: 100, + errStr: "--election-timeout must be >0 (set to 0ms)", + }, } for i, tt := range tests {
etcdmain: test wrong heartbeat-interval, election-timeout in TestConfigFileElectionTimeout
etcd-io_etcd
train
go
2c0e2df02d3c970606e384b3fdccec42e06fd1f9
diff --git a/src/Search/Services/SearchableService.php b/src/Search/Services/SearchableService.php index <HASH>..<HASH> 100644 --- a/src/Search/Services/SearchableService.php +++ b/src/Search/Services/SearchableService.php @@ -151,12 +151,12 @@ class SearchableService // Anonymous member canView() for indexing if (!$this->classSkipsCanViewCheck($objClass)) { $value = Member::actAs(null, function () use ($obj) { - return $obj->canView(); + return (bool) $obj->canView(); }); } } else { // Current member canView() check for retrieving search results - $value = $obj->canView(); + $value = (bool) $obj->canView(); } } $this->extend('updateIsSearchable', $obj, $indexing, $value);
FIX Don't assume DataObject::canView always returns bool (#<I>) Because there is no return value typehinting in DataObject::canView, the value returned from that method can be of any type. We must cast to boolean before returning the value to avoid possible errors with non-boolean return types.
silverstripe_silverstripe-fulltextsearch
train
php
507df51bdab093f9c39bd3a8295aefa76da903be
diff --git a/src/BoomCMS/Database/Models/Chunk/Linkset.php b/src/BoomCMS/Database/Models/Chunk/Linkset.php index <HASH>..<HASH> 100644 --- a/src/BoomCMS/Database/Models/Chunk/Linkset.php +++ b/src/BoomCMS/Database/Models/Chunk/Linkset.php @@ -6,7 +6,7 @@ class Linkset extends BaseChunk { protected $table = 'chunk_linksets'; - public static function create(array $attributes) + public static function create(array $attributes = []) { if (isset($attributes['links'])) { $links = $attributes['links']; diff --git a/src/BoomCMS/Database/Models/Chunk/Slideshow.php b/src/BoomCMS/Database/Models/Chunk/Slideshow.php index <HASH>..<HASH> 100644 --- a/src/BoomCMS/Database/Models/Chunk/Slideshow.php +++ b/src/BoomCMS/Database/Models/Chunk/Slideshow.php @@ -6,7 +6,7 @@ class Slideshow extends BaseChunk { protected $table = 'chunk_slideshows'; - public static function create(array $attributes) + public static function create(array $attributes = []) { if (isset($attributes['slides'])) { $slides = $attributes['slides'];
Fixed declaration of model create methods not compatible with Illuminate\Database\Eloquent\Model
boomcms_boom-core
train
php,php
9f28f7bed8d734bffda5ad72dfd0550a24876ead
diff --git a/test/integration/test-property-types.js b/test/integration/test-property-types.js index <HASH>..<HASH> 100644 --- a/test/integration/test-property-types.js +++ b/test/integration/test-property-types.js @@ -6,11 +6,16 @@ assert.equal(Property.check(String).type, "text"); assert.equal(Property.check(Number).type, "number"); assert.equal(Property.check(Boolean).type, "boolean"); assert.equal(Property.check(Date).type, "date"); +assert.equal(Property.check(Object).type, "object"); +assert.equal(Property.check([ 'a', 'b' ]).type, "enum"); +assert.deepEqual(Property.check([ 'a', 'b' ]).values, [ 'a', 'b' ]); assert.equal({ type: "text" }.type, "text"); assert.equal({ type: "number" }.type, "number"); assert.equal({ type: "boolean" }.type, "boolean"); assert.equal({ type: "date" }.type, "date"); +assert.equal({ type: "enum" }.type, "enum"); +assert.equal({ type: "object" }.type, "object"); assert.throws(function () { Property.check({ type: "unknown" });
Updates tests for property types to include enum and object
dresende_node-orm2
train
js
e7e179d93c7c5a991adb9486fd713271f9202086
diff --git a/lints/lint_dnsname_bad_character_in_label.go b/lints/lint_dnsname_bad_character_in_label.go index <HASH>..<HASH> 100644 --- a/lints/lint_dnsname_bad_character_in_label.go +++ b/lints/lint_dnsname_bad_character_in_label.go @@ -12,7 +12,7 @@ type DNSNameProperCharacters struct { } func (l *DNSNameProperCharacters) Initialize() error { - const dnsNameRegexp = `^(\*\.)?(\?\.)*(A-Za-z0-9*_-]+\.)*[A-Za-z0-9*_-]*$` + const dnsNameRegexp = `^(\*\.)?(\?\.)*([A-Za-z0-9*_-]+\.)*[A-Za-z0-9*_-]*$` var err error l.CompiledExpression, err = regexp.Compile(dnsNameRegexp)
Add missing [ to dnsNameRegexp. (#<I>)
zmap_zlint
train
go
4c89ed2e27fb1ae69cffb3ef66956b17abac8782
diff --git a/lib/node_modules/@stdlib/regexp/native-function/lib/index.js b/lib/node_modules/@stdlib/regexp/native-function/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/node_modules/@stdlib/regexp/native-function/lib/index.js +++ b/lib/node_modules/@stdlib/regexp/native-function/lib/index.js @@ -60,8 +60,3 @@ setReadOnly( reNativeFunction, 'REGEXP', REGEXP ); // EXPORTS // module.exports = reNativeFunction; - - -// EXPORTS // - -module.exports = reNativeFunction;
Delete duplicated module.exports
stdlib-js_stdlib
train
js
3cf7ea55d3acbce0968dca8208d6c0911fff90fb
diff --git a/application/tests/Bootstrap.php b/application/tests/Bootstrap.php index <HASH>..<HASH> 100644 --- a/application/tests/Bootstrap.php +++ b/application/tests/Bootstrap.php @@ -324,6 +324,9 @@ switch (ENVIRONMENT) /* require __DIR__ . '/_ci_phpunit_test/patcher/bootstrap.php'; MonkeyPatchManager::init([ + // If you want debug log, set `debug` true, and optionally you can set the log file path + 'debug' => true, + 'log_file' => '/tmp/monkey-patch-debug.log', // PHP Parser: PREFER_PHP7, PREFER_PHP5, ONLY_PHP7, ONLY_PHP5 'php_parser' => 'PREFER_PHP5', 'cache_dir' => TESTPATH . '_ci_phpunit_test/tmp/cache',
docs: how to enable debug mode and set the log file path, as comment
kenjis_ci-phpunit-test
train
php
084897378ec187db62b1f6f3ea8570dde93547f2
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 @@ /** * Pon task for file system * @module pon-task-fs - * @version 2.1.0 + * @version 2.1.1 */ 'use strict'
[ci skip] Travis CI committed after build
realglobe-Inc_pon-task-fs
train
js
e66eddb15d8a3d8eb74bdc09b3d339130bc05ab3
diff --git a/js/lib/mediawiki.Util.js b/js/lib/mediawiki.Util.js index <HASH>..<HASH> 100644 --- a/js/lib/mediawiki.Util.js +++ b/js/lib/mediawiki.Util.js @@ -187,7 +187,7 @@ var HTML5 = require( 'html5' ).HTML5, Object.freeze(o); // First freeze the object. for (var propKey in o) { var prop = o[propKey]; - if (!o.hasOwnProperty(propKey) || !(typeof prop === "object") || Object.isFrozen(prop)) { + if (!o.hasOwnProperty(propKey) || !(prop instanceof Object) || Object.isFrozen(prop)) { // If the object is on the prototype, not an object, or is already frozen, // skip it. Note that this might leave an unfrozen reference somewhere in the // object if there is an already frozen object containing an unfrozen object.
Fix a deepFreeze crash This fixes a crasher from a client log where isFrozen was called on a non-object. 'foo instanceof Object' seems to be the better test for freeze, and is used to test the top-level object anyway. Change-Id: Ice<I>c<I>d<I>df<I>edc5a7f1ec4df<I>e<I>e<I>c
wikimedia_parsoid
train
js
0a9e9f6c0e1001e66e606c9f2fded08c8829ccad
diff --git a/src/Uri.php b/src/Uri.php index <HASH>..<HASH> 100644 --- a/src/Uri.php +++ b/src/Uri.php @@ -669,7 +669,7 @@ class Uri implements UriInterface return preg_replace_callback( '/(?:[^' . self::CHAR_UNRESERVED . ':@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/', - [$this, 'encodeUrl'], + [$this, 'urlEncodeChar'], $path ); } @@ -749,17 +749,18 @@ class Uri implements UriInterface { return preg_replace_callback( '/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/', - [$this, 'encodeUrl'], + [$this, 'urlEncodeChar'], $value ); } /** - * Function to urlencode the value returned by a regexp. + * URL encode a character returned by a regex. + * * @param array $matches * @return string */ - private function encodeUrl(array $matches) + private function urlEncodeChar(array $matches) { return rawurlencode($matches[0]); }
Renamed `encodeUrl` to `urlEncodeChar` - to better describe what it's actually doing (it's not encoding a full URL)
phly_http
train
php
090a397e3f9273c610ba4f2cf497f96c9eca4c64
diff --git a/oplus/version.py b/oplus/version.py index <HASH>..<HASH> 100644 --- a/oplus/version.py +++ b/oplus/version.py @@ -1 +1 @@ -version='6.0.2.dev2' +version='6.0.2.dev3'
[skip ci] updated version as <I>.dev3
openergy_oplus
train
py
02c564c1df4fbda3480ac4aee5ae8ba59563cbd8
diff --git a/pharen.php b/pharen.php index <HASH>..<HASH> 100755 --- a/pharen.php +++ b/pharen.php @@ -281,7 +281,7 @@ class Scope{ public function get_lexing($var_name){ $value = $this->bindings[$var_name]->compile(); - return 'Lexical::$scopes['.$this->id.']["'.$var_name.'"] = '.$value.';'; + return 'Lexical::$scopes['.$this->id.']["'.$var_name.'"] = '.$var_name.';'; } public function get_lexical_bindings($indent){
Fixed bug where lexings were referring to the value used for the binding, not the variable itself.
Scriptor_pharen
train
php
583ba1f6d7b4ecd9a79598dcfede8cf6ac48f811
diff --git a/src/main/java/moe/tristan/easyfxml/spring/SpringContext.java b/src/main/java/moe/tristan/easyfxml/spring/SpringContext.java index <HASH>..<HASH> 100644 --- a/src/main/java/moe/tristan/easyfxml/spring/SpringContext.java +++ b/src/main/java/moe/tristan/easyfxml/spring/SpringContext.java @@ -31,7 +31,7 @@ public class SpringContext { /** * The {@link FxmlLoader} object is a /SINGLE-USE/ object to load * a FXML file and deserialize it as an instance of {@link Node}. - * It extends {@link FXMLLoader} adding {@link FxmlLoader#onSuccess(Object)} + * It extends {@link FXMLLoader} adding {@link FxmlLoader#onSuccess(Node)} * and {@link FxmlLoader#onFailure(Throwable)} as utility methods to * do various things. * <p>
Slight signature change to apply to referring JavaDoc
Tristan971_EasyFXML
train
java
db20620281ea229b6222d04ab22bcd5d9d8585cb
diff --git a/hazelcast/src/main/java/com/hazelcast/client/impl/ClientHeartbeatMonitor.java b/hazelcast/src/main/java/com/hazelcast/client/impl/ClientHeartbeatMonitor.java index <HASH>..<HASH> 100644 --- a/hazelcast/src/main/java/com/hazelcast/client/impl/ClientHeartbeatMonitor.java +++ b/hazelcast/src/main/java/com/hazelcast/client/impl/ClientHeartbeatMonitor.java @@ -18,6 +18,7 @@ package com.hazelcast.client.impl; import com.hazelcast.client.ClientEndpoint; import com.hazelcast.client.ClientEngine; +import com.hazelcast.core.ClientType; import com.hazelcast.instance.GroupProperties; import com.hazelcast.logging.ILogger; import com.hazelcast.logging.Logger; @@ -77,7 +78,7 @@ public class ClientHeartbeatMonitor implements Runnable { } private void monitor(String memberUuid, ClientEndpointImpl clientEndpoint) { - if (clientEndpoint.isFirstConnection()) { + if (clientEndpoint.isFirstConnection() && ClientType.CPP.equals(clientEndpoint.getClientType())) { return; }
Include owner connection to heart beat check When client is inactive, server needs to close the connection so that resources(e.g locks) associated with that connection can be released. When there are 2 connection from client to server, we did not want to check owner connection since there were no heartbeat send over it. After removing separate owner connection from the system this check caused a bug. With one connection to each node, all connections needs to be checked and closed. Leaving the check for C++ client until, it's architecture is updated as other clients. Fixes #<I>
hazelcast_hazelcast
train
java
a745076dc32fb10ff3471b016e8fa463a5c14dd7
diff --git a/lib/gemsmith/cli.rb b/lib/gemsmith/cli.rb index <HASH>..<HASH> 100644 --- a/lib/gemsmith/cli.rb +++ b/lib/gemsmith/cli.rb @@ -111,7 +111,7 @@ module Gemsmith desc "-v, [version]", "Show version." map "-v" => :version def version - print_version + say "Gemsmith " + VERSION end desc "-h, [help]", "Show this message." @@ -132,10 +132,5 @@ module Gemsmith end end end - - # Print version information. - def print_version - say "Gemsmith " + VERSION - end end end
Removed the print_version method.
bkuhlmann_gemsmith
train
rb
bbe331d6ac6976aae997ce712fb431186cec4f9f
diff --git a/lib/webpacker/compiler.rb b/lib/webpacker/compiler.rb index <HASH>..<HASH> 100644 --- a/lib/webpacker/compiler.rb +++ b/lib/webpacker/compiler.rb @@ -87,7 +87,7 @@ class Webpacker::Compiler end def compilation_digest_path - config.cache_path.join(".last-compilation-digest-#{Webpacker.env}") + config.cache_path.join("last-compilation-digest-#{Webpacker.env}") end def webpack_env diff --git a/test/compiler_test.rb b/test/compiler_test.rb index <HASH>..<HASH> 100644 --- a/test/compiler_test.rb +++ b/test/compiler_test.rb @@ -59,6 +59,6 @@ class CompilerTest < Minitest::Test end def test_compilation_digest_path - assert Webpacker.compiler.send(:compilation_digest_path).to_s.ends_with?(Webpacker.env) + assert_equal Webpacker.compiler.send(:compilation_digest_path).basename.to_s, "last-compilation-digest-#{Webpacker.env}" end end
Make compilation digest file visible (#<I>)
rails_webpacker
train
rb,rb
4adaa875b72c61fa6df4156dd18fa8e5f957f034
diff --git a/lib/paper_trail/version.rb b/lib/paper_trail/version.rb index <HASH>..<HASH> 100644 --- a/lib/paper_trail/version.rb +++ b/lib/paper_trail/version.rb @@ -116,7 +116,8 @@ class Version < ActiveRecord::Base end def index - sibling_versions.select(:id).order("id ASC").map(&:id).index(self.id) + id_column = self.class.primary_key + sibling_versions.select(id_column.to_sym).order("#{id_column} ASC").map(&id_column.to_sym).index(self.send(id_column)) end private
Refactor index method on version to call the model's primary key instead of assuming it is "id."
paper-trail-gem_paper_trail
train
rb
b866b33dee5bad568f1533f45b3f36ecca9c05be
diff --git a/superset/jinja_context.py b/superset/jinja_context.py index <HASH>..<HASH> 100644 --- a/superset/jinja_context.py +++ b/superset/jinja_context.py @@ -43,7 +43,7 @@ def url_param(param, default=None): def current_user_id(): """The id of the user who is currently logged in""" - if g.user: + if hasattr(g, 'user') and g.user: return g.user.id
[bugfix] Template rendering failed: '_AppCtxGlobals' object has no attribute 'user' (#<I>) Somehow the nature of `g` in Flask has changed where `g.user` used to be provided outside the web request scope and its not anymore. The fix here should address that.
apache_incubator-superset
train
py
b21762f91cbd18d81637843aecba454ff8b5dea3
diff --git a/okhttp-tests/src/test/java/okhttp3/internal/tls/ClientAuthTest.java b/okhttp-tests/src/test/java/okhttp3/internal/tls/ClientAuthTest.java index <HASH>..<HASH> 100644 --- a/okhttp-tests/src/test/java/okhttp3/internal/tls/ClientAuthTest.java +++ b/okhttp-tests/src/test/java/okhttp3/internal/tls/ClientAuthTest.java @@ -172,6 +172,10 @@ public final class ClientAuthTest { } @Test public void missingClientAuthFailsForNeeds() throws Exception { + // TODO https://github.com/square/okhttp/issues/4598 + // StreamReset stream was reset: PROT... + assumeFalse(getJvmSpecVersion().equals("11")); + OkHttpClient client = buildClient(null, clientIntermediateCa.certificate()); SSLSocketFactory socketFactory = buildServerSslSocketFactory(); @@ -218,7 +222,7 @@ public final class ClientAuthTest { } @Test public void invalidClientAuthFails() throws Throwable { - // TODO github issue link + // TODO https://github.com/square/okhttp/issues/4598 // StreamReset stream was reset: PROT... assumeFalse(getJvmSpecVersion().equals("11"));
Fix master build for JDK <I>
square_okhttp
train
java
1a32d9a7e1a89ef1d9d944e6ac23f5bf5d81b3ee
diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py index <HASH>..<HASH> 100644 --- a/salt/modules/yumpkg.py +++ b/salt/modules/yumpkg.py @@ -5,6 +5,8 @@ Support for YUM - rpm Python module - rpmUtils Python module ''' +import re + try: import yum import rpm
Add missing re import to yumpkg
saltstack_salt
train
py
c41652878c969db1423a5dd2803c8a4f7d46ea78
diff --git a/PHPStan/PropertyReflectionExtension.php b/PHPStan/PropertyReflectionExtension.php index <HASH>..<HASH> 100644 --- a/PHPStan/PropertyReflectionExtension.php +++ b/PHPStan/PropertyReflectionExtension.php @@ -20,8 +20,6 @@ use SignpostMarv\DaftObject\TypeParanoia; */ class PropertyReflectionExtension extends Base { - const BOOL_CLASS_NOT_DAFTOBJECT = false; - public function __construct(ClassReflection $classReflection, Broker $broker, string $property) { if ( ! TypeParanoia::IsThingStrings($classReflection->getName(), DaftObject::class)) {
removing unreferenced const
SignpostMarv_daft-object
train
php
3ae90859f317c898fcf5b836c3fc1311ad5a5a8e
diff --git a/provider/joyent/provider.go b/provider/joyent/provider.go index <HASH>..<HASH> 100644 --- a/provider/joyent/provider.go +++ b/provider/joyent/provider.go @@ -30,7 +30,7 @@ var _ simplestreams.HasRegion = (*joyentEnviron)(nil) // RestrictedConfigAttributes is specified in the EnvironProvider interface. func (joyentProvider) RestrictedConfigAttributes() []string { - return nil + return []string{sdcUrl} } // PrepareForCreateEnvironment is specified in the EnvironProvider interface.
lp<I>: Use controller region for hosted models Hosted models in joyent were not using the same region as the controller. sdc-url should not be overwritten / set to default for hosted models.
juju_juju
train
go
ecfb5eb9b66769dc335d71b230eb6036a6308973
diff --git a/lib/seahorse/client/handler_list.rb b/lib/seahorse/client/handler_list.rb index <HASH>..<HASH> 100644 --- a/lib/seahorse/client/handler_list.rb +++ b/lib/seahorse/client/handler_list.rb @@ -13,7 +13,6 @@ module Seahorse class Client - # @api private class HandlerList include Enumerable
HandlerList is now publically documented.
aws_aws-sdk-ruby
train
rb
1356ebbef0c709001d0e95049d3a0ad7a29e0a49
diff --git a/tests/Unit/Suites/Product/ProductDetailViewSnippetRendererTest.php b/tests/Unit/Suites/Product/ProductDetailViewSnippetRendererTest.php index <HASH>..<HASH> 100644 --- a/tests/Unit/Suites/Product/ProductDetailViewSnippetRendererTest.php +++ b/tests/Unit/Suites/Product/ProductDetailViewSnippetRendererTest.php @@ -144,9 +144,9 @@ class ProductDetailViewSnippetRendererTest extends \PHPUnit_Framework_TestCase $this->assertContainsSnippetWithGivenKey($testTitleSnippetKey, ...$result); $this->assertContainsSnippetWithGivenKey($testMetaDescriptionSnippetKey, ...$result); - $metaSnippet = array_reduce($result, function ($carry, Snippet $item) { - return $item->getKey() === $carry ? $item : $carry; - }, $testMetaSnippetKey); + $metaSnippet = array_reduce($result, function ($carry, Snippet $item) use ($testMetaSnippetKey) { + return $item->getKey() === $testMetaSnippetKey ? $item : $carry; + }); $this->assertContainerContainsSnippet( $metaSnippet,
Issue #<I>: Don't abuse carry and initial value for snippet key
lizards-and-pumpkins_catalog
train
php
6662293b1b4041ec279eb236beb33f42b708982d
diff --git a/container/docker/engine.py b/container/docker/engine.py index <HASH>..<HASH> 100644 --- a/container/docker/engine.py +++ b/container/docker/engine.py @@ -557,7 +557,7 @@ class Engine(BaseEngine, DockerSecretsMixin): repo = image tag = 'latest' if ':' in image: - repo, tag = image.split(':') + repo, tag = image.rsplit(':',1) logger.debug("Pulling image {}:{}".format(repo, tag)) try: image_id = self.client.images.pull(repo, tag=tag)
Update split in docker pull (#<I>)
ansible_ansible-container
train
py
9a8057074bacbd1983c379b30a447808f52ee3af
diff --git a/pyrogram/client/methods/users/set_profile_photo.py b/pyrogram/client/methods/users/set_profile_photo.py index <HASH>..<HASH> 100644 --- a/pyrogram/client/methods/users/set_profile_photo.py +++ b/pyrogram/client/methods/users/set_profile_photo.py @@ -18,22 +18,26 @@ from pyrogram.api import functions from ...ext import BaseClient +from typing import Union, BinaryIO class SetProfilePhoto(BaseClient): def set_profile_photo( self, - photo: str + photo: Union[str, BinaryIO] ) -> bool: """Set a new profile photo. + If you want to set a profile video instead, use :meth:`~Client.set_profile_video` + This method only works for Users. Bots profile photos must be set using BotFather. Parameters: photo (``str``): Profile photo to set. - Pass a file path as string to upload a new photo that exists on your local machine. + Pass a file path as string to upload a new photo that exists on your local machine or + pass a binary file-like object with its attribute ".name" set for in-memory uploads. Returns: ``bool``: True on success.
Allow uploading profile photos using file-like objects
pyrogram_pyrogram
train
py
e257b346375b695e438490c7def42ad704ec7092
diff --git a/src/jquery.webui-popover.js b/src/jquery.webui-popover.js index <HASH>..<HASH> 100644 --- a/src/jquery.webui-popover.js +++ b/src/jquery.webui-popover.js @@ -421,6 +421,8 @@ if (that.options.async.success) { that.options.async.success(that, data); } + }, + complete: function() { that.xhr = null; } });
resetting xhr on complete callback
sandywalker_webui-popover
train
js
fd6641703b942fb8b014ecc2486a8203c851a508
diff --git a/axiom/batch.py b/axiom/batch.py index <HASH>..<HASH> 100644 --- a/axiom/batch.py +++ b/axiom/batch.py @@ -22,9 +22,7 @@ except ImportError: manhole_ssh = None from twisted.conch import interfaces as iconch -from epsilon import extime, process, cooperator, modal - -from vertex import juice +from epsilon import extime, process, cooperator, modal, juice from axiom import iaxiom, errors as eaxiom, item, attributes
Re-merge vertex=>epsilon juice move. Fixes #<I> (again) Author: glyph Reviewer: mithrandi Hope that it doesn't break anything significant this time...
twisted_axiom
train
py
a0f608146e204b6c87488ad9a9ea987a30d90037
diff --git a/src/Vector.php b/src/Vector.php index <HASH>..<HASH> 100644 --- a/src/Vector.php +++ b/src/Vector.php @@ -68,7 +68,7 @@ class Vector * Check whether the given vector is the same as this vector. * * @api - * @param self $b The vector to check for equality. + * @param \Nubs\Vectorix\Vector $b The vector to check for equality. * @return bool True if the vectors are equal and false otherwise. */ public function isEqual(self $b) @@ -103,7 +103,7 @@ class Vector * The vectors must be of the same dimension and have the same keys in their components. * * @internal - * @param self $b The vector to check against. + * @param \Nubs\Vectorix\Vector $b The vector to check against. * @return void * @throws Exception if the vectors are not of the same dimension. * @throws Exception if the vectors' components down have the same keys.
Use fully qualified class name to make php analyzer happy.
nubs_vectorix
train
php
901a7241973d85f9734d66bc56946e1e417087ec
diff --git a/integrationtests/integrationtests_suite_test.go b/integrationtests/integrationtests_suite_test.go index <HASH>..<HASH> 100644 --- a/integrationtests/integrationtests_suite_test.go +++ b/integrationtests/integrationtests_suite_test.go @@ -5,7 +5,6 @@ import ( "crypto/md5" "encoding/hex" "fmt" - "go/build" "io" "io/ioutil" "mime/multipart" @@ -14,6 +13,7 @@ import ( "os" "os/exec" "path" + "path/filepath" "runtime" "strconv" @@ -73,11 +73,11 @@ var _ = BeforeEach(func() { err = os.MkdirAll(uploadDir, os.ModeDir|0777) Expect(err).ToNot(HaveOccurred()) - clientPath = fmt.Sprintf( - "%s/src/github.com/lucas-clemente/quic-clients/client-%s-debug", - build.Default.GOPATH, - runtime.GOOS, - ) + _, thisfile, _, ok := runtime.Caller(0) + if !ok { + Fail("Failed to get current path") + } + clientPath = filepath.Join(thisfile, fmt.Sprintf("../../../quic-clients/client-%s-debug", runtime.GOOS)) }) var _ = AfterEach(func() {
determine the path to the quic_clients at runtime in integration tests
lucas-clemente_quic-go
train
go
b6ede26635c9d2e211cfb5f8ec907b100481e83f
diff --git a/memorious/operations/aleph.py b/memorious/operations/aleph.py index <HASH>..<HASH> 100644 --- a/memorious/operations/aleph.py +++ b/memorious/operations/aleph.py @@ -78,4 +78,4 @@ def get_collection_id(context, session): def make_url(path): - return urljoin(settings.ALEPH_HOST, '/api/1/%s' % path) + return urljoin(settings.ALEPH_HOST, '/api/%s/%s' % (settings.ALEPH_API_VERSION, path)) diff --git a/memorious/settings.py b/memorious/settings.py index <HASH>..<HASH> 100644 --- a/memorious/settings.py +++ b/memorious/settings.py @@ -85,3 +85,4 @@ ARCHIVE_BUCKET = env('ARCHIVE_BUCKET') ALEPH_HOST = env('ALEPH_HOST') ALEPH_API_KEY = env('ALEPH_API_KEY') +ALEPH_API_VERSION = env('ALEPH_API_VERSION', '1')
Env for aleph api version
alephdata_memorious
train
py,py
cbe621247e83e4218a5909a7248a6f45ef8671c1
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -161,14 +161,14 @@ export class Driver { if (this.config.missing === false) { if (options.missing === true) { - return fn(err, results, misses); + return fn(errors, results, misses); } - return fn(err, results); + return fn(errors, results); } if (options.missing === false) { - return fn(err, results); + return fn(errors, results); } return fn(errors, results, misses);
fix to properly return the errors i get multi case
bojand_couchbase-driver
train
js
6e9bb05b3b0fca7a42a12ca84a9813edd152e055
diff --git a/tests/index.js b/tests/index.js index <HASH>..<HASH> 100644 --- a/tests/index.js +++ b/tests/index.js @@ -35,6 +35,6 @@ if( hasQuietFlag() ) { await Promise.all( (await readdir(testdir)) .filter(name => name.endsWith(TEST_SUFFIX)) - .map(testscript => harness.spawn(NODE_BINARY, [...execArgv, resolve(testdir, testscript)])) + .map(testfile => harness.spawn(NODE_BINARY, [...execArgv, resolve(testdir, testfile)])) ); })();
tests: arguably, `testfile` fits better with `testdir` than `testscript`
apparebit_js-junction
train
js
e9dfccc61632aafeb7ee79de29df397e2430b409
diff --git a/runtime/default.go b/runtime/default.go index <HASH>..<HASH> 100644 --- a/runtime/default.go +++ b/runtime/default.go @@ -85,6 +85,7 @@ func newService(s *Service, c CreateOptions) *service { Env: c.Env, Args: args, }, + closed: make(chan bool), output: c.Output, } }
Fix panic caused when ctrl+c a non started service
micro_go-micro
train
go
a225bac31321efdc3211409945f75bfc4b499faa
diff --git a/src/python/dxpy/cli/exec_io.py b/src/python/dxpy/cli/exec_io.py index <HASH>..<HASH> 100644 --- a/src/python/dxpy/cli/exec_io.py +++ b/src/python/dxpy/cli/exec_io.py @@ -402,7 +402,7 @@ def get_input_single(param_desc): + BOLD() + param_desc['name'] + ENDC() + ' is not in the list of choices for that input')) return value except EOFError: - raise Exception('') + raise DXCLIError('Unexpected end of input') def get_optional_input_str(param_desc): return param_desc.get('label', param_desc['name']) + ' (' + param_desc['name'] + ')'
dx run: Avoid stack trace on ^D
dnanexus_dx-toolkit
train
py
506ea1e5ba1755c0c4a8c14ca02559837caa3548
diff --git a/nurbs/__init__.py b/nurbs/__init__.py index <HASH>..<HASH> 100644 --- a/nurbs/__init__.py +++ b/nurbs/__init__.py @@ -24,4 +24,4 @@ Of course you can :-) Please feel free to contact me about the NURBS-Python pack """ -__version__ = "2.3" +__version__ = "2.3.1"
Version bumped to <I>
orbingol_NURBS-Python
train
py
6772bf3896b672165ad4c237e893b8a6170d4f1d
diff --git a/lib/AktiveMerchant/Billing/Gateways/HsbcSecureEpayments.php b/lib/AktiveMerchant/Billing/Gateways/HsbcSecureEpayments.php index <HASH>..<HASH> 100644 --- a/lib/AktiveMerchant/Billing/Gateways/HsbcSecureEpayments.php +++ b/lib/AktiveMerchant/Billing/Gateways/HsbcSecureEpayments.php @@ -260,8 +260,7 @@ XML; private function add_address($options) { - $country = Country::find($options['country']) - ->code('numeric'); + $country = Country::find($options['country'])->getCode('numeric'); $this->xml .= <<<XML <Address>
hsbc secure epayments country method call fix
akDeveloper_Aktive-Merchant
train
php
7857b048b7c9f2ef84c5a939f7ebed0cf2af11b9
diff --git a/src/Krystal/Db/Tests/QueryBuilderTest.php b/src/Krystal/Db/Tests/QueryBuilderTest.php index <HASH>..<HASH> 100644 --- a/src/Krystal/Db/Tests/QueryBuilderTest.php +++ b/src/Krystal/Db/Tests/QueryBuilderTest.php @@ -146,6 +146,14 @@ class QueryBuilderTest extends \PHPUnit_Framework_TestCase $this->verify('SELECT * FROM `table` WHERE `count` < 1 '); } + public function testCanSaveSelectedTableName() + { + $this->qb->select('*') + ->from('users'); + + $this->assertEquals('users', $this->qb->getSelectedTable()); + } + public function testCanGenerateDropTable() { $this->qb->dropTable('users', false);
Added test case for selected table name
krystal-framework_krystal.framework
train
php
71fae7b27f3299b01b155fde9fa20d83b14eb4ef
diff --git a/lib/actions.js b/lib/actions.js index <HASH>..<HASH> 100644 --- a/lib/actions.js +++ b/lib/actions.js @@ -501,6 +501,20 @@ exports.injectJs = function(file) { }; /* + * Includes javascript script from a url on the page. + * @param {string} url - The url to a javascript file to include o the page. + */ +exports.includeJs = function(url) { + var self = this; + return this.ready.then(function() { + return new HorsemanPromise(function(resolve, reject) { + debug('.includeJs() ' + url); + self.page.includeJs(url, resolve); + }); + }); +}; + +/* * Select a value in an html select element. * @param {string} selector - The identifier for the select element. * @param {string} value - The value to select.
Add includeJs action Fixes #<I>
johntitus_node-horseman
train
js
6ffc1d5bcabd1d797feaf96f4ff3ee33ae0fbbaf
diff --git a/actor-apps/core/src/main/java/im/actor/core/modules/internal/messages/OwnReadActor.java b/actor-apps/core/src/main/java/im/actor/core/modules/internal/messages/OwnReadActor.java index <HASH>..<HASH> 100644 --- a/actor-apps/core/src/main/java/im/actor/core/modules/internal/messages/OwnReadActor.java +++ b/actor-apps/core/src/main/java/im/actor/core/modules/internal/messages/OwnReadActor.java @@ -84,6 +84,9 @@ public class OwnReadActor extends ModuleActor { // Saving read state context().getMessagesModule().saveReadState(peer, sortingDate); + + // Clearing notifications + context().getNotificationsModule().onOwnRead(peer, sortingDate); } // Messages
fix(core): Fixing notifications
actorapp_actor-platform
train
java
92b23673e60569b74ac48304579866c839008e1a
diff --git a/src/data.js b/src/data.js index <HASH>..<HASH> 100644 --- a/src/data.js +++ b/src/data.js @@ -29,10 +29,10 @@ Data.prototype = { // If not, create one if ( !unlock ) { unlock = Data.uid++; - descriptor[ this.expando ] = { value: unlock }; // Secure it in a non-enumerable, non-writable property try { + descriptor[ this.expando ] = { value: unlock }; Object.defineProperties( owner, descriptor ); // Support: Android<4
No ticket: Move property descriptor assignment to save a byte. Close gh-<I>.
jquery_jquery
train
js
d60b2631f5a7af65c78da3350553a538cbadb368
diff --git a/lib/builderator/control/version/git.rb b/lib/builderator/control/version/git.rb index <HASH>..<HASH> 100644 --- a/lib/builderator/control/version/git.rb +++ b/lib/builderator/control/version/git.rb @@ -16,6 +16,8 @@ module Builderator ## Is there a .git repo in the project root? def self.supported? + return true if ENV['GIT_DIR'] && File.exist?(ENV['GIT_DIR']) + Util.relative_path('.git').exist? end
Support setting GIT_DIR for git scm provider
rapid7_builderator
train
rb
8db01976b417578badbbe0104d9b91909f6d130c
diff --git a/Kwf/Controller/Action/User/BackendLoginController.php b/Kwf/Controller/Action/User/BackendLoginController.php index <HASH>..<HASH> 100644 --- a/Kwf/Controller/Action/User/BackendLoginController.php +++ b/Kwf/Controller/Action/User/BackendLoginController.php @@ -115,6 +115,11 @@ class Kwf_Controller_Action_User_BackendLoginController extends Kwf_Controller_A } $url = $authMethods[$authMethod]->getLoginRedirectUrl($this->_getRedirectBackUrl(), $state, $formValues); + if (!$url) { + $html = $authMethods[$authMethod]->getLoginRedirectHtml($this->_getRedirectBackUrl(), $state, $formValues); + echo $html; + exit; + } $this->redirect($url); }
Implement fallback for auth-method with missing login-redirect-url
koala-framework_koala-framework
train
php
2f3258e93eba5a8227f1e64fefde6e563d68e823
diff --git a/boot/boot.go b/boot/boot.go index <HASH>..<HASH> 100644 --- a/boot/boot.go +++ b/boot/boot.go @@ -55,19 +55,19 @@ func All() error { } help("Setup complete!\n\nNext steps: \n - apex infra plan - show an execution plan for Terraform configs\n - apex infra apply - apply Terraform configs\n - apex deploy - deploy example function") - } else { - fmt.Println() - help(`Enter IAM role used by Lambda functions.`) - iamRole := prompt.StringRequired(" IAM role: ") + return nil + } - fmt.Println() - if err := initProject(name, description, iamRole); err != nil { - return err - } + fmt.Println() + help(`Enter IAM role used by Lambda functions.`) + iamRole := prompt.StringRequired(" IAM role: ") - help("Setup complete!\n\nNext step: \n - apex deploy - deploy example function") + fmt.Println() + if err := initProject(name, description, iamRole); err != nil { + return err } + help("Setup complete!\n\nNext step: \n - apex deploy - deploy example function") return nil }
remove else branch to de-nest
apex_apex
train
go
0eafabe15d16f54217d3a5f514c245c236f1a303
diff --git a/src/trumbowyg.js b/src/trumbowyg.js index <HASH>..<HASH> 100644 --- a/src/trumbowyg.js +++ b/src/trumbowyg.js @@ -1021,8 +1021,8 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { $('body', d).on('mousedown.' + t.eventNamespace, function (e) { if (!$dropdown.is(e.target)) { - $('.' + prefix + 'dropdown', d).hide(); - $('.' + prefix + 'active', d).removeClass(prefix + 'active'); + $('.' + prefix + 'dropdown', t.$box).hide(); + $('.' + prefix + 'active', t.$btnPane).removeClass(prefix + 'active'); $('body', d).off('mousedown.' + t.eventNamespace); } });
allow Trumbowyg working with shadow dom
Alex-D_Trumbowyg
train
js
e9c9952fb7f8afe5aa37d0ed7d9c78879b2b09a7
diff --git a/blockstack_cli_0.14.1/blockstack_client/proxy.py b/blockstack_cli_0.14.1/blockstack_client/proxy.py index <HASH>..<HASH> 100644 --- a/blockstack_cli_0.14.1/blockstack_client/proxy.py +++ b/blockstack_cli_0.14.1/blockstack_client/proxy.py @@ -686,12 +686,12 @@ def ping(proxy=None): schema = { 'type': 'object', 'properties': { - 'alive': { - 'type': 'boolean' + 'status': { + 'type': 'string' }, }, 'required': [ - 'alive' + 'status' ] } @@ -706,6 +706,8 @@ def ping(proxy=None): if json_is_error(resp): return resp + assert resp['status'] == 'alive' + except ValidationError as e: log.exception(e) resp = json_traceback(resp.get('error'))
update `ping()` response schema to match <I> server response
blockstack_blockstack-core
train
py
b2eeff0f7b31478b83994d3376c3ef1bdbb76e24
diff --git a/lib/sequent/core/transactions/no_transactions.rb b/lib/sequent/core/transactions/no_transactions.rb index <HASH>..<HASH> 100644 --- a/lib/sequent/core/transactions/no_transactions.rb +++ b/lib/sequent/core/transactions/no_transactions.rb @@ -1,7 +1,11 @@ module Sequent module Core module Transactions - + # + # NoTransactions is used when replaying the +ViewSchema+ for + # view schema upgrades. Transactions are not needed there since the + # view state will always be recreated anyway. + # class NoTransactions def transactional yield
Add comment to clarify intent of NoTransactions
zilverline_sequent
train
rb
94d6c61b66e7499396a6c5d6bccb4ab5846cb1a6
diff --git a/asyncio_xmpp/callbacks.py b/asyncio_xmpp/callbacks.py index <HASH>..<HASH> 100644 --- a/asyncio_xmpp/callbacks.py +++ b/asyncio_xmpp/callbacks.py @@ -33,6 +33,9 @@ class CallbacksWithToken: def remove_callback(self, token): self._callbacks[token.key].pop(token) + def remove_callback_fn(self, key, fn): + self._callbacks[key].remove(fn) + def emit(self, key, *args): for fn in self._callbacks[key].values(): self._loop.call_soon(fn, *args)
Allow to remove callbacks without token if they match exactly
horazont_aioxmpp
train
py
4f27123e3318dc3f4870cd8b1984b492af772ce2
diff --git a/ontrack-web/src/app/service/service.buildfilter.js b/ontrack-web/src/app/service/service.buildfilter.js index <HASH>..<HASH> 100644 --- a/ontrack-web/src/app/service/service.buildfilter.js +++ b/ontrack-web/src/app/service/service.buildfilter.js @@ -113,6 +113,10 @@ angular.module('ot.service.buildfilter', [ if (buildFilterResource._update && buildFilterResource.name == currentFilter.name) { self.saveFilter(config.branch, currentFilter); } + // Sharing if saved under the same name + if (buildFilterResource.shared && config.branch._buildFilterShare && buildFilterResource.name == currentFilter.name) { + self.shareFilter(config.branch, currentFilter); + } }); } else { otNotificationService.error("The type of this filter appears not to be supported: " + type + ". " +
#<I> Editing shared filters
nemerosa_ontrack
train
js
d51ee3111e4b7b53d03537530857b2f9ef64be93
diff --git a/builtin/providers/openstack/resource_openstack_compute_secgroup_v2.go b/builtin/providers/openstack/resource_openstack_compute_secgroup_v2.go index <HASH>..<HASH> 100644 --- a/builtin/providers/openstack/resource_openstack_compute_secgroup_v2.go +++ b/builtin/providers/openstack/resource_openstack_compute_secgroup_v2.go @@ -92,12 +92,9 @@ func resourceComputeSecGroupV2Update(d *schema.ResourceData, meta interface{}) e return fmt.Errorf("Error creating OpenStack compute client: %s", err) } - var updateOpts secgroups.UpdateOpts - if d.HasChange("name") { - updateOpts.Name = d.Get("name").(string) - } - if d.HasChange("description") { - updateOpts.Description = d.Get("description").(string) + updateOpts := secgroups.UpdateOpts{ + Name: d.Get("name").(string), + Description: d.Get("description").(string), } log.Printf("[DEBUG] Updating Security Group (%s) with options: %+v", d.Id(), updateOpts)
always need both name and description when updating
hashicorp_terraform
train
go
02d526c0b7dc68558c3dc104dbd63b610d8c7e08
diff --git a/aiortc/rtcrtpreceiver.py b/aiortc/rtcrtpreceiver.py index <HASH>..<HASH> 100644 --- a/aiortc/rtcrtpreceiver.py +++ b/aiortc/rtcrtpreceiver.py @@ -69,7 +69,11 @@ class RTCRtpReceiver: # skip RTCP for now if is_rtcp(data): - for packet in RtcpPacket.parse(data): + try: + packets = RtcpPacket.parse(data) + except ValueError: + continue + for packet in packets: logger.debug('receiver(%s) < %s' % (self._kind, packet)) # handle RTP diff --git a/tests/test_rtcrtpreceiver.py b/tests/test_rtcrtpreceiver.py index <HASH>..<HASH> 100644 --- a/tests/test_rtcrtpreceiver.py +++ b/tests/test_rtcrtpreceiver.py @@ -44,6 +44,9 @@ class RTCRtpReceiverTest(TestCase): # receive RTCP run(remote.send(load('rtcp_sr.bin'))) + # receive truncated RTCP + run(remote.send(b'\x81\xca\x00')) + # receive garbage run(remote.send(b'garbage'))
[rtp] don't bomb when receiving malformed RTCP
aiortc_aiortc
train
py,py
1474bb412d4accc3597065f207cecc3edf20178b
diff --git a/couchbase/tests/cases/append_t.py b/couchbase/tests/cases/append_t.py index <HASH>..<HASH> 100644 --- a/couchbase/tests/cases/append_t.py +++ b/couchbase/tests/cases/append_t.py @@ -19,7 +19,7 @@ from couchbase import FMT_JSON, FMT_PICKLE, FMT_BYTES, FMT_UTF8 from couchbase.exceptions import (KeyExistsError, ValueFormatError, ArgumentError, NotFoundError, - NotStoredError) + NotStoredError, CouchbaseError) from couchbase.tests.base import ConnectionTestCase @@ -58,8 +58,12 @@ class ConnectionAppendTest(ConnectionTestCase): def test_append_enoent(self): key = self.gen_key("append_enoent") self.cb.delete(key, quiet=True) - self.assertRaises(NotStoredError, - self.cb.append, key, "value") + try: + self.cb.append(key, "value") + self.assertTrue(false, "Exception not thrown") + except CouchbaseError as e: + self.assertTrue(isinstance(e, NotStoredError) + or isinstance(e, NotFoundError)) def test_append_multi(self): kv = self.gen_kv_dict(amount=4, prefix="append_multi")
append_t: Newer server build returns ENOENT rather than NOT_STORED The latest builds of the server return this error code (which is actually more correct anyway). Change-Id: I<I>e<I>b<I>b<I>bf<I>dab<I>bf<I>c Reviewed-on: <URL>
couchbase_couchbase-python-client
train
py
01407520719e9784c884f5aacfa0fa5db2908f7b
diff --git a/lib/webspicy/version.rb b/lib/webspicy/version.rb index <HASH>..<HASH> 100644 --- a/lib/webspicy/version.rb +++ b/lib/webspicy/version.rb @@ -2,7 +2,7 @@ module Webspicy module Version MAJOR = 0 MINOR = 20 - TINY = 15 + TINY = 16 end VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}" end
Bump to <I> and release.
enspirit_webspicy
train
rb
a225633050e0501a187c9ccb9a8b167327f31e5c
diff --git a/lib/reporters/dot_reporter.js b/lib/reporters/dot_reporter.js index <HASH>..<HASH> 100644 --- a/lib/reporters/dot_reporter.js +++ b/lib/reporters/dot_reporter.js @@ -84,7 +84,7 @@ DotReporter.prototype = { printf(this.out, '\n%s', indent(error.stack, 5)); } - this.out.write('\n'); + this.out.write('\n\n'); }, this); }, summaryDisplay: function() {
separate each test failure report by an empty line
testem_testem
train
js
3ed03bcd5a5b4f92aa295299dc69d9dc7f110281
diff --git a/cliTool/argumentParser.js b/cliTool/argumentParser.js index <HASH>..<HASH> 100644 --- a/cliTool/argumentParser.js +++ b/cliTool/argumentParser.js @@ -63,7 +63,9 @@ function getFormat(formatString) { else if(format == 'chicago' || format == 'c') { return require('../core/model/formats/chicago'); } - + else if(format == 'bibtexmisc' || format == 'bm') { + return require('../core/model/formats/bibtexmisc'); + } throw new Error(formatString + ' is an unsuported citation format. Try "apa" or "chicago"'); }
added bibtexmisc formatting style to the parser
mozillascience_software-citation-tools
train
js
31cf0a1563f4b4119750dd6b7f125fc543e96923
diff --git a/packages/bonde-admin/src/mobilizations/paths.js b/packages/bonde-admin/src/mobilizations/paths.js index <HASH>..<HASH> 100644 --- a/packages/bonde-admin/src/mobilizations/paths.js +++ b/packages/bonde-admin/src/mobilizations/paths.js @@ -1,5 +1,5 @@ export const mobilizations = () => '/mobilizations' -export const mobilization = (mobilization, domain = process.env.REACT_APP_DOMAIN_ADMIN) => { +export const mobilization = (mobilization, domain = process.env.REACT_APP_DOMAIN_PUBLIC) => { if (domain && domain.indexOf('staging') !== -1) { return `http://${mobilization.slug}.${domain}` }
fix(admin): change env redirect to mobilization on public version
nossas_bonde-client
train
js
b96d1d4657eb621c2a13699a951fb22d997d1e86
diff --git a/examples/WhenTest.php b/examples/WhenTest.php index <HASH>..<HASH> 100644 --- a/examples/WhenTest.php +++ b/examples/WhenTest.php @@ -1,10 +1,5 @@ <?php -/** - * Some of these would make good unit tests, but importing them - * doesn't solve the problem as the more important ones are the failures - * We need to look into end-to-end testing - */ class WhenTest extends \PHPUnit_Framework_TestCase { use Eris\TestTrait;
Removing comment about end2end testing, which has been addresses by test/Eris/ExampleEnd2EndTest.php
giorgiosironi_eris
train
php
68c31c8f6c7f62204e9d91f9d05574bfc438a867
diff --git a/dolo/tests/test_customdr.py b/dolo/tests/test_customdr.py index <HASH>..<HASH> 100644 --- a/dolo/tests/test_customdr.py +++ b/dolo/tests/test_customdr.py @@ -1,6 +1,6 @@ def test_custom_dr(): - from dolo import yaml_import + from dolo import yaml_import, simulate, time_iteration import numpy as np from dolo.numeric.decision_rule import CustomDR
FIX: missing imports in tests.
EconForge_dolo
train
py
5854be258739cdca941994b209957df4553279b5
diff --git a/lib/editor/tinymce/plugins/moodlenolink/tinymce/editor_plugin.js b/lib/editor/tinymce/plugins/moodlenolink/tinymce/editor_plugin.js index <HASH>..<HASH> 100644 --- a/lib/editor/tinymce/plugins/moodlenolink/tinymce/editor_plugin.js +++ b/lib/editor/tinymce/plugins/moodlenolink/tinymce/editor_plugin.js @@ -43,6 +43,10 @@ ed.onNodeChange.add(function(ed, cm, n) { var p, c; c = cm.get('moodlenolink'); + if (!c) { + // Button not used. + return; + } p = ed.dom.getParent(n, 'SPAN'); c.setActive(p && ed.dom.hasClass(p, 'nolink'));
MDL-<I> fix JS error when moodlenolink button not present in toolbar Thanks Rossiani Wijaya for discovering this issue!
moodle_moodle
train
js
c7421ae143c45b3e75c2bd6dcc86eba0d39bcf59
diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/OAuth2Utils.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/OAuth2Utils.java index <HASH>..<HASH> 100644 --- a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/OAuth2Utils.java +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/OAuth2Utils.java @@ -19,6 +19,7 @@ import com.google.api.client.http.HttpHeaders; import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpResponse; import com.google.api.client.http.HttpTransport; +import com.google.api.client.util.Beta; import java.io.IOException; import java.net.SocketTimeoutException; @@ -30,6 +31,7 @@ import java.util.logging.Logger; /** * Utilities used by the com.google.api.client.googleapis.auth.oauth2 namespace. */ +@Beta public class OAuth2Utils { static final Charset UTF_8 = Charset.forName("UTF-8");
Mark OAuth2Utils as Beta It isn't really meant to be used generally, but needs to be exposed for the different components to reuse code.
googleapis_google-api-java-client
train
java
eeffea997e9c340bac30174ad15d0c6e00950687
diff --git a/visidata/settings.py b/visidata/settings.py index <HASH>..<HASH> 100644 --- a/visidata/settings.py +++ b/visidata/settings.py @@ -308,8 +308,8 @@ def loadConfigAndPlugins(vd, args): options.visidata_dir = args.visidata_dir or os.getenv('VD_DIR', '') or options.visidata_dir options.config = args.config or os.getenv('VD_CONFIG', '') or options.config - sys.path.append(visidata.Path(options.visidata_dir)) - sys.path.append(visidata.Path(options.visidata_dir)/"plugin-deps") + sys.path.append(str(visidata.Path(options.visidata_dir))) + sys.path.append(str(visidata.Path(options.visidata_dir)/"plugin-deps")) # import plugins from .visidata/plugins before .visidatarc, so plugin options can be overridden for modname in (args.imports or options.imports or '').split():
[plugins-] sys.path needs str #<I>
saulpw_visidata
train
py
a24de4baf50ad3b7d77e765b3bde24231dd46b32
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -9,19 +9,16 @@ var normalizeArgs = require('./normalize-args'); module.exports = function (opts) { opts = normalizeArgs(arguments); - var cliPath; - var location; + var cliPath = resolveSync(opts.path, process.cwd()); + var location = 'local'; - try { - cliPath = resolveSync(opts.path, process.cwd()); - location = 'local'; - } catch (e) { - try { - cliPath = resolveSync(opts.relative, dirname(caller())); - location = 'global'; - } catch (e) { - throw new Error('fallback-cli could not find global', e); - } + if (!cliPath) { + cliPath = resolveSync(opts.relative, dirname(caller())); + location = 'global'; + } + + if (!cliPath) { + throw new Error('fallback-cli could not find local or global'); } runAsync(opts.before, doRequire, location, cliPath); @@ -36,5 +33,9 @@ module.exports = function (opts) { }; function resolveSync(path, basedir) { - return resolve.sync(path, {basedir: basedir}); + try { + return resolve.sync(path, {basedir: basedir}); + } catch (e) { + return null; + } }
return null from `resolveSync` instead of throwing an error
jamestalmage_fallback-cli
train
js
f3cf96cc38baa24a41bf60b59f4adec556397645
diff --git a/src/primitives/a-tube.js b/src/primitives/a-tube.js index <HASH>..<HASH> 100644 --- a/src/primitives/a-tube.js +++ b/src/primitives/a-tube.js @@ -15,7 +15,7 @@ module.exports.Primitive = AFRAME.registerPrimitive('a-tube', { path: 'tube.path', segments: 'tube.segments', radius: 'tube.radius', - radialSegments: 'tube.radialSegments', + 'radial-segments': 'tube.radialSegments', closed: 'tube.closed' } }); @@ -56,6 +56,13 @@ module.exports.Component = AFRAME.registerComponent('tube', { this.el.setObject3D('mesh', this.mesh); }, + update: function (prevData) { + if (!Object.keys(prevData).length) return; + + this.remove(); + this.init(); + }, + remove: function () { if (this.mesh) this.el.removeObject3D('mesh'); }
[a-tube] Fix primitive and update issues. (fixes #<I>, #<I>)
donmccurdy_aframe-extras
train
js
1c882c8c9c255178ce93b1b21684547a1d9b5acb
diff --git a/swim/heal_via_discover_provider.go b/swim/heal_via_discover_provider.go index <HASH>..<HASH> 100644 --- a/swim/heal_via_discover_provider.go +++ b/swim/heal_via_discover_provider.go @@ -131,7 +131,6 @@ func (h *discoverProviderHealer) Heal() ([]string, error) { } h.previousHostListSize = len(hostList) - util.ShuffleStringsInPlace(hostList) // collect the targets this node might want to heal with var targets []string @@ -141,6 +140,7 @@ func (h *discoverProviderHealer) Heal() ([]string, error) { targets = append(targets, address) } } + util.ShuffleStringsInPlace(targets) // filter hosts that we already know about and attempt to heal nodes that // are complementary to the membership of this node.
Don’t change the hostlist in place to prevent race conditions when a discovery provider returns the reference to a static hostlist. (#<I>)
uber_ringpop-go
train
go
9e6a0558af8994d9e0fbe99d0d3c0bf9475cb81b
diff --git a/lib/fog/aws/requests/rds/describe_db_instances.rb b/lib/fog/aws/requests/rds/describe_db_instances.rb index <HASH>..<HASH> 100644 --- a/lib/fog/aws/requests/rds/describe_db_instances.rb +++ b/lib/fog/aws/requests/rds/describe_db_instances.rb @@ -58,7 +58,7 @@ module Fog end when "rebooting" # I don't know how to show rebooting just once before it changes to available # it applies pending modified values - if server["PendingModifiedValues"] + unless server["PendingModifiedValues"].empty? server.merge!(server["PendingModifiedValues"]) server["PendingModifiedValues"] = {} self.data[:tmp] ||= Time.now + Fog::Mock.delay * 2 @@ -69,13 +69,13 @@ module Fog end when "modifying" # TODO there are some fields that only applied after rebooting - if server["PendingModifiedValues"] + unless server["PendingModifiedValues"].empty? server.merge!(server["PendingModifiedValues"]) server["PendingModifiedValues"] = {} server["DBInstanceStatus"] = 'available' end when "available" # I'm not sure if amazon does this - if server["PendingModifiedValues"] + unless server["PendingModifiedValues"].empty? server["DBInstanceStatus"] = 'modifying' end
fix for RDS mocking to avoid state flipping between "modifying" and "available"
fog_fog
train
rb
4e4cc616577625925a4d30429df4e7af8eb8008b
diff --git a/everest/entities/aggregates.py b/everest/entities/aggregates.py index <HASH>..<HASH> 100644 --- a/everest/entities/aggregates.py +++ b/everest/entities/aggregates.py @@ -168,18 +168,14 @@ class OrmAggregate(Aggregate): return ent def iterator(self): - if not self._relationship is None: - # We need a flush here because we may have newly added entities - # in the aggregate which need to get an ID *before* we build the - # relation filter spec. - self._session.flush() if self.__defaults_empty: raise StopIteration() else: - # We need a flush here because we may have newly added entities - # in the aggregate which need to get an ID *before* we build the - # query expression. - self._session.flush() + if len(self._session.new) > 0: + # We need a flush here because we may have newly added + # entities in the aggregate which need to get an ID *before* + # we build the query expression. + self._session.flush() query = self._get_data_query() for obj in iter(query): yield obj
Optimized OrmAggregate.iterator.
helixyte_everest
train
py
f58088def544fb08af927568b4b42e321628a1f9
diff --git a/app/lib/actions/katello/repository/import_upload.rb b/app/lib/actions/katello/repository/import_upload.rb index <HASH>..<HASH> 100644 --- a/app/lib/actions/katello/repository/import_upload.rb +++ b/app/lib/actions/katello/repository/import_upload.rb @@ -13,6 +13,10 @@ module Actions plan_action(FinishUpload, repository, import_upload.output) end + def rescue_strategy + Dynflow::Action::Rescue::Skip + end + def humanized_name _("Upload into") end
Fixes #<I> - Handle bad upload errors (#<I>)
Katello_katello
train
rb
16a34ea626c60c2643c108cf69bdc2c4fbfce506
diff --git a/src/mako/session/Session.php b/src/mako/session/Session.php index <HASH>..<HASH> 100644 --- a/src/mako/session/Session.php +++ b/src/mako/session/Session.php @@ -198,7 +198,7 @@ class Session protected function generateId() { - return md5(UUID::v4()); + return sha1(UUID::v4() . uniqid('session', true)); } /**
Added more randomness to session IDs
mako-framework_framework
train
php
c21df32ef7167e6c94a16648f3688c1d9c27c08b
diff --git a/test/host/node_loader.js b/test/host/node_loader.js index <HASH>..<HASH> 100644 --- a/test/host/node_loader.js +++ b/test/host/node_loader.js @@ -42,12 +42,15 @@ global.gpfSourcesPath = "../../src/"; } - if ("release" === global.version) { + if (options.release) { + console.log("Using release version"); global.gpf = require("../../build/gpf.js"); - } else if ("debug" === global.version) { + } else if (options.debug) { + console.log("Using debug version"); global.gpf = require("../../build/gpf-debug.js"); // Sources are included } else { + console.log("Using source version"); require("../../src/boot.js"); }
Implemented version switch was not working...
ArnaudBuchholz_gpf-js
train
js
38ff23041636f8469c14be6766ebd79c253f027b
diff --git a/Gemfile b/Gemfile index <HASH>..<HASH> 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ source "https://rubygems.org" -# Specify your gem"s dependencies in sensu-transport.gemspec +# Specify your gem's dependencies in sensu-transport.gemspec gemspec diff --git a/lib/sensu/transport/base.rb b/lib/sensu/transport/base.rb index <HASH>..<HASH> 100644 --- a/lib/sensu/transport/base.rb +++ b/lib/sensu/transport/base.rb @@ -48,7 +48,9 @@ module Sensu def connect(options={}); end # Reconnect to the transport. - def reconnect; end + # + # @param force [Boolean] the reconnect. + def reconnect(force=false); end # Indicates if connected to the transport. # diff --git a/lib/sensu/transport/rabbitmq.rb b/lib/sensu/transport/rabbitmq.rb index <HASH>..<HASH> 100644 --- a/lib/sensu/transport/rabbitmq.rb +++ b/lib/sensu/transport/rabbitmq.rb @@ -14,7 +14,7 @@ module Sensu connect_with_eligible_options end - def reconnect + def reconnect(force=false) unless @reconnecting @reconnecting = true @before_reconnect.call
[redis-transport] updated transport api reconnect() to include force param
sensu_sensu-transport
train
Gemfile,rb,rb
9b7bbc619b4fe328188d9f12a438e148436fc9a6
diff --git a/event/event.js b/event/event.js index <HASH>..<HASH> 100644 --- a/event/event.js +++ b/event/event.js @@ -56,7 +56,7 @@ $.ready = function() { }; // If Mozilla is used -if ( $.browser == "mozilla" ) { +if ( $.browser == "mozilla" || $.browser == "opera" ) { // Use the handy event callback document.addEventListener( "DOMContentLoaded", $.ready, null ); @@ -79,8 +79,8 @@ if ( $.browser == "mozilla" ) { // Clear from memory script = null; -// If Safari or Opera is used -} else { +// If Safari is used +} else if ( $.browser == "safari" ) { $.$$timer = setInterval(function(){ if ( document.readyState == "loaded" || document.readyState == "complete" ) {
DOMContentLoaded works in Opera 9b2+, so I have it firing for that now too - the means that there is a DOM Ready solution for every major browser! (Older version of Opera simply fallback to window.onload)
jquery_jquery
train
js
1ccd91ce66f32b332388afb7b250513dc0bbd3bd
diff --git a/runtests.py b/runtests.py index <HASH>..<HASH> 100644 --- a/runtests.py +++ b/runtests.py @@ -30,6 +30,7 @@ if not settings.configured: ROOT_URLCONF='allaccess.tests.urls', LOGIN_URL='/login/', LOGIN_REDIRECT_URL='/', + USE_TZ=True, )
Ensure tests are run with timezone support active. Currently passes without any warnings. Fixes #<I>
mlavin_django-all-access
train
py
757ebcdf4f1d04cff1734fe0246b12f5a3694295
diff --git a/src/lib/skemer.js b/src/lib/skemer.js index <HASH>..<HASH> 100644 --- a/src/lib/skemer.js +++ b/src/lib/skemer.js @@ -55,7 +55,7 @@ function shouldReplace(context) { * new value or a default value. Otherwise, the new value */ function setValueToType(context) { - var t, value; + var t, value, parts; //console.log('\nsetValueToType', util.inspect(context, {depth: null})); if (context.schema.types) { //console.log('have types, checking for value', context.schema, context.newData); @@ -133,7 +133,7 @@ function setValueToType(context) { case 'boolean': if (context.newData !== undefined) { if (typeof context.newData === context.schema.type) { - var parts = []; + parts = []; if (context.schema.type === 'number') { if ((context.schema.min !== undefined && context.newData < context.schema.min) @@ -185,7 +185,7 @@ function setValueToType(context) { case 'date': if (context.newData !== undefined) { if (typeof context.newData === context.schema.type) { - var parts = []; + parts = []; if ((context.schema.min !== undefined && context.newData < context.schema.min)
- Fixed duplicated var declaration
MeldCE_skemer
train
js
2d5988d1cea9be72b2177118520337f70f61a965
diff --git a/src/mustache_core.js b/src/mustache_core.js index <HASH>..<HASH> 100644 --- a/src/mustache_core.js +++ b/src/mustache_core.js @@ -26,7 +26,7 @@ var canReflect = require("can-reflect"); // ## Helpers -var mustacheLineBreakRegExp = /(?:(^|(?:\r?)\n)(\s*)(\{\{([\s\S]*)\}\}\}?)([^\S\n\r]*)($|\r?\n))|(\{\{([\s\S]*)\}\}\}?)/g, +var mustacheLineBreakRegExp = /(?:(^|\r?\n)(\s*)(\{\{([\s\S]*)\}\}\}?)([^\S\n\r]*)($|\r?\n))|(\{\{([\s\S]*)\}\}\}?)/g, mustacheWhitespaceRegExp = /(\s*)(\{\{\{?)(-?)([\s\S]*?)(-?)(\}\}\}?)(\s*)/g, k = function(){};
ungroup carriage return at beginning of mustacheLineBreakRegExp
canjs_can-stache
train
js
09f54b367430e44ee8f6da8261249b5cc0553b8f
diff --git a/packages/react-impression/src/components/Popover/Popover.js b/packages/react-impression/src/components/Popover/Popover.js index <HASH>..<HASH> 100644 --- a/packages/react-impression/src/components/Popover/Popover.js +++ b/packages/react-impression/src/components/Popover/Popover.js @@ -153,6 +153,7 @@ export default class Popover extends React.PureComponent { () => { this.popperJS = new Popper(this.referenceDom, this.popper, { placement: this.props.position, + positionFixed: true, }) } )
fix popover (#<I>)
NewDadaFE_react-impression
train
js
7b378405756d7863067402f106b2414fb152b66a
diff --git a/edc_notification/settings.py b/edc_notification/settings.py index <HASH>..<HASH> 100644 --- a/edc_notification/settings.py +++ b/edc_notification/settings.py @@ -10,7 +10,10 @@ APP_NAME = 'edc_notification' env = environ.Env() -ENVFILE = os.environ['ENVFILE'] or 'env.sample' +try: + ENVFILE = os.environ['ENVFILE'] or 'env.sample' +except KeyError: + ENVFILE = 'env.sample' env.read_env(os.path.join(BASE_DIR, ENVFILE)) print(f"Reading env from {os.path.join(BASE_DIR, ENVFILE)}")
refer to env.sample in travis tests
clinicedc_edc-notification
train
py
0682401413856ddde917c75e5100f172a74a7def
diff --git a/lib/FieldMapper/ContentFieldMapper/BlockDocumentsBaseContentFields.php b/lib/FieldMapper/ContentFieldMapper/BlockDocumentsBaseContentFields.php index <HASH>..<HASH> 100644 --- a/lib/FieldMapper/ContentFieldMapper/BlockDocumentsBaseContentFields.php +++ b/lib/FieldMapper/ContentFieldMapper/BlockDocumentsBaseContentFields.php @@ -8,6 +8,7 @@ */ namespace EzSystems\EzPlatformSolrSearchEngine\FieldMapper\ContentFieldMapper; +use eZ\Publish\API\Repository\Exceptions\NotFoundException; use eZ\Publish\SPI\Persistence\Content; use eZ\Publish\SPI\Persistence\Content\Location\Handler as LocationHandler; use eZ\Publish\SPI\Persistence\Content\ObjectState\Handler as ObjectStateHandler; @@ -192,10 +193,14 @@ class BlockDocumentsBaseContentFields extends ContentFieldMapper $objectStateIds = []; foreach ($this->objectStateHandler->loadAllGroups() as $objectStateGroup) { - $objectStateIds[] = $this->objectStateHandler->getContentState( - $contentId, - $objectStateGroup->id - )->id; + try { + $objectStateIds[] = $this->objectStateHandler->getContentState( + $contentId, + $objectStateGroup->id + )->id; + } catch (NotFoundException $e) { + // // Ignore empty object state groups + } } return $objectStateIds;
EZP-<I>: Skipped empty object state groups during indexing (#<I>)
ezsystems_ezplatform-solr-search-engine
train
php
4eab6fec0820c625af2a4bdb1fbabe78604bcbda
diff --git a/libraries/common/components/Image/style.js b/libraries/common/components/Image/style.js index <HASH>..<HASH> 100644 --- a/libraries/common/components/Image/style.js +++ b/libraries/common/components/Image/style.js @@ -24,6 +24,9 @@ const image = css({ * Before there was a left:50%, translateX(-50%) hack for centering the images if ratio is * different, but it didn't work since height was not 'auto'. * Adding this hack back would cause PWA-660 regression. + * + * To fix CCP-410 without shrinking the image and without making PWA-660 back, we should + * change how the image is rendered by not making it absolute positioned. * */ top: 0, left: 0,
PWA-<I> - even better comment
shopgate_pwa
train
js
1d01c657dd1168193abea47bb46756510957f522
diff --git a/wire/msgtx.go b/wire/msgtx.go index <HASH>..<HASH> 100644 --- a/wire/msgtx.go +++ b/wire/msgtx.go @@ -314,6 +314,21 @@ func (msg *MsgTx) TxHash() chainhash.Hash { return chainhash.DoubleHashH(buf.Bytes()) } +// WitnessHash generates the hash of the transaction serialized according to +// the new witness serialization defined in BIP0141 and BIP0144. The final +// output is used within the Segregated Witness commitment of all the witnesses +// within a block. If a transaction has no witness data, then the witness hash, +// is the same as its txid. +func (msg *MsgTx) WitnessHash() chainhash.Hash { + if msg.HasWitness() { + buf := bytes.NewBuffer(make([]byte, 0, msg.SerializeSize())) + _ = msg.Serialize(buf) + return chainhash.DoubleHashH(buf.Bytes()) + } + + return msg.TxHash() +} + // Copy creates a deep copy of a transaction so that the original does not get // modified when the copy is manipulated. func (msg *MsgTx) Copy() *MsgTx {
BIP<I>+wire: add a WitnessHash method to tx
btcsuite_btcd
train
go
83294d31fa2c8d06d6930636ba4620b1743160fa
diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/knife/bootstrap_spec.rb +++ b/spec/unit/knife/bootstrap_spec.rb @@ -1661,7 +1661,7 @@ describe Chef::Knife::Bootstrap do before do Chef::Config[:validation_key] = "/blah" allow(vault_handler_mock).to receive(:doing_chef_vault?).and_return false - allow(File).to receive(:exist?).with("/blah").and_return false + allow(File).to receive(:exist?).with(/\/blah/).and_return false end it_behaves_like "creating the client locally" end @@ -1669,7 +1669,7 @@ describe Chef::Knife::Bootstrap do context "when a valid validation key is given and we're doing old-style client creation" do before do Chef::Config[:validation_key] = "/blah" - allow(File).to receive(:exist?).with("/blah").and_return true + allow(File).to receive(:exist?).with(/\/blah/).and_return true allow(vault_handler_mock).to receive(:doing_chef_vault?).and_return false end
Relax the match for validation key path Because we expand the path to the validation key, the exact match of "/blah" under Windows was failing, because it expanded to "C:/blah"
chef_chef
train
rb
8acf76e94a8223b9c2c918593527fefa3d3f2c62
diff --git a/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/startup/SipHostConfig.java b/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/startup/SipHostConfig.java index <HASH>..<HASH> 100644 --- a/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/startup/SipHostConfig.java +++ b/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/startup/SipHostConfig.java @@ -184,7 +184,8 @@ public class SipHostConfig extends HostConfig { */ private boolean isSipServletDirectory(File dir) { if(dir.isDirectory()) { - File sipXmlFile = new File(dir.getAbsoluteFile() + SipContext.APPLICATION_SIP_XML); + //Fix provided by Thomas Lenesey for exploded directory deployments + File sipXmlFile = new File(dir.getAbsoluteFile(), SipContext.APPLICATION_SIP_XML); if(sipXmlFile.exists()) { return true; }
Fix for exploded directory deployment in Tomcat provided by Thomas Lenesey from Nexcom Systems git-svn-id: <URL>
RestComm_sip-servlets
train
java
768459a31c397ac35e478c557cebd0920cf6cd81
diff --git a/benchexec/tools/ultimate.py b/benchexec/tools/ultimate.py index <HASH>..<HASH> 100644 --- a/benchexec/tools/ultimate.py +++ b/benchexec/tools/ultimate.py @@ -131,7 +131,7 @@ class UltimateTool(benchexec.tools.template.BaseTool): launcher_jar = os.path.join(ultimatedir, jar) if os.path.isfile(launcher_jar): return launcher_jar - raise FileNotFoundError('No suitable launcher jar found') + raise FileNotFoundError('No suitable launcher jar found in {0}'.format(ultimatedir)) @functools.lru_cache() def version(self, executable):
more verbosity for launcher jar error
sosy-lab_benchexec
train
py
ccaaa709dff7205c4a578a9047a6bb6c11e35fb1
diff --git a/pyodesys/tests/test_symbolic.py b/pyodesys/tests/test_symbolic.py index <HASH>..<HASH> 100644 --- a/pyodesys/tests/test_symbolic.py +++ b/pyodesys/tests/test_symbolic.py @@ -395,7 +395,7 @@ def test_long_chain_banded_scipy(n): min_time_band = min(min_time_band, time_band) check(yout_dens[-1, :], n, p, a, atol, rtol, 1.5) check(yout_band[-1, :], n, p, a, atol, rtol, 1.5) - assert min_time_dens > min_time_band # will fail sometimes due to load + assert min_time_dens*2 > min_time_band # (2x: fails sometimes due to load) @pytest.mark.skipif(sym is None, reason='package sym missing')
add safety factor for timings in test suite
bjodah_pyodesys
train
py
ae26b481c9be9738e8d206fbfa5a2244219d5ce3
diff --git a/tests/test_goea_statsmodels.py b/tests/test_goea_statsmodels.py index <HASH>..<HASH> 100755 --- a/tests/test_goea_statsmodels.py +++ b/tests/test_goea_statsmodels.py @@ -18,7 +18,7 @@ def test_goea_statsmodels(log=sys.stdout): prt_if = lambda nt: nt.p_uncorrected < 0.0005 ## These will specify to use the statsmodels methods methods_sm0 = ['holm-sidak', 'simes-hochberg', 'hommel', - 'fdr_bh', 'fdr_by', 'fdr_tsbh', 'fdr_tsbky'] + 'fdr_bh', 'fdr_by', 'fdr_tsbh', 'fdr_tsbky', 'fdr_gbs'] # Prepend "sm_" or "statsmodels_" to a method to use that version methods_sm1 = ['sm_bonferroni', 'sm_sidak', 'sm_holm'] methods = methods_sm0 + methods_sm1
Add multiple-test method, FDR adaptive Gavrilov-Benjamini-Sarkar to tests.
tanghaibao_goatools
train
py
907c17366aa1e83ec55c0687c80cf32abbb60e57
diff --git a/src/Schema/Generators/SchemaGenerator.php b/src/Schema/Generators/SchemaGenerator.php index <HASH>..<HASH> 100644 --- a/src/Schema/Generators/SchemaGenerator.php +++ b/src/Schema/Generators/SchemaGenerator.php @@ -10,7 +10,7 @@ class SchemaGenerator * @param string $version * @return boolean */ - public function build($version = '0.6.0') + public function build($version = '4.12') { $query = file_get_contents(__DIR__.'/../../../assets/introspection-'. $version .'.txt'); $data = app('graphql')->execute($query);
revert to introspection <I>
nuwave_lighthouse
train
php
03259e803d01b1e5ed900c20258431357a2fd14a
diff --git a/packages/site/pages/core/motion.js b/packages/site/pages/core/motion.js index <HASH>..<HASH> 100644 --- a/packages/site/pages/core/motion.js +++ b/packages/site/pages/core/motion.js @@ -181,15 +181,15 @@ const Travel = _ => ( } .pill1 { width: 50%; - animation: 3000ms 500ms infinite pill1; + animation: 4000ms 500ms infinite pill1; } .pill2Container { width: calc(100% - 44px); - animation: 3000ms 500ms infinite pill2; + animation: 4000ms 500ms infinite pill2; } .pill3Container { width: calc(100% - 44px); - animation: 3000ms 500ms infinite pill3; + animation: 4000ms 500ms infinite pill3; } .pill2, .pill3 {
refactor(site): add more time to motion travel example
pluralsight_design-system
train
js
239747c2c7a45a55304b14061dd09e2945372a0f
diff --git a/spec/acceptance/neovim-ruby-host_spec.rb b/spec/acceptance/neovim-ruby-host_spec.rb index <HASH>..<HASH> 100644 --- a/spec/acceptance/neovim-ruby-host_spec.rb +++ b/spec/acceptance/neovim-ruby-host_spec.rb @@ -34,7 +34,7 @@ RSpec.describe "neovim-ruby-host" do # Start the remote host host_nvim.command(%{let g:chan = rpcstart("#{bin_path}", ["#{plugin1}", "#{plugin2}"])}) - sleep 0.4 # TODO figure out if/why this is necessary + sleep 0.3 # TODO figure out if/why this is necessary # Make two requests to the synchronous SyncAdd method and store the results host_nvim.command(%{let g:res1 = rpcrequest(g:chan, "SyncAdd", 1, 2)}) @@ -48,6 +48,7 @@ RSpec.describe "neovim-ruby-host" do # Set the current line content twice via the AsyncSetLine method host_nvim.command(%{call rpcnotify(g:chan, "AsyncSetLine", "foo")}) host_nvim.command(%{call rpcnotify(g:chan, "AsyncSetLine", "bar")}) + sleep 0.3 # Save the contents of the buffer host_nvim.command("write! #{output}")
Add extra sleep to acceptance test to debug travis failures
neovim_neovim-ruby
train
rb