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
d57c099d8163f11cd361995d8beb189700b60b4f
diff --git a/completion.js b/completion.js index <HASH>..<HASH> 100644 --- a/completion.js +++ b/completion.js @@ -1,7 +1,7 @@ var fs = require('fs'); var path = require('path'); -var HOME = process.env.HOME || process.env.USERPROFILE; +var HOME = process.env.HOME || process.env.USERPROFILE || ''; var PROFILE = [ path.join(HOME, '.bashrc'),
Avoid exception when the HOME and USERPROFILE env var are not defined
mafintosh_tabalot
train
js
a2d6a93929e7b4ddf8ced1bda027a023404201b4
diff --git a/iribaker/__init__.py b/iribaker/__init__.py index <HASH>..<HASH> 100644 --- a/iribaker/__init__.py +++ b/iribaker/__init__.py @@ -51,8 +51,10 @@ def to_iri(iri): # Replace the invalid characters with an underscore (no need to roundtrip) quoted_parts['path'] = no_invalid_characters.sub(u'_', parts.path) - quoted_parts['fragment'] = no_invalid_characters.sub(u'_', parts.fragment) - quoted_parts['query'] = urllib.quote(parts.query.encode('utf-8')) + if parts.fragment: + quoted_parts['fragment'] = no_invalid_characters.sub(u'_', parts.fragment) + if parts.query: + quoted_parts['query'] = urllib.quote(parts.query.encode('utf-8')) # Leave these untouched quoted_parts['scheme'] = parts.scheme quoted_parts['authority'] = parts.netloc
Fixed issue where # and ? were appended to IRIs
CLARIAH_iribaker
train
py
e673435c47cce01c6d449df51165baf12df57e16
diff --git a/test/test_mock.rb b/test/test_mock.rb index <HASH>..<HASH> 100644 --- a/test/test_mock.rb +++ b/test/test_mock.rb @@ -18,6 +18,11 @@ describe Muack::Mock do 3.times{ Obj.say.should.eq 'goo' } end + should 'mock existing method' do + mock(Obj).to_s{ 'zoo' } + Obj.to_s.should.eq 'zoo' + end + should 'mock twice' do mock(Obj).say(true){ Obj.saya } mock(Obj).saya{ 'coo' }
add a test for last commit, and it reveals a bug...
godfat_muack
train
rb
f8c5bb6df5dcb9356bd4a72a22bb75bc3d7d90af
diff --git a/test/functional/StateListAwareTraitTest.php b/test/functional/StateListAwareTraitTest.php index <HASH>..<HASH> 100644 --- a/test/functional/StateListAwareTraitTest.php +++ b/test/functional/StateListAwareTraitTest.php @@ -73,6 +73,11 @@ class StateListAwareTraitTest extends TestCase ); } + /** + * Tests the state key getter method. + * + * @since [*next-version*] + */ public function testGetStateKey() { $subject = $this->createInstance();
Added missing PHP doc block for test
Dhii_state-machine-abstract
train
php
77467f5190723a8c134ad610ea05da425c0cc438
diff --git a/stl/stl.py b/stl/stl.py index <HASH>..<HASH> 100644 --- a/stl/stl.py +++ b/stl/stl.py @@ -119,10 +119,10 @@ class BaseStl(base.BaseMesh): line += lines.pop(0) line = line.lower().strip() - if prefix: - if line == b(''): - return get(prefix) + if line == b(''): + return get(prefix) + if prefix: if line.startswith(prefix): values = line.replace(prefix, b(''), 1).strip().split() elif line.startswith(b('endsolid')):
Check for blank line with and without a prefix We want to check for a blank line regardless if the caller has provided a prefix to check for or not.
WoLpH_numpy-stl
train
py
cd15a69869ca8f6f4d07635d569cfbb1f2ff4d33
diff --git a/sources/scala/tools/scaladoc/Page.java b/sources/scala/tools/scaladoc/Page.java index <HASH>..<HASH> 100644 --- a/sources/scala/tools/scaladoc/Page.java +++ b/sources/scala/tools/scaladoc/Page.java @@ -124,10 +124,14 @@ class Page extends HTMLPrinter { * f1 and f2 should be of the form (A/...) */ static private File asSeenFrom(File f1, File f2) { - File lcp = longestCommonPrefix(f1, f2); - File relf1 = subtractPrefix(lcp, f1); - File relf2 = subtractPrefix(lcp, f2); - return new File(pathToRoot(relf2), relf1.getPath()); + if (f1.equals(f2)) + return new File(f1.getName()); + else { + File lcp = longestCommonPrefix(f1, f2); + File relf1 = subtractPrefix(lcp, f1); + File relf2 = subtractPrefix(lcp, f2); + return new File(pathToRoot(relf2), relf1.getPath()); + } } // where /** p and q should be of the form (A/...) */
- Fixed the bug that occured when a page refers... - Fixed the bug that occured when a page refers to itself. It came from the optimization in the computation of the shortest from a page to another.
scala_scala
train
java
24fa48a1bb68ffad0bb195025fb6c11d016f4dda
diff --git a/lib/mshoplib/setup/TreeAddParentId.php b/lib/mshoplib/setup/TreeAddParentId.php index <HASH>..<HASH> 100644 --- a/lib/mshoplib/setup/TreeAddParentId.php +++ b/lib/mshoplib/setup/TreeAddParentId.php @@ -1,8 +1,8 @@ <?php /** - * @copyright Copyright (c) Metaways Infosystems GmbH, 2011 + * @copyright Copyright (c) Metaways Infosystems GmbH, 2013 * @license LGPLv3, http://www.arcavias.com/en/license - * @version $Id: CatalogAddCode.php 14251 2011-12-09 13:36:27Z nsendetzky $ + * @version $Id$ */ /**
Fixes year in the header.
Arcavias_arcavias-core
train
php
b62a1ee6dbfe320c41f3e91fcaa6acc6cc5fde1d
diff --git a/core/typechecker/src/main/java/org/overture/typechecker/utilities/pattern/AllDefinitionLocator.java b/core/typechecker/src/main/java/org/overture/typechecker/utilities/pattern/AllDefinitionLocator.java index <HASH>..<HASH> 100644 --- a/core/typechecker/src/main/java/org/overture/typechecker/utilities/pattern/AllDefinitionLocator.java +++ b/core/typechecker/src/main/java/org/overture/typechecker/utilities/pattern/AllDefinitionLocator.java @@ -189,7 +189,7 @@ public class AllDefinitionLocator PType type = pattern.getType(); - if (!af.createPTypeAssistant().isRecord(type)) + if (!af.createPTypeAssistant().isTag(type)) //.isRecord(type)) { TypeCheckerErrors.report(3200, "Mk_ expression is not a record type", pattern.getLocation(), pattern); TypeCheckerErrors.detail("Type", type);
Correction to record pattern TC, fixes #<I>
overturetool_overture
train
java
dd84ffbff28ac194f051464f8321dabda8024b85
diff --git a/lib/motion-kit/layout/layout.rb b/lib/motion-kit/layout/layout.rb index <HASH>..<HASH> 100644 --- a/lib/motion-kit/layout/layout.rb +++ b/lib/motion-kit/layout/layout.rb @@ -162,7 +162,7 @@ module MotionKit # this last little "catch-all" method is helpful to warn against methods # that are defined already def self.method_added(method_name) - if Layout.method_defined?(method_name) + if self < Layout && Layout.method_defined?(method_name) NSLog("Warning! The method #{self.name}##{method_name} has already been defined on MotionKit::Layout or one of its ancestors.") end end
don't warn about adding methods directly to Layout
motion-kit_motion-kit
train
rb
8a70da73f657f81d3fc98b2f9dcf465623b640f7
diff --git a/test/unit/TemplateParentTest.php b/test/unit/TemplateParentTest.php index <HASH>..<HASH> 100644 --- a/test/unit/TemplateParentTest.php +++ b/test/unit/TemplateParentTest.php @@ -289,6 +289,35 @@ class TemplateParentTest extends TestCase { } public function testComponentAndTemplatePrefixAddedToTemplateComponentElement() { + $componentDir = self::TEST_DIR . "/" . self::COMPONENT_PATH; + file_put_contents( + "$componentDir/title-definition-list.html", + Helper::COMPONENT_TITLE_DEFINITION_LIST + ); + file_put_contents( + "$componentDir/title-definition.html", + Helper::COMPONENT_TITLE_DEFINITION + ); + file_put_contents( + "$componentDir/ordered-list.html", + Helper::COMPONENT_ORDERED_LIST + ); + $document = new HTMLDocument( + Helper::HTML_COMPONENTS, + $componentDir + ); + $document->expandComponents(); + + $t = $document->getTemplate("title-definition-list"); + self::assertInstanceOf(DocumentFragment::class, $t); + $inserted = $document->body->appendChild($t); + + self::assertTrue( + $inserted->classList->contains("c-title-definition-list") + ); + self::assertTrue( + $inserted->classList->contains("t-title-definition-list") + ); } } \ No newline at end of file
Test component and template prefix added to template-component elements
PhpGt_DomTemplate
train
php
76401f40f69cb19e7d7c7881ee6d53b8b8349883
diff --git a/bosh_cli/spec/unit/core_ext_spec.rb b/bosh_cli/spec/unit/core_ext_spec.rb index <HASH>..<HASH> 100644 --- a/bosh_cli/spec/unit/core_ext_spec.rb +++ b/bosh_cli/spec/unit/core_ext_spec.rb @@ -86,7 +86,7 @@ describe Object do end it 'has a warn helper' do - should_receive(:warn).with("[WARNING] Could not find keypair".make_yellow) + expect(self).to receive(:warn).with("[WARNING] Could not find keypair".make_yellow) warning("Could not find keypair") end
Fix the last 'should' syntax assertion
cloudfoundry_bosh
train
rb
ee3f02c6786d62f5bcedbef2aee5edba42d4d8b5
diff --git a/snmp_passpersist.py b/snmp_passpersist.py index <HASH>..<HASH> 100644 --- a/snmp_passpersist.py +++ b/snmp_passpersist.py @@ -284,7 +284,10 @@ class PassPersist: Direct call is unnecessary. """ # Renice updater thread to limit overload - os.nice(1) + try: + os.nice(1) + except AttributeError as er: + pass # os.nice is not available on windows time.sleep(self.refresh) try:
allow testing the code on windows os.nice(1) doesn't work on windows
nagius_snmp_passpersist
train
py
aff698970796136ef00ae6e0b29999308d4f5aee
diff --git a/lib/podio/middleware/date_conversion.rb b/lib/podio/middleware/date_conversion.rb index <HASH>..<HASH> 100644 --- a/lib/podio/middleware/date_conversion.rb +++ b/lib/podio/middleware/date_conversion.rb @@ -9,7 +9,7 @@ module Podio # Converts all attributes ending with "_on" to datetime and ending with "date" to date def self.convert_dates(body) - [body].flatten.each do |hash| + [body].flatten.compact.each do |hash| hash.each do |key, value| if value.is_a?(Hash) self.convert_dates(value)
Fixed a bug in the date conversion middleware
podio_podio-rb
train
rb
99bc5b2da9c7f5112f33a89fa6557a99f3cc7b4c
diff --git a/lib/seahorse/client/plugins/endpoint.rb b/lib/seahorse/client/plugins/endpoint.rb index <HASH>..<HASH> 100644 --- a/lib/seahorse/client/plugins/endpoint.rb +++ b/lib/seahorse/client/plugins/endpoint.rb @@ -16,10 +16,6 @@ module Seahorse module Plugins class Endpoint < Plugin - option(:endpoint) { |config| config.api.endpoint } - - option(:ssl_default, true) - # @api private class EndpointHandler < Handler @@ -34,6 +30,10 @@ module Seahorse end + option(:endpoint) { |config| config.api.endpoint } + + option(:ssl_default, true) + handler(EndpointHandler, priority: :build) end
Grouped the plugin configuration under the helper class.
aws_aws-sdk-ruby
train
rb
bd6f60c1b958b2e27716a3ad4bf32ac073f17be1
diff --git a/base/src/main/java/uk/ac/ebi/atlas/search/analyticsindex/solr/AnalyticsQueryClient.java b/base/src/main/java/uk/ac/ebi/atlas/search/analyticsindex/solr/AnalyticsQueryClient.java index <HASH>..<HASH> 100644 --- a/base/src/main/java/uk/ac/ebi/atlas/search/analyticsindex/solr/AnalyticsQueryClient.java +++ b/base/src/main/java/uk/ac/ebi/atlas/search/analyticsindex/solr/AnalyticsQueryClient.java @@ -25,6 +25,7 @@ import java.text.MessageFormat; import java.util.List; import java.util.concurrent.TimeUnit; +import static org.apache.commons.lang3.StringUtils.isBlank; import static uk.ac.ebi.atlas.search.SemanticQuery.isNotEmpty; import static uk.ac.ebi.atlas.search.analyticsindex.solr.AnalyticsQueryClient.Field.*; @@ -165,7 +166,7 @@ public class AnalyticsQueryClient { } private void addQueryClause(Field searchField, String searchValue) { - if (!searchValue.isEmpty()) { + if (!isBlank(searchValue)) { queryClausesBuilder.add(new AnalyticsSolrQueryTree(searchField.toString(), searchValue)); } }
Check for String emptiness using isBlank to guard against nulls
ebi-gene-expression-group_atlas
train
java
8d7c64f30b4c0dafab8ce420946d8c7bfcecfc95
diff --git a/lib/rack/jekyll.rb b/lib/rack/jekyll.rb index <HASH>..<HASH> 100644 --- a/lib/rack/jekyll.rb +++ b/lib/rack/jekyll.rb @@ -19,11 +19,12 @@ module Rack config_file = opts[:config] || "_config.yml" if ::File.exist?(config_file) config = YAML.load_file(config_file) - - @path = config['destination'] || "_site" - @files = ::Dir[@path + "/**/*"].inspect - puts @files.inspect if ENV['RACK_DEBUG'] + @path = config['destination'] end + @path ||= "_site" + + @files = ::Dir[@path + "/**/*"].inspect + puts @files.inspect if ENV['RACK_DEBUG'] @mimes = Rack::Mime::MIME_TYPES.map{|k,v| /#{k.gsub('.','\.')}$/i } options = ::Jekyll.configuration(opts)
Fix broken initialization of instance variables Make sure instance variables are always initialized, not only when a config file exists.
adaoraul_rack-jekyll
train
rb
8e291961059b2d80d4e1f3271f3e239ee61d9fb9
diff --git a/cutil/retry/retry.go b/cutil/retry/retry.go index <HASH>..<HASH> 100644 --- a/cutil/retry/retry.go +++ b/cutil/retry/retry.go @@ -54,17 +54,17 @@ func (r *Retrier) RunRetry() error { finish := make(chan bool, 1) go func() { select { - case <-finish: - return - case <-time.After(600 * time.Second): - return - default: - for { - if sigHandler.GetState() != 0 { - logger.Critical("detected signal. retry failed.") - os.Exit(1) - } + case <-finish: + return + case <-time.After(600 * time.Second): + return + default: + for { + if sigHandler.GetState() != 0 { + logger.Critical("detected signal. retry failed.") + os.Exit(1) } + } } }() diff --git a/cutil/retry/retry_test.go b/cutil/retry/retry_test.go index <HASH>..<HASH> 100644 --- a/cutil/retry/retry_test.go +++ b/cutil/retry/retry_test.go @@ -55,4 +55,4 @@ func TestRetrySad(t *testing.T) { if err.Error() != want.Error() { t.Errorf("unexpected error\n\tgot: %#v\n\twant: %#v", err, want) } -} \ No newline at end of file +}
retry: gofmt
kubicorn_kubicorn
train
go,go
10b60c417dead260666b9077f10d651cebb9c0ca
diff --git a/lib/podio/areas/user.rb b/lib/podio/areas/user.rb index <HASH>..<HASH> 100644 --- a/lib/podio/areas/user.rb +++ b/lib/podio/areas/user.rb @@ -19,5 +19,13 @@ module Podio def find_all_admins_for_org(org_id) list Podio.connection.get("/org/#{org_id}/admin/").body end + + def get_property(name, value) + Podio.connection.get("/user/property/#{name}").body['value'] + end + + def set_property(name, value) + Podio.connection.put("/user/property/#{name}", {:value => value}).status + end end end
Added get and set property operations on User area
podio_podio-rb
train
rb
3fd96a3488dd56ed9744c8b62169d4ab87f3cab7
diff --git a/power-adapters-data/src/main/java/com/nextfaze/poweradapters/data/IncrementalArrayData.java b/power-adapters-data/src/main/java/com/nextfaze/poweradapters/data/IncrementalArrayData.java index <HASH>..<HASH> 100644 --- a/power-adapters-data/src/main/java/com/nextfaze/poweradapters/data/IncrementalArrayData.java +++ b/power-adapters-data/src/main/java/com/nextfaze/poweradapters/data/IncrementalArrayData.java @@ -257,7 +257,6 @@ public abstract class IncrementalArrayData<T> extends AbstractData<T> implements @Override public final void invalidate() { - stopThread(); mDirty = true; mClear = true; }
Don't stop loading thread upon invalidate() in IncrementalArrayData This caused an ongoing load to cancel, which could then result in empty contents, which violates the contract of invalidate().
NextFaze_power-adapters
train
java
426e4e64ae9cfbb1c35ac280584e0b3b3a75e4c8
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,13 +25,15 @@ release = '0.7.2' extensions = [ 'sphinx.ext.autodoc', - 'sphinx.ext.doctest', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.githubpages', 'm2r', ] +if os.getenv('HVAC_RENDER_DOCTESTS') is None: + extensions.append('sphinx.ext.doctest') + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']
Do no run doctest during readthedocs builds
hvac_hvac
train
py
db18c3c40b31777a35c7b8c187bc402ec9dbcf41
diff --git a/lib/url/url.js b/lib/url/url.js index <HASH>..<HASH> 100755 --- a/lib/url/url.js +++ b/lib/url/url.js @@ -19,7 +19,7 @@ var crypto = require('../node/crypto'), var ImboUrl = function(options) { this.transformations = []; this.baseUrl = options.baseUrl; - this.user = options.user || options.publicKey; + this.user = typeof options.user === 'undefined' ? options.publicKey : options.user; this.publicKey = options.publicKey; this.privateKey = options.privateKey; this.extension = options.extension;
Allow explicitly setting user on URLs to null
imbo_imboclient-js
train
js
c9fafb44f1a0dd95b75e8de126cd9cac28d88e32
diff --git a/tests/test_nonlinear.py b/tests/test_nonlinear.py index <HASH>..<HASH> 100644 --- a/tests/test_nonlinear.py +++ b/tests/test_nonlinear.py @@ -261,7 +261,7 @@ def test_gastrans(): if scip.getStatus() == 'timelimit': pytest.skip() - assert abs(scip.getPrimalbound() - 89.08584) < 1.0e-9 + assert abs(scip.getPrimalbound() - 89.08584) < 1.0e-6 def test_quad_coeffs(): """test coefficient access method for quadratic constraints"""
Update test_nonlinear.py Fixing assert failure if scip is compiled using quadprecision
SCIP-Interfaces_PySCIPOpt
train
py
c376b5b605be9fa6402bcfcad661f0dc08a9c05f
diff --git a/cloud/digitalocean/droplet/resources/droplet.go b/cloud/digitalocean/droplet/resources/droplet.go index <HASH>..<HASH> 100644 --- a/cloud/digitalocean/droplet/resources/droplet.go +++ b/cloud/digitalocean/droplet/resources/droplet.go @@ -333,7 +333,7 @@ func (r *Droplet) immutableRender(newResource cloud.Resource, inaccurateCluster for i := 0; i < len(machineProviderConfigs); i++ { machineProviderConfig := machineProviderConfigs[i] - if machineProviderConfig.ServerPool.Name == newResource.(*Droplet).Name && newResource.(*Droplet).ServerPool != nil && serverPool.Type != "node" && newResource.(*Droplet).Name != "" { + if machineProviderConfig.ServerPool.Name == newResource.(*Droplet).Name && newResource.(*Droplet).ServerPool != nil { machineProviderConfig.ServerPool.Image = newResource.(*Droplet).Image machineProviderConfig.ServerPool.Size = newResource.(*Droplet).Size machineProviderConfig.ServerPool.MaxCount = newResource.(*Droplet).Count
cloud,digitalocean: refactor
kubicorn_kubicorn
train
go
66805dc8386760c89ee3455410c480906021a7ab
diff --git a/lib/airbrake-ruby.rb b/lib/airbrake-ruby.rb index <HASH>..<HASH> 100644 --- a/lib/airbrake-ruby.rb +++ b/lib/airbrake-ruby.rb @@ -127,14 +127,6 @@ module Airbrake def merge_context(_context); end end - # @deprecated Use {Airbrake::NoticeNotifier} instead - Notifier = NoticeNotifier - deprecate_constant(:Notifier) if respond_to?(:deprecate_constant) - - # @deprecated Use {Airbrake::NilNoticeNotifier} instead - NilNotifier = NilNoticeNotifier - deprecate_constant(:NilNotifier) if respond_to?(:deprecate_constant) - # NilPerformanceNotifier is a no-op notifier, which mimics # {Airbrake::PerformanceNotifier} and serves only the purpose of making the # library API easier to use.
airbrake-ruby: delete deprecated constants Deleted deprecated `Airbrake::Notifier` & `Airbrake::NilNotifier`.
airbrake_airbrake-ruby
train
rb
81772b97329b9232313120cc438a64a0b891faa1
diff --git a/lib/appsignal/hooks/sidekiq.rb b/lib/appsignal/hooks/sidekiq.rb index <HASH>..<HASH> 100644 --- a/lib/appsignal/hooks/sidekiq.rb +++ b/lib/appsignal/hooks/sidekiq.rb @@ -22,10 +22,10 @@ module Appsignal class SidekiqPlugin include Appsignal::Hooks::Helpers - JOB_KEYS = Set.new(%w( + JOB_KEYS = %w( args backtrace class created_at enqueued_at error_backtrace error_class error_message failed_at jid retried_at retry wrapped - )).freeze + ).freeze def call(_worker, item, _queue) transaction = Appsignal::Transaction.create(
Remove Set usage (#<I>) In PR #<I> the Sidekiq hook `job_keys` method was moved to the `JOB_KEYS` constant. As its value is a `Set` instance the `set` library is required to be loaded beforehand. This was loaded by Sidekiq in <URL> ```
appsignal_appsignal-ruby
train
rb
cb79175d6377f607951ca880b4f5a9dd438bcaf3
diff --git a/lib/semlogr/logger.rb b/lib/semlogr/logger.rb index <HASH>..<HASH> 100644 --- a/lib/semlogr/logger.rb +++ b/lib/semlogr/logger.rb @@ -76,11 +76,11 @@ module Semlogr return true if @sinks.size.zero? return true if severity < @min_severity - if template.nil? && block + if block template, properties = yield properties ||= {} - error = properties[:error] + error = properties.delete(:error) end log_event = create_log_event(severity, template, error, properties)
Handle progname based logging, initially this is not outputting the progname anywhere and this might come later.
semlogr_semlogr
train
rb
45c1528430c3fe0ed4eb8659f9a3312afd7c79b0
diff --git a/test/providers/amplitude.js b/test/providers/amplitude.js index <HASH>..<HASH> 100644 --- a/test/providers/amplitude.js +++ b/test/providers/amplitude.js @@ -13,7 +13,6 @@ describe('Amplitude', function () { analytics.initialize({ 'Amplitude' : test['Amplitude'] }); expect(spy.called).to.be(true); expect(window.amplitude).not.to.be(undefined); - expect(window.amplitude.sendEvents).to.be(undefined); // When the library loads, it will replace the `logEvent` method. var stub = window.amplitude.logEvent;
amplitude: missed a spot
segmentio_analytics.js-core
train
js
9c29c9d0646eaebe4f23575af77b16f181a224e3
diff --git a/examples.py b/examples.py index <HASH>..<HASH> 100644 --- a/examples.py +++ b/examples.py @@ -24,6 +24,6 @@ plt.imshow(im) plt.subplot(2, 2, 3) plt.imshow(chords) plt.subplot(2, 2, 4) -plt.imshow(colored_chords, cmap=plt.cm.spectral) +plt.imshow(colored_chords) plt.subplot(2, 2, 2) plt.hist(ps.metrics.chord_length_distribution(chords), bins=20)
removing spectral colormap, for some reason it's breaking on travis
PMEAL_porespy
train
py
1ff5c49e0758fb39e37d880f1a5d1044dae1d7a2
diff --git a/resources/assets/javascripts/include/field.type_sortable.js b/resources/assets/javascripts/include/field.type_sortable.js index <HASH>..<HASH> 100644 --- a/resources/assets/javascripts/include/field.type_sortable.js +++ b/resources/assets/javascripts/include/field.type_sortable.js @@ -45,7 +45,13 @@ jQuery(document).ready($ => { container.on('DOMNodeInserted DOMNodeRemoved', () => sortable.update()); container.sortable({ items: '> .item', - update: () => sortable.update() + update: () => sortable.update(), + stop: (event, ui) => { + ui.item.find('textarea').trigger('richtextresume'); + }, + start: (event, ui) => { + ui.item.find('textarea').trigger('richtextsuspend'); + } }); }); }); \ No newline at end of file
Fix ckeditor breaking when being sorted
arbory_arbory
train
js
ea4cc5003801dc3b3c53a3105ef7c6397a10fe60
diff --git a/glad/util.py b/glad/util.py index <HASH>..<HASH> 100644 --- a/glad/util.py +++ b/glad/util.py @@ -10,5 +10,5 @@ _API_NAMES = { def api_name(api): api = api.lower() - return _API_NAMES[api] + return _API_NAMES.get(api, api.upper())
glad: don't fail on an unknown api.
Dav1dde_glad
train
py
5ca903113e17639a0550a7af3e260308182cd157
diff --git a/jaraco/packaging/cheese.py b/jaraco/packaging/cheese.py index <HASH>..<HASH> 100644 --- a/jaraco/packaging/cheese.py +++ b/jaraco/packaging/cheese.py @@ -96,7 +96,10 @@ class RevivedDistribution(distutils.dist.Distribution): the long description doesn't load properly (gets unwanted indents), so fix it. """ - lines = io.StringIO(self.metadata.get_long_description()) + desc = self.metadata.get_long_description() + if not isinstance(desc, six.text_type): + desc = desc.decode('utf-8') + lines = io.StringIO(desc) def trim_eight_spaces(line): if line.startswith(' '*8): line = line[8:]
Restore Python 2 support in RevivedDistribution
jaraco_jaraco.packaging
train
py
a49cd8a685d99af3dbda3f09474d813df951e40c
diff --git a/pkg/minikube/tunnel/tunnel.go b/pkg/minikube/tunnel/tunnel.go index <HASH>..<HASH> 100644 --- a/pkg/minikube/tunnel/tunnel.go +++ b/pkg/minikube/tunnel/tunnel.go @@ -200,7 +200,7 @@ func setupBridge(t *tunnel) { return } iface := string(response) - pattern := regexp.MustCompile(`.*member: (en\d+) flags=.*`) + pattern := regexp.MustCompile(`.*member: ((?:vm)?en(?:et)?\d+) flags=.*`) submatch := pattern.FindStringSubmatch(iface) if len(submatch) != 2 { t.status.RouteError = fmt.Errorf("couldn't find member in bridge100 interface: %s", iface)
feat: Use new bridge interface name on OSX Monterey
kubernetes_minikube
train
go
7a81d3b6efc1f01084315b83451ccf57b5a889fd
diff --git a/app/Http/Controllers/Dashboard/ScheduleController.php b/app/Http/Controllers/Dashboard/ScheduleController.php index <HASH>..<HASH> 100644 --- a/app/Http/Controllers/Dashboard/ScheduleController.php +++ b/app/Http/Controllers/Dashboard/ScheduleController.php @@ -140,7 +140,7 @@ class ScheduleController extends Controller $scheduleData = Binput::get('incident'); // Parse the schedule date. - $scheduledAt = app(DateFactory::class)->createNormalized('d/m/Y H:i', $scheduleData['scheduled_at']); + $scheduledAt = app(DateFactory::class)->create('d/m/Y H:i', $scheduleData['scheduled_at']); if ($scheduledAt->isPast()) { $messageBag = new MessageBag();
Fixed editing maintenance scheduled time Closes #<I>.
CachetHQ_Cachet
train
php
8c1ad1302bdf15c7150cb7685f2d989d354b8ab5
diff --git a/examples/main.go b/examples/main.go index <HASH>..<HASH> 100644 --- a/examples/main.go +++ b/examples/main.go @@ -217,6 +217,7 @@ func main() { t, _ := template.New("foo").Parse(indexTemplate) t.Execute(res, providerIndex) }) + log.Println("listening on localhost:3000") log.Fatal(http.ListenAndServe(":3000", p)) }
add log line about which port is being listened on to example this makes using the example easier
markbates_goth
train
go
672586fd8586fb37fe74d00ce087b177d36f305a
diff --git a/test/cluster/cluster.go b/test/cluster/cluster.go index <HASH>..<HASH> 100644 --- a/test/cluster/cluster.go +++ b/test/cluster/cluster.go @@ -659,8 +659,8 @@ func (c *Cluster) DumpLogs(buildLog *buildlog.Log) { fields := strings.Split(job, "-") jobID := strings.Join(fields[len(fields)-2:], "-") cmds := []string{ - fmt.Sprintf("flynn-host inspect %s", jobID), - fmt.Sprintf("flynn-host log --init %s", jobID), + fmt.Sprintf("timeout 10s flynn-host inspect %s", jobID), + fmt.Sprintf("timeout 10s flynn-host log --init %s", jobID), } if err := run(fmt.Sprintf("%s-%s.log", typ, job), instances[0], cmds...); err != nil { continue
test: Timeout `flynn-host` commands in DumpLogs These commands sometimes block indefinitely in CI (e.g. if getting the log of an interactive job which is stuck).
flynn_flynn
train
go
640aff6378b6f47d68645822fc5c2bb3fd737710
diff --git a/salt/modules/test_virtual.py b/salt/modules/test_virtual.py index <HASH>..<HASH> 100644 --- a/salt/modules/test_virtual.py +++ b/salt/modules/test_virtual.py @@ -9,5 +9,5 @@ def __virtual__(): return False -def test(): +def ping(): return True
Fix mis-naming from pylint cleanup
saltstack_salt
train
py
2160d4c8c039907a896248ec811150a37d41f158
diff --git a/lib/dynflow/execution_plan.rb b/lib/dynflow/execution_plan.rb index <HASH>..<HASH> 100644 --- a/lib/dynflow/execution_plan.rb +++ b/lib/dynflow/execution_plan.rb @@ -126,8 +126,8 @@ module Dynflow world.transaction_adapter.rollback if error? end + steps.values.each(&:save) update_state(error? ? :stopped : :planned) - steps.values.each &:save end def skip(step)
First save the steps, then update the status of the execution plan We use the persistence layer to update tasks in the Rails app. Not having the steps available in this phase causes issues there. Dynflow will probably get the events API sooner or later, but for now, this fixes the current issues.
Dynflow_dynflow
train
rb
9dcab39f969474ddf519f972004576b4281f73cf
diff --git a/lib/chamber/namespace_set.rb b/lib/chamber/namespace_set.rb index <HASH>..<HASH> 100644 --- a/lib/chamber/namespace_set.rb +++ b/lib/chamber/namespace_set.rb @@ -102,7 +102,7 @@ class NamespaceSet # Returns a Boolean # def eql?(other) - other.is_a?( Chamber::NamespaceSet) && + other.is_a?( NamespaceSet) && self.namespaces == other.namespaces end
We don't need the additional 'Chamber' namespace
thekompanee_chamber
train
rb
5ffb221d713a917f3cc99a19e9df439c419d6b7f
diff --git a/test/assets/JavaScript.js b/test/assets/JavaScript.js index <HASH>..<HASH> 100644 --- a/test/assets/JavaScript.js +++ b/test/assets/JavaScript.js @@ -217,6 +217,21 @@ describe('assets/JavaScript', function () { expect(javaScript.text, 'to equal', es6Text); }); + it.skip('should tolerate Object spread syntax', function () { + var text = 'const foo = { ...bar };'; + var javaScript = new AssetGraph.JavaScript({ + text: text + }); + expect(javaScript.parseTree, 'to satisfy', { + type: 'Program', + body: [ + ], + sourceType: 'module' + }); + javaScript.markDirty(); + expect(javaScript.text, 'to equal', text); + }); + it('should tolerate JSX syntax', function () { var jsxText = 'function render() { return (<MyComponent />); }'; var javaScript = new AssetGraph.JavaScript({
Add test that won't work until the next esprima release
assetgraph_assetgraph
train
js
b047d7a9bc7ea0e6052b52732c09e57a79a7ae6e
diff --git a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java index <HASH>..<HASH> 100644 --- a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java +++ b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java @@ -72,12 +72,13 @@ public class TraceableExecutorServiceTests { Tracer tracer = this.tracer; TraceKeys traceKeys = new TraceKeys(); SpanNamer spanNamer = new DefaultSpanNamer(); + ExecutorService executorService = this.executorService; // tag::completablefuture[] CompletableFuture<Long> completableFuture = CompletableFuture.supplyAsync(() -> { // perform some logic return 1_000_000L; - }, new TraceableExecutorService(Executors.newCachedThreadPool(), + }, new TraceableExecutorService(executorService, // 'calculateTax' explicitly names the span - this param is optional tracer, traceKeys, spanNamer, "calculateTax")); // end::completablefuture[]
Added docs with an example of CompletableFuture usage - fixed executor service
spring-cloud_spring-cloud-sleuth
train
java
6f031c26cf07dd66c71bb36fb4ab88403ed67220
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -26,6 +26,8 @@ setup(name='sparc.common', 'setuptools', 'zope.interface', 'zope.component', + 'zope.configuration', + 'zope.security' # -*- Extra requirements: -*- ], entry_points="""
update dependencies for zope.configuration and zope.security
davisd50_sparc.common
train
py
4bf1d6838a0bab43926390eaf9f71d2ae5e87748
diff --git a/salt/loader.py b/salt/loader.py index <HASH>..<HASH> 100644 --- a/salt/loader.py +++ b/salt/loader.py @@ -895,6 +895,7 @@ class LazyLoader(salt.utils.lazy.LazyDict): fpath, suffix = self.file_mapping[name] self.loaded_files.append(name) try: + sys.path.append(os.path.dirname(fpath)) if suffix == '.pyx': mod = self.pyximport.load_module(name, fpath, tempfile.gettempdir()) else: @@ -948,6 +949,8 @@ class LazyLoader(salt.utils.lazy.LazyDict): exc_info=True ) return mod + finally: + sys.path.pop() if hasattr(mod, '__opts__'): mod.__opts__.update(self.opts)
Adding current module directory to the sys.path in order to avoid dependencies import errors for other modules at the same level. (<URL>)
saltstack_salt
train
py
6c61a391ca49930eae10001ed49b00c9d4e666ab
diff --git a/lib/acts_as_api/rails_renderer.rb b/lib/acts_as_api/rails_renderer.rb index <HASH>..<HASH> 100644 --- a/lib/acts_as_api/rails_renderer.rb +++ b/lib/acts_as_api/rails_renderer.rb @@ -8,7 +8,7 @@ module ActsAsApi ActionController.add_renderer :acts_as_api_jsonp do |json, options| json = ActiveSupport::JSON.encode(json) unless json.respond_to?(:to_str) json = "#{options[:callback]}(#{json}, #{response.status})" unless options[:callback].blank? - self.content_type ||= options[:callback].blank? ? Mime::JSON : Mime::JS + self.content_type ||= options[:callback].blank? ? Mime[:json] : Mime[:js] self.response_body = json end end
updates way to access registered mime types
fabrik42_acts_as_api
train
rb
ff0ff37f3e6a970b05e4d8b3e7a6a7caf6d25d5c
diff --git a/html/pfappserver/root/static/admin/searches.js b/html/pfappserver/root/static/admin/searches.js index <HASH>..<HASH> 100644 --- a/html/pfappserver/root/static/admin/searches.js +++ b/html/pfappserver/root/static/admin/searches.js @@ -65,7 +65,11 @@ $(function() { } } } - location.hash = url; + if(location.hash == url) { + $(window).hashchange(); + } else { + location.hash = url; + } return false; });
Will refresh the page the simple search hash is the same as the current hash
inverse-inc_packetfence
train
js
28eadbf13158f62c6d65cec975896807bb9023eb
diff --git a/windows.py b/windows.py index <HASH>..<HASH> 100644 --- a/windows.py +++ b/windows.py @@ -45,6 +45,11 @@ class PyMouse(PyMouseMeta): def move(self, x, y): windll.user32.SetCursorPos(x, y) + + def position(self): + pt = POINT() + windll.user32.GetCursorPos(byref(pt)) + return pt.x, pt.y def screen_size(self): width = GetSystemMetrics(0)
copy-paste code for mouse position in Windows
pepijndevos_PyMouse
train
py
c8657b1e7dd8589529695dd0c43157c2346acb82
diff --git a/lib/hard-basic-dependency-plugin.js b/lib/hard-basic-dependency-plugin.js index <HASH>..<HASH> 100644 --- a/lib/hard-basic-dependency-plugin.js +++ b/lib/hard-basic-dependency-plugin.js @@ -3,6 +3,10 @@ const LoggerFactory = require('./logger-factory'); const pluginCompat = require('./util/plugin-compat'); const relateContext = require('./util/relate-context'); +let LocalModule; +try { + LocalModule = require('webpack/lib/dependencies/LocalModule'); +} catch (_) {} function flattenPrototype(obj) { if (typeof obj === 'string') { @@ -196,7 +200,10 @@ const freezeArgument = { return methods.mapFreeze('Dependency', null, arg, extra); }, localModule(arg, dependency, extra, methods) { - // ... + return { + name: arg.name, + idx: arg.idx, + }; }, regExp(arg, dependency, extra, methods) { return arg ? arg.source : false; @@ -251,7 +258,7 @@ const thawArgument = { return methods.mapThaw('Dependency', null, arg, extra); }, localModule(arg, frozen, extra, methods) { - + return new LocalModule(extra.module, arg.name, arg.idx); }, regExp(arg, frozen, extra, methods) { return arg ? new RegExp(arg) : arg;
Serialize LocalDependency's localModule member
mzgoddard_hard-source-webpack-plugin
train
js
6c92e47855778ec7ba124aec8332c0f17e61ae91
diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js index <HASH>..<HASH> 100644 --- a/lib/determine-basal/determine-basal.js +++ b/lib/determine-basal/determine-basal.js @@ -220,6 +220,7 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ }); // set eventualBG to include effect of (half of remaining) carbs console.error("PredBGs:",JSON.stringify(predBGs)); + rT.predBGs = predBGs; eventualBG = Math.round(predBGs[predBGs.length-1]); rT.eventualBG = eventualBG; minPredBG = Math.min(minPredBG, eventualBG);
write predBGs to rT object
openaps_oref0
train
js
3aa0ff0e618647790de049bd9b4cbe6b96f981cd
diff --git a/spec/integration/installation_spec.rb b/spec/integration/installation_spec.rb index <HASH>..<HASH> 100644 --- a/spec/integration/installation_spec.rb +++ b/spec/integration/installation_spec.rb @@ -1,6 +1,6 @@ require 'integration_spec_helper' -describe 'cap install', slow: true do +describe 'cap install' do context 'with defaults' do before :all do
include installation integration tests in main suite run
capistrano_capistrano
train
rb
1612ead9d28a83296f77fe14c4f03f95e25950a7
diff --git a/openquake/baselib/parallel.py b/openquake/baselib/parallel.py index <HASH>..<HASH> 100644 --- a/openquake/baselib/parallel.py +++ b/openquake/baselib/parallel.py @@ -445,6 +445,8 @@ class IterResult(object): elif isinstance(result, Result): val = result.get() self.received.append(len(result.pik)) + if hasattr(result, 'nbytes'): + nbytes +=result.nbytes else: # this should never happen raise ValueError(result) if OQ_DISTRIBUTE == 'processpool' and sys.platform != 'darwin': @@ -462,6 +464,9 @@ class IterResult(object): logging.info('Received %s from %d outputs in %d seconds, biggest ' 'output=%s', humansize(tot), len(self.received), time.time() - t0, humansize(max_per_output)) + if nbytes: + logging.info('Received nbytes %s', + {k: humansize(v) for k, v in nbytes.items()}) def save_task_info(self, mon, mem_gb): if self.hdf5:
Logged the received sizes Former-commit-id: 0c<I>eb3bb<I>fac<I>dc<I>d<I>ad<I>cb9b8
gem_oq-engine
train
py
cf5ab08dc1fc88d62d4ae57f40bf20de3c4830e9
diff --git a/src/ansiblelint/runner.py b/src/ansiblelint/runner.py index <HASH>..<HASH> 100644 --- a/src/ansiblelint/runner.py +++ b/src/ansiblelint/runner.py @@ -83,13 +83,19 @@ class Runner: files: List[Lintable] = list() matches: List[MatchError] = list() + # remove exclusions + for lintable in self.lintables.copy(): + if self.is_excluded(str(lintable.path.resolve())): + _logger.debug("Excluded %s", lintable) + self.lintables.remove(lintable) + # -- phase 1 : syntax check in parallel -- def worker(lintable: Lintable) -> List[MatchError]: return AnsibleSyntaxCheckRule._get_ansible_syntax_check_matches(lintable) # playbooks: List[Lintable] = [] for lintable in self.lintables: - if self.is_excluded(str(lintable.path.resolve())) or lintable.kind != 'playbook': + if lintable.kind != 'playbook': continue files.append(lintable)
Remove exclusions from start Fixed bug where ansible-lint --exclude foo.yml foo.yml may endup processing the file.
ansible_ansible-lint
train
py
63d983cd93e3f25b679f6b17726c9eb2d5ca7636
diff --git a/drivers/javascript/rethinkdb/net/connection.js b/drivers/javascript/rethinkdb/net/connection.js index <HASH>..<HASH> 100644 --- a/drivers/javascript/rethinkdb/net/connection.js +++ b/drivers/javascript/rethinkdb/net/connection.js @@ -295,7 +295,11 @@ rethinkdb.Connection.prototype.recv_ = function(data) { break; case Response.StatusCode.SUCCESS_EMPTY: delete this.outstandingQueries_[response.getToken()] - if (request.callback) request.callback(); + if (request.iterate) { + if (request.done) request.done(); + } else { + if (request.callback) request.callback(); + } break; case Response.StatusCode.SUCCESS_STREAM: delete this.outstandingQueries_[response.getToken()]
js client, fixes bug for michel
rethinkdb_rethinkdb
train
js
59f05b16023efac6b8e61ceb0b175049d5ae7c93
diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index <HASH>..<HASH> 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -1958,7 +1958,7 @@ class core_renderer extends renderer_base { } if ($table->rotateheaders) { // we need to wrap the heading content - $heading->text = $this->output_tag('span', '', $heading->text); + $heading->text = $this->output_tag('span', null, $heading->text); } $attributes = array(
NOBUG: Fix use of output_tag() causing warnings here and there.
moodle_moodle
train
php
d29bc249a3976474a17d40a5d460819ae83f7f87
diff --git a/lib/discordrb/commands/command_bot.rb b/lib/discordrb/commands/command_bot.rb index <HASH>..<HASH> 100644 --- a/lib/discordrb/commands/command_bot.rb +++ b/lib/discordrb/commands/command_bot.rb @@ -82,7 +82,13 @@ module Discordrb::Commands end def command(name, attributes = {}, &block) - @commands[name] = Command.new(name, attributes, &block) + if name.is_a? Array + new_command = Command.new(name[0], attributes, &block) + name.each { |n| @commands[n] = new_command } + new_command + else + @commands[name] = Command.new(name, attributes, &block) + end end def execute_command(name, event, arguments, chained = false)
Add command aliases to CommandBot
meew0_discordrb
train
rb
7f2b69d7450408b5dd4bb69b618bce4d882e572c
diff --git a/flask_oauthlib/client.py b/flask_oauthlib/client.py index <HASH>..<HASH> 100644 --- a/flask_oauthlib/client.py +++ b/flask_oauthlib/client.py @@ -292,10 +292,10 @@ class OAuthRemoteApp(object): attr = getattr(self, '_%s' % key) if attr: return attr - if default is not False and not self.app_key: - # since it has no app_key, use the original property - # YES, it is `attr`, not default - return attr + if not self.app_key: + if default is not False: + return default + return None app = self.oauth.app or current_app config = app.config[self.app_key] if default is not False:
Fix client property. #<I>
lepture_flask-oauthlib
train
py
8862d88f46459ffa5a216ed867d14cbbca080c88
diff --git a/lib/ohai/mixin/dmi_decode.rb b/lib/ohai/mixin/dmi_decode.rb index <HASH>..<HASH> 100644 --- a/lib/ohai/mixin/dmi_decode.rb +++ b/lib/ohai/mixin/dmi_decode.rb @@ -34,9 +34,9 @@ module ::Ohai::Mixin::DmiDecode return "vmware" when /Manufacturer: Xen/ return "xen" - when /Product Name: VirtualBox/ + when /Product.*: VirtualBox/ return "vbox" - when /Product Name: OpenStack/ + when /Product.*: OpenStack/ return "openstack" when /Manufacturer: QEMU|Product Name: (KVM|RHEV)/ return "kvm"
Update the DMI decode mixin for Solaris Linux / BSD use 'Product Name:' while Solaris uses 'Product:' Product.*: should be just fine
chef_ohai
train
rb
aea3f70fa57d40ab3ebf28ed9bbf8cd2c222783f
diff --git a/Tests/app/Resources/config.php b/Tests/app/Resources/config.php index <HASH>..<HASH> 100644 --- a/Tests/app/Resources/config.php +++ b/Tests/app/Resources/config.php @@ -61,7 +61,13 @@ $container->loadFromExtension('doctrine', array( 'orm' => array( 'auto_mapping' => true ), - 'dbal' => array() + 'dbal' => array( + 'connections' => array( + 'default' => array( + 'driver' => 'pdo_sqlite', + ) + ) + ) )); $container->loadFromExtension( 'mink',
fix PDOException "could not find driver" when running tests
formapro_JsFormValidatorBundle
train
php
cbb1384757e54252a9a333828e535ca5596eaca1
diff --git a/wafer/schedule/admin.py b/wafer/schedule/admin.py index <HASH>..<HASH> 100644 --- a/wafer/schedule/admin.py +++ b/wafer/schedule/admin.py @@ -35,6 +35,9 @@ class SlotAdminForm(forms.ModelForm): class SlotAdmin(admin.ModelAdmin): form = SlotAdminForm + list_display = ('__unicode__', 'end_time') + list_editable = ('end_time',) + admin.site.register(Slot, SlotAdmin) admin.site.register(Venue)
Add end_time as editable on the slot list view to make tweaking times easier
CTPUG_wafer
train
py
b988fe5f94b8d1a5358cb04da02e1d8f220ef416
diff --git a/admin/index.php b/admin/index.php index <HASH>..<HASH> 100644 --- a/admin/index.php +++ b/admin/index.php @@ -249,7 +249,7 @@ } require_once($CFG->libdir.'/statslib.php'); if (!stats_upgrade_for_roles_wrapper()) { - error('Couldn\'t upgrade the stats tables to use the new roles system'); + notify('Couldn\'t upgrade the stats tables to use the new roles system'); } if (!update_capabilities()) { error('Had trouble upgrading the core capabilities for the Roles System');
DOn't terminate upgrade if stats didn't work
moodle_moodle
train
php
6562f34641372e98cf3c5df07cf8777cd3232688
diff --git a/skosprovider/registry.py b/skosprovider/registry.py index <HASH>..<HASH> 100644 --- a/skosprovider/registry.py +++ b/skosprovider/registry.py @@ -35,7 +35,7 @@ class Registry: If keyword ids is present, get only the providers with this id. ''' if not 'ids' in kwargs: - return self.providers.values() + return list(self.providers.values()) else: return [self.providers[k] for k in self.providers.keys() if k in kwargs['ids']]
Fix for py<I>. Fix the unit tests for get_providers on py<I>. Makes all test succeed again.
koenedaele_skosprovider
train
py
36a57945030fe96861b92ef18fbf07cf3f108dc9
diff --git a/src/main/java/com/jayway/maven/plugins/android/AbstractAndroidMojo.java b/src/main/java/com/jayway/maven/plugins/android/AbstractAndroidMojo.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/jayway/maven/plugins/android/AbstractAndroidMojo.java +++ b/src/main/java/com/jayway/maven/plugins/android/AbstractAndroidMojo.java @@ -211,7 +211,7 @@ public abstract class AbstractAndroidMojo extends AbstractMojo { /** * Generates R.java into a different package. * - * @parameter + * @parameter expression="${android.customPackage}" */ protected String customPackage;
Allow setting -Dandroid.customPackage from command line.
simpligility_android-maven-plugin
train
java
f43e855d5371c8c53ef0899a0c39efe734364b74
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -199,7 +199,8 @@ module.exports = function(pc, opts) { function completeConnection() { // Clean any cached media types now that we have potentially new remote description if (pc.__mediaTypes) { - delete pc.__mediaTypes; + // Set defined as opposed to delete, for compatibility purposes + pc.__mediaTypes = undefined; } if (VALID_RESPONSE_STATES.indexOf(pc.signalingState) >= 0) {
Set __mediaTypes to undefined as opposed to delete
rtc-io_rtc-taskqueue
train
js
7fb280a739f49ad5df249643e3ff62f5f30cfcda
diff --git a/rules/generic/src/NodeTypeAnalyzer/CallTypeAnalyzer.php b/rules/generic/src/NodeTypeAnalyzer/CallTypeAnalyzer.php index <HASH>..<HASH> 100644 --- a/rules/generic/src/NodeTypeAnalyzer/CallTypeAnalyzer.php +++ b/rules/generic/src/NodeTypeAnalyzer/CallTypeAnalyzer.php @@ -80,9 +80,12 @@ final class CallTypeAnalyzer { $classReflection = $this->reflectionProvider->getClass($className); - /** @var string $methodName */ $methodName = $this->nodeNameResolver->getName($node->name); + if (! $methodName) { + return []; + } + $scope = $node->getAttribute(AttributeKey::SCOPE); if (! $scope instanceof Scope) { return [];
Fix CallTypeAnalyzer when methodName is null (#<I>)
rectorphp_rector
train
php
4f73f8094aa2544aa091c35c7d83ed6af6ad70c8
diff --git a/ultraviewpager/src/main/java/com/tmall/ultraviewpager/UltraViewPagerAdapter.java b/ultraviewpager/src/main/java/com/tmall/ultraviewpager/UltraViewPagerAdapter.java index <HASH>..<HASH> 100644 --- a/ultraviewpager/src/main/java/com/tmall/ultraviewpager/UltraViewPagerAdapter.java +++ b/ultraviewpager/src/main/java/com/tmall/ultraviewpager/UltraViewPagerAdapter.java @@ -49,7 +49,7 @@ class UltraViewPagerAdapter extends PagerAdapter { void resetPosition(); } - private static final int INFINITE_RATIO = 4; + private static final int INFINITE_RATIO = 400; public static final String MULTISCR_TAG = "multi_scr_tag_"; private PagerAdapter adapter;
Update infinite ratio to <I>
alibaba_UltraViewPager
train
java
4ac5ba93c24654bc2aacf514adb71f7cc71d3d1c
diff --git a/eulfedora/server.py b/eulfedora/server.py index <HASH>..<HASH> 100644 --- a/eulfedora/server.py +++ b/eulfedora/server.py @@ -68,7 +68,6 @@ from eulfedora.models import DigitalObject from eulfedora.util import AuthorizingServerConnection, \ RelativeServerConnection, parse_rdf, parse_xml_object, RequestFailed from eulfedora.xml import SearchResults, NewPids -from eulfedora import cryptutil logger = logging.getLogger(__name__) @@ -152,6 +151,7 @@ class Repository(object): if username is None and password is None: try: from django.conf import settings + from eulfedora import cryptutil if request is not None and request.user.is_authenticated() and \ FEDORA_PASSWORD_SESSION_KEY in request.session:
only import cryptutil when we attempt to import django settings, so that Repository can be used without django installed
emory-libraries_eulfedora
train
py
70e8d0e3e95d3cb6bc191c015582315081ea824f
diff --git a/src/com/qiniu/resumable/ResumableIO.java b/src/com/qiniu/resumable/ResumableIO.java index <HASH>..<HASH> 100644 --- a/src/com/qiniu/resumable/ResumableIO.java +++ b/src/com/qiniu/resumable/ResumableIO.java @@ -138,17 +138,18 @@ public class ResumableIO { ret.onFailure(e); return; } + put(uptoken, key, isa, extra, new JSONObjectRet() { @Override public void onSuccess(JSONObject obj) { - ret.onSuccess(obj); isa.close(); + ret.onSuccess(obj); } @Override public void onFailure(Exception ex) { - ret.onFailure(ex); isa.close(); + ret.onFailure(ex); } }); }
update resumable io putfile, close inputstream first
qiniu_android-sdk
train
java
f72dce2c18976b0a2b30dd72bd98c4ef468d187b
diff --git a/tests/test_decompressor.py b/tests/test_decompressor.py index <HASH>..<HASH> 100644 --- a/tests/test_decompressor.py +++ b/tests/test_decompressor.py @@ -219,7 +219,7 @@ class TestDecompressor_decompress(unittest.TestCase): cctx = zstd.ZstdCompressor(write_content_size=False) frame = cctx.compress(source) - dctx = zstd.ZstdDecompressor(max_window_size=1) + dctx = zstd.ZstdDecompressor(max_window_size=2**zstd.WINDOWLOG_MIN) with self.assertRaisesRegexp( zstd.ZstdError, 'decompression error: Frame requires too much memory'):
tests: pass actual minimum window size zstd <I> is more strict about what values it accepts. 1 is no longer accepted.
indygreg_python-zstandard
train
py
ea340b54b3f66b7574133ddf8edfb4ab5cbae15e
diff --git a/bokeh/charts/builder.py b/bokeh/charts/builder.py index <HASH>..<HASH> 100644 --- a/bokeh/charts/builder.py +++ b/bokeh/charts/builder.py @@ -488,7 +488,7 @@ class Builder(HasProps): def collect_attr_kwargs(self): attrs = set(self.default_attributes.keys()) - set( - self.__class__.default_attributes.keys()) + super(self.__class__, self).default_attributes) return attrs def get_group_kwargs(self, group, attrs):
fix collect_attr_kwargs so it really checks the super class for extra group kwrgs
bokeh_bokeh
train
py
2130ed1dabd815bbcddd5deb638337a968651172
diff --git a/provision/docker/docker.go b/provision/docker/docker.go index <HASH>..<HASH> 100644 --- a/provision/docker/docker.go +++ b/provision/docker/docker.go @@ -225,6 +225,10 @@ func start(app provision.App, imageId string, w io.Writer) (*container, error) { if err != nil { return nil, err } + err = c.attach(w) + if err != nil { + return nil, err + } err = c.setImage(imageId) if err != nil { return nil, err diff --git a/provision/docker/docker_test.go b/provision/docker/docker_test.go index <HASH>..<HASH> 100644 --- a/provision/docker/docker_test.go +++ b/provision/docker/docker_test.go @@ -667,6 +667,8 @@ func (s *S) TestStart(c *gocheck.C) { c.Assert(err, gocheck.IsNil) c.Assert(cont2.Image, gocheck.Equals, imageId) c.Assert(cont2.Status, gocheck.Equals, "running") + args := []string{"attach", id} + c.Assert(fexec.ExecutedCmd("docker", args), gocheck.Equals, true) } func (s *S) TestContainerRunCmdError(c *gocheck.C) {
docker: attaching the container on start.
tsuru_tsuru
train
go,go
57e8c5bdd06addb930bcbadee43ddc39299305c2
diff --git a/Vpc/Mail/HtmlParser.php b/Vpc/Mail/HtmlParser.php index <HASH>..<HASH> 100644 --- a/Vpc/Mail/HtmlParser.php +++ b/Vpc/Mail/HtmlParser.php @@ -75,6 +75,7 @@ class Vpc_Mail_HtmlParser ); $appendTags = array(); + if (!isset($attributes['style'])) $attributes['style'] = ''; foreach ($this->_styles as $s) { if (self::_matchesStyle($stack, $s)) { $appendTags = array(); @@ -97,6 +98,8 @@ class Vpc_Mail_HtmlParser } else if ($value != 'left') { $attributes['align'] = $value; } + } else { + $attributes['style'] .= "$style: $value; "; } } }
support any styles in html styles, backport
koala-framework_koala-framework
train
php
f98b4d5c217aa6057f3bcef2a9230311e11183cb
diff --git a/connector/src/main/java/org/jboss/as/connector/services/ResourceAdapterActivatorService.java b/connector/src/main/java/org/jboss/as/connector/services/ResourceAdapterActivatorService.java index <HASH>..<HASH> 100644 --- a/connector/src/main/java/org/jboss/as/connector/services/ResourceAdapterActivatorService.java +++ b/connector/src/main/java/org/jboss/as/connector/services/ResourceAdapterActivatorService.java @@ -106,7 +106,7 @@ public final class ResourceAdapterActivatorService extends AbstractResourceAdapt ConnectorServices.RESOURCE_ADAPTER_SERVICE_PREFIX.append(this.value.getDeployment().getDeploymentName())); context.getChildTarget() - .addService(ServiceName.of(value.getDeployment().getDeploymentName()), + .addService(ConnectorServices.RESOURCE_ADAPTER_SERVICE_PREFIX.append(value.getDeployment().getDeploymentName()), new ResourceAdapterService(value.getDeployment().getResourceAdapter())).setInitialMode(Mode.ACTIVE) .install(); DEPLOYMENT_CONNECTOR_LOGGER.debugf("Starting service %s", ConnectorServices.RESOURCE_ADAPTER_ACTIVATOR_SERVICE);
AS7-<I> JCA seems to be installing services with no prefix
wildfly_wildfly
train
java
b291d9b847ee94d3a4152414c0d4b988757c7afd
diff --git a/js/test/test_base.js b/js/test/test_base.js index <HASH>..<HASH> 100644 --- a/js/test/test_base.js +++ b/js/test/test_base.js @@ -28,7 +28,7 @@ describe ('ccxt base code', () => { assert.strictEqual (ccxt.safeFloat ({}, 'float', 0), 0) }) - it ('setTimeout_safe is working', (done) => { + it.skip ('setTimeout_safe is working', (done) => { const start = Date.now () const calls = []
skipping setTimeout_safe test on appveyor
ccxt_ccxt
train
js
076b15903ae001738e80769bf9e4afb2d6d8a0b0
diff --git a/test/client_test.go b/test/client_test.go index <HASH>..<HASH> 100644 --- a/test/client_test.go +++ b/test/client_test.go @@ -129,7 +129,7 @@ func createClientFromEnv(t testEnv, waitUntilReady bool, connection ...*driver.C t.Fatalf("Failed to create new client: %s", describe(err)) } if waitUntilReady { - timeout := time.Minute + timeout := 3*time.Minute ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() if up := waitUntilServerAvailable(ctx, c, t); !up { @@ -210,7 +210,7 @@ func TestCreateClientHttpConnectionCustomTransport(t *testing.T) { if err != nil { t.Fatalf("Failed to create new client: %s", describe(err)) } - timeout := time.Minute + timeout := 3*time.Minute ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() if up := waitUntilServerAvailable(ctx, c, t); !up {
<I> secs are too short for full busy cluster
arangodb_go-driver
train
go
85f21b503719f6ff4eb259887b4c178f4be204e1
diff --git a/aws/resource_aws_cloudwatch_event_api_destination.go b/aws/resource_aws_cloudwatch_event_api_destination.go index <HASH>..<HASH> 100644 --- a/aws/resource_aws_cloudwatch_event_api_destination.go +++ b/aws/resource_aws_cloudwatch_event_api_destination.go @@ -3,7 +3,6 @@ package aws import ( "fmt" "log" - "math" "regexp" "github.com/aws/aws-sdk-go/aws" @@ -44,7 +43,7 @@ func resourceAwsCloudWatchEventApiDestination() *schema.Resource { "invocation_rate_limit_per_second": { Type: schema.TypeInt, Optional: true, - ValidateFunc: validation.IntBetween(1, math.MaxInt64), + ValidateFunc: validation.IntBetween(1, 300), Default: 300, }, "http_method": {
r/aws_cloudwatch_event_api_destination: Maximum value for 'invocation_rate_limit_per_second' is '<I>'.
terraform-providers_terraform-provider-aws
train
go
4d84909cbd6f5590dd3b7649750a9e5208907e45
diff --git a/test/integration/client/type-coercion-tests.js b/test/integration/client/type-coercion-tests.js index <HASH>..<HASH> 100644 --- a/test/integration/client/type-coercion-tests.js +++ b/test/integration/client/type-coercion-tests.js @@ -179,7 +179,7 @@ suite.test('date range extremes', function (done) { })) client.query('SELECT $1::TIMESTAMPTZ as when', ['4713-12-31 12:31:59 BC GMT'], assert.success(function (res) { - assert.equal(res.rows[0].when.getFullYear(), -4713) + assert.equal(res.rows[0].when.getFullYear(), -4712) })) client.query('SELECT $1::TIMESTAMPTZ as when', ['275760-09-13 00:00:00 -15:00'], assert.success(function (res) {
Fix integration test for <I> of postgres-date sub-dependency (#<I>)
brianc_node-postgres
train
js
e8f54e4702eed1c5821feee694204c1f8d0ea803
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -4,8 +4,10 @@ import email.utils import os import re import sys + from setuptools import setup + if sys.version_info < (2, 7): sys.exit("Python 2.7 or newer is required for check-manifest") @@ -44,7 +46,7 @@ setup( 'Development Status :: 4 - Beta', 'Environment :: Console', 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License' + 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7',
Oops, that trailing comma is _important_
mgedmin_check-manifest
train
py
6a46b84fe1bbf6177d74db00a9065b56e96755d8
diff --git a/pliers/converters/base.py b/pliers/converters/base.py index <HASH>..<HASH> 100644 --- a/pliers/converters/base.py +++ b/pliers/converters/base.py @@ -55,7 +55,8 @@ def get_converter(in_type, out_type, *args, **kwargs): if not issubclass(cls, Converter): continue concrete = len(cls.__abstractmethods__) == 0 - if cls._input_type == in_type and cls._output_type == out_type and concrete: + if cls._input_type == in_type and cls._output_type == out_type and \ + concrete and cls.available: try: conv = cls(*args, **kwargs) return conv
in get_converters, make sure converter is environment-ready
tyarkoni_pliers
train
py
04d3c9babc65aafa87de776c20727b79f666d82f
diff --git a/pauldron-hearth/lib/PermissionDiscovery.js b/pauldron-hearth/lib/PermissionDiscovery.js index <HASH>..<HASH> 100644 --- a/pauldron-hearth/lib/PermissionDiscovery.js +++ b/pauldron-hearth/lib/PermissionDiscovery.js @@ -52,8 +52,8 @@ function consolidatePermissions(permissions) { function securityLabelsToScopes(labels) { return LabelingUtils.trimmedLabels( - LabelingUtils.augmentSecurityLabel( - LabelingUtils.filterLabelsOfInterest(labels) + LabelingUtils.filterLabelsOfInterest( + LabelingUtils.augmentSecurityLabel(labels) ) ); }
fix the order of applying augmentation and filtering of designated labeling systems.
mojitoholic_pauldron
train
js
f63a8aab97e789a8b90c94ecc0414e1f8a3d5db3
diff --git a/pywal/reload.py b/pywal/reload.py index <HASH>..<HASH> 100644 --- a/pywal/reload.py +++ b/pywal/reload.py @@ -26,7 +26,7 @@ def xrdb(xrdb_files=None): if shutil.which("xrdb") and OS != "Darwin": for file in xrdb_files: - subprocess.Popen(["xrdb", "-merge", "-quiet", file]) + subprocess.run(["xrdb", "-merge", "-quiet", file]) def gtk():
reload: revert to using subprocess.run to wait for each merge to finish
dylanaraps_pywal
train
py
987afad3f7c910d8e035335ecb4c7c91abf24b39
diff --git a/src/input/pointer.js b/src/input/pointer.js index <HASH>..<HASH> 100644 --- a/src/input/pointer.js +++ b/src/input/pointer.js @@ -131,7 +131,7 @@ ]; // internal constants - //var MOUSE_WHEEL = 0; + var MOUSE_WHEEL = 0; var POINTER_MOVE = 1; var POINTER_DOWN = 2; var POINTER_UP = 3; @@ -354,6 +354,17 @@ } } break; + + case MOUSE_WHEEL: + // event inside of bounds: trigger the MOUSE_WHEEL callback + if (eventInBounds) { + // trigger the corresponding callback + if (triggerEvent(handlers, e.type, e, e.pointerId)) { + handled = true; + break; + } + } + break; } } });
fix: mouse-wheel events were ignored
melonjs_melonJS
train
js
87bf3a27846c20b70378f0476ec337131d74c228
diff --git a/hashmap.go b/hashmap.go index <HASH>..<HASH> 100644 --- a/hashmap.go +++ b/hashmap.go @@ -157,11 +157,24 @@ func (m *HashMap) DelHashedKey(hashedKey uintptr) { return } - _, element := m.indexElement(hashedKey) + // inline HashMap.searchItem() + var element *ListElement +ElementLoop: + for _, element = m.indexElement(hashedKey); element != nil; element = element.Next() { + if element.keyHash == hashedKey { + + break ElementLoop + + } + + if element.keyHash > hashedKey { + return + } + } + if element == nil { return } - m.deleteElement(element) list.Delete(element) }
Fix delete action when using hashed key Search for the desired key in the list returned by indexElement instead of deleting the first element returned
cornelk_hashmap
train
go
f14e6070ce90ba210e5022dfa1cebf5f8bf9d8ba
diff --git a/src/Cathedral/Builder/EntityAbstractBuilder.php b/src/Cathedral/Builder/EntityAbstractBuilder.php index <HASH>..<HASH> 100644 --- a/src/Cathedral/Builder/EntityAbstractBuilder.php +++ b/src/Cathedral/Builder/EntityAbstractBuilder.php @@ -142,7 +142,7 @@ MBODY; // METHOD:getRelationChild $functionName = ucwords($tableName); - $method = $this->buildMethod("fetch{$functionName}"); + $method = $this->buildMethod("gather{$functionName}"); $body = <<<MBODY \${$child->tableName} = new \\{$child->namespace_model}\\{$child->modelName}(); return \${$child->tableName}->select(['fk_{$this->getNames()->tableName}' => \$this->{$this->getNames()->primary}]);
Related Tables: function changed to fetch for Single and gather for Many
CathedralCode_Builder
train
php
7125e4d76f495469bd24c206b7e6c1ee67a8bcab
diff --git a/foolbox/attacks/base.py b/foolbox/attacks/base.py index <HASH>..<HASH> 100644 --- a/foolbox/attacks/base.py +++ b/foolbox/attacks/base.py @@ -324,7 +324,7 @@ class FixedEpsilonAttack(AttackWithDistance): xpcs_ = [restore_type(xpc) for xpc in xpcs] if was_iterable: - return xps_, xpcs_, restore_type(success) + return xps_, xpcs_, restore_type(success_) else: assert len(xps_) == 1 assert len(xpcs_) == 1 @@ -428,7 +428,7 @@ class MinimizationAttack(AttackWithDistance): xpcs_ = [restore_type(xpc) for xpc in xpcs] if was_iterable: - return [xp_] * K, xpcs_, restore_type(success) + return [xp_] * K, xpcs_, restore_type(success_) else: assert len(xpcs_) == 1 return xp_, xpcs_[0], restore_type(success_.squeeze(axis=0))
fixed __call__ implementations
bethgelab_foolbox
train
py
116b011ff201380e7b1b3353eca29ed0481e92a5
diff --git a/loadCSS.js b/loadCSS.js index <HASH>..<HASH> 100644 --- a/loadCSS.js +++ b/loadCSS.js @@ -33,7 +33,7 @@ function loadCSS( href, before, media, callback ){ ss.onloadcssdefined = function( cb ){ var defined; for( var i = 0; i < sheets.length; i++ ){ - if( sheets[ i ].href && sheets[ i ].href.indexOf( href ) > -1 ){ + if( sheets[ i ].href && sheets[ i ].href === ss.href ){ defined = true; } }
allow relative paths to work. fixes #<I>
filamentgroup_loadCSS
train
js
538d7edbcecbe0e9e6d87211232ca98d8471a6a3
diff --git a/test/worker_spec.rb b/test/worker_spec.rb index <HASH>..<HASH> 100644 --- a/test/worker_spec.rb +++ b/test/worker_spec.rb @@ -30,7 +30,7 @@ describe 'the Worker' do end teardown do - @client.close + @pusher.close end given 'valid job data is pushed' do
Fixed a bug in the Worker spec
JScott_robot_sweatshop
train
rb
a7b11b01d7f7228a3b8796cfd4404a61b1534593
diff --git a/make/tools/genstubs/GenStubs.java b/make/tools/genstubs/GenStubs.java index <HASH>..<HASH> 100644 --- a/make/tools/genstubs/GenStubs.java +++ b/make/tools/genstubs/GenStubs.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -316,7 +316,8 @@ public class GenStubs { } defs.add(def); } - return m.TopLevel(tree.packageAnnotations, tree.pid, defs.toList()); + tree.defs = tree.defs.intersect(defs.toList()); + return tree; } @Override
<I>: JDK-<I> breaks a bootcycle build Reviewed-by: jjg
wmdietl_jsr308-langtools
train
java
bc2d5fedc18d56c1b22700a28c07dda960010964
diff --git a/lib/chef/mixin/shell_out.rb b/lib/chef/mixin/shell_out.rb index <HASH>..<HASH> 100644 --- a/lib/chef/mixin/shell_out.rb +++ b/lib/chef/mixin/shell_out.rb @@ -29,7 +29,6 @@ class Chef # we use 'en_US.UTF-8' by default because we parse localized strings in English as an API and # generally must support UTF-8 unicode. def shell_out(*args, **options) - args = args.dup options = options.dup env_key = options.has_key?(:env) ? :env : :environment options[env_key] = {
remove duping the args hash we only ever did this in order to mutate the options and with the **options syntax we don't need to do this anymore.
chef_chef
train
rb
602883a34a818f47f90651de99d786773b72d4a7
diff --git a/pandas/tseries/tests/test_timeseries.py b/pandas/tseries/tests/test_timeseries.py index <HASH>..<HASH> 100644 --- a/pandas/tseries/tests/test_timeseries.py +++ b/pandas/tseries/tests/test_timeseries.py @@ -24,8 +24,7 @@ import pandas.util.testing as tm from pandas import ( Index, Series, DataFrame, isnull, date_range, Timestamp, Period, DatetimeIndex, Int64Index, to_datetime, bdate_range, Float64Index, - NaT, timedelta_range, Timedelta, _np_version_under1p8, concat, - PeriodIndex) + NaT, timedelta_range, Timedelta, _np_version_under1p8, concat) from pandas.compat import range, long, StringIO, lrange, lmap, zip, product from pandas.compat.numpy_compat import np_datetime64_compat from pandas.core.common import PerformanceWarning
PEP: fix tseries/test_timeseries.py
pandas-dev_pandas
train
py
de2dcbddb5a5134a04798977e141766a6b6e2814
diff --git a/commands/pull_request.go b/commands/pull_request.go index <HASH>..<HASH> 100644 --- a/commands/pull_request.go +++ b/commands/pull_request.go @@ -72,7 +72,8 @@ pull-request -i <ISSUE> is deprecated. -l, --labels <LABELS> - Add a comma-separated list of labels to this pull request. + Add a comma-separated list of labels to this pull request. Labels will be + created if they don't already exist. ## Examples: $ hub pull-request
Update --labels documentation to show it will be created if not exists
github_hub
train
go
1639b90c94c44bbc6ec13e69cc3d37234a79054f
diff --git a/src/adafruit_blinka/microcontroller/bcm283x/neopixel.py b/src/adafruit_blinka/microcontroller/bcm283x/neopixel.py index <HASH>..<HASH> 100644 --- a/src/adafruit_blinka/microcontroller/bcm283x/neopixel.py +++ b/src/adafruit_blinka/microcontroller/bcm283x/neopixel.py @@ -22,7 +22,7 @@ _buf = None def neopixel_write(gpio, buf): """NeoPixel Writing Function""" global _led_strip # we'll have one strip we init if its not at first - global _buf # we save a reference to the buf, and if it changes we will cleanup and re-initalize. + global _buf # we save a reference to the buf, and if it changes we will cleanup and re-init. if _led_strip is None or buf is not _buf: # This is safe to call since it doesn't do anything if _led_strip is None
Update neopixel.py Fix line too long.
adafruit_Adafruit_Blinka
train
py
dee0d318c1ffa3456ab951fed82f9be702283e8e
diff --git a/salt/modules/file.py b/salt/modules/file.py index <HASH>..<HASH> 100644 --- a/salt/modules/file.py +++ b/salt/modules/file.py @@ -4358,7 +4358,7 @@ def check_perms(name, ret, user, group, mode, attrs=None, follow_symlinks=False) is_dir = os.path.isdir(name) if not salt.utils.platform.is_windows() and not is_dir and lsattr_cmd: # List attributes on file - perms['lattrs'] = ''.join(lsattr(name)[name]) + perms['lattrs'] = ''.join(lsattr(name).get('name', '')) # Remove attributes on file so changes can be enforced. if perms['lattrs']: chattr(name, operator='remove', attributes=perms['lattrs'])
use .get incase attrs are disabled on the filesystem
saltstack_salt
train
py
6501d98bf386bd5bc68563ffdb6239c1739c299a
diff --git a/stage0/run.go b/stage0/run.go index <HASH>..<HASH> 100644 --- a/stage0/run.go +++ b/stage0/run.go @@ -32,6 +32,7 @@ import ( "path" "path/filepath" "runtime" + "strconv" "strings" "syscall" "time" @@ -152,8 +153,8 @@ func generatePodManifest(cfg PrepareConfig, dir string) ([]byte, error) { if pm.Apps.Get(*appName) != nil { return fmt.Errorf("error: multiple apps with name %s", am.Name) } - if am.App == nil { - return fmt.Errorf("error: image %s has no app section", img) + if am.App == nil && app.Exec == "" { + return fmt.Errorf("error: image %s has no app section and --exec argument is not provided", img) } ra := schema.RuntimeApp{ // TODO(vc): leverage RuntimeApp.Name for disambiguating the apps @@ -167,6 +168,13 @@ func generatePodManifest(cfg PrepareConfig, dir string) ([]byte, error) { } if execOverride := app.Exec; execOverride != "" { + // Create a minimal App section if not present + if am.App == nil { + ra.App = &types.App{ + User: strconv.Itoa(os.Getuid()), + Group: strconv.Itoa(os.Getgid()), + } + } ra.App.Exec = []string{execOverride} }
stage0: create app section if we override exec When an image doesn't have an App section and we override exec with the --exec flag we should create a minimal App section instead of failing. This would fail with a missing app section error: rkt run image-without-app-section.aci But this would succeed and exec the specified command if it exists in the image: rkt run image-without-app-section.aci --exec /bin/sh
rkt_rkt
train
go
1392ac6b9a7a776068f4567396429d4b0d687c00
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -78,7 +78,7 @@ setup( 'h5py', 'wavio', 'typing', - 'prettyparse>=0.1.4', + 'prettyparse<1.0', 'precise-runner', 'attrs', 'fitipy',
Lock parser version (#<I>) This prevents major errors
MycroftAI_mycroft-precise
train
py
45c551c44ff8c709d588e211bb9edf1babd5424c
diff --git a/server.js b/server.js index <HASH>..<HASH> 100644 --- a/server.js +++ b/server.js @@ -42,7 +42,6 @@ app.get(/^\/proxy\/(.+)$/, function(req, res) { remoteUrl += url.substring(queryStartIndex); } - console.log(remoteUrl); request.get(remoteUrl).pipe(res); });
Don't print URL on every request.
TerriaJS_terriajs
train
js
8d5626abdceedb9f58b44ebd7fd2b5d843e033f8
diff --git a/lib/sandbox/pmapi.js b/lib/sandbox/pmapi.js index <HASH>..<HASH> 100644 --- a/lib/sandbox/pmapi.js +++ b/lib/sandbox/pmapi.js @@ -2,11 +2,11 @@ var EXECUTION_ASSERTION_EVENT = 'execution.assertion', EXECUTION_ASSERTION_EVENT_BASE = 'execution.assertion.', _ = require('lodash'), - VariableScope = require('postman-collection').VariableScope, - PostmanRequest = require('postman-collection').Request, - PostmanResponse = require('postman-collection').Response, + sdk = require('postman-collection'), + VariableScope = sdk.VariableScope, + PostmanRequest = sdk.Request, + PostmanResponse = sdk.Response, chai = require('chai'), - chaiPostman = require('./chai-postman'), /** * Use this function to assign readonly properties to an object @@ -142,7 +142,7 @@ Postman = function Postman (bridge, execution, onRequest) { Postman.prototype.expect = chai.expect; // make chai use postman extension -chai.use(chaiPostman); +chai.use(require('chai-postman')(sdk)); // export module.exports = Postman;
Replaced in-house chai assertions with chai-postman
postmanlabs_postman-sandbox
train
js
b37a1ac997e7248076e635d8ca2b62c4d62aa903
diff --git a/iavl/iavl_proof2.go b/iavl/iavl_proof2.go index <HASH>..<HASH> 100644 --- a/iavl/iavl_proof2.go +++ b/iavl/iavl_proof2.go @@ -174,7 +174,9 @@ type KeyRangeProof struct { func (proof *KeyRangeProof) Verify( startKey, endKey []byte, keys, values [][]byte, root []byte, ) error { - // TODO: Check that range is what we asked for. + if len(proof.PathToKeys) != len(keys) || len(values) != len(keys) { + return errors.New("wrong number of keys or values for proof") + } if len(proof.PathToKeys) == 0 { if proof.LeftPath == nil || proof.RightPath == nil {
Make sure length of keys/values is equal
tendermint_iavl
train
go
82f04867cdebfbc2cc8db3829a07178d0040bd71
diff --git a/Cloner/Cloner.php b/Cloner/Cloner.php index <HASH>..<HASH> 100644 --- a/Cloner/Cloner.php +++ b/Cloner/Cloner.php @@ -19,7 +19,6 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\Common\Util\ClassUtils; use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; /** @@ -130,7 +129,7 @@ class Cloner implements ClonerInterface $this->propertyAccessor->setValue($clone, $property, $valueCopy); continue; - } catch (NoSuchPropertyException $ex) { + } catch (\Exception $ex) { } try { $reflectionProperty = $reflectionClass->getProperty($property);
Cloner: catch all exceptions instead of no such property exception (can be thrown in magic methods).
DarvinStudio_darvin-utils
train
php
95536723e9223708b018cc9a0767d597da3a12b9
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -291,6 +291,7 @@ module.exports = function (grunt) { 'test/less/*.less', // Don't test NPM import, obviously '!test/less/plugin-module.less', + '!test/less/import-module.less', '!test/less/javascript.less', '!test/less/urls.less', '!test/less/empty.less'
Exclude import-module from browsert test as node_modules will not be in browser
less_less.js
train
js
ad9f3aa7d0cab8589b37c6afd8825b484d764ed6
diff --git a/javamelody-core/src/main/java/net/bull/javamelody/internal/model/TransportFormat.java b/javamelody-core/src/main/java/net/bull/javamelody/internal/model/TransportFormat.java index <HASH>..<HASH> 100644 --- a/javamelody-core/src/main/java/net/bull/javamelody/internal/model/TransportFormat.java +++ b/javamelody-core/src/main/java/net/bull/javamelody/internal/model/TransportFormat.java @@ -139,7 +139,7 @@ public enum TransportFormat { if (json) { // format json xstream = new XStream(new JsonHierarchicalStreamDriver()); - xstream.setMode(XStream.NO_REFERENCES); + // #884 removed xstream.setMode(XStream.NO_REFERENCES); } else { // sinon format xml, utilise la dépendance XPP3 par défaut xstream = new XStream();
fix #<I> CircularReferenceException in External API with JSON for current requests
javamelody_javamelody
train
java
8ce36ae109264ed3523f6187f91edf08aa1f23e6
diff --git a/src/components/splitbutton/SplitButtonItem.js b/src/components/splitbutton/SplitButtonItem.js index <HASH>..<HASH> 100644 --- a/src/components/splitbutton/SplitButtonItem.js +++ b/src/components/splitbutton/SplitButtonItem.js @@ -32,7 +32,13 @@ export class SplitButtonItem extends Component { e.preventDefault(); } - render() { + renderSeparator() { + return ( + <li className="p-menu-separator" role="separator"></li> + ); + } + + renderMenuitem() { let { disabled, icon, label, template } = this.props.menuitem; const className = classNames('p-menuitem-link', { 'p-disabled': disabled }); const itemContent = template ? ObjectUtils.getJSXElement(template, this.props.menuitem) : null; @@ -49,4 +55,18 @@ export class SplitButtonItem extends Component { </li> ); } + + renderItem() { + if (this.props.menuitem.separator) { + return this.renderSeparator(); + } + + return this.renderMenuitem(); + } + + render() { + const item = this.renderItem(); + + return item; + } }
Fixed #<I> - Add separator support to SplitButton
primefaces_primereact
train
js
24fb56ff2062a482720274a3520e5aba6ebb6488
diff --git a/views/layouts/default.html.php b/views/layouts/default.html.php index <HASH>..<HASH> 100644 --- a/views/layouts/default.html.php +++ b/views/layouts/default.html.php @@ -15,7 +15,6 @@ <?=$this->html->link('Icon', null, array('type' => 'icon')); ?> <?=$this->html->script(array( '//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js', - '//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js', '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.0/highlight.min.js', '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.0/languages/php.min.js' )); ?>
Removing jquery ui dependency.
UnionOfRAD_li3_docs
train
php