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
b0834ff6954a4111343f837a83903383efe66288
diff --git a/app/models/unidom/visitor/concerns/as_visitor.rb b/app/models/unidom/visitor/concerns/as_visitor.rb index <HASH>..<HASH> 100644 --- a/app/models/unidom/visitor/concerns/as_visitor.rb +++ b/app/models/unidom/visitor/concerns/as_visitor.rb @@ -24,11 +24,9 @@ module Unidom::Visitor::Concerns::AsVisitor end end -=begin def cognize!(it, at: Time.now, primary: true) recognizations.create! party: it, elemental: primary, opened_at: at end -=end end
1, Improve the As Visitor concern to add the #cognize! method.
topbitdu_unidom-visitor
train
rb
0b7bebfc795d8aaa6321ccd2e1540bcb416808e9
diff --git a/api/client.js b/api/client.js index <HASH>..<HASH> 100644 --- a/api/client.js +++ b/api/client.js @@ -56,7 +56,7 @@ module.exports = new (function(){ * assuming that driver.car will resolve to an item ID */ this.observe = function(itemID, propName, callback) { - if (!itemID || !propName || !callback) { log("observe requires three arguments", itemId, propName, callback); } + if (typeof itemID != 'number' || !propName || !callback) { log("observe requires three arguments", itemId, propName, callback); } var propertyChain = propName.split('.') return this._observeChain(itemID, propertyChain, 0, callback, {}) }
The id for global is 0 - don't check for truthy but for type
marcuswestin_fin
train
js
ac27185f8d6e165bb1b335ad2ebb32d69c385f03
diff --git a/simuvex/engines/engine.py b/simuvex/engines/engine.py index <HASH>..<HASH> 100644 --- a/simuvex/engines/engine.py +++ b/simuvex/engines/engine.py @@ -11,8 +11,8 @@ class SimEngine(object): :ivar callable check_failed: A callback that is called after _check() returns False. """ - def __init__(self, check_failed=None): - self._check_failed = check_failed + def __init__(self, **kwargs): + self._check_failed = kwargs.get('check_failed') def process(self, state, *args, **kwargs): """
Make the default engine take arbitrary args in its constructor
angr_angr
train
py
7430e7deda2c1ca3312bb649e27c06b0fb9fd6af
diff --git a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/NativeEnvironmentRepository.java b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/NativeEnvironmentRepository.java index <HASH>..<HASH> 100644 --- a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/NativeEnvironmentRepository.java +++ b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/NativeEnvironmentRepository.java @@ -98,6 +98,10 @@ public class NativeEnvironmentRepository ConfigurableEnvironment environment = getEnvironment(profile); builder.environment(environment); builder.web(false).bannerMode(Mode.OFF); + if (!logger.isDebugEnabled()) { + // Make the mini-application startup less verbose + builder.logStartupInfo(false); + } String[] args = getArgs(config, profile, label); // Explicitly set the listeners (to exclude logging listener which would change // log levels in the caller)
Make the startup of application context quieter Every app that requests config from the server starts a mini application context. We can make it a bit less verbose by shutting off the startup info logger in the SpringApplication.
spring-cloud_spring-cloud-config
train
java
c05604941d9a822292fe201a02347d7e4a40968d
diff --git a/app/models/artefact.rb b/app/models/artefact.rb index <HASH>..<HASH> 100644 --- a/app/models/artefact.rb +++ b/app/models/artefact.rb @@ -163,6 +163,11 @@ class Artefact validate :validate_prefixes_and_paths validate :format_of_new_need_ids, if: :need_ids_changed? + scope :relatable_items, proc { + where(:kind.ne => "completed_transaction", :state.ne => "archived") + .order_by([[:name, :asc]]) + } + def self.in_alphabetical_order order_by([[:name, :asc]]) end @@ -171,15 +176,6 @@ class Artefact where(slug: s).first end - def self.relatable_items - # Only retrieving the name field, because that's all we use in Panopticon's - # helper method (the only place we use this), and it means the index can - # cover the query entirely - self.in_alphabetical_order - .where(:kind.ne => "completed_transaction", :state.ne => "archived") - .only(:name) - end - # The old-style section string identifier, of the form 'Crime:Prisons' def section return '' unless self.primary_section
Making related_items a scope so it can be chained removing the existing method and comment because it is misleading. it says the method is uses only in Panopticon, but there are usages outside as well. one of the usages in Panopticon have been removed.
alphagov_govuk_content_models
train
rb
c4bdab5aaed95dfbcae949816fa00046684a6cdc
diff --git a/changes/cli.py b/changes/cli.py index <HASH>..<HASH> 100644 --- a/changes/cli.py +++ b/changes/cli.py @@ -59,13 +59,17 @@ CHANGELOG = 'CHANGELOG.md' arguments = None - version_arguments = extract(arguments, ['--major', '--minor', '--patch']) +def strip_long_arguments(argument_names): + long_arguments = extract(arguments, argument_names) return dict([ - (key[2:], value) for key, value in version_arguments.items() + (key[2:], value) for key, value in long_arguments.items() ]) def extract_version_arguments(): + return strip_long_arguments(['--major', '--minor', '--patch']) + + """
Rename and refactor argument extract and strip
michaeljoseph_changes
train
py
5ff8d28b8943d3eaaac708facadbbb388d479c96
diff --git a/datavec/datavec-api/src/main/java/org/datavec/api/records/reader/impl/LineRecordReader.java b/datavec/datavec-api/src/main/java/org/datavec/api/records/reader/impl/LineRecordReader.java index <HASH>..<HASH> 100644 --- a/datavec/datavec-api/src/main/java/org/datavec/api/records/reader/impl/LineRecordReader.java +++ b/datavec/datavec-api/src/main/java/org/datavec/api/records/reader/impl/LineRecordReader.java @@ -173,6 +173,7 @@ public class LineRecordReader extends BaseRecordReader { throw new UnsupportedOperationException("Cannot reset without first initializing"); try { inputSplit.reset(); + close(); initialize(inputSplit); splitIndex = 0; } catch (Exception e) {
Close iter when reset to avoid resource not closed issue (#<I>)
deeplearning4j_deeplearning4j
train
java
bb70a2764c019005011c8532f9c2599503fbaa64
diff --git a/src/Route.php b/src/Route.php index <HASH>..<HASH> 100644 --- a/src/Route.php +++ b/src/Route.php @@ -41,6 +41,8 @@ class Route{ protected $pattern; protected $controller; protected $action; + protected $arguments = array(); + protected $origin; public function __construct( $controller, $action, $pattern, $method = "GET" ){ $this->setController( $controller ); @@ -53,6 +55,10 @@ class Route{ return $this->action; } + public function getArguments(){ + return $this->arguments; + } + public function getController(){ return $this->controller; } @@ -65,6 +71,10 @@ class Route{ return $this->method; } + public function getOrigin(){ + return $this->origin; + } + public function getPattern(){ return $this->pattern; } @@ -79,6 +89,10 @@ class Route{ $this->action = $action; } + public function setArguments( $map ){ + $this->arguments = $map; + } + public function setController( $controller ){ $this->controller = $controller; } @@ -87,6 +101,10 @@ class Route{ $this->method = strtoupper( $method ); } + public function setOrigin( Route $origin ){ + $this->origin = $origin; + } + public function setPattern( $pattern ){ $this->pattern = $pattern; }
Extend route by arguments to be applied later.
CeusMedia_Router
train
php
e7e2b87ae9fcaf2233fd9052158bd6ce18d7aaba
diff --git a/lib/redlander/statement_iterator.rb b/lib/redlander/statement_iterator.rb index <HASH>..<HASH> 100644 --- a/lib/redlander/statement_iterator.rb +++ b/lib/redlander/statement_iterator.rb @@ -6,7 +6,7 @@ module Redlander include Enumerable # Iterate over statements in the stream. - def each(&block) + def each # TODO: The options specify matching criteria: subj, pred, obj; # if an option is not specified, it matches any value, # so with no options given, all statements will be returned.
no need to pass &block if it's not used explicitly for performance reasons
cordawyn_redlander
train
rb
fd8fd5f25efb2e888a26376562093a34dc435243
diff --git a/gl-service-explorer/src/main/webapp/js/gl-explorer.js b/gl-service-explorer/src/main/webapp/js/gl-explorer.js index <HASH>..<HASH> 100644 --- a/gl-service-explorer/src/main/webapp/js/gl-explorer.js +++ b/gl-service-explorer/src/main/webapp/js/gl-explorer.js @@ -174,7 +174,7 @@ function updateApiData() { var googleURL = "http://chart.apis.google.com/chart?cht=qr&chs=128x128&chld=L&choe=UTF-8&chl="; function handleQRCode() { - var glURL = serverURL + apiData.methodSelected + "/" + apiData.getArgs + "." + apiData.contentExtension; + var glURL = serverURL + apiData.methodSelected + "/" + apiData.getArgs; var qrURL = googleURL + encodeURIComponent(glURL); $("#serverResponse").html(""); $("#serverResponse").append('<img src="' + qrURL + '"/>');
Issue <I> ; fix URL encoded in QR code
nmdp-bioinformatics_genotype-list
train
js
a240969763e531a5a1cbcd0fd1c07319deb8edb8
diff --git a/lib/puppet/util/diff.rb b/lib/puppet/util/diff.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/util/diff.rb +++ b/lib/puppet/util/diff.rb @@ -27,7 +27,7 @@ module Puppet::Util::Diff output = "" - diffs = Diff::LCS.diff(data_old, data_new) + diffs = ::Diff::LCS.diff(data_old, data_new) return output if diffs.empty? oldhunk = hunk = nil @@ -35,7 +35,7 @@ module Puppet::Util::Diff diffs.each do |piece| begin - hunk = Diff::LCS::Hunk.new(data_old, data_new, piece, + hunk = ::Diff::LCS::Hunk.new(data_old, data_new, piece, context_lines, file_length_difference) file_length_difference = hunk.file_length_difference
Applying patch by wyvern to fix #<I>.
puppetlabs_puppet
train
rb
342d028af13215f46cff5f05146cba83f80fe572
diff --git a/src/mediaelement.js b/src/mediaelement.js index <HASH>..<HASH> 100755 --- a/src/mediaelement.js +++ b/src/mediaelement.js @@ -94,6 +94,10 @@ WaveSurfer.util.extend(WaveSurfer.MediaElement, { _load: function (media, peaks) { var my = this; + // load must be called manually on iOS, otherwise peaks won't draw + // until a user interaction triggers load --> 'ready' event + media.load(); + media.addEventListener('error', function () { my.fireEvent('error', 'Error loading media element'); });
fix media element ios issue #<I> where peaks didnt draw (#<I>)
katspaugh_wavesurfer.js
train
js
08bb6c55ce65e1a4039ef2e5ef7f45f3291ba065
diff --git a/lib/client.js b/lib/client.js index <HASH>..<HASH> 100644 --- a/lib/client.js +++ b/lib/client.js @@ -57,7 +57,7 @@ _.process = function process(kwargs) { kwargs['modules'] = utils.getModules(); kwargs['server_name'] = kwargs['server_name'] || this.name; kwargs['extra'] = kwargs['extra'] || {}; - if (typeof process.version !== undefined) { + if (typeof process.version !== 'undefined') { kwargs['extra']['node'] = process.version; } kwargs['tags'] = kwargs['tags'] || {};
Fix erronous check for undefined
getsentry_sentry-javascript
train
js
2a74a34c5aa7fcfc3d7da786163c97f63953c94f
diff --git a/lib/fast/version.rb b/lib/fast/version.rb index <HASH>..<HASH> 100644 --- a/lib/fast/version.rb +++ b/lib/fast/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Fast - VERSION = '0.0.4' + VERSION = '0.0.5' end
Bump to version <I>
jonatas_fast
train
rb
66f56b802389277252fb1ce6303c810d9cef20e3
diff --git a/client/my-sites/hosting/php-version-card/index.js b/client/my-sites/hosting/php-version-card/index.js index <HASH>..<HASH> 100644 --- a/client/my-sites/hosting/php-version-card/index.js +++ b/client/my-sites/hosting/php-version-card/index.js @@ -59,6 +59,12 @@ const PhpVersionCard = ( { } ), value: '8.0', }, + { + label: translate( '8.1', { + comment: 'PHP Version for a version switcher', + } ), + value: '8.1', + }, ]; };
Add php <I> to hosting configuration
Automattic_wp-calypso
train
js
b4bd608d965c9edca85dfcdfcde65c57c7a1a60a
diff --git a/pytuya/__init__.py b/pytuya/__init__.py index <HASH>..<HASH> 100644 --- a/pytuya/__init__.py +++ b/pytuya/__init__.py @@ -490,3 +490,21 @@ class BulbDevice(Device): payload = self.generate_payload(SET, {self.DPS_INDEX_COLOURTEMP: colourtemp}) data = self._send_receive(payload) return data + + def brightness(self): + """Return brightness value""" + return self.status()[self.DPS][self.DPS_INDEX_BRIGHTNESS] + + def colourtemp(self): + """Return colour temperature""" + return self.status()[self.DPS][self.DPS_INDEX_COLOURTEMP] + + def colour_rgb(self): + """Return colour as RGB value""" + hexvalue = self.status()[self.DPS][self.DPS_INDEX_COLOUR] + return BulbDevice._hexvalue_to_rgb(hexvalue) + + def colour_hsv(self): + """Return colour as HSV value""" + hexvalue = self.status()[self.DPS][self.DPS_INDEX_COLOUR] + return BulbDevice._hexvalue_to_hsv(hexvalue)
Added functions to BulbDevice that return brightness, colourtemp and colour values
clach04_python-tuya
train
py
325d950e896ee601c9f407c8c6d4037a443b4268
diff --git a/drools-camel/src/test/java/org/drools/camel/component/BatchTest.java b/drools-camel/src/test/java/org/drools/camel/component/BatchTest.java index <HASH>..<HASH> 100644 --- a/drools-camel/src/test/java/org/drools/camel/component/BatchTest.java +++ b/drools-camel/src/test/java/org/drools/camel/component/BatchTest.java @@ -70,6 +70,7 @@ import org.mvel2.templates.SimpleTemplateRegistry; import org.mvel2.templates.TemplateCompiler; import org.mvel2.templates.TemplateRegistry; import org.mvel2.templates.TemplateRuntime; +import org.mvel2.templates.res.Node; import org.w3c.dom.Document; import org.xml.sax.InputSource; @@ -154,7 +155,7 @@ public abstract class BatchTest extends ContextTestSupport { public void before() throws Exception { tempReg.addNamedTemplate( "tempReg", TemplateCompiler.compileTemplate( getClass().getResourceAsStream( dataformat + ".mvt" ), - null ) ); + (Map<String, Class<? extends Node>>) null ) ); TemplateRuntime.execute( tempReg.getNamedTemplate( "tempReg" ), null, tempReg );
Fixing compilation error due to MVEL interface change
kiegroup_droolsjbpm-integration
train
java
eb2a2e91824e1a5f0c3d495bfb68fe927d2761be
diff --git a/core/services/src/main/java/org/openengsb/core/services/internal/deployer/connector/ConnectorDeployerService.java b/core/services/src/main/java/org/openengsb/core/services/internal/deployer/connector/ConnectorDeployerService.java index <HASH>..<HASH> 100644 --- a/core/services/src/main/java/org/openengsb/core/services/internal/deployer/connector/ConnectorDeployerService.java +++ b/core/services/src/main/java/org/openengsb/core/services/internal/deployer/connector/ConnectorDeployerService.java @@ -90,7 +90,7 @@ public class ConnectorDeployerService extends AbstractOpenEngSBService implement Map<String, Object> properties = new Hashtable<String, Object>(configFile.getProperties()); if (properties.get(Constants.SERVICE_RANKING) == null && ConnectorFile.isRootService(artifact)) { - properties.put(Constants.SERVICE_RANKING, "-1"); + properties.put(Constants.SERVICE_RANKING, -1); } LOGGER.info("Loading instance {}", configFile.getConnectorId());
[OPENENGSB-<I>] let the connector-deployer put an integer into service.ranking
openengsb_openengsb
train
java
c3e8279a91d76e279abe50604aef86ae475ce7b7
diff --git a/zounds/node/test_timeseries.py b/zounds/node/test_timeseries.py index <HASH>..<HASH> 100644 --- a/zounds/node/test_timeseries.py +++ b/zounds/node/test_timeseries.py @@ -291,6 +291,14 @@ class TimeSeriesTests(unittest2.TestCase): self.assertIsInstance(ts2, ConstantRateTimeSeries) self.assertTrue(np.all(np.arange(10) == ts2)) + def test_can_get_entire_time_series_with_empty_time_slice(self): + arr = np.arange(10) + freq = Seconds(1) + ts = ConstantRateTimeSeries(arr, freq) + sl = TimeSlice() + ts2 = ts[sl] + self.assertEqual(10, len(ts2)) + def test_span_freq_and_duration_equal(self): arr = np.arange(10) freq = Seconds(1)
Add one more test to demonstrate usage of totally open-ended TimeSlice
JohnVinyard_zounds
train
py
5e0a16ea21c4467e809d6369bd1971661713f068
diff --git a/hugolib/site.go b/hugolib/site.go index <HASH>..<HASH> 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -160,8 +160,6 @@ func (s *SiteInfo) refLink(ref string, page *Page, relative bool) (string, error var link string = "" if refUrl.Path != "" { - var target *Page - for _, page := range []*Page(*s.Pages) { if page.Source.Path() == refUrl.Path || page.Source.LogicalName() == refUrl.Path { target = page @@ -187,7 +185,7 @@ func (s *SiteInfo) refLink(ref string, page *Page, relative bool) (string, error if refUrl.Fragment != "" { link = link + "#" + refUrl.Fragment - if refUrl.Path != "" { + if refUrl.Path != "" && target != nil { link = link + ":" + target.UniqueId() } else if page != nil { link = link + ":" + page.UniqueId()
Fix a crash for ref page#anchor. - Remove an improperly shadowed variable. - Fixes #<I>.
gohugoio_hugo
train
go
b9f9186a2197fb563b942106d6028299826a5728
diff --git a/src/components/portal-target.js b/src/components/portal-target.js index <HASH>..<HASH> 100644 --- a/src/components/portal-target.js +++ b/src/components/portal-target.js @@ -12,6 +12,13 @@ export default { beforeDestroy() { wormhole.$off(this.name, this.update) }, + watch: { + name(newName, oldName) { + wormhole.$off(oldName, this.update) + wormhole.$on(newName, this.update) + this.checkWormhole() + } + } methods: { checkWormhole() {
make portal target react to name (source) change.
LinusBorg_portal-vue
train
js
a2a9c9e8fb5ec34583d6482ac5aa21a8a99412b6
diff --git a/core/src/main/java/hudson/slaves/NodeProvisioner.java b/core/src/main/java/hudson/slaves/NodeProvisioner.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/hudson/slaves/NodeProvisioner.java +++ b/core/src/main/java/hudson/slaves/NodeProvisioner.java @@ -193,7 +193,7 @@ public class NodeProvisioner { int idleSnapshot = stat.computeIdleExecutors(); int totalSnapshot = stat.computeTotalExecutors(); - boolean needSomeWhenNoneAtAll = ((idleSnapshot + totalSnapshot + plannedCapacitySnapshot) == 0) && (stat.computeQueueLength() > 0); + boolean needSomeWhenNoneAtAll = (idleSnapshot==0) && (totalSnapshot + plannedCapacitySnapshot == 0) && (stat.computeQueueLength() > 0); float idle = Math.max(stat.getLatestIdleExecutors(TIME_SCALE), idleSnapshot); if(idle<MARGIN || needSomeWhenNoneAtAll) { // make sure the system is fully utilized before attempting any new launch.
I think this reflects the intent better without making me uneasy about double-counting.
jenkinsci_jenkins
train
java
b8e9b5c14e30f09be19b94b13f388e17d64e452c
diff --git a/lib/sass/script/funcall.rb b/lib/sass/script/funcall.rb index <HASH>..<HASH> 100644 --- a/lib/sass/script/funcall.rb +++ b/lib/sass/script/funcall.rb @@ -14,7 +14,7 @@ module Sass def perform(environment) args = self.args.map {|a| a.perform(environment)} - unless Functions.public_instance_methods.include?(name) && name !~ /^__/ + unless Haml::Util.has?(:public_instance_method, Functions, name) && name !~ /^__/ return Script::String.new("#{name}(#{args.map {|a| a.perform(environment)}.join(', ')})") end diff --git a/lib/sass/script/functions.rb b/lib/sass/script/functions.rb index <HASH>..<HASH> 100644 --- a/lib/sass/script/functions.rb +++ b/lib/sass/script/functions.rb @@ -19,7 +19,7 @@ module Sass::Script # and then left as static CSS files. # Any dynamic CSS should be left in <style> tags in the HTML. module Functions - instance_methods.each { |m| undef_method m unless m =~ /^__/ } + instance_methods.each { |m| undef_method m unless m.to_s =~ /^__/ } extend self # Creates a Sass::Script::Color object from hue, saturation, and lightness.
Handle <I> *_methods stuff in master.
sass_ruby-sass
train
rb,rb
06cc39be8589ead4672f7df13d2e09a366179f0f
diff --git a/lib/wings/orm_converter.rb b/lib/wings/orm_converter.rb index <HASH>..<HASH> 100644 --- a/lib/wings/orm_converter.rb +++ b/lib/wings/orm_converter.rb @@ -41,6 +41,12 @@ module Wings end ## + # @return [String] + def to_s + internal_resource + end + + ## # @api private def _canonical_valkyrie_model ancestors[1..-1].find { |parent| parent < ::Valkyrie::Resource } @@ -51,10 +57,6 @@ module Wings URI::GID.build([GlobalID.app, internal_resource, id, {}]) end - def self.to_s - internal_resource - end - klass.properties.each_key do |property_name| next if fields.include?(property_name.to_sym)
refactor Wings OrmConverter#to_s; move into `class` block
samvera_hyrax
train
rb
ca15d51fe8c5d0cd26eb045c690a77013756982b
diff --git a/resources/js/directives/forms.js b/resources/js/directives/forms.js index <HASH>..<HASH> 100644 --- a/resources/js/directives/forms.js +++ b/resources/js/directives/forms.js @@ -71,7 +71,7 @@ zaa.directive('zaaText', function(){ scope.random = Math.random().toString(36).substring(7); }, template : function() { - return '<div input-field class="col s{{grid}}"><input placeholder="{{placeholder}}" id="{{random}}" ng-model="model" type="text" /><label for="{{random}}">{{label}}</label></div>'; + return '<div class="input-field col s{{grid}}"><input placeholder="{{placeholder}}" id="{{random}}" ng-model="model" type="text" /><label for="{{random}}">{{label}}</label></div>'; } } });
fixed bug in blocks and zaa-text
luyadev_luya-module-admin
train
js
fa26d9601383e53c1f25bdb4186731c1345f280e
diff --git a/stanza/models/constituency/lstm_model.py b/stanza/models/constituency/lstm_model.py index <HASH>..<HASH> 100644 --- a/stanza/models/constituency/lstm_model.py +++ b/stanza/models/constituency/lstm_model.py @@ -153,6 +153,11 @@ class LSTMModel(BaseModel, nn.Module): self.register_buffer('constituent_zeros', torch.zeros(self.num_layers, 1, self.hidden_size)) # possibly add a couple vectors for bookends of the sentence + # We put the word_start and word_end here, AFTER counting the + # charlm dimension, but BEFORE counting the bert dimension, + # as we want word_start and word_end to not have dimensions + # for the bert embedding. The bert model will add its own + # start and end representation. self.sentence_boundary_vectors = self.args.get('sentence_boundary_vectors', SentenceBoundary.NONE) if self.sentence_boundary_vectors is not SentenceBoundary.NONE: self.register_parameter('word_start', torch.nn.Parameter(torch.randn(self.word_input_size, requires_grad=True)))
Add some more doc for word_start and word_end
stanfordnlp_stanza
train
py
f6f750e2ba83dd6b19b9bd701de467fcc44bdd02
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( packages = packages, install_requires = install_requires, license="Apache 2.0", - version = '0.1.5', + version = '0.1.6', description = 'Google Identity Toolkit python client library', author = 'Jin Liu', url = 'https://github.com/google/identity-toolkit-python-client',
Update version number to <I>
google_identity-toolkit-python-client
train
py
0daf32db7e3e6469dea4a3d5f4ee4299ec1bc2c6
diff --git a/lib/parallel.js b/lib/parallel.js index <HASH>..<HASH> 100644 --- a/lib/parallel.js +++ b/lib/parallel.js @@ -242,7 +242,7 @@ function patchIt(specs) { }; it = function it(name, fn) { - createSpec(name, fn); + createSpec(name, fn, {skip: !fn}); }; xit = it.skip = function skip(name, fn) { diff --git a/spec/fixtures/skip.js b/spec/fixtures/skip.js index <HASH>..<HASH> 100644 --- a/spec/fixtures/skip.js +++ b/spec/fixtures/skip.js @@ -13,4 +13,6 @@ parallel('suite', function() { it('test3', function(done) { setTimeout(done, 500); }); + + it('skip4') }); diff --git a/spec/spec.js b/spec/spec.js index <HASH>..<HASH> 100644 --- a/spec/spec.js +++ b/spec/spec.js @@ -168,7 +168,7 @@ describe('parallel', function() { assert(!stderr.length); assert(stdout.indexOf('2 passing') !== -1); - assert(stdout.indexOf('1 pending') !== -1); + assert(stdout.indexOf('2 pending') !== -1); assert(stdout.indexOf('should not appear') === -1); done();
Fix #<I>: Skip tests that don't declare a function (#<I>)
danielstjules_mocha.parallel
train
js,js,js
c0719a410b1e1c9896e2f1cf748c12cd032f0fa4
diff --git a/dataviews/collector.py b/dataviews/collector.py index <HASH>..<HASH> 100644 --- a/dataviews/collector.py +++ b/dataviews/collector.py @@ -746,7 +746,7 @@ class Collector(AttrTree): padding = len(str(num_items)) num_fmt = '%%0%dd.' % padding - lines = ["Collector with %d tasks scheduled:\n" % num_items] + lines = ["%d tasks scheduled:\n" % num_items] dotted_line = indent + num_fmt +" %s" merge_line = indent + num_fmt + " [...] " value_line = indent*3 + ' '*padding + " %s %s"
Minor change to __str__ method of Collector
pyviz_holoviews
train
py
e5226e8f05e759d32db4e44f47a0323e10516c6d
diff --git a/lib/proxy/robust-sockjs.js b/lib/proxy/robust-sockjs.js index <HASH>..<HASH> 100644 --- a/lib/proxy/robust-sockjs.js +++ b/lib/proxy/robust-sockjs.js @@ -115,7 +115,7 @@ function RobustSockJSRegistry(timeout){ }; this.write = function(){ // Write if this connection is ready. - if (robustConn._readyState === 1){ + if (robustConn._conn.readyState === 1){ robustConn._conn.write.apply(robustConn._conn, arguments); } else { // Otherwise, buffer.
Restore server-side buffering.
rstudio_shiny-server
train
js
4b56028812e341ac3d182c3f61ca6811b0fa44ea
diff --git a/src/DocDown/Alias.php b/src/DocDown/Alias.php index <HASH>..<HASH> 100644 --- a/src/DocDown/Alias.php +++ b/src/DocDown/Alias.php @@ -50,7 +50,9 @@ class Alias { */ public function getAliases( $index = null ) { $result = array(); - return $index !== null ? @$result[$index] : $result; + return $index !== null + ? @$result[$index] + : $result; } /** @@ -101,7 +103,9 @@ class Alias { * @returns {Array|String} The owner entry's `member` data. */ public function getMembers( $index = null ) { - return $this->_members; + return $index !== null + ? @$this->_members[$index] + : $this->_members; } /** @@ -122,7 +126,9 @@ class Alias { * @returns {Array} The owner entry's `param` data. */ public function getParams( $index = null ) { - return $this->_params; + return $index !== null + ? @$this->_params[$index] + : $this->_params; } /**
Ensure `getAliases`, `getMembers`, and `getParams` of Alias works with `index` values.
jdalton_docdown
train
php
eb997bb5f8afcfe53c35cfa73f8c54e74a3e1e08
diff --git a/tests/modelling/test_modelling_algo.py b/tests/modelling/test_modelling_algo.py index <HASH>..<HASH> 100644 --- a/tests/modelling/test_modelling_algo.py +++ b/tests/modelling/test_modelling_algo.py @@ -494,6 +494,7 @@ class FFCAlgorithmTestCase(TestCase): ffc_loader=self.ffc_loader, start=self.dates[max(window_lengths)], end=self.dates[-1], + env=self.env, ) algo.run(
TEST: Pass cls.env for test_handle_adjustment. Otherwise we inseret random assets into a new TradingEnvironment, which is surprising in debugging.
quantopian_zipline
train
py
96e9aae70c3d47dfe90fbbdc9003ec12e5a967eb
diff --git a/lib/Widget/Error.php b/lib/Widget/Error.php index <HASH>..<HASH> 100644 --- a/lib/Widget/Error.php +++ b/lib/Widget/Error.php @@ -159,7 +159,7 @@ class Error extends AbstractWidget if ($line != $i) { $content .= htmlspecialchars($temp, ENT_QUOTES); } else { - $content .= '<span class="error-text">' . htmlspecialchars($temp) . '</span>'; + $content .= '<span class="error-text">' . htmlspecialchars($temp, ENT_QUOTES) . '</span>'; } }
added missing ENT_QUOTES
twinh_wei
train
php
2d9485448e86948184d9f46153af6d174a1137db
diff --git a/address/widgets.py b/address/widgets.py index <HASH>..<HASH> 100644 --- a/address/widgets.py +++ b/address/widgets.py @@ -77,7 +77,7 @@ class AddressWidget(forms.TextInput): elems = [ super(AddressWidget, self).render( name, - escape(ad.get('formatted', None)), + escape(ad.get('formatted', '')), attrs, **kwargs )
Fixes #<I>: None is displayed in widget input
furious-luke_django-address
train
py
e20c0a29bd5c23cf1937eced22dd0df1b69b227c
diff --git a/Parsedown.php b/Parsedown.php index <HASH>..<HASH> 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -563,6 +563,11 @@ class Parsedown else { $markup .= $text; + + if (isset($elements[2])) + { + $markup .= "\n"; + } } } else
nested elements should render on a new line
erusev_parsedown
train
php
dc34e5896b7233bae8d328c752168161c472f7de
diff --git a/metamagic/json/tests/benchmarks.py b/metamagic/json/tests/benchmarks.py index <HASH>..<HASH> 100644 --- a/metamagic/json/tests/benchmarks.py +++ b/metamagic/json/tests/benchmarks.py @@ -28,8 +28,9 @@ class JsonBenchmark: def timing_test(self, obj, num_loops): - #gc.collect() - #print('before', len(gc.get_objects())) + gc.collect() + gc.collect() + before_objects = len(gc.get_objects()) tsecbase = 0 tstart = time.clock() @@ -86,8 +87,10 @@ class JsonBenchmark: print (" marshal: ", repr(tsec).rjust(7), "sec, ", \ repr(int(num_loops/tsec)).rjust(7), "req/sec") - #gc.collect() - #print('after', len(gc.get_objects())) + gc.collect() + after_objects = len(gc.get_objects()) + + assert before_objects == after_objects def run(self):
Added wrong ref counting test to benchmark
sprymix_metamagic.json
train
py
e164fc1963f95d0eada108b78a4422bfac5ce8b1
diff --git a/filterpy/kalman/UKF.py b/filterpy/kalman/UKF.py index <HASH>..<HASH> 100644 --- a/filterpy/kalman/UKF.py +++ b/filterpy/kalman/UKF.py @@ -603,7 +603,8 @@ class UnscentedKalmanFilter(object): raise TypeError( 'each element in zs must be a 1D array of length {}'.format(self._dim_z)) - z_n = np.size(zs, 0) + z_n = len(zs) + if Rs is None: Rs = [self.R] * z_n
Fixed warning about ragged arrays was using np.size to get length of the z list, but now that we allow None in the list that caused a warning that the array was ragged. Switched to using len()
rlabbe_filterpy
train
py
35355c73db6429360d64c47eab0133afbf05bcba
diff --git a/lib/hash/hash_path_proc.rb b/lib/hash/hash_path_proc.rb index <HASH>..<HASH> 100644 --- a/lib/hash/hash_path_proc.rb +++ b/lib/hash/hash_path_proc.rb @@ -227,6 +227,7 @@ module BBLib end def self.strip hash, path, value, args, **params + value.map!{ |m| m.respond_to?(:strip) ? m.strip : m } if value.is_a?(Array) hash.hash_path_set path => (value.respond_to?(:strip) ? value.strip : value) end
Fixed various minor bugs. Added new procs.
bblack16_bblib-ruby
train
rb
43ca2013937efdecf46b1d2f959e6785118c5e8d
diff --git a/libraries/joomla/html/toolbar/button.php b/libraries/joomla/html/toolbar/button.php index <HASH>..<HASH> 100644 --- a/libraries/joomla/html/toolbar/button.php +++ b/libraries/joomla/html/toolbar/button.php @@ -91,18 +91,6 @@ abstract class JButton extends JObject } /** - * Get the button id - * - * Can be redefined in the final button class - * - * @since 11.1 - */ - public function fetchId() - { - return; - } - - /** * Get the button * * Defined in the final button class
Remove JButton::fetchID Parent Class which is inconsistent with all child classes and not used in core - produces PHP Strict Error Message
joomla_joomla-framework
train
php
5b92f76f4b0597de6d404a6dd536fd4f04fddfe4
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ sys.dont_write_bytecode = True setup( name='pipe2py', - version='0.23.5', + version='0.23.6', description=( 'A project to compile Yahoo! Pipes into Python. ' 'The pipe2py package can compile a Yahoo! Pipe into pure Python source'
Bump to version <I>
ggaughan_pipe2py
train
py
bcf197d02731b9548954a6c8dcad1bb290751439
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index <HASH>..<HASH> 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -148,12 +148,16 @@ class SFTPClient (BaseSFTP): is ignored, since SSH treats all files as binary. The C{'U'} flag is supported in a compatible way. + The file will be buffered in standard python style by default, but + can be altered with the C{bufsize} parameter. C{0} turns off + buffering, C{1} uses line buffering, and any number greater than 1 + (C{>1}) uses that specific buffer size. + @param filename: name of the file to open. @type filename: string @param mode: mode (python-style) to open in. @type mode: string - @param bufsize: desired buffering (-1 = default buffer size, 0 = - unbuffered, 1 = line buffered, >1 = requested buffer size). + @param bufsize: desired buffering (-1 = default buffer size) @type bufsize: int @return: a file object representing the open file. @rtype: SFTPFile @@ -176,6 +180,10 @@ class SFTPClient (BaseSFTP): handle = msg.get_string() return SFTPFile(self, handle, mode, bufsize) + # python has migrated toward file() instead of open(). + # and really, that's more easily identifiable. + file = open + def remove(self, path): """ Remove the file at the given path.
[project @ Arch-1:<EMAIL><I>-master-shake%paramiko--dev--1--patch-3] make SFTPClient.file an alias for SFTPClient.open. clean up docs a little, and make 'file' an alias for 'open'. this is how python is heading in general.
bitprophet_ssh
train
py
9a39b7362c34b248ac7dd486d492887fb5aada21
diff --git a/lib/shipit/first_parent_commits_iterator.rb b/lib/shipit/first_parent_commits_iterator.rb index <HASH>..<HASH> 100644 --- a/lib/shipit/first_parent_commits_iterator.rb +++ b/lib/shipit/first_parent_commits_iterator.rb @@ -8,7 +8,7 @@ module Shipit next end - if last_ancestor.parents.first.sha == commit.sha + if last_ancestor.parents.empty? || last_ancestor.parents.first.sha == commit.sha yield last_ancestor = commit end end
Handle orphan commits in GithubSyncJob
Shopify_shipit-engine
train
rb
87c31b7e90c7799d4215ba2e59c503419e4052ad
diff --git a/tests/test_build_ext.py b/tests/test_build_ext.py index <HASH>..<HASH> 100644 --- a/tests/test_build_ext.py +++ b/tests/test_build_ext.py @@ -1,6 +1,5 @@ import sys import os -import tempfile import shutil from StringIO import StringIO @@ -15,7 +14,8 @@ class BuildExtTestCase(unittest.TestCase): def setUp(self): # Create a simple test environment # Note that we're making changes to sys.path - self.tmp_dir = tempfile.mkdtemp(prefix="pythontest_") + self.tmp_dir = os.path.join(os.path.dirname(__file__), 'xx') + os.mkdir(self.tmp_dir) self.sys_path = sys.path[:] sys.path.append(self.tmp_dir)
Merged revisions <I> via svnmerge from svn+ssh://<EMAIL>/python/trunk ........ r<I> | tarek.ziade | <I>-<I>-<I> <I>:<I>:<I> <I> (Thu, <I> Feb <I>) | 1 line fixing the leak introduced in r<I> ........
pypa_setuptools
train
py
56ffcb72730e56780f30d4c526bae9352bf4181c
diff --git a/test_all.py b/test_all.py index <HASH>..<HASH> 100644 --- a/test_all.py +++ b/test_all.py @@ -39,13 +39,13 @@ def run(): "well done! You have failed spectacularly. Incoming crash...") print ("Getting page data list #1: ") - print pyco.get_page_full(page_id) + print (pyco.get_page_full(page_id)) print ("Getting page data list #2: ") - print pyco.get_page_full_more(page_name, space) + print (pyco.get_page_full_more(page_name, space)) print ("Getting page content: ") - print pyco.get_page_content(page_id) + print (pyco.get_page_content(page_id)) child_content = ("I am a child page! Look at me!") @@ -56,7 +56,7 @@ def run(): pyco.create_page("Child page dos", page_id, space, child_content) print ("Here are the children belonging to " + page_name + ": ") - print pyco.get_page_children(page_id) + print (pyco.get_page_children(page_id)) print ("Deleting child page dos...") pyco.delete_page(pyco.get_page_id("Child page dos", space))
Changes to support Python <I>-<I>
FulcrumTechnologies_pyconfluence
train
py
838d5a57018b4b746edb444346cea825e1893914
diff --git a/src/test/java/com/lmax/disruptor/SequenceGroupTest.java b/src/test/java/com/lmax/disruptor/SequenceGroupTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/lmax/disruptor/SequenceGroupTest.java +++ b/src/test/java/com/lmax/disruptor/SequenceGroupTest.java @@ -15,12 +15,13 @@ */ package com.lmax.disruptor; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.*; - -import org.junit.Test; - import com.lmax.disruptor.support.TestEvent; +import org.junit.jupiter.api.Test; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; public final class SequenceGroupTest {
Rewrite SequenceGroupTest in spirit of JUnit 5
LMAX-Exchange_disruptor
train
java
ebcf780445957b59b6c7a6c0a0b5bd132b482852
diff --git a/modules/aggregator/hooks/hook_frontpage.php b/modules/aggregator/hooks/hook_frontpage.php index <HASH>..<HASH> 100644 --- a/modules/aggregator/hooks/hook_frontpage.php +++ b/modules/aggregator/hooks/hook_frontpage.php @@ -10,7 +10,7 @@ function aggregator_hook_frontpage(&$links) { $links['federation'][] = array( 'href' => SimpleSAML_Module::getModuleURL('aggregator/'), - 'text' => '{aggregator:dict:frontpage_link}', + 'text' => '{aggregator:aggregator:frontpage_link}', ); } diff --git a/modules/metarefresh/templates/fetch.tpl.php b/modules/metarefresh/templates/fetch.tpl.php index <HASH>..<HASH> 100644 --- a/modules/metarefresh/templates/fetch.tpl.php +++ b/modules/metarefresh/templates/fetch.tpl.php @@ -1,5 +1,5 @@ <?php -$this->data['header'] = $this->t('{aggregator:dict:aggregator_header}'); +$this->data['header'] = $this->t('{aggregator:aggregator:aggregator_header}'); $this->includeAtTemplateBase('includes/header.php'); echo('<h1>Metarefresh fetch</h1>');
aggregator: Fix dictionary references.
simplesamlphp_saml2
train
php,php
c76dff939531c388a53ca4b01b049828d0179aae
diff --git a/lib/cfoundry/v2/model.rb b/lib/cfoundry/v2/model.rb index <HASH>..<HASH> 100644 --- a/lib/cfoundry/v2/model.rb +++ b/lib/cfoundry/v2/model.rb @@ -25,8 +25,8 @@ module CFoundry::V2 obj = opts[:as] || name define_method(name) { - if manifest[:entity].key? name - @client.send(:"make_#{obj}", manifest[:entity][name]) + if @manifest && @manifest[:entity].key?(name) + @client.send(:"make_#{obj}", @manifest[:entity][name]) else @client.send( :"#{obj}_from", @@ -56,8 +56,8 @@ module CFoundry::V2 define_method(plural) { |*args| depth, query = args - if manifest[:entity].key?(plural) - objs = manifest[:entity][plural] + if @manifest && @manifest[:entity].key?(plural) && !depth + objs = @manifest[:entity][plural] if query find_by = query.keys.first @@ -71,7 +71,7 @@ module CFoundry::V2 else @client.send( :"#{plural_object}_from", - send("#{plural}_url"), + "/v2/#{object_name}s/#@guid/#{plural}", depth || opts[:depth], query) end
send fewer requests for relationship access Change-Id: Ibd<I>c<I>e<I>dc<I>bf8b2a<I>a<I>ba<I>da
cloudfoundry-attic_cfoundry
train
rb
f25639becde583a9a5191ae6023599897250c720
diff --git a/src/angularytics.js b/src/angularytics.js index <HASH>..<HASH> 100644 --- a/src/angularytics.js +++ b/src/angularytics.js @@ -13,7 +13,7 @@ } var capitalizeHandler = function(handler) { - return handler.charAt(0).toUpperCase() + handler.substring(1).toLowerCase(); + return handler.charAt(0).toUpperCase() + handler.substring(1); } this.$get = function($injector, $rootScope, $location) {
function capitalizeHandler is doing wrong when use GoolgeUniversal old capitalizehandler will set 'GoogleUniversal' to 'Googleuniversal' which could not be found as the correct event handler is 'AngularyticsGoogleUniversalHandler'. Actually I think we have no need the helper(capitalize) here, just leave it to the user
mgonto_angularytics
train
js
3cf00f9284778f9df4f3e5c21305a51af8061b2f
diff --git a/sandbox.go b/sandbox.go index <HASH>..<HASH> 100644 --- a/sandbox.go +++ b/sandbox.go @@ -650,7 +650,7 @@ func (sb *sandbox) clearNetworkResources(origEp *endpoint) error { ep := sb.getEndpoint(origEp.id) if ep == nil { return fmt.Errorf("could not find the sandbox endpoint data for endpoint %s", - ep.name) + origEp.id) } sb.Lock()
Fixed a panic issue in clearNetworkResources Not sure why govet didnt catch this obvious error
docker_libnetwork
train
go
4dcc1ed78b6610bad662bcf7dffa836566f36c2a
diff --git a/polyfills/Array.prototype.filter/polyfill.js b/polyfills/Array.prototype.filter/polyfill.js index <HASH>..<HASH> 100644 --- a/polyfills/Array.prototype.filter/polyfill.js +++ b/polyfills/Array.prototype.filter/polyfill.js @@ -1,10 +1,22 @@ Array.prototype.filter = function filter(callback) { + if (!(this instanceof Object)) { + throw new TypeError(this + 'is not an object'); + } + if (typeof callback !== 'function') { throw new TypeError(callback + ' is not a function'); } - for (var array = this, result = [], index = 0, length = array.length; index < length; ++index) { - if (index in array && callback.call(arguments[1], array[index], index, array)) { + var + array = Object(this), + arrayIsString = array instanceof String, + scope = arguments[1], + length = array.length, + index = 0, + result = []; + + for (; index < length; ++index) { + if (index in array && callback.call(scope, arrayIsString ? array.charAt(index) : array[index], index, array)) { result.push(array[index]); } }
Update Array.prototype.filter - throw error on non-objects - array should be an object - support strings in old ie
Financial-Times_polyfill-service
train
js
d26349d2f14a6f1335f3a5fc2ca23b8994d9b09f
diff --git a/kaybee/plugins/articles/handlers.py b/kaybee/plugins/articles/handlers.py index <HASH>..<HASH> 100644 --- a/kaybee/plugins/articles/handlers.py +++ b/kaybee/plugins/articles/handlers.py @@ -1,10 +1,3 @@ -""" - -TODO -- excerpt and auto-excerpt (and remove other) -- -""" - import inspect import os from pathlib import PurePath
@WIP Remove note about TODO.
pauleveritt_kaybee
train
py
bf989fc5226be80275b1e89227609bd5ba37fb94
diff --git a/src/org/parosproxy/paros/network/HttpSender.java b/src/org/parosproxy/paros/network/HttpSender.java index <HASH>..<HASH> 100644 --- a/src/org/parosproxy/paros/network/HttpSender.java +++ b/src/org/parosproxy/paros/network/HttpSender.java @@ -49,6 +49,7 @@ // ZAP: 2014/08/14 Issue 1291: 407 Proxy Authentication Required while active scanning // ZAP: 2014/10/25 Issue 1062: Added a getter for the HttpClient. // ZAP: 2014/10/28 Issue 1390: Force https on cfu call +// ZAP: 2014/11/25 Issue 1411: Changed getUser() visibility package org.parosproxy.paros.network; @@ -422,7 +423,6 @@ public class HttpSender { } } - // ZAP: Changed visibility to public. Needed for authentication when running Zest script in scanner (Issue 1411) public User getUser (HttpMessage msg) { if (this.user != null) { // If its set for the sender it overrides the message
Issue <I>: Changed getUser() visibility
zaproxy_zaproxy
train
java
da252e72b66b5c8565f21b6985fee8492aaf954a
diff --git a/lib/muck-engine/populate.rb b/lib/muck-engine/populate.rb index <HASH>..<HASH> 100644 --- a/lib/muck-engine/populate.rb +++ b/lib/muck-engine/populate.rb @@ -3,7 +3,7 @@ module MuckEngine module Populate def self.all - $KCODE = 'UTF8' + $KCODE = 'UTF8' if RUBY_VERSION < '1.9' countries us_states uk_states @@ -12,7 +12,7 @@ module MuckEngine end def self.countries - $KCODE = 'UTF8' + $KCODE = 'UTF8' if RUBY_VERSION < '1.9' [ ['AD', 'Andorra'], ['AE', 'United Arab Emirates'], @@ -559,7 +559,7 @@ module MuckEngine end def self.languages - $KCODE = 'UTF8' + $KCODE = 'UTF8' if RUBY_VERSION < '1.9' # Languages [ ['Afar', 'Afaraf', false, 'aa', false],
Added checks for ruby version to determine wether or not to set
tatemae_muck-engine
train
rb
b4c6b2551ed24742559e715a017132314d8d68fc
diff --git a/FeatureContext.php b/FeatureContext.php index <HASH>..<HASH> 100644 --- a/FeatureContext.php +++ b/FeatureContext.php @@ -179,9 +179,9 @@ class FeatureContext extends MinkContext { } /** - * @Given /^(that I|I) am at "([^"]*)"$/ + * @Given /^(?:that I|I) am at "([^"]*)"$/ */ - public function iAmAt($syn, $path) { + public function iAmAt($path) { // Use the mink extension. return new Given("I am on \"$path\""); }
Adjusting the regex to make the (that I|I) a non-grouping parentheses.
jhedstrom_DrupalDriver
train
php
f209e1eb6f3d4bdd7c0fef60a667bf6ee955be2c
diff --git a/tests/func/test_analytics.py b/tests/func/test_analytics.py index <HASH>..<HASH> 100644 --- a/tests/func/test_analytics.py +++ b/tests/func/test_analytics.py @@ -15,7 +15,7 @@ def test_daemon_analytics(mock_send, tmp_path): @mock.patch("dvc.analytics.collect_and_send_report") @mock.patch("dvc.analytics.is_enabled", return_value=True) def test_main_analytics(mock_is_enabled, mock_report, tmp_dir, dvc): - tmp_dir.gen("foo") + tmp_dir.gen("foo", "text") assert 0 == main(["add", "foo"]) assert mock_is_enabled.called assert mock_report.called
tests/analytics: explicitly set content for foo
iterative_dvc
train
py
6b378a186b668c75c1e86de58dab8818e639e394
diff --git a/cmd/juju/application/deploy_test.go b/cmd/juju/application/deploy_test.go index <HASH>..<HASH> 100644 --- a/cmd/juju/application/deploy_test.go +++ b/cmd/juju/application/deploy_test.go @@ -1523,7 +1523,7 @@ func (s *FakeStoreStateSuite) setupCharmMaybeAddForce(c *gc.C, url, name, series var err error chDir, err = charm.ReadCharmDir(testcharms.RepoWithSeries(series).CharmDirPath(name)) if err != nil { - if !os.IsNotExist(err) { + if !os.IsNotExist(errors.Cause(err)) { c.Fatal(err) return nil }
Update the test to pick up the wrapped error This is a breaking change to charm/v7, unfortunately that ship has saled. Semver should prevent this from happening to consumers of this library, but you really have to think about this.
juju_juju
train
go
b38793b2301b8e69ed397a80cd9c57ac9283a958
diff --git a/example/settings.py b/example/settings.py index <HASH>..<HASH> 100644 --- a/example/settings.py +++ b/example/settings.py @@ -15,13 +15,13 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'debug_toolbar', +# 'debug_toolbar', 'linguist', 'example', ) MIDDLEWARE_CLASSES = ( - 'debug_toolbar.middleware.DebugToolbarMiddleware', +# 'debug_toolbar.middleware.DebugToolbarMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', @@ -40,7 +40,7 @@ DATABASES = { } } -LANGUAGE_CODE = 'en-us' +LANGUAGE_CODE = 'en' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True
Update example LANGUAGE_CODE setting.
ulule_django-linguist
train
py
05c93bddfdf013e139982b9b37aca0d5a39a0c50
diff --git a/docs/api.md b/docs/api.md index <HASH>..<HASH> 100644 --- a/docs/api.md +++ b/docs/api.md @@ -478,6 +478,8 @@ Note that this effectively *timeshifts* events from `stream2` past the end time ### cycle +**Deprecated** + ####`stream.cycle() -> Stream` ####`most.cycle(stream) -> Stream` diff --git a/lib/combinator/build.js b/lib/combinator/build.js index <HASH>..<HASH> 100644 --- a/lib/combinator/build.js +++ b/lib/combinator/build.js @@ -31,6 +31,7 @@ function concat(left, right) { } /** + * @deprecated * Tie stream into a circle, creating an infinite stream * @param {Stream} stream * @returns {Stream} new infinite stream diff --git a/most.js b/most.js index <HASH>..<HASH> 100644 --- a/most.js +++ b/most.js @@ -149,6 +149,7 @@ exports.concat = build.concat; exports.startWith = build.cons; /** + * @deprecated * Tie this stream into a circle, thus creating an infinite stream * @returns {Stream} new infinite stream */
Deprecate cycle() It doesn't seem to be useful. If there's a need for it, it could be published as a separate package.
mostjs_core
train
md,js,js
9baa46a47c0268f44aabdeb9b2f52413868879e7
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 @@ -84,10 +84,7 @@ RSpec.configure do |config| config.filter_run_when_matching :focus config.mock_with :rspec do |mocks| - # We really should have this on, but it breaks a _lot_ of tests. We'll - # need to go through and fix those tests first before it can be enabled - # for real. - mocks.verify_partial_doubles = false + mocks.verify_partial_doubles = true end tmpdir = Puppet::FileSystem.expand_path(Dir.mktmpdir("rspecrun"))
(maint) Verify partial doubles Verify that an object implements an allowed or expected method. This only affects partial doubles (real objects with a stubbed method), not objects created via `double`.
puppetlabs_puppet
train
rb
2a486622289ff961409a2d10f290b842dca49776
diff --git a/src/API/Api.php b/src/API/Api.php index <HASH>..<HASH> 100644 --- a/src/API/Api.php +++ b/src/API/Api.php @@ -154,7 +154,7 @@ class Api $data = [ 'headers' => [ 'Client-ID' => $this->getClientId(), - 'Accept' => 'application/vnd.twitchtv.v3+json', + 'Accept' => 'application/vnd.twitchtv.v5+json', ], ];
Add v5 Header String v5 header string was set in constructor, was overidden by v3 later on when making API calls.
PetterKraabol_laravel-twitch-api
train
php
c0071a9a4760e0083cec182324b30a8ae1e1fe49
diff --git a/src/constants/Style.js b/src/constants/Style.js index <HASH>..<HASH> 100644 --- a/src/constants/Style.js +++ b/src/constants/Style.js @@ -7,11 +7,11 @@ module.exports = { Colors: { // GRAYSCALE - SLATE: '#2F363E', - CHARCOAL: '#56595A', - ASH: '#ACB0B3', - FOG: '#E3E6E7', - PORCELAIN: '#F7F8F8', + SLATE: '#2C353F', + CHARCOAL: '#474F59', + ASH: '#959CA6', + FOG: '#DFE3E8', + PORCELAIN: '#F5F6F8', WHITE: '#FFFFFF', // ACCENTS
Update grayscale colors Updated gray colors for greater accessibility and contrast.
mxenabled_mx-react-components
train
js
6ed01f18bd78f60d2022e4b52925a0bb22b9676d
diff --git a/weld-lite-extension-translator/src/main/java/org/jboss/weld/lite/extension/translator/ExtensionInvoker.java b/weld-lite-extension-translator/src/main/java/org/jboss/weld/lite/extension/translator/ExtensionInvoker.java index <HASH>..<HASH> 100644 --- a/weld-lite-extension-translator/src/main/java/org/jboss/weld/lite/extension/translator/ExtensionInvoker.java +++ b/weld-lite-extension-translator/src/main/java/org/jboss/weld/lite/extension/translator/ExtensionInvoker.java @@ -125,7 +125,6 @@ class ExtensionInvoker { Class<?> extensionClass = extensionClasses.get(method.getDeclaringClass().getName()); Object extensionClassInstance = extensionClassInstances.get(extensionClass); - method.setAccessible(true); method.invoke(extensionClassInstance, arguments.toArray()); }
WELD-<I> Remove setAccessible() call in ExtensionInvoker because all extensions methods are per specification public.
weld_core
train
java
1b009e18aff37a49af84e6f2634db0b9021a7cd9
diff --git a/src/Everon/DataMapper/Criteria/Builder.php b/src/Everon/DataMapper/Criteria/Builder.php index <HASH>..<HASH> 100644 --- a/src/Everon/DataMapper/Criteria/Builder.php +++ b/src/Everon/DataMapper/Criteria/Builder.php @@ -170,7 +170,6 @@ class Builder implements Interfaces\Criteria\Builder } else { $this->getCurrentContainer()->getCriteria()->andWhere($Criterium); - $this->getCurrentContainer()->glueByAnd(); } return $this; @@ -187,7 +186,6 @@ class Builder implements Interfaces\Criteria\Builder } else { $this->getCurrentContainer()->getCriteria()->orWhere($Criterium); - $this->getCurrentContainer()->glueByOr(); } return $this; @@ -223,7 +221,6 @@ class Builder implements Interfaces\Criteria\Builder } else { $this->getCurrentContainer()->getCriteria()->andWhere($Criterium); - $this->getCurrentContainer()->glueByAnd(); } return $this; } @@ -239,7 +236,6 @@ class Builder implements Interfaces\Criteria\Builder } else { $this->getCurrentContainer()->getCriteria()->orWhere($Criterium); - $this->getCurrentContainer()->glueByOr(); } return $this; }
fixed problem with wrong glue for criteria containers
oliwierptak_Everon1
train
php
6bdbd2bf5059dac58e65cdf3fbafe618e182d907
diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py index <HASH>..<HASH> 100644 --- a/superset/connectors/sqla/models.py +++ b/superset/connectors/sqla/models.py @@ -309,7 +309,8 @@ class TableColumn(Model, BaseColumn): ], ) -> str: """Convert datetime object to a SQL expression string""" - sql = self.db_engine_spec.convert_dttm(self.type, dttm) if self.type else None + dttm_type = self.type or ("DATETIME" if self.is_dttm else None) + sql = self.db_engine_spec.convert_dttm(dttm_type, dttm) if dttm_type else None if sql: return sql
fix: the calculated columns explicit type convert into date (#<I>)
apache_incubator-superset
train
py
2c7468fcf711a432e4983062485449e93802ad89
diff --git a/holoviews/plotting/mpl/plot.py b/holoviews/plotting/mpl/plot.py index <HASH>..<HASH> 100644 --- a/holoviews/plotting/mpl/plot.py +++ b/holoviews/plotting/mpl/plot.py @@ -752,7 +752,7 @@ class LayoutPlot(GenericLayoutPlot, CompositePlot): main_aspect = np.nan if isinstance(main, Empty) else main_options.get('aspect', 1) main_aspect = self.aspect_weight*main_aspect + 1-self.aspect_weight else: - main_aspect = 1 + main_aspect = np.nan if layout_type in ['Dual', 'Triple']: el = layout_view.get('right', None) @@ -804,6 +804,7 @@ class LayoutPlot(GenericLayoutPlot, CompositePlot): widths = np.array([r for col in col_widthratios.values() for ratios in col[1] for r in ratios])/4 + hr_unnormalized = compute_ratios(row_heightratios, False) wr_unnormalized = compute_ratios(col_widthratios, False) hr_list = compute_ratios(row_heightratios) wr_list = compute_ratios(col_widthratios)
Correctly handling aspect of trailing empty plots in layout
pyviz_holoviews
train
py
8f77689bb1c2d2197628faf1ac3bf421556155ec
diff --git a/plenum/test/zstack_tests/test_ping_reconnection.py b/plenum/test/zstack_tests/test_ping_reconnection.py index <HASH>..<HASH> 100644 --- a/plenum/test/zstack_tests/test_ping_reconnection.py +++ b/plenum/test/zstack_tests/test_ping_reconnection.py @@ -2,6 +2,7 @@ import pytest heartbeat_freq = 2 + @pytest.fixture(scope="module") def tconf(tconf): tconf.UseZStack = True @@ -16,4 +17,5 @@ def test_ping_reconnection(tconf, looper, txnPoolNodeSet): node2.nodestack.sendPingPong(node2.nodestack._remotes['Alpha']) looper.runFor(6 * heartbeat_freq) socket_after = node1.nodestack._remotes['Beta'].socket - assert socket_before != socket_after + # reconnection by pings is disabled now + assert socket_before == socket_after
INDY-<I>: fix test for disabling re-connect by pings
hyperledger_indy-plenum
train
py
91b0a3616a03c2ed32865b7927e63e45c03d4d55
diff --git a/bcbio/broad/__init__.py b/bcbio/broad/__init__.py index <HASH>..<HASH> 100644 --- a/bcbio/broad/__init__.py +++ b/bcbio/broad/__init__.py @@ -89,7 +89,7 @@ class BroadRunner: return self._picard_version if os.path.isdir(self._picard_ref): picard_jar = self._get_jar(command) - cl = ["java", "-Xms5m", "-Xmx5m", "-jar", picard_jar] + cl = ["java", "-Xms64m", "-Xmx128m", "-jar", picard_jar] else: cl = [self._picard_ref, command] cl += ["--version"] @@ -166,7 +166,7 @@ class BroadRunner: return self._gatk_version else: gatk_jar = self._get_jar("GenomeAnalysisTK", ["GenomeAnalysisTKLite"]) - cl = ["java", "-Xms5m", "-Xmx5m", "-jar", gatk_jar, "-version"] + cl = ["java", "-Xms64m", "-Xmx128m", "-jar", gatk_jar, "-version"] with closing(subprocess.Popen(cl, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout) as stdout: out = stdout.read().strip() # versions earlier than 2.4 do not have explicit version command,
Provide larger memory values for retrieving versions in GATK/Picard since that is now a one time operation. Try to avoid issues on MacOSX #<I>
bcbio_bcbio-nextgen
train
py
1a0bec859eeb95f9c334af1a5b3c88646d03a722
diff --git a/test/e2e/sauce/karma.conf.js b/test/e2e/sauce/karma.conf.js index <HASH>..<HASH> 100644 --- a/test/e2e/sauce/karma.conf.js +++ b/test/e2e/sauce/karma.conf.js @@ -1,3 +1,5 @@ +var TRAVIS_WITHOUT_SAUCE = process.env.TRAVIS_SECURE_ENV_VARS === 'false'; + module.exports = function(config) { config.set({ frameworks: ['jasmine'], @@ -8,7 +10,7 @@ module.exports = function(config) { autoWatch: true, - browsers: ['sl_chrome_linux'], + browsers: [TRAVIS_WITHOUT_SAUCE ? 'Firefox' : 'sl_chrome_linux'], reporters: ['dots'],
test(e2e): do not use sauce if secured vars not available This makes the "sauce" e2e test use Firefox, when testing pull requests.
karma-runner_karma
train
js
1de6887fead86e5190ba61875e8f3fc6b79f0626
diff --git a/test/compat.py b/test/compat.py index <HASH>..<HASH> 100644 --- a/test/compat.py +++ b/test/compat.py @@ -10,12 +10,6 @@ from __future__ import unicode_literals import unittest try: - from functools import lru_cache # @NoMove -except ImportError: - # pylint: disable=import-error - from cachetools.func import lru_cache # @NoMove @UnusedImport - -try: from unittest.mock import Mock, MagicMock, patch # @NoMove except ImportError: # pylint: disable=import-error @@ -23,6 +17,8 @@ except ImportError: from six import assertCountEqual, PY2 +from spam_lists.compat import lru_cache # @NoMove @UnusedImport + class Py2TestCase(unittest.TestCase): def assertCountEqual(self, expected_sequence, actual_sequence, msg=None):
Refactor test.compat to use lru_cache from spam_lists.compat
piotr-rusin_spam-lists
train
py
02c6df3ec67e374bc428a56e4b254d685fb78437
diff --git a/test/aws/core/client_test.rb b/test/aws/core/client_test.rb index <HASH>..<HASH> 100644 --- a/test/aws/core/client_test.rb +++ b/test/aws/core/client_test.rb @@ -25,8 +25,21 @@ module Aws end end + def client + client_class.new(:region => 'REGION') + end + it 'is a Seahorse::Client' do - client_class.new(:region => 'region').must_be_kind_of(Seahorse::Client) + client.must_be_kind_of(Seahorse::Client) + end + + describe '#config' do + + it 'returns an Aws::Core::Configuration' do + skip + client.config.must_be_kind_of(Aws::Core::Configuration) + end + end describe '#endpoint' do
Added a pending test about the configuration class.
aws_aws-sdk-ruby
train
rb
12e68c67c5acdfd9ce8af3abad2a68d0f93cfaa6
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ const execSync = require('child_process').execSync -function getGlobs(globs) { +function getGlobs(globs = '') { if (typeof globs === 'string') { return globs.split(' ') } else if (Array.isArray(globs)) {
Get diff of all files if args are given
slammayjammay_git-diff-glob
train
js
66ff9dfa46af106139f1a1f727f9ed051f494833
diff --git a/src/Illuminate/Routing/UrlGenerator.php b/src/Illuminate/Routing/UrlGenerator.php index <HASH>..<HASH> 100755 --- a/src/Illuminate/Routing/UrlGenerator.php +++ b/src/Illuminate/Routing/UrlGenerator.php @@ -331,7 +331,7 @@ class UrlGenerator implements UrlGeneratorContract { */ protected function addQueryString($uri, array $parameters) { - // If the URI has a fragmnet, we will move it to the end of the URI since it will + // If the URI has a fragment, we will move it to the end of the URI since it will // need to come after any query string that may be added to the URL else it is // not going to be available. We will remove it then append it back on here. if ( ! is_null($fragment = parse_url($uri, PHP_URL_FRAGMENT)))
Fix typo in UrlGenerator
laravel_framework
train
php
be7f1692309fad4988acd5bd1d02536ac3220acf
diff --git a/builtin/logical/ssh/util.go b/builtin/logical/ssh/util.go index <HASH>..<HASH> 100644 --- a/builtin/logical/ssh/util.go +++ b/builtin/logical/ssh/util.go @@ -154,6 +154,13 @@ func cidrListContainsIP(ip, cidrList string) (bool, error) { return false, nil } +func insecureIgnoreHostWarning(logger log.Logger) ssh.HostKeyCallback { + return func(hostname string, remote net.Addr, key ssh.PublicKey) error { + logger.Warn("cannot verify server key: host key validation disabled") + return nil + } +} + func createSSHComm(logger log.Logger, username, ip string, port int, hostkey string) (*comm, error) { signer, err := ssh.ParsePrivateKey([]byte(hostkey)) if err != nil { @@ -165,7 +172,7 @@ func createSSHComm(logger log.Logger, username, ip string, port int, hostkey str Auth: []ssh.AuthMethod{ ssh.PublicKeys(signer), }, - HostKeyCallback: ssh.InsecureIgnoreHostKey(), + HostKeyCallback: insecureIgnoreHostWarning(logger), } connfunc := func() (net.Conn, error) {
plugins/ssh: add diabled host key verification warning (#<I>)
hashicorp_vault
train
go
8edab6101c701f0a06086e5256dd252a88f81881
diff --git a/lib/oanda_api/streaming/json_parser.rb b/lib/oanda_api/streaming/json_parser.rb index <HASH>..<HASH> 100644 --- a/lib/oanda_api/streaming/json_parser.rb +++ b/lib/oanda_api/streaming/json_parser.rb @@ -10,6 +10,7 @@ module OandaAPI module JsonParser extend self + # Map parser adapters to the gem library they require. REQUIREMENT_MAP = { gson: "gson", yajl: "yajl" @@ -91,7 +92,7 @@ module OandaAPI end begin - require REQUIREMENT_MAP.get sym + require REQUIREMENT_MAP.fetch sym return sym rescue ::LoadError warning
fetch, not get Added comment for REQUIREMENT_MAP back
nukeproof_oanda_api
train
rb
a3f3ccf68cfdc235bd8e96e1b1982d8192929e2e
diff --git a/drools-compiler/src/main/java/org/drools/compiler/lang/descr/ProcessDescr.java b/drools-compiler/src/main/java/org/drools/compiler/lang/descr/ProcessDescr.java index <HASH>..<HASH> 100644 --- a/drools-compiler/src/main/java/org/drools/compiler/lang/descr/ProcessDescr.java +++ b/drools-compiler/src/main/java/org/drools/compiler/lang/descr/ProcessDescr.java @@ -58,4 +58,8 @@ public class ProcessDescr extends BaseDescr public void setProcessId(String processId) { this.processId = processId; } + + public String toString() { + return "Process " + name + "(" + processId + ")"; + } }
BZ-<I> - Process compilation error stack does not include any information usable to identify the process definition which caused the error
kiegroup_drools
train
java
360470f0ce6b21e38464ef0a5dd4f469f3ca1431
diff --git a/releaf-i18n_database/lib/releaf/i18n_database/backend.rb b/releaf-i18n_database/lib/releaf/i18n_database/backend.rb index <HASH>..<HASH> 100644 --- a/releaf-i18n_database/lib/releaf/i18n_database/backend.rb +++ b/releaf-i18n_database/lib/releaf/i18n_database/backend.rb @@ -122,12 +122,15 @@ module Releaf def create_missing_translation(locale, key, options) return if Releaf::I18nDatabase.create_missing_translations != true - if options.has_key?(:count) && options[:create_plurals] == true - get_all_pluralizations.each do|pluralization| - Translation.find_or_create_by(key: "#{key}.#{pluralization}") + begin + if options.has_key?(:count) && options[:create_plurals] == true + get_all_pluralizations.each do|pluralization| + Translation.create(key: "#{key}.#{pluralization}") + end + else + Translation.create(key: key) end - else - Translation.find_or_create_by(key: key) + rescue ActiveRecord::RecordNotUnique end end
Prevent ActiveRecord::RecordNotUnique error on translation creation
cubesystems_releaf
train
rb
c99b85bdd9c226132bf8ce4ecf82180eaefa0298
diff --git a/lib/relations/JavaScriptConditionalBlock.js b/lib/relations/JavaScriptConditionalBlock.js index <HASH>..<HASH> 100644 --- a/lib/relations/JavaScriptConditionalBlock.js +++ b/lib/relations/JavaScriptConditionalBlock.js @@ -13,7 +13,7 @@ util.inherits(JavaScriptConditionalBlock, Base); _.extend(JavaScriptConditionalBlock.prototype, { _inline: function (src) { - var newNode = uglify.parser.parse(src)[1]; + var newNode = uglify.parser.parse(src)[1][1]; this.parentNode.splice(this.parentNode.indexOf(this.node), 1, newNode); this.node = newNode; },
relations.JavaScriptConditionalBlock: Fixed bug introduced in previous commit.
assetgraph_assetgraph
train
js
4a044f45e3357c90cf160e1aeff6f6d79535c343
diff --git a/src/com/caverock/androidsvg/SVGImageView.java b/src/com/caverock/androidsvg/SVGImageView.java index <HASH>..<HASH> 100644 --- a/src/com/caverock/androidsvg/SVGImageView.java +++ b/src/com/caverock/androidsvg/SVGImageView.java @@ -105,6 +105,19 @@ public class SVGImageView extends ImageView /** + * Directly set the SVG. + */ + public void setSVG(SVG mysvg) + { + if (mysvg == null) + throw new IllegalArgumentException("Null value passed to setSVG()"); + + setSoftwareLayerType(); + setImageDrawable(new PictureDrawable(mysvg.renderToPicture())); + } + + + /** * Load an SVG image from the given resource id. */ @Override
Added setSVG() method to SVGImageView.
BigBadaboom_androidsvg
train
java
865c264b9c3b2b8f0693c12aded2b03a7e5f1b3f
diff --git a/command/agent/dns.go b/command/agent/dns.go index <HASH>..<HASH> 100644 --- a/command/agent/dns.go +++ b/command/agent/dns.go @@ -592,6 +592,7 @@ RPC: func (d *DNSServer) preparedQueryLookup(network, datacenter, query string, req, resp *dns.Msg) { // Execute the prepared query. args := structs.PreparedQueryExecuteRequest{ + Origin: d.agent.config.NodeName, Datacenter: datacenter, QueryIDOrName: query, QueryOptions: structs.QueryOptions{ diff --git a/command/agent/prepared_query_endpoint.go b/command/agent/prepared_query_endpoint.go index <HASH>..<HASH> 100644 --- a/command/agent/prepared_query_endpoint.go +++ b/command/agent/prepared_query_endpoint.go @@ -95,6 +95,7 @@ func parseLimit(req *http.Request, limit *int) error { // preparedQueryExecute executes a prepared query. func (s *HTTPServer) preparedQueryExecute(id string, resp http.ResponseWriter, req *http.Request) (interface{}, error) { args := structs.PreparedQueryExecuteRequest{ + Origin: s.agent.config.NodeName, QueryIDOrName: id, } s.parseSource(req, &args.Source)
agent: set origin during PQ execution
hashicorp_consul
train
go,go
9f118d4e986853c4431934686c1540ffc333912a
diff --git a/calendar-bundle/contao/dca/tl_calendar_events.php b/calendar-bundle/contao/dca/tl_calendar_events.php index <HASH>..<HASH> 100644 --- a/calendar-bundle/contao/dca/tl_calendar_events.php +++ b/calendar-bundle/contao/dca/tl_calendar_events.php @@ -409,7 +409,7 @@ $GLOBALS['TL_DCA']['tl_calendar_events'] = array 'label' => &$GLOBALS['TL_LANG']['tl_calendar_events']['enclosure'], 'exclude' => true, 'inputType' => 'fileTree', - 'eval' => array('multiple'=>true, 'fieldType'=>'checkbox', 'filesOnly'=>true, 'mandatory'=>true), + 'eval' => array('multiple'=>true, 'fieldType'=>'checkbox', 'filesOnly'=>true, 'isDownloads'=>true, 'extensions'=>Config::get('allowedDownload'), 'mandatory'=>true), 'sql' => "blob NULL" ), 'source' => array
[Calendar] Show enclosures as downloads and limit the selection to the allowed download files
contao_contao
train
php
e8510a7778cb513e18e4b21ed34a27d9133d81b3
diff --git a/lib/websession_webinterface.py b/lib/websession_webinterface.py index <HASH>..<HASH> 100644 --- a/lib/websession_webinterface.py +++ b/lib/websession_webinterface.py @@ -533,9 +533,6 @@ class WebInterfaceYourGroupsPages(WebInterfaceDirectory): _exports = ['', 'display', 'create', 'join', 'leave', 'edit', 'members'] - _force_https = False - - def index(self, req, form): redirect_to_url(req, '/yourgroups/display')
Take out unnecessary force_https false setting for Your Groups pages.
inveniosoftware_invenio-accounts
train
py
b0928f186fb3fe8f341863f852b4543c1c206ff9
diff --git a/g_docs.go b/g_docs.go index <HASH>..<HASH> 100644 --- a/g_docs.go +++ b/g_docs.go @@ -95,7 +95,7 @@ func parsePackagesFromDir(dirpath string) { return nil } - if !strings.Contains(fpath, "vendor") { + if !strings.Contains(fpath, "vendor") && !strings.Contains(fpath, "tests") { err = parsePackageFromDir(fpath) if err != nil { // Send the error to through the channel and continue walking
fix #<I> failed to generate swagger doc
beego_bee
train
go
f8ef7f1ebbe39e39edc097327379580b1c82ff3a
diff --git a/lib/init.js b/lib/init.js index <HASH>..<HASH> 100644 --- a/lib/init.js +++ b/lib/init.js @@ -11,13 +11,17 @@ var debug = require('debug')('thought:init') var exec = require('./utils/exeq') module.exports = function () { - var packageJson = require(path.resolve('package.json')) - if (packageJson.scripts && packageJson.scripts.thought) { - console.log("I think scripts are already in your package.json ('scripts.thought' exists)") - return - } - - return checkPackageJsonInGit() + var packageJson; + return qfs.read('package.json') + .then(function (contents) { + packageJson = JSON.parse(contents); + if (packageJson.scripts && packageJson.scripts.thought) { + throw new Error("I think scripts are already in your package.json ('scripts.thought' exists)") + } + }) + .then(function () { + return checkPackageJsonInGit() + }) .then(function () { packageJson.scripts = packageJson.scripts || {} packageJson.scripts.thought = 'thought run -a'
Init-Script should not use `require("./package.json")` as base for modifications, since the cached value may be modified by `find-package`
nknapp_thought
train
js
a2a94f3f292bae25ae847e8bf7fecb46f992ae53
diff --git a/eli5/sklearn/permutation_importance.py b/eli5/sklearn/permutation_importance.py index <HASH>..<HASH> 100644 --- a/eli5/sklearn/permutation_importance.py +++ b/eli5/sklearn/permutation_importance.py @@ -18,7 +18,7 @@ from eli5.permutation_importance import get_score_importances from eli5.sklearn.utils import pandas_available if pandas_available: - import pandas as pd + import pandas as pd # type: ignore CAVEATS_CV_NONE = """ Feature importances are computed on the same data as used for training,
Update eli5/sklearn/permutation_importance.py
TeamHG-Memex_eli5
train
py
b7d7a8447d2d143ff3d46fc55c8919b4d5d37288
diff --git a/interface.go b/interface.go index <HASH>..<HASH> 100644 --- a/interface.go +++ b/interface.go @@ -38,31 +38,10 @@ type Session interface { Close(error) error } -// ConnState is the status of the connection -type ConnState int - -const ( - // ConnStateInitial is the initial state - ConnStateInitial ConnState = iota - // ConnStateVersionNegotiated means that version negotiation is complete - ConnStateVersionNegotiated - // ConnStateSecure means that the connection is encrypted - ConnStateSecure - // ConnStateForwardSecure means that the connection is forward secure - ConnStateForwardSecure -) - -// ConnStateCallback is called every time the connection moves to another connection state. -type ConnStateCallback func(Session, ConnState) - // Config contains all configuration data needed for a QUIC server or client. // More config parameters (such as timeouts) will be added soon, see e.g. https://github.com/lucas-clemente/quic-go/issues/441. type Config struct { TLSConfig *tls.Config - // ConnStateCallback will be called when the QUIC version is successfully negotiated or when the encryption level changes. - // If this field is not set, the Dial functions will return only when the connection is forward secure. - // Callbacks have to be thread-safe, since they might be called in separate goroutines. - ConnState ConnStateCallback // The QUIC versions that can be negotiated. // If not set, it uses all versions available. // Warning: This API should not be considered stable and will change soon.
remove the ConnState and the ConnStateCallback from the quic.Config
lucas-clemente_quic-go
train
go
99b834b793b7bba96e138d59355dd69f4b042e60
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -73,6 +73,7 @@ setup( 'beautifulsoup4', 'sklearn', 'tika', + # pyjq is in requirements.txt, because Read the Docs can't install it 'mock;python_version<"3.3"'], setup_requires=[ # dependency for `python setup.py test`
Document why pyjq isn't in setup.py anymore
nlppln_nlppln
train
py
f923c328ee0b11fdc8100e58d84fe07336d026d0
diff --git a/src/Compiler.php b/src/Compiler.php index <HASH>..<HASH> 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -215,7 +215,7 @@ class Compiler } //lookout for partials - if (substr($node["value"], 0, 2) === "> ") { + if (mb_substr($node["value"], 0, 2) === "> ") { return $this->generatePartial($node); }
Use mbstring extension function in another place
djmattyg007_Handlebars
train
php
a731cc41434ced8ea320c897332ae1f6c6a79ba9
diff --git a/tests/Library/oxFileCopier.php b/tests/Library/oxFileCopier.php index <HASH>..<HASH> 100644 --- a/tests/Library/oxFileCopier.php +++ b/tests/Library/oxFileCopier.php @@ -39,10 +39,9 @@ class oxFileCopier public function copyFiles($sSource, $sTarget, $blSetPermissions = false) { if (strpos($sTarget, ':') !== false && strpos($sTarget, '@') !== false) { - list($sServer, $sDirectory) = explode(":", $sTarget, 2); - $this->_executeCommand("ssh ".escapeshellarg($sServer)." mkdir ".escapeshellarg($sDirectory)); - $this->_executeCommand("scp -rp ".escapeshellarg($sSource)." ".escapeshellarg($sTarget)); + $this->_executeCommand("scp -rp ".escapeshellarg($sSource."/.")." ".escapeshellarg($sTarget)); if ($blSetPermissions) { + list($sServer, $sDirectory) = explode(":", $sTarget, 2); $this->_executeCommand("ssh ".escapeshellarg($sServer)." chmod 777 ".escapeshellarg('/'.$sDirectory)); } } else {
ESDEV-<I> Fix oxFileCopier to work with remote servers (cherry picked from commit a<I>c<I>) (cherry picked from commit 9dc2b<I>)
OXID-eSales_oxideshop_ce
train
php
78f1ecfafc080f7042d19f439944e7e82558ab95
diff --git a/ext/byebug/extconf.rb b/ext/byebug/extconf.rb index <HASH>..<HASH> 100644 --- a/ext/byebug/extconf.rb +++ b/ext/byebug/extconf.rb @@ -8,7 +8,7 @@ if RUBY_VERSION < "2.0" end if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc/ - $CFLAGS = ' -std=c99 -Wall -Werror' + $CFLAGS = '-Wall -Werror' $CFLAGS += ' -g3' if ENV['debug'] end
Revert e8e<I>d8 because I think it causes #9
deivid-rodriguez_byebug
train
rb
e2e3e283650b19f5c303229244126eb00fa5d99a
diff --git a/redisson/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java b/redisson/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java index <HASH>..<HASH> 100644 --- a/redisson/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java +++ b/redisson/src/main/java/org/redisson/connection/MasterSlaveConnectionManager.java @@ -351,6 +351,7 @@ public class MasterSlaveConnectionManager implements ConnectionManager { c.setSubscriptionConnectionMinimumIdleSize(cfg.getSubscriptionConnectionMinimumIdleSize()); c.setReadMode(cfg.getReadMode()); c.setSubscriptionMode(cfg.getSubscriptionMode()); + c.setDnsMonitoringInterval(cfg.getDnsMonitoringInterval()); return c; }
setDnsMonitoringInterval(-1) doesn't allow to disable DNS monitoring. #<I>
redisson_redisson
train
java
42bfadf4607ca903c9e7ca04011ae22c409f8f54
diff --git a/lib/fog/core/credentials.rb b/lib/fog/core/credentials.rb index <HASH>..<HASH> 100644 --- a/lib/fog/core/credentials.rb +++ b/lib/fog/core/credentials.rb @@ -52,9 +52,11 @@ module Fog def self.symbolize_credentials(args) if args.is_a? Hash - Hash[ *args.collect do |key, value| - [key.to_sym, self.symbolize_credentials(value)] - end.flatten ] + copy = Array.new + args.each do |key, value| + copy.push(key.to_sym, self.symbolize_credentials(value)) + end + Hash[*copy] else args end
Nested Credentials with Array gets flattened; restrict flatten to 1L Implementation is manual since flatten(integer) does not exist in MRI <I> and lower.
fog_fog
train
rb
9c73c2ba592fe2930fdf873ead56f74980184fad
diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index <HASH>..<HASH> 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -48,6 +48,7 @@ except ImportError: __all__ = ( 'And', + 'Backlog', 'CallPrinter', 'CodePrinter', 'Debugger',
Add missing entry to __all__.
ionelmc_python-hunter
train
py
c25aebe88c8b31bfed5700ecb9fda1179edc3839
diff --git a/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java b/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java +++ b/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java @@ -1021,9 +1021,8 @@ public class ContentSpecValidator implements ShutdownAbleApp { // Check that tags aren't trying to be added to a revision if (specTopic.getRevision() != null && !specTopic.getTags(false).isEmpty()) { - log.error(String.format(ProcessorConstants.WARN_TAGS_IGNORE_MSG, specTopic.getLineNumber(), "Revision", + log.warn(String.format(ProcessorConstants.WARN_TAGS_IGNORE_MSG, specTopic.getLineNumber(), "Revision", specTopic.getText())); - valid = false; } // Check that urls aren't trying to be added
Fixed a bug where an error should have been a warning.
pressgang-ccms_PressGangCCMSContentSpecProcessor
train
java
93d2e1bd0ab43c631301a32f88b04d61ca2b458e
diff --git a/lib/Doctrine/ORM/Proxy/ProxyFactory.php b/lib/Doctrine/ORM/Proxy/ProxyFactory.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/ORM/Proxy/ProxyFactory.php +++ b/lib/Doctrine/ORM/Proxy/ProxyFactory.php @@ -172,7 +172,7 @@ class ProxyFactory } if ($method->isPublic() && ! $method->isFinal() && ! $method->isStatic()) { - $methods .= PHP_EOL . ' public function '; + $methods .= "\n" . ' public function '; if ($method->returnsReference()) { $methods .= '&'; } @@ -208,10 +208,10 @@ class ProxyFactory } $methods .= $parameterString . ')'; - $methods .= PHP_EOL . ' {' . PHP_EOL; - $methods .= ' $this->__load();' . PHP_EOL; + $methods .= "\n" . ' {' . "\n"; + $methods .= ' $this->__load();' . "\n"; $methods .= ' return parent::' . $method->getName() . '(' . $argumentString . ');'; - $methods .= PHP_EOL . ' }' . PHP_EOL; + $methods .= "\n" . ' }' . "\n"; } }
[DDC-<I>] Only generate linefeeds in proxies for consistency.
doctrine_orm
train
php
6f49d86b8f45ead65832f3774929277449b530e0
diff --git a/site/src/pages/index.js b/site/src/pages/index.js index <HASH>..<HASH> 100644 --- a/site/src/pages/index.js +++ b/site/src/pages/index.js @@ -130,7 +130,7 @@ function Home() { </section> <section className={styles.section}> <VisuallyHidden as="h2">Mrm use cases</VisuallyHidden> - <h3>What to hack quickly on some idea?</h3> + <h3>Want to hack quickly on some idea?</h3> <p> Install everything you need for a basic JavaScript project with a single command, and start working in less than a minute: @@ -145,7 +145,7 @@ function Home() { <CodeBlock language="bash">{`npx mrm license readme contributing`}</CodeBlock> </section> <section className={styles.section}> - <h3>What to work on a very old project?</h3> + <h3>Want to work on a very old project?</h3> <p> Run the same commands again to upgrade and migrate all the configs.
docs(site): Fix typo on index page (#<I>)
sapegin_mrm
train
js
c70cf507a6fb3531d04cbbba92ca06ced7a0a327
diff --git a/Gemfile.lock b/Gemfile.lock index <HASH>..<HASH> 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - jellyfish-aws (0.0.2) + jellyfish-aws (0.0.3) bcrypt (~> 3.1) fog-aws (~> 0.7) rails (~> 4.2) diff --git a/app/policies/aws_policy.rb b/app/policies/aws_policy.rb index <HASH>..<HASH> 100644 --- a/app/policies/aws_policy.rb +++ b/app/policies/aws_policy.rb @@ -1,17 +1,17 @@ class AwsPolicy < ApplicationPolicy def ec2_flavors? - any_user! + logged_in? end def ec2_images? - any_user! + logged_in? end def subnets? - any_user! + logged_in? end def availability_zones? - any_user! + logged_in? end end diff --git a/lib/jellyfish_aws/version.rb b/lib/jellyfish_aws/version.rb index <HASH>..<HASH> 100644 --- a/lib/jellyfish_aws/version.rb +++ b/lib/jellyfish_aws/version.rb @@ -1,3 +1,3 @@ module JellyfishAws - VERSION = '0.0.3' + VERSION = '0.0.4' end
Use the proper user checking methods in the policies
projectjellyfish_jellyfish-aws
train
lock,rb,rb
c79606481b99741b031cd1bdd5ad89d40b5494de
diff --git a/modules/web/src/main/java/org/torquebox/web/rack/response_handler.rb b/modules/web/src/main/java/org/torquebox/web/rack/response_handler.rb index <HASH>..<HASH> 100644 --- a/modules/web/src/main/java/org/torquebox/web/rack/response_handler.rb +++ b/modules/web/src/main/java/org/torquebox/web/rack/response_handler.rb @@ -37,7 +37,10 @@ module TorqueBox out = servlet_response.getOutputStream() if body.respond_to?( :each ) - body.each { |chunk| out.write( chunk.to_java_bytes ) } + body.each { |chunk| + out.write( chunk.to_java_bytes ) + out.flush + } else out.write( body.to_java_bytes ) end
Flush output stream after every body.each iteration, resolving #<I>
torquebox_torquebox
train
rb
bf1a3eac725c3e914463661bf86cc9de99481c8b
diff --git a/framework/web/CUrlManager.php b/framework/web/CUrlManager.php index <HASH>..<HASH> 100644 --- a/framework/web/CUrlManager.php +++ b/framework/web/CUrlManager.php @@ -572,10 +572,9 @@ class CUrlRule extends CComponent } if(isset($route['pattern'])) $pattern=$route['pattern']; - $route=$this->route=$route[0]; + $route=$route[0]; } - else - $this->route=$route; + $this->route=trim($route,'/'); $tr2['/']=$tr['/']='\\/';
(Fixes issue <I>)
yiisoft_yii
train
php
fd0a3b14cb77dafc3d3f05b801364b72b0b4ae51
diff --git a/src/Setup/InstallSchema.php b/src/Setup/InstallSchema.php index <HASH>..<HASH> 100644 --- a/src/Setup/InstallSchema.php +++ b/src/Setup/InstallSchema.php @@ -20,9 +20,7 @@ class InstallSchema extends \Praxigento\Core\Setup\Schema\Base protected function _setup(SchemaSetupInterface $setup, ModuleContextInterface $context) { - /** - * Read and parse JSON schema. - */ + /** Read and parse JSON schema. */ $pathToFile = __DIR__ . '/../etc/dem.json'; $pathToNode = '/dBEAR/package/Praxigento/package/Accounting'; $demPackage = $this->_toolDem->readDemPackage($pathToFile, $pathToNode);
MOBI-<I> - scheme setup migration
praxigento_mobi_mod_accounting
train
php
02ab2435a12c040463218e8b24dfc80553d71bcd
diff --git a/src/DataPool/SearchEngine/IntegrationTestSearchEngineAbstract.php b/src/DataPool/SearchEngine/IntegrationTestSearchEngineAbstract.php index <HASH>..<HASH> 100644 --- a/src/DataPool/SearchEngine/IntegrationTestSearchEngineAbstract.php +++ b/src/DataPool/SearchEngine/IntegrationTestSearchEngineAbstract.php @@ -20,7 +20,7 @@ abstract class IntegrationTestSearchEngineAbstract implements SearchEngine, Clea /** * @param string $queryString * @param Context $queryContext - * @return SearchDocumentCollection + * @return SearchEngineResponse */ final public function query($queryString, Context $queryContext) { @@ -69,7 +69,7 @@ abstract class IntegrationTestSearchEngineAbstract implements SearchEngine, Clea /** * @param SearchCriteria $criteria * @param Context $context - * @return SearchDocumentCollection + * @return SearchEngineResponse */ final public function getSearchDocumentsMatchingCriteria(SearchCriteria $criteria, Context $context) {
Issue #<I>: Fix phpdoc annotations
lizards-and-pumpkins_catalog
train
php