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
2f989014aa7c0009b83d2a0495aed08f449f6208
diff --git a/h2o-core/src/main/java/water/util/TwoDimTable.java b/h2o-core/src/main/java/water/util/TwoDimTable.java index <HASH>..<HASH> 100644 --- a/h2o-core/src/main/java/water/util/TwoDimTable.java +++ b/h2o-core/src/main/java/water/util/TwoDimTable.java @@ -303,7 +303,7 @@ public class TwoDimTable extends Iced { sb.append(tableHeader); } if (tableDescription.length() > 0) { - sb.append("\n").append(tableDescription); + sb.append(" (").append(tableDescription).append(")"); } sb.append(":\n"); for (int r = 0; r <= rowDim; ++r) {
Put the TwoDimTable description in parentheses after the title.
h2oai_h2o-3
train
java
45a61348b6d6b35fb6c5e8f4a1f028be84b83a07
diff --git a/src/peh/ThrowView.php b/src/peh/ThrowView.php index <HASH>..<HASH> 100644 --- a/src/peh/ThrowView.php +++ b/src/peh/ThrowView.php @@ -14,7 +14,6 @@ namespace pukoframework\peh; use Exception; use pte\CustomRender; use pte\Pte; -use pukoframework\pte\RenderEngine; use pukoframework\Response; /**
fix unresolved imports
Velliz_pukoframework
train
php
1ca69f91decb100a9132aab0c864d8739ae99671
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -13,15 +13,14 @@ 'MSAnimationEnd', ] - const done = () => { + const done = _ => { $.classList.remove('animated', commands[0]) event.forEach(e => $.removeEventListener(e, done)) commands.shift() - commands.length > 0 ? - animate() : resolve($) + commands.length ? animate() : resolve($) } - const animate = () => { + const animate = _ => { event.forEach(e => $.addEventListener(e, done)) $.classList.add('animated', commands[0]) }
Removes > 0 check and swaps out () for _
lukejacksonn_Actuate
train
js
e3cab4d49d58400a668399054fea5ab9652390eb
diff --git a/client/lib/signup/step-actions.js b/client/lib/signup/step-actions.js index <HASH>..<HASH> 100644 --- a/client/lib/signup/step-actions.js +++ b/client/lib/signup/step-actions.js @@ -175,10 +175,12 @@ export function createSiteWithCart( const importingFromUrl = 'import' === flowName ? normalizeImportUrl( getNuxUrlInputValue( state ) ) : ''; + const importEngine = 'import' === flowName ? getSelectedImportEngine( state ) : ''; if ( importingFromUrl ) { newSiteParams.blog_name = importingFromUrl; newSiteParams.find_available_url = true; + newSiteParams.options.nux_import_engine = importEngine; } else if ( flowName === 'onboarding' && 'remove' === getABTestVariation( 'removeDomainsStepFromOnboarding' )
Import Signup Flow: Include import engine in options to new site endpoint (#<I>)
Automattic_wp-calypso
train
js
da9e115d760287e03cc4176ff967dc7db1793eed
diff --git a/environs/cloudinit/cloudinit.go b/environs/cloudinit/cloudinit.go index <HASH>..<HASH> 100644 --- a/environs/cloudinit/cloudinit.go +++ b/environs/cloudinit/cloudinit.go @@ -194,7 +194,9 @@ func addMongoToBoot(c *cloudinit.Config) error { conf := &upstart.Conf{ Service: *svc, Desc: "juju state database", - Cmd: "/opt/mongo/bin/mongod --port 37017 --bind_ip 0.0.0.0 --dbpath=/var/lib/juju/db --noprealloc", + Cmd: fmt.Sprintf( + "/opt/mongo/bin/mongod --port %d --bind_ip 0.0.0.0 --dbpath=/var/lib/juju/db --noprealloc --smallfiles", + mgoPort), } cmds, err := conf.InstallCommands() if err != nil {
environs/cloudinit: add flags to try to make mongo start more quickly
juju_juju
train
go
f60c3078327e6b85667697d94b0e467aa966b1d1
diff --git a/tests/markFeatureWriter_test.py b/tests/markFeatureWriter_test.py index <HASH>..<HASH> 100644 --- a/tests/markFeatureWriter_test.py +++ b/tests/markFeatureWriter_test.py @@ -31,6 +31,21 @@ class MarkFeatureWriterTest(unittest.TestCase): 'markClass cedilla <anchor 100 0> @MC_bottom;\n\n' 'markClass grave <anchor 100 200> @MC_top;') + def test_skip_empty_feature(self): + ufo = Font() + glyph = ufo.newGlyph('a') + glyph.appendAnchor(glyph.anchorClass( + anchorDict={'name': 'top', 'x': 100, 'y': 200})) + glyph = ufo.newGlyph('acutecomb') + glyph.appendAnchor(glyph.anchorClass( + anchorDict={'name': '_top', 'x': 100, 'y': 200})) + + writer = MarkFeatureWriter(ufo) + fea = writer.write() + + self.assertIn("feature mark", fea) + self.assertNotIn("feature mkmk", fea) + if __name__ == '__main__': unittest.main()
[markFeatureWriter_test] add test for skipping empty feature
googlefonts_ufo2ft
train
py
26c8d959625a51d030859e0bbb8d991cb4301079
diff --git a/packages/plugin-rss-feed/src/index.js b/packages/plugin-rss-feed/src/index.js index <HASH>..<HASH> 100644 --- a/packages/plugin-rss-feed/src/index.js +++ b/packages/plugin-rss-feed/src/index.js @@ -106,12 +106,18 @@ const rssFeed: PhenomicPluginModule<options> = ( getFeedKeys(options).forEach(feedUrl => { router.get("/" + feedUrl, async (req, res: express$Response) => { debug(req.url); - const output = await makeFeed( - getRoot(config), - feedUrl, - options.feeds[feedUrl] - ); - res.type("xml").send(output); + try { + const output = await makeFeed( + getRoot(config), + feedUrl, + options.feeds[feedUrl] + ); + res.type("xml").send(output); + } catch (error) { + log.error(error.toString()); + debug(error); + res.status(500).end(); + } }); }); return [router];
🚨 `phenomic/plugin-rss-feed`: fail with a http <I> if rss feed fail to be generated
phenomic_phenomic
train
js
8413cd626b0ce04e1987aee66fc3342138bf4220
diff --git a/src/WPConfigTransformer.php b/src/WPConfigTransformer.php index <HASH>..<HASH> 100644 --- a/src/WPConfigTransformer.php +++ b/src/WPConfigTransformer.php @@ -99,7 +99,7 @@ class WPConfigTransformer { $defaults = array( 'raw' => false, // Display value in raw format without quotes. 'target' => "/* That's all, stop editing!", // Config placement target string. - 'buffer' => "\n\n", // Buffer between config definition and target string. + 'buffer' => PHP_EOL . PHP_EOL, // Buffer between config definition and target string. 'placement' => 'before', // Config placement direction (insert before or after). );
Use PHP_EOL in target buffer
wp-cli_wp-config-transformer
train
php
8aa50c59f58b1d719a15c3fc29b650ff9ae11c77
diff --git a/modules/dropdown/js/dropdown_directive.js b/modules/dropdown/js/dropdown_directive.js index <HASH>..<HASH> 100644 --- a/modules/dropdown/js/dropdown_directive.js +++ b/modules/dropdown/js/dropdown_directive.js @@ -383,7 +383,7 @@ function onDocumentClick() { $timeout(function nextDigest() { LxDropdownService.close(lxDropdown.uuid, true); - }) + }, 250) } function openDropdownMenu()
fix(dropdown): add timeout for ios
lumapps_lumX
train
js
1b39c52f9f7512f162d90e6d9a94a5872c33e4bc
diff --git a/public/js/admin/config.js b/public/js/admin/config.js index <HASH>..<HASH> 100644 --- a/public/js/admin/config.js +++ b/public/js/admin/config.js @@ -1,6 +1,6 @@ var rcmConfig = { filebrowserBrowseUrl: '/elfinder', - filebrowserWindowHeight : '400', + filebrowserWindowHeight : null, filebrowserWindowWidth : null }; @@ -30,7 +30,7 @@ var rcmCkConfig = { ], filebrowserBrowseUrl : '/elfinder/ckeditor', filebrowserImageBrowseUrl : '/elfinder/ckeditor/images', - filebrowserWindowHeight : '400', + filebrowserWindowHeight : null, filebrowserWindowWidth : null, basicEntities : false, allowedContent : true,
PROD-<I> : Set CKEditor and Standalone instance to be hight of window and added autogrow.
reliv_Rcm
train
js
8c3a4afa02d35561634d9eb91acce3d81a1831de
diff --git a/manifest.php b/manifest.php index <HASH>..<HASH> 100755 --- a/manifest.php +++ b/manifest.php @@ -31,7 +31,7 @@ return array( 'label' => 'Test core extension', 'description' => 'TAO Tests extension contains the abstraction of the test-runners, but requires an implementation in order to be able to run tests', 'license' => 'GPL-2.0', - 'version' => '11.2.0', + 'version' => '11.2.1', 'author' => 'Open Assessment Technologies, CRP Henri Tudor', 'requires' => array( 'generis' => '>=7.1.0', diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php index <HASH>..<HASH> 100644 --- a/scripts/update/Updater.php +++ b/scripts/update/Updater.php @@ -135,6 +135,6 @@ class Updater extends \common_ext_ExtensionUpdater $this->setVersion('7.8.0'); } - $this->skip('7.8.0', '11.2.0'); + $this->skip('7.8.0', '11.2.1'); } }
TAO-<I> - The version is changed <I> => <I>
oat-sa_extension-tao-test
train
php,php
3fe11d997ecfb753228eebb8ea2982c2b2816c08
diff --git a/server/src/main/java/org/jboss/as/server/deployment/DeploymentUnitPhaseService.java b/server/src/main/java/org/jboss/as/server/deployment/DeploymentUnitPhaseService.java index <HASH>..<HASH> 100644 --- a/server/src/main/java/org/jboss/as/server/deployment/DeploymentUnitPhaseService.java +++ b/server/src/main/java/org/jboss/as/server/deployment/DeploymentUnitPhaseService.java @@ -132,7 +132,7 @@ final class DeploymentUnitPhaseService<T> implements Service<T> { final DeploymentUnit deploymentUnitContext = deploymentUnitInjector.getValue(); final DeployerChains chains = deployerChainsInjector.getValue(); final List<DeploymentUnitProcessor> list = chains.getChain(phase); - final ListIterator<DeploymentUnitProcessor> iterator = list.listIterator(); + final ListIterator<DeploymentUnitProcessor> iterator = list.listIterator(list.size()); while (iterator.hasPrevious()) { final DeploymentUnitProcessor prev = iterator.previous(); safeUndeploy(deploymentUnitContext, phase, prev);
Correctly setup the ListIterator in DUPService.stop was: db2c<I>dda<I>e<I>f4e<I>accfc<I>e4c<I>
wildfly_wildfly-core
train
java
aafd307890a530f39b78bbfe56ab33e7d23d38bd
diff --git a/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java b/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java +++ b/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java @@ -267,6 +267,7 @@ public class DistributionInterceptor extends BaseRpcInterceptor { * time. If the operation didn't originate locally we won't do any replication either. */ private Object handleWriteCommand(InvocationContext ctx, WriteCommand command, RecipientGenerator recipientGenerator, boolean skipRemoteGet) throws Throwable { + // TODO Remove isSingleOwnerAndLocal() once https://jira.jboss.org/jira/browse/JGRP-1084 has been implemented boolean localModeForced = isLocalModeForced(ctx) || isSingleOwnerAndLocal(recipientGenerator); // see if we need to load values from remote srcs first if (!skipRemoteGet) remoteGetBeforeWrite(ctx, command.isConditional(), recipientGenerator);
Added TODO so that [ISPN-<I>] optimization is removed once [JGRP-<I>]
infinispan_infinispan
train
java
86e368762305bc2bcd1d493823a7646b25be342b
diff --git a/src/javascript/runtime/html5/image/Image.js b/src/javascript/runtime/html5/image/Image.js index <HASH>..<HASH> 100644 --- a/src/javascript/runtime/html5/image/Image.js +++ b/src/javascript/runtime/html5/image/Image.js @@ -251,11 +251,17 @@ define("moxie/runtime/html5/image/Image", [ // use FileReader if it's available if (window.FileReader) { - fr = new FileReader(); - fr.onload = function() { - callback(this.result); - }; - fr.readAsBinaryString(file); + if (FileReader.readAsBinaryString) { + fr = new FileReader(); + fr.onload = function() { + callback(this.result); + }; + fr.readAsBinaryString(file); + } else { + _readAsDataUrl(file, function(result) { + callback(_convertToBinary(result)); + }); + } } else { return callback(file.getAsBinary()); }
Image, HTML5: Use readAsDataURL for preloading where readAsBinaryString is not available. Address #<I>.
moxiecode_moxie
train
js
eb70e3d62e59de107b351d458b2c19a574242a37
diff --git a/sdk/dist/cc.js b/sdk/dist/cc.js index <HASH>..<HASH> 100644 --- a/sdk/dist/cc.js +++ b/sdk/dist/cc.js @@ -2291,7 +2291,7 @@ cc.Util = { for (index in iterable) { if (Object.prototype.hasOwnProperty.call(iterable, index)) { - if (callback(iterable[index], index, collection) === cc.Util.indicatorObject) { + if (callback(iterable[index], index, collection) === false) { return result; } } diff --git a/sdk/src/core/cc.util.js b/sdk/src/core/cc.util.js index <HASH>..<HASH> 100644 --- a/sdk/src/core/cc.util.js +++ b/sdk/src/core/cc.util.js @@ -184,7 +184,7 @@ cc.Util = { for (index in iterable) { if (Object.prototype.hasOwnProperty.call(iterable, index)) { - if (callback(iterable[index], index, collection) === cc.Util.indicatorObject) { + if (callback(iterable[index], index, collection) === false) { return result; } }
fix(cc.util): make forOwn allow early breakout as intended
sofa_sofa-couch-service
train
js,js
001f53a005417a1dd16f61cc55a8c0926776989f
diff --git a/salt/cloud/clouds/digital_ocean.py b/salt/cloud/clouds/digital_ocean.py index <HASH>..<HASH> 100644 --- a/salt/cloud/clouds/digital_ocean.py +++ b/salt/cloud/clouds/digital_ocean.py @@ -281,6 +281,12 @@ def create(vm_): ) ) + if key_filename is None: + raise SaltCloudConfigError( + 'The Digital Ocean driver requires a ssh_key_file because it does not supply a root password ' + 'upon building the server' + ) + private_networking = config.get_cloud_config_value( 'private_networking', vm_, __opts__, search_global=False, default=None, )
digital ocean requires an ssh key file The api does not return a root password via the api, and it also does not return one when calling for a root password reset. The password is only sent via email to the user.
saltstack_salt
train
py
a447b2dd4555851410ad781c41394174d10416bd
diff --git a/tests/spec/fs.rename.spec.js b/tests/spec/fs.rename.spec.js index <HASH>..<HASH> 100644 --- a/tests/spec/fs.rename.spec.js +++ b/tests/spec/fs.rename.spec.js @@ -10,6 +10,23 @@ describe('fs.rename', function() { expect(fs.rename).to.be.a('function'); }); + it.skip('should be able to rename an existing file to the same filename', function(done) { + var fs = util.fs(); + + fs.open('/myfile', 'w+', function(error, fd) { + if(error) throw error; + + fs.close(fd, function(error) { + if(error) throw error; + + fs.rename('/myfile', '/myfile', function(error) { + expect(error).not.to.exist; + done(); + }); + }); + }); + }); + it('should rename an existing file', function(done) { var complete1 = false; var complete2 = false;
rename() should be able to rename an existing file to the same filename (#<I>) * rename should not change name to itself * new test expects failure * should rename an existing file to itself * should rename an existing file to itself * Update tests/spec/fs.rename.spec.js * add .skip to the test
filerjs_filer
train
js
bc566c117d2de0fad36af8a5486674e152c5bf2f
diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py index <HASH>..<HASH> 100644 --- a/tests/unit/grains/test_core.py +++ b/tests/unit/grains/test_core.py @@ -2160,6 +2160,12 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): "GeForce GTX 950M", "nvidia", ], # 3D controller + [ + "Display controller", + "Intel Corporation", + "HD Graphics P630", + "intel", + ], # Display controller ] with patch.dict( core.__salt__, {"cmd.run": MagicMock(side_effect=_cmd_side_effect)}
Updating test_linux_gpus to include display controller changes.
saltstack_salt
train
py
8af5bfc528394dc2a2ca4d470debe1bbf7a3ab65
diff --git a/lib/searchlogic/search.rb b/lib/searchlogic/search.rb index <HASH>..<HASH> 100644 --- a/lib/searchlogic/search.rb +++ b/lib/searchlogic/search.rb @@ -117,7 +117,11 @@ module Searchlogic end def normalize_scope_name(scope_name) - klass.column_names.include?(scope_name.to_s) ? "#{scope_name}_equals".to_sym : scope_name.to_sym + case + when klass.scopes.key?(scope_name.to_sym) then scope_name.to_sym + when klass.column_names.include?(scope_name.to_s) then "#{scope_name}_equals".to_sym + else scope_name.to_sym + end end def setter?(name)
Modified Searchlogic::Search#normalize_scope_name to account for user-defined scopes that share their names with column names.
binarylogic_searchlogic
train
rb
9e966b531022f9545dffbb8bde667d2f79726c5d
diff --git a/driver/src/test/java/org/neo4j/driver/internal/ConfigTest.java b/driver/src/test/java/org/neo4j/driver/internal/ConfigTest.java index <HASH>..<HASH> 100644 --- a/driver/src/test/java/org/neo4j/driver/internal/ConfigTest.java +++ b/driver/src/test/java/org/neo4j/driver/internal/ConfigTest.java @@ -23,6 +23,7 @@ import org.junit.Test; import java.io.File; import org.neo4j.driver.v1.Config; +import org.neo4j.driver.v1.util.FileTools; import static java.lang.System.getProperty; import static org.hamcrest.CoreMatchers.equalTo; @@ -92,7 +93,7 @@ public class ConfigTest { if( DEFAULT_KNOWN_HOSTS.exists() ) { - DEFAULT_KNOWN_HOSTS.delete(); + FileTools.deleteFile( DEFAULT_KNOWN_HOSTS ); } }
Fix the bug that windows cert file is not deleted
neo4j_neo4j-java-driver
train
java
f08b6d200540719b1ae59c434bfa4cbdd6dee476
diff --git a/modelx/core/api.py b/modelx/core/api.py index <HASH>..<HASH> 100644 --- a/modelx/core/api.py +++ b/modelx/core/api.py @@ -168,7 +168,10 @@ def cur_model(name=None): If ``name`` is not given, the current model is returned. """ if name is None: - return _system.currentmodel.interface + if _system.currentmodel is not None: + return _system.currentmodel.interface + else: + return None else: _system.currentmodel = _system.models[name] return _system.currentmodel.interface @@ -183,7 +186,13 @@ def cur_space(name=None): is returned. """ if name is None: - return _system.currentmodel.currentspace.interface + if _system.currentmodel is not None: + if _system.currentmodel.currentspace is not None: + return _system.currentmodel.currentspace.interface + else: + return None + else: + return None else: _system.currentmodel.currentspace = _system.currentmodel.spaces[name] return cur_space()
ENH: cur_model and cur_space to return None if not set
fumitoh_modelx
train
py
8cceebe3a13395017e9ac845b9e6f1d2c4181ca3
diff --git a/Twilio/VersionInfo.php b/Twilio/VersionInfo.php index <HASH>..<HASH> 100644 --- a/Twilio/VersionInfo.php +++ b/Twilio/VersionInfo.php @@ -5,9 +5,9 @@ namespace Twilio; class VersionInfo { - const MAJOR = ''; - const MINOR = ''; - const PATCH = ''; + const MAJOR = 5; + const MINOR = 2; + const PATCH = 0; public static function string() { return implode('.', array(self::MAJOR, self::MINOR, self::PATCH)); diff --git a/deploy.php b/deploy.php index <HASH>..<HASH> 100644 --- a/deploy.php +++ b/deploy.php @@ -10,7 +10,7 @@ $args = $_SERVER['argv']; array_shift($args); if ($args) { - $version = $args; + $version = $args[0]; } else { $patchParts = explode('-', VersionInfo::PATCH); $lastPatch = array_pop($patchParts);
Bumping to version <I>
twilio_twilio-php
train
php,php
c4f4cce9574945b70a420c9f7eab9e98e0b994b8
diff --git a/public/javascript/pump/model.js b/public/javascript/pump/model.js index <HASH>..<HASH> 100644 --- a/public/javascript/pump/model.js +++ b/public/javascript/pump/model.js @@ -513,7 +513,7 @@ stream.getNext(stream.maxCount(), function(err, data) { if (err) { callback(err); - } else if (data.items && data.items.length > 0) { + } else if (data.items && data.items.length > 0 && stream.items.length < stream.get("totalItems")) { // recurse stream.getAllNext(callback); } else { @@ -527,7 +527,7 @@ stream.getPrev(stream.maxCount(), function(err, data) { if (err) { callback(err); - } else if (data.items && data.items.length > 0) { + } else if (data.items && data.items.length > 0 && stream.items.length < stream.get("totalItems")) { // recurse stream.getAllPrev(callback); } else {
Don't recurse if we already have all known members
pump-io_pump.io
train
js
2db701fce9d3f2210685e9758df34a37b7452530
diff --git a/Minimal-J/src/main/java/ch/openech/mj/db/AbstractTable.java b/Minimal-J/src/main/java/ch/openech/mj/db/AbstractTable.java index <HASH>..<HASH> 100644 --- a/Minimal-J/src/main/java/ch/openech/mj/db/AbstractTable.java +++ b/Minimal-J/src/main/java/ch/openech/mj/db/AbstractTable.java @@ -509,7 +509,6 @@ public abstract class AbstractTable<T> { } public ColumnIndexUnqiue<T> createIndexUnique(PropertyInterface property, String fieldPath) { - sqlLogger.info("Create index on " + getTableName() + " with: " + fieldPath); Map.Entry<String, PropertyInterface> entry = findX(fieldPath); ColumnIndex<?> innerIndex = null;
AbstractTable: removed logging when index is created
BrunoEberhard_minimal-j
train
java
e6a06c8c4761c73a205bca174aa671c680dcce8d
diff --git a/image.php b/image.php index <HASH>..<HASH> 100644 --- a/image.php +++ b/image.php @@ -373,7 +373,7 @@ class Image { **/ function captcha($font,$size=24,$len=5, $key=NULL,$path='',$fg=0xFFFFFF,$bg=0x000000,$alpha=0) { - if ($len<4 && $len>23) { + if ($len<4 || $len>22) { user_error(sprintf(self::E_Length,$len)); return FALSE; } @@ -381,7 +381,8 @@ class Image { $fw=Base::instance(); foreach ($fw->split($path?:$fw->get('UI').';./') as $dir) if (is_file($path=$dir.$font)) { - $seed=strtoupper(substr(uniqid(),-$len)); + $seed=strtoupper(substr( + str_replace('.','',uniqid('',TRUE)),-$len)); $block=$size*3; $tmp=array(); for ($i=0,$width=0,$height=0;$i<$len;$i++) {
Improve detection of acceptable limits in captcha() (Feature request #<I>)
bcosca_fatfree-core
train
php
abbf12b98444669bbc9f470cd9b83815865f2716
diff --git a/lib/specials.js b/lib/specials.js index <HASH>..<HASH> 100644 --- a/lib/specials.js +++ b/lib/specials.js @@ -1,6 +1,8 @@ const intended = [ 'ZEIT', 'ZEIT Inc.', + 'Vercel', + 'Vercel Inc.', 'CLI', 'API', 'HTTP', @@ -10,6 +12,8 @@ const intended = [ 'URL', 'now.sh', 'now.json', + 'vercel.app', + 'vercel.json', 'CI', 'CDN', 'package.json',
Add Vercel to specials (#<I>)
zeit_title
train
js
b64644086b27c760f4e021ee2816f4f103963b45
diff --git a/src/Picqer/Financials/Exact/Account.php b/src/Picqer/Financials/Exact/Account.php index <HASH>..<HASH> 100644 --- a/src/Picqer/Financials/Exact/Account.php +++ b/src/Picqer/Financials/Exact/Account.php @@ -20,7 +20,8 @@ class Account extends Model { 'Name', 'Phone', 'Postcode', - 'Website' + 'Website', + 'Status' ]; protected $url = 'crm/Accounts';
Added 'Sales' property to Account
picqer_exact-php-client
train
php
5ccd7955d056b4d09eea7f7db98b5f3826229fdb
diff --git a/argonaut.go b/argonaut.go index <HASH>..<HASH> 100644 --- a/argonaut.go +++ b/argonaut.go @@ -240,7 +240,7 @@ func generateCommand(v interface{}, toplevel bool) ([]string, string, error) { } else if tag.SuffixPrevious { // SuffixPrevious: modifies the last argument on the command stack with the current value // --------------------------------------------------------------------------------- - if len(command) > 0 { + if len(command) > 0 && (!typeutil.IsZero(value) || tag.Required) { last := command[len(command)-1] last += tag.DelimiterAt(0)
Only apply SuffixPrevious if the value is non-zero or required
ghetzel_argonaut
train
go
a4348168ab3d67c59173e1ca0a3d9000157d305d
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ def read(fname): setup( name='segments', - version="1.1.0", + version="1.1.1", description='', long_description=read("README.rst"), author='Steven Moran and Robert Forkel', diff --git a/src/segments/__init__.py b/src/segments/__init__.py index <HASH>..<HASH> 100644 --- a/src/segments/__init__.py +++ b/src/segments/__init__.py @@ -1,4 +1,4 @@ from segments.tokenizer import Tokenizer, Profile, Rules # noqa: F401 -__version__ = '1.1.0' +__version__ = '1.1.1' __all__ = ['Tokenizer', 'Profile', 'Rules']
bumped version number to <I>
cldf_segments
train
py,py
897d7e7c2ac5da2e7c1f93a454e66aada8a9917d
diff --git a/system_maintenance/admin.py b/system_maintenance/admin.py index <HASH>..<HASH> 100644 --- a/system_maintenance/admin.py +++ b/system_maintenance/admin.py @@ -1,3 +1,10 @@ from django.contrib import admin -# Register your models here. +from .models import Maintenance, MaintenanceType, Software, SysAdmin, System + + +admin.site.register(Maintenance) +admin.site.register(MaintenanceType) +admin.site.register(Software) +admin.site.register(SysAdmin) +admin.site.register(System)
Register basic admins for system maintenance models
mfcovington_django-system-maintenance
train
py
36508a201ab31d243d3da6b2932ed520b6b3d78a
diff --git a/blocks/course_overview/version.php b/blocks/course_overview/version.php index <HASH>..<HASH> 100644 --- a/blocks/course_overview/version.php +++ b/blocks/course_overview/version.php @@ -25,5 +25,5 @@ defined('MOODLE_INTERNAL') || die(); $plugin->version = 2012121000; // The current plugin version (Date: YYYYMMDDXX) -$plugin->requires = 2012121000; // Requires this Moodle version +$plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_course_overview'; // Full name of the plugin (used for diagnostics)
MDL-<I> course_overview block: fix idiot version I will shoot the programmer responsible for this mess.
moodle_moodle
train
php
7c511ea79f014250d0e9207f6b6d785d29a569c7
diff --git a/lib/dry/view/decorator.rb b/lib/dry/view/decorator.rb index <HASH>..<HASH> 100644 --- a/lib/dry/view/decorator.rb +++ b/lib/dry/view/decorator.rb @@ -6,8 +6,9 @@ module Dry class Decorator attr_reader :config + # @api public def call(name, value, renderer:, context:, **options) - klass = part_class(name, options) + klass = part_class(name, value, **options) if value.respond_to?(:to_ary) singular_name = Inflecto.singularize(name).to_sym @@ -18,7 +19,8 @@ module Dry end end - def part_class(name, options) + # @api public + def part_class(name, value, **options) options.fetch(:as) { Part } end end
Pass options to Decorator#part_class as a splat Since this is a method we support overriding in subclasses, the splat makes it possible for overrides methods to declare required keyword arguments.
dry-rb_dry-view
train
rb
1706e8a282e46b6006a873ea35489432b681ca49
diff --git a/Auth/OpenID/CryptUtil.php b/Auth/OpenID/CryptUtil.php index <HASH>..<HASH> 100644 --- a/Auth/OpenID/CryptUtil.php +++ b/Auth/OpenID/CryptUtil.php @@ -538,11 +538,6 @@ class Auth_OpenID_MathWrapper { class Auth_OpenID_BcMathWrapper extends Auth_OpenID_MathWrapper { var $type = 'bcmath'; - function random($min, $max) - { - return mt_rand($min, $max); - } - function add($x, $y) { return bcadd($x, $y);
[project @ Remove insecure random call from math library]
openid_php-openid
train
php
c8a6f272d1d3003fa78d7cb0c5048dab6cec4854
diff --git a/lib/dynamoRequest.js b/lib/dynamoRequest.js index <HASH>..<HASH> 100644 --- a/lib/dynamoRequest.js +++ b/lib/dynamoRequest.js @@ -93,6 +93,7 @@ module.exports = function(type, parameters, opts, callback) { var meta = {}; if (resp.ConsumedCapacity) meta.capacity = resp.ConsumedCapacity; + if (resp.LastEvaluatedKey) meta.last = resp.LastEvaluatedKey; metas.push(meta); while (read && items.length > 0) {
Pass last evaluated key to caller. last key in metas now.
mapbox_dyno
train
js
da87fff3daa7328d4f51663930ad1121ab580ffa
diff --git a/lib/email_notify.rb b/lib/email_notify.rb index <HASH>..<HASH> 100644 --- a/lib/email_notify.rb +++ b/lib/email_notify.rb @@ -28,7 +28,7 @@ class EmailNotify # Send a welcome mail to the user created def self.send_user_create_notification(user) begin - email_notification = NotificationMailer.notif_user(user) + email = NotificationMailer.notif_user(user) email.deliver rescue => err logger.error "Unable to send notification of create user email: #{err.inspect}"
Update email_notify.rb Change email_notification to email to fix password reset etc.
publify_publify
train
rb
78c57b390a4d8ff2848fea7996af6607d3cb9bbd
diff --git a/spyderlib/widgets/__init__.py b/spyderlib/widgets/__init__.py index <HASH>..<HASH> 100644 --- a/spyderlib/widgets/__init__.py +++ b/spyderlib/widgets/__init__.py @@ -109,19 +109,23 @@ class OneColumnTree(QTreeWidget): """Save all items expanded state""" self.__expanded_state = {} def add_to_state(item): + user_text = get_item_user_text(item) + self.__expanded_state[user_text] = item.isExpanded() + def browse_children(item): + add_to_state(item) for index in range(item.childCount()): citem = item.child(index) user_text = get_item_user_text(citem) self.__expanded_state[user_text] = citem.isExpanded() - add_to_state(citem) + browse_children(citem) for tlitem in self.get_top_level_items(): - add_to_state(tlitem) + browse_children(tlitem) def restore_expanded_state(self): """Restore all items expanded state""" if self.__expanded_state is None: return - for item in self.get_items(): + for item in self.get_items()+self.get_top_level_items(): user_text = get_item_user_text(item) is_expanded = self.__expanded_state.get(user_text) if is_expanded is not None:
Tree widgets: "expanded state" of top level items is now saved/restored (Class Browser)
spyder-ide_spyder
train
py
52c053f775fc84a5ee7ced0a658b1b0f8c24499d
diff --git a/tests/testcases/rabbit/asyn/rabbit_asynchronous_tests.py b/tests/testcases/rabbit/asyn/rabbit_asynchronous_tests.py index <HASH>..<HASH> 100644 --- a/tests/testcases/rabbit/asyn/rabbit_asynchronous_tests.py +++ b/tests/testcases/rabbit/asyn/rabbit_asynchronous_tests.py @@ -239,8 +239,7 @@ class RabbitAsynConnectorTestCase(unittest.TestCase): # Check that the four messages were NOT put into the queue: queue = testrabbit._AsynchronousRabbitConnector__unpublished_messages_queue - with self.assertRaises(Queue.Empty): - queue.get(False) + self.assertTrue(queue.empty()) def test_send_message_user_closed(self): @@ -268,8 +267,7 @@ class RabbitAsynConnectorTestCase(unittest.TestCase): # Check that the four messages were NOT put into the queue: queue = testrabbit._AsynchronousRabbitConnector__unpublished_messages_queue - with self.assertRaises(Queue.Empty): - queue.get(False) + self.assertTrue(queue.empty()) #
Change tests to check if queue is empty
IS-ENES-Data_esgf-pid
train
py
658c02c0ffe22eabb5e6f054102c111c67065024
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -4,12 +4,13 @@ from os.path import dirname, join import sys, os # When creating the sdist, make sure the django.mo file also exists: -try: - os.chdir('fluent_dashboard') - from django.core.management.commands.compilemessages import compile_messages - compile_messages(sys.stderr) -finally: - os.chdir('..') +if 'sdist' in sys.argv: + try: + os.chdir('fluent_dashboard') + from django.core.management.commands.compilemessages import compile_messages + compile_messages(sys.stderr) + finally: + os.chdir('..') setup(
setup.py: only generate django.po during sdist
django-fluent_django-fluent-dashboard
train
py
2b2a5998a355bb5d7b5d3410843bfb71117a8c6d
diff --git a/sramongo/mongo_schema.py b/sramongo/mongo_schema.py index <HASH>..<HASH> 100644 --- a/sramongo/mongo_schema.py +++ b/sramongo/mongo_schema.py @@ -414,6 +414,8 @@ class Sample(Document): ddbj_links = ListField(EmbeddedDocumentField(DDBJLink), default=list) ena_links = ListField(EmbeddedDocumentField(ENALink), default=list) + meta = {'allow_inheritance': True} + def __str__(self): return DocumentString(self).string @@ -509,6 +511,8 @@ class Experiment(Document): db_flags = ListField(StringField(), default=list) pipeline_flags = ListField(StringField(), default=list) + meta = {'allow_inheritance': True} + def __str__(self): return DocumentString(self).string @@ -629,6 +633,8 @@ class Run(Document): db_created = DateTimeField(default=datetime.datetime.now) db_modified = DateTimeField() + meta = {'allow_inheritance': True} + def __str__(self): return DocumentString(self).string
Adds inheritance to Sample, Experiment, and Run.
jfear_sramongo
train
py
fb415b39533c0384602db1b8206a54104fcd4dfe
diff --git a/umi_tools/group.py b/umi_tools/group.py index <HASH>..<HASH> 100644 --- a/umi_tools/group.py +++ b/umi_tools/group.py @@ -456,7 +456,7 @@ def main(argv=None): gene_tag = metatag else: - inreads = infile.fetch() + inreads = infile.fetch(until_eof=options.output_unmapped) gene_tag = options.gene_tag for bundle, read_events, status in umi_methods.get_bundles(
resolves bug introduced with group + unmapped reads
CGATOxford_UMI-tools
train
py
944c8ba1e7ec6ac89874bebc768320fc661a1597
diff --git a/src/client/pkg/grpcutil/dialer.go b/src/client/pkg/grpcutil/dialer.go index <HASH>..<HASH> 100644 --- a/src/client/pkg/grpcutil/dialer.go +++ b/src/client/pkg/grpcutil/dialer.go @@ -36,7 +36,6 @@ func newDialer(opts ...grpc.DialOption) *dialer { func (d *dialer) Dial(addr string) (*grpc.ClientConn, error) { d.lock.Lock() defer d.lock.Unlock() - if conn, ok := d.connMap[addr]; ok { return conn, nil } @@ -44,10 +43,11 @@ func (d *dialer) Dial(addr string) (*grpc.ClientConn, error) { grpc.WithUnaryInterceptor(tracing.UnaryClientInterceptor()), grpc.WithStreamInterceptor(tracing.StreamClientInterceptor()), ) - if !strings.HasPrefix(addr, "dns:///") { - addr = "dns:///" + addr + daddr := addr + if !strings.HasPrefix(daddr, "dns:///") { + daddr = "dns:///" + daddr } - conn, err := grpc.Dial(addr, opts...) + conn, err := grpc.Dial(daddr, opts...) if err != nil { return nil, err }
Don't override addr
pachyderm_pachyderm
train
go
9bed86840b0b96b0dfec6c62e20f9059d0216bd2
diff --git a/nyawc/helpers/PackageHelper.py b/nyawc/helpers/PackageHelper.py index <HASH>..<HASH> 100644 --- a/nyawc/helpers/PackageHelper.py +++ b/nyawc/helpers/PackageHelper.py @@ -78,6 +78,7 @@ class PackageHelper: semver = open(folder + "/../../.semver", "r") PackageHelper.__version = semver.read() semver.close() + return PackageHelper.__version except: pass @@ -86,6 +87,7 @@ class PackageHelper: distribution = pkg_resources.get_distribution(PackageHelper.get_alias()) if distribution.version: PackageHelper.__version = distribution.version + return PackageHelper.__version except: pass
Fixed invalid semver version on GIT clone.
tijme_not-your-average-web-crawler
train
py
8c83d0222fc3de9a096a0788d878c2dacaa88b7d
diff --git a/views/v3/partials/hero.blade.php b/views/v3/partials/hero.blade.php index <HASH>..<HASH> 100644 --- a/views/v3/partials/hero.blade.php +++ b/views/v3/partials/hero.blade.php @@ -2,7 +2,7 @@ <div id="sidebar-slider-area--container" class="o-container o-container--fullwidth u-print-display--none"> @if (is_active_sidebar('slider-area') === true ) - @includeIf('partials.sidebar', ['id' => 'slider-area', 'classes' => ['o-grid', 'o-grid--no-margin']]) + @includeIf('partials.sidebar', ['id' => 'slider-area', 'classes' => ['o-grid', 'o-grid--no-margin', 'o-grid--no-gutter']]) {{-- Search in hero --}} @includeWhen($showHeroSearch, 'partials.search.hero-search-form')
- remove gutter from hero (#<I>)
helsingborg-stad_Municipio
train
php
bbb90ea5f4fe3156106a564e8d4ed00a020fad24
diff --git a/example.js b/example.js index <HASH>..<HASH> 100644 --- a/example.js +++ b/example.js @@ -1,9 +1,9 @@ var Pokeio = require('./poke.io') -var location = 'Stockflethsvej 39'; - -var username = 'Arm4x'; -var password = 'OHSHITWADDUP'; +//Set environment variables or replace placeholder text +var location = process.env.PGO_LOCATION || 'times squere'; +var username = process.env.PGO_USERNAME || 'USERNAME'; +var password = process.env.PGO_PASSWORD || 'PASSWORD'; Pokeio.SetLocation(location, function(err, loc) { if (err) throw err;
Add optional env vars to prevent additional leakage of personal info
Armax_Pokemon-GO-node-api
train
js
8286fca69dcc950be3870d620cb73939dd7b3207
diff --git a/src/sentry_plugins/github/plugin.py b/src/sentry_plugins/github/plugin.py index <HASH>..<HASH> 100644 --- a/src/sentry_plugins/github/plugin.py +++ b/src/sentry_plugins/github/plugin.py @@ -334,8 +334,10 @@ class GitHubRepositoryProvider(GitHubMixin, providers.RepositoryProvider): raise NotImplementedError('Cannot fetch commits anonymously') client = self.get_client(actor) + # use config name because that is kept in sync via webhooks + name = repo.config['name'] try: - res = client.compare_commits(repo, start_sha, end_sha) + res = client.compare_commits(name, start_sha, end_sha) except Exception as e: self.raise_error(e) - return [{'id': c['sha'], 'repository': repo} for c in res['commits']] + return [{'id': c['sha'], 'repository': repo.name} for c in res['commits']]
update compare_commits to take repo model (#<I>) * update compare_commits to take repo model * allow keyerrors
getsentry_sentry-plugins
train
py
de6843085568845b0c4228995eeeeab3556599d7
diff --git a/DependencyInjection/DoctrineMongoDBExtension.php b/DependencyInjection/DoctrineMongoDBExtension.php index <HASH>..<HASH> 100644 --- a/DependencyInjection/DoctrineMongoDBExtension.php +++ b/DependencyInjection/DoctrineMongoDBExtension.php @@ -106,7 +106,7 @@ class DoctrineMongoDBExtension extends AbstractDoctrineExtension $container ); - $this->loadConstraints($config, $container); + $this->loadConstraints($container); } /** @@ -339,7 +339,7 @@ class DoctrineMongoDBExtension extends AbstractDoctrineExtension $odmConfigDef->addMethodCall('setDocumentNamespaces', array($this->aliasMap)); } - protected function loadConstraints($config, ContainerBuilder $container) + protected function loadConstraints(ContainerBuilder $container) { if ($container->hasParameter('validator.annotations.namespaces')) { $container->setParameter('validator.annotations.namespaces', array_merge(
[DoctrineMongoDBBundle] Removing unused variable.
doctrine_DoctrineMongoDBBundle
train
php
07e4570417ad57dfbf78a54de9bf66270b2da394
diff --git a/app/javascript/client_messenger/homePanel.js b/app/javascript/client_messenger/homePanel.js index <HASH>..<HASH> 100644 --- a/app/javascript/client_messenger/homePanel.js +++ b/app/javascript/client_messenger/homePanel.js @@ -148,12 +148,12 @@ const HomePanel = ({ const sameDay = nextDay === today const nextWeek = nextDay < today - if(nextWeek) return <p>volvemos la proxima semana</p> - if(sameDay) return <p>{t("availability.aprox", {time: at.getHours() })}</p> + if(nextWeek) return <Availability><p>volvemos la proxima semana</p></Availability> + if(sameDay) return <Availability><p>{t("availability.aprox", {time: at.getHours() })}</p></Availability> const out = text(val, sameDay, at) - return out && <Availability>{out}</Availability> + return <Availability>{out}</Availability> } function text(val, sameDay, at){
Update homePanel.js
michelson_chaskiq
train
js
eccd88277a68ac789d21c12e0834d859fc419281
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -106,7 +106,7 @@ setup( setup_requires=['numpy>=1.14.3', 'setuptools>=18.0'], python_requires='>=3.6', install_requires=["numpy>=1.14.3", "requests", "ruamel.yaml>=0.15.6", - "monty>=3.0.2", "scipy>=1.0.1", + "monty>=3.0.2", "scipy>=1.5.0", "tabulate", "spglib>=1.9.9.44", "networkx>=2.2", "matplotlib>=1.5", "palettable>=3.1.1", "sympy", "pandas", "plotly>=4.5.0"],
Make sure scipy version is at least <I> for isntall. Otherwise FortranEOFError import in pymatgen.io.wannier does not exist.
materialsproject_pymatgen
train
py
3b801797b17dfacdd981eda29c5753382d2b229a
diff --git a/modules/custom/d_p_subscribe_file/src/Forms/SubscribeFileForm.php b/modules/custom/d_p_subscribe_file/src/Forms/SubscribeFileForm.php index <HASH>..<HASH> 100644 --- a/modules/custom/d_p_subscribe_file/src/Forms/SubscribeFileForm.php +++ b/modules/custom/d_p_subscribe_file/src/Forms/SubscribeFileForm.php @@ -66,13 +66,17 @@ class SubscribeFileForm extends FormBase { '#value' => $this->t('Get Download link'), ]; - $consents = $paragraph->get('field_d_p_sf_consent')->getValue(); - foreach ($consents as $key => $consent) { - $form["consent_$key"] = [ - '#type' => 'checkbox', - '#title' => $consent['value'], - '#required' => TRUE, - ]; + // Keep compatibility with older Droopler. + // Check field existence first. + if ($paragraph->hasField('field_d_p_sf_consent')) { + $consents = $paragraph->get('field_d_p_sf_consent')->getValue(); + foreach ($consents as $key => $consent) { + $form["consent_$key"] = [ + '#type' => 'checkbox', + '#title' => $consent['value'], + '#required' => TRUE, + ]; + } } $file = $paragraph->get('field_file_download');
Issue #<I>: Improved compatibility with beta2
droptica_droopler
train
php
8612ca44325d54e26aec9329ca683e184258edfc
diff --git a/Entity/TaxClass.php b/Entity/TaxClass.php index <HASH>..<HASH> 100644 --- a/Entity/TaxClass.php +++ b/Entity/TaxClass.php @@ -96,6 +96,21 @@ class TaxClass } /** + * @return TaxClassTranslation|null + */ + public function getTranslation($locale) + { + /** @var TaxClassTranslation $translation */ + foreach ($this->getTranslations() as $translation) { + if ($translation->getLocale() === $locale) { + return $translation; + } + } + + return null; + } + + /** * @param Product $product * * @return self
added function to get translation by locale in tax-class entity
sulu_SuluProductBundle
train
php
b2a2ab2393fcffa866d5821cb5a46f8510990152
diff --git a/tests/test_cli.py b/tests/test_cli.py index <HASH>..<HASH> 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1167,12 +1167,13 @@ def no_warning(): # There should be no warning for record in records: - # Temporary exception for for this one, see #865 + # Temporary exception for this one, see #865 + # (does not seem to not occur anymore, as of April 2022, see #947) if ( "Passing a schema to Validator.iter_errors is deprecated " "and will be removed in a future release" in str(record.message) ): - continue + continue # pragma: no cover raise RuntimeError(record)
Ignore non-coverage of exception (#<I>)
mwouts_jupytext
train
py
2dc5463e93600b4123d4707a7e4674cc98748216
diff --git a/src/main/java/org/jboss/netty/util/ExecutorUtil.java b/src/main/java/org/jboss/netty/util/ExecutorUtil.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jboss/netty/util/ExecutorUtil.java +++ b/src/main/java/org/jboss/netty/util/ExecutorUtil.java @@ -74,6 +74,17 @@ public class ExecutorUtil { for (;;) { try { es.shutdownNow(); + } catch (SecurityException ex) { + // Running in a restricted environment - fall back. + try { + es.shutdown(); + } catch (SecurityException ex2) { + // Running in a more restricted environment. + // Can't shut down this executor - skip to the next. + break; + } catch (NullPointerException ex2) { + // Some JDK throws NPE here, but shouldn't. + } } catch (NullPointerException ex) { // Some JDK throws NPE here, but shouldn't. }
Fixed issue: NETTY-<I> Unable to run netty client with a Security Manager
netty_netty
train
java
4bec50a42b8be0557c6a40c57c176be0e53d4013
diff --git a/LiSE/LiSE/proxy.py b/LiSE/LiSE/proxy.py index <HASH>..<HASH> 100644 --- a/LiSE/LiSE/proxy.py +++ b/LiSE/LiSE/proxy.py @@ -3251,11 +3251,6 @@ class EngineProxy(AbstractEngine): return cls(self.character[char].portal[nodeA][nodeB], k, v) else: return tuple(self.json_rewrap(v) for v in r) - elif isinstance(r, dict): - return { - self.json_rewrap(k): self.json_rewrap(v) - for (k, v) in r.items() - } elif isinstance(r, list): return [self.json_rewrap(v) for v in r] return r
Don't mess with dicts in json_rewrap They'll never represent anything actually stored in LiSE, only stuff like diffs. So I don't have to worry so much that the user will want to put something weird in there. In any case, it was causing RecursionError.
LogicalDash_LiSE
train
py
f726298719e36dce36faae82fc12a1f0c65ecf25
diff --git a/findimports.py b/findimports.py index <HASH>..<HASH> 100755 --- a/findimports.py +++ b/findimports.py @@ -344,21 +344,6 @@ class ImportInfo(object): level=self.level ) - @property - def toplvl_name(self): - """Return the 'toplevel' name of an import. - - For example, these imports : - import numpy as np - from .directory.filename import function - import scipy.io - have respectively the following toplevel names : - numpy - filename - scipy - """ - return self.name - class ImportFinder(ast.NodeVisitor): """AST visitor that collects all imported names in its imports attribute. @@ -718,7 +703,7 @@ class ModuleGraph(object): dir = os.path.dirname(filename) if ignore_stdlib_modules: module.imported_names = list(filter( - lambda modname: modname.toplvl_name not in STDLIB_MODNAMES_SET, + lambda modname: modname.name not in STDLIB_MODNAMES_SET, module.imported_names )) module.imports = {
removed unecessary property of ImportInfo class 'toplvl_name'
mgedmin_findimports
train
py
24a44c11818d366409b2ac09a3dc26d1adb81e94
diff --git a/lib/queue.js b/lib/queue.js index <HASH>..<HASH> 100644 --- a/lib/queue.js +++ b/lib/queue.js @@ -49,7 +49,6 @@ function Queue(process, opts) { // TODO: Hold queue (wait for some event; like reconnect) // TODO: Priority function - // TODO: Load from persistent storage } Queue.prototype.resume = function (cb) {
fixup! Preparing for persistence
diamondio_better-queue
train
js
a9e7727df7bd1dff65c12e7f613ad98506591bf8
diff --git a/src/Command/PlatformLoginCommand.php b/src/Command/PlatformLoginCommand.php index <HASH>..<HASH> 100644 --- a/src/Command/PlatformLoginCommand.php +++ b/src/Command/PlatformLoginCommand.php @@ -18,7 +18,11 @@ class PlatformLoginCommand extends PlatformCommand public function isLocal() { - return TRUE; + return true; + } + + public static function skipLogin() { + return true; } protected function execute(InputInterface $input, OutputInterface $output)
Don't force logging in to run the login command (fixes #<I>).
platformsh_platformsh-cli
train
php
9ebc3207e1c6b65307f7eeb516e27ea57e5c6808
diff --git a/src/ViewRenderer.php b/src/ViewRenderer.php index <HASH>..<HASH> 100644 --- a/src/ViewRenderer.php +++ b/src/ViewRenderer.php @@ -13,7 +13,7 @@ class ViewRenderer public function render($path, $data) { - $data = $this->addMeta($data); + $data = $this->updateMetaForCollectionItem($data); return $this->viewFactory->file( $path, @@ -21,10 +21,13 @@ class ViewRenderer )->render(); } - private function addMeta($data) + private function updateMetaForCollectionItem($data) { - $data['path'] = trim(array_get($data, 'link'), '/'); - $data['url'] = rtrim(array_get($data, 'url'), '/') . '/' . trim(array_get($data, 'link'), '/'); + if ($data->item) { + $data->link = $data->item->link; + $data->path = $data->item->path; + $data->url = $data->item->url; + } return $data; }
Update ViewRenderer to use CollectionItem's path-related meta
tightenco_jigsaw
train
php
a8c1f3bdd9847f899bcdafaddf7e8610da8e3bdc
diff --git a/components/dialog-ng/dialog-ng.js b/components/dialog-ng/dialog-ng.js index <HASH>..<HASH> 100644 --- a/components/dialog-ng/dialog-ng.js +++ b/components/dialog-ng/dialog-ng.js @@ -3,7 +3,7 @@ import angular from 'angular'; import angularSanitize from 'angular-sanitize'; import 'dom4'; -import createFocusTrap from 'focus-trap'; +import {createFocusTrap} from 'focus-trap'; import {getRect, getStyles} from '../global/dom'; import RingAngularComponent from '../global/ring-angular-component';
Fix eslint: use named import
JetBrains_ring-ui
train
js
bad9d7f39f8e9a49d11202324962e3570c9d6142
diff --git a/lib/stealth/cli.rb b/lib/stealth/cli.rb index <HASH>..<HASH> 100644 --- a/lib/stealth/cli.rb +++ b/lib/stealth/cli.rb @@ -95,16 +95,16 @@ module Stealth service_setup_klass.trigger end - - desc 'clear_sessions', 'Clears all sessions in development' + desc 'sessions:clear', 'Clears all sessions in development' long_desc <<-EOS - `stealth clear_sessions` clears all sessions from Redis in development. + `stealth sessions:clear` clears all sessions from Redis in development. - $ > stealth clear_sessions + $ > stealth sessions:clear EOS - def clear_sessions + define_method 'sessions:clear' do Stealth.load_environment - $redis.flushdb if ENV['STEALTH_ENV'] == 'development' + $redis.flushdb if Stealth.env == 'development' end + end end
Rename to sessions:clear Pretty hacky way to get around Thor’s antiquated namespacing.
hellostealth_stealth
train
rb
96897f8cd9fa1e5854842451c2dd7112e85fea60
diff --git a/bin/prey.js b/bin/prey.js index <HASH>..<HASH> 100755 --- a/bin/prey.js +++ b/bin/prey.js @@ -89,7 +89,9 @@ process.on('uncaughtException', function (err) { // launcher ///////////////////////////////////////////////////////////// -common.helpers.check_and_store_pid(pid_file, function(running_pid){ +common.helpers.check_and_store_pid(pid_file, function(err, running_pid){ + + if(err) throw(err); if(running_pid){ var signal = process.env.TRIGGER ? 'SIGUSR2' : 'SIGUSR1';
Updated bin/prey with new (err, pid) callback from helpers.check_and_store_pid_file.
prey_prey-node-client
train
js
f7cfa26ec4dd5d1986e3e47fdd25ed19722b8293
diff --git a/lib/classes/output/icon_system_fontawesome.php b/lib/classes/output/icon_system_fontawesome.php index <HASH>..<HASH> 100644 --- a/lib/classes/output/icon_system_fontawesome.php +++ b/lib/classes/output/icon_system_fontawesome.php @@ -287,8 +287,8 @@ class icon_system_fontawesome extends icon_system_font { 'core:i/log' => 'fa-list-alt', 'core:i/mahara_host' => 'fa-id-badge', 'core:i/manual_item' => 'fa-square-o', - 'core:i/marked' => 'fa-check-square', - 'core:i/marker' => 'fa-user-o', + 'core:i/marked' => 'fa-circle', + 'core:i/marker' => 'fa-circle-o', 'core:i/mean' => 'fa-calculator', 'core:i/menu' => 'fa-ellipsis-v', 'core:i/mnethost' => 'fa-external-link',
MDL-<I> icons: Fix fontawesome for i/marker and i/marked icons These combo icons are used to mark something the current element. They are supposed to be used in places like the course outline to mark/highlight a section as the current one. Also workshop uses them to switch to a phase (mark it as the current one).
moodle_moodle
train
php
6e85c62755da7451931368f56667d42a6ef9a260
diff --git a/source/CAS/Client.php b/source/CAS/Client.php index <HASH>..<HASH> 100755 --- a/source/CAS/Client.php +++ b/source/CAS/Client.php @@ -1202,6 +1202,9 @@ class CAS_Client flush(); phpCAS::traceExit(); throw new CAS_GracefullTerminationException(); + } else { + phpCAS::trace('Already authenticated, but skipping ticket clearing since setNoClearTicketsFromUrl() was used.'); + $res = true; } } else { // the user has already (previously during the session) been
#<I> Fix for case where already authenticated, but given new proxy ticket. When a proxied service receives a second request with a valid session cookie the authentication is still valid. If a proxy ticket is also included it is superfluous and can be ignored while using the existing authenticated session. This change ensures that isAuthenticated() continues to return true based on the valid session cookie, ignoring the extra proxy ticket.
apereo_phpCAS
train
php
f09b8a01b1082f581442a08d6e28891e2495c0a6
diff --git a/lib/rb/lib/thrift/server/tserver.rb b/lib/rb/lib/thrift/server/tserver.rb index <HASH>..<HASH> 100644 --- a/lib/rb/lib/thrift/server/tserver.rb +++ b/lib/rb/lib/thrift/server/tserver.rb @@ -32,23 +32,26 @@ class TSimpleServer < TServer end def serve() - @serverTransport.listen() - while (true) - client = @serverTransport.accept() - trans = @transportFactory.getTransport(client) - prot = @protocolFactory.getProtocol(trans) - begin - while (true) - @processor.process(prot, prot) + begin + @serverTransport.listen() + while (true) + client = @serverTransport.accept() + trans = @transportFactory.getTransport(client) + prot = @protocolFactory.getProtocol(trans) + begin + while (true) + @processor.process(prot, prot) + end + rescue TTransportException, TProtocolException => ttx + #print ttx,"\n" + ensure + trans.close() end - rescue TTransportException, TProtocolException => ttx - #print ttx,"\n" - ensure - trans.close() end + ensure + @serverTransport.close() end end - end begin
Thrift/Ruby: TSimpleServer closes its listen socket on an uncaught exception. Submitted by William Morgan. Approved by Kevin Clark. git-svn-id: <URL>
limingxinleo_thrift
train
rb
2cf93fd1023b8b12762b6f87c61b14135e0e77b6
diff --git a/server.go b/server.go index <HASH>..<HASH> 100644 --- a/server.go +++ b/server.go @@ -495,7 +495,9 @@ func (s *Server) Do(command Command) (interface{}, error) { select { case <-entry.commit: debugln("[Do] finish!") - return entry.result, nil + result := entry.result + entry.result = nil + return result, nil case <-time.After(time.Second): debugln("[Do] fail!") return nil, errors.New("Command commit fails")
Clear reference to LogEntry.result after return.
influxdata_influxdb
train
go
11f46a93719983554f64dc103d27f3c276806d85
diff --git a/gtfspy/gtfs.py b/gtfspy/gtfs.py index <HASH>..<HASH> 100644 --- a/gtfspy/gtfs.py +++ b/gtfspy/gtfs.py @@ -39,7 +39,7 @@ class GTFS(object): # page cache size, in negative KiB. self.conn.execute('PRAGMA cache_size = -2000000;') else: - raise EnvironmentError("File " + fname_or_conn + " missing") + raise FileNotFoundError("File " + fname_or_conn + " missing") elif isinstance(fname_or_conn, sqlite3.Connection): self.conn = fname_or_conn self._dont_close = True @@ -57,7 +57,7 @@ class GTFS(object): self._timezone = pytz.timezone(self.get_timezone_name()) def __del__(self): - if not getattr(self, '_dont_close', False): + if not getattr(self, '_dont_close', False) and hasattr(self, "conn"): self.conn.close() @classmethod
Make the __del__ of GTFS object to not raise an error, if the path given to the database is not correct
CxAalto_gtfspy
train
py
d6f5acb407ddf2d6f7afbe3e380eda5a2908dcbd
diff --git a/workflow/controller/controller_test.go b/workflow/controller/controller_test.go index <HASH>..<HASH> 100644 --- a/workflow/controller/controller_test.go +++ b/workflow/controller/controller_test.go @@ -281,9 +281,7 @@ func withAnnotation(key, val string) with { // createRunningPods creates the pods that are marked as running in a given test so that they can be accessed by the // pod assessor -// This function is called `createRunningPods`, but since it is currently not used and should not be removed it has been -// renamed to `_` until a use is found. -func _(ctx context.Context, woc *wfOperationCtx) { +func createRunningPods(ctx context.Context, woc *wfOperationCtx) { podcs := woc.controller.kubeclientset.CoreV1().Pods(woc.wf.GetNamespace()) for _, node := range woc.wf.Status.Nodes { if node.Type == wfv1.NodeTypePod && node.Phase == wfv1.NodeRunning {
fix: Fix unit test with missing createRunningPods() (#<I>)
argoproj_argo
train
go
7e5e67471bf342f912eb9899ba251b9e10a3b78a
diff --git a/rapidoid-x-net/src/main/java/org/rapidoidx/net/impl/RapidoidWorker.java b/rapidoid-x-net/src/main/java/org/rapidoidx/net/impl/RapidoidWorker.java index <HASH>..<HASH> 100644 --- a/rapidoid-x-net/src/main/java/org/rapidoidx/net/impl/RapidoidWorker.java +++ b/rapidoid-x-net/src/main/java/org/rapidoidx/net/impl/RapidoidWorker.java @@ -134,9 +134,9 @@ public class RapidoidWorker extends AbstractEventLoop<RapidoidWorker> { connecting.add(target); if (target.socketChannel.connect(target.addr)) { - Log.debug("Opened socket, connected", "address", target.addr); + Log.info("Opened socket, connected", "address", target.addr); } else { - Log.debug("Opened socket, connecting...", "address", target.addr); + Log.info("Opened socket, connecting...", "address", target.addr); } selector.wakeup(); @@ -168,6 +168,9 @@ public class RapidoidWorker extends AbstractEventLoop<RapidoidWorker> { try { ready = socketChannel.finishConnect(); U.rteIf(!ready, "Expected an established connection!"); + + Log.info("Connected", "address", target.addr); + connected.add(new RapidoidChannel(socketChannel, true, target.protocol, target.holder, target.autoreconnecting, target.state)); } catch (ConnectException e) {
Logging info about the client connection lifecycle.
rapidoid_rapidoid
train
java
110feaacfb960c3affb308ce114a074483d75d27
diff --git a/src/main/java/eu/project/ttc/models/scored/ScoredTermOrVariant.java b/src/main/java/eu/project/ttc/models/scored/ScoredTermOrVariant.java index <HASH>..<HASH> 100644 --- a/src/main/java/eu/project/ttc/models/scored/ScoredTermOrVariant.java +++ b/src/main/java/eu/project/ttc/models/scored/ScoredTermOrVariant.java @@ -84,5 +84,21 @@ public abstract class ScoredTermOrVariant { public double getOrthographicScore() { return StringUtils.getOrthographicScore(getTerm().getLemma()); } - + + public boolean isScoredTerm() { + return this instanceof ScoredTerm; + } + + public ScoredTerm asScoredTerm() { + return (ScoredTerm)this; + } + + public boolean isScoredVariation() { + return this instanceof ScoredVariation; + } + + public ScoredVariation asScoredVariation() { + return (ScoredVariation)this; + } + }
Added utility methods to ScoredTermOrVariant.java
termsuite_termsuite-core
train
java
3a081c7a45d94e4fbd3c23154a75d8711decd181
diff --git a/src/com/google/javascript/jscomp/TranspilationPasses.java b/src/com/google/javascript/jscomp/TranspilationPasses.java index <HASH>..<HASH> 100644 --- a/src/com/google/javascript/jscomp/TranspilationPasses.java +++ b/src/com/google/javascript/jscomp/TranspilationPasses.java @@ -122,12 +122,12 @@ public class TranspilationPasses { passes.add(es6ExtractClasses); passes.add(es6RewriteClass); passes.add(es6RewriteRestAndSpread); + passes.add(es6ConvertSuperConstructorCalls); passes.add(lateConvertEs6ToEs3); passes.add(es6ForOf); passes.add(rewriteBlockScopedFunctionDeclaration); passes.add(rewriteBlockScopedDeclaration); passes.add(rewriteGenerators); - passes.add(es6ConvertSuperConstructorCalls); } else if (options.needsTranspilationOf(Feature.OBJECT_PATTERN_REST)) { passes.add(es6RenameVariablesInParamLists); passes.add(es6SplitVariableDeclarations);
Move Es6ConvertSuperConstructorCalls just after Es6RewriteRestAndSpread This is a step toward merging Es6ConvertSuperConstructorCalls into Es6RewriteClass. It was run very late, because it ran after type checking before any of the other ES6 transpilation passes did, but now they all run after type checking. ------------- Created by MOE: <URL>
google_closure-compiler
train
java
08fae045648c07352c18c0ae1c225b5c288aa805
diff --git a/foolbox/attacks/ead.py b/foolbox/attacks/ead.py index <HASH>..<HASH> 100644 --- a/foolbox/attacks/ead.py +++ b/foolbox/attacks/ead.py @@ -177,7 +177,7 @@ class EADAttack(MinimizationAttack): break # stop optimization if there has been no progress loss_at_previous_check = loss.item() - found_advs_iter = is_adversarial(x_k, logits) + found_advs_iter = is_adversarial(x_k, model(x_k)) best_advs, best_advs_norms = _apply_decision_rule( self.decision_rule,
Fix bug when adversarial check is performed at y_k (#<I>)
bethgelab_foolbox
train
py
d184618494a51c28ee3197b78847e1ab39ff4110
diff --git a/features/support/pass_fail.rb b/features/support/pass_fail.rb index <HASH>..<HASH> 100644 --- a/features/support/pass_fail.rb +++ b/features/support/pass_fail.rb @@ -3,22 +3,24 @@ require 'io/console' module PassFail def pass? + state = 'stty -g' begin - system("stty raw -echo -icanon isig") + system("stty raw -echo isig") str = STDIN.getc.chr - if str.chr == "p" + case + when str.chr == "p" true - elsif str.chr =="\r" + when str.chr =="\r" true - elsif str.chr == "f" + when str.chr == "f" false - elsif str.chr == "x" + when str.chr == "x" false else - # Need this to return to the start if any other key + # something end ensure - system("stty -raw echo icanon") + system("stty -raw echo") end end
Fix issue with terminal not reverting to normal after running
danbuckland_crudecumber
train
rb
13099c74a899d2ea0ced21badc97865a654e047e
diff --git a/src/python/pants/jvm/resolve/coursier_test_util.py b/src/python/pants/jvm/resolve/coursier_test_util.py index <HASH>..<HASH> 100644 --- a/src/python/pants/jvm/resolve/coursier_test_util.py +++ b/src/python/pants/jvm/resolve/coursier_test_util.py @@ -25,7 +25,7 @@ class TestCoursierWrapper: return ( JVMLockfileMetadata.new(requirements) .add_header_to_lockfile( - self.lockfile.to_serialized(), regenerate_command=f"{bin_name()} generate_lockfiles" + self.lockfile.to_serialized(), regenerate_command=f"{bin_name()} generate-lockfiles" ) .decode() )
[internal] fix a typo in test lockfiles (#<I>) Fix a typo in test lockfiles. Ultimately doesn't affect anything of consequence but it is a nit. [ci skip-build-wheels]
pantsbuild_pants
train
py
d6daff0dc635c87659754b16107843501355eae3
diff --git a/ActiveField.php b/ActiveField.php index <HASH>..<HASH> 100644 --- a/ActiveField.php +++ b/ActiveField.php @@ -51,7 +51,7 @@ use yii\helpers\ArrayHelper; * ```php * use yii\bootstrap\ActiveForm; * - * $form = ActiveForm::begin(['layout' => 'horizontal']) + * $form = ActiveForm::begin(['layout' => 'horizontal']); * * // Form field without label * echo $form->field($model, 'demo', [
Fixed typo in ActiveField PHPDoc
yiisoft_yii2-bootstrap4
train
php
90395ee695d2d874087a52755fef94cae2d15d1c
diff --git a/core/src/main/java/hudson/util/PersistedList.java b/core/src/main/java/hudson/util/PersistedList.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/hudson/util/PersistedList.java +++ b/core/src/main/java/hudson/util/PersistedList.java @@ -174,13 +174,13 @@ public class PersistedList<T> extends AbstractList<T> { } /** - * Version of {@link #_onModified()} that swallows an exception for compliance with {@link List}. + * Version of {@link #onModified()} that throws an unchecked exception for compliance with {@link List}. */ private void _onModified() { try { onModified(); } catch (IOException e) { - throw new Error(e); + throw new RuntimeException(e); } }
Do not throw Error for a recoverable condition. In this case, someone tried to add an element to a persisted list, and it was added in memory but the configuration could not be saved. Unclear whether that should even be treated as an error condition (the write failure might be transient, and a subsequent write would store the addition), but if it should be then we should throw a simple runtime exception.
jenkinsci_jenkins
train
java
f0095c5fab311caff47b108bcb3da8991a3c9b36
diff --git a/configuration.php b/configuration.php index <HASH>..<HASH> 100644 --- a/configuration.php +++ b/configuration.php @@ -56,12 +56,12 @@ return array( // The web server type, based on this type Fusio generates the fitting // configuration format - 'fusio_server_type' => \Fusio\Impl\Service\System\WebServer::APACHE2, + 'fusio_server_type' => null, // Location of the automatically generated web server config file. Note // Fusio writes only to this file if it exists. Also you may need to restart // the web server so that the config changes take affect - 'fusio_server_conf' => '/etc/apache2/sites-available/000-fusio.conf', + 'fusio_server_conf' => null, // The url to the psx public folder (i.e. http://127.0.0.1/psx/public or // http://localhost.com)
fix write no server config in tests
apioo_fusio-impl
train
php
522712b9a6c292dee987b47623793a3353f3c823
diff --git a/breacharbiter.go b/breacharbiter.go index <HASH>..<HASH> 100644 --- a/breacharbiter.go +++ b/breacharbiter.go @@ -512,7 +512,7 @@ func (b *breachArbiter) breachObserver(contract *lnwallet.LightningChannel, desc.SigHashes = hc desc.InputIndex = inputIndex - return lnwallet.CommitSpendNoDelay(b.wallet.Signer, desc, tx) + return lnwallet.CommitSpendNoDelay(b.wallet.Cfg.Signer, &desc, tx) } // Next we create the witness generation function that will be @@ -527,7 +527,7 @@ func (b *breachArbiter) breachObserver(contract *lnwallet.LightningChannel, desc.SigHashes = hc desc.InputIndex = inputIndex - return lnwallet.CommitSpendRevoke(b.wallet.Signer, desc, tx) + return lnwallet.CommitSpendRevoke(b.wallet.Cfg.Signer, &desc, tx) } // Finally, with the two witness generation funcs created, we
breacharbiter: update wallet/signer API usage to due recent changes
lightningnetwork_lnd
train
go
8168c6457fb51f5d5df1119dde202956b0a5ac8e
diff --git a/src/core/Skeleton.js b/src/core/Skeleton.js index <HASH>..<HASH> 100644 --- a/src/core/Skeleton.js +++ b/src/core/Skeleton.js @@ -127,7 +127,7 @@ const Skeleton = Class.create(/** @lends Skeleton.prototype */ { */ copy(skeleton, rootNode) { this.inverseBindMatrices = skeleton.inverseBindMatrices; - this.jointNames = skeleton.jointNames; + this.jointNames = skeleton.jointNames.slice(); if (rootNode === undefined) { rootNode = skeleton.rootNode; }
fix: skeleton.clone should also clone jointNames
hiloteam_Hilo3d
train
js
391052e8a33de40f4a850142a85bae3ee9afebb5
diff --git a/lib/pundit/resource.rb b/lib/pundit/resource.rb index <HASH>..<HASH> 100644 --- a/lib/pundit/resource.rb +++ b/lib/pundit/resource.rb @@ -54,7 +54,7 @@ module Pundit records = _model.public_send(association_name) policy_scope = Pundit.policy_scope!( context[:current_user], - association_reflection.class_name.constantize + records ) records.merge(policy_scope) elsif [:has_one, :belongs_to].include?(association_reflection.macro)
fix for has_many relationships #1
togglepro_pundit-resources
train
rb
fd75a2fac2562234854256d2cc9efe995ed98eb6
diff --git a/src/GitHub_Updater/Plugin.php b/src/GitHub_Updater/Plugin.php index <HASH>..<HASH> 100644 --- a/src/GitHub_Updater/Plugin.php +++ b/src/GitHub_Updater/Plugin.php @@ -409,8 +409,6 @@ class Plugin { if ( ! \is_object( $transient ) ) { $transient = new \stdClass(); $transient->response = null; - } elseif ( ! \property_exists( $transient, 'response' ) ) { - $transient->response = null; } foreach ( (array) $this->config as $plugin ) { diff --git a/src/GitHub_Updater/Theme.php b/src/GitHub_Updater/Theme.php index <HASH>..<HASH> 100644 --- a/src/GitHub_Updater/Theme.php +++ b/src/GitHub_Updater/Theme.php @@ -672,8 +672,6 @@ class Theme { if ( ! \is_object( $transient ) ) { $transient = new \stdClass(); $transient->response = null; - } elseif ( ! \property_exists( $transient, 'response' ) ) { - $transient->response = null; } foreach ( (array) $this->config as $theme ) {
only need to declare stdClass
afragen_github-updater
train
php,php
bbe4ee2f6c9e24b127cabe516679d60a84061fef
diff --git a/client/fingerprint/network_unix.go b/client/fingerprint/network_unix.go index <HASH>..<HASH> 100644 --- a/client/fingerprint/network_unix.go +++ b/client/fingerprint/network_unix.go @@ -105,7 +105,6 @@ func (f *UnixNetworkFingerprint) linkSpeedSys(device string) int { return 0 } - // Convert to MB/s if mbs > 0 { return mbs } @@ -140,9 +139,8 @@ func (f *UnixNetworkFingerprint) linkSpeedEthtool(path, device string) int { return 0 } - // Convert to MB/s if mbs > 0 { - return mbs / 8 + return mbs } } f.logger.Printf("error calling ethtool (%s): %s", path, err)
don't re-convert mbits
hashicorp_nomad
train
go
357b8c345da6bbf7e4beb8fc9bc95a688017999f
diff --git a/js/jquery.fileupload.js b/js/jquery.fileupload.js index <HASH>..<HASH> 100644 --- a/js/jquery.fileupload.js +++ b/js/jquery.fileupload.js @@ -215,7 +215,7 @@ ], _BitrateTimer: function () { - this.timestamp = (new Date()).getTime(); + this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime()); this.loaded = 0; this.bitrate = 0; this.getBitrate = function (now, loaded, interval) { @@ -289,7 +289,7 @@ _onProgress: function (e, data) { if (e.lengthComputable) { - var now = (new Date()).getTime(), + var now = ((Date.now) ? Date.now() : (new Date()).getTime()), loaded; if (data._time && data.progressInterval && (now - data._time < data.progressInterval) &&
Optimized timestamp retrieval to take advantage of faster Date.now() available in all modern browsers, with backwards compatable option for IE < 9
blueimp_jQuery-File-Upload
train
js
37c060d87114f1fed013645967827f29bcd8e973
diff --git a/presto-main/src/main/resources/webapp/assets/utils.js b/presto-main/src/main/resources/webapp/assets/utils.js index <HASH>..<HASH> 100644 --- a/presto-main/src/main/resources/webapp/assets/utils.js +++ b/presto-main/src/main/resources/webapp/assets/utils.js @@ -378,23 +378,23 @@ function formatDataSizeMinUnit(size, minUnit) { } if (size >= 1024) { size /= 1024; - unit = "K"; + unit = "K" + minUnit; } if (size >= 1024) { size /= 1024; - unit = "M"; + unit = "M" + minUnit; } if (size >= 1024) { size /= 1024; - unit = "G"; + unit = "G" + minUnit; } if (size >= 1024) { size /= 1024; - unit = "T"; + unit = "T" + minUnit; } if (size >= 1024) { size /= 1024; - unit = "P"; + unit = "P" + minUnit; } return precisionRound(size) + unit; }
Fix formatDataSize to include min unit
prestodb_presto
train
js
bd03d35f72b63a5cc26145d905f42e61abce850e
diff --git a/src/tuwien/auto/calimero/knxnetip/util/TunnelCRI.java b/src/tuwien/auto/calimero/knxnetip/util/TunnelCRI.java index <HASH>..<HASH> 100644 --- a/src/tuwien/auto/calimero/knxnetip/util/TunnelCRI.java +++ b/src/tuwien/auto/calimero/knxnetip/util/TunnelCRI.java @@ -112,20 +112,21 @@ public class TunnelCRI extends CRI * * @return layer value as unsigned byte */ + // TODO maybe deprecate in favor of the enum version public final int getKNXLayer() { return opt[0] & 0xFF; } -// /** -// * Returns the requested tunneling layer. -// * -// * @return tunneling layer -// */ -// public final TunnelingLayer getLayer() -// { -// return TunnelingLayer.from(getKNXLayer()); -// } + /** + * Returns the requested tunneling layer. + * + * @return tunneling layer + */ + public final TunnelingLayer tunnelingLayer() + { + return TunnelingLayer.from(getKNXLayer()); + } public final Optional<IndividualAddress> tunnelingAddress() { if (getStructLength() == 6)
Uncomment enum version of tunneling layer, which is preferred over int
calimero-project_calimero-core
train
java
ed057679574d01dd24cf1f9d47151629a7553aa2
diff --git a/src/Coders/Model/Factory.php b/src/Coders/Model/Factory.php index <HASH>..<HASH> 100644 --- a/src/Coders/Model/Factory.php +++ b/src/Coders/Model/Factory.php @@ -24,7 +24,7 @@ class Factory /** * @var \Reliese\Meta\SchemaManager */ - protected $schemas; + protected $schemas = []; /** * @var \Illuminate\Filesystem\Filesystem diff --git a/src/Meta/Blueprint.php b/src/Meta/Blueprint.php index <HASH>..<HASH> 100644 --- a/src/Meta/Blueprint.php +++ b/src/Meta/Blueprint.php @@ -208,7 +208,7 @@ class Blueprint return current($this->unique); } - $nullPrimaryKey = new Fluent(); + $nullPrimaryKey = new Fluent(['columns' => []]); return $nullPrimaryKey; }
Fix #<I> Command fails if a table doesn't have AI PK column. Blueprint sets up a new Fluent without ensuring it has an array of `columns`, which is a required attribute. This modifies a call to a `Fluent` constructor providing a null array `columns.` Factory declares `$schema` property which never instantiated, and is required to be an array. This modifies the declaration to provide instantiation of a null array.
reliese_laravel
train
php,php
c2f301eaa81a226a081b1b4a6efdb23c985ef4bc
diff --git a/src/nu/validator/servlet/VerifierServletTransaction.java b/src/nu/validator/servlet/VerifierServletTransaction.java index <HASH>..<HASH> 100644 --- a/src/nu/validator/servlet/VerifierServletTransaction.java +++ b/src/nu/validator/servlet/VerifierServletTransaction.java @@ -687,6 +687,12 @@ class VerifierServletTransaction implements DocumentModeHandler, SchemaResolver document = ("".equals(document)) ? null : document; + if (document.contains("www.metaescort.com")) { + response.sendError(HttpServletResponse.SC_BAD_REQUEST, + "No input document"); + return; + } + String callback = null; if (outputFormat == OutputFormat.JSON) { callback = request.getParameter("callback");
Start doing some rudimentary blacklisting The W3C checker service gets massive numbers of requests for URLs at certain domains. This is an experiment with blacklisting such domains. Later we can parameterize this and add a new runtime option for it.
validator_validator
train
java
662fdefbd6834050616892a9b83531fc132eb42c
diff --git a/src/test/java/com/thinkaurelius/titan/graphdb/TitanGraphTest.java b/src/test/java/com/thinkaurelius/titan/graphdb/TitanGraphTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/thinkaurelius/titan/graphdb/TitanGraphTest.java +++ b/src/test/java/com/thinkaurelius/titan/graphdb/TitanGraphTest.java @@ -241,6 +241,32 @@ public abstract class TitanGraphTest extends TitanGraphTestCommon { } @Test + public void testPropertyIndexPersistence() { + final String propName = "favorite_color"; + final String sharedValue = "blue"; + + makeStringPropertyKey(propName); + + TitanVertex alice = tx.addVertex(); + TitanVertex bob = tx.addVertex(); + + alice.addProperty(propName, sharedValue); + + clopen(); + + alice = tx.getVertex(alice.getID()); + bob = tx.getVertex(bob.getID()); + + assertEquals(sharedValue, alice.getProperty(propName)); + assertEquals(null, bob.getProperty(propName)); + + alice.removeProperty(propName); + bob.addProperty(propName, sharedValue); + + clopen(); + } + + @Test public void testIndexRetrieval() { TitanKey id = makeIntegerUIDPropertyKey("uid"); TitanKey name = makeStringPropertyKey("name");
Add test case to catch future regressions on #<I> Consider an indexed but non-unique property p and some associated value v of p. When p=v is both removed from some vertex and added to a different vertex in the same transaction, a NullPointerException would be guaranteed in commits prior to <I>a0a<I>f<I>d6ef6c<I>f<I>ab9. This unit test method added by this commit exists to watch for regression..
thinkaurelius_titan
train
java
3b3fa57a417cdbb1df8af4a8984e53aa9ca76734
diff --git a/udata/sitemap.py b/udata/sitemap.py index <HASH>..<HASH> 100644 --- a/udata/sitemap.py +++ b/udata/sitemap.py @@ -24,5 +24,5 @@ def load_page(fn): def init_app(app): app.config['SITEMAP_VIEW_DECORATORS'] = [load_page] - app.config['SITEMAP_URL_METHOD'] = 'https' + app.config['SITEMAP_URL_METHOD'] = 'https' if app.config['USE_SSL'] else 'http' sitemap.init_app(app)
Only use https URLs when USE_SSL is True
opendatateam_udata
train
py
d552aca083c33539dca31a08f151984232f58e9f
diff --git a/pymyq/api.py b/pymyq/api.py index <HASH>..<HASH> 100644 --- a/pymyq/api.py +++ b/pymyq/api.py @@ -17,7 +17,7 @@ BASE_API_VERSION = 5 API_BASE = "https://api.myqdevice.com/api/v{0}" DEFAULT_APP_ID = "JVM/G9Nwih5BwKgNCjLxiFUQxQijAebyyg8QUHr7JOrP+tuPb8iHfRHKwTmDzHOu" -DEFAULT_USER_AGENT = "myQ/19569 CFNetwork/1107.1 Darwin/19.0.0" +DEFAULT_USER_AGENT = "okhttp/3.10.0" DEFAULT_BRAND_ID = 2 DEFAULT_REQUEST_RETRIES = 5 DEFAULT_CULTURE = "en"
Update USER_AGENT (again) (fixes #<I>) (#<I>) The server is again unhappy about USER_AGENT. Examining a session from the "real" Android app shows "okhttp/<I>", which seems to make the server happy (for now?)
arraylabs_pymyq
train
py
50b6a5790d218f57963bc63b3c6daea01edb4f11
diff --git a/frontend/src/store/feature-tags/index.js b/frontend/src/store/feature-tags/index.js index <HASH>..<HASH> 100644 --- a/frontend/src/store/feature-tags/index.js +++ b/frontend/src/store/feature-tags/index.js @@ -16,7 +16,7 @@ const featureTags = (state = getInitState(), action) => { case TAG_FEATURE_TOGGLE: return state.push(new $MAP(action.tag)); case UNTAG_FEATURE_TOGGLE: - return state.remove(state.indexOf(t => t.id === action.value.tagId)); + return state.remove(state.indexOf(t => t.value === action.tag.value && t.type === action.tag.type)); default: return state; }
fix: Use type and value from action to remove tag (#<I>) fixes: #<I>
Unleash_unleash
train
js
6f56c8df6403c0186527f71d4f57ec12b0142ace
diff --git a/polyaxon_cli/managers/deploy.py b/polyaxon_cli/managers/deploy.py index <HASH>..<HASH> 100644 --- a/polyaxon_cli/managers/deploy.py +++ b/polyaxon_cli/managers/deploy.py @@ -34,7 +34,9 @@ class DeployManager(object): @property def is_kubernetes(self): - return self.deployment_type == DeploymentTypes.KUBERNETES + return self.deployment_type in {DeploymentTypes.KUBERNETES, + DeploymentTypes.MINIKUBE, + DeploymentTypes.MICRO_K8S} @property def is_docker_compose(self):
Add minikube and microk8s deployment
polyaxon_polyaxon
train
py
7e7b47effbbb0159fc6873dd608bee6fa675e7fa
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -80,6 +80,8 @@ setup( 'doc/man/salt-key.1', 'doc/man/salt.1', 'doc/man/salt-cp.1', + 'doc/man/salt-call.1', + 'doc/man/salt-syndic.1', 'doc/man/salt-run.1', 'doc/man/salt-minion.1', ]),
Add salt-syndic manpage to setup.py
saltstack_salt
train
py
0f002d71ec70cae5da81390d24705bda9451036a
diff --git a/src/org/openscience/cdk/layout/AtomPlacer.java b/src/org/openscience/cdk/layout/AtomPlacer.java index <HASH>..<HASH> 100644 --- a/src/org/openscience/cdk/layout/AtomPlacer.java +++ b/src/org/openscience/cdk/layout/AtomPlacer.java @@ -1054,7 +1054,7 @@ public class AtomPlacer IBond bond = (IBond)bonds.get(g); if (bond.getOrder() == 3) sum += 10; else if (bond.getOrder() == 1) sum += 1; - else if (bond.getOrder() == 2) sum += 5; +// else if (bond.getOrder() == 2) sum += 5; } if (sum >= 10) return true; return false;
Commented out a line which affects SO2 group layout. The new version looks better. git-svn-id: <URL>
cdk_cdk
train
java
13effd8da738a844949fd89c7d564fd4808f771e
diff --git a/test/tests-live-query.js b/test/tests-live-query.js index <HASH>..<HASH> 100644 --- a/test/tests-live-query.js +++ b/test/tests-live-query.js @@ -153,6 +153,12 @@ promisedTest("subscribe to range", async ()=> { }); promisedTest("subscribe to keys", async ()=>{ + if (isIE) { + // The IE implementation becomes shaky here. + // Maybe becuase we launch several parallel queries to IDB. + ok(true, "Skipping this test for IE - too shaky for the CI"); + return; + } let signal1 = new Signal(), signal2 = new Signal(); let count1 = 0, count2 = 0; //const debugTxCommitted = set => console.debug("txcommitted", set);
IE<I> is too shaky for "subscribe to keys" test.
dfahlander_Dexie.js
train
js
410b7f122bbe953844d912a52a4e992c503fbc32
diff --git a/lib/rudy/routines/handlers/group.rb b/lib/rudy/routines/handlers/group.rb index <HASH>..<HASH> 100644 --- a/lib/rudy/routines/handlers/group.rb +++ b/lib/rudy/routines/handlers/group.rb @@ -22,12 +22,12 @@ module Rudy; module Routines; module Handlers; name ||= current_group_name addresses ||= [Rudy::Utils::external_ip_address] if ports.nil? - ports = current_machine_os.to_s == 'win32' ? [22,3389] : [22] + ports = current_machine_os.to_s == 'win32' ? [3389,22] : [22] end ports.each do |port| #li "Authorizing port #{port} access for: #{addresses.join(', ')}" - Rudy::AWS::EC2::Groups.authorize(name, addresses, [[port, port]]) + Rudy::AWS::EC2::Groups.authorize(name, addresses, [[port, port]]) rescue nil end end
Fix security group authorization for new windows instances
solutious_rudy
train
rb
286c452c84ed64ca913398650cdffed85c8483d0
diff --git a/lib/ttf/tables/maxp.js b/lib/ttf/tables/maxp.js index <HASH>..<HASH> 100644 --- a/lib/ttf/tables/maxp.js +++ b/lib/ttf/tables/maxp.js @@ -5,17 +5,20 @@ var _ = require('lodash'); var jDataView = require('jDataView'); -//find max points in glyph contours +// Find max points in glyph contours. +// Actual number of points can be reduced in the further code, but it is not a problem. +// This number cannot be less than max glyph points because of glyph missing +// in certain cases in some browser (like Chrome in MS Windows). function getMaxPoints(font) { - var result = 0; - _.forEach(font.glyphs, function (glyph) { - _.forEach(glyph.contours, function (contour) { - if (contour.points.length > result) { - result = contour.points.length; - } - }); - }); - return result; + var maxPoints = 0; + return _.reduce(font.glyphs, function (maxPoints, glyph) { + + var sumPoints = _.reduce(glyph.contours, function (sumPoints, contour) { + return (sumPoints || 0) + contour.points.length; + }, sumPoints); + + return Math.max(sumPoints || 0, maxPoints); + }, maxPoints); } function getMaxContours(font) {
Fixed bug in MAXP table: some of glyphs was missed in Chrome for WIndows in certain cases.
fontello_svg2ttf
train
js
471eeecfa9b6f2d50c1326476b94da244f0181c6
diff --git a/packages/react-server/core/context/Navigator.js b/packages/react-server/core/context/Navigator.js index <HASH>..<HASH> 100644 --- a/packages/react-server/core/context/Navigator.js +++ b/packages/react-server/core/context/Navigator.js @@ -272,11 +272,11 @@ class Navigator extends EventEmitter { // We don't want to leave navigation detritus // laying around as we discard bypassed pages. - if (this._nextRoute) this._nextRoute[3].reject(); + if (this._nextRoute) this._nextRoute.dfd.reject(); dfd = Q.defer(), promise = dfd.promise; - this._nextRoute = [route, request, type, dfd]; + this._nextRoute = {route, request, type, dfd}; } // If we're _currently_ navigating, we'll wait to start the @@ -284,7 +284,7 @@ class Navigator extends EventEmitter { // navigation causes all kinds of havoc. if (!this._loading && this._nextRoute){ - [route, request, type, dfd] = this._nextRoute; + const {route, request, type, dfd} = this._nextRoute; this._loading = true; this._currentRoute = route;
Future-proof frame skipping a bit Names are better than numbers.
redfin_react-server
train
js
865cfea79c57c145202a4c4754e8568474362c36
diff --git a/build_config.php b/build_config.php index <HASH>..<HASH> 100644 --- a/build_config.php +++ b/build_config.php @@ -2,7 +2,7 @@ $buildConfig = array ( 'major' => 2, 'minor' => 9, - 'build' => 27, + 'build' => 28, 'shopgate_library_path' => "", 'plugin_name' => "library", 'display_name' => "Shopgate Library 2.9.x", diff --git a/classes/core.php b/classes/core.php index <HASH>..<HASH> 100644 --- a/classes/core.php +++ b/classes/core.php @@ -24,7 +24,7 @@ ################################################################################### # define constants ################################################################################### -define('SHOPGATE_LIBRARY_VERSION', '2.9.27'); +define('SHOPGATE_LIBRARY_VERSION', '2.9.28'); define('SHOPGATE_LIBRARY_ENCODING' , 'UTF-8'); define('SHOPGATE_BASE_DIR', realpath(dirname(__FILE__).'/../'));
Increased Shopgate Library <I>.x to version <I>.
shopgate_cart-integration-sdk
train
php,php
4a9daf1da00ff9ad3b80dad7a14781efaf81c373
diff --git a/lib/Doctrine/DBAL/Migrations/Version.php b/lib/Doctrine/DBAL/Migrations/Version.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/DBAL/Migrations/Version.php +++ b/lib/Doctrine/DBAL/Migrations/Version.php @@ -239,15 +239,16 @@ class Version $this->_outputWriter->write(' <comment>-></comment> ' . $query); $this->_connection->executeQuery($query); } - - if ($direction === 'up') { - $this->markMigrated(); - } else { - $this->markNotMigrated(); - } } else { $this->_outputWriter->write(sprintf('<error>Migration %s was executed but did not result in any SQL statements.</error>', $this->_version)); } + + if ($direction === 'up') { + $this->markMigrated(); + } else { + $this->markNotMigrated(); + } + } else { foreach ($this->_sql as $query) { $this->_outputWriter->write(' <comment>-></comment> ' . $query);
Always add/remove the entry from the doctrine_migration_versions table regardless of its content. This fixes a bug where entries were not removed if either the up or down methods didn't contain an action. In some instance this meant you could migrate down, but no longer migrate up at a later date.
doctrine_migrations
train
php
15c2e3e7e623c3ae29bc6f640b0de5b643bb44ba
diff --git a/pyeapi/client.py b/pyeapi/client.py index <HASH>..<HASH> 100644 --- a/pyeapi/client.py +++ b/pyeapi/client.py @@ -405,16 +405,10 @@ def connect(transport=None, host='localhost', username='admin', """ transport = transport or DEFAULT_TRANSPORT connection = make_connection(transport, host=host, username=username, - password=password, port=port, timeout=timeout) + password=password, port=port, timeout=timeout) if return_node: - kwargs = dict( - transport=transport, - host=host, - username=username, - password=password, - port=port, - ) - return Node(connection, **kwargs) + return Node(connection, transport=transport, host=host, + username=username, password=password, port=port) return connection
pass args directly to Node() method
arista-eosplus_pyeapi
train
py
5ebe273e2efd962a66caf0e8e9ed854fb855fb08
diff --git a/spec/services/referrals/capture_referral_action_service.rb b/spec/services/referrals/capture_referral_action_service.rb index <HASH>..<HASH> 100644 --- a/spec/services/referrals/capture_referral_action_service.rb +++ b/spec/services/referrals/capture_referral_action_service.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe Referrals::CaptureReferralActionService do + +end \ No newline at end of file
Capture Referral action service spec
psagan_referrals
train
rb