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
0db42522a5115836a440743f7670d9689463fc9a
diff --git a/test/instrumentation/modules/mysql/mysql.js b/test/instrumentation/modules/mysql/mysql.js index <HASH>..<HASH> 100644 --- a/test/instrumentation/modules/mysql/mysql.js +++ b/test/instrumentation/modules/mysql/mysql.js @@ -124,7 +124,7 @@ factories.forEach(function (f) { setTimeout(function () { trans.end() agent.flush() - }, 150) + }, 250) }) }) })
test: reduce likelihood of flaky mysql test failing (#<I>) Once in blue moon this test fails - yolo
elastic_apm-agent-nodejs
train
js
253e20d91001ce11ed734b891072aff590297e6c
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -22,8 +22,8 @@ setup( 'neuropythy.registration', 'neuropythy.commands'], package_data={'': ['LICENSE.txt', - 'lib/nben/target/nben-standalone.jar', - 'lib/models/standard.ffm.gz']}, + 'neuropythy/lib/nben/target/nben-standalone.jar', + 'neuropythy/lib/models/standard.ffm.gz']}, install_requires=['numpy>=1.2', 'scipy>=0.7', 'nibabel>=2.0',
package_data reflects new location of data files
noahbenson_neuropythy
train
py
62368c59386149a3dbdf8ebaa80d3901c8670e90
diff --git a/src/Model/Table/DashboardsTable.php b/src/Model/Table/DashboardsTable.php index <HASH>..<HASH> 100644 --- a/src/Model/Table/DashboardsTable.php +++ b/src/Model/Table/DashboardsTable.php @@ -107,6 +107,10 @@ class DashboardsTable extends Table return $q->where(['Users.Id' => $user['id']]); })->all()->toArray(); + if (count($groups) === 0) { + return $query->where('Dashboards.group_id IS NULL'); + } + // get group(s) dashboards $query->where(['OR' => [ ['Dashboards.group_id IN' => array_keys($groups)],
Fixed dashboards for users without a group (task #<I>)
QoboLtd_cakephp-search
train
php
a0caeb95d6adf855af2f3e8377e078805601ac6b
diff --git a/prom/__init__.py b/prom/__init__.py index <HASH>..<HASH> 100644 --- a/prom/__init__.py +++ b/prom/__init__.py @@ -8,7 +8,7 @@ from .config import DsnConnection, Schema from .query import Query from . import decorators -__version__ = '0.7.6' +__version__ = '0.7.7' interfaces = {} """holds all the configured interfaces""" @@ -175,6 +175,24 @@ class Orm(object): for field_name, field_val in fields.iteritems(): setattr(self, field_name, field_val) + @classmethod + def normalize(cls, d): + """ + return only fields in d that are also in schema + + you can override this method to do some sanity checking of the fields + + d -- dict -- a dict of field/values + return -- dict -- the field/values that are in cls.schema + """ + rd = {} + s = cls.schema + for field_name, field_val in d.iteritems(): + if field_name in s.fields: + rd[field_name] = field_val + + return rd + def __setattr__(self, field_name, field_val): s = self.schema if field_name in s.fields:
adds Orm.normalize() class method that will strip out non schema fields from a d
Jaymon_prom
train
py
bad56f1929c1dc7ba811f5b0d0b65292c69de7af
diff --git a/source/php/Module/Posts/views/expandable-list.blade.php b/source/php/Module/Posts/views/expandable-list.blade.php index <HASH>..<HASH> 100644 --- a/source/php/Module/Posts/views/expandable-list.blade.php +++ b/source/php/Module/Posts/views/expandable-list.blade.php @@ -62,6 +62,8 @@ @if(count($prepareAccordion) > 0) @accordion([ + 'beforeContent' => '', + 'afterContent' => '', 'list'=> $prepareAccordion ]) @endaccordion
Fix: Do not wrap content with a p-tag in accordion
helsingborg-stad_Modularity
train
php
ea6e3ac8bd2f3fc3cae3f3cdb919ba696d624854
diff --git a/lib/feed2email/cli.rb b/lib/feed2email/cli.rb index <HASH>..<HASH> 100644 --- a/lib/feed2email/cli.rb +++ b/lib/feed2email/cli.rb @@ -1,11 +1,19 @@ require 'thor' require 'feed2email' require 'feed2email/feed_autodiscoverer' +require 'feed2email/redirection_checker' module Feed2Email class Cli < Thor desc 'add URL', 'subscribe to feed at URL' def add(uri) + checker = RedirectionChecker.new(uri) + + if checker.permanently_redirected? + uri = checker.location + puts "Got permanently redirected to #{checker.location}" + end + uri = perform_feed_autodiscovery(uri) begin
Handle permanent redirection in "add" command
agorf_feed2email
train
rb
f8b1f213035a42cc25543a87604e9b39ee8e8f08
diff --git a/metrics-core/src/main/java/com/codahale/metrics/ScheduledReporter.java b/metrics-core/src/main/java/com/codahale/metrics/ScheduledReporter.java index <HASH>..<HASH> 100644 --- a/metrics-core/src/main/java/com/codahale/metrics/ScheduledReporter.java +++ b/metrics-core/src/main/java/com/codahale/metrics/ScheduledReporter.java @@ -44,6 +44,8 @@ public abstract class ScheduledReporter implements Closeable { } } + private static final AtomicInteger FACTORY_ID = new AtomicInteger(); + private final MetricRegistry registry; private final ScheduledExecutorService executor; private final MetricFilter filter; @@ -67,7 +69,7 @@ public abstract class ScheduledReporter implements Closeable { TimeUnit durationUnit) { this.registry = registry; this.filter = filter; - this.executor = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory(name)); + this.executor = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory(name + '-' + FACTORY_ID.incrementAndGet())); this.rateFactor = rateUnit.toSeconds(1); this.rateUnit = calculateRateUnit(rateUnit); this.durationFactor = 1.0 / durationUnit.toNanos(1);
Ensure ScheduledReporters get unique thread pools. Fixes #<I>. Closes #<I>.
dropwizard_metrics
train
java
d31a5b360179f91f4f4f20255b2659c5a7038c28
diff --git a/repo/fsrepo/migrations/migrations.go b/repo/fsrepo/migrations/migrations.go index <HASH>..<HASH> 100644 --- a/repo/fsrepo/migrations/migrations.go +++ b/repo/fsrepo/migrations/migrations.go @@ -15,7 +15,7 @@ import ( "strings" ) -var DistPath = "https://ipfs.io/ipfs/QmUgfXycSjF9R8F4Tyauaz6LZ4bj5nbksg54G9GdF4fit6" +var DistPath = "https://ipfs.io/ipfs/QmXuKUDChMXkcq36CbaggvY3UaAtgpi7yyoAiNy5VD9Dfr" func init() { if dist := os.Getenv("IPFS_DIST_PATH"); dist != "" {
fix: update dists url for OpenBSD support
ipfs_go-ipfs
train
go
df2951659af829539a2cb726f3f5f9139d09d9b8
diff --git a/src/Provider/DiscoverProvider.php b/src/Provider/DiscoverProvider.php index <HASH>..<HASH> 100644 --- a/src/Provider/DiscoverProvider.php +++ b/src/Provider/DiscoverProvider.php @@ -74,7 +74,19 @@ class DiscoverProvider implements ProviderInterface $request = new Psr7\Request('get', $url); $response = $this->client->send($request); - $links = self::responseBodyOEmbedLinks($response, self::LINK_ANY_XPATH); + $xpath = self::LINK_ANY_XPATH; + if (isset($params['format'])) { + switch ($params['format']) { + case 'json': + $xpath = self::LINK_JSON_XPATH; + break; + case 'xml': + $xpath = self::LINK_XML_XPATH; + break; + } + + } + $links = self::responseBodyOEmbedLinks($response, $xpath); if (!empty($links) && isset($params['format'])) { $links = array_filter($links, function ($link) use ($params) {
use all the XPATH expressions.
bangpound_oEmbed
train
php
7624da263f3bd16dee6a3717578fc456cdab12f8
diff --git a/cnxarchive/tests/test_views.py b/cnxarchive/tests/test_views.py index <HASH>..<HASH> 100644 --- a/cnxarchive/tests/test_views.py +++ b/cnxarchive/tests/test_views.py @@ -1060,7 +1060,7 @@ class ViewsTestCase(unittest.TestCase): 'includes learning objectives, concept questions, links to labs ' 'and simulations, and ample practice opportunities to solve ' 'traditional') - self.assertEqual(results['results']['items'][1]['summarySnippet'], + self.assertEqual(results['results']['items'][2]['summarySnippet'], ' This introductory, algebra-based, two-semester college physics ' 'book is grounded with real-world examples, illustrations, and ' 'explanations to help students grasp key, fundamental physics ' @@ -1068,7 +1068,7 @@ class ViewsTestCase(unittest.TestCase): 'includes learning objectives, concept questions, links to labs ' 'and simulations, and ample practice opportunities to solve ' 'traditional') - self.assertEqual(results['results']['items'][2]['summarySnippet'], None) + self.assertEqual(results['results']['items'][1]['summarySnippet'], None) def test_search_no_params(self): environ = self._make_environ()
Fix existing test to adjust for new null parentage weight boost.
openstax_cnx-archive
train
py
65967cfa96cd7a0e0ad248e5235bcd4a1bbcdb67
diff --git a/libbmc/citations/pdf.py b/libbmc/citations/pdf.py index <HASH>..<HASH> 100644 --- a/libbmc/citations/pdf.py +++ b/libbmc/citations/pdf.py @@ -86,14 +86,21 @@ def pdfextract(pdf_file): ``gem install pdf-extract``, provided that you have a correct \ Ruby install on your system. + .. note:: + + ``pdfextract`` is full a bugs and as the time of writing this, \ + you had to manually ``gem install pdf-reader -v 1.2.0`` \ + before installing ``pdfextract`` or you would get errors. See \ + `this Github issue <https://github.com/CrossRef/pdfextract/issues/23>`_. + :param pdf_file: Path to the PDF file to handle. :returns: Raw output from ``pdfextract`` or ``None`` if an error \ occurred. No post-processing is done. See \ ``libbmc.citations.pdf.pdfextract_dois`` for a similar function \ with post-processing to return DOIs. """ - # Run pdf-extract try: + # Run pdf-extract references = subprocess.check_output(["pdf-extract", "extract", "--references", pdf_file])
Add a statement about common issues with pdfextract
Phyks_libbmc
train
py
8470491b5fa0d366e53775ed720163f5ea530548
diff --git a/src/AnalyticsServiceProvider.php b/src/AnalyticsServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/AnalyticsServiceProvider.php +++ b/src/AnalyticsServiceProvider.php @@ -24,13 +24,16 @@ class AnalyticsServiceProvider extends ServiceProvider { $this->mergeConfigFrom(__DIR__.'/../config/analytics.php', 'analytics'); - $analyticsConfig = config('analytics'); - $this->app->bind(AnalyticsClient::class, function () use ($analyticsConfig) { + $this->app->bind(AnalyticsClient::class, function () { + $analyticsConfig = config('analytics'); + return AnalyticsClientFactory::createForConfig($analyticsConfig); }); - $this->app->bind(Analytics::class, function () use ($analyticsConfig) { + $this->app->bind(Analytics::class, function () { + $analyticsConfig = config('analytics'); + $this->guardAgainstInvalidConfiguration($analyticsConfig); $client = app(AnalyticsClient::class);
Fixes #<I> - Moved the config call inside the binding closure to make sure it uses a fresh up to date config at time of instantiation (#<I>)
spatie_laravel-analytics
train
php
248e875d30afc5d13e6566a9834495ddf378f163
diff --git a/core/pax-exam/src/main/java/org/ops4j/pax/exam/MavenUtils.java b/core/pax-exam/src/main/java/org/ops4j/pax/exam/MavenUtils.java index <HASH>..<HASH> 100644 --- a/core/pax-exam/src/main/java/org/ops4j/pax/exam/MavenUtils.java +++ b/core/pax-exam/src/main/java/org/ops4j/pax/exam/MavenUtils.java @@ -75,10 +75,8 @@ public class MavenUtils } catch( IOException e ) { - // TODO throw a better exception throw new RuntimeException( - "Could not resolve version. Did you configured the plugin in your maven project?" - + "Or maybe you did not run the maven build and you are using an IDE?" + "Could not resolve version for groupId:" + groupId + " artifactId:" + artifactId + " by reading the dependency information generated by maven.", e ); } }
[PAXEXAM-<I>] Improve exception
ops4j_org.ops4j.pax.exam2
train
java
dc54275b23ab0c40a0a2217452ef8782158cbc56
diff --git a/lib/ronin/ui/cli/command.rb b/lib/ronin/ui/cli/command.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/ui/cli/command.rb +++ b/lib/ronin/ui/cli/command.rb @@ -193,7 +193,15 @@ module Ronin # set additional arguments self.class.each_argument do |name| - set_param(name,arguments.shift) + param = get_param(name) + + if (param.type <= Parameters::Types::Array) || + (param.type <= Parameters::Types::Set) + # allow Array/Set arguments to collect all remaining args + param.value = arguments.shift(arguments.length) + else + param.value = arguments.shift + end end run
Allow Array/Set arguments to capture all remaining args.
ronin-ruby_ronin
train
rb
3f3dd5940b06a5b9997826f94b21a92c51adf2ee
diff --git a/lib/core/seleniumRunner.js b/lib/core/seleniumRunner.js index <HASH>..<HASH> 100644 --- a/lib/core/seleniumRunner.js +++ b/lib/core/seleniumRunner.js @@ -231,6 +231,9 @@ class SeleniumRunner { // and make sure your page complete check take care of other things if (this.options.spa) { break; + } else if (url === startURI) { + // You are navigating to the current page + break; } else if (newURI !== startURI) { // We navigated to a new page, we don't need to test anymore break;
Don't add any extra wait if you are navigating to the same URL. (#<I>)
sitespeedio_browsertime
train
js
a49a0f37aaa35ee00b06319917b08e37def61325
diff --git a/annoying/fields.py b/annoying/fields.py index <HASH>..<HASH> 100644 --- a/annoying/fields.py +++ b/annoying/fields.py @@ -25,17 +25,25 @@ except: class AutoSingleRelatedObjectDescriptor(SingleRelatedObjectDescriptor): + """ + The descriptor that handles the object creation for an AutoOneToOneField. + """ def __get__(self, instance, instance_type=None): + model = getattr(self.related, 'related_model', self.related.model) + try: - return super(AutoSingleRelatedObjectDescriptor, self).__get__(instance, instance_type) - except self.related.model.DoesNotExist: - obj = self.related.model(**{self.related.field.name: instance}) + return (super(AutoSingleRelatedObjectDescriptor, self) + .__get__(instance, instance_type)) + except model.DoesNotExist: + obj = model(**{self.related.field.name: instance}) + obj.save() + # Don't return obj directly, otherwise it won't be added # to Django's cache, and the first 2 calls to obj.relobj # will return 2 different in-memory objects - return super(AutoSingleRelatedObjectDescriptor, self).__get__(instance, instance_type) - + return (super(AutoSingleRelatedObjectDescriptor, self) + .__get__(instance, instance_type)) class AutoOneToOneField(OneToOneField): '''
An AutoOneToOneField that works with Django <I> fixes #<I>
skorokithakis_django-annoying
train
py
d490ee96d072d4454ff3c0d9e40208b6f76b484e
diff --git a/src/raven.js b/src/raven.js index <HASH>..<HASH> 100644 --- a/src/raven.js +++ b/src/raven.js @@ -32,6 +32,9 @@ TK.remoteFetching = false; var Raven = { VERSION: '<%= pkg.version %>', + // Expose TraceKit to the Raven namespace + TraceKit: TK, + /* * Allow Raven to be configured as soon as it is loaded * It uses a global RavenConfig = {dsn: '...', config: {}}
Expose TraceKit from Raven.TraceKit
getsentry_sentry-javascript
train
js
a18c8bf1c06826c5575d3ee550df49e38d32a599
diff --git a/src/mol.js b/src/mol.js index <HASH>..<HASH> 100644 --- a/src/mol.js +++ b/src/mol.js @@ -283,6 +283,16 @@ MolBase.prototype._residuePredicates = function(dict) { return false; }); } + if (dict.rnums !== undefined) { + var num_set = {}; + for (var i = 0; i < dict.rnums.length; ++i) { + num_set[dict.rnums[i]] = true; + } + predicates.push(function(r) { + var n = r.num(); + return num_set[n] === true; + }); + } return predicates; };
add rnums to selection language
biasmv_pv
train
js
61e17783eedc7a8813017fddf3f4d903c4aafb1c
diff --git a/rawdisk/filesystems/ntfs/mft_attribute.py b/rawdisk/filesystems/ntfs/mft_attribute.py index <HASH>..<HASH> 100644 --- a/rawdisk/filesystems/ntfs/mft_attribute.py +++ b/rawdisk/filesystems/ntfs/mft_attribute.py @@ -111,6 +111,22 @@ class MftAttrStandardInformation(MftAttr): self.quata = self.get_ulonglong(offset + 0x38) self.usn = self.get_ulonglong(offset + 0x40) + @property + def ctime_dt(self): + return filetime_to_dt(self.ctime) + + @property + def atime_dt(self): + return filetime_to_dt(self.atime) + + @property + def mtime_dt(self): + return filetime_to_dt(self.mtime) + + @property + def rtime_dt(self): + return filetime_to_dt(self.rtime) + class MftAttrAttributeList(MftAttr): def __init__(self, data):
Added python datetime properties to SI attribute
dariusbakunas_rawdisk
train
py
ddc733e59fea9f3fc8efb43bac66b483d97583c1
diff --git a/openupgradelib/openupgrade.py b/openupgradelib/openupgrade.py index <HASH>..<HASH> 100644 --- a/openupgradelib/openupgrade.py +++ b/openupgradelib/openupgrade.py @@ -804,7 +804,7 @@ def m2o_to_x2m(cr, model, table, field, source_field): .. versionadded:: 8.0 """ - columns = getattr(model, '_columns', getattr(model, '_fields')) + columns = getattr(model, '_columns', False) or getattr(model, '_fields') if not columns.get(field): do_raise("m2o_to_x2m: field %s doesn't exist in model %s" % ( field, model._name))
[FIX] support versions without _fields
OCA_openupgradelib
train
py
183a05d34619d987025edf7bc1d0e6819fa205dc
diff --git a/Kwf/Controller/Action/User/UsersController.php b/Kwf/Controller/Action/User/UsersController.php index <HASH>..<HASH> 100644 --- a/Kwf/Controller/Action/User/UsersController.php +++ b/Kwf/Controller/Action/User/UsersController.php @@ -140,7 +140,7 @@ class Kwf_Controller_Action_User_UsersController extends Kwf_Controller_Action_A } $kwfRow = $row->getModel()->getKwfUserRowById($row->id); - $this->view->url = '/kwf/user/login/activate?code='.$kwfRow->id.'-'.$kwfRow->generateActivationToken(Kwf_User_Auth_Interface_Activation::TYPE_ACTIVATE); + $this->view->url = Kwf_Setup::getBaseUrl().'/kwf/user/login/activate?code='.$kwfRow->id.'-'.$kwfRow->generateActivationToken(Kwf_User_Auth_Interface_Activation::TYPE_ACTIVATE); } protected function _getSelect()
User Admin: add baseUrl to generated activation url
koala-framework_koala-framework
train
php
dc771a15de656643f8fe3e886ec1287f3b9fe2b2
diff --git a/lib/imageruby/pureruby.rb b/lib/imageruby/pureruby.rb index <HASH>..<HASH> 100644 --- a/lib/imageruby/pureruby.rb +++ b/lib/imageruby/pureruby.rb @@ -159,17 +159,17 @@ public if alpha < 255 if alpha > 0 dest_pixel_data[destpointer] = - ( orig_pixel_data[origpointer]*(alpha+1) + dest_pixel_data[destpointer]*(255-alpha) ) / 256 + ( orig_pixel_data[origpointer]*(alpha) + dest_pixel_data[destpointer]*(255-alpha) ) / 255 origpointer = origpointer + 1 destpointer = destpointer + 1 dest_pixel_data[destpointer] = - ( orig_pixel_data[origpointer]*(alpha+1) + dest_pixel_data[destpointer]*(255-alpha) ) / 256 + ( orig_pixel_data[origpointer]*(alpha) + dest_pixel_data[destpointer]*(255-alpha) ) / 255 origpointer = origpointer + 1 destpointer = destpointer + 1 dest_pixel_data[destpointer] = - ( orig_pixel_data[origpointer]*(alpha+1) + dest_pixel_data[destpointer]*(255-alpha) ) / 256 + ( orig_pixel_data[origpointer]*(alpha) + dest_pixel_data[destpointer]*(255-alpha) ) / 255 origpointer = origpointer + 1 destpointer = destpointer + 1
fixed alpha mixin of color channels on draw!
tario_imageruby
train
rb
77586cb48dd7b18980c3173a4345f8d09546a678
diff --git a/view/frontend/web/js/emailCapture.js b/view/frontend/web/js/emailCapture.js index <HASH>..<HASH> 100644 --- a/view/frontend/web/js/emailCapture.js +++ b/view/frontend/web/js/emailCapture.js @@ -14,19 +14,28 @@ define(['jquery', 'domReady!'], function ($) { } /** - * Email capture for checkout + * Email capture for checkout. + * * @param {String} url */ function emailCaptureCheckout(url) { - $('body').on('blur', 'input[id=customer-email]', function () { - var email = $(this).val(); - - if (email && validateEmail(email)) { + var currentEmail = ''; + var input = '#customer-email'; + var customerEmail_blur = function (event) { + $('body').off('blur', input); + var email = event.currentTarget.value; + if (email && validateEmail(email) && currentEmail !== email) { + currentEmail = email; $.post(url, { email: email - }); + }).then(emailBlurHandler.bind(this)); + return false; } - }); + }; + var emailBlurHandler = function () { + $('body').on('blur', input, customerEmail_blur.bind(this)); + }; + emailBlurHandler(); } /**
Merged PR <I>: fix emailcapture to make infinite loop calls Fix emailcapture to make infinite loop calls. On checkout page the emailcapture is called multiple/infinite times when the password manager is enabled and the user saved the creds to be inserted. This should fix the multiple calls and checking the previous post do doesn't duplicate the post send if the email has not changed. Related work items: #<I>
dotmailer_dotmailer-magento2-extension
train
js
604acd9ab5e32e857d46dfd07e82cdbedc762e25
diff --git a/webpack.config.js b/webpack.config.js index <HASH>..<HASH> 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -225,6 +225,8 @@ if ( calypsoEnv === 'development' ) { enforce: 'pre', loader: 'source-map-loader' } ); + } else { + webpackConfig.devtool = '#eval'; } } else { webpackConfig.plugins.push( new UseMinifiedFiles() );
Use #eval for sourcemaps in dev
Automattic_wp-calypso
train
js
2dd1006233fe10604d2e564443105113d649cc77
diff --git a/nodeconductor/users/tests/test_invitation.py b/nodeconductor/users/tests/test_invitation.py index <HASH>..<HASH> 100644 --- a/nodeconductor/users/tests/test_invitation.py +++ b/nodeconductor/users/tests/test_invitation.py @@ -146,6 +146,19 @@ class InvitationPermissionApiTest(test.APITransactionTestCase): self.assertEqual(self.project_invitation.state, models.Invitation.State.ACCEPTED) self.assertTrue(self.project.has_user(self.user, self.project_invitation.project_role.role_type)) + def test_authenticated_user_can_accept_customer_invitation(self): + self.client.force_authenticate(user=self.user) + + data = dict(user=structure_factories.UserFactory.get_url(self.user)) + response = self.client.post( + factories.CustomerInvitationFactory.get_url(self.customer_invitation, action='accept'), data + ) + + self.assertEqual(response.status_code, status.HTTP_200_OK) + self.customer_invitation.refresh_from_db() + self.assertEqual(self.customer_invitation.state, models.Invitation.State.ACCEPTED) + self.assertTrue(self.customer.has_user(self.user, self.customer_invitation.customer_role.role_type)) + # API tests def test_invitation_update_is_not_allowed(self): self.client.force_authenticate(user=self.staff)
Add customer invitation accept test - WAL-<I>
opennode_waldur-core
train
py
8f95172c7af334f61d75faad74cc75016804eca6
diff --git a/releaser/releasenotes_writer_test.go b/releaser/releasenotes_writer_test.go index <HASH>..<HASH> 100644 --- a/releaser/releasenotes_writer_test.go +++ b/releaser/releasenotes_writer_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestReleaseNotesWriter(t *testing.T) { +func _TestReleaseNotesWriter(t *testing.T) { if os.Getenv("CI") != "" { // Travis has an ancient git with no --invert-grep: https://github.com/travis-ci/travis-ci/issues/6328 t.Skip("Skip git test on CI to make Travis happy.")
releaser: Disable shaky test
gohugoio_hugo
train
go
99d5a71c9a918c8d4dee39b450500c574fc4b60e
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,10 @@ if __name__ == '__main__': 'acousticsim.representations', 'acousticsim.processing', 'acousticsim.clustering'], - package_data={'acousticsim.praat': ['*.praat']}, + package_data={'acousticsim.analysis.pitch': ['*.praat'], + 'acousticsim.analysis.formants': ['*.praat'], + 'acousticsim.analysis.intensity': ['*.praat'], + 'acousticsim.analysis.mfcc': ['*.praat']}, install_requires=[ 'numpy', 'scipy',
Fix setup.py for reorganization
mmcauliffe_Conch-sounds
train
py
cf8c98c54ef6d052a25b7c2f493682d952e1f5da
diff --git a/src/api/universe/Regions.js b/src/api/universe/Regions.js index <HASH>..<HASH> 100644 --- a/src/api/universe/Regions.js +++ b/src/api/universe/Regions.js @@ -291,7 +291,7 @@ class Regions extends ExtendableFunction { */ names(ids = []) { if (!ids || ids.length == 0) { - return this.all().then(allIds => this.names(ids)); + return this.all().then(allIds => this.names(allIds)); } else { return _names(this._api, 'region', ids); }
Use allIds instead of ids in Regions.names()
lhkbob_eve-swagger-js
train
js
797304caa61b38b08f42dc206d1c0128975b1263
diff --git a/javascript/libjoynr-js/src/main/js/joynr/messaging/JoynrMessage.js b/javascript/libjoynr-js/src/main/js/joynr/messaging/JoynrMessage.js index <HASH>..<HASH> 100644 --- a/javascript/libjoynr-js/src/main/js/joynr/messaging/JoynrMessage.js +++ b/javascript/libjoynr-js/src/main/js/joynr/messaging/JoynrMessage.js @@ -26,6 +26,9 @@ define( ], function(Util, uuid) { + var jmBase = uuid(); + var jmIndex = 0; + /** * @name JoynrMessage * @constructor @@ -41,7 +44,8 @@ define( settings._typeName = "joynr.JoynrMessage"; settings.header[JoynrMessage.JOYNRMESSAGE_HEADER_CONTENT_TYPE] = "application/json"; settings.header[JoynrMessage.JOYNRMESSAGE_HEADER_MESSAGE_ID] = - settings.header[JoynrMessage.JOYNRMESSAGE_HEADER_MESSAGE_ID] || uuid(); + settings.header[JoynrMessage.JOYNRMESSAGE_HEADER_MESSAGE_ID] + || (jmBase + "_" + jmIndex); settings['__proto__'] = JoynrMessage.prototype; /*jslint nomen: false, sub: false */ return settings;
[JS] More performant messageId creation for joynr messages Do not call the uuid generator for each message, but start from a unique id and add incremental suffix for each message. Change-Id: I<I>a0ed2facbf7c2e3b9e<I>b<I>e<I>af7fca2
bmwcarit_joynr
train
js
5273371cbbfb40136c3d55d81a9e67c23c004e30
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,8 @@ 'use strict'; const VersionChecker = require('ember-cli-version-checker'); -const debug = require('debug')('ember-in-element-polyfill'); const InElementTransform = require('./lib/in-element-transform'); +const debug = require('debug')('ember-in-element-polyfill'); const MINIMUM_PUBLIC_IN_ELEMENT_EMBER_VERSION = '10.0.0'; // t.b.d
accidentally moved InElementTransform require
kaliber5_ember-in-element-polyfill
train
js
80454bf588e3660222784b23043478f93951e5a4
diff --git a/lib/request/GetRequestV2.js b/lib/request/GetRequestV2.js index <HASH>..<HASH> 100644 --- a/lib/request/GetRequestV2.js +++ b/lib/request/GetRequestV2.js @@ -262,8 +262,14 @@ function createDisposable(request, idx) { // If there are no more requests, then dispose all of the request. var count = --request._count; + var disposable = request._disposable; if (count === 0) { - request._disposable.dispose(); + // looking for unsubscribe here to support more data sources (Rx) + if (disposable.unsubscribe) { + disposable.unsubscribe(); + } else { + disposable.dispose(); + } request.requestQueue.removeRequest(request); } };
fix: support more kinds of data sources specifically those that provide .unsubscribe() on their disposables instead of .dispose()
Netflix_falcor
train
js
fe7ea1a8bab6d72ace3a1b3d5a2685b7d7d0855d
diff --git a/ezp/Persistence/Tests/autoload.php b/ezp/Persistence/Tests/autoload.php index <HASH>..<HASH> 100644 --- a/ezp/Persistence/Tests/autoload.php +++ b/ezp/Persistence/Tests/autoload.php @@ -7,6 +7,11 @@ if ( ( $fp = @fopen( 'Base/base.php', 'r', true ) ) !== false ) fclose( $fp ); require_once 'Base/base.php'; } +elseif ( ( $fp = @fopen( 'ezc/Base/base.php', 'r', true ) ) !== false ) +{ + fclose( $fp ); + require_once 'ezc/Base/base.php'; +} else { require_once 'Base/src/base.php';
Make ezc detection also work with pear installations
ezsystems_ezpublish-kernel
train
php
2a3f8c6c3ce8c39ba8fea648ba49423faf391557
diff --git a/udata/search/__init__.py b/udata/search/__init__.py index <HASH>..<HASH> 100644 --- a/udata/search/__init__.py +++ b/udata/search/__init__.py @@ -185,7 +185,7 @@ def suggest(q, field, size=10): result = s.execute_suggest() try: return result.suggestions[0]['options'] - except IndexError: + except (IndexError, AttributeError): return []
Do not fail when no suggestion is available
opendatateam_udata
train
py
0213b8baeddb969a95a5da64f34c1f533c749caa
diff --git a/pkg/proxy/server_test.go b/pkg/proxy/server_test.go index <HASH>..<HASH> 100644 --- a/pkg/proxy/server_test.go +++ b/pkg/proxy/server_test.go @@ -96,6 +96,7 @@ func testServer(t *testing.T, scheme string, secure bool, delayTx bool) { writec <- data1 now := time.Now() if d := <-recvc; !bytes.Equal(data1, d) { + close(writec) t.Fatalf("expected %q, got %q", string(data1), string(d)) } took1 := time.Since(now) @@ -110,6 +111,7 @@ func testServer(t *testing.T, scheme string, secure bool, delayTx bool) { writec <- data2 now = time.Now() if d := <-recvc; !bytes.Equal(data2, d) { + close(writec) t.Fatalf("expected %q, got %q", string(data2), string(d)) } took2 := time.Since(now) @@ -122,6 +124,7 @@ func testServer(t *testing.T, scheme string, secure bool, delayTx bool) { if delayTx { p.UndelayTx() if took2 < lat-rv { + close(writec) t.Fatalf("expected took2 %v (with latency) > delay: %v", took2, lat-rv) } }
fixing goroutine leaks in testServer
etcd-io_etcd
train
go
3dc75f3d2c3a87f0f7371790f4747b229bbdc001
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ if os.path.exists('README.md'): setup(name='jsonconfigfile', version='1.0', maintainer='Luke Woydziak', - maintainer_email='lwoydziak@gmail.com", + maintainer_email='lwoydziak@gmail.com', url = 'https://github.com/Pipe-s/jsonconfigfile', download_url = 'https://github.com/Pipe-s/jsonconfigfile/tarball/1.0', platforms = ["any"],
PYPI distro - continued
lwoydziak_jsonconfigfile
train
py
87125b1cbdf8a342de6d9e6e94f1b89a8d2fbb9e
diff --git a/generators/generator-constants.js b/generators/generator-constants.js index <HASH>..<HASH> 100644 --- a/generators/generator-constants.js +++ b/generators/generator-constants.js @@ -55,7 +55,7 @@ const DOCKER_JHIPSTER_CONTROL_CENTER_VERSION = 'v0.5.0'; const DOCKER_JHIPSTER_CONTROL_CENTER = `jhipster/jhipster-control-center:${DOCKER_JHIPSTER_CONTROL_CENTER_VERSION}`; const DOCKER_JAVA_JRE_VERSION = '11-jre-focal'; const DOCKER_JAVA_JRE = `eclipse-temurin:${DOCKER_JAVA_JRE_VERSION}`; -const DOCKER_MYSQL_VERSION = '8.0.29-oracle'; +const DOCKER_MYSQL_VERSION = '8.0.29'; const DOCKER_MYSQL = `mysql:${DOCKER_MYSQL_VERSION}`; const DOCKER_MARIADB_VERSION = '10.8.3'; const DOCKER_MARIADB = `mariadb:${DOCKER_MARIADB_VERSION}`;
revert mysql image
jhipster_generator-jhipster
train
js
84b07be2b7ddc7f53bd26c9ee6c660db3b3a5c41
diff --git a/cli/src/main/java/hudson/cli/CLI.java b/cli/src/main/java/hudson/cli/CLI.java index <HASH>..<HASH> 100644 --- a/cli/src/main/java/hudson/cli/CLI.java +++ b/cli/src/main/java/hudson/cli/CLI.java @@ -335,11 +335,11 @@ public class CLI { @Override public void run() { try { - Thread.sleep(10_000); + Thread.sleep(PING_INTERVAL); while (!connection.complete) { LOGGER.fine("sending ping"); connection.sendEncoding(Charset.defaultCharset().name()); // no-op at this point - Thread.sleep(10_000); + Thread.sleep(PING_INTERVAL); } } catch (IOException | InterruptedException x) { LOGGER.log(Level.WARNING, null, x); @@ -406,4 +406,6 @@ public class CLI { } static final Logger LOGGER = Logger.getLogger(CLI.class.getName()); + + private static final int PING_INTERVAL = Integer.getInteger(CLI.class.getName() + ".pingInterval", 3_000); // JENKINS-59267 }
[JENKINS-<I>] Increase ping frequency to prevent timeouts
jenkinsci_jenkins
train
java
80adf5b2cc861ab6837ae03052378719e694bebc
diff --git a/tweepy/streaming.py b/tweepy/streaming.py index <HASH>..<HASH> 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -58,7 +58,7 @@ class Stream: ---------- running : bool Whether there's currently a stream running - session : Optional[:class:`requests.Session`] + session : :class:`requests.Session` Requests Session used to connect to the stream thread : Optional[:class:`threading.Thread`] Thread used to run the stream @@ -80,7 +80,7 @@ class Stream: self.verify = verify self.running = False - self.session = None + self.session = requests.Session() self.thread = None self.user_agent = ( f"Python/{python_version()} " @@ -103,9 +103,7 @@ class Stream: auth = OAuth1(self.consumer_key, self.consumer_secret, self.access_token, self.access_token_secret) - if self.session is None: - self.session = requests.Session() - self.session.headers["User-Agent"] = self.user_agent + self.session.headers["User-Agent"] = self.user_agent url = f"https://stream.twitter.com/1.1/{endpoint}.json"
Initialize Stream.session within Stream.__init__ Update the user agent based on Stream.user_agent even if Stream.session is already initialized
tweepy_tweepy
train
py
a1da0adbfd4ae048806713d1c8f8795af07e3bf5
diff --git a/src/javascript/runtime/html4/file/FileInput.js b/src/javascript/runtime/html4/file/FileInput.js index <HASH>..<HASH> 100644 --- a/src/javascript/runtime/html4/file/FileInput.js +++ b/src/javascript/runtime/html4/file/FileInput.js @@ -92,12 +92,6 @@ define("moxie/runtime/html4/file/FileInput", [ if (this.files) { // check if browser is fresh enough file = this.files[0]; - - // ignore empty files (IE10 for example hangs if you try to send them via XHR) - if (file.size === 0) { - form.parentNode.removeChild(form); - return; - } } else { file = { name: this.value
FIleInput, HTML4: allow empty files for consistency with other runtimes
moxiecode_moxie
train
js
1a283972bdec351454ad0e232770afa68e3f27a1
diff --git a/gameq/protocols/source.php b/gameq/protocols/source.php index <HASH>..<HASH> 100644 --- a/gameq/protocols/source.php +++ b/gameq/protocols/source.php @@ -200,6 +200,13 @@ class GameQ_Protocols_Source extends GameQ_Protocols $result->add('dedicated', $buf->read()); $result->add('os', $buf->read()); $result->add('password', $buf->readInt8()); + + // Check engine type + if ($this->source_engine == self::GOLDSOURCE_ENGINE) + { + $result->add('ismod', $buf->readInt8()); + } + $result->add('secure', $buf->readInt8()); // Check engine type @@ -212,7 +219,7 @@ class GameQ_Protocols_Source extends GameQ_Protocols $result->add('version', $buf->readInt8()); } - // Add extra data flag check here + // Add extra data flag check here, old for source games (not goldsource) // https://developer.valvesoftware.com/wiki/Server_Queries#Source_servers_2 unset($buf);
According to the goldsource docs (from Valve) this was missing, not sure if this was causing a bad result from the response or not. In the docs is should always be there if it is goldsource server.
Austinb_GameQ
train
php
a035fadc1b55e4fb60ad96e5ee2647604635a8af
diff --git a/openquake/calculators/views.py b/openquake/calculators/views.py index <HASH>..<HASH> 100644 --- a/openquake/calculators/views.py +++ b/openquake/calculators/views.py @@ -719,7 +719,7 @@ def view_extreme_gmvs(token, dstore): if ':' in token: maxgmv = float(token.split(':')[1]) else: - maxgmv = 10 + maxgmv = 10 # 10g is default value defining extreme GMVs imt0 = list(dstore['oqparam'].imtls)[0] if imt0.startswith(('PGA', 'SA(')): df = get_gmv0(dstore)
Added comment [skip CI]
gem_oq-engine
train
py
15bc0ee73e2890c65f2effd13923a78f6269a6e0
diff --git a/website/src/components/guides/gradients/GradientsExample.js b/website/src/components/guides/gradients/GradientsExample.js index <HASH>..<HASH> 100644 --- a/website/src/components/guides/gradients/GradientsExample.js +++ b/website/src/components/guides/gradients/GradientsExample.js @@ -37,7 +37,7 @@ const MyChart = () => ( { offset: 0, color: '#faf047' }, { offset: 100, color: '#e4b400' }, ], - , + }, ]} // 2. defining rules to apply those gradients fill={[
fix(website): Add closed bracket in gradients example code (#<I>)
plouc_nivo
train
js
29d4f8c44aad7798f9c4e84b165826653f21eca4
diff --git a/hca/cli.py b/hca/cli.py index <HASH>..<HASH> 100644 --- a/hca/cli.py +++ b/hca/cli.py @@ -70,6 +70,7 @@ def main(args=None): parser.exit(1) parsed_args = parser.parse_args(args=args) + logging.basicConfig(level=logging.ERROR) logger.setLevel(parsed_args.log_level) try: result = parsed_args.entry_point(parsed_args)
Initialize logging in hca.cli.main (#<I>)
HumanCellAtlas_dcp-cli
train
py
15419d7ba09bb48dec59c73af51a0fd005eeb460
diff --git a/internal/test/environment/environment.go b/internal/test/environment/environment.go index <HASH>..<HASH> 100644 --- a/internal/test/environment/environment.go +++ b/internal/test/environment/environment.go @@ -78,10 +78,13 @@ func getPlatformDefaults(info types.Info, osType string) PlatformDefaults { } case "windows": baseImage := "microsoft/windowsservercore" - if override := os.Getenv("WINDOWS_BASE_IMAGE"); override != "" { - baseImage = override - fmt.Println("INFO: Windows Base image is ", baseImage) + if overrideBaseImage := os.Getenv("WINDOWS_BASE_IMAGE"); overrideBaseImage != "" { + baseImage = overrideBaseImage + if overrideBaseImageTag := os.Getenv("WINDOWS_BASE_IMAGE_TAG"); overrideBaseImageTag != "" { + baseImage = baseImage + ":" + overrideBaseImageTag + } } + fmt.Println("INFO: Windows Base image is ", baseImage) return PlatformDefaults{ BaseImage: baseImage, VolumesConfigPath: filepath.FromSlash(volumesPath),
Consider WINDOWS_BASE_IMAGE_TAG override when setting Windows base image for tests
moby_moby
train
go
2b979be2f5608ea79d11b8bf62567f632fd3640f
diff --git a/lib/netsuite/actions/update.rb b/lib/netsuite/actions/update.rb index <HASH>..<HASH> 100644 --- a/lib/netsuite/actions/update.rb +++ b/lib/netsuite/actions/update.rb @@ -73,7 +73,7 @@ module NetSuite def update(options = {}, credentials={}) options[:internal_id] = internal_id if respond_to?(:internal_id) && internal_id - if !options.include?(:external_id) || (respond_to?(:external_id) && external_id) + if !options.include?(:external_id) && (respond_to?(:external_id) && external_id) options[:external_id] = external_id end
Fixing external ID being passed as nil on update Regression caused by <URL>
NetSweet_netsuite
train
rb
2386ab71470336395b89b57dcd992109a3895645
diff --git a/src/Frontend/assets/js/taco-wordpress.js b/src/Frontend/assets/js/taco-wordpress.js index <HASH>..<HASH> 100644 --- a/src/Frontend/assets/js/taco-wordpress.js +++ b/src/Frontend/assets/js/taco-wordpress.js @@ -16,6 +16,7 @@ TacoWordPress.FieldLinks.checkForLinks = function() { new TacoWordPress.FieldLinks.FieldLink(jQuery(this)); }); } + TacoWordPress.FieldLinks.FieldLink = function($object) { this.init($object); TacoWordPress.FieldLinks.instances.push(this);
trying to trigger packagist sync
tacowordpress_tacowordpress
train
js
931a97f1cc9cc63ed13e062e19dc11ffeee64ee6
diff --git a/allauth/account/views.py b/allauth/account/views.py index <HASH>..<HASH> 100644 --- a/allauth/account/views.py +++ b/allauth/account/views.py @@ -558,8 +558,12 @@ class PasswordResetView(AjaxCapableProcessFormViewMixin, FormView): def get_context_data(self, **kwargs): ret = super(PasswordResetView, self).get_context_data(**kwargs) + login_url = passthrough_next_redirect_url(self.request, + reverse("account_login"), + self.redirect_field_name) # NOTE: For backwards compatibility ret['password_reset_form'] = ret.get('form') + ret.update({"login_url": login_url}) # (end NOTE) return ret
Update views.py add login_url to the context variables of the password reset form. It is always handy to give users the ability to sign in quickly when the suddenly remember their password.
pennersr_django-allauth
train
py
aa5c78ba0218c284d0b38956236024177bb85652
diff --git a/src/rez/__init__.py b/src/rez/__init__.py index <HASH>..<HASH> 100644 --- a/src/rez/__init__.py +++ b/src/rez/__init__.py @@ -2,7 +2,7 @@ import logging.config import os -__version__ = "2.0.ALPHA.116" +__version__ = "2.0.ALPHA.117" __author__ = "Allan Johns" __license__ = "LGPL" diff --git a/src/rez/cli/release.py b/src/rez/cli/release.py index <HASH>..<HASH> 100644 --- a/src/rez/cli/release.py +++ b/src/rez/cli/release.py @@ -25,7 +25,7 @@ def command(opts, parser, extra_arg_groups=None): from rez.build_process import LocalSequentialBuildProcess from rez.build_system import create_build_system from rez.release_vcs import create_release_vcs - from rez.release_vcs import get_build_args + from rez.cli.build import get_build_args working_dir = os.getcwd()
fixed paste bug in cli.release
nerdvegas_rez
train
py,py
afdf6a61e9562399c52ffce334477055b671b19f
diff --git a/src/component.js b/src/component.js index <HASH>..<HASH> 100644 --- a/src/component.js +++ b/src/component.js @@ -11,12 +11,11 @@ export default function (tagName, className){ createInstance = function (){ var instance = instanceLocal.set(this, { selection: select(this), - state: {}, owner: component }); create(instance.selection, function setState(state){ state = (typeof state === "function") ? state(instance.state) : state; - Object.assign(instance.state, state); + instance.state = Object.assign({}, instance.state, state); instance.render && instance.render(); }); instance.render = function (){ diff --git a/test/local-state-test.js b/test/local-state-test.js index <HASH>..<HASH> 100644 --- a/test/local-state-test.js +++ b/test/local-state-test.js @@ -108,8 +108,7 @@ tape("Local state.", function(test) { tape("State value default.", function(test) { var div = d3.select(jsdom.jsdom().body).append("div"); div.call(stateValueCheck); - test.equal(typeof stateValue, "object"); - test.equal(Object.keys(stateValue).length, 0); + test.equal(typeof stateValue, "undefined"); test.end(); });
API CHANGE: state value is undefined if not set. No internal mutation
curran_d3-component
train
js,js
0f617532a67dce229d30947b29dba58ab2df3522
diff --git a/modules/wyil/src/wycs/solver/Verifier.java b/modules/wyil/src/wycs/solver/Verifier.java index <HASH>..<HASH> 100644 --- a/modules/wyil/src/wycs/solver/Verifier.java +++ b/modules/wyil/src/wycs/solver/Verifier.java @@ -220,8 +220,7 @@ public class Verifier { case LIST: return List(automaton,es); case TUPLE: - return Tuple(automaton,es); - + return Tuple(automaton,es); } internalFailure("unknown nary expression encountered (" + expr + ")", filename, expr);
WYCS: various minor improvements to the verifier.
Whiley_WhileyCompiler
train
java
5e77387919d1ef030b9bbf7a65675291cd5aa09a
diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index <HASH>..<HASH> 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -2903,8 +2903,7 @@ class Message(Object, Update): log.warning(f"Users cannot send messages with Game media type. " f"chat_id: {self.chat.id}, message_id: {self.message_id}") elif self.empty: - log.warning(f"Empty messages cannot be copied. " - f"chat_id: {self.chat.id}, message_id: {self.message_id}") + log.warning(f"Empty messages cannot be copied. ") elif self.text: return await self._client.send_message( chat_id,
Fix empty messages don't have a chat id
pyrogram_pyrogram
train
py
a91cb5dc49ca7ceb5ff77fe3e4ad41c442022164
diff --git a/core/src/main/java/com/dtolabs/rundeck/plugins/ServiceTypes.java b/core/src/main/java/com/dtolabs/rundeck/plugins/ServiceTypes.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/com/dtolabs/rundeck/plugins/ServiceTypes.java +++ b/core/src/main/java/com/dtolabs/rundeck/plugins/ServiceTypes.java @@ -120,6 +120,7 @@ public class ServiceTypes { private static ServiceLoader<PluginProviderServices> pluginProviderServiceLoader = ServiceLoader.load(PluginProviderServices.class); + private static final Object providerLoaderSync = new Object(); /** * Get a pluggable service implementation for the given plugin type, if available via {@link ServiceLoader} @@ -134,9 +135,11 @@ public class ServiceTypes { ServiceProviderLoader loader ) { - for (PluginProviderServices pluginProviderServices : pluginProviderServiceLoader) { - if (pluginProviderServices.hasServiceFor(serviceType, serviceName)) { - return pluginProviderServices.getServiceProviderFor(serviceType, serviceName, loader); + synchronized (providerLoaderSync) { + for (PluginProviderServices pluginProviderServices : pluginProviderServiceLoader) { + if (pluginProviderServices.hasServiceFor(serviceType, serviceName)) { + return pluginProviderServices.getServiceProviderFor(serviceType, serviceName, loader); + } } } return null;
Attempt to fix #<I> by putting a sync lock around the service loader.
rundeck_rundeck
train
java
64a15557c291be77323d3cc325112821735c8410
diff --git a/themes-book/pressbooks-book/functions.php b/themes-book/pressbooks-book/functions.php index <HASH>..<HASH> 100644 --- a/themes-book/pressbooks-book/functions.php +++ b/themes-book/pressbooks-book/functions.php @@ -76,7 +76,7 @@ function pb_enqueue_scripts() { $options = get_option( 'pressbooks_theme_options_global' ); if ( @$options['toc_collapse'] ) { - wp_enqueue_script( 'pressbooks_toc_collapse', get_stylesheet_directory_uri() . '/js/toc_collapse.js', array( 'jquery' ) ); + wp_enqueue_script( 'pressbooks_toc_collapse', get_template_directory_uri() . '/js/toc_collapse.js', array( 'jquery' ) ); wp_enqueue_style( 'dashicons' ); } }
add child theme support for collapse toc
pressbooks_pressbooks
train
php
39574453dbc4a82c1ba18b0aac8098a21ba9704b
diff --git a/pyspider/fetcher/tornado_fetcher.py b/pyspider/fetcher/tornado_fetcher.py index <HASH>..<HASH> 100644 --- a/pyspider/fetcher/tornado_fetcher.py +++ b/pyspider/fetcher/tornado_fetcher.py @@ -105,6 +105,11 @@ class Fetcher(object): def fetch(self, task, callback=None): if self.async: return self.async_fetch(task, callback) + elif self.ioloop._running: + future = self.async_fetch(task, callback) + while not future.done(): + time.sleep(0.1) + return future.result() else: return self.ioloop.run_sync(functools.partial(self.async_fetch, task, callback))
fix RuntimeError: IOLoop is already running #<I> when using with tornado.wsgi.WSGIContainer
binux_pyspider
train
py
27d4b956320a18c9946fe44c3e23a2486c2c7dd1
diff --git a/examples/demo-app/src/app.js b/examples/demo-app/src/app.js index <HASH>..<HASH> 100644 --- a/examples/demo-app/src/app.js +++ b/examples/demo-app/src/app.js @@ -116,9 +116,9 @@ class App extends Component { componentDidMount() { // delay zs to show the banner - if (!window.localStorage.getItem(BannerKey)) { - window.setTimeout(this._showBanner, 3000); - } + // if (!window.localStorage.getItem(BannerKey)) { + // window.setTimeout(this._showBanner, 3000); + // } // load sample data // this._loadSampleData();
Disabled banner (#<I>) Disabled communication banner
keplergl_kepler.gl
train
js
0a18283322c0e75a2fd52b7c8c3a0709e5307b91
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -61,6 +61,8 @@ function MakeConvertor(toAlphabet) { var toHex = anyBase(useAlphabet, anyBase.HEX); return { + new: function() { return shortenUUID(uuid.v4(), fromHex); }, + uuid: uuid.v4, fromUUID: function(uuid) { return shortenUUID(uuid, fromHex); }, toUUID: function(shortUuid) { return enlargeUUID(shortUuid, toHex); }, };
Add UUID Generation Expose standard and shortened UUID functions
oculus42_short-uuid
train
js
562380128bad1b552e67e7105b1672dfde6cc2a3
diff --git a/test/cql3.js b/test/cql3.js index <HASH>..<HASH> 100644 --- a/test/cql3.js +++ b/test/cql3.js @@ -29,16 +29,8 @@ describe('cql3', function() before(function() { poolConfig.cqlVersion = '3.0.0'; - return canSelectCQLVersion(poolConfig).then(function(canSelect) - { - if (!canSelect) - { - console.error('The `cqlVersion` cannot be set; skipping CQL 3 tests.'); - return process.exit(); - } - conn = new scamandrios.ConnectionPool(poolConfig); - return conn.connect().should.be.fulfilled; - }); + conn = new scamandrios.ConnectionPool(poolConfig); + return conn.connect().should.be.fulfilled; }); describe('connection and keyspaces', function()
Hack out the pre-test check for setting cql versions for now.
lyveminds_scamandrios
train
js
eef6475914ec66e0328977c29491230f36517610
diff --git a/app.js b/app.js index <HASH>..<HASH> 100644 --- a/app.js +++ b/app.js @@ -279,6 +279,7 @@ var coverage = { "putComplexPolymorphicRecursiveValid": 0, "getComplexPolymorphicRecursiveValid": 0, "putComplexReadOnlyPropertyValid": 0, + "getComplexReadOnlyPropertyValid": 0, "UrlPathsBoolFalse": 0, "UrlPathsBoolTrue": 0, "UrlPathsIntPositive": 0, diff --git a/routes/complex.js b/routes/complex.js index <HASH>..<HASH> 100644 --- a/routes/complex.js +++ b/routes/complex.js @@ -692,6 +692,7 @@ var complex = function (coverage) { }); router.get('/readonlyproperty/valid', function (req, res, next) { + coverage['getComplexReadOnlyPropertyValid']++; res.status(200).end(JSON.stringify({ "id": "1234", "size": 2 })); });
Added getComplexReadOnlyPropertyValid to coverage (#<I>) * Added getComplexReadOnlyPropertyValid to coverage * Added getComplexReadOnlyPropertyValid to list
Azure_autorest.testserver
train
js,js
b4f6ca6d0c075f04cf81225cd7ff763154f869b4
diff --git a/lib/webpack.config.js b/lib/webpack.config.js index <HASH>..<HASH> 100644 --- a/lib/webpack.config.js +++ b/lib/webpack.config.js @@ -16,7 +16,6 @@ module.exports = function createConfig (entry) { output: { path: paths.build, filename: 'bundle.js', - publicPath: '/', pathinfo: true }, resolve: {
:bug: Remove publichPath settings. - Makes it hard to host presentation on sub-paths. - Also, seems we do not need it.
sebald_melodrama-scripts
train
js
9049654392d759fe746e4044e7453b348a7df7b2
diff --git a/server/src/utils.js b/server/src/utils.js index <HASH>..<HASH> 100644 --- a/server/src/utils.js +++ b/server/src/utils.js @@ -1,6 +1,6 @@ 'use strict'; -const MIN_VERSION = [ 2, 3, 0 ]; +const MIN_VERSION = [ 2, 3, 1 ]; // Recursive version compare, could be flatter but opted for instant return if // comparison is greater rather than continuing to compare to end.
Bump minimum rethinkdb version (#<I>)
rethinkdb_horizon
train
js
9bad2c84773d25e532c13361b6d0012544be43ac
diff --git a/lib/tableschema/version.rb b/lib/tableschema/version.rb index <HASH>..<HASH> 100644 --- a/lib/tableschema/version.rb +++ b/lib/tableschema/version.rb @@ -1,3 +1,3 @@ module TableSchema - VERSION = "0.2.0" + VERSION = "0.3.0" end
Fix version number. Major version bump from <I> to <I>
frictionlessdata_tableschema-rb
train
rb
e66ff0866929afc6783bdc57f399ad16a4d0521a
diff --git a/lib/unpoly/rails/inspector.rb b/lib/unpoly/rails/inspector.rb index <HASH>..<HASH> 100644 --- a/lib/unpoly/rails/inspector.rb +++ b/lib/unpoly/rails/inspector.rb @@ -114,17 +114,6 @@ module Unpoly response.headers['X-Up-Title'] = new_title end - ## - # - # - def waypoints - if waypoints = request.headers['X-Up-Waypoints'] - waypoints.split(' ') - else - [] - end - end - private def request
Remove #waypoints getter from unpoly-rails inspector
unpoly_unpoly
train
rb
12b73b91663603a5ebfd9b17abad0b1f9545e106
diff --git a/client/lib/abtest/active-tests.js b/client/lib/abtest/active-tests.js index <HASH>..<HASH> 100644 --- a/client/lib/abtest/active-tests.js +++ b/client/lib/abtest/active-tests.js @@ -182,7 +182,7 @@ export default { ], }, offerResetFlow: { - datestamp: '20200804', + datestamp: '20200916', variations: { showOfferResetFlow: 100, control: 0,
Update Offer Reset experiment datestamp (#<I>)
Automattic_wp-calypso
train
js
58112c4d2de9248cb2dc15544240449d391b6441
diff --git a/rafthttp/transport.go b/rafthttp/transport.go index <HASH>..<HASH> 100644 --- a/rafthttp/transport.go +++ b/rafthttp/transport.go @@ -134,6 +134,7 @@ func (t *transport) RemovePeer(id types.ID) { defer t.mu.Unlock() t.peers[id].Stop() delete(t.peers, id) + delete(t.leaderStats.Followers, id.String()) } func (t *transport) UpdatePeer(id types.ID, urls []string) {
rafthttp: remove follower from leaderstats when it is removed from the cluster
etcd-io_etcd
train
go
67206fd58d21ccfacd1dfe2f33049423ed99dc6b
diff --git a/openmath/convert_pickle.py b/openmath/convert_pickle.py index <HASH>..<HASH> 100644 --- a/openmath/convert_pickle.py +++ b/openmath/convert_pickle.py @@ -127,6 +127,8 @@ Functions:: >>> o = om.OMApplication(f, [om.OMFloat(3.14)]) >>> to_python(o) 0.0015926529164868282 + >>> import math + >>> test_openmath(math.sin) Sage parents::
Added doctest for global function pickling
OpenMath_py-openmath
train
py
f6fead45f5408743da7c431d5269b7d01f90237b
diff --git a/resource/schema.go b/resource/schema.go index <HASH>..<HASH> 100644 --- a/resource/schema.go +++ b/resource/schema.go @@ -39,7 +39,7 @@ func convertMapToMetaValues(values map[string]interface{}, metaors []Metaor) (*M metaValues.Values = append(metaValues.Values, metaValue) } } else { - metaValue := &MetaValue{Name: key, Value: result, Meta: metaor, Index: idx} + metaValue := &MetaValue{Name: key, Value: result, Meta: metaor} metaValues.Values = append(metaValues.Values, metaValue) break }
Not necessary to set index for current level meta value
qor_qor
train
go
e45ec2ed358b579ee2e03f8bdfdbebbbf28e7460
diff --git a/restcomm/restcomm.telephony/src/main/java/org/mobicents/servlet/restcomm/telephony/Call.java b/restcomm/restcomm.telephony/src/main/java/org/mobicents/servlet/restcomm/telephony/Call.java index <HASH>..<HASH> 100644 --- a/restcomm/restcomm.telephony/src/main/java/org/mobicents/servlet/restcomm/telephony/Call.java +++ b/restcomm/restcomm.telephony/src/main/java/org/mobicents/servlet/restcomm/telephony/Call.java @@ -842,7 +842,7 @@ public final class Call extends UntypedActor { builder.setAccountSid(accountId); builder.setTo(to.getUser()); builder.setCallerName(name); - String fromString = from.getUser() != null ? from.getUser() : "REST-API"; + String fromString = from.getUser() != null ? from.getUser() : "CALLS REST API"; builder.setFrom(fromString); // builder.setForwardedFrom(callInfo.forwardedFrom()); // builder.setPhoneNumberSid(phoneId);
RESTCOMM-<I> #Comment minor fix
RestComm_Restcomm-Connect
train
java
4f9d080124bc7cd6ed783fcc1e053929b8e8f49f
diff --git a/lib/testExecutions.js b/lib/testExecutions.js index <HASH>..<HASH> 100644 --- a/lib/testExecutions.js +++ b/lib/testExecutions.js @@ -2,7 +2,7 @@ const file = require('./file') -module.exports = function testExecutions(data, formatForSonar56 = false) { +module.exports = function testExecutions(data, formatForSonar56) { const aTestExecution = [{_attr: {version: '1'}}] const testResults = data.testResults.map(file)
Ensure Node4 compatibility.
3dmind_jest-sonar-reporter
train
js
e5bae8efda56522d129d942941eccda5af2b42cc
diff --git a/src/Pururin/Crawlers/Cover.php b/src/Pururin/Crawlers/Cover.php index <HASH>..<HASH> 100644 --- a/src/Pururin/Crawlers/Cover.php +++ b/src/Pururin/Crawlers/Cover.php @@ -97,7 +97,7 @@ class Cover extends Crawler } } } else { - throw new PururinException("Error Processing Request", 1); + throw new PururinException("Error Building Cover Info", 1); } } return true; diff --git a/src/Pururin/PururinCrawler.php b/src/Pururin/PururinCrawler.php index <HASH>..<HASH> 100644 --- a/src/Pururin/PururinCrawler.php +++ b/src/Pururin/PururinCrawler.php @@ -27,6 +27,10 @@ class PururinCrawler */ public function __construct($data) { + if (! isset($data['save_directory'], $data['manga_url'])) { + throw new PururinException("Invalid construct data", 1); + } + is_dir($data['save_directory']) or mkdir($data['save_directory']); $this->data = $data; }
Update cralwer constructor and cover management
louvian_pururin-crawler
train
php,php
51f11964574925aa05b5259915ad6938acded0f2
diff --git a/tests/Helpers/Gambit/CampaignsResponse.php b/tests/Helpers/Gambit/CampaignsResponse.php index <HASH>..<HASH> 100644 --- a/tests/Helpers/Gambit/CampaignsResponse.php +++ b/tests/Helpers/Gambit/CampaignsResponse.php @@ -19,7 +19,7 @@ class CampaignsResponse extends JsonResponse 'msg_rb_confirmation' => 'You SLAYED this campaign. Badass. ', 'title' => 'Don\'t Be a Sucker', 'tagline' => 'Unplug unused electronics to conserve energy.', - 'status' => '6196', + 'status' => 'active', 'current_run' => 6196, 'mobilecommons_group_doing' => 255889, 'mobilecommons_group_completed' => 255886,
Fix typo in Gambit/CampaignsResponse mock.
DoSomething_gateway
train
php
ecc936340d7259b7427c2392b46912676d1ae93b
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 @@ -87,7 +87,7 @@ Spec::Runner.configure do |config| # global model cleanup descendants = DataMapper::Model.descendants.dup.to_a while model = descendants.shift - descendants.concat(model.descendants) if model.respond_to?(:descendants) + descendants.concat(model.descendants.to_a) if model.respond_to?(:descendants) parts = model.name.split('::') constant_name = parts.pop.to_sym
Array#concat does not work with a Set
datamapper_dm-core
train
rb
d7282522349610ebd66773e09929f595b35493fc
diff --git a/lib/assets/Css.js b/lib/assets/Css.js index <HASH>..<HASH> 100644 --- a/lib/assets/Css.js +++ b/lib/assets/Css.js @@ -199,24 +199,23 @@ class Css extends Text { async minify() { try { - const result = await cssnano.process( - this.parseTree, - { from: undefined, map: { annotation: false } }, // Tell postcss to not remove the sourceMappingURL comment - { - preset: [ - 'default', - { - svgo: false, - discardComments: { - remove(comment) { - return !/@preserve|@license|[@#]\s*sourceURL|[#@]\s*sourceMappingURL|^!/.test( - comment - ); - }, + const result = await cssnano({ + preset: [ + 'default', + { + svgo: false, + discardComments: { + remove(comment) { + return !/@preserve|@license|[@#]\s*sourceURL|[#@]\s*sourceMappingURL|^!/.test( + comment + ); }, }, - ], - } + }, + ], + }).process( + this.parseTree, + { from: undefined, map: { annotation: false } } // Tell postcss to not remove the sourceMappingURL comment ); this.parseTree = result.root; } catch (err) {
Adapt to the new cssnano api
assetgraph_assetgraph
train
js
fcf83011dffce3f2e8aad906f07c1ec14668f877
diff --git a/examples/pytorch/multiple-choice/run_swag.py b/examples/pytorch/multiple-choice/run_swag.py index <HASH>..<HASH> 100755 --- a/examples/pytorch/multiple-choice/run_swag.py +++ b/examples/pytorch/multiple-choice/run_swag.py @@ -106,7 +106,7 @@ class DataTrainingArguments: default=None, metadata={"help": "The number of processes to use for the preprocessing."}, ) - max_seq_length: int = field( + max_seq_length: Optional[int] = field( default=None, metadata={ "help": "The maximum total input sequence length after tokenization. If passed, sequences longer "
Fix type of max_seq_length arg in run_swag.py (#<I>)
huggingface_pytorch-pretrained-BERT
train
py
c031098e7916ecb20879a28a30dad221e294b8e2
diff --git a/render/http401.php b/render/http401.php index <HASH>..<HASH> 100644 --- a/render/http401.php +++ b/render/http401.php @@ -10,8 +10,5 @@ */ namespace monolyth\render; - -?> -<h1><?=$text('/title')?></h1> -<p><?=$text('./explain')?></p> +die();
maybe i should rethink this... <I> = unauthorized: show message? see what the specs say on that
monolyth-php_frontal
train
php
4888e6d801f9bf5998a7066dbb43103949a81213
diff --git a/bundler.go b/bundler.go index <HASH>..<HASH> 100644 --- a/bundler.go +++ b/bundler.go @@ -443,6 +443,7 @@ func (b *Bundler) bundle(e ConfigurationEnvironment) (err error) { "GOARCH=" + e.Arch, "GOOS=" + e.OS, "GOPATH=" + os.Getenv("GOPATH"), + "GOROOT=" + os.Getenv("GOROOT"), "PATH=" + os.Getenv("PATH"), "TEMP=" + os.Getenv("TEMP"), "TAGS=" + os.Getenv("TAGS"),
Added GOROOT env variable
asticode_go-astilectron-bundler
train
go
3b87a69b2f7027754594399751aefbe5862ed2b3
diff --git a/spec/bullet/detector/unused_eager_loading_spec.rb b/spec/bullet/detector/unused_eager_loading_spec.rb index <HASH>..<HASH> 100644 --- a/spec/bullet/detector/unused_eager_loading_spec.rb +++ b/spec/bullet/detector/unused_eager_loading_spec.rb @@ -5,7 +5,7 @@ module Bullet describe UnusedEagerLoading do before(:all) do @post = Post.first - @post2 = Post.second + @post2 = Post.all[1] @post3 = Post.last end
second is not available in old rails
flyerhzm_bullet
train
rb
a40a84aaa022503927bbc3231f7ef87db0d7fce3
diff --git a/openengsb-edb-core/src/test/java/org/openengsb/edb/core/lucene/SearcherTest.java b/openengsb-edb-core/src/test/java/org/openengsb/edb/core/lucene/SearcherTest.java index <HASH>..<HASH> 100755 --- a/openengsb-edb-core/src/test/java/org/openengsb/edb/core/lucene/SearcherTest.java +++ b/openengsb-edb-core/src/test/java/org/openengsb/edb/core/lucene/SearcherTest.java @@ -136,6 +136,7 @@ public class SearcherTest extends ATestStub { } @Test + @Ignore public void testSearchExactMatch() { this.term = SearcherTest.KEY1 + ":" + SearcherTest.PREFIX; this.result = this.searcher.search(this.term);
ignored randomly failing edb test
openengsb_openengsb
train
java
3d0fb55c330216c97e39ca403beff21df070f82d
diff --git a/simuvex/procedures/syscalls/handler.py b/simuvex/procedures/syscalls/handler.py index <HASH>..<HASH> 100644 --- a/simuvex/procedures/syscalls/handler.py +++ b/simuvex/procedures/syscalls/handler.py @@ -15,6 +15,7 @@ syscall_map['AMD64'][4] = 'stat' syscall_map['AMD64'][5] = 'fstat' syscall_map['AMD64'][6] = 'lstat' syscall_map['AMD64'][9] = 'mmap' +syscall_map['AMD64'][231] = 'exit' # really exit_group, but close enough syscall_map['CGC'] = { } syscall_map['CGC'][1] = '_terminate'
added exit_group syscall as alias for exit
angr_angr
train
py
5c2c33b50cea4ac9d17aeb6a1da4cc83bde98d35
diff --git a/src/TextureArchive.js b/src/TextureArchive.js index <HASH>..<HASH> 100644 --- a/src/TextureArchive.js +++ b/src/TextureArchive.js @@ -22,6 +22,9 @@ export default class TextureArchive extends PersistedDocumentArchive { entries.forEach(entry => { let record = rawArchive.resources[entry.path] + // Note: this happens when a resource is referenced in the manifest + // but is not there actually + // we skip loading here and will fix the manuscript later on if (!record) { return }
Added a comment about skipping loading of missing resources.
substance_texture
train
js
763fc06063399ae1eeea42f08f26d225f1fb4ff7
diff --git a/presto-main/src/main/java/com/facebook/presto/sql/planner/planPrinter/PlanPrinter.java b/presto-main/src/main/java/com/facebook/presto/sql/planner/planPrinter/PlanPrinter.java index <HASH>..<HASH> 100644 --- a/presto-main/src/main/java/com/facebook/presto/sql/planner/planPrinter/PlanPrinter.java +++ b/presto-main/src/main/java/com/facebook/presto/sql/planner/planPrinter/PlanPrinter.java @@ -614,7 +614,8 @@ public class PlanPrinter node.getFilter().ifPresent(expression -> joinExpressions.add(expression)); if (node.isSpatialJoin()) { - print(indent, "- SpatialJoin[%s] => [%s]", + print(indent, "- Spatial%s[%s] => [%s]", + node.getType().getJoinLabel(), Joiner.on(" AND ").join(joinExpressions), formatOutputs(node.getOutputSymbols())); }
Update PlanPrinter to distinguish between inner and left spatial joins
prestodb_presto
train
java
45d8e1c209d1823cf2923b64aa03a9ff078b5ff4
diff --git a/host/pydaq/pydaq.py b/host/pydaq/pydaq.py index <HASH>..<HASH> 100644 --- a/host/pydaq/pydaq.py +++ b/host/pydaq/pydaq.py @@ -39,11 +39,12 @@ class Dut(object): kargs['conf'] = hwdrv self._hardware_layer[hwdrv['name']] = self._factory('HL.' + hwdrv['type'], hwdrv['type'], *(), **kargs) - for userdrv in config['user_drivers']: - kargs = {} - kargs['hw_driver'] = self._hardware_layer[userdrv['hw_driver']] - kargs['conf'] = userdrv - self._user_drivers[userdrv['name']] = self._factory('UL.' + userdrv['type'], userdrv['type'], *(), **kargs) + if 'user_drivers' in config: + for userdrv in config['user_drivers']: + kargs = {} + kargs['hw_driver'] = self._hardware_layer[userdrv['hw_driver']] + kargs['conf'] = userdrv + self._user_drivers[userdrv['name']] = self._factory('UL.' + userdrv['type'], userdrv['type'], *(), **kargs) for reg in config['registers']: kargs = {}
BUG: No need for user_drivers section
SiLab-Bonn_basil
train
py
240b513b08215e224639ab5fd9b0594d50005ca0
diff --git a/src/formats/collada/ColladaScene.js b/src/formats/collada/ColladaScene.js index <HASH>..<HASH> 100644 --- a/src/formats/collada/ColladaScene.js +++ b/src/formats/collada/ColladaScene.js @@ -582,7 +582,7 @@ define([ } var hasLighting = (buffers.normals != null && buffers.normals.length > 0); - if (hasLighting) { + if (hasLighting && !dc.pickingMode) { this.applyLighting(dc, buffers); } @@ -753,7 +753,7 @@ define([ mvpMatrix.multiplyMatrix(nodeWorldMatrix); } - if (hasLighting) { + if (hasLighting && !dc.pickingMode) { var normalMatrix = Matrix.fromIdentity(); @@ -809,7 +809,7 @@ define([ var gl = dc.currentGlContext, program = dc.currentProgram; - if (hasLighting) { + if (hasLighting || dc.pickingMode) { program.loadApplyLighting(gl, false); gl.disableVertexAttribArray(program.normalVectorLocation); }
bugfix collada model picking
NASAWorldWind_WebWorldWind
train
js
1973a2512a6c72e79196b77a4f60e9f6d5acba82
diff --git a/cmd/juju/machine/upgradeseries.go b/cmd/juju/machine/upgradeseries.go index <HASH>..<HASH> 100644 --- a/cmd/juju/machine/upgradeseries.go +++ b/cmd/juju/machine/upgradeseries.go @@ -190,11 +190,6 @@ func (c *upgradeSeriesCommand) Run(ctx *cmd.Context) error { // dependency this function should contain minimal logic other than gathering an // API handle and making the API call. func (c *upgradeSeriesCommand) UpgradeSeriesPrepare(ctx *cmd.Context) error { - err := c.promptConfirmation(ctx) - if err != nil { - return err - } - var apiRoot api.Connection // If the upgradeMachineSeries is nil then we collect a handle to the @@ -210,6 +205,11 @@ func (c *upgradeSeriesCommand) UpgradeSeriesPrepare(ctx *cmd.Context) error { c.upgradeMachineSeriesClient = machinemanager.NewClient(apiRoot) } + err := c.promptConfirmation(ctx) + if err != nil { + return err + } + err = c.upgradeMachineSeriesClient.UpgradeSeriesPrepare(c.machineNumber, c.series, c.force) if err != nil { return errors.Trace(err)
Ensure connection is established Before prompting.
juju_juju
train
go
e3ad8f998cc6418db3b8764602ce23ce89e582d2
diff --git a/structr-ui/src/main/resources/structr/js/crud.js b/structr-ui/src/main/resources/structr/js/crud.js index <HASH>..<HASH> 100644 --- a/structr-ui/src/main/resources/structr/js/crud.js +++ b/structr-ui/src/main/resources/structr/js/crud.js @@ -334,6 +334,7 @@ var _Crud = { }); _Crud.highlightCurrentType(_Crud.type); + _Crud.filterTypes($('#crudTypesSearch').val().toLowerCase()); _Crud.resize(); }, loadingMessageTimeout: undefined,
Apply type search when changing a type filter in the data section.
structr_structr
train
js
d679350e449ddec33c3878654082c1b2735ee09a
diff --git a/charmhelpers/core/hookenv.py b/charmhelpers/core/hookenv.py index <HASH>..<HASH> 100644 --- a/charmhelpers/core/hookenv.py +++ b/charmhelpers/core/hookenv.py @@ -216,7 +216,7 @@ def principal_unit(): for reltype in relation_types(): for rid in relation_ids(reltype): for unit in related_units(rid): - md = metadata_unit(unit) + md = _metadata_unit(unit) subordinate = md.pop('subordinate', None) if not subordinate: return unit @@ -499,9 +499,13 @@ def metadata(): return yaml.safe_load(md) -def metadata_unit(unit): - """Get the unit charm metadata.yaml contents as a python object. Unit needs - to be co-located, such as a subordinate or principal/primary. +def _metadata_unit(unit): + """Given the name of a unit (e.g. apache2/0), get the unit charm's + metadata.yaml. Very similar to metadata() but allows us to inspect + other units. Unit needs to be co-located, such as a subordinate or + principal/primary. + + :returns: metadata.yaml as a python object. """ basedir = os.sep.join(charm_dir().split(os.sep)[:-2])
Make metadata_unit() an internal helper for now. We can revisit whether this is for general use in the future.
juju_charm-helpers
train
py
0e7129aa8fc8018338f4f835bdfdfd0fe245bf61
diff --git a/test/index.js b/test/index.js index <HASH>..<HASH> 100644 --- a/test/index.js +++ b/test/index.js @@ -1,5 +1,6 @@ +var mocha = require('mocha'); -require("mocha-as-promised")(); +require("mocha-as-promised")(mocha); global.sinon = require("sinon");
trying to get mocha-as-promised working on node <I>
tgriesser_knex
train
js
ff06634ce93ac7edbfe752758df7300822342c93
diff --git a/scanpy/preprocessing/recipes.py b/scanpy/preprocessing/recipes.py index <HASH>..<HASH> 100644 --- a/scanpy/preprocessing/recipes.py +++ b/scanpy/preprocessing/recipes.py @@ -95,6 +95,7 @@ def recipe_zheng17(adata, n_top_genes=1000, log=True, plot=False, copy=False): ------- Returns or updates `adata` depending on `copy`. """ + logg.info('running recipe zheng17', reset=True) if copy: adata = adata.copy() pp.filter_genes(adata, min_counts=1) # only consider genes with more than 1 count pp.normalize_per_cell(adata, # normalize with total UMI count per cell @@ -110,4 +111,5 @@ def recipe_zheng17(adata, n_top_genes=1000, log=True, plot=False, copy=False): pp.normalize_per_cell(adata) # renormalize after filtering if log: pp.log1p(adata) # log transform: X = log(X + 1) pp.scale(adata) + logg.info(' finished', time=True) return adata if copy else None
added timing to zheng<I> recipe
theislab_scanpy
train
py
d072f28cd31f03734009b81b60b59570a0517a3d
diff --git a/src/Assetic/Filter/Sass/SassFilter.php b/src/Assetic/Filter/Sass/SassFilter.php index <HASH>..<HASH> 100644 --- a/src/Assetic/Filter/Sass/SassFilter.php +++ b/src/Assetic/Filter/Sass/SassFilter.php @@ -180,7 +180,7 @@ class SassFilter extends BaseProcessFilter implements DependencyExtractorInterfa { $loadPaths = $this->loadPaths; if ($loadPath) { - $loadPaths[] = $loadPath; + array_unshift($loadPaths, $loadPath); } if (!$loadPaths) {
s/push/unshift/
kriswallsmith_assetic
train
php
22dd316db99fd2e3729ed8e737b27d403b2dad5b
diff --git a/tests/__init__.py b/tests/__init__.py index <HASH>..<HASH> 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -90,6 +90,7 @@ class ArchiveTest (unittest.TestCase): os.chdir(tmpdir) try: patoolib._handle_archive(archive, 'create', topack, **kwargs) + self.assertTrue(os.path.isfile(archive)) # not all programs can test what they create if self.program == 'compress': program = 'gzip'
Assert that created archive exists in archive test.
wummel_patool
train
py
434d8a368646a6e0683453a5b76f0bcf10e4985f
diff --git a/tests/tests.py b/tests/tests.py index <HASH>..<HASH> 100755 --- a/tests/tests.py +++ b/tests/tests.py @@ -1092,14 +1092,14 @@ class IssueTests(unittest.TestCase): assert s.name == sprint_name assert s.state == 'FUTURE' - self.jira.add_issues_to_sprint(s.id, [self.issue_1.key]) + self.jira.add_issues_to_sprint(s.id, [self.issue_1]) sprint_field_name = "Sprint" sprint_field_id = [f['schema']['customId'] for f in self.jira.fields() if f['name'] == sprint_field_name][0] sprint_customfield = "customfield_" + str(sprint_field_id) - updated_issue_1 = self.jira.issue(self.issue_1.key) + updated_issue_1 = self.jira.issue(self.issue_1) assert updated_issue_1.fields[sprint_customfield][0]['id'] == s.id #self.jira.add_issues_to_sprint(s.id, self.issue_2)
Update self.issue_1.key to self.issue_1 self.issue_1 is the issue key. self.issue_1_obj is the Issue object.
pycontribs_jira
train
py
39709b67095083c10b4782cff2978d7efd6ccf19
diff --git a/tpot/config/classifier_nn.py b/tpot/config/classifier_nn.py index <HASH>..<HASH> 100644 --- a/tpot/config/classifier_nn.py +++ b/tpot/config/classifier_nn.py @@ -27,7 +27,7 @@ import numpy as np # Check the TPOT documentation for information on the structure of config dicts -classifier_config_dict = { +classifier_config_nn = { # MLPClassifier for neural networks # TODO: revisit/tweak: alpha, momentum, learning rate_init 'sklearn.neural_network.MLPClassifier': {
Rename nn config dict
EpistasisLab_tpot
train
py
abda1a1c7adf25a8f3bef2b3862258a46b8c3fbf
diff --git a/nomad/consul.go b/nomad/consul.go index <HASH>..<HASH> 100644 --- a/nomad/consul.go +++ b/nomad/consul.go @@ -146,6 +146,10 @@ type consulACLsAPI struct { } func NewConsulACLsAPI(aclClient consul.ACLsAPI, logger hclog.Logger, purgeFunc PurgeSITokenAccessorFunc) *consulACLsAPI { + if purgeFunc == nil { + purgeFunc = func([]*structs.SITokenAccessor) error { return nil } + } + c := &consulACLsAPI{ aclClient: aclClient, limiter: rate.NewLimiter(siTokenRequestRateLimit, int(siTokenRequestRateLimit)), diff --git a/nomad/vault.go b/nomad/vault.go index <HASH>..<HASH> 100644 --- a/nomad/vault.go +++ b/nomad/vault.go @@ -252,6 +252,9 @@ func NewVaultClient(c *config.VaultConfig, logger log.Logger, purgeFn PurgeVault if logger == nil { return nil, fmt.Errorf("must pass valid logger") } + if purgeFn == nil { + purgeFn = func(accessors []*structs.VaultAccessor) error { return nil } + } v := &vaultClient{ config: c,
always set purgeFunc purgeFunc cannot be nil, so ensure it's set to a no-op function in tests.
hashicorp_nomad
train
go,go
12deebd9eac69ed05f2b98fe55b09d08baeb0d3e
diff --git a/nipap/nipap/backend.py b/nipap/nipap/backend.py index <HASH>..<HASH> 100644 --- a/nipap/nipap/backend.py +++ b/nipap/nipap/backend.py @@ -2247,6 +2247,11 @@ class Nipap: This is a helper function to smart_search_pool for easier unit testing of the parser. """ + from smart_parsing import PoolSmartParser + sp = PoolSmartParser() + query = sp.parse(query_str) + return query + # find query parts query_str_parts = self._get_query_parts(query_str)
backend: use PoolSmartParser for pool searches
SpriteLink_NIPAP
train
py
1fe84afce4191858773a9b78574e7b9f6d1a7ca5
diff --git a/lib/circleci/http.rb b/lib/circleci/http.rb index <HASH>..<HASH> 100644 --- a/lib/circleci/http.rb +++ b/lib/circleci/http.rb @@ -57,7 +57,7 @@ module CircleCi def handle_response(body, code, path) parsed = JSON.parse(body) rescue nil - if parsed && (200..299).include?(code) + if parsed || (200...299).include?(code) self.response = parsed self.success = true else
Check response code for success * Empty responses can be successful still
mtchavez_circleci
train
rb
f21f3fc2b9294ce2f74506845810e1b12204ccf6
diff --git a/src/Database/Adapter/PdoAdapter.php b/src/Database/Adapter/PdoAdapter.php index <HASH>..<HASH> 100644 --- a/src/Database/Adapter/PdoAdapter.php +++ b/src/Database/Adapter/PdoAdapter.php @@ -87,12 +87,11 @@ abstract class PdoAdapter implements AdapterInterface */ public function buildUpdateQuery($table, array $data, array $conditions = [], $where = '') { - $query = 'UPDATE ' . $this->queryBuilder->escapeString(addslashes($table)) . ' SET '; $values = []; foreach (array_keys($data) as $key) { $values[] = $this->queryBuilder->escapeString($key) . ' = ' . $this->createValue($key); } - $query .= implode(', ', $values) . $this->createWhere($conditions, $where) . ';'; + $query = sprintf('UPDATE %s SET %s %s;', $this->queryBuilder->escapeString(addslashes($table)), implode(', ', $values), $this->createWhere($conditions, $where)); $statement = $this->pdo->prepare($query); foreach ($data as $key => $value) { $statement->bindValue($key, $value);
trying to fix sensiolabs violations
lulco_phoenix
train
php
10ef1b8e1151eef2949735fab19263fbd5ecd6d9
diff --git a/gstring.go b/gstring.go index <HASH>..<HASH> 100644 --- a/gstring.go +++ b/gstring.go @@ -51,7 +51,7 @@ func gformat(format string, args map[string]interface{}) (string, []interface{}) new_format = append(new_format, defaultFormat...) } // reset format args for new iteration - current_args_runes = make([]rune, 0, 10) + current_args_runes = current_args_runes[0:0] } var name string @@ -61,7 +61,7 @@ func gformat(format string, args map[string]interface{}) (string, []interface{}) name = string(current_name_runes) } // reset name runes for next interation - current_name_runes = make([]rune, 0, 10) + current_name_runes = current_name_runes[0:0] // get value from provided args and append it to new_format_args val, ok := args[name]
Do not create new array for when needing new slice, just resize old slice to 0 length
delicb_gstring
train
go
19f5defceac99a502330a89df88ab5425a9b34b3
diff --git a/confluent_kafka/schema_registry/schema_registry_client.py b/confluent_kafka/schema_registry/schema_registry_client.py index <HASH>..<HASH> 100644 --- a/confluent_kafka/schema_registry/schema_registry_client.py +++ b/confluent_kafka/schema_registry/schema_registry_client.py @@ -104,7 +104,7 @@ class _RestClient(object): " remove basic.auth.user.info from the" " configuration") - userinfo = conf_copy.pop('basic.auth.user.info', '').split(':') + userinfo = tuple(conf_copy.pop('basic.auth.user.info', '').split(':')) if len(userinfo) != 2: raise ValueError("basic.auth.user.info must be in the form"
requests auth property takes a tuple and not a list. (@blown<I> #<I>)
confluentinc_confluent-kafka-python
train
py
d6ae27ead8b667c10d87066dceb66ea90c2e9e62
diff --git a/routes/modelList.js b/routes/modelList.js index <HASH>..<HASH> 100644 --- a/routes/modelList.js +++ b/routes/modelList.js @@ -1,5 +1,6 @@ var path = require('path'), - async = require('async'); + async = require('async'), + linz = require('../'); /* GET /admin/models/list */ var route = function (req, res) {
Added missing linz variable
linzjs_linz
train
js
6fbf805152f011d0d8fd42414885f990f268b7a1
diff --git a/src/test/java/com/google/maps/PlacesApiIntegrationTest.java b/src/test/java/com/google/maps/PlacesApiIntegrationTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/google/maps/PlacesApiIntegrationTest.java +++ b/src/test/java/com/google/maps/PlacesApiIntegrationTest.java @@ -296,7 +296,7 @@ public class PlacesApiIntegrationTest extends KeyOnlyAuthenticatedTest { .await(); assertNotNull(predictions); assertTrue(predictions.length > 0); - assertTrue(predictions[0].description.startsWith("Sydney Town Hall")); + assertTrue(predictions[0].description.contains("Town Hall")); } @Test
Making Places Autocomplete test happy.
googlemaps_google-maps-services-java
train
java
ea0a81b7e85159130f8aeadd1b40c443c0d13fb8
diff --git a/scapy/layers/dot11.py b/scapy/layers/dot11.py index <HASH>..<HASH> 100644 --- a/scapy/layers/dot11.py +++ b/scapy/layers/dot11.py @@ -43,10 +43,10 @@ class Dot11AddrMACField(MACField): return s,None class Dot11Addr2MACField(Dot11AddrMACField): + # Block-Ack, RTS, PS-Poll, CF-End, CF-End+CF-Ack + subtypes = {0x9, 0xb, 0xa, 0xe, 0xf} def is_applicable(self, pkt): - if pkt.type == 1: - return pkt.subtype in [ 0xb, 0xa, 0xe, 0xf] # RTS, PS-Poll, CF-End, CF-End+CF-Ack - return 1 + return pkt.type != 1 or pkt.subtype in self.subtypes class Dot11Addr3MACField(Dot11AddrMACField): def is_applicable(self, pkt):
Add dot<I> block ack support (#<I>) Add missing addr2 to block ack packet, improve addr2 validation performance.
secdev_scapy
train
py