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
49f761175d3fa6ed1bc3b61d32eb1a4b25c2e7e6
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereStep.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereStep.java index <HASH>..<HASH> 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereStep.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereStep.java @@ -74,6 +74,7 @@ public final class WhereStep<S> extends FilterStep<S> implements TraversalParent for (final IsStep<?> isStep : this.scopePEndSteps) { ((ScopeP) isStep.getPredicate()).bind(this, traverser); } + // return TraversalUtil.test(traverser, (Traversal.Admin<S,?>)this.predicate.getTraversals().get(0)); // TODO: we need to make WhereStep operate on Traversal (this fails for AndP() -- turn AndP() in And()? return this.predicate.getBiPredicate().test(traverser, null); }
notes for WhereStep's future.
apache_tinkerpop
train
java
eccabe3cb773a5513277a071bc1da838588c84e7
diff --git a/js/aofex.js b/js/aofex.js index <HASH>..<HASH> 100644 --- a/js/aofex.js +++ b/js/aofex.js @@ -325,7 +325,11 @@ module.exports = class aofex extends Exchange { // ] // } // - const result = { 'info': response }; + const result = { + 'info': response, + 'timestamp': undefined, + 'datetime': undefined, + }; const balances = this.safeValue (response, 'result', []); for (let i = 0; i < balances.length; i++) { const balance = balances[i];
aofex-fetchBalance-timestamp
ccxt_ccxt
train
js
9f05f40454279a042ffade54debe38b6d04a696f
diff --git a/Repository/CourseSessionUserRepository.php b/Repository/CourseSessionUserRepository.php index <HASH>..<HASH> 100644 --- a/Repository/CourseSessionUserRepository.php +++ b/Repository/CourseSessionUserRepository.php @@ -69,7 +69,7 @@ class CourseSessionUserRepository extends EntityRepository JOIN csu.user u WHERE csu.session = :session AND u.isEnabled = true - ORDER BY u.username ASC + ORDER BY u.lastName ASC '; $query = $this->_em->createQuery($dql); $query->setParameter('session', $session);
[CursusBundle] order by username to order by lastName
claroline_Distribution
train
php
a75dd7de50b3f7956b9f5d0af13522147e9f99eb
diff --git a/src-standard/main/java/javax/time/chrono/CopticChrono.java b/src-standard/main/java/javax/time/chrono/CopticChrono.java index <HASH>..<HASH> 100644 --- a/src-standard/main/java/javax/time/chrono/CopticChrono.java +++ b/src-standard/main/java/javax/time/chrono/CopticChrono.java @@ -65,14 +65,17 @@ import javax.time.calendrical.CalendricalObject; */ public final class CopticChrono extends Chrono implements Serializable { - private static final long serialVersionUID = 1L; - /** * Singleton instance. */ public static final CopticChrono INSTANCE = new CopticChrono(); /** + * Serialization version. + */ + private static final long serialVersionUID = 1L; + + /** * Restricted constructor. */ private CopticChrono() {
Javadoc, move field to correct location in file
ThreeTen_threetenbp
train
java
2f4947f7370b85609d990ffe10a14dfd1c4912d5
diff --git a/imolecule/__init__.py b/imolecule/__init__.py index <HASH>..<HASH> 100644 --- a/imolecule/__init__.py +++ b/imolecule/__init__.py @@ -1,6 +1,6 @@ from imolecule.notebook import draw, generate, to_json # noqa __title__ = 'imolecule' -__version__ = '0.1.8' +__version__ = '0.1.9' __author__ = 'Patrick Fuller' __license__ = 'MIT'
Incremented version to publicize ipy<I> fix
patrickfuller_imolecule
train
py
4e0d87f0d90b94b7bc022d395dcc3e5ea5d8b08e
diff --git a/recordlinkage/preprocessing/__init__.py b/recordlinkage/preprocessing/__init__.py index <HASH>..<HASH> 100644 --- a/recordlinkage/preprocessing/__init__.py +++ b/recordlinkage/preprocessing/__init__.py @@ -2,4 +2,6 @@ from recordlinkage.preprocessing.cleaning import * from recordlinkage.preprocessing.encoding import phonetic from recordlinkage.preprocessing.encoding import _list_phonetic_algorithms + phonetic_algorithms = _list_phonetic_algorithms() +"""List of available phonetic algorithms."""
Add docstring phonetic_algorithms attribute
J535D165_recordlinkage
train
py
40877a0bb233a92fc7e70c1aa7cdf640d46b125e
diff --git a/lib/util/conflicter.js b/lib/util/conflicter.js index <HASH>..<HASH> 100644 --- a/lib/util/conflicter.js +++ b/lib/util/conflicter.js @@ -4,7 +4,7 @@ var fs = require('fs'); var path = require('path'); var events = require('events'); var diff = require('diff'); -var prompt = require('../actions/prompt').prompt; +var prompt = require('../actions/prompt'); var exists = fs.existsSync || path.existsSync; var log = logger('conflicter');
fix issue with prompt when file conflict occours
yeoman_environment
train
js
33581093b5dba32dc6281dd72aec172ef6516313
diff --git a/eng/versioning/set_versions.py b/eng/versioning/set_versions.py index <HASH>..<HASH> 100644 --- a/eng/versioning/set_versions.py +++ b/eng/versioning/set_versions.py @@ -184,6 +184,10 @@ def update_versions_file_for_nightly_devops(build_type, build_qualifier, artifac else: module.dependency += '-' + unreleased_build_qualifier + # The final unreleased dependency version needs to be of the form + # [1.0.0-dev.YYYYMMDD.,] <-- note the ., this is the version range for Maven + module.dependency = '[{},]'.format(module.dependency) + print(f'updating unreleased/beta dependency {module.name} to use dependency version range: "{module.dependency}"') version_map[module.name] = module
Version range needs the , at the end (#<I>) * Version range needs the , at the end * version range needs to be in braces Used override because nothing in this PR affects a core - ci run. The change had to be verified on a run that sets the dev version in a pipeline that has unreleased dependencies.
Azure_azure-sdk-for-java
train
py
59d909b2e42ba5d856d26e29ca15e43364b65ed2
diff --git a/setuptools_scm/git_file_finder.py b/setuptools_scm/git_file_finder.py index <HASH>..<HASH> 100644 --- a/setuptools_scm/git_file_finder.py +++ b/setuptools_scm/git_file_finder.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright © 2018 ACSONE SA/NV -# License LGPLv3 (http://www.gnu.org/licenses/lgpl-3.0-standalone.html) - import os import subprocess import tarfile diff --git a/testing/test_git_file_finder.py b/testing/test_git_file_finder.py index <HASH>..<HASH> 100644 --- a/testing/test_git_file_finder.py +++ b/testing/test_git_file_finder.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright © 2018 ACSONE SA/NV -# License LGPLv3 (http://www.gnu.org/licenses/lgpl-3.0-standalone.html) - import os import sys
Remove file headers to follow local style
pypa_setuptools_scm
train
py,py
f58c1fd87ffe64d9a1cab9f0a8bfc4825e3ec4b9
diff --git a/mtrace.js b/mtrace.js index <HASH>..<HASH> 100644 --- a/mtrace.js +++ b/mtrace.js @@ -195,10 +195,16 @@ function finishedParsing() { continue; } idx += tag.length; - var end_idx = stdout.indexOf('\n', idx) || stdout.length; + var end_idx = stdout.indexOf('\n', idx); + if (end_idx === -1) { + end_idx = stdout.length; + } if (end_idx === idx) { ++idx; - end_idx = stdout.indexOf('\n', idx) || stdout.length; + end_idx = stdout.indexOf('\n', idx); + if (end_idx === -1) { + end_idx = stdout.length; + } } var line = stdout.slice(idx, end_idx); if (line.slice(0, 9) === 'No symbol') {
Fixed incorrect condition on indexOf.
Jimbly_node-mtrace
train
js
4f25b7e2c07318430076ea2508ac4b0922901f57
diff --git a/build/build.py b/build/build.py index <HASH>..<HASH> 100755 --- a/build/build.py +++ b/build/build.py @@ -897,6 +897,9 @@ def runValidator(): def checkService(): + if not os.path.exists(vnuJar): + release = Release() + release.createExecutable("jar") doc = miniDoc.replace(" ", "%20") query = "?out=gnu&doc=data:text/html;charset=utf-8,%s" % doc url = "http://localhost:%s/%s" % (portNumber, query) @@ -1050,7 +1053,7 @@ class Release(): '-cp', self.classpath, 'org.apache.tools.ant.Main', '-f', self.buildXml, jarOrWar]) if jarOrWar == "jar": - release.checkJar() + self.checkJar() else: self.writeHashes(distWarDir)
Build: Ensure jar is built before checking service
validator_validator
train
py
73f233f3a11965f889e719fd28f35656e7d7d776
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -28,12 +28,12 @@ module.exports = { let addonOptions = this._getAddonOptions(app).typefaceOptions || {} let typefaces = addonOptions.disableAuto ? [] : this._getTypefacesFromPackage() - this.options = merge.all([{}, { + this._options = merge.all([{}, { typefaces }, addonOptions]) - if (!this.options.typefaces.length) { + if (!this._options.typefaces.length) { return; } @@ -78,7 +78,7 @@ module.exports = { }, _checkTypefaces () { - this.options.typefaces.forEach((typeface) => { + this._options.typefaces.forEach((typeface) => { if (!typefaceList.includes(typeface)) { throw new Error(`The font '${typeface}' is not supported. Please chose a font from the available list.`) } @@ -94,7 +94,7 @@ module.exports = { }, _createImports () { - this.options.typefaces.filter(onlyUnique).forEach((typeface) => { + this._options.typefaces.filter(onlyUnique).forEach((typeface) => { this.import(`node_modules/typeface-${typeface}/index.css`, { destDir: 'assets/files' });
Prevent deprecation with options collision
jeffjewiss_ember-typeface
train
js
93395d05e42d44e0eb7d3c42a91746149892dfa0
diff --git a/core/src/main/java/org/jboss/jca/core/connectionmanager/ccm/CachedConnectionManagerImpl.java b/core/src/main/java/org/jboss/jca/core/connectionmanager/ccm/CachedConnectionManagerImpl.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/jboss/jca/core/connectionmanager/ccm/CachedConnectionManagerImpl.java +++ b/core/src/main/java/org/jboss/jca/core/connectionmanager/ccm/CachedConnectionManagerImpl.java @@ -686,6 +686,14 @@ public class CachedConnectionManagerImpl implements CachedConnectionManager */ public void beforeCompletion() { + // No-action + } + + /** + * {@inheritDoc} + */ + public void afterCompletion(int status) + { closing.set(true); for (Iterator<Object> i = connections.iterator(); i.hasNext();) @@ -695,14 +703,6 @@ public class CachedConnectionManagerImpl implements CachedConnectionManager connections.clear(); } - - /** - * {@inheritDoc} - */ - public void afterCompletion(int status) - { - // No-action - } } /**
[JBJCA-<I>] - Container is not cleaning up container-managed JMSContext
ironjacamar_ironjacamar
train
java
e5383755640bb5d36d0b170058241fedaf5cee46
diff --git a/FlowCytometryTools/core/containers.py b/FlowCytometryTools/core/containers.py index <HASH>..<HASH> 100755 --- a/FlowCytometryTools/core/containers.py +++ b/FlowCytometryTools/core/containers.py @@ -175,7 +175,7 @@ class FCMeasurement(Measurement): return plot_ndpanel(channel_mat, plot_region, **kwargs) - def view_interactively(self, backend='auto'): + def view_interactively(self, backend='wx'): '''Loads the current sample in a graphical interface for drawing gates. Parameters
changing default GUI back to wx
eyurtsev_FlowCytometryTools
train
py
cd44e9316bde74ea8e8ff8acfa34364371ae3bd2
diff --git a/dateparser/date_parser.py b/dateparser/date_parser.py index <HASH>..<HASH> 100644 --- a/dateparser/date_parser.py +++ b/dateparser/date_parser.py @@ -407,15 +407,6 @@ def parse_using_languages(date_string, date_format, languages): raise ValueError("Invalid date: %s" % date_string) -def _is_word_in_language(token, language): - """Check if token is a word in the given language - """ - # XXX: needed for unclean dates (in URLs) like 14_luglio_2014 - token = token.strip('_') - - return INFOS[language].month(token) - - def get_language_candidates(tokens, languages=None, exclude_languages=None): """Find the languages which have a word matching at least one of the given tokens and all tokens are known by this language @@ -428,11 +419,9 @@ def get_language_candidates(tokens, languages=None, exclude_languages=None): require_fuzzy = False for lang in languages: - should_add = False + should_add = True for token in tokens: - if _is_word_in_language(token, lang): - should_add = True - elif not token.isdigit() and not INFOS[lang].is_token_known(token): + if not token.isdigit() and not INFOS[lang].is_token_known(token): require_fuzzy = True should_add = False break
Fix for languages with months given as numbers
scrapinghub_dateparser
train
py
cd64f7f2f74d4dad80351eda680cc07451c713db
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -19,8 +19,8 @@ setup( platforms='any', python_requires='>=3.7', extras_require={ - 'dev': ['tox>3', 'flake8', 'pep8-naming', 'wheel', 'twine'], - 'test': ['pytest>=6', 'pytest-cov'], + 'dev': ['tox>=3', 'flake8', 'pep8-naming', 'wheel', 'twine'], + 'test': ['pytest>=7', 'pytest-cov'], }, long_description=pathlib.Path('README.rst').read_text(encoding='utf-8'), classifiers=[
bump pytest to >= 7, fix tox version
xflr6_fileconfig
train
py
29496cf6f9b27c4ef5dc5efd8c6e0cab9ca03713
diff --git a/tests/unit/io/XDMFTest.py b/tests/unit/io/XDMFTest.py index <HASH>..<HASH> 100644 --- a/tests/unit/io/XDMFTest.py +++ b/tests/unit/io/XDMFTest.py @@ -62,7 +62,7 @@ class XDMFTest: def test_save(self, tmpdir): fname = tmpdir.join('test_file') - op.io.XDMF.save(network=self.net, phases=self.phase_1, filename=fname) + op.io.XDMF.export_data(network=self.net, phases=self.phase_1, filename=fname) os.remove(tmpdir.join('test_file.hdf')) os.remove(tmpdir.join('test_file.xmf'))
Update XDMF tets
PMEAL_OpenPNM
train
py
193da71a01b3965ffedfde44cf9c0cb24fd641e3
diff --git a/src/kvs.js b/src/kvs.js index <HASH>..<HASH> 100644 --- a/src/kvs.js +++ b/src/kvs.js @@ -64,7 +64,7 @@ module.exports = (knex, options = {}) => { const bootstrap = () => { return helpers(knex).createTableIfNotExists(tableName, function(table) { table.string('key').primary() - table.string('value') + table.text('value') table.timestamp('modified_on') }) }
kvs stores info in text instead of carchar(<I>)
botpress_botpress
train
js
fbb770ab5c32b6ca29cf1bb4e1d097320683177a
diff --git a/lib/cache.js b/lib/cache.js index <HASH>..<HASH> 100644 --- a/lib/cache.js +++ b/lib/cache.js @@ -17,7 +17,10 @@ module.exports = function(){ key = req.originalUrl; redis.get(key,function(error,reply){ - if(!error && reply){ + if(error){ + console.log('Error in caching layer:',error); + return next(); + }else if(reply){ res.set('Content-Type', 'application/json'); res.end(reply); }else{
Improved caching layer in case of a redis failure
apis-is_apis
train
js
1876002b12b94cf1c93edef55f2900797affb00b
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -294,4 +294,4 @@ epub_copyright = copyright # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'http://docs.python.org/': None} +intersphinx_mapping = {'python': ('http://docs.python.org/2', None)}
Changed intersphinx conf to the new format
pyvisa_pyvisa
train
py
5daff78c2db61501eca5c7e3eb1c59f220d484e7
diff --git a/executor/executor_test.go b/executor/executor_test.go index <HASH>..<HASH> 100644 --- a/executor/executor_test.go +++ b/executor/executor_test.go @@ -107,12 +107,12 @@ var _ = Suite(&testSuiteAgg{baseTestSuite: &baseTestSuite{}}) var _ = Suite(&testSuite6{&baseTestSuite{}}) var _ = Suite(&testSuite7{&baseTestSuite{}}) var _ = Suite(&testSuite8{&baseTestSuite{}}) -var _ = SerialSuites(&testShowStatsSuite{&baseTestSuite{}}) +var _ = Suite(&testShowStatsSuite{&baseTestSuite{}}) var _ = Suite(&testBypassSuite{}) var _ = Suite(&testUpdateSuite{}) var _ = Suite(&testPointGetSuite{}) var _ = Suite(&testBatchPointGetSuite{}) -var _ = SerialSuites(&testRecoverTable{}) +var _ = Suite(&testRecoverTable{}) var _ = Suite(&testClusterReaderSuite{}) var _ = Suite(&testFlushSuite{}) var _ = SerialSuites(&testAutoRandomSuite{&baseTestSuite{}})
executor: optimize unit test by unset some serial test suites (#<I>)
pingcap_tidb
train
go
0dfc1d6ded74a6ce37ec78ad9e703836e1bf9e83
diff --git a/cmd/kubeadm/app/cmd/reset.go b/cmd/kubeadm/app/cmd/reset.go index <HASH>..<HASH> 100644 --- a/cmd/kubeadm/app/cmd/reset.go +++ b/cmd/kubeadm/app/cmd/reset.go @@ -168,7 +168,7 @@ func (r *Reset) Run(out io.Writer, client clientset.Interface) error { klog.V(1).Info("[reset] removing Kubernetes-managed containers") if err := removeContainers(utilsexec.New(), r.criSocketPath); err != nil { - klog.Errorf("[reset] failed to remove containers: %+v", err) + klog.Errorf("[reset] failed to remove containers: %v", err) } dirsToClean = append(dirsToClean, []string{kubeadmconstants.KubeletRunDirectory, "/etc/cni/net.d", "/var/lib/dockershim", "/var/run/kubernetes"}...)
kubeadm: Don't dump backtrace on reset The current code logs an error and full blown backtrace if we fail to remove the containers upon reset. This creates unneeded, huge and rather scary log message. Fix that by leaving just the error message.
kubernetes_kubernetes
train
go
e1c5f97e93c1ca361c6c3cd7662af9a4a5a18401
diff --git a/src/matreshka-magic.js b/src/matreshka-magic.js index <HASH>..<HASH> 100644 --- a/src/matreshka-magic.js +++ b/src/matreshka-magic.js @@ -702,9 +702,7 @@ }, _defineSpecial: function(object, key, noAccessors) { - if (!object || typeof object != 'object') return object; - - initMK(object); + if (!object || typeof object != 'object' || !object[sym] ) return object; var specialProps = object[sym].special[key];
don't use initMK inside _defineSpecial (performance improvement)
matreshkajs_matreshka
train
js
abda214ca0ec86a18c66c7acc82ff0bfba19458d
diff --git a/xclim/indices/_conversion.py b/xclim/indices/_conversion.py index <HASH>..<HASH> 100644 --- a/xclim/indices/_conversion.py +++ b/xclim/indices/_conversion.py @@ -1191,9 +1191,9 @@ def universal_thermal_climate_index( tr: xr.DataArray = None, ) -> xr.DataArray: """ - Mean Universal Thermal Climate Index (UTCI) + Universal Thermal Climate Index (UTCI) - The mean of daily UTCI + The daily UTCI Parameters ----------
Update xclim/indices/_conversion.py
Ouranosinc_xclim
train
py
2a568c95dd0e8bf7192927038f0553fcca29a913
diff --git a/test/e2e/storage/testsuites/multivolume.go b/test/e2e/storage/testsuites/multivolume.go index <HASH>..<HASH> 100644 --- a/test/e2e/storage/testsuites/multivolume.go +++ b/test/e2e/storage/testsuites/multivolume.go @@ -305,7 +305,7 @@ func (t *multiVolumeTestSuite) DefineTests(driver TestDriver, pattern testpatter // [ node1 ] // \ / <- same volume mode // [volume1] - ginkgo.It("should concurrently access the single volume from pods on the same node", func() { + ginkgo.It("should concurrently access the single volume from pods on the same node [LinuxOnly]", func() { init() defer cleanup()
Add linuxonly on one multivolume test This test is not working for windows yet due to commands issued in pod are not available for windows Change-Id: Ia0b<I>afd6dfe0bbb1ab<I>dc<I>a7e8ce<I>
kubernetes_kubernetes
train
go
ddbd050e678ff6760049bbf7e1c3d19b2c17c5ac
diff --git a/trimesh/visual/texture.py b/trimesh/visual/texture.py index <HASH>..<HASH> 100644 --- a/trimesh/visual/texture.py +++ b/trimesh/visual/texture.py @@ -135,9 +135,13 @@ class TextureVisuals(Visuals): uv = self.uv if uv is not None: uv = uv.copy() + face_materials = self.face_materials + if face_materials is not None: + face_materials = face_materials.copy() copied = TextureVisuals( uv=uv, - material=self.material.copy()) + material=self.material.copy(), + face_materials=face_materials) return copied
Fix TextureVisuals.copy() with face_materials.
mikedh_trimesh
train
py
9482a913a109e70e8732af65588e077108ed7055
diff --git a/lib/sinatra.rb b/lib/sinatra.rb index <HASH>..<HASH> 100644 --- a/lib/sinatra.rb +++ b/lib/sinatra.rb @@ -1,3 +1,4 @@ +$LOAD_PATH.unshift File.dirname(__FILE__) require 'sinatra/base' require 'sinatra/main' require 'sinatra/compat'
add lib dir to load path, for backward compatibility
sinatra_sinatra
train
rb
54115adc684ecf6a830125311fb67e816361908f
diff --git a/tests/ee/test_energy_efficiency_meter.py b/tests/ee/test_energy_efficiency_meter.py index <HASH>..<HASH> 100644 --- a/tests/ee/test_energy_efficiency_meter.py +++ b/tests/ee/test_energy_efficiency_meter.py @@ -83,7 +83,7 @@ def meter_input_daily(project_meter_input): } for dt in record_starts ] - trace = _natural_gas_input(records) + trace = _electricity_input(records) trace.update({'interval': 'daily'}) meter_input = {
Make sure the daily model tests run on both gas and electric
openeemeter_eemeter
train
py
3a5b28d7d8216f5995bf71814348dcd6d1a72fef
diff --git a/tests/dummy/config/environment.js b/tests/dummy/config/environment.js index <HASH>..<HASH> 100644 --- a/tests/dummy/config/environment.js +++ b/tests/dummy/config/environment.js @@ -6,6 +6,9 @@ module.exports = function(environment) { environment: environment, baseURL: '/', locationType: 'auto', + 'ember-remodal': { + disableAnimationWhileTesting: true + }, EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build
use new config flag in these tests
sethbrasile_ember-remodal
train
js
30a5437db04371dadb85c6530bd00ff8e002d3e5
diff --git a/nbsphinx_link/__init__.py b/nbsphinx_link/__init__.py index <HASH>..<HASH> 100644 --- a/nbsphinx_link/__init__.py +++ b/nbsphinx_link/__init__.py @@ -86,7 +86,7 @@ class LinkedNotebookParser(NotebookParser): def setup(app): """Initialize Sphinx extension.""" app.setup_extension('nbsphinx') - app.add_source_parser('.nblink', LinkedNotebookParser) + app.add_source_parser('.nblink', LinkedNotebookParser, override=True) app.add_config_value('nbsphinx_link_target_root', None, rebuild='env') return {'version': __version__, 'parallel_read_safe': True}
Update for sphinx <I>
vidartf_nbsphinx-link
train
py
d80067b27a90cbfba7c1fd34b4ed00f5bff3ce8c
diff --git a/src/server/worker/api_server.go b/src/server/worker/api_server.go index <HASH>..<HASH> 100644 --- a/src/server/worker/api_server.go +++ b/src/server/worker/api_server.go @@ -21,6 +21,7 @@ import ( "sync/atomic" "syscall" "time" + "unicode/utf8" etcd "github.com/coreos/etcd/clientv3" "github.com/gogo/protobuf/jsonpb" @@ -676,6 +677,9 @@ func (a *APIServer) uploadOutput(pachClient *client.APIClient, dir string, tag s if err != nil { return err } + if !utf8.ValidString(filePath) { + return fmt.Errorf("Filepath is not valid utf-8: %s", filePath) + } if filePath == outputPath { tree = hashtree.NewOrdered("/") return nil
Check that the paths of outputted files are valid utf-8. This is necessary because the filepath is decoded as utf-8 downstream when it's used as input for a pipeline.
pachyderm_pachyderm
train
go
3ef0c12b0a7f01b98dac40dd5cb60f017ebe6624
diff --git a/pyparsing/__init__.py b/pyparsing/__init__.py index <HASH>..<HASH> 100644 --- a/pyparsing/__init__.py +++ b/pyparsing/__init__.py @@ -1,6 +1,6 @@ # module pyparsing.py # -# Copyright (c) 2003-2019 Paul T. McGuire +# Copyright (c) 2003-2020 Paul T. McGuire # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -154,6 +154,7 @@ __all__ = [ "LineEnd", "LineStart", "Literal", + "Located", "PrecededBy", "MatchFirst", "NoMatch",
Fix minor typos and add Located to `__all__` list
pyparsing_pyparsing
train
py
5993e6c79143bfe9ba989d450f8aece366af7d82
diff --git a/lib/page/html.js b/lib/page/html.js index <HASH>..<HASH> 100644 --- a/lib/page/html.js +++ b/lib/page/html.js @@ -7,7 +7,7 @@ var Promise = require('../utils/promise'); var location = require('../utils/location'); // Selector to ignore -var ANNOTATION_IGNORE = '.no-glossary,code,pre,a,script'; +var ANNOTATION_IGNORE = '.no-glossary,code,pre,a,script,h1,h2,h3,h4,h5,h6'; function HTMLPipeline(htmlString, opts) { _.bindAll(this);
Ignore headings for annotations
GitbookIO_gitbook
train
js
56e71f3e0d43cf9a41fdf08a25852d4d30a0de0b
diff --git a/modules_v2/upcoming_events/module.php b/modules_v2/upcoming_events/module.php index <HASH>..<HASH> 100644 --- a/modules_v2/upcoming_events/module.php +++ b/modules_v2/upcoming_events/module.php @@ -28,8 +28,6 @@ if (!defined('WT_WEBTREES')) { exit; } -require_once WT_ROOT.'includes/functions/functions_print_lists.php'; - class upcoming_events_WT_Module extends WT_Module implements WT_Module_Block { // Extend class WT_Module public function getTitle() { @@ -45,6 +43,8 @@ class upcoming_events_WT_Module extends WT_Module implements WT_Module_Block { public function getBlock($block_id, $template=true, $cfg=null) { global $ctype, $WT_IMAGES; + require_once WT_ROOT.'includes/functions/functions_print_lists.php'; + $days =get_block_setting($block_id, 'days', 7); $filter =get_block_setting($block_id, 'filter', true); $onlyBDM =get_block_setting($block_id, 'onlyBDM', false);
Only load functions_print_lists on pages that actually need it
fisharebest_webtrees
train
php
0e68afae797da986f4b9ed9560b76378ab1c937f
diff --git a/spec/factories.rb b/spec/factories.rb index <HASH>..<HASH> 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -302,8 +302,8 @@ FactoryGirl.define do # We can do this because the error type is determined by the # HTTP response code. - factory :blockscore_error, class: Hash, traits: [:resource] do - ignore do + factory :blockscore_error, :class => Hash, :traits => [:resource] do + transient do error_type 'api_error' end
Update FactoryGirl dependency to <I>
BlockScore_blockscore-ruby
train
rb
fcf2178543a77717ea91196ee3d597e736b76971
diff --git a/table/tables/tables.go b/table/tables/tables.go index <HASH>..<HASH> 100644 --- a/table/tables/tables.go +++ b/table/tables/tables.go @@ -681,7 +681,7 @@ func (t *TableCommon) AddRecord(sctx sessionctx.Context, r []types.Datum, opts . pkIdx := FindPrimaryIndex(tblInfo) pkDts := make([]types.Datum, 0, len(pkIdx.Columns)) for _, idxCol := range pkIdx.Columns { - pkDts = append(pkDts, r[tblInfo.Columns[idxCol.Offset].Offset]) + pkDts = append(pkDts, r[idxCol.Offset]) } tablecodec.TruncateIndexValues(tblInfo, pkIdx, pkDts) var handleBytes []byte
table: fix redundant and misleading conditions (#<I>)
pingcap_tidb
train
go
4f7daf317608d8eb8c50693cec01f0d3b6c2cf93
diff --git a/fusesoc/edalizer.py b/fusesoc/edalizer.py index <HASH>..<HASH> 100644 --- a/fusesoc/edalizer.py +++ b/fusesoc/edalizer.py @@ -82,7 +82,7 @@ class Edalizer(object): else: _name = os.path.join(rel_root, file.name) _files.append({ - 'name' : _name, + 'name' : str(_name), 'core' : str(core.name), 'file_type' : file.file_type, 'is_include_file' : file.is_include_file,
Always cast file name to string in edalizer
olofk_fusesoc
train
py
294738650644a82c7fa68878e3e7240167cdd51b
diff --git a/addon/mixins/router.js b/addon/mixins/router.js index <HASH>..<HASH> 100644 --- a/addon/mixins/router.js +++ b/addon/mixins/router.js @@ -1,19 +1,20 @@ import Ember from 'ember'; +function trackPage() { + Ember.run.scheduleOnce('afterRender', () => { + this.get('metrics').trackPage({ + page: this.get('url'), + title: this.getWithDefault('currentRouteName', 'unknown') + }); + }); +} + export default Ember.Mixin.create({ metrics: Ember.inject.service(), didTransition() { this._super(...arguments); - this._trackPage(); - }, - _trackPage() { - Ember.run.scheduleOnce('afterRender', () => { - this.get('metrics').trackPage({ - page: this.get('url'), - title: this.getWithDefault('currentRouteName', 'unknown') - }); - }); + trackPage.call(this); } });
don't pollute the Router "namespace" with _trackEvent
kellyselden_ember-metrics-mixins
train
js
a88711ae48fe5c00e4847d87a8231f6ebc9a1d73
diff --git a/lib/specinfra/version.rb b/lib/specinfra/version.rb index <HASH>..<HASH> 100644 --- a/lib/specinfra/version.rb +++ b/lib/specinfra/version.rb @@ -1,3 +1,3 @@ module Specinfra - VERSION = "2.42.1" + VERSION = "2.42.2" end
Bump up version [skip ci]
mizzy_specinfra
train
rb
faf59afb23c0b0ee088347c4d54cf6067ce2e5c1
diff --git a/lib/millstone.js b/lib/millstone.js index <HASH>..<HASH> 100644 --- a/lib/millstone.js +++ b/lib/millstone.js @@ -268,7 +268,7 @@ function resolve(options, callback) { var uri = url.parse(s); // URL, download. - if (uri.protocol) { + if (uri.protocol && (uri.protocol == 'http:' || uri.protocol == 'https:')) { return (new get(s)).asBuffer(function(err, data) { if (err) return next(err); @@ -351,7 +351,7 @@ function resolve(options, callback) { }; // URL. - if (uri.protocol) { + if (uri.protocol && (uri.protocol == 'http:' || uri.protocol == 'https:')) { var filepath = path.join(cache, cachepath(l.Datasource.file)); localize(uri.href, filepath, function(err, file) { if (err) return next(err);
fix required for windows to avoid downloading files that have a protocol of 'c:\'
tilemill-project_millstone
train
js
800f82911d1f4b572bc7f7d7090207979fa8a543
diff --git a/blockstack/lib/config.py b/blockstack/lib/config.py index <HASH>..<HASH> 100644 --- a/blockstack/lib/config.py +++ b/blockstack/lib/config.py @@ -141,7 +141,7 @@ RPC_DEFAULT_TIMEOUT = 30 # in secs RPC_MAX_ZONEFILE_LEN = 40960 # 40KB RPC_MAX_INDEXING_DELAY = 2 * 3600 # 2 hours; maximum amount of time before the absence of new blocks causes the node to stop responding -MAX_RPC_LEN = RPC_MAX_ZONEFILE_LEN * 10 # maximum blockstackd RPC length +MAX_RPC_LEN = RPC_MAX_ZONEFILE_LEN * 250 # maximum blockstackd RPC length == 100 zone files, base64-encoded (assume 1.33x overhead for encoding, plus extra XML) if os.environ.get("BLOCKSTACK_TEST_MAX_RPC_LEN"): MAX_RPC_LEN = int(os.environ.get("BLOCKSTACK_TEST_MAX_RPC_LEN")) print("Overriding MAX_RPC_LEN to {}".format(MAX_RPC_LEN))
make the max RPC length equal to the expected amount of space <I> fully-loaded zone files take when encoded
blockstack_blockstack-core
train
py
da23282a630547b81f295eb3565dbc712a2c6b82
diff --git a/src/com/mebigfatguy/fbcontrib/detect/WriteOnlyCollection.java b/src/com/mebigfatguy/fbcontrib/detect/WriteOnlyCollection.java index <HASH>..<HASH> 100755 --- a/src/com/mebigfatguy/fbcontrib/detect/WriteOnlyCollection.java +++ b/src/com/mebigfatguy/fbcontrib/detect/WriteOnlyCollection.java @@ -28,6 +28,7 @@ import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Queue; import java.util.Set; import java.util.SortedMap; import java.util.SortedSet; @@ -70,6 +71,7 @@ public class WriteOnlyCollection extends BytecodeScanningDetector { collectionClasses.add(Vector.class.getName()); collectionClasses.add(ArrayList.class.getName()); collectionClasses.add(LinkedList.class.getName()); + collectionClasses.add(Queue.class.getName()); } private static Set<String> writeMethods = new HashSet<String>();
Added java.util.Queue target to WriteOnlyCollection Detector.
mebigfatguy_fb-contrib
train
java
2b6acad9f063a93c58d0ab344153ca6ffc911c86
diff --git a/src/js/pouch.js b/src/js/pouch.js index <HASH>..<HASH> 100644 --- a/src/js/pouch.js +++ b/src/js/pouch.js @@ -11,16 +11,13 @@ var expressPouchdb = require("express-pouchdb"); gpii.pouch.init = function (that) { var MemPouchDB = PouchDB.defaults({db: memdown }); - if (that.options.databases && Object.keys(that.options.databases).length > 0) { - Object.keys(that.options.databases).forEach(function (key) { - var dbConfig = that.options.databases[key]; - var db = new MemPouchDB(key); - if (dbConfig.data) { - var data = require(dbConfig.data); - db.bulkDocs(data); - } - }); - } + fluid.each(that.options.databases, function(dbConfig, key) { + var db = new MemPouchDB(key); + if (dbConfig.data) { + var data = require(dbConfig.data); + db.bulkDocs(data); + } + }); that.expressPouchdb = expressPouchdb(MemPouchDB);
GPII-<I>: Simplified database import code based on feedback from pull request review.
GPII_gpii-pouchdb
train
js
f3fd50899595dced35527d37430f3e1710125bf2
diff --git a/extension/fop-pdf/integrationTest/fopTest.js b/extension/fop-pdf/integrationTest/fopTest.js index <HASH>..<HASH> 100644 --- a/extension/fop-pdf/integrationTest/fopTest.js +++ b/extension/fop-pdf/integrationTest/fopTest.js @@ -7,7 +7,7 @@ var assert = require("assert"), describeReporting = require("../../../test/helpers.js").describeReporting; -describeReporting(path.join(__dirname, "../../"), [], function(reporter) { +describeReporting(path.join(__dirname, "../../"), ["html", "fop-pdf"], function(reporter) { describe('fop pdf', function () { it('should be rendered', function(done) {
usage of nedb in tests: grunt file refactoring, tests refactoring; excel-parser extension replaced dataParser.js
jsreport_jsreport-fop-pdf
train
js
42a81320b287ddf1162b54b3523f16988d5da042
diff --git a/test/setup/pretest.js b/test/setup/pretest.js index <HASH>..<HASH> 100644 --- a/test/setup/pretest.js +++ b/test/setup/pretest.js @@ -15,4 +15,8 @@ wrench.copyDirSyncRecursive(C.TEST_BUNDLE_SRC_PATH, C.BUNDLE_DIR, { forceDelete: fs.writeFileSync(C.BUNDLE_CFG_PATH, JSON.stringify({ test: 'the_test_string' })); // Delete any existing persisted replicants for the test bundle -wrench.rmdirSyncRecursive(path.resolve(__dirname, '../../db/replicants/test-bundle')); +var replicantDir = path.resolve(__dirname, '../../db/replicants/test-bundle'); +if (fs.existsSync(replicantDir)) { + wrench.rmdirSyncRecursive(replicantDir); +} +
[tests] Prevent error when test-bundle replicant dir doesn't exist
nodecg_nodecg
train
js
b56ff0f8d4f0074141c7ee9bc42c2f7916b9f9e3
diff --git a/src/Handler/GuzzleV5/GuzzleHandler.php b/src/Handler/GuzzleV5/GuzzleHandler.php index <HASH>..<HASH> 100644 --- a/src/Handler/GuzzleV5/GuzzleHandler.php +++ b/src/Handler/GuzzleV5/GuzzleHandler.php @@ -28,6 +28,7 @@ class GuzzleHandler private static $validOptions = [ 'proxy' => true, 'expect' => true, + 'cert' => true, 'verify' => true, 'timeout' => true, 'debug' => true,
whitelist cert http option on GuzzleV5 (#<I>)
aws_aws-sdk-php
train
php
ea11a43f686d6dd6f1296b4c4ee8f49b6317113b
diff --git a/zipline/finance/slippage.py b/zipline/finance/slippage.py index <HASH>..<HASH> 100644 --- a/zipline/finance/slippage.py +++ b/zipline/finance/slippage.py @@ -103,7 +103,6 @@ class VolumeShareSlippage(object): total_order = 0 simulated_amount = 0 simulated_impact = 0.0 - direction = 1.0 for order in current_orders:
MAINT: Removes unneeded assignment in slippage. `direction` is set on each iteration of the loop, making the initial assignment unneeded.
quantopian_zipline
train
py
67278c0f156de168ab2e7df29fe504fad27ca5d4
diff --git a/src/DebugConsole/DebugConsole.php b/src/DebugConsole/DebugConsole.php index <HASH>..<HASH> 100644 --- a/src/DebugConsole/DebugConsole.php +++ b/src/DebugConsole/DebugConsole.php @@ -218,9 +218,12 @@ namespace PhpKit\WebConsole\DebugConsole { * \PhpKit\WebConsole\DebugConsole\DebugConsole::trace (); * * @return string + * @throws Exception */ public static function trace () { + if (!extension_loaded('xdebug')) + throw new Exception ("<kbd>trace()</kbd> requires Xdebug to be installed."); $v = ini_get ('xdebug.collect_params'); ob_start (); ini_set ('xdebug.collect_params', 1);
Error message: "trace() requires Xdebug to be installed"
php-kit_php-web-console
train
php
9fac2c04679042ffc84ee74fce2516497f965419
diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js index <HASH>..<HASH> 100644 --- a/docs/assets/js/application.js +++ b/docs/assets/js/application.js @@ -9,7 +9,7 @@ var $window = $(window) // Disable certain links in docs - $('section [href^=#]').click(function (e) { + $('[href=#]').click(function (e) { e.preventDefault() })
Update docs JS to prevent clicks on links with hash hrefs
twbs_bootstrap
train
js
11306877dc9db13c57be9b41defc38566a8081cd
diff --git a/src/lib/server.js b/src/lib/server.js index <HASH>..<HASH> 100644 --- a/src/lib/server.js +++ b/src/lib/server.js @@ -141,6 +141,15 @@ export default class Server extends EventEmitter }) if (!this.namespaces[ns]) this._generateNamespace(ns) + else + { + const index = this.namespaces[ns].events[name] + + if (index !== undefined) + { + throw new Error(`Already registered event ${ns}${name}`) + } + } this.namespaces[ns].events[name] = [] @@ -153,10 +162,14 @@ export default class Server extends EventEmitter for (const socket_id of this.namespaces[ns].events[name]) { - this.namespaces[ns].clients.get(socket_id).send(CircularJSON.stringify({ - notification: name, - params: params || null - })) + const socket = this.namespaces[ns].clients.get(socket_id) + if (socket) + { + socket.send(CircularJSON.stringify({ + notification: name, + params: params || null + })) + } } }) }
Prevent multiple event registration and prevent crash after disonnection
elpheria_rpc-websockets
train
js
fcfcb90876b28ea2f8be6aba465c3b6c2b78c442
diff --git a/lib/sigh/developer_center.rb b/lib/sigh/developer_center.rb index <HASH>..<HASH> 100644 --- a/lib/sigh/developer_center.rb +++ b/lib/sigh/developer_center.rb @@ -51,7 +51,7 @@ module Sigh certs = post_ajax(@list_certs_url) - profile_name = Sigh.config[:provisioning_file_name] + profile_name = Sigh.config[:provisioning_name] Helper.log.info "Checking if profile is available. (#{certs['provisioningProfiles'].count} profiles found)" required_cert_types = (@type == DEVELOPMENT ? ['iOS Development'] : ['iOS Distribution', 'iOS UniversalDistribution'])
Fix name change in profile name config
fastlane_fastlane
train
rb
82651fc015bddfc9178fab6246a212cb5ee055c9
diff --git a/projects/samskivert/src/java/com/samskivert/servlet/user/UserManager.java b/projects/samskivert/src/java/com/samskivert/servlet/user/UserManager.java index <HASH>..<HASH> 100644 --- a/projects/samskivert/src/java/com/samskivert/servlet/user/UserManager.java +++ b/projects/samskivert/src/java/com/samskivert/servlet/user/UserManager.java @@ -1,5 +1,5 @@ // -// $Id: UserManager.java,v 1.23 2003/10/14 02:00:01 mdb Exp $ +// $Id: UserManager.java,v 1.24 2003/10/14 02:37:53 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -273,6 +273,13 @@ public class UserManager c.setMaxAge(0); CookieUtil.widenDomain(req, c); rsp.addCookie(c); + + // we need an unwidened one to ensure that old-style cookies are + // wiped as well + c = new Cookie(USERAUTH_COOKIE, "x"); + c.setPath("/"); + c.setMaxAge(0); + rsp.addCookie(c); } /** The user repository. */
Blow away both kinds of cookie when logging out. I'm not sure if this will do anything because these are sort of the same cookie except the domain is different. git-svn-id: <URL>
samskivert_samskivert
train
java
0aeee923ff98118dd919070d3e8684f8301145ea
diff --git a/tests/CheckMKTagsTest.php b/tests/CheckMKTagsTest.php index <HASH>..<HASH> 100644 --- a/tests/CheckMKTagsTest.php +++ b/tests/CheckMKTagsTest.php @@ -55,7 +55,7 @@ class CheckMKTagsTest extends BaseTest { $objectID = $this->createServer(); $this->cmdbCategory->create( $objectID, - 'C__CATG__CMK_TAG', + 'C__CATG__CMK2_TAG', [ 'description' => $this->generateDescription() ] @@ -123,7 +123,7 @@ class CheckMKTagsTest extends BaseTest { $this->cmdbCategory->create( $objectID, - 'C__CATG__CMK_TAG', + 'C__CATG__CMK2_TAG', [ 'description' => $this->generateDescription() ]
Re-name constant of category "Check_MK Tags"
bheisig_i-doit-api-client-php
train
php
beb32b387e38e7941b9505f1e3273b3a10fa0415
diff --git a/dvc/repo/unprotect.py b/dvc/repo/unprotect.py index <HASH>..<HASH> 100644 --- a/dvc/repo/unprotect.py +++ b/dvc/repo/unprotect.py @@ -13,13 +13,16 @@ from dvc.exceptions import DvcException def _unprotect_file(path): if System.is_symlink(path) or System.is_hardlink(path): logger.debug("Unprotecting '{}'".format(path)) - tmp = os.path.join(os.path.dirname(path), "." + str(uuid.uuid4())) - move(path, tmp) - copyfile(tmp, path) + # The operations order is important here - if some application would + # access the file during the process of copyfile then it would get + # only the part of file. So, at first, the file should be copied with + # the temporary name, and then original file should be replaced by new. + copyfile(path, tmp) + remove(path) + move(tmp, path) - remove(tmp) else: logger.debug( "Skipping copying for '{}', since it is not "
unprotect: copy should preceed the move It is better to make a file copy before moving it, since move is a nearly-atomic operation and copy is a long one. Also the biggest problem here is that if some application would access the file during the process of `copyfile` then it would get the part of file.
iterative_dvc
train
py
4718fdcff9fa95dada130bc9f64ea8aeacb7f3fc
diff --git a/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/GuavaCacheMetrics.java b/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/GuavaCacheMetrics.java index <HASH>..<HASH> 100644 --- a/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/GuavaCacheMetrics.java +++ b/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/GuavaCacheMetrics.java @@ -54,7 +54,7 @@ public class GuavaCacheMetrics implements MeterBinder { * @see com.google.common.cache.CacheStats */ public static <C extends Cache> C monitor(MeterRegistry registry, C cache, String name, Iterable<Tag> tags) { - new GuavaCacheMetrics(cache, tags, name).bindTo(registry); + new GuavaCacheMetrics(cache, name, tags).bindTo(registry); return cache; } @@ -62,7 +62,7 @@ public class GuavaCacheMetrics implements MeterBinder { private final Iterable<Tag> tags; private final Cache<?, ?> cache; - public GuavaCacheMetrics(Cache<?, ?> cache, Iterable<Tag> tags, String name) { + public GuavaCacheMetrics(Cache<?, ?> cache, String name, Iterable<Tag> tags) { this.name = name; this.tags = tags; this.cache = cache;
Consistent constructor ordering for GuavaCacheMetrics (fixes #<I>)
micrometer-metrics_micrometer
train
java
2e6fd4f9615f7638b27424396d7ab409bea1b12c
diff --git a/src/sap.m/src/sap/m/FacetFilter.js b/src/sap.m/src/sap/m/FacetFilter.js index <HASH>..<HASH> 100644 --- a/src/sap.m/src/sap/m/FacetFilter.js +++ b/src/sap.m/src/sap/m/FacetFilter.js @@ -1068,14 +1068,14 @@ sap.ui.define(['jquery.sap.global', './NavContainer', './library', 'sap/ui/core/ that._selectedFacetItem.invalidate(); //keyboard acc - focus on the original 1st page item oToPage.invalidate(); - if (this.getPages().length >= 1 && focusIndex >= 0) { +/* if (this.getPages().length >= 1) { var focusIndex = this.getPages()[0].getContent()[0].aDelegates[0].oDelegate.getFocusedIndex(); if (focusIndex >= 0) { jQuery.sap.delayedCall(100, this, function() { jQuery.sap.focus(this.getPages()[0].getContent()[0].getItems()[focusIndex]); }); } - } + } */ that._selectedFacetItem = null; } });
[FIX] FacetFilter: Modified keyboard interaction - Modified the keyboard interaction Change-Id: Ie1d<I>b<I>a<I>bf<I>e<I>b<I>ccebd
SAP_openui5
train
js
022068a23230dd13d8e99852f47eaaf461cf8174
diff --git a/tests/lib/toolkit/XMLDocumentTest.php b/tests/lib/toolkit/XMLDocumentTest.php index <HASH>..<HASH> 100644 --- a/tests/lib/toolkit/XMLDocumentTest.php +++ b/tests/lib/toolkit/XMLDocumentTest.php @@ -22,6 +22,20 @@ final class XMLDocumentTest extends TestCase $this->assertEquals('<xml />', $x->generate()); } + public function testSetVersion() + { + $x = (new \XMLDocument('xml'))->setVersion('test')->renderHeader(); + $this->assertEquals('test', $x->getVersion()); + $this->assertEquals('<?xml version="test" encoding="utf-8" ?><xml />', $x->generate()); + } + + public function testSetEncoding() + { + $x = (new \XMLDocument('xml'))->setEncoding('test')->renderHeader(); + $this->assertEquals('test', $x->getEncoding()); + $this->assertEquals('<?xml version="1.0" encoding="test" ?><xml />', $x->generate()); + } + public function testGenerateWithHeader() { $x = (new \XMLDocument('xml', 'value'));
Add setVersion() and setEncoding() tests Picked from <I>d<I>cad Picked from 0c3ce<I>b<I>
symphonycms_symphony-2
train
php
9ee4c8daae3c8837daabd6060e5f76ebb544935c
diff --git a/test/tc_tc.rb b/test/tc_tc.rb index <HASH>..<HASH> 100644 --- a/test/tc_tc.rb +++ b/test/tc_tc.rb @@ -121,6 +121,22 @@ class TestTc < Test::Unit::TestCase assert_equal(3, @t.t1.length) end + def test_truncate + @t.in_buf << ['1', '2', '3', '4'] + @t.in_buf << ['1', '3', '3', '4'] + assert_nothing_raised(RuntimeError) {@t.tick} + assert_equal(2, @t.t1.length) + + @t.close_tables + @t = make_bud(true) + + assert_equal(0, @t.t1.length) + @t.in_buf << ['1', '2', '3', '4'] + @t.in_buf << ['1', '3', '3', '4'] + assert_nothing_raised(RuntimeError) {@t.tick} + assert_equal(2, @t.t1.length) + end + def test_persist @t.in_buf << [1, 2, 3, 4] @t.in_buf << [5, 10, 3, 4]
Add a test case for tc_truncate behavior in tctables.
bloom-lang_bud
train
rb
fce93f5fed1aef638c7443bb6e0651617ba02c3d
diff --git a/project/library/CM/Bootloader.php b/project/library/CM/Bootloader.php index <HASH>..<HASH> 100644 --- a/project/library/CM/Bootloader.php +++ b/project/library/CM/Bootloader.php @@ -7,10 +7,6 @@ class CM_Bootloader { mb_internal_encoding('UTF-8'); } - public function session() { - CM_Session::getInstance(); - } - public function autoloader() { spl_autoload_register(function($className) { $path = DIR_ROOT . 'library/' . str_replace('_', '/', $className) . '.php';
Session refactoring; replaced calls to CM_Session::getInstance with CM_Request::getSession where possible; removed usages of $_SESSION
cargomedia_cm
train
php
ab1de96fcbd53f00c97c73fe1415f640451bbbcb
diff --git a/tests/Composer/Test/Command/DiagnoseCommandTest.php b/tests/Composer/Test/Command/DiagnoseCommandTest.php index <HASH>..<HASH> 100644 --- a/tests/Composer/Test/Command/DiagnoseCommandTest.php +++ b/tests/Composer/Test/Command/DiagnoseCommandTest.php @@ -32,8 +32,7 @@ class DiagnoseCommandTest extends TestCase $this->assertStringContainsString('Checking git settings: OK Checking http connectivity to packagist: OK Checking https connectivity to packagist: OK -Checking github.com rate limit: OK -Checking disk free space: ', $output); +Checking github.com rate limit: ', $output); } public function testCmdSuccess(): void @@ -51,7 +50,6 @@ Checking disk free space: ', $output); $this->assertStringContainsString('Checking git settings: OK Checking http connectivity to packagist: OK Checking https connectivity to packagist: OK -Checking github.com rate limit: OK -Checking disk free space: ', $output); +Checking github.com rate limit: ', $output); } }
Do not verify rate limit OK as part of test as these might randomly fail
composer_composer
train
php
18183e19e10acfe3657b772eebaf519631dba1b2
diff --git a/src/Traits/SluggableModelTrait.php b/src/Traits/SluggableModelTrait.php index <HASH>..<HASH> 100644 --- a/src/Traits/SluggableModelTrait.php +++ b/src/Traits/SluggableModelTrait.php @@ -25,7 +25,7 @@ trait SluggableModelTrait { $value = preg_replace('/[^a-zA-Z0-9\-\_]+/', '-', $value); - return strtolower($value); + return str_replace(['--', '__'], ['-', '_'], trim(strtolower($value), '-_')); } /**
Fix trailing and leading hyphens. Fix double hyphens and dashes.
esensi_model
train
php
74fd3e72e17f38602a8f8dfb64ffebeda665cf2f
diff --git a/lib/add-cli-config-to-app.js b/lib/add-cli-config-to-app.js index <HASH>..<HASH> 100644 --- a/lib/add-cli-config-to-app.js +++ b/lib/add-cli-config-to-app.js @@ -1,7 +1,7 @@ var path = require('path'); var fs = require('fs'); var rc = require('rc'); -var userHome = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE; +var userHome = (process.platform === "win32" ? process.env.USERPROFILE : process.env.HOME ); var configFilePath = path.join(userHome, '.sqlpadrc'); module.exports = function (app) {
get user home path like rc
rickbergfalk_sqlpad
train
js
fe4eb5dd2ad2039c48e9b6c31e5966416fa01ab0
diff --git a/src/Security/Group.php b/src/Security/Group.php index <HASH>..<HASH> 100755 --- a/src/Security/Group.php +++ b/src/Security/Group.php @@ -111,7 +111,7 @@ class Group extends DataObject $list = Group::get()->exclude('ID', $this->ID); $groups = ArrayList::create(); foreach ($list as $group) { - $groups->push(['ID' => $group->ID, 'Title' => Convert::xml2raw($group->Breadcrumbs)]); + $groups->push(['ID' => $group->ID, 'Title' => $group->getBreadcrumbs(' » ')]); } return $groups; }
Update src/Security/Group.php
silverstripe_silverstripe-framework
train
php
a289430570bac4b7813401fa7e519c804d06bf81
diff --git a/go/kbfs/libfs/profilelist.go b/go/kbfs/libfs/profilelist.go index <HASH>..<HASH> 100644 --- a/go/kbfs/libfs/profilelist.go +++ b/go/kbfs/libfs/profilelist.go @@ -179,10 +179,10 @@ func (pfs ProfileFS) openTimedProfile( // TODO: Blocking here until the profile is done is // weird. Blocking on read is better. // - // TODO: Maybe keep around a special last_profile file to be - // able to start capturing a profile and then interrupt when - // done, which would also be useful in general, since you be - // able to save a profile even if you open it up with a tool. + // TODO: Maybe keep around a special last_profile file to be able + // to start capturing a profile and then interrupt when done, + // which would also be useful in general, since you'd be able to + // save a profile even if you open it up with a tool. var buf bytes.Buffer err = prof.Start(&buf) if err != nil {
libfs: fix profilelist comment typo Suggested by songgao. Issue: #<I>
keybase_client
train
go
0a58f1b2dd485d92399d31ad6644e2d794889712
diff --git a/lib/disney/index.js b/lib/disney/index.js index <HASH>..<HASH> 100644 --- a/lib/disney/index.js +++ b/lib/disney/index.js @@ -179,7 +179,7 @@ class WaltDisneyWorldPark extends Park { rideObject.WaitTime = ride.waitTime.postedWaitMinutes || -1; // set fastpass status - rideObject.FastPass = (ride.fastpass && ride.fastpass.available) ? true : false; + rideObject.FastPass = (ride.waitTime && ride.waitTime.fastpass && ride.waitTime.fastpass.available) ? true : false; } // run get operating times to inject ride times into this data
Fix Disney fastpass is nested in the waitTimes object
cubehouse_themeparks
train
js
2c59e50a1cd41a3cef8fd5a11adb0e4f6e6f3c5b
diff --git a/code/model/Blog.php b/code/model/Blog.php index <HASH>..<HASH> 100644 --- a/code/model/Blog.php +++ b/code/model/Blog.php @@ -962,7 +962,7 @@ class Blog_Controller extends Page_Controller { */ $dataRecord = $this->dataRecord; - $posts = new PaginatedList($this->blogPosts); + $posts = new PaginatedList($this->getBlogPosts()); if($this->PostsPerPage > 0) { $posts->setPageLength($this->PostsPerPage);
Bugfix: avoid feeding null to PaginatedList constructor
silverstripe_silverstripe-blog
train
php
2876c7ef18e3edb44c811249abab70394df74ad7
diff --git a/web/concrete/core/models/attribute/types/select.php b/web/concrete/core/models/attribute/types/select.php index <HASH>..<HASH> 100644 --- a/web/concrete/core/models/attribute/types/select.php +++ b/web/concrete/core/models/attribute/types/select.php @@ -2,9 +2,9 @@ class Concrete5_Controller_AttributeType_Select extends AttributeTypeController { - protected $akSelectAllowMultipleValues; - protected $akSelectAllowOtherValues; - protected $akSelectOptionDisplayOrder; + private $akSelectAllowMultipleValues; + private $akSelectAllowOtherValues; + private $akSelectOptionDisplayOrder; protected $searchIndexFieldDefinition = 'X NULL';
Revert Protected Properties in Select Attribute Revert protected properties in `SelectAttributeTypeController` Causes issues with code in the wild that attempts to carry over private properties Former-commit-id: bdefa9eb<I>ff<I>f3f<I>b9ea<I>ec0c<I>c<I>c
concrete5_concrete5
train
php
89c740271ddce7a4035d2f6d59ffee41e1ebbb16
diff --git a/PhpAmqpLib/Connection/AMQPSSLConnection.php b/PhpAmqpLib/Connection/AMQPSSLConnection.php index <HASH>..<HASH> 100644 --- a/PhpAmqpLib/Connection/AMQPSSLConnection.php +++ b/PhpAmqpLib/Connection/AMQPSSLConnection.php @@ -23,9 +23,6 @@ class AMQPSSLConnection extends AMQPStreamConnection $options = array(), $ssl_protocol = 'ssl' ) { - if (!isset($ssl_options['SNI_enabled'])) { - $ssl_options['SNI_enabled'] = true; - } $ssl_context = empty($ssl_options) ? null : $this->create_ssl_context($ssl_options); parent::__construct( $host,
revert #<I> 'Enable TLS SNI by default'
php-amqplib_php-amqplib
train
php
4c534433aa018cbeed27f771d3fc4e5a8e8ede87
diff --git a/plugins/inputs/kafka_consumer/kafka_consumer_integration_test.go b/plugins/inputs/kafka_consumer/kafka_consumer_integration_test.go index <HASH>..<HASH> 100644 --- a/plugins/inputs/kafka_consumer/kafka_consumer_integration_test.go +++ b/plugins/inputs/kafka_consumer/kafka_consumer_integration_test.go @@ -17,6 +17,7 @@ func TestReadsMetricsFromKafka(t *testing.T) { if testing.Short() { t.Skip("Skipping integration test in short mode") } + t.Skip("Skipping test due to circleci issue; ref #2487") brokerPeers := []string{testutil.GetLocalHost() + ":9092"} testTopic := fmt.Sprintf("telegraf_test_topic_%d", time.Now().Unix())
Skip kafka_consumer_integration_test due to issue on CircleCI
influxdata_telegraf
train
go
d3deb3f4c754eaed61e1438fd688eddde6da50ef
diff --git a/store.go b/store.go index <HASH>..<HASH> 100644 --- a/store.go +++ b/store.go @@ -129,10 +129,10 @@ func buildPlatformPath(path string) string { if xdg := os.Getenv("XDG_CONFIG_HOME"); xdg != "" { unixConfigDir = xdg } else { - unixConfigDir = os.Getenv("HOME") + unixConfigDir = os.Getenv("HOME") + "/.config" } - return fmt.Sprintf("%s/.config/%s/%s", unixConfigDir, + return fmt.Sprintf("%s/%s/%s", unixConfigDir, applicationName, path) }
Fixing a prefix typo from previous commit
tucnak_store
train
go
15ccd493da6678d2eb6aefaadc7dbaa48c0d9dd1
diff --git a/lib/mite-rb.rb b/lib/mite-rb.rb index <HASH>..<HASH> 100644 --- a/lib/mite-rb.rb +++ b/lib/mite-rb.rb @@ -1,5 +1,6 @@ require 'active_support' require 'active_resource' +require 'mite/version.rb' # The official ruby library for interacting with the RESTful API of mite, # a sleek time tracking webapp.
Fixed version issue (Issue #1)
yolk_mite-rb
train
rb
c5d700775de74f7db990e385f05b376b542d76a2
diff --git a/src/Migrator.php b/src/Migrator.php index <HASH>..<HASH> 100644 --- a/src/Migrator.php +++ b/src/Migrator.php @@ -42,6 +42,20 @@ class Migrator } /** + * Load migrations from the specified directory. + * + * @param string $directory + */ + public function loadMigrations($directory) + { + foreach (scandir($directory) as $file) { + if ($file !== '.' && $file !== '..') { + require "{$directory}/{$file}"; + } + } + } + + /** * Handles the execution of migrations. * * @param string $direction
Add method to load migrations from a directory.
avalonphp_database-migrations
train
php
7228f7689110276aa6eda2a34740ca25283c660b
diff --git a/lxd/db/certificates.go b/lxd/db/certificates.go index <HASH>..<HASH> 100644 --- a/lxd/db/certificates.go +++ b/lxd/db/certificates.go @@ -162,7 +162,7 @@ func (c *Cluster) CreateCertificate(cert Certificate) (int64, error) { // DeleteCertificate deletes a certificate from the db. func (c *Cluster) DeleteCertificate(fingerprint string) error { err := c.Transaction(func(tx *ClusterTx) error { - return tx.DeleteCertificate(fingerprint) + return tx.DeleteCertificate(CertificateFilter{Fingerprint: fingerprint}) }) return err }
lxd/db/certificates: use Filter as parameter for delete
lxc_lxd
train
go
f0b7e81468f7b67ae5b8571881c081388eb0fc6b
diff --git a/message.go b/message.go index <HASH>..<HASH> 100644 --- a/message.go +++ b/message.go @@ -288,13 +288,14 @@ type MessageAllowedMentions struct { // A MessageAttachment stores data for message attachments. type MessageAttachment struct { - ID string `json:"id"` - URL string `json:"url"` - ProxyURL string `json:"proxy_url"` - Filename string `json:"filename"` - Width int `json:"width"` - Height int `json:"height"` - Size int `json:"size"` + ID string `json:"id"` + URL string `json:"url"` + ProxyURL string `json:"proxy_url"` + Filename string `json:"filename"` + Width int `json:"width"` + Height int `json:"height"` + Size int `json:"size"` + Ephemeral bool `json:"ephemeral"` } // MessageEmbedFooter is a part of a MessageEmbed struct.
feat: ephemeral attachments (#<I>)
bwmarrin_discordgo
train
go
2aadbb9135fdffd98e15d1c836eaf507c3031bf2
diff --git a/src/main/resources/META-INF/resources/primefaces/core/core.js b/src/main/resources/META-INF/resources/primefaces/core/core.js index <HASH>..<HASH> 100644 --- a/src/main/resources/META-INF/resources/primefaces/core/core.js +++ b/src/main/resources/META-INF/resources/primefaces/core/core.js @@ -307,9 +307,9 @@ //aria if(input.is(':not([type="password"])')) { input.attr('role', 'textbox') - .attr('aria-disabled', input.is(':disabled')) .attr('aria-readonly', input.prop('readonly')); } + input.attr('aria-disabled', input.is(':disabled')); if(input.is('textarea')) { input.attr('aria-multiline', true);
Fix #<I>: Remove ARIA from password
primefaces_primefaces
train
js
6be009c47fab446d6f2c6f82e73bb6f9dc503233
diff --git a/generator/lib/builder/om/PHP5ObjectBuilder.php b/generator/lib/builder/om/PHP5ObjectBuilder.php index <HASH>..<HASH> 100644 --- a/generator/lib/builder/om/PHP5ObjectBuilder.php +++ b/generator/lib/builder/om/PHP5ObjectBuilder.php @@ -3254,7 +3254,7 @@ abstract class ".$this->getClassname()." extends ".$parentClass." "; * @return $className The associated $className object. * @throws PropelException */ - public function get".$this->getFKPhpNameAffix($fk, $plural = false)."(PropelPDO \$con = null, \$doQuery) + public function get".$this->getFKPhpNameAffix($fk, $plural = false)."(PropelPDO \$con = null, \$doQuery = true) {"; $script .= " if (\$this->$varName === null && ($conditional) && \$doQuery) {";
Added the missing default from patching
propelorm_Propel
train
php
1263ac1093bee97aef1d6b2baef2366c6200bd20
diff --git a/lib/buffer.js b/lib/buffer.js index <HASH>..<HASH> 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -6,11 +6,12 @@ module.exports = { /** - * [indexOf description] + * Returns the index of the first occurrence of the specified byte sequence, + * returns -1 if the value is not found. * - * @param {[type]} needle [description] - * @param {[type]} haystack [description] - * @return {[type]} [description] + * @param {[type]} needle + * @param {[type]} haystack + * @return {[type]} */ indexOf: function( needle, haystack ) { @@ -39,11 +40,12 @@ module.exports = { }, /** - * [split description] + * Splits a Buffer object into an array of buffers + * by separating the Buffer into subbuffers. * - * @param {[type]} needle [description] - * @param {[type]} haystack [description] - * @return {[type]} [description] + * @param {[type]} needle + * @param {[type]} haystack + * @return {[type]} */ split: function( needle, haystack ) {
Updated doc blocks in lib/buffer.js
jhermsmeier_node-envelope
train
js
de9f66b44806cbd6f2f9c56436e1aecbfcf9cc5c
diff --git a/salt/states/file.py b/salt/states/file.py index <HASH>..<HASH> 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -3672,10 +3672,11 @@ def blockreplace( if changes: ret['pchanges'] = {'diff': changes} if __opts__['test']: + ret['changes']['diff'] = ret['pchanges']['diff'] ret['result'] = None ret['comment'] = 'Changes would be made' else: - ret['changes'] = {'diff': changes} + ret['changes']['diff'] = ret['pchanges']['diff'] ret['result'] = True ret['comment'] = 'Changes were made' else:
show chanages in file.blockreplace function in testing mode. also used same programming style as in file.managed function: (ret['changes']['diff'] = ret['pchanges']['diff'])
saltstack_salt
train
py
280c7685471846c3ad9b890ebe5d92bf8da06c4d
diff --git a/plexapi/gdm.py b/plexapi/gdm.py index <HASH>..<HASH> 100644 --- a/plexapi/gdm.py +++ b/plexapi/gdm.py @@ -59,7 +59,7 @@ class GDM: 'Resource-Identifier': '646ab0aa8a01c543e94ba975f6fd6efadc36b7', 'Updated-At': '1585769946', 'Version': '1.18.8.2527-740d4c206', - }, + }, 'from': ('10.10.10.100', 32414)}] Clients: @@ -74,7 +74,7 @@ class GDM: 'Protocol-Version': '1', 'Resource-Identifier': 'b6e57a3f-e0f8-494f-8884-f4b58501467e', 'Version': '1.1.0', - }, + }, 'from': ('10.10.10.101', 32412)}] """
Update gdm.py
pkkid_python-plexapi
train
py
39b6542a446fe40754aed2f7ec8dc08dc1fd7d90
diff --git a/fabfile.py b/fabfile.py index <HASH>..<HASH> 100644 --- a/fabfile.py +++ b/fabfile.py @@ -52,6 +52,7 @@ def check(): @task def test_backend(backend, domain, config_path=''): username1 = 'example' + jid1 = '%s@%s' % (username1, domain) password1 = 'foobar' password2 = 'barfoo' @@ -79,8 +80,9 @@ def test_backend(backend, domain, config_path=''): try: ret = backend.get_last_activity(username1, domain) error('get_last_activity did not raise UserNotFound: %s' % ret) - except UserNotFound: - pass + except UserNotFound as e: + if str(e) != jid1: + error('UserNotFound from get_last_activity did not match "%s": "%s"' % (jid1, str(e))) try: backend.set_password(username1, domain, password1) error('set_password() did not raise UserNotFound.')
test str representation from UserNotFound
mathiasertl_xmpp-backends
train
py
aee0cff5894b55d394a4c372a4b570b0b8768813
diff --git a/app/bootstrap.php b/app/bootstrap.php index <HASH>..<HASH> 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -1,9 +1,9 @@ <?php if (!defined( 'BOLT_PROJECT_ROOT_DIR')) { - if (substr(__DIR__, -28) == '/vendor/bolt/bolt/app') { // installed bolt with composer + if (substr(__DIR__, -21) == '/vendor/bolt/bolt/app') { // installed bolt with composer define('BOLT_COMPOSER_INSTALLED', true); - define('BOLT_PROJECT_ROOT_DIR', substr(__DIR__, 0, -28)); + define('BOLT_PROJECT_ROOT_DIR', substr(__DIR__, 0, -21)); define('BOLT_WEB_DIR', BOLT_PROJECT_ROOT_DIR.'/web'); define('BOLT_CONFIG_DIR', BOLT_PROJECT_ROOT_DIR.'/config'); } else {
Fix substr with shorter name now
bolt_bolt
train
php
a6e27df78c0788face7f8a2b22a6331937962928
diff --git a/benchmark/virtual_machine.rb b/benchmark/virtual_machine.rb index <HASH>..<HASH> 100644 --- a/benchmark/virtual_machine.rb +++ b/benchmark/virtual_machine.rb @@ -1,4 +1,4 @@ -# This benchmarks 500 runs of the VM and outputs them to the console making it +# This benchmarks N runs of the VM and outputs them to the console making it # easy to pass the data to tools such as `ministat` # (http://www.freebsd.org/cgi/man.cgi?ministat).
Corrected the docs of the VM benchmark.
YorickPeterse_ruby-lint
train
rb
6673265cd81f262026c47caab3e51e5abfcba0ac
diff --git a/packages/gestalt-datepicker/rollup.config.js b/packages/gestalt-datepicker/rollup.config.js index <HASH>..<HASH> 100644 --- a/packages/gestalt-datepicker/rollup.config.js +++ b/packages/gestalt-datepicker/rollup.config.js @@ -33,7 +33,7 @@ const rollupConfig = { sourcemap: 'inline', }, ], - external: ['react', 'classnames/bind', 'classnames', 'react-dom', 'react-datepicker'], + external: ['react', 'classnames/bind', 'classnames', 'react-dom', 'react-datepicker', 'gestalt'], plugins: plugins('gestalt-datepicker'), };
Internal: add "gestalt" as external dependency for "gestalt-datepicker" (#<I>)
pinterest_gestalt
train
js
a941051340dde5630ff06d9c01a9784792383cef
diff --git a/lattice_mc/atom.py b/lattice_mc/atom.py index <HASH>..<HASH> 100644 --- a/lattice_mc/atom.py +++ b/lattice_mc/atom.py @@ -57,6 +57,9 @@ class Atom: @property def site( self ): + """ + Get or set `self.site` for this `Atom`. + """ return self._site @site.setter
Added docstring to Atom.site
bjmorgan_lattice_mc
train
py
0636d6eccacd05dbe29777aca99c3f9bef85083a
diff --git a/salt/states/eselect.py b/salt/states/eselect.py index <HASH>..<HASH> 100644 --- a/salt/states/eselect.py +++ b/salt/states/eselect.py @@ -45,6 +45,7 @@ def set_(name, target, parameter=None, module_parameter=None, action_parameter=N parameter additional params passed to the defined action + .. deprecated:: Lithium ''' diff --git a/salt/states/rabbitmq_vhost.py b/salt/states/rabbitmq_vhost.py index <HASH>..<HASH> 100644 --- a/salt/states/rabbitmq_vhost.py +++ b/salt/states/rabbitmq_vhost.py @@ -45,6 +45,7 @@ def present(name, VHost name user Initial user permission to set on the VHost, if present + .. deprecated:: Beryllium owner Initial owner permission to set on the VHost, if present @@ -58,6 +59,7 @@ def present(name, Defaults to .* runas Name of the user to run the command + .. deprecated:: Beryllium ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} @@ -154,6 +156,7 @@ def absent(name, Name of the Virtual Host to remove runas User to run the command + .. deprecated:: Beryllium ''' if runas:
Blank line before '.. deprecated::' required.
saltstack_salt
train
py,py
dd968fc2df6aebbd2c7dd51474ff0181666bb93a
diff --git a/apiserver/server_test.go b/apiserver/server_test.go index <HASH>..<HASH> 100644 --- a/apiserver/server_test.go +++ b/apiserver/server_test.go @@ -283,14 +283,7 @@ func dialWebsocket(c *gc.C, addr, path string, tlsVersion uint16) (*websocket.Co func (s *serverSuite) TestMinTLSVersion(c *gc.C) { loggo.GetLogger("juju.apiserver").SetLogLevel(loggo.TRACE) - listener, err := net.Listen("tcp", ":0") - c.Assert(err, jc.ErrorIsNil) - srv, err := apiserver.NewServer(s.State, listener, apiserver.ServerConfig{ - Cert: []byte(coretesting.ServerCert), - Key: []byte(coretesting.ServerKey), - Tag: names.NewMachineTag("0"), - }) - c.Assert(err, jc.ErrorIsNil) + srv := newServer(c, s.State) defer srv.Stop() // We have to use 'localhost' because that is what the TLS cert says.
apiserver: fix test to stop writing to source dir One of the tests was failing to override the log directory, and so was writing to the source dir.
juju_juju
train
go
fc746911ab8101c9eb3dff52f9d932c71a7f4191
diff --git a/inspire_dojson/hep/rules/bd5xx.py b/inspire_dojson/hep/rules/bd5xx.py index <HASH>..<HASH> 100644 --- a/inspire_dojson/hep/rules/bd5xx.py +++ b/inspire_dojson/hep/rules/bd5xx.py @@ -232,10 +232,10 @@ def license(self, key, value): return MATERIAL_MAP.get(value.get('3')) return { - 'license': _get_license(value), 'imposing': value.get('b'), - 'url': value.get('u'), + 'license': _get_license(value), 'material': _get_material(value), + 'url': value.get('u'), }
hep: refactor license
inspirehep_inspire-dojson
train
py
77344a2ad2a02605f441851fc1e7ee0ee35f4ba4
diff --git a/src/parsers/RuleSet.php b/src/parsers/RuleSet.php index <HASH>..<HASH> 100644 --- a/src/parsers/RuleSet.php +++ b/src/parsers/RuleSet.php @@ -49,12 +49,12 @@ class RuleSet extends PropertySet { * @return \csslib\Selector */ public static function parseSelector($text){ - $text = preg_replace('/(\>)\s+/is', '>', $text); + $text = preg_replace('/(\>|\+|~)\s+/is', '$1', $text); $selector = null; foreach(preg_split('/\s+/', $text, -1, PREG_SPLIT_NO_EMPTY) as $part){ - if(!preg_match('/^([\>\+~]?)([^ >]+)$/is', $part, $matches)) throw new \Exception("Invalid selector part '$part'"); + if(!preg_match('/^([\>\+~]?)([^ >\+~]+)$/is', $part, $matches)) throw new \Exception("Invalid selector part '$part'"); $selector = $selector ? $selector->add($matches[1] ? $matches[1] : false) : Selector::create();
Fix for parsing ~ and + sibling selectors
10usb_css-lib
train
php
0f591258678b0bc4562b16d5c5cc5a92b4a3c1aa
diff --git a/java/com/facebook/soloader/UnpackingSoSource.java b/java/com/facebook/soloader/UnpackingSoSource.java index <HASH>..<HASH> 100644 --- a/java/com/facebook/soloader/UnpackingSoSource.java +++ b/java/com/facebook/soloader/UnpackingSoSource.java @@ -42,6 +42,11 @@ public abstract class UnpackingSoSource extends DirectorySoSource { mContext = context; } + protected UnpackingSoSource(Context context, File storePath) { + super(storePath, RESOLVE_DEPENDENCIES); + mContext = context; + } + public static File getSoStorePath(Context context, String name) { return new File(context.getApplicationInfo().dataDir + "/" + name); }
allow specifying a directory when unpacking so files Summary: we want to ensure the native libraries are co-located with other module code for separability and easy cleanup Reviewed By: JamieEi Differential Revision: D<I> fbshipit-source-id: <I>bee<I>f9d<I>b3c<I>c2e<I>a0a4f0b5
facebook_SoLoader
train
java
3e3ebea3d97ec22a6a6162985fc80ac6c7749c6d
diff --git a/pandas/core/frame.py b/pandas/core/frame.py index <HASH>..<HASH> 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -4546,7 +4546,7 @@ class DataFrame(NDFrame): def all(self, axis=0, bool_only=None, skipna=True, level=None): """ - Return whether any element is True over requested axis. + Return whether all elements are True over requested axis. %(na_action)s Parameters
Fixed DataFrame.any() docstring Used to be the same as DataFrame.all
pandas-dev_pandas
train
py
19bda8af3db4c750a6a2df232546343c673fb305
diff --git a/app/js/controllers.js b/app/js/controllers.js index <HASH>..<HASH> 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -7,4 +7,4 @@ MyCtrl1.$inject = []; function MyCtrl2() { } -MyCtrl1.$inject = []; +MyCtrl2.$inject = [];
fix typo in controllers.js placeholder code
OnsenUI_OnsenUI
train
js
2621ee385abc8ef96385a0ca5c4684a46a935888
diff --git a/annis-gui/src/main/java/annis/gui/controlpanel/CorpusListPanel.java b/annis-gui/src/main/java/annis/gui/controlpanel/CorpusListPanel.java index <HASH>..<HASH> 100644 --- a/annis-gui/src/main/java/annis/gui/controlpanel/CorpusListPanel.java +++ b/annis-gui/src/main/java/annis/gui/controlpanel/CorpusListPanel.java @@ -75,7 +75,7 @@ import org.slf4j.LoggerFactory; * * @author thomas */ -public class CorpusListPanel extends CssLayout implements +public class CorpusListPanel extends VerticalLayout implements AbstractSelect.NewItemHandler, Action.Handler { @@ -282,6 +282,9 @@ public class CorpusListPanel extends CssLayout implements selectionLayout.setComponentAlignment(btReload, Alignment.MIDDLE_RIGHT); tblCorpora.setSortContainerPropertyId("name"); + + setExpandRatio(tblCorpora, 1.0f); + updateCorpusSetList(true); }
CssLayout was causing problems, revert to VerticalLayout
korpling_ANNIS
train
java
1c427181e230dbda9dc305766a0f11c311a14efa
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ setup( packages=['sanic'], platforms='any', install_requires=[ - #'uvloop>=0.5.3', + 'uvloop>=0.5.3', 'httptools>=0.0.9', 'ujson>=1.35', ],
Fuck it, uvloop is required httptools already requires compilation, so why not include uvloop
huge-success_sanic
train
py
f61de394da5abcb22386eda3ee3d7f35056613df
diff --git a/webapps/ui/cockpit/plugins/base/app/views/processesDashboard/process-definitions.js b/webapps/ui/cockpit/plugins/base/app/views/processesDashboard/process-definitions.js index <HASH>..<HASH> 100644 --- a/webapps/ui/cockpit/plugins/base/app/views/processesDashboard/process-definitions.js +++ b/webapps/ui/cockpit/plugins/base/app/views/processesDashboard/process-definitions.js @@ -56,7 +56,7 @@ module.exports = [ 'ViewsProvider', function(ViewsProvider) { latest: true }, function(err, data) { $scope.processDefinitionData = data.items; - $scope.processDefinitionsCount = data.items.length; + $scope.processDefinitionsCount = data.count; if (err) { $scope.loadingState = 'ERROR'; }
chore(cockpit): change data source of count for process definitions.
camunda_camunda-bpm-platform
train
js
076c6aaaf2ee5aef70280fac911bb91e2903b638
diff --git a/fiesta.py b/fiesta.py index <HASH>..<HASH> 100644 --- a/fiesta.py +++ b/fiesta.py @@ -1,7 +1,7 @@ import base64, json, urllib2 -api_client_id = "To3-IKknn36qAAAA" -api_client_secret = "46d028xWl8zXGa3GCOYJMeXlr5pUebCNZcz3SCJj" +api_client_id = "Send an email to Fiesta.cc to get an API ID/Secret" +api_client_secret = "" basic_auth = base64.b64encode("%s:%s" % (api_client_id, api_client_secret)) def _create_and_send_request(uri, api_inputs):
remove the dead client credentials from the fiesta file
fiesta_fiesta-python
train
py
d8969363c8e6c1205669389067e73a074502fbd9
diff --git a/salt/version.py b/salt/version.py index <HASH>..<HASH> 100644 --- a/salt/version.py +++ b/salt/version.py @@ -559,7 +559,7 @@ def dependency_information(include_salt_cloud=False): ('cffi', 'cffi', '__version__'), ('pycparser', 'pycparser', '__version__'), ('gitdb', 'gitdb', '__version__'), - ('gitpython', 'gitpython', '__version__'), + ('gitpython', 'git', '__version__'), ('python-gnupg', 'gnupg', '__version__'), ('mysql-python', 'MySQLdb', '__version__'), ('cherrypy', 'cherrypy', '__version__'),
Fix version reporting of gitpython The module is called `git`, not `gitpython`. Without this, the version for `gitpython` will not show up with `salt-call --versions-report`.
saltstack_salt
train
py
43c275c6e2152a6609e26c046891309e5f79c572
diff --git a/roaring/roaring.go b/roaring/roaring.go index <HASH>..<HASH> 100644 --- a/roaring/roaring.go +++ b/roaring/roaring.go @@ -1328,10 +1328,15 @@ func (c *container) Optimize() { } } else if c.isBitmap() { runs := c.bitmapCountRuns() - if runs < 2048 { + if runs < RunMaxSize { c.bitmapToRun() } + } else if c.isRun() { + if len(c.runs) > RunMaxSize { + c.runToBitmap() + } } + } func (c *container) arrayContains(v uint32) bool {
extended bitmap.optimize() to look at run containers
pilosa_pilosa
train
go
bc5ca10380d6b2195e9cb4566bf408e75ebec7ee
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -258,12 +258,14 @@ module.exports = (api, options) => { removeArg('--dashboard', 1, rawArgs) removeArg('--debug', 1, rawArgs) removeArg('--headless', 1, rawArgs) + removeArg('--https', 1, rawArgs) // Run the serve command const server = await api.service.run('serve', { _: [], // Use dashboard if called from ui - dashboard: args.dashboard + dashboard: args.dashboard, + https: args.https }) const outputDir = pluginOptions.outputDir || 'dist_electron'
feat(serve): support https cli arg, fixes #<I>
nklayman_vue-cli-plugin-electron-builder
train
js
08682e68eba52abf5f3ec9e206e70bd04d5ee46e
diff --git a/chef/lib/chef/index_queue/indexable.rb b/chef/lib/chef/index_queue/indexable.rb index <HASH>..<HASH> 100644 --- a/chef/lib/chef/index_queue/indexable.rb +++ b/chef/lib/chef/index_queue/indexable.rb @@ -51,10 +51,10 @@ class Chef end with_metadata["type"] ||= self.index_object_type - with_metadata["id"] ||= self.index_id + with_metadata["id"] ||= (self.index_id || UUIDTools::UUID.random_create.to_s) with_metadata["item"] ||= self - raise ArgumentError, "Must supply type and id to index object" if (with_metadata["id"].nil? or with_metadata["type"].nil?) + Chef::Log.warn("Type or Id missing in index operation") if (with_metadata["id"].nil? or with_metadata["type"].nil?) with_metadata end
adding auto-create of item id back to indexer and added log warning
chef_chef
train
rb
2a9be357f9b0a8779fd13141d35638d552a915c0
diff --git a/libnetwork/endpoint_info.go b/libnetwork/endpoint_info.go index <HASH>..<HASH> 100644 --- a/libnetwork/endpoint_info.go +++ b/libnetwork/endpoint_info.go @@ -181,6 +181,9 @@ type tableEntry struct { } func (ep *endpoint) Info() EndpointInfo { + if ep.sandboxID != "" { + return ep + } n, err := ep.getNetworkFromStore() if err != nil { return nil
Trust the endpoint state if we have a valid sandbox-id
moby_moby
train
go