diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/unique.js b/src/unique.js index <HASH>..<HASH> 100644 --- a/src/unique.js +++ b/src/unique.js @@ -1,5 +1,5 @@ import _ from 'lodash' -const unique = Symbol('lacona-unique-key') +const unique = Symbol.for('lacona-unique-key') export default unique
Use symbol.for for node environments with potentially multiple loads
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -1114,6 +1114,7 @@ class Configuration implements ConfigurationInterface ->end() ->children() ->arrayNode('routing') + ->normalizeKeys(false) ->useAttributeAsKey('message_class') ->beforeNormalization() ->always() @@ -1173,6 +1174,7 @@ class Configuration implements ConfigurationInterface ->end() ->end() ->arrayNode('transports') + ->normalizeKeys(false) ->useAttributeAsKey('name') ->arrayPrototype() ->beforeNormalization() @@ -1220,6 +1222,7 @@ class Configuration implements ConfigurationInterface ->scalarNode('default_bus')->defaultNull()->end() ->arrayNode('buses') ->defaultValue(['messenger.bus.default' => ['default_middleware' => true, 'middleware' => []]]) + ->normalizeKeys(false) ->useAttributeAsKey('name') ->arrayPrototype() ->addDefaultsIfNotSet()
[Messenger] fix broken key normalization
diff --git a/tapeforms/fieldsets.py b/tapeforms/fieldsets.py index <HASH>..<HASH> 100644 --- a/tapeforms/fieldsets.py +++ b/tapeforms/fieldsets.py @@ -147,7 +147,7 @@ class TapeformFieldsetsMixin: fieldsets = fieldsets or self.fieldsets if not fieldsets: - raise StopIteration + return # Search for primary marker in at least one of the fieldset kwargs. has_primary = any(fieldset.get('primary') for fieldset in fieldsets)
Replace StopIteration raising by return
diff --git a/docs/_component/editor.client.js b/docs/_component/editor.client.js index <HASH>..<HASH> 100644 --- a/docs/_component/editor.client.js +++ b/docs/_component/editor.client.js @@ -119,6 +119,15 @@ export const Editor = ({children}) => { ) const stats = state.file ? statistics(state.file) : {} + // Create a preview component that can handle errors with try-catch block; for catching invalid JS expressions errors that ErrorBoundary cannot catch. + const Preview = useCallback(() => { + try { + return state.file.result() + } catch (error) { + return <FallbackComponent error={error} /> + } + }, [state]) + return ( <div> <Tabs className="frame"> @@ -232,11 +241,7 @@ export const Editor = ({children}) => { <TabPanel> <noscript>Enable JavaScript for the rendered result.</noscript> <div className="frame-body frame-body-box-fixed-height frame-body-box"> - {state.file && state.file.result ? ( - <ErrorBoundary FallbackComponent={FallbackComponent}> - {state.file.result()} - </ErrorBoundary> - ) : null} + {state.file && state.file.result ? <Preview /> : null} </div> </TabPanel> <TabPanel>
Fix playground exceptions (#<I>) Closes GH-<I>.
diff --git a/th_evernote/tests.py b/th_evernote/tests.py index <HASH>..<HASH> 100644 --- a/th_evernote/tests.py +++ b/th_evernote/tests.py @@ -17,7 +17,7 @@ except ImportError: import mock -cache = caches['th_evernote'] +cache = caches['django_th'] class EvernoteTest(MainTest): @@ -138,9 +138,6 @@ class ServiceEvernoteTest(EvernoteTest): self.assertIn('consumer_secret', settings.TH_EVERNOTE) self.assertIn('sandbox', settings.TH_EVERNOTE) - def test_get_config_th_cache(self): - self.assertIn('th_evernote', settings.CACHES) - def test_get_evernote_client(self, token=None): """ get the token from evernote
Dropped get config cache and replaced variable REPLACED: cache = caches['th_<service>'] With cache = caches['django_th'] REMOVED: def test_get_config_th_cache(self): self.assertIn('th_rss', settings.CACHES)
diff --git a/test/instrumentation/modules/pg/knex.js b/test/instrumentation/modules/pg/knex.js index <HASH>..<HASH> 100644 --- a/test/instrumentation/modules/pg/knex.js +++ b/test/instrumentation/modules/pg/knex.js @@ -13,6 +13,11 @@ var agent = require('../../../..').start({ var knexVersion = require('knex/package').version var semver = require('semver') +if (semver.gte(knexVersion, '0.21.0') && semver.lt(process.version, '10.0.0')) { + // Skip these tests: knex@0.21.x dropped support for node v8. + process.exit(0) +} + var Knex = require('knex') var test = require('tape')
fix(tests): skip testing knex >=<I> with node v8 (#<I>) Fixes #<I>
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup, find_packages setup( name='psamm', version='0.7', - description='PSAMM metabolic modelrm -ing tools', + description='PSAMM metabolic modeling tools', maintainer='Jon Lund Steffensen', maintainer_email='jon_steffensen@uri.edu', url='https://github.com/zhanglab/model_script',
Fix accidental typo in setup.py
diff --git a/webpack/test.js b/webpack/test.js index <HASH>..<HASH> 100644 --- a/webpack/test.js +++ b/webpack/test.js @@ -15,7 +15,7 @@ const config = merge.smart(baseConfig, { }, { test: /targets\/.*\.js$/, - loader: 'null', + loader: 'babel?presets[]=es2015', }, ], },
chore(targets): allow es6 for targets code
diff --git a/src/Bootstrap/Drupal.php b/src/Bootstrap/Drupal.php index <HASH>..<HASH> 100644 --- a/src/Bootstrap/Drupal.php +++ b/src/Bootstrap/Drupal.php @@ -257,7 +257,8 @@ class Drupal implements DrupalInterface { $drupal = new DrupalConsoleCore( $this->drupalFinder->getComposerRoot(), - $this->drupalFinder->getDrupalRoot() + $this->drupalFinder->getDrupalRoot(), + $this->drupalFinder ); return $drupal->boot();
"[console] Pass DrupalFinder to DrupalConsoleCore." (#<I>) * [console] Show message only on list command. * [console] Pass DrupalFinder to DrupalConsoleCore.
diff --git a/lib/operations/collection_ops.js b/lib/operations/collection_ops.js index <HASH>..<HASH> 100644 --- a/lib/operations/collection_ops.js +++ b/lib/operations/collection_ops.js @@ -233,7 +233,7 @@ function countDocuments(coll, query, options, callback) { coll.aggregate(pipeline, options, (err, result) => { if (err) return handleCallback(callback, err); result.toArray((err, docs) => { - if (err) handleCallback(err); + if (err) return handleCallback(err); handleCallback(callback, null, docs.length ? docs[0].n : 0); }); });
fix(count-documents): return callback on error case otherwise the scucess handler is called, which results into further missleading errors (e.g. length is not defined)
diff --git a/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/MIMEType.java b/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/MIMEType.java index <HASH>..<HASH> 100644 --- a/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/MIMEType.java +++ b/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/MIMEType.java @@ -110,7 +110,7 @@ public final class MIMEType implements Serializable { @Override public int hashCode() { - return new HashCodeBuilder(10, 31).append(getPrimaryType()).append(getSubType()).toHashCode(); + return new HashCodeBuilder(11, 31).append(getPrimaryType()).append(getSubType()).toHashCode(); } public boolean includes(MIMEType mimeType) {
- hashcodebuilder expected first number to be odd git-svn-id: file:///home/projects/httpcache4j/tmp/scm-svn-tmp/trunk@<I> aeef7db8-<I>a-<I>-b<I>-bac<I>ff<I>f6
diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index <HASH>..<HASH> 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -63,7 +63,7 @@ module Jekyll # # Returns <String> def dir - path = @categories ? '/' + @categories.join('/') : '' + path = (@categories && !@categories.empty?) ? '/' + @categories.join('/') : '' if permalink permalink.to_s.split("/")[0..-2].join("/") else
fix double slash caused by empty categories
diff --git a/provider/azure/azure_discover.go b/provider/azure/azure_discover.go index <HASH>..<HASH> 100644 --- a/provider/azure/azure_discover.go +++ b/provider/azure/azure_discover.go @@ -117,6 +117,8 @@ func fetchAddrsWithTags(tagName string, tagValue string, vmnet network.Interface var id string if v.ID != nil { id = *v.ID + } else { + id = "ip address id not found" } if v.Tags == nil { l.Printf("[DEBUG] discover-azure: Interface %s has no tags", id) @@ -167,6 +169,8 @@ func fetchAddrsWithVmScaleSet(resourceGroup string, vmScaleSet string, vmnet net var id string if v.ID != nil { id = *v.ID + } else { + id = "ip address id not found" } if v.IPConfigurations == nil { l.Printf("[DEBUG] discover-azure: Interface %s had no ip configuration", id)
better message in case id is nil
diff --git a/src/shared/js/ch.Validation.js b/src/shared/js/ch.Validation.js index <HASH>..<HASH> 100644 --- a/src/shared/js/ch.Validation.js +++ b/src/shared/js/ch.Validation.js @@ -180,7 +180,7 @@ this.error = null; this - .on('exists', function (data) { + .on('exist', function (data) { this._mergeConditions(data.conditions); }) // Clean the validation if is shown; diff --git a/src/shared/js/ch.factory.js b/src/shared/js/ch.factory.js index <HASH>..<HASH> 100644 --- a/src/shared/js/ch.factory.js +++ b/src/shared/js/ch.factory.js @@ -75,7 +75,7 @@ } else { if (data.emit !== undefined) { - data.emit('exists', options); + data.emit('exist', options); } }
#<I> Factory: rename exists with exist
diff --git a/lib/jsonapi/resource.rb b/lib/jsonapi/resource.rb index <HASH>..<HASH> 100644 --- a/lib/jsonapi/resource.rb +++ b/lib/jsonapi/resource.rb @@ -537,6 +537,7 @@ module JSONAPI associations = _lookup_association_chain([records.model.to_s, *model_names]) joins_query = _build_joins([records.model, *associations]) + # _sorting is appended to avoid name clashes with manual joins eg. overriden filters order_by_query = "#{associations.last.name}_sorting.#{column_name} #{direction}" records = records.joins(joins_query).order(order_by_query) else diff --git a/test/controllers/controller_test.rb b/test/controllers/controller_test.rb index <HASH>..<HASH> 100644 --- a/test/controllers/controller_test.rb +++ b/test/controllers/controller_test.rb @@ -327,8 +327,6 @@ class PostsControllerTest < ActionController::TestCase assert_equal post.id.to_s, json_response['data'][-2]['id'], 'alphabetically first user is second last' end - end - def test_invalid_sort_param get :index, params: {sort: 'asdfg'}
Add comment for order by query and fix typo
diff --git a/test/extended/images/layers.go b/test/extended/images/layers.go index <HASH>..<HASH> 100644 --- a/test/extended/images/layers.go +++ b/test/extended/images/layers.go @@ -66,8 +66,7 @@ var _ = g.Describe("[Feature:ImageLayers] Image layer subresource", func() { if !ok { return false, nil } - o.Expect(ref.ImageMissing).To(o.BeTrue()) - return true, nil + return ref.ImageMissing, nil }) o.Expect(err).NotTo(o.HaveOccurred()) })
ImageLayers test should loop until image is missing In the event we do fill the cache
diff --git a/harpoon/overview.py b/harpoon/overview.py index <HASH>..<HASH> 100644 --- a/harpoon/overview.py +++ b/harpoon/overview.py @@ -176,7 +176,10 @@ class Harpoon(object): configuration.converters.done(path, meta.result) for key, v in val.items(ignore_converters=True): + if isinstance(v, MergedOptions): + v.ignore_converters = True meta.result[key] = v + return spec.normalise(meta, meta.result) converter = Converter(convert=convert_image, convert_path=["images", image])
Make sure converter doesn't trip over itself
diff --git a/examples/i18n/I18n.php b/examples/i18n/I18n.php index <HASH>..<HASH> 100644 --- a/examples/i18n/I18n.php +++ b/examples/i18n/I18n.php @@ -9,12 +9,12 @@ class I18n extends Mustache { public $__ = array(__CLASS__, '__trans'); // A *very* small i18n dictionary :) - private $dictionary = array( + private static $dictionary = array( 'Hello.' => 'Hola.', 'My name is {{ name }}.' => 'Me llamo {{ name }}.', ); - public function __trans($text) { - return isset($this->dictionary[$text]) ? $this->dictionary[$text] : $text; + public static function __trans($text) { + return isset(self::$dictionary[$text]) ? self::$dictionary[$text] : $text; } -} \ No newline at end of file +}
Fix E_STRICT failure in i<I>n example.
diff --git a/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/JCacheMetrics.java b/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/JCacheMetrics.java index <HASH>..<HASH> 100644 --- a/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/JCacheMetrics.java +++ b/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/JCacheMetrics.java @@ -118,7 +118,7 @@ public class JCacheMetrics implements MeterBinder { "The number of times cache lookup methods have not returned a value"), objectName, CacheStatistics.CacheMisses::get); - registry.gauge(registry.createId(name + ".puts", tags, "Cache removals"), + registry.gauge(registry.createId(name + ".puts", tags, "Cache puts"), objectName, CacheStatistics.CachePuts::get); registry.gauge(registry.createId(name + ".removals", tags, "Cache removals"),
Nit - fix JCache put gauge description
diff --git a/pandas/tests/groupby/test_apply.py b/pandas/tests/groupby/test_apply.py index <HASH>..<HASH> 100644 --- a/pandas/tests/groupby/test_apply.py +++ b/pandas/tests/groupby/test_apply.py @@ -1177,3 +1177,25 @@ def test_apply_empty_string_nan_coerce_bug(): index=MultiIndex.from_tuples([(1, ""), (2, "")], names=["a", "b"]), ) tm.assert_frame_equal(result, expected) + + +@pytest.mark.parametrize("index_values", [[1, 2, 3], [1.0, 2.0, 3.0]]) +def test_apply_index_key_error_bug(index_values): + # GH 44310 + result = DataFrame( + { + "a": ["aa", "a2", "a3"], + "b": [1, 2, 3], + }, + index=Index(index_values), + ) + expected = DataFrame( + { + "b_mean": [2.0, 3.0, 1.0], + }, + index=Index(["a2", "a3", "aa"], name="a"), + ) + result = result.groupby("a").apply( + lambda df: Series([df["b"].mean()], index=["b_mean"]) + ) + tm.assert_frame_equal(result, expected)
TST: group by - apply Key Error (#<I>) * Test for Group By - Apply Key Error * Paramaters change
diff --git a/lib/completionlib.php b/lib/completionlib.php index <HASH>..<HASH> 100644 --- a/lib/completionlib.php +++ b/lib/completionlib.php @@ -652,7 +652,7 @@ WHERE return $result; } - public function inform_grade_changed($cm, &$item, &$grade, $deleted) { + public function inform_grade_changed($cm, $item, $grade, $deleted) { // Bail out now if completion is not enabled for course-module, grade // is not used to compute completion, or this is a different numbered // grade @@ -682,11 +682,11 @@ WHERE * <p> * (Internal function. Not private, so we can unit-test it.) * - * @param grade_item &$item - * @param grade_grade &$grade + * @param grade_item $item + * @param grade_grade $grade * @return int Completion state e.g. COMPLETION_INCOMPLETE */ - function internal_get_grade_state(&$item, &$grade) { + function internal_get_grade_state($item, $grade) { if (!$grade) { return COMPLETION_INCOMPLETE; }
MDL-<I> & operator is often not needed in PHP5 in method definition
diff --git a/generators/server/index.js b/generators/server/index.js index <HASH>..<HASH> 100644 --- a/generators/server/index.js +++ b/generators/server/index.js @@ -635,7 +635,7 @@ module.exports = class JHipsterServerGenerator extends BaseBlueprintGenerator { 'java:docker:dev': 'npm run java:docker -- -Pdev,webapp', 'java:docker:prod': 'npm run java:docker -- -Pprod', 'ci:backend:test': - 'npm run backend:info && npm run backend:doc:test && npm run backend:nohttp:test && npm run backend:unit:test -- -P$npm_package_config_default_environment', + 'npm run backend:info && npm run backend:doc:test && npm run backend:nohttp:test && npm run backend:unit:test -- -Djhipster-tests.keep-containers-running=false -P$npm_package_config_default_environment', 'ci:e2e:package': 'npm run java:$npm_package_config_packaging:$npm_package_config_default_environment -- -Pe2e -Denforcer.skip=true', 'preci:e2e:server:start': 'npm run docker:db:await --if-present && npm run docker:others:await --if-present',
variabilize container reuse flag on testcontainers and set it to false on CI
diff --git a/lib/bson/binary.rb b/lib/bson/binary.rb index <HASH>..<HASH> 100644 --- a/lib/bson/binary.rb +++ b/lib/bson/binary.rb @@ -134,7 +134,7 @@ module BSON encode_binary_data_with_placeholder(encoded) do |encoded| encoded << SUBTYPES.fetch(type) encoded << data.bytesize.to_bson if type == :old - encoded << data + encoded << data.encode(UTF8).force_encoding(BINARY) end end
Encode to UTF-8 before forcing BINARY encoding in Binary#to_bson
diff --git a/lib/less/environments/browser.js b/lib/less/environments/browser.js index <HASH>..<HASH> 100644 --- a/lib/less/environments/browser.js +++ b/lib/less/environments/browser.js @@ -172,15 +172,6 @@ less.Parser.environment = { var hrefParts = this.extractUrlParts(filename, window.location.href); var href = hrefParts.url; - // TODO - use pathDiff in less.node - /*if (env.relativeUrls) { - if (env.rootpath) { - newFileInfo.rootpath = extractUrlParts(env.rootpath + pathDiff(hrefParts.path, newFileInfo.entryPath)).path; - } else { - newFileInfo.rootpath = hrefParts.path; - } - }*/ - if (env.useFileCache && fileCache[href]) { try { var lessText = fileCache[href];
remove commented out code now implemented in parser
diff --git a/src/main/java/org/zeroturnaround/zip/ZipUtil.java b/src/main/java/org/zeroturnaround/zip/ZipUtil.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/zeroturnaround/zip/ZipUtil.java +++ b/src/main/java/org/zeroturnaround/zip/ZipUtil.java @@ -357,6 +357,9 @@ public final class ZipUtil { try { action.process(is, e); } + catch (ZipBreakException ex) { + break; + } finally { IOUtils.closeQuietly(is); } @@ -426,7 +429,12 @@ public final class ZipUtil { ZipInputStream in = new ZipInputStream(new BufferedInputStream(is)); ZipEntry entry; while ((entry = in.getNextEntry()) != null) { - action.process(in, entry); + try { + action.process(in, entry); + } + catch (ZipBreakException ex) { + break; + } } } catch (IOException e) {
Breaking from the iterate method with an exception
diff --git a/core-bundle/src/EventListener/InitializeSystemListener.php b/core-bundle/src/EventListener/InitializeSystemListener.php index <HASH>..<HASH> 100644 --- a/core-bundle/src/EventListener/InitializeSystemListener.php +++ b/core-bundle/src/EventListener/InitializeSystemListener.php @@ -42,6 +42,11 @@ class InitializeSystemListener extends ScopeAwareListener private $rootDir; /** + * @var bool + */ + private $isBooted = false; + + /** * Constructor. * * @param RouterInterface $router The router object @@ -139,6 +144,11 @@ class InitializeSystemListener extends ScopeAwareListener */ private function boot(Request $request = null) { + // do not boot twice + if ($this->booted()) { + return; + } + $this->includeHelpers(); // Try to disable the PHPSESSID @@ -181,6 +191,19 @@ class InitializeSystemListener extends ScopeAwareListener $this->triggerInitializeSystemHook(); $this->checkRequestToken(); + + // set booted + $this->isBooted = true; + } + + /** + * Check is booted + * + * @return bool + */ + private function booted() + { + return $this->isBooted; } /**
[Core] do not boot Contao's Framework twice
diff --git a/lib/rufus/decision/hashes.rb b/lib/rufus/decision/hashes.rb index <HASH>..<HASH> 100644 --- a/lib/rufus/decision/hashes.rb +++ b/lib/rufus/decision/hashes.rb @@ -203,11 +203,18 @@ module Decision # def self.check_and_eval(ruby_code, bndng=binding()) - TREECHECKER.check(ruby_code) - + begin + TREECHECKER.check(ruby_code) + rescue + raise $!, "Error parsing #{ruby_code} -> #{$!}", $!.backtrace + end # OK, green for eval... - eval(ruby_code, bndng) + begin + eval(ruby_code, bndng) + rescue + raise $!, "Error evaling #{ruby_code} -> #{$!}", $!.backtrace + end end end end diff --git a/lib/rufus/decision/table.rb b/lib/rufus/decision/table.rb index <HASH>..<HASH> 100644 --- a/lib/rufus/decision/table.rb +++ b/lib/rufus/decision/table.rb @@ -406,7 +406,11 @@ module Decision next if value == nil || value == '' - value = Rufus::dsub(value, hash) + begin + value = Rufus::dsub(value, hash) + rescue + raise $!, "Error substituting in #{value} -> #{$!}", $!.backtrace + end hash[out_header] = if @options[:accumulate] #
wrap some potential exception points for ruby_eval with more info
diff --git a/pymatgen/core/tests/test_lattice.py b/pymatgen/core/tests/test_lattice.py index <HASH>..<HASH> 100644 --- a/pymatgen/core/tests/test_lattice.py +++ b/pymatgen/core/tests/test_lattice.py @@ -476,7 +476,7 @@ class LatticeTestCase(PymatgenTest): s1 = np.array([0.5, -1.5, 3]) s2 = np.array([0.5, 3., -1.5]) s3 = np.array([2.5, 1.5, -4.]) - self.assertEqual(m.get_miller_index_from_sites([s1, s2, s3]), + self.assertEqual(m.get_miller_index_from_coords([s1, s2, s3]), (2, 1, 1)) # test on a hexagonal system
TST: Fix typo in Lattice tests
diff --git a/shoebot/__init__.py b/shoebot/__init__.py index <HASH>..<HASH> 100644 --- a/shoebot/__init__.py +++ b/shoebot/__init__.py @@ -82,6 +82,9 @@ class Bot: self.WIDTH = Bot.DEFAULT_WIDTH self.HEIGHT = Bot.DEFAULT_HEIGHT + + if self.gtkmode: + import gtkexcepthook if canvas: self.canvas = canvas @@ -340,7 +343,6 @@ class Bot: sys.exit() else: # if on gtkmode, print the error and don't break - import gtkexcepthook raise ShoebotError(errmsg)
fixed a minor error with gtkexcepthook that prevented to redirect some exceptions
diff --git a/signalk-on-delta.js b/signalk-on-delta.js index <HASH>..<HASH> 100644 --- a/signalk-on-delta.js +++ b/signalk-on-delta.js @@ -5,9 +5,26 @@ module.exports = function(RED) { var node = this; var signalk = node.context().global.get('signalk') + var app = node.context().global.get('app') function on_delta(delta) { - node.send({ payload: delta }) + if ( delta.updates ) { + var copy = JSON.parse(JSON.stringify(delta)) + copy.updates = [] + delta.updates.forEach(update => { + if ( update.values && + (!update.$source || !update.$source.startsWith('signalk-node-red') )) { + copy.updates.push(update) + } + }) + + if ( copy.updates.length > 0 ) { + if ( copy.context == app.selfContext ) { + copy.context = 'vessels.self' + } + node.send({ payload: copy }) + } + } } signalk.on('delta', on_delta)
feature: filter out meta deltas and deltas from node red
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -70,7 +70,8 @@ function checkDirectory(dir, ignoreDirs, deps, devDeps, options) { }); finder.on("file", function (filename) { - if (path.extname(filename) === ".js") { + var ext = path.extname(filename); + if (options.extensions.indexOf(ext) !== -1) { var modulesRequired = getModulesRequiredFromFilename(filename, options); if (util.isError(modulesRequired)) { invalidFiles[filename] = modulesRequired; @@ -111,6 +112,7 @@ function depCheck(rootDir, options, cb) { var pkg = options.package || require(path.join(rootDir, 'package.json')); var deps = filterDependencies(pkg.dependencies); var devDeps = filterDependencies(options.withoutDev ? [] : pkg.devDependencies); + options.extensions = options.extensions || ['.js']; var ignoreDirs = _([ '.git', '.svn',
Accept the extensions argument passed from options.
diff --git a/lib/codemirror.js b/lib/codemirror.js index <HASH>..<HASH> 100644 --- a/lib/codemirror.js +++ b/lib/codemirror.js @@ -20,7 +20,7 @@ var CodeMirror = (function() { // This mess creates the base DOM structure for the editor. wrapper.innerHTML = '<div style="overflow: hidden; position: relative; width: 1px; height: 0px;">' + // Wraps and hides input textarea - '<textarea style="position: absolute; width: 2px;" wrap="off" ' + + '<textarea style="position: absolute; width: 10000px;" wrap="off" ' + 'autocorrect="off" autocapitalize="off"></textarea></div>' + '<div class="CodeMirror-scroll cm-s-' + options.theme + '">' + '<div style="position: relative">' + // Set to the height of the text, causes scrolling
Make hidden textarea wide again This fixes (mostly) vertical cursor movement in IE
diff --git a/domains/toolabstraction/maven/src/test/java/org/openengsb/maven/common/test/unit/TestMavenConnector.java b/domains/toolabstraction/maven/src/test/java/org/openengsb/maven/common/test/unit/TestMavenConnector.java index <HASH>..<HASH> 100755 --- a/domains/toolabstraction/maven/src/test/java/org/openengsb/maven/common/test/unit/TestMavenConnector.java +++ b/domains/toolabstraction/maven/src/test/java/org/openengsb/maven/common/test/unit/TestMavenConnector.java @@ -23,10 +23,12 @@ import java.util.Properties; import junit.framework.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.openengsb.maven.common.MavenConnector; import org.openengsb.maven.common.MavenResult; +@Ignore("tests do not run on hudson - locally they should run without any problems") public class TestMavenConnector { private Properties executionRequestProperties;
Set toolabstraction tests to ignore because they do not work on hudson.
diff --git a/templates/includes/footer.php b/templates/includes/footer.php index <HASH>..<HASH> 100644 --- a/templates/includes/footer.php +++ b/templates/includes/footer.php @@ -16,7 +16,7 @@ if(!empty($this->data['htmlinject']['htmlContentPost'])) { <hr /> <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/ssplogo-fish-small.png" alt="Small fish logo" style="float: right" /> - Copyright &copy; 2007-2009 <a href="http://rnd.feide.no/">Feide RnD</a> + Copyright &copy; 2007-2010 <a href="http://rnd.feide.no/">Feide RnD</a> <br style="clear: right" />
Update copyright year in footer.
diff --git a/src/Crate/PDO/ArtaxExt/ClientInterface.php b/src/Crate/PDO/ArtaxExt/ClientInterface.php index <HASH>..<HASH> 100644 --- a/src/Crate/PDO/ArtaxExt/ClientInterface.php +++ b/src/Crate/PDO/ArtaxExt/ClientInterface.php @@ -27,6 +27,24 @@ use Artax\Response; interface ClientInterface { /** + * Set the URI + * + * @param string $uri + * + * @return void + */ + public function setUri($uri); + + /** + * Set the connection timeout + * + * @param int $timeout + * + * @return void + */ + public function setTimeout($timeout); + + /** * Execute the PDOStatement and return the response from server * * @param string $queryString
Reverted the removal of the methods in the ClientInterface because they broke a test
diff --git a/ryu/tests/integrated/common/docker_base.py b/ryu/tests/integrated/common/docker_base.py index <HASH>..<HASH> 100644 --- a/ryu/tests/integrated/common/docker_base.py +++ b/ryu/tests/integrated/common/docker_base.py @@ -133,7 +133,7 @@ class Command(object): if out.returncode == 0: return out LOG.error(out.stderr) - if try_times + 1 >= try_times: + if i + 1 >= try_times: break time.sleep(interval) raise CommandError(out)
scenario test: Fix the wrong retry check in command execution
diff --git a/src/main/java/org/spout/nbt/stream/NBTInputStream.java b/src/main/java/org/spout/nbt/stream/NBTInputStream.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/spout/nbt/stream/NBTInputStream.java +++ b/src/main/java/org/spout/nbt/stream/NBTInputStream.java @@ -190,7 +190,7 @@ public final class NBTInputStream implements Closeable { length = is.readInt(); Class<? extends Tag> clazz = childType.getTagClass(); - List<Tag> tagList = new ArrayList<Tag>(); + List<Tag> tagList = new ArrayList<Tag>(length); for (int i = 0; i < length; i++) { Tag tag = readTagPayload(childType, "", depth + 1); if (tag instanceof EndTag) {
Pre-sizes the arraylist for list tag to the given length
diff --git a/lib/active-profiling/ruby_profiler.rb b/lib/active-profiling/ruby_profiler.rb index <HASH>..<HASH> 100644 --- a/lib/active-profiling/ruby_profiler.rb +++ b/lib/active-profiling/ruby_profiler.rb @@ -14,7 +14,7 @@ module ActiveProfiling # * :disable_gc - temporarily disable the garbage collector for the # duration of the profiling session. The default is false. def ruby_profiler(options = {}) - return yield unless defined?(RubyProf) + return [ yield, nil ] unless defined?(RubyProf) options = { :measure_mode => RubyProf::PROCESS_TIME,
Return an Array even when we don't have RubyProf available.
diff --git a/lib/fb_graph/connections/settings.rb b/lib/fb_graph/connections/settings.rb index <HASH>..<HASH> 100644 --- a/lib/fb_graph/connections/settings.rb +++ b/lib/fb_graph/connections/settings.rb @@ -51,6 +51,7 @@ module FbGraph :connection => :settings ) if succeeded + @settings ||= [] if value @settings << setting.to_sym else
@settings can be nil here
diff --git a/lib/gem_footprint_analyzer/require_spy.rb b/lib/gem_footprint_analyzer/require_spy.rb index <HASH>..<HASH> 100644 --- a/lib/gem_footprint_analyzer/require_spy.rb +++ b/lib/gem_footprint_analyzer/require_spy.rb @@ -102,9 +102,10 @@ module GemFootprintAnalyzer # we're redirecting :require_relative to the regular :require kernels.each do |k| k.send :define_method, :require_relative do |name| + return require(name) if name.start_with?('/') + last_caller = caller(1..1).first relative_path = GemFootprintAnalyzer::RequireSpy.relative_path(last_caller, name) - require(relative_path) end end
Fix the spied version of require_relative So that it returns early when passed an absolute directory as a name.
diff --git a/resource_aws_s3_bucket_test.go b/resource_aws_s3_bucket_test.go index <HASH>..<HASH> 100644 --- a/resource_aws_s3_bucket_test.go +++ b/resource_aws_s3_bucket_test.go @@ -645,14 +645,20 @@ func testAccCheckAWSS3BucketPolicy(n string, policy string) resource.TestCheckFu Bucket: aws.String(rs.Primary.ID), }) - if err != nil { - if policy == "" { + if policy == "" { + if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NoSuchBucketPolicy" { // expected return nil + } + if err == nil { + return fmt.Errorf("Expected no policy, got: %#v", *out.Policy) } else { return fmt.Errorf("GetBucketPolicy error: %v, expected %s", err, policy) } } + if err != nil { + return fmt.Errorf("GetBucketPolicy error: %v, expected %s", err, policy) + } if v := out.Policy; v == nil { if policy != "" {
provider/aws: Fix s3_bucket test for empty policy
diff --git a/params/version.go b/params/version.go index <HASH>..<HASH> 100644 --- a/params/version.go +++ b/params/version.go @@ -21,10 +21,10 @@ import ( ) const ( - VersionMajor = 1 // Major version component of the current release - VersionMinor = 10 // Minor version component of the current release - VersionPatch = 2 // Patch version component of the current release - VersionMeta = "stable" // Version metadata to append to the version string + VersionMajor = 1 // Major version component of the current release + VersionMinor = 10 // Minor version component of the current release + VersionPatch = 3 // Patch version component of the current release + VersionMeta = "unstable" // Version metadata to append to the version string ) // Version holds the textual version string.
params: begin <I> release cycle
diff --git a/docs/src/Iconography.js b/docs/src/Iconography.js index <HASH>..<HASH> 100644 --- a/docs/src/Iconography.js +++ b/docs/src/Iconography.js @@ -37,7 +37,7 @@ const IconList = props => hoverColor="blue" > <Flex mb={2} align="center" justify="center"> - <Icon name={icon} size={48} /> + <Icon name={icon} legacy={false} size={48} /> </Flex> </BlockLink> <Text align="center">
Only show new icons in docs
diff --git a/src/Framework/BaseWebApplication.php b/src/Framework/BaseWebApplication.php index <HASH>..<HASH> 100644 --- a/src/Framework/BaseWebApplication.php +++ b/src/Framework/BaseWebApplication.php @@ -723,6 +723,7 @@ abstract class BaseWebApplication extends BaseConsoleApplication implements Fram return; } $app['current_user'] = $app['user']; + $request->attributes->set('current_user', $app['user']); $app['twig']->addGlobal('current_user', $app['user']); $request->attributes->set('current_username', $app['user']->getUsername()); });
Set current_user in request attributes (to detach from application)
diff --git a/modules/page/html/render/message.js b/modules/page/html/render/message.js index <HASH>..<HASH> 100644 --- a/modules/page/html/render/message.js +++ b/modules/page/html/render/message.js @@ -68,7 +68,7 @@ exports.create = function (api) { var rootMessage = {key: id, value} - // what happens in private stays in private! + // Apply the recps of the original root message to all replies. What happens in private stays in private! meta.recps.set(value.content.recps) var root = api.message.sync.root(rootMessage) || id
add comment about deriving recps on private message replies
diff --git a/cfgstack/cfgstack.py b/cfgstack/cfgstack.py index <HASH>..<HASH> 100644 --- a/cfgstack/cfgstack.py +++ b/cfgstack/cfgstack.py @@ -77,7 +77,8 @@ class CfgStack (object): if isinstance (include, list): for f in include: for k, v in CfgStack ( - f, no_defaults = True).data.items (): + f, dirs = self.dirs, exts = self.exts, + no_defaults = True).data.items (): if isinstance (d.get (k), dict) and isinstance (v, dict): _dictmerge (d[k], v) else:
Pass search path when recursing
diff --git a/lib/__internal/utils.js b/lib/__internal/utils.js index <HASH>..<HASH> 100644 --- a/lib/__internal/utils.js +++ b/lib/__internal/utils.js @@ -165,7 +165,7 @@ const serializeVariable = ({ key, typedValue }) => { } if (type === "date" && value instanceof Date) { - value = value.toISOString().replace(/Z$/, "UTC+00:00"); + value = value.toISOString().replace(/Z$/, "+0000"); } return { ...typedValue, value, type }; diff --git a/lib/__internal/utils.test.js b/lib/__internal/utils.test.js index <HASH>..<HASH> 100644 --- a/lib/__internal/utils.test.js +++ b/lib/__internal/utils.test.js @@ -267,7 +267,7 @@ describe("utils", () => { it("value should be converted to proper formatted string if type is date and value is an instance of date", () => { // given let dateStr = "2013-06-30T21:04:22.000+0200"; - let formattedDate = "2013-06-30T19:04:22.000UTC+00:00"; + let formattedDate = "2013-06-30T19:04:22.000+0000"; let dateObj = new Date(dateStr); let typedValue = { value: dateObj,
fix(serialization): adjust Date format related to CAM-<I>
diff --git a/leaflet-providers.js b/leaflet-providers.js index <HASH>..<HASH> 100644 --- a/leaflet-providers.js +++ b/leaflet-providers.js @@ -205,7 +205,7 @@ } }, Stamen: { - url: 'http://{s}.tile.stamen.com/{variant}/{z}/{x}/{y}.{ext}', + url: '//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.png', options: { attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' +
https for Stamen (#<I> without the merge commit)
diff --git a/src/Common/Traits/TransientMutator.php b/src/Common/Traits/TransientMutator.php index <HASH>..<HASH> 100644 --- a/src/Common/Traits/TransientMutator.php +++ b/src/Common/Traits/TransientMutator.php @@ -8,7 +8,7 @@ * @license Apache 2.0 */ -namespace Chemem\Bingo\Functional\Common\Applicatives; +namespace Chemem\Bingo\Functional\Common\Traits; trait TransientMutator {
Replaced common/applicatives with common/traits
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -1,12 +1,8 @@ #!/usr/bin/env python from os.path import exists -try: - from setuptools import setup -except ImportError: - from distutils.core import setup +from setuptools import setup, find_packages -from setuptools import find_packages from tz_detect import __version__ setup(
Updating setup.py to use setuptools exclusively (as per recent seed changes)
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- from setuptools import setup -from codecs import open from os import path +from io import open here = path.abspath(path.dirname(__file__)) @@ -11,8 +11,8 @@ with open(path.join(here, 'anpy', '__version.py')) as __version: exec(__version.read()) assert __version__ is not None -with open(path.join(here, 'README.md')) as readme: - LONG_DESC = readme.read().decode('utf-8') +with open(path.join(here, 'README.md'), encoding='utf-8') as readme: + LONG_DESC = readme.read() setup( name='anpy',
Make setup.py compatible with python 3
diff --git a/daemon.go b/daemon.go index <HASH>..<HASH> 100644 --- a/daemon.go +++ b/daemon.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. /* -Package daemon 0.1.2 for use with Go (golang) services. +Package daemon 0.1.3 for use with Go (golang) services. Package daemon provides primitives for daemonization of golang services. This package is not provide implementation of user daemon,
Bumped version number to <I>
diff --git a/app/controllers/katello/api/v2/systems_controller.rb b/app/controllers/katello/api/v2/systems_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/katello/api/v2/systems_controller.rb +++ b/app/controllers/katello/api/v2/systems_controller.rb @@ -158,6 +158,7 @@ class Api::V2::SystemsController < Api::V2::ApiController @system = System.new(system_params(params).merge(:environment => @environment, :content_view => @content_view)) sync_task(::Actions::Headpin::System::Create, @system) + @system.reload respond_for_create end
Reload system after orchestration is finished
diff --git a/lib/vagrant/machine_index.rb b/lib/vagrant/machine_index.rb index <HASH>..<HASH> 100644 --- a/lib/vagrant/machine_index.rb +++ b/lib/vagrant/machine_index.rb @@ -43,7 +43,7 @@ module Vagrant def initialize(data_dir) @data_dir = data_dir @index_file = data_dir.join("index") - @lock = Mutex.new + @lock = Monitor.new @machines = {} @machine_locks = {}
MachineIndex lock is a monitor to allow recursion
diff --git a/lxd/container_test.go b/lxd/container_test.go index <HASH>..<HASH> 100644 --- a/lxd/container_test.go +++ b/lxd/container_test.go @@ -138,7 +138,10 @@ func (suite *containerTestSuite) TestContainer_LoadFromDB() { suite.Req.Nil(err) // When loading from DB, we won't have a full LXC config + c.(*containerLXC).c = nil c.(*containerLXC).cConfig = false + c2.(*containerLXC).c = nil + c2.(*containerLXC).cConfig = false suite.Exactly( c,
lxd/containers: Don't diff go-lxc structs
diff --git a/openquake/calculators/extract.py b/openquake/calculators/extract.py index <HASH>..<HASH> 100644 --- a/openquake/calculators/extract.py +++ b/openquake/calculators/extract.py @@ -202,13 +202,16 @@ def extract_realizations(dstore, dummy): @extract.add('tagcollection') def extract_tagcollection(dstore, what): """ - Extract the tag collection (/extract/tagcollection). + Extract the tag collection (/extract/tagcollection) + and the loss categories. """ dic = {} dic1, dic2 = dstore['assetcol/tagcol'].__toh5__() dic.update(dic1) dic.update(dic2) - return ArrayWrapper((), dic) + array = [name for name in dstore['assetcol/array'].dtype.names + if name.startswith(('value-', 'number', 'occupants_'))] + return ArrayWrapper(array, dic) @extract.add('assets')
While extracting the tagcollection, also extract loss categories Former-commit-id: <I>e6ff5f<I>f9d<I>c4ef9ffa<I>ab9b<I>eea9
diff --git a/pylp/lib/dest.py b/pylp/lib/dest.py index <HASH>..<HASH> 100644 --- a/pylp/lib/dest.py +++ b/pylp/lib/dest.py @@ -14,9 +14,9 @@ from pylp.lib.transformer import Transformer -def dest(path, **options): - return FileWriter(path, **options) +def dest(path, cwd = None): """Return a transformer that writes contents to local files.""" + return FileWriter(path, cwd) @@ -45,11 +45,11 @@ def write_file(path, contents): class FileWriter(Transformer): """Transformer that saves contents to local files.""" - def __init__(self, path, **options): + def __init__(self, path, cwd = None): super().__init__() self.dest = path - self.cwd = options.get('cwd') + self.cwd = cwd self.exe = ThreadPoolExecutor() self.loop = asyncio.get_event_loop()
Make second argument of 'pylp.dest' more explicit
diff --git a/app/models/ping.rb b/app/models/ping.rb index <HASH>..<HASH> 100644 --- a/app/models/ping.rb +++ b/app/models/ping.rb @@ -18,6 +18,14 @@ class Ping class << self OK_RETURN_CODE = 'ok' + PACKAGES = ["katello", + "candlepin", + "pulp", + "thumbslug", + "qpid", + "ldap_fluff", + "elasticsearch", + "foreman"] # # Calls "status" services in all backend engines. @@ -107,7 +115,8 @@ class Ping # get package information for katello and its components def packages - packages = `rpm -qa | egrep "katello|candlepin|pulp|thumbslug|qpid|foreman|ldap_fluff"` + names = PACKAGES.join("|") + packages = `rpm -qa | egrep "#{names}"` packages.split("\n").sort end end
Add elasticsearch package to ping information
diff --git a/gphoto2cffi/gphoto2.py b/gphoto2cffi/gphoto2.py index <HASH>..<HASH> 100644 --- a/gphoto2cffi/gphoto2.py +++ b/gphoto2cffi/gphoto2.py @@ -391,7 +391,7 @@ class File(object): lib.gp_camera_file_get_info( self._cam._cam, self.directory.path.encode(), self.name.encode(), self.__info, self._cam._ctx) - lib.gp_camera_exit(self._cam, self._ctx) + lib.gp_camera_exit(self._cam._cam, self._cam._ctx) except errors.GPhoto2Error: raise ValueError("Could not get file info, are you sure the " "file exists on the device?")
Fix bug that arose when quering a File for its size
diff --git a/client.go b/client.go index <HASH>..<HASH> 100644 --- a/client.go +++ b/client.go @@ -1448,6 +1448,8 @@ another: } func (me *Client) sendChunk(t *torrent, c *connection, r request) error { + // Count the chunk being sent, even if it isn't. + c.chunksSent++ b := make([]byte, r.Length) tp := t.Pieces[r.Index] tp.pendingWritesMutex.Lock() @@ -1470,7 +1472,6 @@ func (me *Client) sendChunk(t *torrent, c *connection, r request) error { Piece: b, }) uploadChunksPosted.Add(1) - c.chunksSent++ c.lastChunkSent = time.Now() return nil }
Count failed chunk sends against a connection
diff --git a/spec/ascii_plist/reader_spec.rb b/spec/ascii_plist/reader_spec.rb index <HASH>..<HASH> 100644 --- a/spec/ascii_plist/reader_spec.rb +++ b/spec/ascii_plist/reader_spec.rb @@ -46,6 +46,21 @@ module AsciiPlist end end + describe 'reading annotations' do + let(:string) { '{a /*annotation*/ = ( b /*another annotation*/ )' } + let(:reader) { Reader.new(string) } + subject { reader.parse!.root_object } + + xit 'should read the annotations correctly' do + expect(subject).to eq AsciiPlist::Dictionary.new({ + AsciiPlist::String.new('a', 'annotation') => + AsciiPlist::Array.new([ + AsciiPlist::String.new('b', 'another annotation') + ]) + }, '') + end + end + describe 'reading root level dictionaries' do let(:string) { '{a = "a";"b" = b;"c" = "c"; d = d;}' }
Add failing spec for reading annotations
diff --git a/proctl/proctl_linux_amd64.go b/proctl/proctl_linux_amd64.go index <HASH>..<HASH> 100644 --- a/proctl/proctl_linux_amd64.go +++ b/proctl/proctl_linux_amd64.go @@ -279,7 +279,7 @@ func (dbp *DebuggedProcess) Next() error { pc-- } - f, l, _ := dbp.GoSymTable.PCToLine(pc) + _, l, fn := dbp.GoSymTable.PCToLine(pc) fde, err := dbp.FrameEntries.FDEForPC(pc) if err != nil { return err @@ -314,11 +314,9 @@ func (dbp *DebuggedProcess) Next() error { return err } - nf, nl, _ := dbp.GoSymTable.PCToLine(pc) - if nf == f && nl != l { - if fde.AddressRange.Cover(pc) { - break - } + _, nl, nfn := dbp.GoSymTable.PCToLine(pc) + if nfn == fn && nl != l { + break } }
Improve 'in current fn' check for Next impl
diff --git a/toot/tui/timeline.py b/toot/tui/timeline.py index <HASH>..<HASH> 100644 --- a/toot/tui/timeline.py +++ b/toot/tui/timeline.py @@ -171,6 +171,13 @@ class StatusDetails(urwid.Pile): yield ("pack", urwid.Divider()) yield ("pack", self.build_linebox(self.card_generator(card))) + yield ("pack", urwid.AttrWrap(urwid.Divider("-"), "gray")) + yield ("pack", urwid.Text([ + ("gray", "⤶ {} ".format(status.data["replies_count"])), + ("yellow" if status.reblogged else "gray", "♺ {} ".format(status.data["reblogs_count"])), + ("yellow" if status.favourited else "gray", "★ {}".format(status.data["favourites_count"])), + ])) + # Push things to bottom yield ("weight", 1, urwid.SolidFill(" ")) yield ("pack", urwid.Text([
Add reply, reblog and favourite counters
diff --git a/src/adapters/lokijs/worker/executor.js b/src/adapters/lokijs/worker/executor.js index <HASH>..<HASH> 100644 --- a/src/adapters/lokijs/worker/executor.js +++ b/src/adapters/lokijs/worker/executor.js @@ -58,11 +58,7 @@ export default class LokiExecutor { isCached(table: TableName<any>, id: RecordId): boolean { const cachedSet = this.cachedRecords.get(table) - if (!cachedSet) { - return false - } - - return cachedSet.has(id) + return cachedSet ? cachedSet.has(id) : false } markAsCached(table: TableName<any>, id: RecordId): void {
Inline `isCached` implementation
diff --git a/allennlp/semparse/domain_languages/nlvr_language.py b/allennlp/semparse/domain_languages/nlvr_language.py index <HASH>..<HASH> 100644 --- a/allennlp/semparse/domain_languages/nlvr_language.py +++ b/allennlp/semparse/domain_languages/nlvr_language.py @@ -117,7 +117,7 @@ class NlvrLanguage(DomainLanguage): # this field to know how many terminals to plan for. self.terminal_productions: Dict[str, str] = {} for name, type_ in self._function_types.items(): - self.terminal_productions[name] = "%s -> %s" % (type_, name) + self.terminal_productions[name] = f"{type_} -> {name}" # These first two methods are about getting an "agenda", which, given an input utterance, # tries to guess what production rules should be needed in the logical form.
Use f-string (#<I>)
diff --git a/lib/git/trifle.rb b/lib/git/trifle.rb index <HASH>..<HASH> 100644 --- a/lib/git/trifle.rb +++ b/lib/git/trifle.rb @@ -29,8 +29,8 @@ module Git # needless to do more than this for the following methods # very neat BTW DELEGATORS = %W| - add_remote add branch branches - current_branch commit dir fetch + add add_remote apply branch branches + current_branch commit dir diff fetch log ls_files merge pull push reset remotes remove |.
now trifle forwards apply and diff
diff --git a/src/sap.m/src/sap/m/SinglePlanningCalendarGrid.js b/src/sap.m/src/sap/m/SinglePlanningCalendarGrid.js index <HASH>..<HASH> 100644 --- a/src/sap.m/src/sap/m/SinglePlanningCalendarGrid.js +++ b/src/sap.m/src/sap/m/SinglePlanningCalendarGrid.js @@ -2033,6 +2033,14 @@ sap.ui.define([ // Turn of the cycling this._oItemNavigation.setCycling(false); + //this way we do not hijack the browser back/forward navigation + this._oItemNavigation.setDisabledModifiers({ + sapnext: ["alt", "meta"], + sapprevious: ["alt", "meta"], + saphome : ["alt", "meta"], + sapend : ["meta"] + }); + // explicitly setting table mode this._oItemNavigation.setTableMode(true, true).setColumns(this._getColumns());
[INTERNAL] sap.m.SinglePlanningCalendarGrid: Default browser keyboard navigation is fixed - The default browser keyboard navigation with Alt + Left Arrow/Right Arrow is fixed Change-Id: I<I>f<I>cb<I>c<I>fcf<I>ff<I>ab9f8fc<I>a9cb5d
diff --git a/js/base/Exchange.js b/js/base/Exchange.js index <HASH>..<HASH> 100644 --- a/js/base/Exchange.js +++ b/js/base/Exchange.js @@ -1385,7 +1385,7 @@ module.exports = class Exchange { const parts = marketId.split (delimiter) if (parts.length === 2) { const baseId = this.safeString (parts, 0); - const quoteId = this.safeString (parts, 0); + const quoteId = this.safeString (parts, 1); const base = this.safeCurrencyCode (baseId) const quote = this.safeCurrencyCode (quoteId) const symbol = base + '/' + quote
safeMarket handle spot delimiter #<I>
diff --git a/mod/glossary/sql.php b/mod/glossary/sql.php index <HASH>..<HASH> 100644 --- a/mod/glossary/sql.php +++ b/mod/glossary/sql.php @@ -109,7 +109,7 @@ $where = ''; } - $sqlselect = "SELECT ge.id, $usernamefield $as pivot, u.id uid, ge.*"; + $sqlselect = "SELECT ge.id, $usernamefield $as pivot, u.id as uid, ge.*"; $sqlfrom = "FROM {$CFG->prefix}glossary_entries ge, {$CFG->prefix}user u"; $sqlwhere = "WHERE ge.userid = u.id AND (ge.approved != 0 $userid)
Merged from MOODLE_<I>_STABLE: Fix for postgres-invalid-sql (must have AS between field and alias)
diff --git a/packages/site/pages/components/badge.js b/packages/site/pages/components/badge.js index <HASH>..<HASH> 100644 --- a/packages/site/pages/components/badge.js +++ b/packages/site/pages/components/badge.js @@ -59,10 +59,8 @@ export default withServerProps(_ => ( <P>In either solid or stroked styles.</P> <Example.React includes={{ Badge }} - codes={[`<Badge>Badge</Badge>`].concat( - Object.keys(Badge.appearances).map( - a => `<Badge appearance={Badge.appearances.${a}}>Badge</Badge>` - ) + codes={Object.keys(Badge.appearances).map( + a => `<Badge appearance={Badge.appearances.${a}}>Badge</Badge>` )} />
fix(site): remove duplicate badge appearance example
diff --git a/src/core.js b/src/core.js index <HASH>..<HASH> 100644 --- a/src/core.js +++ b/src/core.js @@ -34,15 +34,15 @@ void function (root) { var __old, black return target } - // Unpacks all modules in source. Utils go in `target` or the global obj - function unpack_all(kind, source, target) { - keys(root).forEach(function(module) { - module = root[module] + // Unpacks all modules in black. Utils go in `target` or the global obj + function unpack_all(kind, global) { + keys(this).forEach(function(module) { + module = root[this] if (!fnp(module)) unpack( kind - , source - , target || top + , this + , global || top , module.$box - , module) }) + , module) }, this) } // Transforms a generic method into a SLOOOOOOOOOOOW instance method.
Uses `this` to search for modules to unpack.
diff --git a/keychain/derivation.go b/keychain/derivation.go index <HASH>..<HASH> 100644 --- a/keychain/derivation.go +++ b/keychain/derivation.go @@ -96,6 +96,13 @@ const ( // session keys are limited to the lifetime of the session and are used // to increase privacy in the watchtower protocol. KeyFamilyTowerSession KeyFamily = 8 + + // KeyFamilyTowerID is the family of keys used to derive the public key + // of a watchtower. This made distinct from the node key to offer a form + // of rudimentary whitelisting, i.e. via knowledge of the pubkey, + // preventing others from having full access to the tower just as a + // result of knowing the node key. + KeyFamilyTowerID KeyFamily = 9 ) // KeyLocator is a two-tuple that can be used to derive *any* key that has ever
keychain/derivation: add KeyFamilyTowerKey distinct from NodeID
diff --git a/test/test_Exceptions.py b/test/test_Exceptions.py index <HASH>..<HASH> 100644 --- a/test/test_Exceptions.py +++ b/test/test_Exceptions.py @@ -57,6 +57,14 @@ class TestUtil(unittest.TestCase): text = str(exc) self.assertEqual(text, "") + def test_hresult(self): + hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) + self.assertEqual(hresult, SCARD_S_SUCCESS) + + hresult, hcard, dwActiveProtocol = SCardConnect( + hcontext, "INVALID READER NAME", SCARD_SHARE_SHARED, SCARD_PROTOCOL_ANY + ) + self.assertEqual(hresult, SCARD_E_UNKNOWN_READER) if __name__ == '__main__': unittest.main()
test_SCardGetErrorMessage: check the value of SCARD_E_UNKNOWN_READER macOS and Linux does not define the return type of PC/SC function the same way. So we check the returned value correspond to what PySCard has defined.
diff --git a/pyontutils/integration_test_helper.py b/pyontutils/integration_test_helper.py index <HASH>..<HASH> 100644 --- a/pyontutils/integration_test_helper.py +++ b/pyontutils/integration_test_helper.py @@ -222,7 +222,7 @@ class _TestScriptsBase(unittest.TestCase): ' cannot test main, skipping.') return - if argv and argv[0] != script: + if argv and argv[0] != script.__name__.rsplit('.', 1)[-1]: os.system(' '.join(argv)) # FIXME error on this? try: @@ -271,6 +271,9 @@ class _TestScriptsBase(unittest.TestCase): for j_ind, argv in enumerate(argvs): mname = f'test_{i_ind + npaths:0>3}_{j_ind:0>3}_' + pex + if argv: + mname += '_' + '_'.join(argv).replace('-', '_') + #print('MPATH: ', module_path) test_main = cls.make_test_main(do_mains, post_main, module_path, argv, stem in mains, stem in tests, skip)
int test helper fixes and more informative names we were testing whether a string was not equal to a module, which was always going to return true, so now compare to the last element in the module path now also include argv in the generated test names, it makes the names annoyingly long in some cases, but if something fails then it is much easier to identify what command was actually issued
diff --git a/lib/rubocop/cop/cop.rb b/lib/rubocop/cop/cop.rb index <HASH>..<HASH> 100644 --- a/lib/rubocop/cop/cop.rb +++ b/lib/rubocop/cop/cop.rb @@ -57,13 +57,15 @@ module Rubocop sexp.each do |elem| if Array === elem if elem[0] == sym - parents << sexp + parents << sexp unless parents.include?(sexp) elem = elem[1..-1] end - each_parent_of(sym, elem) { |parent| parents << parent } + each_parent_of(sym, elem) do |parent| + parents << parent unless parents.include?(parent) + end end end - parents.uniq.each { |parent| yield parent } + parents.each { |parent| yield parent } end def each(sym, sexp)
Added elements to array only if they're not already in there instead of calling uniq afterwards.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -129,7 +129,12 @@ Tree.prototype.list = function (name, opts, cb) { } Tree.prototype._list = function (head, seq, names, opts, cb) { - var headIndex = this._inflate(seq, head.paths) + var headIndex + try { + headIndex = this._inflate(seq, head.paths) + } catch (e) { + return cb(e) + } var cmp = compare(split(head.name), names) var index = cmp < headIndex.length && headIndex[cmp] @@ -294,7 +299,12 @@ Tree.prototype._get = function (head, seq, names, record, opts, cb) { return cb(null, this._codec.decode(head.value)) } - var inflated = this._inflate(seq, head.paths) + var inflated + try { + inflated = this._inflate(seq, head.paths) + } catch (e) { + return cb(e) + } if (cmp >= inflated.length) return cb(notFound(names)) var index = inflated[cmp]
Catch _inflate errors and send them to the cb
diff --git a/client/src/main/java/com/orientechnologies/orient/enterprise/channel/binary/OChannelBinaryClientAbstract.java b/client/src/main/java/com/orientechnologies/orient/enterprise/channel/binary/OChannelBinaryClientAbstract.java index <HASH>..<HASH> 100755 --- a/client/src/main/java/com/orientechnologies/orient/enterprise/channel/binary/OChannelBinaryClientAbstract.java +++ b/client/src/main/java/com/orientechnologies/orient/enterprise/channel/binary/OChannelBinaryClientAbstract.java @@ -117,7 +117,7 @@ public abstract class OChannelBinaryClientAbstract extends OChannelBinary { } catch (Exception e) { // UNABLE TO REPRODUCE THE SAME SERVER-SIZE EXCEPTION: THROW AN IO EXCEPTION - rootException = OException.wrapException(new OIOException(iMessage), iPrevious); + rootException = OException.wrapException(new OSystemException(iMessage), iPrevious); } if (c != null)
fixed wrong retry in case of not found serialized exception in the client.
diff --git a/src/main/java/net/jodah/typetools/TypeResolver.java b/src/main/java/net/jodah/typetools/TypeResolver.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/jodah/typetools/TypeResolver.java +++ b/src/main/java/net/jodah/typetools/TypeResolver.java @@ -109,7 +109,7 @@ public final class TypeResolver { accessSetter = new AccessMaker() { @Override public void makeAccessible(AccessibleObject object) throws Throwable { - overrideSetter.invoke(new Object[] {object, true}); + overrideSetter.invokeWithArguments(new Object[] {object, true}); } }; }
use invokeWithArguments instead of invoke to support Java <I> Java <I> changed the way the JVM handles varargs internally, meaning that new Object[] {...} can't be used as a substitute for varargs on Java 6 source level anymore. However, invokeWithArguments explicitly wants an Object[], so it still works.
diff --git a/spec/attr_enumerable/reduce_attr_spec.rb b/spec/attr_enumerable/reduce_attr_spec.rb index <HASH>..<HASH> 100644 --- a/spec/attr_enumerable/reduce_attr_spec.rb +++ b/spec/attr_enumerable/reduce_attr_spec.rb @@ -36,7 +36,7 @@ describe AttrEnumerable do ), method: :reduce_name, block: lambda { |r, x|r ||= ''; r = "#{r}#{x.upcase}"; r }, - expected: '0TANAKATANAKASUZUKI', + expected: '0TANAKATANAKASUZUKI' }, { case_no: 2, @@ -50,7 +50,7 @@ describe AttrEnumerable do ), method: :reduce_age, block: lambda { |r, x|r ||= 0; r += x + 1; r }, - expected: 127, + expected: 127 }, { case_no: 3, @@ -58,7 +58,7 @@ describe AttrEnumerable do klass: AttrEnumerablePersons.new([]), method: :reduce_name, block: lambda { |x|x += 1 }, - expected: 0, + expected: 0 } ]
Fix rubocop warning 'TrailingComma' in reduce_attr_spec.rb
diff --git a/src/ContaoCommunityAlliance/Composer/Plugin/Plugin.php b/src/ContaoCommunityAlliance/Composer/Plugin/Plugin.php index <HASH>..<HASH> 100644 --- a/src/ContaoCommunityAlliance/Composer/Plugin/Plugin.php +++ b/src/ContaoCommunityAlliance/Composer/Plugin/Plugin.php @@ -472,7 +472,7 @@ class Plugin } } - $this->contaoRoot = $root; + $this->contaoRoot = realpath($root); } $systemDir = $this->contaoRoot . DIRECTORY_SEPARATOR . 'system' . DIRECTORY_SEPARATOR;
Fix issue #<I> - Use realpath() for contao root to always have absolute pathes.
diff --git a/lib/lita/mailgun_dropped_rate_repository.rb b/lib/lita/mailgun_dropped_rate_repository.rb index <HASH>..<HASH> 100644 --- a/lib/lita/mailgun_dropped_rate_repository.rb +++ b/lib/lita/mailgun_dropped_rate_repository.rb @@ -29,8 +29,8 @@ module Lita @mutex.synchronize do @store[domain] ||= [] @store[domain] << event_name - if @store[domain].size > 100 - @store[domain] = @store[domain].slice(-100, 100) + if @store[domain].size > 20 + @store[domain] = @store[domain].slice(-20, 20) end end true diff --git a/spec/mailgun_dropped_rate_repository_spec.rb b/spec/mailgun_dropped_rate_repository_spec.rb index <HASH>..<HASH> 100644 --- a/spec/mailgun_dropped_rate_repository_spec.rb +++ b/spec/mailgun_dropped_rate_repository_spec.rb @@ -31,9 +31,9 @@ describe Lita::MailgunDroppedRateRepository do end end end - context "when a single domain records 101 events" do + context "when a single domain records 21 events" do before do - 101.times do + 21.times do repository.record("example.com", :delivered) end end @@ -49,7 +49,7 @@ describe Lita::MailgunDroppedRateRepository do end it "sets the total_count" do - expect(result.total).to eq(100) + expect(result.total).to eq(20) end it "includes the dropped rate" do
reduce history stored for each domain to <I> events * <I> should be plenty to decide if there's an issue or not * It's also low enough that low-volume domains that have an issue resolved should move into the green zone quicker
diff --git a/classes/VideoDownload.php b/classes/VideoDownload.php index <HASH>..<HASH> 100644 --- a/classes/VideoDownload.php +++ b/classes/VideoDownload.php @@ -110,12 +110,13 @@ class VideoDownload $process->run(); if (!$process->isSuccessful()) { $errorOutput = trim($process->getErrorOutput()); + $exitCode = $process->getExitCode(); if ($errorOutput == 'ERROR: This video is protected by a password, use the --video-password option') { - throw new PasswordException($errorOutput); + throw new PasswordException($errorOutput, $exitCode); } elseif (substr($errorOutput, 0, 21) == 'ERROR: Wrong password') { - throw new Exception(_('Wrong password')); + throw new Exception(_('Wrong password'), $exitCode); } else { - throw new Exception($errorOutput); + throw new Exception($errorOutput, $exitCode); } } else { return trim($process->getOutput());
feat: Add youtube-dl exit code to the exceptions
diff --git a/lib/shopify_app/webhooks_manager.rb b/lib/shopify_app/webhooks_manager.rb index <HASH>..<HASH> 100644 --- a/lib/shopify_app/webhooks_manager.rb +++ b/lib/shopify_app/webhooks_manager.rb @@ -30,7 +30,7 @@ module ShopifyApp end def destroy_webhooks - ShopifyAPI::Webhook.all.each do |webhook| + ShopifyAPI::Webhook.all.to_a.each do |webhook| ShopifyAPI::Webhook.delete(webhook.id) if is_required_webhook?(webhook) end diff --git a/test/shopify_app/webhooks_manager_test.rb b/test/shopify_app/webhooks_manager_test.rb index <HASH>..<HASH> 100644 --- a/test/shopify_app/webhooks_manager_test.rb +++ b/test/shopify_app/webhooks_manager_test.rb @@ -50,6 +50,12 @@ class ShopifyApp::WebhooksManagerTest < ActiveSupport::TestCase @manager.recreate_webhooks! end + test "#destroy_webhooks doesnt freak out if there are no webhooks" do + ShopifyAPI::Webhook.stubs(:all).returns(nil) + + @manager.destroy_webhooks + end + test "#destroy_webhooks makes calls to destroy webhooks" do ShopifyAPI::Webhook.stubs(:all).returns(Array.wrap(all_mock_webhooks.first)) ShopifyAPI::Webhook.expects(:delete).with(all_mock_webhooks.first.id)
sometimes the shopify api can return a nil to us. so lets make sure we dont try to call #each on nil
diff --git a/src/tools/bubblechart/bubblechart-trail.js b/src/tools/bubblechart/bubblechart-trail.js index <HASH>..<HASH> 100644 --- a/src/tools/bubblechart/bubblechart-trail.js +++ b/src/tools/bubblechart/bubblechart-trail.js @@ -208,6 +208,15 @@ export default Class.extend({ }, + + _remove: function(trail, duration, d) { + this.actionsQueue[d[this.context.KEY]] = []; + if (trail) { // TODO: in some reason run twice + d3.select(this.entityTrails[d[this.context.KEY]].node().parentNode).remove(); + this.entityTrails[d[this.context.KEY]] = null; + } + }, + _resize: function(trail, duration, d) { var _context = this.context; if (_context.model.time.splash) {
Turn off trails: _context._trails[("_" + action)] is not a function (#<I>)
diff --git a/test/plugin/test_in_gc_stat.rb b/test/plugin/test_in_gc_stat.rb index <HASH>..<HASH> 100644 --- a/test/plugin/test_in_gc_stat.rb +++ b/test/plugin/test_in_gc_stat.rb @@ -27,13 +27,18 @@ class GCStatInputTest < Test::Unit::TestCase stub(GC).stat { stat } d = create_driver + d.end_if do + d.emit_count >= 2 + end d.run do - sleep 2 + sleep(0.1) until d.stop? end events = d.events assert(events.length > 0) - assert_equal(stat, events[0][2]) - assert(events[0][1].is_a?(Fluent::EventTime)) + events.each_index {|i| + assert_equal(stat, events[i][2]) + assert(events[i][1].is_a?(Fluent::EventTime)) + } end end
Use new end_if stop condition block
diff --git a/lib/nexmo/config.rb b/lib/nexmo/config.rb index <HASH>..<HASH> 100644 --- a/lib/nexmo/config.rb +++ b/lib/nexmo/config.rb @@ -8,9 +8,9 @@ module Nexmo self.api_host = 'api.nexmo.com' self.api_key = ENV['NEXMO_API_KEY'] self.api_secret = ENV['NEXMO_API_SECRET'] - self.application_id = nil + self.application_id = ENV['NEXMO_APPLICATION_ID'] self.logger = (defined?(Rails.logger) && Rails.logger) || ::Logger.new(nil) - self.private_key = nil + self.private_key = ENV['NEXMO_PRIVATE_KEY_PATH'] ? File.read(ENV['NEXMO_PRIVATE_KEY_PATH']) : ENV['NEXMO_PRIVATE_KEY'] self.rest_host = 'rest.nexmo.com' self.signature_secret = ENV['NEXMO_SIGNATURE_SECRET'] self.signature_method = ENV['NEXMO_SIGNATURE_METHOD'] || 'md5hash'
Add support for additional environment variables * `ENV['NEXMO_APPLICATION_ID']` * `ENV['NEXMO_PRIVATE_KEY']` * `ENV['NEXMO_PRIVATE_KEY_PATH']`
diff --git a/pycm/pycm_obj.py b/pycm/pycm_obj.py index <HASH>..<HASH> 100644 --- a/pycm/pycm_obj.py +++ b/pycm/pycm_obj.py @@ -400,7 +400,7 @@ class ConfusionMatrix(): matrix = self.table if normalize: matrix = self.normalized_table - csv_matrix_file = open(name + "_matrix" + ".csv", "w") + csv_matrix_file = open(name + "_matrix" + ".csv", "w", encoding="utf-8") csv_matrix_data = csv_matrix_print( self.classes, matrix, header=header) csv_matrix_file.write(csv_matrix_data)
fix : minor bugs fixed. (encoding utf-8 added)
diff --git a/python/ray/tests/test_multi_node.py b/python/ray/tests/test_multi_node.py index <HASH>..<HASH> 100644 --- a/python/ray/tests/test_multi_node.py +++ b/python/ray/tests/test_multi_node.py @@ -638,6 +638,13 @@ def test_multi_driver_logging(ray_start_regular): driver2_wait = Semaphore.options(name="driver2_wait").remote(value=0) main_wait = Semaphore.options(name="main_wait").remote(value=0) + # The creation of an actor is asynchronous. + # We need to wait for the completion of the actor creation, + # otherwise we can't get the actor by name. + ray.get(driver1_wait.locked.remote()) + ray.get(driver2_wait.locked.remote()) + ray.get(main_wait.locked.remote()) + # Params are address, semaphore name, output1, output2 driver_script_template = """ import ray
Fix bug that `test_multi_node.py::test_multi_driver_logging` hangs when GCS actor management is turned on (#<I>)
diff --git a/osmdroid-android/src/org/osmdroid/tileprovider/MapTileProviderArray.java b/osmdroid-android/src/org/osmdroid/tileprovider/MapTileProviderArray.java index <HASH>..<HASH> 100644 --- a/osmdroid-android/src/org/osmdroid/tileprovider/MapTileProviderArray.java +++ b/osmdroid-android/src/org/osmdroid/tileprovider/MapTileProviderArray.java @@ -79,7 +79,9 @@ public class MapTileProviderArray extends MapTileProviderBase { public Drawable getMapTile(final MapTile pTile) { final Drawable tile = mTileCache.getMapTile(pTile); if (tile != null && !ExpirableBitmapDrawable.isDrawableExpired(tile)) { - + if (DEBUGMODE) { + logger.debug("MapTileCache succeeded for: " + pTile); + } return tile; } else { boolean alreadyInProgress = false;
put back a log message that I didn't intend to delete
diff --git a/java/client/src/org/openqa/selenium/android/library/AndroidWebDriver.java b/java/client/src/org/openqa/selenium/android/library/AndroidWebDriver.java index <HASH>..<HASH> 100644 --- a/java/client/src/org/openqa/selenium/android/library/AndroidWebDriver.java +++ b/java/client/src/org/openqa/selenium/android/library/AndroidWebDriver.java @@ -130,7 +130,7 @@ public class AndroidWebDriver implements WebDriver, SearchContext, JavascriptExe // Timeouts in milliseconds private static final long LOADING_TIMEOUT = 30000L; private static final long START_LOADING_TIMEOUT = 700L; - static final long RESPONSE_TIMEOUT = 10000L; + static final long RESPONSE_TIMEOUT = 15000L; private static final long FOCUS_TIMEOUT = 1000L; private static final long POLLING_INTERVAL = 50L; static final long UI_TIMEOUT = 3000L;
DouniaBerrada: Increasing the response timeout for android. This is useful for executing lonnnnnng js scripts. r<I>
diff --git a/hazelcast/src/main/java/com/hazelcast/spi/impl/operationparker/impl/OperationParkerImpl.java b/hazelcast/src/main/java/com/hazelcast/spi/impl/operationparker/impl/OperationParkerImpl.java index <HASH>..<HASH> 100644 --- a/hazelcast/src/main/java/com/hazelcast/spi/impl/operationparker/impl/OperationParkerImpl.java +++ b/hazelcast/src/main/java/com/hazelcast/spi/impl/operationparker/impl/OperationParkerImpl.java @@ -90,7 +90,7 @@ public class OperationParkerImpl implements OperationParker, LiveOperationsTrack } } - // Runs in operation thread, we can assume that + // Runs in operation thread, we can assume that // here we have an implicit lock for specific WaitNotifyKey. // see javadoc @Override @@ -177,7 +177,7 @@ public class OperationParkerImpl implements OperationParker, LiveOperationsTrack public void shutdown() { logger.finest("Stopping tasks..."); expirationTaskFuture.cancel(true); - expirationExecutor.shutdown(); + expirationExecutor.shutdownNow(); for (WaitSet waitSet : waitSetMap.values()) { waitSet.onShutdown(); }
Call shutdownNow while closing OperationParkerImpl (#<I>)
diff --git a/src/inscriptis/html_properties.py b/src/inscriptis/html_properties.py index <HASH>..<HASH> 100644 --- a/src/inscriptis/html_properties.py +++ b/src/inscriptis/html_properties.py @@ -72,4 +72,4 @@ class Line(object): '\n' * self.margin_after)) def __str__(self): - return f"<Line: '{self.get_text().strip()}'>" + return "<Line: '{}'>".format(self.get_text().strip())
fix: python<I> issue.
diff --git a/src/DataTable/utils/queryParams.js b/src/DataTable/utils/queryParams.js index <HASH>..<HASH> 100644 --- a/src/DataTable/utils/queryParams.js +++ b/src/DataTable/utils/queryParams.js @@ -702,7 +702,7 @@ export function getQueryParams({ qb.whereAll( getQueries(andFilters, qb, ccFields), additionalFilterToUse - ).andWhereAny(...allOrFilters); + ).orWhereAny(...allOrFilters); } catch (e) { if (urlConnected) { errorParsingUrlString = e;
or filters are now ored properly
diff --git a/pdfconduit/__init__.py b/pdfconduit/__init__.py index <HASH>..<HASH> 100644 --- a/pdfconduit/__init__.py +++ b/pdfconduit/__init__.py @@ -5,7 +5,7 @@ from pdf.conduit import * try: from pdf.gui.gui import GUI GUI_INSTALLED = True - __all__.extend("GUI") + __all__.append("GUI") except ImportError: GUI_INSTALLED = False @@ -13,7 +13,7 @@ except ImportError: try: from pdf.modify import upscale, rotate, slicer MODIFY_INSTALLED = True - __all__.extend("slicer", "upscale", "rotate") + __all__.extend(["slicer", "upscale", "rotate"]) except ImportError: MODIFY_INSTALLED = False @@ -21,6 +21,8 @@ except ImportError: try: from pdf.convert import Flatten MODIFY_INSTALLED = True - __all__.extend("Flatten") + __all__.append("Flatten") except ImportError: MODIFY_INSTALLED = False + +print(__all__) \ No newline at end of file
Changed extend to append for non-lists
diff --git a/lib/bbcloud/servers.rb b/lib/bbcloud/servers.rb index <HASH>..<HASH> 100644 --- a/lib/bbcloud/servers.rb +++ b/lib/bbcloud/servers.rb @@ -6,11 +6,11 @@ module Brightbox end def server_type - @server_type ||= Type.new(flavor_id) + @server_type ||= (Type.new(flavor_id) if flavor_id) end def image - @image ||= Image.new(image_id) + @image ||= (Image.new(image_id) if image_id) end def attributes @@ -19,7 +19,7 @@ module Brightbox a[:created_at] = created_at a[:created_on] = fog_model.created_at.strftime("%Y-%m-%d") a[:type] = server_type - a[:zone] = Zone.new(zone_id) + a[:zone] = Zone.new(zone_id) if zone_id a[:hostname] = hostname a[:public_hostname] = public_hostname unless cloud_ips.empty? a
servers#list fix display of deleted servers. Fixes #<I>
diff --git a/js/tests/unit/carousel.spec.js b/js/tests/unit/carousel.spec.js index <HASH>..<HASH> 100644 --- a/js/tests/unit/carousel.spec.js +++ b/js/tests/unit/carousel.spec.js @@ -905,7 +905,7 @@ describe('Carousel', () => { }) describe('to', () => { - it('should go directement to the provided index', done => { + it('should go directly to the provided index', done => { fixtureEl.innerHTML = [ '<div id="myCarousel" class="carousel slide">', ' <div class="carousel-inner">',
test(carousel): french word in the wild (#<I>)
diff --git a/lib/Thulium/Db/ModelQueryBuilder.php b/lib/Thulium/Db/ModelQueryBuilder.php index <HASH>..<HASH> 100644 --- a/lib/Thulium/Db/ModelQueryBuilder.php +++ b/lib/Thulium/Db/ModelQueryBuilder.php @@ -127,4 +127,14 @@ class ModelQueryBuilder return $this; } + function __clone() + { + $this->_query = clone $this->_query; + } + + function copy() + { + return clone $this; + } + } \ No newline at end of file diff --git a/test/lib/Thulium/Db/ModelQueryBuilderTest.php b/test/lib/Thulium/Db/ModelQueryBuilderTest.php index <HASH>..<HASH> 100644 --- a/test/lib/Thulium/Db/ModelQueryBuilderTest.php +++ b/test/lib/Thulium/Db/ModelQueryBuilderTest.php @@ -449,4 +449,21 @@ class ModelQueryBuilderTest extends DbTransactionalTestCase $this->assertCount(1, $products); $this->assertEquals($product, $products[0]); } + + /** + * @test + */ + public function shouldCloneBuilder() + { + //given + $product = Product::create(array('name' => 'a')); + $query = Product::where(); + + //when + $query->copy()->where(array('name' => 'other'))->count(); + + //then + $this->assertEquals($product, $query->fetch()); + } + } \ No newline at end of file
ModelQueryBuilder: added method 'copy'
diff --git a/libraries/lithium/data/Connections.php b/libraries/lithium/data/Connections.php index <HASH>..<HASH> 100644 --- a/libraries/lithium/data/Connections.php +++ b/libraries/lithium/data/Connections.php @@ -188,10 +188,12 @@ class Connections extends \lithium\core\StaticObject { $class = Libraries::locate("adapter.data.source.{$config['type']}", $config['adapter']); } if (!$class) { - throw new Exception("{$config['type']} adapter {$config['adapter']} could not be found"); + throw new Exception( + "{$config['type']} adapter {$config['adapter']} could not be found" + ); } return new $class($config); } } -?> +?> \ No newline at end of file
removed newline at end of file and fixed an extra long line
diff --git a/pyof/v0x04/common/flow_match.py b/pyof/v0x04/common/flow_match.py index <HASH>..<HASH> 100644 --- a/pyof/v0x04/common/flow_match.py +++ b/pyof/v0x04/common/flow_match.py @@ -393,6 +393,25 @@ class Match(GenericStruct): self._unpack_attribute('oxm_match_fields', type(self).oxm_match_fields, buff[:offset+self.length], begin) + def get_field(self, field_type): + """Return the value for the 'field_type' field in oxm_match_fields. + + Args: + field_type (~pyof.v0x04.common.flow_match.OxmOfbMatchField, + ~pyof.v0x04.common.flow_match.OxmMatchFields): + The type of the OXM field you want the value. + + Returns: + The integer number of the 'field_type' if it exists. Otherwise + return None. + + """ + for field in self.oxm_match_fields: + if field.oxm_field == field_type: + return field.oxm_value + + return None + class OxmExperimenterHeader(GenericStruct): """Header for OXM experimenter match fields."""
[v0x<I>] Add Match.get_field method This method allows us to easily get the value for Match fields without the need to loop over them manually.
diff --git a/src/instrumentTest/java/com/couchbase/lite/ApiTest.java b/src/instrumentTest/java/com/couchbase/lite/ApiTest.java index <HASH>..<HASH> 100644 --- a/src/instrumentTest/java/com/couchbase/lite/ApiTest.java +++ b/src/instrumentTest/java/com/couchbase/lite/ApiTest.java @@ -305,10 +305,7 @@ public class ApiTest extends LiteTestCase { assertTrue(!doc.getCurrentRevision().isDeletion()); assertTrue(doc.delete()); assertTrue(doc.isDeleted()); - //After deleting a document, its currentRevision is nil - //https://github.com/couchbase/couchbase-lite-java-core/issues/92 assertNull(doc.getCurrentRevision()); - assertNotNull(doc.getCurrentRevision().isDeletion()); }
Remove another test assertion that did not make sense. <URL>