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
4b2dd878f335195af410a68f27bff457cde5ff96
diff --git a/yowsup/layers/protocol_contacts/layer.py b/yowsup/layers/protocol_contacts/layer.py index <HASH>..<HASH> 100644 --- a/yowsup/layers/protocol_contacts/layer.py +++ b/yowsup/layers/protocol_contacts/layer.py @@ -1,6 +1,7 @@ -from yowsup.layers import YowLayer, YowLayerEvent, YowProtocolLayer -from yowsup.common import YowConstants +from yowsup.layers import YowProtocolLayer from .protocolentities import * + + class YowContactsIqProtocolLayer(YowProtocolLayer): def __init__(self): handleMap = { @@ -10,7 +11,7 @@ class YowContactsIqProtocolLayer(YowProtocolLayer): super(YowContactsIqProtocolLayer, self).__init__(handleMap) def __str__(self): - return "Iq Layer" + return "Contact Iq Layer" def recvNotification(self, node): if node["type"] == "contacts":
[style] apply minor style update to contacts layer Also fixed __str__ identified the layer as iq instead of contacts
tgalal_yowsup
train
py
d0ce8de6332bb8c9cd8a21fbc087ef75d608072a
diff --git a/lib/buildkit/client.rb b/lib/buildkit/client.rb index <HASH>..<HASH> 100644 --- a/lib/buildkit/client.rb +++ b/lib/buildkit/client.rb @@ -26,7 +26,7 @@ module Buildkit builder.adapter Faraday.default_adapter end - def initialize(endpoint: DEFAULT_ENDPOINT, token:) + def initialize(endpoint: ENV.fetch("BUILDKITE_API_ENDPOINT", DEFAULT_ENDPOINT), token: ENV.fetch("BUILDKITE_API_TOKEN")) @endpoint = endpoint @token = token end
Allow supplying API endpoint and token via ENV This matches the pattern set by the Buildkite Agent with $BUILDKITE_AGENT_ENDPOINT and $BUILDKITE_AGENT_TOKEN
Shopify_buildkit
train
rb
4a65dc52a41634e3ea1a2480cd60790da51ac22a
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -44,8 +44,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'PyUV' -copyright = u'2011, Saúl Ibarra Corretgé' +project = u'pyuv' +copyright = u'2011-2013, Saúl Ibarra Corretgé' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -95,7 +95,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = 'nature' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the
Updated copyright years and default sphinx theme
saghul_pyuv
train
py
28e984e0d903aca12bb7d6c516783eba4c17a303
diff --git a/client/state/selectors/is-plugin-active.js b/client/state/selectors/is-plugin-active.js index <HASH>..<HASH> 100644 --- a/client/state/selectors/is-plugin-active.js +++ b/client/state/selectors/is-plugin-active.js @@ -14,7 +14,7 @@ import { find } from 'lodash'; */ export default function isPluginActive( state, siteId, pluginSlug ) { const sitePlugins = state.plugins.installed.plugins[ siteId ]; - const plugin = find( sitePlugins, { slug: pluginSlug } ); + const plugin = find( sitePlugins, { slug: pluginSlug, active: true } ); if ( ! plugin ) { return false; }
Is Plugin Active: Make sure to check the full list of plugins for an active one with this slug. If the user has been testing multiple versions of a plugin the first one we find might not be the one that is active and so we might lie about having an active version of this plugin.
Automattic_wp-calypso
train
js
4c5d2c9ad4bd579eff535125842ce5d3bc45bfd1
diff --git a/pmagpy/pmag.py b/pmagpy/pmag.py index <HASH>..<HASH> 100755 --- a/pmagpy/pmag.py +++ b/pmagpy/pmag.py @@ -7,7 +7,7 @@ import exceptions import os import time import pandas as pd -from scipy import sqrt,mean +from scipy mean from mapping import map_magic from pmagpy import new_builder as nb @@ -2248,8 +2248,8 @@ def PintPars(datablock,araiblock,zijdblock,start,end,accept,**kwargs): cart=dir2cart(DIR) zdata.append(np.array([cart[0],cart[1],cart[2]])) if k>0: - vector_diffs.append(sqrt(sum((np.array(zdata[-2])-np.array(zdata[-1]))**2))) - vector_diffs.append(sqrt(sum(np.array(zdata[-1])**2))) # last vector differnce: from the last point to the origin. + vector_diffs.append(np.sqrt(sum((np.array(zdata[-2])-np.array(zdata[-1]))**2))) + vector_diffs.append(np.sqrt(sum(np.array(zdata[-1])**2))) # last vector differnce: from the last point to the origin. vds=sum(vector_diffs) # vds calculation zdata=np.array(zdata) vector_diffs=np.array(vector_diffs)
remove from scipy import sqrt and change two calls to be to np.sqrt
PmagPy_PmagPy
train
py
4664b66c73969b55639a83c98535d77753cc0a36
diff --git a/lib/form/areafiles.php b/lib/form/areafiles.php index <HASH>..<HASH> 100644 --- a/lib/form/areafiles.php +++ b/lib/form/areafiles.php @@ -4,7 +4,7 @@ require_once('HTML/QuickForm/element.php'); class MoodleQuickForm_areafiles extends HTML_QuickForm_element { protected $_helpbutton = ''; - protected $_options = array('subdirs'=>0, 'maxbytes'=>0); + protected $_options = array('subdirs'=>0, 'maxbytes'=>0, 'maxfiles'=>0); function MoodleQuickForm_areafiles($elementName=null, $elementLabel=null, $options=null, $attributes=null) { global $CFG; @@ -54,6 +54,14 @@ class MoodleQuickForm_areafiles extends HTML_QuickForm_element { $this->_options['subdirs'] = $allow; } + function getMaxfiles() { + return $this->_options['maxfiles']; + } + + function setMaxfiles($num) { + $this->_options['maxfiles'] = $num; + } + function setHelpButton($_helpbuttonargs, $function='_helpbutton') { if (!is_array($_helpbuttonargs)) { $_helpbuttonargs = array($_helpbuttonargs);
MDL-<I> areafiles improvements
moodle_moodle
train
php
a9a6601b95a992c3e8aafe25267d13f096f71b61
diff --git a/skyfield/iokit.py b/skyfield/iokit.py index <HASH>..<HASH> 100644 --- a/skyfield/iokit.py +++ b/skyfield/iokit.py @@ -281,6 +281,15 @@ class Loader(object): Set ``backup`` to ``True`` if you want an already-existing file moved out of the way instead of overwritten. + Your operating system may raise any of several errors during a + download: hostname lookup failure (this is the usual symptom if + you are disconnected from the Internet); the server refusing the + connection; and the connection closing mid-download. Skyfield + makes no attempt to intercept or interpret these errors — which + vary by operating system — so your application itself should + catch network errors if it needs to avoid printing raw Python + exceptions, or if you want to retry failed downloads. + """ if '://' not in url: url = self.build_url(url)
Fix #<I>: mention exceptions during `download()`
skyfielders_python-skyfield
train
py
06bafa071afac274bfb7f21ff34bc2b29e99cf18
diff --git a/lib/minicron/hub/assets/app/application.js b/lib/minicron/hub/assets/app/application.js index <HASH>..<HASH> 100644 --- a/lib/minicron/hub/assets/app/application.js +++ b/lib/minicron/hub/assets/app/application.js @@ -20,8 +20,6 @@ // Sidebar perfect scrollbar init $sidebar.perfectScrollbar(); - $sidebar.scrollTop(0); - $sidebar.perfectScrollbar('update'); // Main Panel perfect scrollbar init $main_panel.perfectScrollbar();
Don't scroll the sidebar to the top
jamesrwhite_minicron
train
js
30ed6c5d8d5a42e0c71d40ee51fc4a144f8b0775
diff --git a/lib/mail/parts_list.rb b/lib/mail/parts_list.rb index <HASH>..<HASH> 100644 --- a/lib/mail/parts_list.rb +++ b/lib/mail/parts_list.rb @@ -9,6 +9,17 @@ module Mail super @parts end + # The #encode_with and #to_yaml methods are just implemented + # for the sake of backward compatibility ; the delegator does + # not correctly delegate these calls to the delegated object + def encode_with(coder) # :nodoc: + coder.represent_object(nil, @parts) + end + + def to_yaml(options = {}) # :nodoc: + @parts.to_yaml(options) + end + def attachments Mail::AttachmentsList.new(@parts) end diff --git a/spec/mail/parts_list_spec.rb b/spec/mail/parts_list_spec.rb index <HASH>..<HASH> 100644 --- a/spec/mail/parts_list_spec.rb +++ b/spec/mail/parts_list_spec.rb @@ -66,4 +66,9 @@ describe "PartsList" do p = Mail::PartsList.new expect(p).to respond_to(:reduce) end + + it "should have a round-tripping YAML serialization" do + p = Mail::PartsList.new([1, 2]) + expect(YAML.load(YAML.dump(p))).to eq(p) + end end
Make YAML serialization backward-compatible Previously, the object would have been serialized as an Array even though YAML wouldn't be able to round-trip. Let's keep this behavior for now to make upgrade smoother to this new "layer".
mikel_mail
train
rb,rb
b731bd0ce6f05796dd642804bf2469646d7a063c
diff --git a/tools/makemanifest.py b/tools/makemanifest.py index <HASH>..<HASH> 100644 --- a/tools/makemanifest.py +++ b/tools/makemanifest.py @@ -288,7 +288,8 @@ def main(): + ["-o", outfile, "-s", script, "-O{}".format(opt), infile] ) if res != 0: - print("error compiling {}: {}".format(infile, out)) + print("error compiling {}:".format(infile)) + sys.stdout.buffer.write(out) raise SystemExit(1) ts_outfile = get_timestamp(outfile) mpy_files.append(outfile)
tools/makemanifest.py: Print nicely formatted errors from mpy-cross. If mpy-cross exits with an error be sure to print that error in a way that is readable, instead of a long bytes object.
micropython_micropython
train
py
748834d3e632bf168363f5b8f94c5027b206c68a
diff --git a/tests/bootstrap.php b/tests/bootstrap.php index <HASH>..<HASH> 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,3 +1,2 @@ <?php -require dirname(__DIR__) . '/vendor/autoload.php'; -require __DIR__ . '/getallheaders.php'; +require __DIR__ . '/../vendor/autoload.php';
remove unused declarations in PHP Unit bootstrapper
slimphp_Slim-Http
train
php
9e27cc431b78bb91061c63eebb554a5eff134c85
diff --git a/test/runLoaders.js b/test/runLoaders.js index <HASH>..<HASH> 100644 --- a/test/runLoaders.js +++ b/test/runLoaders.js @@ -153,7 +153,6 @@ describe("runLoaders", function() { done(); }); }); - it("should be possible to add dependencies", function(done) { runLoaders({ resource: path.resolve(fixtures, "resource.bin"),
fixup! Increase parity between "pitch" & "normal" loaders
webpack_loader-runner
train
js
bf692800e62b2201305e7f4a36eff75184fd29b1
diff --git a/simple_history/models.py b/simple_history/models.py index <HASH>..<HASH> 100755 --- a/simple_history/models.py +++ b/simple_history/models.py @@ -101,7 +101,10 @@ class HistoricalRecords(object): """ @models.permalink def revert_url(self): - return ('%s:%s_%s_simple_history' % (admin.site.name, model._meta.app_label, model._meta.module_name), [self.id, self.history_id]) + opts = model._meta + return ('%s:%s_%s_simple_history' % + (admin.site.name, opts.app_label, opts.module_name), + [getattr(self, opts.pk.attname), self.history_id]) def get_instance(self): return model(**dict([(k, getattr(self, k)) for k in fields]))
Fix history forms for primary keys besides "id"
treyhunner_django-simple-history
train
py
b2f12f9c6bfd5b5513c0111faca0f439966f9750
diff --git a/src/lib/Behat/BrowserContext/NavigationContext.php b/src/lib/Behat/BrowserContext/NavigationContext.php index <HASH>..<HASH> 100644 --- a/src/lib/Behat/BrowserContext/NavigationContext.php +++ b/src/lib/Behat/BrowserContext/NavigationContext.php @@ -136,6 +136,14 @@ class NavigationContext implements Context } /** + * @Given I log out of back office + */ + public function iLogOutOfBackOffice() + { + $this->upperMenu->chooseFromUserDropdown('Logout'); + } + + /** * @Given I'm on Content view Page for :path * @Given there exists Content view Page for :path */
IBX-<I> added log out step in behat (#<I>) CR fixes
ezsystems_ezplatform-admin-ui
train
php
e45fc61941ce9267a4aa4e30315b892e2e7e18f8
diff --git a/pykechain/models/property_attachment.py b/pykechain/models/property_attachment.py index <HASH>..<HASH> 100644 --- a/pykechain/models/property_attachment.py +++ b/pykechain/models/property_attachment.py @@ -33,7 +33,11 @@ class AttachmentProperty(Property): @value.setter def value(self, value): - raise RuntimeError("Cannot set the value of an attachment property, use upload()") + raise RuntimeError("Cannot set the value of an attachment property, use upload() to upload a new attachment or " + "clear() to clear the attachment from the field") + + def clear(self): + """Clears the attachment from the attachment field""" def json_load(self): """Download the data from the attachment and deserialise the contained json.
added clear() method of the attachment field
KE-works_pykechain
train
py
c86b05ed2aa6cabe280a5244d9eb6a1d1a2371e9
diff --git a/velbus/module.py b/velbus/module.py index <HASH>..<HASH> 100644 --- a/velbus/module.py +++ b/velbus/module.py @@ -165,9 +165,12 @@ class Module(object): # load the channel names self._request_channel_name() self._loaded_callbacks.append(callback) - # load the module specifick stuff + # load the module specific stuff self._load() + def loading_in_progress(self): + return len(self._loaded_callbacks) != 0 + def _load(self): pass
add method to check if loading is in progress fix typo
thomasdelaet_python-velbus
train
py
cf05fe3aaa53e8d922f1fa06cc2979b26581cfd2
diff --git a/src/main/java/com/j256/ormlite/field/FieldType.java b/src/main/java/com/j256/ormlite/field/FieldType.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/j256/ormlite/field/FieldType.java +++ b/src/main/java/com/j256/ormlite/field/FieldType.java @@ -293,6 +293,8 @@ public class FieldType { } try { field.set(data, val); + } catch (IllegalArgumentException e) { + throw SqlExceptionUtil.create("Could not assign object '" + val + "' to field " + this, e); } catch (IllegalAccessException e) { throw SqlExceptionUtil.create("Could not assign object '" + val + "' to field " + this, e); } finally {
Catch and re-throw illegal argument exception when we are trying to set the field.
j256_ormlite-core
train
java
bdd2b0aa0b55a6d4085017f25e649a9cf3c57915
diff --git a/webapps/ui/cockpit/tests/specs/tasks-spec.js b/webapps/ui/cockpit/tests/specs/tasks-spec.js index <HASH>..<HASH> 100644 --- a/webapps/ui/cockpit/tests/specs/tasks-spec.js +++ b/webapps/ui/cockpit/tests/specs/tasks-spec.js @@ -16,7 +16,7 @@ describe('Cockpit Tasks Dashboard Spec', function() { // when tasksPage.navigateToWebapp('Cockpit'); tasksPage.authentication.userLogin('admin', 'admin'); - tasksPage.goToSection('tasks'); + tasksPage.goToSection('Human Tasks'); }); });
test(tasks): correct the goToSection usage Related to CAM-<I>
camunda_camunda-bpm-platform
train
js
22aeb41927f35808e54ec9ff5f603adc4d9abcb2
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var path = require('path'), $ = require('gulp-load-plugins')({ - scope: ['dependencies', 'lazyDependencies'] + scope: ['dependencies', 'devDependencies', 'lazyDependencies'] }), lazyDependencies = require('./package.json').lazyDependencies, del = require('del'),
Fixing missing dependencies reference through gulp-load-plugins.
Meesayen_gladius-forge
train
js
ccfcf6867ff64344ad79d9a8d9fc90d9cf5cb0ba
diff --git a/salt/utils/gitfs.py b/salt/utils/gitfs.py index <HASH>..<HASH> 100644 --- a/salt/utils/gitfs.py +++ b/salt/utils/gitfs.py @@ -446,7 +446,7 @@ class GitProvider(object): cmd = subprocess.Popen( shlex.split(cmd_str), close_fds=not salt.utils.is_windows(), - cwd=self.repo.workdir, + cwd=os.path.dirname(self.gitdir), stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output = cmd.communicate()[0] @@ -538,7 +538,7 @@ class GitProvider(object): cmd = subprocess.Popen( shlex.split(cmd_str), close_fds=not salt.utils.is_windows(), - cwd=self.repo.workdir, + cwd=os.path.dirname(self.gitdir), stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output = cmd.communicate()[0]
Fix cwd for cleaning refs
saltstack_salt
train
py
51f38281a6067c0b81c8c632ac8fa31dbf8cd732
diff --git a/src/NilPortugues/Laravel5/JsonApi/Laravel5JsonApiServiceProvider.php b/src/NilPortugues/Laravel5/JsonApi/Laravel5JsonApiServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/NilPortugues/Laravel5/JsonApi/Laravel5JsonApiServiceProvider.php +++ b/src/NilPortugues/Laravel5/JsonApi/Laravel5JsonApiServiceProvider.php @@ -64,6 +64,8 @@ class Laravel5JsonApiServiceProvider extends ServiceProvider } $this->app->singleton(JsonApiSerializer::class, $provider->provider()); + + $this->publishes([__DIR__.'/../../../config/jsonapi.php' => base_path('config')]); } /**
Adding support for vendor:publish laravel command
nilportugues_laravel5-jsonapi
train
php
d57fb3967072296c2ccd0ab5bfe7d3f49dbbd8cb
diff --git a/lib/fluent/supervisor.rb b/lib/fluent/supervisor.rb index <HASH>..<HASH> 100644 --- a/lib/fluent/supervisor.rb +++ b/lib/fluent/supervisor.rb @@ -16,10 +16,14 @@ require 'fluent/load' require 'etc' -require 'windows/library' -require 'windows/system_info' -include Windows::Library -include Windows::SystemInfo +if $platformwin + require 'windows/library' + require 'windows/system_info' + include Windows::Library + include Windows::SystemInfo + require 'win32/ipc' + require 'win32/event' +end module Fluent class Supervisor @@ -366,8 +370,6 @@ module Fluent exit! 1 end - require 'win32/ipc' - require 'win32/event' def install_supervisor_signal_handlers install_supervisor_winsigint_handler
require windows specific dependencies only on Windows
fluent_fluentd
train
rb
9d3224aaaa538e96f10390c735b119efdd19a829
diff --git a/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/auth/Connection.java b/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/auth/Connection.java index <HASH>..<HASH> 100644 --- a/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/auth/Connection.java +++ b/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/auth/Connection.java @@ -82,8 +82,7 @@ public interface Connection { * @param config The GuacamoleConfiguration to associate with this * Connection. */ - public void setConfiguration(GuacamoleConfiguration config) - throws GuacamoleException; + public void setConfiguration(GuacamoleConfiguration config); /** * Establishes a connection to guacd using the GuacamoleConfiguration
Connection should not throw any exceptions for setConfiguration().
glyptodon_guacamole-client
train
java
a2f5e0c596179f971e7cd3221d6b73cd615a8c7f
diff --git a/qjobs.js b/qjobs.js index <HASH>..<HASH> 100644 --- a/qjobs.js +++ b/qjobs.js @@ -112,4 +112,4 @@ module.exports = new EventEmitter(); module.exports.run = run; module.exports.add = add; module.exports.pause = pause; - +module.exports.setConcurrency = setConcurrency;
oups .. forgot to add setConcurrency in module export
franck34_qjobs
train
js
617a38187e19ca0ffc2f3c294c9940300ccfc611
diff --git a/Controller/ResourceController.php b/Controller/ResourceController.php index <HASH>..<HASH> 100644 --- a/Controller/ResourceController.php +++ b/Controller/ResourceController.php @@ -449,6 +449,10 @@ class ResourceController extends Controller $accessor->getValue($resource, $position) + $movement ); + $this->eventDispatcher->dispatchPreEvent(ResourceActions::UPDATE, $configuration, $resource); + $this->manager->flush(); + $this->eventDispatcher->dispatchPostEvent(ResourceActions::UPDATE, $configuration, $resource); + if (!$configuration->isHtmlRequest()) { return $this->viewHandler->handle($configuration, View::create($resource, 204)); }
[resource] - persist and flush changes on resources calling move actions.
Sylius_SyliusResourceBundle
train
php
845d8130241fd9f909ac7a4a8b5cacec5e0547a2
diff --git a/lib/rubocop/cop/generator.rb b/lib/rubocop/cop/generator.rb index <HASH>..<HASH> 100644 --- a/lib/rubocop/cop/generator.rb +++ b/lib/rubocop/cop/generator.rb @@ -10,10 +10,10 @@ module RuboCop # Note: RDoc 5.1.0 or lower has the following issue. # https://github.com/rubocop-hq/rubocop/issues/7043 # - # The following `String#strip_indent` can be replaced with + # The following `String#gsub` can be replaced with # squiggly heredoc when RuboCop supports Ruby 2.5 or higher # (RDoc 6.0 or higher). - SOURCE_TEMPLATE = <<-RUBY.strip_indent + SOURCE_TEMPLATE = <<-RUBY.gsub(/^ {8}/, '') # frozen_string_literal: true # TODO: when finished, run `rake generate_cops_documentation` to update the docs
Remove #strip_indent from cop generator
rubocop-hq_rubocop
train
rb
95031f0a7940685a3139182ef77d68dadd9ad4a6
diff --git a/control.py b/control.py index <HASH>..<HASH> 100755 --- a/control.py +++ b/control.py @@ -83,4 +83,4 @@ if args.list_objects: elif args.show_api: show_api(remote, args.object) else: - print(call_method(remote, args.object, args.member, args.argument)) + print(call_method(remote, args.object, args.member, args.arguments))
Forgot to change variable name along with parser
DMSC-Instrument-Data_lewis
train
py
42e7e99d46b3b8aec7d5994e674f366d36fcc5e1
diff --git a/googlemaps/places.py b/googlemaps/places.py index <HASH>..<HASH> 100644 --- a/googlemaps/places.py +++ b/googlemaps/places.py @@ -342,7 +342,7 @@ def places_autocomplete(client, input_text, offset=None, location=None, :param types: Restricts the results to places matching the specified type. The full list of supported types is available here: https://developers.google.com/places/web-service/autocomplete#place_types - :type type: string + :type types: string :param components: A component filter for which you wish to obtain a geocode. Currently, you can use components to filter by up to 5 countries for
Fix type annotation in places_autocomplete() docs (#<I>) This was broken by the rename of the parameter from `type` to `types` in commit <I>b<I>a5db1bf<I>aa<I>bcccfd<I>ccce2f0.
googlemaps_google-maps-services-python
train
py
bfff667731483cec1abc988b200f23a3db0bfdd4
diff --git a/sqlalchemy_hana/requirements.py b/sqlalchemy_hana/requirements.py index <HASH>..<HASH> 100644 --- a/sqlalchemy_hana/requirements.py +++ b/sqlalchemy_hana/requirements.py @@ -13,6 +13,8 @@ # language governing permissions and limitations under the License. import sys + +import sqlalchemy from sqlalchemy.testing import exclusions, requirements @@ -293,6 +295,9 @@ class Requirements(requirements.SuiteRequirements): @property def check_constraint_reflection(self): + if sqlalchemy.__version__.startswith('1.1.'): + # Skip reflection tests in SQLAlchemy~=1.1.0 due missing normalization + return exclusions.closed() return exclusions.open() @property
Tests: Disable constraint reflection for SQLA <I>
SAP_sqlalchemy-hana
train
py
aff2801b1d7b219fc7298cd1f97e32931331bace
diff --git a/osmnx/pois.py b/osmnx/pois.py index <HASH>..<HASH> 100644 --- a/osmnx/pois.py +++ b/osmnx/pois.py @@ -222,7 +222,7 @@ def parse_osm_relations(relations, osm_way_df): # Parse member 'way' ids member_way_ids = [member['ref'] for member in relation['members'] if member['type'] == 'way'] # Extract the ways - member_ways = osm_way_df.loc[member_way_ids] + member_ways = osm_way_df.iloc[member_way_ids] # Extract the nodes of those ways member_nodes = list(member_ways['nodes'].values) try:
Replaced deprecated loc selection to iloc for index based selection.
gboeing_osmnx
train
py
bfc6f0939192ca159d8fc74fb577ea995fcd6868
diff --git a/internal/providers/virtualbox/virtualbox.go b/internal/providers/virtualbox/virtualbox.go index <HASH>..<HASH> 100644 --- a/internal/providers/virtualbox/virtualbox.go +++ b/internal/providers/virtualbox/virtualbox.go @@ -87,6 +87,12 @@ func fetchProperty(name string) ([]byte, error) { if buf == nil { return nil, nil } - // properties are double-NUL-terminated - return bytes.TrimRight(C.GoBytes(buf, C.int(size)), "\x00"), nil + // property format: <data> NUL <flags> NUL + // return only the data; ignore the flags + s := C.GoBytes(buf, C.int(size)) + len := bytes.IndexByte(s, 0) + if len == -1 { + return nil, fmt.Errorf("VirtualBox guest property %q is not NUL-terminated", name) + } + return s[0:len], nil }
providers/virtualbox: fix reading properties with flags `VBoxManage guestproperty set <instance> <key> <value> --flags <flags>` causes data to be inserted between the two NUL bytes we were expecting to be consecutive, causing config parsing to fail on the first NUL byte. A cautious user might want to set some of these flags, such as TRANSIENT. Fix by truncating off everything starting from the first NUL.
coreos_ignition
train
go
a063efde25f0460553e118bae0905347e65671e6
diff --git a/libraries/joomla/log/loggers/callback.php b/libraries/joomla/log/loggers/callback.php index <HASH>..<HASH> 100644 --- a/libraries/joomla/log/loggers/callback.php +++ b/libraries/joomla/log/loggers/callback.php @@ -61,9 +61,6 @@ class JLoggerCallback extends JLogger public function addEntry(JLogEntry $entry) { // Pass the log entry to the callback function - if (!call_user_func($this->callback, $entry)) - { - throw new LogException; - } + call_user_func($this->callback, $entry); } }
Just execute the callback. Ignore return values. Callback is not required to return 'true'
joomla_joomla-framework
train
php
d1ec973f5bd51e05f824cf531056a37cbe478f00
diff --git a/proso_common/views.py b/proso_common/views.py index <HASH>..<HASH> 100644 --- a/proso_common/views.py +++ b/proso_common/views.py @@ -39,5 +39,5 @@ def _csv_table(request, table_name): } return render_json(request, response, status=204, template='common_json.html') response = HttpResponse(FileWrapper(open(zip_file)), content_type='application/zip') - response['Content-Disposition'] = 'attachment; filename=' + table_name + response['Content-Disposition'] = 'attachment; filename=' + table_name + '.zip' return response
fix file extension for csv export
adaptive-learning_proso-apps
train
py
f365678505c70b58fcd9ae44899a28c6baf103e0
diff --git a/lib/mk_time/consts.rb b/lib/mk_time/consts.rb index <HASH>..<HASH> 100644 --- a/lib/mk_time/consts.rb +++ b/lib/mk_time/consts.rb @@ -178,7 +178,8 @@ module MkTime ["20170101", 0.6], ["20170126", 0.5], ["20170330", 0.4], - ["20170630", 0.0] # (<= Provisional end-point) + ["20170629", 0.3], + ["20170929", 0.0] # (<= Provisional end-point) ].freeze # DUT1 adjustment end end diff --git a/lib/mk_time/version.rb b/lib/mk_time/version.rb index <HASH>..<HASH> 100644 --- a/lib/mk_time/version.rb +++ b/lib/mk_time/version.rb @@ -1,3 +1,3 @@ module MkTime - VERSION = "0.2.6" + VERSION = "0.2.7" end
UPD: Added a new DUT1 adjustment to constants.
komasaru_mk_time
train
rb,rb
3d9c48d12876e951f49917b84fca5c0a995d8adb
diff --git a/core/block.js b/core/block.js index <HASH>..<HASH> 100644 --- a/core/block.js +++ b/core/block.js @@ -1513,7 +1513,7 @@ Blockly.Block.newFieldImageFromJson_ = function(options) { var height = Number(Blockly.utils.replaceMessageReferences(options['height'])); var alt = Blockly.utils.replaceMessageReferences(options['alt']); - var flip_rtl = !!options['flip_rtl']; + var flip_rtl = !!options['flip_rtl'] || !!options['flipRtl']; return new Blockly.FieldImage(src, width, height, alt, flip_rtl); };
fix issue #<I> supports both spellings of flip_rtl
LLK_scratch-blocks
train
js
434ba289a8c13c3053a9abd94c50ffe91d05abbd
diff --git a/src/SM/StateMachine/StateMachine.php b/src/SM/StateMachine/StateMachine.php index <HASH>..<HASH> 100644 --- a/src/SM/StateMachine/StateMachine.php +++ b/src/SM/StateMachine/StateMachine.php @@ -90,7 +90,7 @@ class StateMachine implements StateMachineInterface 'Transition "%s" does not exist on object "%s" with graph "%s"', $transition, get_class($this->object), - $this->config['graph'] + $this->getGraph() )); } @@ -124,7 +124,7 @@ class StateMachine implements StateMachineInterface $transition, $this->getState(), get_class($this->object), - $this->config['graph'] + $this->getGraph() )); } @@ -201,7 +201,7 @@ class StateMachine implements StateMachineInterface 'Cannot set the state to "%s" to object "%s" with graph %s because it is not pre-defined.', $state, get_class($this->object), - $this->config['graph'] + $this->getGraph() )); }
Use getGraph method to get graph name
winzou_state-machine
train
php
13bc00a08abfe797e93cffa4c4a6e2555206482a
diff --git a/lib/node_modules/@stdlib/plot/plot/lib/factory.js b/lib/node_modules/@stdlib/plot/plot/lib/factory.js index <HASH>..<HASH> 100644 --- a/lib/node_modules/@stdlib/plot/plot/lib/factory.js +++ b/lib/node_modules/@stdlib/plot/plot/lib/factory.js @@ -2,7 +2,7 @@ // MODULES // -var isObject = require( '@stdlib/utils/is-object' ); // TODO: is-plain-object +var isObject = require( '@stdlib/utils/is-plain-object' ); var copy = require( '@stdlib/utils/copy' ); var Plot = require( './plot.js' );
Use utility to test if a value is a plain object
stdlib-js_stdlib
train
js
33ca5dfef4d3978675cdc647acc3591daa276365
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ except(IOError, ImportError): setup( name='esgfpid', - version='0.3.0', + version='0.3.1', author='DKRZ', author_email='[email protected]', url='dkrz.de',
Version to <I> (all unit tests adapted to changes since <I>, so they pass again).
IS-ENES-Data_esgf-pid
train
py
ce2e8d0277f7e9d77bae7ed25fad631463bcf355
diff --git a/htmresearch/algorithms/union_temporal_pooler.py b/htmresearch/algorithms/union_temporal_pooler.py index <HASH>..<HASH> 100644 --- a/htmresearch/algorithms/union_temporal_pooler.py +++ b/htmresearch/algorithms/union_temporal_pooler.py @@ -321,4 +321,5 @@ class UnionTemporalPooler(SpatialPooler): def getUnionSDR(self): - return self._unionSDR \ No newline at end of file + return self._unionSDR + \ No newline at end of file
undo comments to TP, save it for a later PR
numenta_htmresearch
train
py
17eb93d8cce970ebc62a4a7589a5204b6aa74dc4
diff --git a/mode/go/go.js b/mode/go/go.js index <HASH>..<HASH> 100644 --- a/mode/go/go.js +++ b/mode/go/go.js @@ -169,6 +169,7 @@ CodeMirror.defineMode("go", function(config) { }, electricChars: "{}):", + fold: "brace", blockCommentStart: "/*", blockCommentEnd: "*/", lineComment: "//"
[go mode] Set Go mode to use brace folding
codemirror_CodeMirror
train
js
6cca8ac421a2b549f3651161065351333b2cc778
diff --git a/tests/NodeTest.php b/tests/NodeTest.php index <HASH>..<HASH> 100644 --- a/tests/NodeTest.php +++ b/tests/NodeTest.php @@ -7,7 +7,7 @@ use Orchestra\Testbench\TestCase as Orchestra; class NodeTest extends Orchestra { - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/tests/V8Test.php b/tests/V8Test.php index <HASH>..<HASH> 100644 --- a/tests/V8Test.php +++ b/tests/V8Test.php @@ -8,7 +8,7 @@ use Orchestra\Testbench\TestCase as Orchestra; class V8Test extends Orchestra { - public function setUp() + public function setUp(): void { if (! extension_loaded('v8js')) { $this->markTestSkipped('The V8Js extension is not available.');
Added void return type hint This is so it is compatible with Orchestra Testbench <I>+.
spatie_laravel-server-side-rendering
train
php,php
9c80a45a4cbcd79724c6286dcafd0a4ae00a0490
diff --git a/lib/postmates/delivery.rb b/lib/postmates/delivery.rb index <HASH>..<HASH> 100644 --- a/lib/postmates/delivery.rb +++ b/lib/postmates/delivery.rb @@ -3,12 +3,13 @@ require_relative 'utils' module Postmates class Delivery include Postmates::Utils - attr_reader :created_at, :updated_at, :status, :complete, + attr_reader :id, :created_at, :updated_at, :status, :complete, :pickup_eta, :dropoff_eta, :dropoff_deadline, :quote_id, :fee, :currency, :manifest, :pickup, :dropoff, :courier, :image_url def initialize(hash) + @id = hash['id'] @status = hash['status'] @complete = hash['complete'] @quote_id = hash['quote_id'] @@ -26,7 +27,7 @@ module Postmates end def delivered? - complete + status == 'delivered' end end end \ No newline at end of file
Updates Delivery object - Adds :id attribute - Fixes `delivered?` method
O-I_postmates
train
rb
5ae7655ce0947ba72328f8da4f03adda98581b2c
diff --git a/schema/brain/queries/writes.py b/schema/brain/queries/writes.py index <HASH>..<HASH> 100644 --- a/schema/brain/queries/writes.py +++ b/schema/brain/queries/writes.py @@ -94,7 +94,7 @@ def update_job_status(job_id, status, conn=None): :param status: <str> new status :param conn: <connection> a database connection (default: {None}) - :return: <bool> whether job was updated successfully + :return: <dict> the update dicts for the job and the output """ if status not in VALID_STATES: raise ValueError("Invalid status")
updated docstring to reflect new functionality
ramrod-project_database-brain
train
py
ecb328fcab6cb4ffb83f557fb3bbd1d13db0b329
diff --git a/tests/AttachmentTest.php b/tests/AttachmentTest.php index <HASH>..<HASH> 100644 --- a/tests/AttachmentTest.php +++ b/tests/AttachmentTest.php @@ -100,7 +100,7 @@ class AttachmentTest extends \PHPUnit\Framework\TestCase $attachmentFiles = glob($attachDir . '*'); - //Original + 1000 suffixed + 1 random + //Original + 3 suffixed + 1 random $this->assertEquals(5, count($attachmentFiles)); $this->assertFileExists($attachDir . 'logo.jpg'); $this->assertFileExists($attachDir . 'logo_1.jpg');
Update tests/AttachmentTest.php
php-mime-mail-parser_php-mime-mail-parser
train
php
c67bec950a7b1ce5f984a43f12f71f9ec13d9fbd
diff --git a/View/Widget/Widget/ImageUploadLinkWidget.php b/View/Widget/Widget/ImageUploadLinkWidget.php index <HASH>..<HASH> 100644 --- a/View/Widget/Widget/ImageUploadLinkWidget.php +++ b/View/Widget/Widget/ImageUploadLinkWidget.php @@ -37,7 +37,10 @@ class ImageUploadLinkWidget extends AbstractWidget */ protected function createContent($entity, array $options, $property) { - $url = $this->uploadStorage->resolveUri($entity, $options['file_property']); + $url = $this->uploadStorage->resolveUri( + $entity, + !empty($options['file_property']) ? $options['file_property'] : $property.'File' + ); return $url ? $this->render($options, [ @@ -55,8 +58,11 @@ class ImageUploadLinkWidget extends AbstractWidget parent::configureOptions($resolver); $resolver - ->setRequired('file_property') - ->setAllowedTypes('file_property', 'string'); + ->setDefault('file_property', null) + ->setAllowedTypes('file_property', [ + 'string', + 'null', + ]); } /**
Image upload link view widget: use property name with suffix "File" as default "file_property" option's value.
DarvinStudio_DarvinAdminBundle
train
php
5a10d1f85701bd2f03a65561af8f52fd0a555c70
diff --git a/src/Maker/MakeResetPassword.php b/src/Maker/MakeResetPassword.php index <HASH>..<HASH> 100644 --- a/src/Maker/MakeResetPassword.php +++ b/src/Maker/MakeResetPassword.php @@ -306,6 +306,7 @@ class MakeResetPassword extends AbstractMaker $closing[] = ' 2) Review forms in <fg=yellow>"src/Form"</> to customize validation and labels.'; $closing[] = ' 3) Review and customize the templates in <fg=yellow>`templates/reset_password`</>.'; $closing[] = ' 4) Make sure your <fg=yellow>MAILER_DSN</> env var has the correct settings.'; + $closing[] = ' 5) Create a "forgot your password link" to the <fg=yellow>app_forgot_password_request</> route on your login form.'; $io->text($closing); $io->newLine();
add suggestion to create a reset password link
symfony_maker-bundle
train
php
6c6bca2ade7b11356e6bb108257e48a49e23abdd
diff --git a/lib/dynflow/execution_history.rb b/lib/dynflow/execution_history.rb index <HASH>..<HASH> 100644 --- a/lib/dynflow/execution_history.rb +++ b/lib/dynflow/execution_history.rb @@ -12,7 +12,7 @@ module Dynflow module Event def inspect - "#{Time.at(time).utc}: #{name}".tap { |s| s << " @ #{world_id}" if world_id } + ["#{Time.at(time).utc}: #{name}", world_id].compact.join(' @ ') end end
Fix frozen literal in inspect (#<I>)
Dynflow_dynflow
train
rb
a0e248e306f39acc47e743cf34ee36838d1e963a
diff --git a/lib/ruote/exp/flowexpression.rb b/lib/ruote/exp/flowexpression.rb index <HASH>..<HASH> 100644 --- a/lib/ruote/exp/flowexpression.rb +++ b/lib/ruote/exp/flowexpression.rb @@ -116,7 +116,7 @@ module Ruote::Exp # def parent - expstorage[@parent_id] + @parent_id.nil? ? nil : expstorage[@parent_id] end # This method is called by expool#apply_child and expool#launch_sub,
Some expressions don't have parents
jmettraux_ruote
train
rb
a06eba7e2416e34d535c2338e7fd5a3dbfe1a02d
diff --git a/lib/Cake/Model/Datasource/DataSource.php b/lib/Cake/Model/Datasource/DataSource.php index <HASH>..<HASH> 100644 --- a/lib/Cake/Model/Datasource/DataSource.php +++ b/lib/Cake/Model/Datasource/DataSource.php @@ -417,6 +417,16 @@ class DataSource extends Object { } /** + * Closes a connection. Override in subclasses + * + * @return boolean + * @access public + */ + public function close() { + return $this->connected = false; + } + +/** * Closes the current datasource. * */
Adding basic implementation of DataSource::close(). Since this method will be called in Destructor.
cakephp_cakephp
train
php
3cfcb64e3c1e98698348b103415fd2cd3c4d0f1b
diff --git a/lib/auth/oauth2client.js b/lib/auth/oauth2client.js index <HASH>..<HASH> 100644 --- a/lib/auth/oauth2client.js +++ b/lib/auth/oauth2client.js @@ -191,7 +191,7 @@ OAuth2Client.prototype.request = this.transporter.request(opts, function(err, body, res) { // TODO: Check if it's not userRateLimitExceeded - var hasAuthError = res.statusCode == 401 || res.statusCode == 403; + var hasAuthError = res && (res.statusCode == 401 || res.statusCode == 403); // if there is an auth error, refresh the token // and make the request again if (!opt_dontForceRefresh && hasAuthError && credentials.refresh_token) {
Don't crash on undefined response When the underlaying socket crashes (EMFILE for example) the request callback is called without a res parameter (it is undefined) is such case the code will crash without letting the upper layer have a chance to know about it.
googleapis_google-api-nodejs-client
train
js
146b95218042476c95f88b2fa1126c8d07aa6fe8
diff --git a/i3pystatus/now_playing.py b/i3pystatus/now_playing.py index <HASH>..<HASH> 100644 --- a/i3pystatus/now_playing.py +++ b/i3pystatus/now_playing.py @@ -35,9 +35,10 @@ class NowPlaying(IntervalModule): ("status", "Dictionary mapping pause, play and stop to output text"), ("color", "Text color"), ("format", "formatp string"), - + ("hide_no_player", "Hide output if no player is detected"), ) + hide_no_player = True player = None format = "{title} {status}" status = { @@ -51,6 +52,7 @@ class NowPlaying(IntervalModule): "Stopped": "stop", } color = "#FFFFFF" + old_player = None def find_player(self): @@ -73,10 +75,13 @@ class NowPlaying(IntervalModule): try: player = self.get_player() except dbus.exceptions.DBusException: - self.output = { - "full_text": "now_playing: d-bus error", - "color": "#ff0000", - } + if self.hide_no_player: + self.output = None + else: + self.output = { + "full_text": "now_playing: d-bus error", + "color": "#ff0000", + } return properties = dbus.Interface(player, "org.freedesktop.DBus.Properties")
now_playing: hide_no_player option
enkore_i3pystatus
train
py
717679155d054d2df6f9c3c9b1ced23be06aadc3
diff --git a/src/require-graph.js b/src/require-graph.js index <HASH>..<HASH> 100644 --- a/src/require-graph.js +++ b/src/require-graph.js @@ -76,7 +76,7 @@ GraphBuilder.prototype.buildGraph = function(options, callback) { async.forEachLimit(dependencies, 1, function(relativePath, callback) { var dependencyPath = path.join( - graphBuilder.rootLocator(path.extname(relativePath)), + graphBuilder.rootLocator(relativePath, absolutePath), relativePath );
pass relative path and absolute path to rootLocator
tmont_require-graph
train
js
94679c281fb4cfc600ec12724601d2e12ac5742b
diff --git a/Swat/SwatContainer.php b/Swat/SwatContainer.php index <HASH>..<HASH> 100644 --- a/Swat/SwatContainer.php +++ b/Swat/SwatContainer.php @@ -378,7 +378,7 @@ class SwatContainer extends SwatWidget implements SwatUIParent $out = $this->html_head_entries; foreach ($this->children as $child_widget) - $out = array_merge($out, $child_widget->gatherHtmlHeadEntries()); + $out = array_merge($out, $child_widget->getHtmlHeadEntries()); return $out; }
s/gather/get svn commit r<I>
silverorange_swat
train
php
8c65d72b0a464a881d187db5b96bfcc7f4f00a42
diff --git a/src/main/java/com/redhat/darcy/ui/AbstractView.java b/src/main/java/com/redhat/darcy/ui/AbstractView.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/redhat/darcy/ui/AbstractView.java +++ b/src/main/java/com/redhat/darcy/ui/AbstractView.java @@ -82,10 +82,8 @@ public abstract class AbstractView implements View { // Let this propagate in case of these exceptions throw e; } catch (Exception e) { - // Otherwise log it and return false -- something went wrong in evaluating the load - // condition so we'll assume it's just not loaded yet. (For instance, not finding an - // element will throw an exception). - e.printStackTrace(); + // Something went wrong in evaluating the load condition so we'll assume it's just not + // loaded yet. (For instance, not finding an element will throw an exception). return false; } }
Stop printing stack trace on load condition exceptions
darcy-framework_darcy-ui
train
java
58e60b4c40995390999e8e529affcd12ad3ef022
diff --git a/cyphi/subsystem.py b/cyphi/subsystem.py index <HASH>..<HASH> 100644 --- a/cyphi/subsystem.py +++ b/cyphi/subsystem.py @@ -752,8 +752,10 @@ class Subsystem: return Concept( mechanism=(), location=np.array([ - self.unconstrained_cause_repertoire(self.nodes, self.null_cut), - self.unconstrained_effect_repertoire(self.nodes, self.null_cut) + # Unconstrained cause repertoire + self.cause_repertoire((), self.nodes, self.null_cut), + # Unconstrained effect repertoire + self.effect_repertoire((), self.nodes, self.null_cut) ]), phi=0, cause=None,
Null concept calls c/e repertoire directly
wmayner_pyphi
train
py
e44314da81c0307dfa8b17c4d8e7e1eb100dac99
diff --git a/js/modules/qbWebRTC.js b/js/modules/qbWebRTC.js index <HASH>..<HASH> 100755 --- a/js/modules/qbWebRTC.js +++ b/js/modules/qbWebRTC.js @@ -297,6 +297,8 @@ WebRTCProxy.prototype.attachMediaStream = function(id, stream, options) { elem.style.transform = 'scaleX(-1)'; } elem.play(); + } else { + throw new Error('Unable to attach media stream, element ' + elemId + ' is undefined'); } };
Throw an exception when the element is undefined
QuickBlox_quickblox-javascript-sdk
train
js
d7856e52ee3aebe005b21683e135064adefffe08
diff --git a/plexapi/base.py b/plexapi/base.py index <HASH>..<HASH> 100644 --- a/plexapi/base.py +++ b/plexapi/base.py @@ -491,7 +491,7 @@ class Playable(object): def split(self): """Split a duplicate.""" key = '%s/split' % self.key - return self._server.query(key) + return self._server.query(key, method=self._server._session.put) def play(self, client): """ Start playback on the specified client.
fix split media item. add missing method put
pkkid_python-plexapi
train
py
ff9ebe09f98e8cf196a36f194b144b9b0f8d55e6
diff --git a/lib/Unexpected.js b/lib/Unexpected.js index <HASH>..<HASH> 100644 --- a/lib/Unexpected.js +++ b/lib/Unexpected.js @@ -510,6 +510,7 @@ function installExpectMethods(unexpected, expectFunction) { expect.fail = unexpected.fail.bind(unexpected); expect.diff = unexpected.diff.bind(unexpected); expect.addAssertion = unexpected.addAssertion.bind(unexpected); + expect.addStyle = unexpected.addStyle.bind(unexpected); expect.addType = unexpected.addType.bind(unexpected); expect.clone = unexpected.clone.bind(unexpected); expect.toString = unexpected.toString.bind(unexpected);
Provide addStyle method for cloned expect
unexpectedjs_unexpected
train
js
7520efb59fdd136fd4edaead370b701dbc611dc0
diff --git a/src/sap.ui.layout/src/sap/ui/layout/library.js b/src/sap.ui.layout/src/sap/ui/layout/library.js index <HASH>..<HASH> 100644 --- a/src/sap.ui.layout/src/sap/ui/layout/library.js +++ b/src/sap.ui.layout/src/sap/ui/layout/library.js @@ -549,6 +549,9 @@ sap.ui.define([ /** * Uses the <code>GridLayout</code> layout to render the <code>SimpleForm</code> control * @public + * @deprecated As of version 1.67.0, + * as the <code>sap.ui.commons</code> library is deprecated, and the <code>GridLayout</code> must not be used in responsive applications. + * Please use <code>ResponsiveGridLayout</code> or <code>ColumnLayout</code> instead. */ GridLayout : "GridLayout",
[INTERNAL] SimpleFormLayout: deprecate GridLayout As GridLayout is deprecated itself it needs to be derecated in this enum too. Change-Id: Id0bc<I>b<I>a<I>af<I>f<I>edfac<I>ed4e4a BCP: <I> Fixes: <URL>
SAP_openui5
train
js
3f43c85141e9904063a59d8e3cb78f67bb8d8833
diff --git a/cassandra/concurrent.py b/cassandra/concurrent.py index <HASH>..<HASH> 100644 --- a/cassandra/concurrent.py +++ b/cassandra/concurrent.py @@ -45,13 +45,13 @@ def execute_concurrent(session, statements_and_parameters, concurrency=100, rais `results_generator` controls how the results are returned. - If :const:`False`, the results are returned only after all requests have completed. + If :const:`False`, the results are returned only after all requests have completed. - If :const:`True`, a generator expression is returned. Using a generator results in - a constrained memory footprint when the results set will be large -- results are yielded - as they return instead of materializing the entire list at once. The trade for lower memory - footprint is marginal CPU overhead (more thread coordination and sorting out-of-order results - on-the-fly). + If :const:`True`, a generator expression is returned. Using a generator results in a constrained + memory footprint when the results set will be large -- results are yielded + as they return instead of materializing the entire list at once. The trade for lower memory + footprint is marginal CPU overhead (more thread coordination and sorting out-of-order results + on-the-fly). A sequence of ``(success, result_or_exc)`` tuples is returned in the same order that the statements were passed in. If ``success`` is :const:`False`,
doc: tweak formatting in concurrent.execute_concurrent
datastax_python-driver
train
py
0c65783cd3028d6233f4196ccecef2361b2aa0d7
diff --git a/src/Provider/TwigServiceProvider.php b/src/Provider/TwigServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/Provider/TwigServiceProvider.php +++ b/src/Provider/TwigServiceProvider.php @@ -79,7 +79,7 @@ class TwigServiceProvider implements ServiceProviderInterface 'debug' => true, 'cache' => $cache, 'strict_variables' => $app['config']->get('general/strict_variables'), - 'autoescape' => true, + 'autoescape' => 'html', ]; };
Twig 'autoescape' strategy deprecation Using "true" as the default strategy is deprecated. Use "html" instead.
bolt_bolt
train
php
a7369c618c53326aefdd214eb6f9ec12831ee866
diff --git a/code/variations/ProductAttributeType.php b/code/variations/ProductAttributeType.php index <HASH>..<HASH> 100644 --- a/code/variations/ProductAttributeType.php +++ b/code/variations/ProductAttributeType.php @@ -21,8 +21,16 @@ class ProductAttributeType extends DataObject{ function getCMSFields(){ $fields = parent::getCMSFields(); - //TODO: make this a really fast editing interface. Table list field?? - //$fields->removeFieldFromTab('Root.Values','Values'); + $fields->removeFieldFromTab('Root.Values','Values'); + $fieldList = array( + 'Value' => 'Value', + 'Sort' => 'Sort' + ); + $fieldTypes = array( + 'Value' => 'TextField', + 'Sort' => 'TextField' + ); + $fields->addFieldToTab("Root.Values", new TableField("Values", "ProductAttributeValue",$fieldList,$fieldTypes)); return $fields; } @@ -40,10 +48,8 @@ class ProductAttributeType extends DataObject{ } function addValues(array $values){ - $avalues = $this->convertArrayToValues($values); $this->Values()->addMany($avalues); - } function convertArrayToValues(array $values){
ENHANCEMENT: Improved cms fields to allow adding product attribute values on the product page.
silvershop_silvershop-core
train
php
46a3cb7b1726c307f2cdb8f3ad334bb6db42d464
diff --git a/lib/mongoid/paranoia.rb b/lib/mongoid/paranoia.rb index <HASH>..<HASH> 100644 --- a/lib/mongoid/paranoia.rb +++ b/lib/mongoid/paranoia.rb @@ -89,7 +89,7 @@ module Mongoid #:nodoc: def restore paranoid_collection.update( atomic_selector, - { "$unset" => { paranoid_field => true }}, + { "$unset" => { paranoid_field => true }} ) attributes.delete("deleted_at") end
<I> doesnt forgive the extra commas
mongodb_mongoid
train
rb
9938a5e933b7eafa4dd2c94af1dbd57e4a65325f
diff --git a/lib/devise/rails/routes.rb b/lib/devise/rails/routes.rb index <HASH>..<HASH> 100644 --- a/lib/devise/rails/routes.rb +++ b/lib/devise/rails/routes.rb @@ -129,7 +129,8 @@ module ActionDispatch::Routing # # devise_for :users, module: "users" # - # * skip: tell which controller you want to skip routes from being created: + # * skip: tell which controller you want to skip routes from being created. + # It accepts :all as an option, meaning it will not generate any route at all: # # devise_for :users, skip: :sessions #
add documentation about `skip: :all` option to `devise_for` method
plataformatec_devise
train
rb
3cdf180a2d37e9e57a14f148cf45fd532b2454c5
diff --git a/go/libkb/json.go b/go/libkb/json.go index <HASH>..<HASH> 100644 --- a/go/libkb/json.go +++ b/go/libkb/json.go @@ -81,16 +81,6 @@ func (f *JSONFile) Load(warnOnNotFound bool) error { } f.jw = jsonw.NewWrapper(obj) - if runtime.GOOS == "android" { - // marshal it into json without indents to make it one line - out, err := json.Marshal(obj) - if err != nil { - f.G().Log.Debug("JSONFile.Load: error marshaling decoded config obj: %s", err) - } else { - f.G().Log.Debug("JSONFile.Load: %s contents (marshaled): %s", f.filename, string(out)) - } - } - f.G().Log.Debug("- successfully loaded %s file", f.which) return nil }
Remove logging of config.json contents (#<I>)
keybase_client
train
go
5deda2a18da0bf2222076a2519896a39aabb3562
diff --git a/menuconfig.py b/menuconfig.py index <HASH>..<HASH> 100755 --- a/menuconfig.py +++ b/menuconfig.py @@ -825,7 +825,7 @@ def _draw_main(): menu = _cur_menu while menu is not _kconf.top_node: menu_prompts.append(menu.prompt[0]) - menu = menu.parent + menu = _parent_menu(menu) menu_prompts.append("(top menu)") menu_prompts.reverse()
menuconfig: Don't show indentation-based menus in menu path Don't show A in the menu path at the top when entering the menu "B" below, which will be indented relative to A. It looks confusing, and can lead to really long menu paths. config A bool "A" menu "B" depends on A ...
ulfalizer_Kconfiglib
train
py
fe42e915eaf662d9eadc35a8ee316d3d068db482
diff --git a/src/Entities/PaymentCardToken.php b/src/Entities/PaymentCardToken.php index <HASH>..<HASH> 100644 --- a/src/Entities/PaymentCardToken.php +++ b/src/Entities/PaymentCardToken.php @@ -359,7 +359,9 @@ class PaymentCardToken extends Entity */ public function getPaymentInstrument() { - return $this->getAttribute('paymentInstrument'); + return PaymentMethodInstrument::createFromData([ + 'method' => $this->getAttribute('method'), + ] + $this->getAttribute('paymentInstrument')); } /** @@ -370,21 +372,11 @@ class PaymentCardToken extends Entity public function setPaymentInstrument(PaymentInstrument $value) { $this->setAttribute('method', $value->name()); - $this->setAttribute('paymentInstrument', $value); + $this->setAttribute('paymentInstrument', $value->jsonSerialize()); return $this; } - /** - * @param array $data - * - * @return PaymentInstrument - */ - public function createPaymentInstrument(array $data) - { - return PaymentInstrument::createFromData($data); - } - private function setDefaultPaymentInstrumentValue(string $attribute, $value) { if (!$this->getAttribute('paymentInstrument')) {
Fix payment token entity (#<I>)
Rebilly_rebilly-php
train
php
4080ee7b09ec1b5aec9f123d600c9ba6d55d1a88
diff --git a/test/extended/builds/start.go b/test/extended/builds/start.go index <HASH>..<HASH> 100644 --- a/test/extended/builds/start.go +++ b/test/extended/builds/start.go @@ -350,7 +350,7 @@ var _ = g.Describe("[Feature:Builds][Slow] starting a build using CLI", func() { buildLog, err := br.Logs() o.Expect(err).NotTo(o.HaveOccurred()) g.By("verifying the build completed with a warning.") - o.Expect(buildLog).To(o.Or(o.ContainSubstring("One or more build-args [bar] were not consumed"), o.ContainSubstring("one or more build args were not consumed: [bar]"))) + o.Expect(buildLog).To(o.ContainSubstring("one or more build args were not consumed: [bar]")) }) })
Only accept buildah <I>+ unused build arg error Buildah <I> changed how it warns about unused build args, changing a "[Warning] One or more build-args %v were not consumed\n" format string into "[Warning] one or more build args were not consumed: %v\n". Accept only the new version of the message.
openshift_origin
train
go
90ce2fec7f8fa8fda0a272afd2a048cfbf3024c1
diff --git a/tensor2tensor/trax/inputs.py b/tensor2tensor/trax/inputs.py index <HASH>..<HASH> 100644 --- a/tensor2tensor/trax/inputs.py +++ b/tensor2tensor/trax/inputs.py @@ -26,8 +26,6 @@ import gin import jax.numpy as np -from tensor2tensor import problems - import tensorflow as tf import tensorflow_datasets as tfds @@ -135,6 +133,7 @@ def _select_features(example, feature_list=None): def _train_and_eval_dataset_v1(problem_name, data_dir): """Return train and evaluation datasets, feature info and supervised keys.""" + from tensor2tensor import problems # pylint: disable=g-import-not-at-top problem = problems.problem(problem_name) train_dataset = problem.dataset(tf.estimator.ModeKeys.TRAIN, data_dir) train_dataset = train_dataset.map(_select_features)
Lazy load t2t problems (cuts import time down significantly) PiperOrigin-RevId: <I>
tensorflow_tensor2tensor
train
py
a866fa8116ea3d154946507da25f6907b75cfc31
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -197,7 +197,16 @@ end # &block:: Block of code to call while +STDOUT+ is disabled. # def spec_helper_silence_stdout( &block ) - Kernel.silence_stream( STDOUT, &block ) + begin + $old_stdout = $stdout.clone + $stdout.reopen( File::NULL, 'w' ) + + yield + + ensure + $stdout.reopen( $old_stdout ) + + end end # Start up a service application under WEBrick via Rack on localhost, using
ActiveSupport 5 removes Kernel#silence_stream. No replacement is offered, so instead replaced with some very old code from Hoodoo's then-closed-source predecessor. It is inelegant but effective.
LoyaltyNZ_hoodoo
train
rb
2bbf3c0bb0f14e7e1e80044d980b41349ce4ff35
diff --git a/service.go b/service.go index <HASH>..<HASH> 100644 --- a/service.go +++ b/service.go @@ -457,7 +457,10 @@ func (ctrl *ApplicationController) HandleFunc(name string, h, d Handler) HandleF handler := middleware if err != nil { handler = func(ctx *Context) error { - ctx.Respond(400, fmt.Sprintf(`{"kind":"invalid request","msg":"invalid encoding: %s"}`, err)) + ctx.Respond(400, map[string]interface{}{ + "kind": "invalid request", + "msg": "invalid encoding: " + err.Error(), + }) return nil } for i := range chain {
ACL-<I> <I> errors were returning a string rather than a JSON object, due to unescaped error string making the JSON invalid
goadesign_goa
train
go
ec1e916c9853f00ae4055737b939443448681984
diff --git a/httprunner/response.py b/httprunner/response.py index <HASH>..<HASH> 100644 --- a/httprunner/response.py +++ b/httprunner/response.py @@ -6,6 +6,7 @@ import re from httprunner import exception, logger, testcase, utils from httprunner.compat import OrderedDict, basestring from requests.structures import CaseInsensitiveDict +from requests.models import PreparedRequest text_extractor_regexp_compile = re.compile(r".*\(.*\).*") @@ -95,7 +96,11 @@ class ResponseObject(object): # TODO: remove compatibility for content, text if isinstance(top_query_content, bytes): top_query_content = top_query_content.decode("utf-8") - top_query_content = json.loads(top_query_content) + + if isinstance(top_query_content, PreparedRequest): + top_query_content = top_query_content.__dict__ + else: + top_query_content = json.loads(top_query_content) except json.decoder.JSONDecodeError: err_msg = u"Failed to extract data with delimiter!\n" err_msg += u"response content: {}\n".format(self.content)
support->extract: [JSESSIONID: request.headers.cookie.JSESSIONID]
HttpRunner_HttpRunner
train
py
b87c34052cdccd37aa72daf461ce9b5de664cb71
diff --git a/treeherder/etl/job_loader.py b/treeherder/etl/job_loader.py index <HASH>..<HASH> 100644 --- a/treeherder/etl/job_loader.py +++ b/treeherder/etl/job_loader.py @@ -170,12 +170,6 @@ class JobLoader: if "jobInfo" in job: ji = job["jobInfo"] job_details = [] - if "summary" in ji: - job_details.append({ - "content_type": "raw_html", - "value": ji["summary"], - "title": "Summary" - }) if "links" in ji: for link in ji["links"]: job_details.append({
Bug <I> - Stop storing taskcluster's "summary" property in job details (#<I>) It basically duplicates information stored elsewhere, and looks weird for Gecko jobs now that it has markdown formatting which points back to Treeherder. We also can't gurantee it won't be larger than the maximum size for this field.
mozilla_treeherder
train
py
ae2f013653c8a9f9ffb12ae8fcdb1bb604b39236
diff --git a/packages/discord.js/src/util/Sweepers.js b/packages/discord.js/src/util/Sweepers.js index <HASH>..<HASH> 100644 --- a/packages/discord.js/src/util/Sweepers.js +++ b/packages/discord.js/src/util/Sweepers.js @@ -375,11 +375,11 @@ class Sweepers { * Sweep a direct sub property of all guilds * @param {string} key The name of the property * @param {Function} filter Filter function passed to sweep - * @param {SweepEventOptions} [eventOptions] Options for the Client event emitted here + * @param {SweepEventOptions} [eventOptions={}] Options for the Client event emitted here * @returns {Object} Object containing the number of guilds swept and the number of items swept * @private */ - _sweepGuildDirectProp(key, filter, { emit = true, outputName }) { + _sweepGuildDirectProp(key, filter, { emit = true, outputName } = {}) { if (typeof filter !== 'function') { throw new TypeError('INVALID_TYPE', 'filter', 'function'); }
fix(sweepers): provide default for object param (#<I>)
discordjs_discord.js
train
js
5fb547b3a64a6a47527e11c894c0d9b733259aa7
diff --git a/main.js b/main.js index <HASH>..<HASH> 100644 --- a/main.js +++ b/main.js @@ -1454,8 +1454,8 @@ Neo4j.prototype.addNodeId = function(node, callback){ /* Extract the transaction id and adds it as an _id property. */ -Neo4j.prototype.addTransactionId = function(node, callback){ - node._id = this.getId(node.commit, TRANSACTION_LENGTH); +Neo4j.prototype.addTransactionId = function(node, callback){ + node._id = parseInt(node.commit.match(/\/transaction\/([0-9]+)\/commit$/)[1]) delete node.commit; callback(null, node); };
#<I> replacing the transaction id extraction with a regex too
philippkueng_node-neo4j
train
js
b6762bd1bc0881e533ad9fd40a9ff194424f717b
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ MAINTAINER = "Jacob Wasserman" MAINTAINER_EMAIL = "[email protected]" DOWNLOAD_URL = 'http://github.com/jwass/mplleaflet' LICENSE = 'BSD 3-clause' -VERSION = '0.0.3' +VERSION = '0.0.4' setup( name=NAME,
Bump to version <I>
jwass_mplleaflet
train
py
cdf3e8ab92be5b20b16ea84f8b9675eb6d7df45c
diff --git a/formam_test.go b/formam_test.go index <HASH>..<HASH> 100644 --- a/formam_test.go +++ b/formam_test.go @@ -18,7 +18,6 @@ type PtrStruct struct { type Macho string func (s *Macho) UnmarshalText(text []byte) error { - fmt.Println("JAJAJA") *s = "the string has changed by UnmarshalText method" return nil } @@ -78,5 +77,5 @@ func TestDecode(t *testing.T) { if err != nil { t.Error(err) } - fmt.Println("END: ", test) + fmt.Println("result: ", test) }
removed a println in test
monoculum_formam
train
go
d04a2dc2169170a32263b1ad798f2b8d93b622d1
diff --git a/sass/themes/cr/2019/components/membership-signup/js/membership-signup.js b/sass/themes/cr/2019/components/membership-signup/js/membership-signup.js index <HASH>..<HASH> 100644 --- a/sass/themes/cr/2019/components/membership-signup/js/membership-signup.js +++ b/sass/themes/cr/2019/components/membership-signup/js/membership-signup.js @@ -269,7 +269,6 @@ if (url_string.indexOf('?') > -1 ) { url_string = url_string.substring(0, url_string.indexOf('?')); } - /* Redirect user to donation */ redirect(donationLink + "?clientOverride=" + clientId + "&amount=" + amount + "&currency=" + currency + "&givingType=" + givingType + "&cartId=" + cartId + "&affiliate=" + affiliateValue + "&siteurl=" + url_string + '&rowID=' + rowID); }
fix: add params rowID to redirect link
comicrelief_pattern-lab
train
js
039af41af1cc360b47e0e13670565ba83e5871f2
diff --git a/examples/feature-move-animation.js b/examples/feature-move-animation.js index <HASH>..<HASH> 100644 --- a/examples/feature-move-animation.js +++ b/examples/feature-move-animation.js @@ -195,7 +195,7 @@ function stopAnimation(ended) { /** @type {module:ol/geom/Point~Point} */ (geoMarker.getGeometry()) .setCoordinates(coord); //remove listener - map.un('postcompose', moveFeature); + vectorLayer.un('postrender', moveFeature); } startButton.addEventListener('click', startAnimation, false);
Unbind postrender event in feature-move-animation example
openlayers_openlayers
train
js
2e518479ab18a6af2dc703a9833f424a966ae71b
diff --git a/src/main/java/org/jboss/virtual/spi/zip/jzipfile/JZipFileZipEntryProvider.java b/src/main/java/org/jboss/virtual/spi/zip/jzipfile/JZipFileZipEntryProvider.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jboss/virtual/spi/zip/jzipfile/JZipFileZipEntryProvider.java +++ b/src/main/java/org/jboss/virtual/spi/zip/jzipfile/JZipFileZipEntryProvider.java @@ -47,7 +47,8 @@ public class JZipFileZipEntryProvider implements ZipEntryProvider if (is == null) throw new IllegalArgumentException("Null input stream"); - final File tempFile = File.createTempFile("jzfzep", "zip"); + final File tempFile = File.createTempFile("jboss-vfs-jzfzep-", ".zip"); + tempFile.deleteOnExit(); final FileOutputStream os = new FileOutputStream(tempFile); VFSUtils.copyStreamAndClose(is, os);
Prettier temp file name; delete on exit
jbossas_jboss-vfs
train
java
08381058e3aebd8589707b396eeca6eb2312ed84
diff --git a/tests/cases/payIns.php b/tests/cases/payIns.php index <HASH>..<HASH> 100644 --- a/tests/cases/payIns.php +++ b/tests/cases/payIns.php @@ -129,7 +129,7 @@ class PayIns extends Base { function test_PayIns_BankWireDirect_Create() { $wallet = $this->getJohnsWallet(); $user = $this->getJohn(); - // create pay-in PRE-AUTHORIZED DIRECT + // create pay-in BANKWIRE DIRECT $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $user->Id; @@ -166,7 +166,7 @@ class PayIns extends Base { function test_PayIns_BankWireDirect_Get() { $wallet = $this->getJohnsWallet(); $user = $this->getJohn(); - // create pay-in PRE-AUTHORIZED DIRECT + // create pay-in BANKWIRE DIRECT $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $user->Id; @@ -202,7 +202,7 @@ class PayIns extends Base { function test_PayIns_DirectDebitWeb_Create() { $wallet = $this->getJohnsWallet(); $user = $this->getJohn(); - // create pay-in PRE-AUTHORIZED DIRECT + // create pay-in DIRECT DEBIT WEB $payIn = new \MangoPay\PayIn(); $payIn->CreditedWalletId = $wallet->Id; $payIn->AuthorId = $user->Id;
Correct comments typos following #<I>
Mangopay_mangopay2-php-sdk
train
php
880ca4c138b1c6c7424697ec51ba9565d4e0e0e0
diff --git a/packages/core/parcel-bundler/src/Logger.js b/packages/core/parcel-bundler/src/Logger.js index <HASH>..<HASH> 100644 --- a/packages/core/parcel-bundler/src/Logger.js +++ b/packages/core/parcel-bundler/src/Logger.js @@ -127,7 +127,7 @@ class Logger { this.spinner = ora({ text: styledMessage, stream: process.stdout, - enabled: !this.isTest + enabled: this.isTest ? false : undefined // fall back to ora default unless we need to explicitly disable it. }).start(); } else { this.spinner.text = styledMessage;
Fix ora spinner in CI environments Fixes #<I>
parcel-bundler_parcel
train
js
31691a67e10ad355717efc7dcd592f43b1b2722d
diff --git a/giraffez/io.py b/giraffez/io.py index <HASH>..<HASH> 100644 --- a/giraffez/io.py +++ b/giraffez/io.py @@ -82,8 +82,8 @@ class BaseReader(object): return next(self.fd) @classmethod - def read_all(cls, path): - with cls(path, "rb") as f: + def read_all(cls, path, mode='rt'): + with cls(path, mode) as f: return f.read() @classmethod
Possible fix to issue referenced in PR #<I>
capitalone_giraffez
train
py
c4f7cb6182835ea9baf633afdecf4e946cdd5504
diff --git a/test_elasticsearch/test_server/test_common.py b/test_elasticsearch/test_server/test_common.py index <HASH>..<HASH> 100644 --- a/test_elasticsearch/test_server/test_common.py +++ b/test_elasticsearch/test_server/test_common.py @@ -172,7 +172,8 @@ class YamlTestCase(ElasticTestCase): value = self._lookup(path) expected = self._resolve(expected) - if expected.startswith('/') and expected.endswith('/'): + if isinstance(expected, (type(''), type(u''))) and \ + expected.startswith('/') and expected.endswith('/'): expected = re.compile(expected[1:-1], re.VERBOSE) self.assertTrue(expected.search(value)) else:
only look for regexes in strings
elastic_elasticsearch-py
train
py
3e09e60fb137dca28edcd085269aa45d8a91db78
diff --git a/src/pyctools/tools/editor.py b/src/pyctools/tools/editor.py index <HASH>..<HASH> 100644 --- a/src/pyctools/tools/editor.py +++ b/src/pyctools/tools/editor.py @@ -604,9 +604,9 @@ class CompoundIcon(BasicComponentIcon): def position_component(self, component_name, pos, dx, dy): if component_name == 'self': return - if component_name in self.positioning: + if self.recurse_depth[component_name] > 2: return - self.positioning.append(component_name) + self.recurse_depth[component_name] += 1 # find "ideal" position based on components connected to inputs new_pos = None in_no = 0 @@ -659,7 +659,7 @@ class CompoundIcon(BasicComponentIcon): while new_pos in pos.values(): new_pos[1] += dy pos[component_name] = new_pos - self.positioning.remove(component_name) + self.recurse_depth[component_name] -= 1 def draw_icon(self): # delete previous version @@ -679,7 +679,7 @@ class CompoundIcon(BasicComponentIcon): child_comps[name] = child # position components according to linkages pos = {} - self.positioning = [] + self.recurse_depth = defaultdict(int) while len(pos) < len(child_comps): for name in child_comps: if name not in pos:
Allow deeper recursion in compound positioning
jim-easterbrook_pyctools
train
py
7fcdfe606124977ab9fe507dffe6df8d0fcf6665
diff --git a/sparkle.js b/sparkle.js index <HASH>..<HASH> 100755 --- a/sparkle.js +++ b/sparkle.js @@ -1170,10 +1170,9 @@ bot.on('newsong', function (data) { //Reset bonus points bonusvote = false; + bonuspoints = new Array(); if (config.voteBonus) { bonusvotepoints = getVoteTarget(); - } else { - bonuspoints = new Array(); }
Fixed bonuspoints not resetting
sharedferret_Sparkle-Turntable-Bot
train
js
13cfc2d2a0324e528ba4150b471454526a6d9446
diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index <HASH>..<HASH> 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -836,6 +836,7 @@ describe('browser-window module', function () { w.webContents.on('devtools-opened', function () { var inputEventIntervalId = setInterval(function () { if (w && w.devToolsWebContents) { + // Switch panels until the custom one is selected and loads w.devToolsWebContents.sendInputEvent({ type: 'keyDown', keyCode:'[',
Add comment about panel switching via input event
electron_electron
train
js
77ae0c4b8105b1afd4333384c0b1e5a28bf6af3d
diff --git a/client/_on-save.js b/client/_on-save.js index <HASH>..<HASH> 100644 --- a/client/_on-save.js +++ b/client/_on-save.js @@ -12,7 +12,7 @@ module.exports = async function(error, text) { _value, _filename, _title, - } = this; + } = edward; let msg = 'Try again?'; if (error) { diff --git a/server/edit.js b/server/edit.js index <HASH>..<HASH> 100644 --- a/server/edit.js +++ b/server/edit.js @@ -32,6 +32,6 @@ async function readEdit() { if (error.code !== 'ENOENT') throw Error(`edward --config ${homePath}: ${error.message}`); - return data; + return Edit; }
fix(server) edit: data -> Edit
cloudcmd_edward
train
js,js
6d469b32e06ed9f83b42b9499fdc56cbfb4fc8b1
diff --git a/src/endpoint-generator.js b/src/endpoint-generator.js index <HASH>..<HASH> 100644 --- a/src/endpoint-generator.js +++ b/src/endpoint-generator.js @@ -39,7 +39,7 @@ function chain(base, children) { return result; } - let executionPromise = new Promise((resolve) => { + const executionPromise = new Promise((resolve) => { function checkLoaded() { if (isLoaded) { return resolve(baseResult(...baseArguments));
Changed to use const since not overwritten
CalebMorris_function-chainer
train
js
2a04986f9d0cb22e0f4df8670fbc92013a906d1b
diff --git a/eZ/Publish/Core/Persistence/Legacy/Content/UrlWildcard/Gateway/EzcDatabase.php b/eZ/Publish/Core/Persistence/Legacy/Content/UrlWildcard/Gateway/EzcDatabase.php index <HASH>..<HASH> 100644 --- a/eZ/Publish/Core/Persistence/Legacy/Content/UrlWildcard/Gateway/EzcDatabase.php +++ b/eZ/Publish/Core/Persistence/Legacy/Content/UrlWildcard/Gateway/EzcDatabase.php @@ -132,11 +132,7 @@ class EzcDatabase extends Gateway "*" )->from( $this->dbHandler->quoteTable( "ezurlwildcard" ) - ); - if ( $limit !== -1 ) - { - $q->limit( $limit, $offset ); - } + )->limit( $limit, $offset ); $stmt = $q->prepare(); $stmt->execute();
Fixed: Wrong usage of offset and limit in URL wildcard gateway
ezsystems_ezpublish-kernel
train
php
3257f37fab3910144005aecc9e0c1526369495fe
diff --git a/queue/kubernetes/kubernetes.go b/queue/kubernetes/kubernetes.go index <HASH>..<HASH> 100644 --- a/queue/kubernetes/kubernetes.go +++ b/queue/kubernetes/kubernetes.go @@ -116,13 +116,15 @@ func (k8s *Kubernetes) Add(qorJob worker.QorJobInterface) error { k8sJob.Spec.Template.Spec.RestartPolicy = "Never" } - for _, container := range k8sJob.Spec.Template.Spec.Containers { + for idx, container := range k8sJob.Spec.Template.Spec.Containers { if len(container.Command) == 0 || k8s.Config.JobTemplate == "" { container.Command = []string{binaryFile, "--qor-job", qorJob.GetJobID()} } if container.WorkingDir == "" || k8s.Config.JobTemplate == "" { container.WorkingDir = currentPath } + + k8sJob.Spec.Template.Spec.Containers[idx] = container } _, err = k8s.Clientset.Batch().Jobs(k8s.Config.Namespace).Create(k8sJob)
Finish k8s worker backend
qor_worker
train
go
5e048fc11cef8449433c2233422ca2bbfa001f0b
diff --git a/docs/source/conf.py b/docs/source/conf.py index <HASH>..<HASH> 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -58,9 +58,9 @@ copyright = u'2014, The Python-GSSAPI team' # built documents. # # The short X.Y version. -version = '1.2.4' +version = '1.3.0' # The full version, including alpha/beta/rc tags. -release = '1.2.4' +release = '1.3.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -221,7 +221,7 @@ if sys.version_info < (3, 4): setup( name='gssapi', - version='1.2.4', + version='1.3.0', author='The Python GSSAPI Team', author_email='[email protected]', packages=['gssapi', 'gssapi.raw', 'gssapi.raw._enum_extensions',
Prepare for release <I> This is the same as <I>, which was release erroneously as a bugfix release, when it should have been a backwards-compatible feature release.
pythongssapi_python-gssapi
train
py,py
fce72e26a996b4e247b6e51331d4cbfea64fb91c
diff --git a/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js b/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js index <HASH>..<HASH> 100644 --- a/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js +++ b/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js @@ -709,7 +709,7 @@ function( })); } else if (attr.namespaceURI === "http://schemas.sap.com/sapui5/extension/sap.ui.core.support.Support.info/1") { sSupportData = sValue; - } else if (attr.namespaceURI.indexOf("http://schemas.sap.com/sapui5/preprocessorextension/") === 0) { + } else if (attr.namespaceURI && attr.namespaceURI.indexOf("http://schemas.sap.com/sapui5/preprocessorextension/") === 0) { Log.debug(oView + ": XMLView parser ignored preprocessor attribute '" + sName + "' (value: '" + sValue + "')"); } else if (sName.indexOf("xmlns:") !== 0 ) { // other, unknown namespace and not an xml namespace alias definition if (!mCustomSettings) {
[INTERNAL] Fix for preprocessorextension Improves: <I>fc6bc<I>b6e<I>d<I> (aka I<I>e9f<I>cc3d<I>e8d6bd8ce<I>d<I>e6) to fix incident BCP: <I> Change-Id: Id2e<I>e<I>f0fa<I>f<I>f8d2bd6bd3d<I>
SAP_openui5
train
js
363beb83c056589cc5576bb9876461166bfc3639
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -152,6 +152,13 @@ module.exports.loadRestifyRoutes = function () { description: value.description || undefined }; + if (value.type === 'array') { + myProperty.type = 'array'; + myProperty.items = { + '$ref': swaggerType + } + } + if (_.isArray(value.isIn)) { myProperty.allowableValues = { 'valueType': 'LIST',
Add support for array data type to allow passing array of models
z0mt3c_node-restify-swagger
train
js
5789bc988011745fe0db9726fc806e37db0096da
diff --git a/run.go b/run.go index <HASH>..<HASH> 100644 --- a/run.go +++ b/run.go @@ -250,6 +250,8 @@ func actionRun(cc *cli.Context) error { break } + log.Infof("Starting test - Web UI available at: http://%s/", addr) + // Start the test with the desired state log.WithField("vus", vus).Debug("Starting test...") status := lib.Status{ @@ -275,7 +277,10 @@ func actionRun(cc *cli.Context) error { if quit { log.Debug("Quit requested, terminating...") srvCancel() + return } + + log.Info("Test finished, press Ctrl+C to exit") }() }
[feat] Info messages at start + end of tests
loadimpact_k6
train
go
d31e1da2689e0ff11e9a7e1dcb28ffd5c0d8ecd1
diff --git a/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/deploy/cache/CaseDefinitionCache.java b/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/deploy/cache/CaseDefinitionCache.java index <HASH>..<HASH> 100644 --- a/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/deploy/cache/CaseDefinitionCache.java +++ b/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/deploy/cache/CaseDefinitionCache.java @@ -71,9 +71,7 @@ public class CaseDefinitionCache extends ResourceDefinitionCache<CaseDefinitionE @Override protected void checkInvalidDefinitionByKeyVersionTagAndTenantId(String definitionKey, String definitionVersionTag, String tenantId, CaseDefinitionEntity definition) { - ensureNotNull(CaseDefinitionNotFoundException.class, "no case definition deployed with key = '" + definitionKey + "', versionTag = '" + definitionVersionTag + "'" - + " and tenant-id = '" + tenantId + "'", "caseDefinition", definition); - } + throw new UnsupportedOperationException("Version tag is not implemented in case definition."); } @Override protected void checkInvalidDefinitionByDeploymentAndKey(String deploymentId, String definitionKey, CaseDefinitionEntity definition) {
chore(engine): fix unsupported method versionTag is not supported in case Related to CAM-<I>
camunda_camunda-bpm-platform
train
java
ccfd98862210684f99eaa709a98e01ff24db3c11
diff --git a/test/api.js b/test/api.js index <HASH>..<HASH> 100644 --- a/test/api.js +++ b/test/api.js @@ -57,10 +57,7 @@ const setUp = function() { const get = function (suffix, post) { const method = post ? superagent.post : superagent.get; return new Promise(function (resolve, reject) { - method(ENDPOINT + suffix, { - timeout: TIMEOUT, - encoding: null - }, function (error, response, body) { + method(ENDPOINT + suffix, function (error, response, body) { if (error) { if (error.response && error.response.error && error.response.error.text) reject(new Error(error.response.error.text)); @@ -73,6 +70,10 @@ const get = function (suffix, post) { resolve(response.res.text); else resolve(body); + }) + .set({ + timeout: TIMEOUT, + encoding: null }); }); };
Adapt API tests to changes in package "superagent"
w3c_specberus
train
js
6f1811ee4dddf995831cda4607d1c08318e519c9
diff --git a/config-migrate.go b/config-migrate.go index <HASH>..<HASH> 100644 --- a/config-migrate.go +++ b/config-migrate.go @@ -73,6 +73,10 @@ func migrateV2ToV3() { SecretAccessKey: cv2.Credentials.SecretAccessKey, } srvConfig.Region = cv2.Credentials.Region + if srvConfig.Region == "" { + // Region needs to be set for AWS Signature V4. + srvConfig.Region = "us-east-1" + } srvConfig.Logger.Console = consoleLogger{ Enable: true, Level: "fatal", @@ -124,6 +128,10 @@ func migrateV3ToV4() { srvConfig.Version = globalMinioConfigVersion srvConfig.Credential = cv3.Credential srvConfig.Region = cv3.Region + if srvConfig.Region == "" { + // Region needs to be set for AWS Signature Version 4. + srvConfig.Region = "us-east-1" + } srvConfig.Logger.Console = cv3.Logger.Console srvConfig.Logger.File = cv3.Logger.File srvConfig.Logger.Syslog = cv3.Logger.Syslog
config: Migration should save region properly. (#<I>) Fixes #<I>
minio_minio
train
go
c5b26305f09be0a63747e6d8d000e754a157d134
diff --git a/optalg/opt_solver/iqp.py b/optalg/opt_solver/iqp.py index <HASH>..<HASH> 100644 --- a/optalg/opt_solver/iqp.py +++ b/optalg/opt_solver/iqp.py @@ -18,12 +18,13 @@ class OptSolverIQP(OptSolver): """ # Solver parameters - parameters = {'tol': 1e-4, # optimality tolerance - 'maxiter': 1000, # max iterations - 'sigma': 0.1, # factor for increasing subproblem solution accuracy - 'eps': 1e-3, # boundary proximity factor - 'eps_cold': 1e-2, # boundary proximity factor (cold start) - 'quiet': False} # quiet flag + parameters = {'tol': 1e-4, # optimality tolerance + 'maxiter': 1000, # max iterations + 'sigma': 0.1, # factor for increasing subproblem solution accuracy + 'eps': 1e-3, # boundary proximity factor + 'eps_cold': 1e-2, # boundary proximity factor (cold start) + 'linsolver': 'default', # linear solver + 'quiet': False} # quiet flag def __init__(self): """ @@ -107,7 +108,7 @@ class OptSolverIQP(OptSolver): eps_cold = parameters['eps_cold'] # Linsolver - self.linsolver = new_linsolver('default','symmetric') + self.linsolver = new_linsolver(parameters['linsolver'],'symmetric') # Problem self.problem = problem
added iqp linsolver param
ttinoco_OPTALG
train
py
c4d697b6b3d72184b56629609b01e1c034c79417
diff --git a/src/pyscipopt/__init__.py b/src/pyscipopt/__init__.py index <HASH>..<HASH> 100644 --- a/src/pyscipopt/__init__.py +++ b/src/pyscipopt/__init__.py @@ -1,4 +1,4 @@ -__version__ = '3.1.0' +__version__ = '3.1.1' # required for Python 3.8 on Windows import os
Update __init__.py increased version to <I>
SCIP-Interfaces_PySCIPOpt
train
py