diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/datasource-decorator-spring-boot-autoconfigure/src/main/java/com/github/gavlyukovskiy/cloud/sleuth/TracingJdbcEventListener.java b/datasource-decorator-spring-boot-autoconfigure/src/main/java/com/github/gavlyukovskiy/cloud/sleuth/TracingJdbcEventListener.java
index <HASH>..<HASH> 100644
--- a/datasource-decorator-spring-boot-autoconfigure/src/main/java/com/github/gavlyukovskiy/cloud/sleuth/TracingJdbcEventListener.java
+++ b/datasource-decorator-spring-boot-autoconfigure/src/main/java/com/github/gavlyukovskiy/cloud/sleuth/TracingJdbcEventListener.java
@@ -120,6 +120,7 @@ public class TracingJdbcEventListener extends SimpleJdbcEventListener {
public void onAfterResultSetClose(ResultSetInformation resultSetInformation, SQLException e) {
Span statementSpan = tracer.getCurrentSpan();
statementSpan.logEvent(Span.CLIENT_RECV);
+ tracer.addTag(SleuthListenerConfiguration.SPAN_ROW_COUNT_TAG_NAME, String.valueOf(resultSetInformation.getCurrRow()));
if (e != null) {
tracer.addTag(Span.SPAN_ERROR_TAG_NAME, ExceptionUtils.getExceptionMessage(e));
} | Added row-count tag from ResultSet statements |
diff --git a/minium-script-rhinojs/src/main/java/minium/script/rhinojs/RhinoWebModules.java b/minium-script-rhinojs/src/main/java/minium/script/rhinojs/RhinoWebModules.java
index <HASH>..<HASH> 100644
--- a/minium-script-rhinojs/src/main/java/minium/script/rhinojs/RhinoWebModules.java
+++ b/minium-script-rhinojs/src/main/java/minium/script/rhinojs/RhinoWebModules.java
@@ -26,7 +26,6 @@ import minium.web.internal.expression.Expressionizer;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.Function;
-import org.mozilla.javascript.NativeObject;
import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.json.JsonParser;
import org.mozilla.javascript.json.JsonParser.ParseException;
@@ -69,7 +68,7 @@ public class RhinoWebModules {
try {
Context cx = Context.enter();
if (obj instanceof String) {
- return new JsonParser(cx, new NativeObject()).parseValue((String) obj);
+ return new JsonParser(cx, cx.initStandardObjects()).parseValue((String) obj);
}
return obj;
} catch (ParseException e) { | a simple NativeObject() was not sufficient to Rhino JsonParser, we had to pass cx.initStandardObjects() |
diff --git a/lib/audited/rspec_matchers.rb b/lib/audited/rspec_matchers.rb
index <HASH>..<HASH> 100644
--- a/lib/audited/rspec_matchers.rb
+++ b/lib/audited/rspec_matchers.rb
@@ -76,6 +76,8 @@ module Audited
"Did not expect #{@expectation}"
end
+ alias_method :failure_message_when_negated, :negative_failure_message
+
def description
description = "audited"
description += " associated with #{@options[:associated_with]}" if @options.key?(:associated_with)
@@ -149,6 +151,8 @@ module Audited
"Expected #{model_class} to not have associated audits"
end
+ alias_method :failure_message_when_negated, :negative_failure_message
+
def description
"has associated audits"
end | Alias RSpec matcher methods for RSpec 3
Similar to pull #<I>, this pull should eliminate the deprecation
warnings RSpec emits when using the audited RSpec matchers. Aliasing
the methods should leave it compatible with earlier versions of RSpec
as well. |
diff --git a/scraper/code_gov/__init__.py b/scraper/code_gov/__init__.py
index <HASH>..<HASH> 100644
--- a/scraper/code_gov/__init__.py
+++ b/scraper/code_gov/__init__.py
@@ -46,7 +46,7 @@ def process_config(config, compute_labor_hours=True):
code_gov_metadata['releases'].append(code_gov_project)
# Parse config for GitLab repositories
- gitlab_instances = config.get('Gitlab', [])
+ gitlab_instances = config.get('GitLab', [])
for instance in gitlab_instances:
url = instance.get('url')
# orgs = instance.get('orgs', []) | Fixed GitLab object name expected in config file |
diff --git a/devices/tuya.js b/devices/tuya.js
index <HASH>..<HASH> 100644
--- a/devices/tuya.js
+++ b/devices/tuya.js
@@ -1797,7 +1797,7 @@ module.exports = [
],
},
{
- fingerprint: [{modelID: 'TS004F', manufacturerName: '_TZ3000_4fjiwweb'}],
+ fingerprint: [{modelID: 'TS004F', manufacturerName: '_TZ3000_4fjiwweb'}, {modelID: 'TS004F', manufacturerName: '_TZ3000_uri7ongn'}],
model: 'ERS-10TZBVK-AA',
vendor: 'TuYa',
description: 'Smart knob', | Add _TZ<I>_uri7ongn to ERS-<I>TZBVK-AA (#<I>)
I seem to have a different revision of this device, with different fingerprint. |
diff --git a/ChromeController/manager_base.py b/ChromeController/manager_base.py
index <HASH>..<HASH> 100644
--- a/ChromeController/manager_base.py
+++ b/ChromeController/manager_base.py
@@ -17,7 +17,7 @@ class ChromeInterface():
"""
- def __init__(self, binary=None, dbg_port=None, use_execution_manager=None, *args, **kwargs):
+ def __init__(self, binary, dbg_port, use_execution_manager, *args, **kwargs):
"""
Base chromium transport initialization. | Whoops, force those parameters to be passed. |
diff --git a/src/Service/InstallHelperService.php b/src/Service/InstallHelperService.php
index <HASH>..<HASH> 100644
--- a/src/Service/InstallHelperService.php
+++ b/src/Service/InstallHelperService.php
@@ -639,7 +639,16 @@ class InstallHelperService implements ServiceLocatorAwareInterface
if (isset($serverPackages['packages']) && $serverPackages['packages']) {
foreach ($serverPackages['packages'] as $package) {
- if ($package['packageIsActive']) {
+ /**
+ * If type is 1 (for site)
+ * we must check if the site is active
+ */
+ if($type == 1){
+ if ($package['packageIsActive']) {
+ if (!in_array(strtolower(trim($package['packageModuleName'])), $moduleExceptions))
+ $packages[] = $package;
+ }
+ }else{
if (!in_array(strtolower(trim($package['packageModuleName'])), $moduleExceptions))
$packages[] = $package;
} | Fixed problem on displaying non active site |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1460,7 +1460,7 @@
//. Function wrapper for [`fantasy-land/invert`][].
//.
//. ```javascript
- //. invert(Sum(5))
+ //. > invert(Sum(5))
//. Sum(-5)
//. ```
function invert(group) { | documentation: add missing ‘>’ on input line |
diff --git a/GPy/core/parameterized.py b/GPy/core/parameterized.py
index <HASH>..<HASH> 100644
--- a/GPy/core/parameterized.py
+++ b/GPy/core/parameterized.py
@@ -195,7 +195,7 @@ class Parameterized(object):
def constrain_negative(self, regexp):
""" Set negative constraints. """
- self.constrain(regexp, transformations.Negative_logexp())
+ self.constrain(regexp, transformations.NegativeLogexp())
def constrain_positive(self, regexp):
""" Set positive constraints. """
diff --git a/GPy/core/transformations.py b/GPy/core/transformations.py
index <HASH>..<HASH> 100644
--- a/GPy/core/transformations.py
+++ b/GPy/core/transformations.py
@@ -43,7 +43,7 @@ class Logexp(Transformation):
def __str__(self):
return '(+ve)'
-class Negative_logexp(Transformation):
+class NegativeLogexp(Transformation):
domain = NEGATIVE
def f(self, x):
return -Logexp.f(x) # np.log(1. + np.exp(x)) | NegativeLogexp Pep8ted |
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -66,12 +66,18 @@ Spec::Runner.configure do |config|
$tmpfiles.clear
end
end
-end
-# Set the confdir and vardir to gibberish so that tests
-# have to be correctly mocked.
-Puppet[:confdir] = "/dev/null"
-Puppet[:vardir] = "/dev/null"
+ config.prepend_before :each do
+ # these globals are set by Application
+ $puppet_application_mode = nil
+ $puppet_application_name = nil
+
+ # Set the confdir and vardir to gibberish so that tests
+ # have to be correctly mocked.
+ Puppet[:confdir] = "/dev/null"
+ Puppet[:vardir] = "/dev/null"
+ end
+end
# We need this because the RAL uses 'should' as a method. This
# allows us the same behaviour but with a different method name. | maint: spec_helper should reset settings directories on *every* test
Previously, spec_helper's attempts to set :confdir, and :vardir to
/dev/null were getting thwarted by the Settings.clear in after_all |
diff --git a/solr/solr.go b/solr/solr.go
index <HASH>..<HASH> 100644
--- a/solr/solr.go
+++ b/solr/solr.go
@@ -198,16 +198,9 @@ func (si *SolrInterface) Schema() (*Schema, error) {
// Return 'status' and QTime from solr, if everything is fine status should have value 'OK'
// QTime will have value -1 if can not determine
func (si *SolrInterface) Ping() (status string, qtime int, err error) {
- var path string
params := &url.Values{}
params.Add("wt", "json")
- if si.conn.core != "" {
- path = fmt.Sprintf("%s/%s/admin/ping?%s", si.conn.url.String(), si.conn.core, params.Encode())
- } else {
- path = fmt.Sprintf("%s/admin/ping?%s", si.conn.url.String(), params.Encode())
- }
-
- r, err := HTTPGet(path, nil, si.conn.username, si.conn.password)
+ r, err := HTTPGet(fmt.Sprintf("%s/%s/admin/ping?%s", si.conn.url.String(), si.conn.core, params.Encode()), nil, si.conn.username, si.conn.password)
if err != nil {
return "", -1, err
} | We should have a core in this case |
diff --git a/nougat/context/request.py b/nougat/context/request.py
index <HASH>..<HASH> 100644
--- a/nougat/context/request.py
+++ b/nougat/context/request.py
@@ -39,7 +39,12 @@ class Request:
@cached_property
def cookies(self):
- return SimpleCookie(self.headers.get('Cookies', ''))
+ _cookies = {}
+ cookies = SimpleCookie(self.headers.get('Cookie', ''))
+ for cookie in cookies.values():
+ _cookies[cookie.key] = cookie.value
+
+ return _cookies
def __body_format(self, body):
""" | fixed: formatted cookies into dict. |
diff --git a/cmd/iam.go b/cmd/iam.go
index <HASH>..<HASH> 100644
--- a/cmd/iam.go
+++ b/cmd/iam.go
@@ -672,8 +672,10 @@ func (sys *IAMSys) DeletePolicy(policyName string) error {
if pset.Contains(policyName) {
cr, ok := sys.iamUsersMap[u]
if !ok {
- // This case cannot happen
- return errNoSuchUser
+ // This case can happen when an temporary account
+ // is deleted or expired, removed it from userPolicyMap.
+ delete(sys.iamUserPolicyMap, u)
+ continue
}
pset.Remove(policyName)
// User is from STS if the cred are temporary | fix: do not return an error on expired credentials (#<I>)
policy might have an associated mapping with an expired
user key, do not return an error during DeletePolicy
for such situations - proceed normally as its an
expected situation. |
diff --git a/src/components/BaseModal.js b/src/components/BaseModal.js
index <HASH>..<HASH> 100644
--- a/src/components/BaseModal.js
+++ b/src/components/BaseModal.js
@@ -229,7 +229,7 @@ class BaseModal extends Component<ModalProps, State> {
basFooter: !!footer,
}}
>
- <View style={[styles.container, hidden]}>
+ <View pointerEvents={this.isSwipingOut ? 'none' : 'auto'} style={[styles.container, hidden]}>
<DraggableView
style={StyleSheet.flatten([styles.draggableView, style])}
onMove={this.handleMove} | Disable pointer events on modal when swiping out |
diff --git a/quota/lock.go b/quota/lock.go
index <HASH>..<HASH> 100644
--- a/quota/lock.go
+++ b/quota/lock.go
@@ -13,12 +13,13 @@ type multiLocker struct {
func (l *multiLocker) Lock(name string) {
l.mut.Lock()
- defer l.mut.Unlock()
- _, ok := l.m[name]
+ mutex, ok := l.m[name]
if !ok {
- l.m[name] = new(sync.Mutex)
+ mutex = new(sync.Mutex)
+ l.m[name] = mutex
}
- l.m[name].Lock()
+ l.mut.Unlock()
+ mutex.Lock()
}
func (l *multiLocker) Unlock(name string) {
diff --git a/quota/lock_test.go b/quota/lock_test.go
index <HASH>..<HASH> 100644
--- a/quota/lock_test.go
+++ b/quota/lock_test.go
@@ -6,6 +6,7 @@ package quota
import (
"launchpad.net/gocheck"
+ "runtime"
"sync"
)
@@ -37,6 +38,7 @@ func (Suite) TestMultiLockerUsage(c *gocheck.C) {
locker.Unlock("user@tsuru.io")
wg.Done()
}()
+ runtime.Gosched()
c.Assert(count, gocheck.Equals, 0)
locker.Unlock("user@tsuru.io")
wg.Wait() | quota: fix dead lock on multiLocker
Apparently, I'm stupid... |
diff --git a/src/edu/jhu/hltcoe/util/cplex/CplexUtils.java b/src/edu/jhu/hltcoe/util/cplex/CplexUtils.java
index <HASH>..<HASH> 100644
--- a/src/edu/jhu/hltcoe/util/cplex/CplexUtils.java
+++ b/src/edu/jhu/hltcoe/util/cplex/CplexUtils.java
@@ -218,6 +218,9 @@ public class CplexUtils {
* problem where we can do early stopping as we do in RLT. Then we could
* compare against the objective value given by the dual simplex algorithm,
* which (it turns out) is exactly what we want anyway.
+ *
+ * This might help:
+ * http://www.or-exchange.com/questions/1113/cplex-attributing-dual-values-to-lhsrhs-constraints
*/
@Deprecated
public static double getDualObjectiveValue(IloCplex cplex, IloLPMatrix mat) throws IloException { | Adding potentially useful website
git-svn-id: svn+ssh://external.hltcoe.jhu.edu/home/hltcoe/mgormley/public/repos/dep_parse_filtered/trunk@<I> <I>f-cb4b-<I>-8b<I>-c<I>bcb<I> |
diff --git a/docs/source/conf.py b/docs/source/conf.py
index <HASH>..<HASH> 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -187,6 +187,9 @@ htmlhelp_basename = 'ROGUEdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
+ 'classoptions': ',openany,onside',
+ 'babel': '\\usepackage[english]{babel}'
+}
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
@@ -195,7 +198,7 @@ latex_elements = {
# Additional stuff for the LaTeX preamble.
#'preamble': '',
-}
+
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, | Updated config for docs
This eliminates many of the blank pages when generating a pdf. |
diff --git a/ravel.py b/ravel.py
index <HASH>..<HASH> 100644
--- a/ravel.py
+++ b/ravel.py
@@ -236,7 +236,7 @@ class Connection(dbus.TaskKeeper) :
for node, child in level.children.items() :
remove_listeners(child, path + [node])
#end for
- for interface in level.interfaces :
+ for interface in level.interfaces.values() :
for rulestr in interface.listening :
ignore = dbus.Error.init()
self.connection.bus_remove_match(rulestr, ignore) | Want to iterate over interface objects, not their names (H/T @joell) |
diff --git a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TestResource.java b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TestResource.java
index <HASH>..<HASH> 100644
--- a/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TestResource.java
+++ b/jaxrs/src/main/java/org/killbill/billing/jaxrs/resources/TestResource.java
@@ -181,7 +181,6 @@ public class TestResource extends JaxRsResourceBase {
final ClockMock testClock = getClockMock();
if (requestedClockDate == null) {
- log.info("************ RESETTING CLOCK to " + clock.getUTCNow());
testClock.resetDeltaFromReality();
} else {
final DateTime newTime = DATE_TIME_FORMATTER.parseDateTime(requestedClockDate).toDateTime(DateTimeZone.UTC); | jaxrs: remove confusing log line
The time displayed was wrong when resetting the clock. The right log line
is now printed in killbill-commons. |
diff --git a/patoolib/programs/py_zipfile.py b/patoolib/programs/py_zipfile.py
index <HASH>..<HASH> 100644
--- a/patoolib/programs/py_zipfile.py
+++ b/patoolib/programs/py_zipfile.py
@@ -16,6 +16,7 @@
"""Archive commands for the zipfile Python module."""
from patoolib import util
import zipfile
+import os
READ_SIZE_BYTES = 1024*1024
@@ -59,7 +60,18 @@ def create_zip (archive, compression, cmd, *args, **kwargs):
zfile = zipfile.ZipFile(archive, 'w')
try:
for filename in args:
- zfile.write(filename)
+ if os.path.isdir(filename):
+ write_directory(zfile, filename)
+ else:
+ zfile.write(filename)
finally:
zfile.close()
return None
+
+
+def write_directory (zfile, directory):
+ """Write recursively all directories and filenames to zipfile instance."""
+ for dirpath, dirnames, filenames in os.walk(directory):
+ zfile.write(dirpath)
+ for filename in filenames:
+ zfile.write(os.path.join(dirpath, filename)) | Fix creating zip files with directories. |
diff --git a/salt/client/ssh/wrapper/__init__.py b/salt/client/ssh/wrapper/__init__.py
index <HASH>..<HASH> 100644
--- a/salt/client/ssh/wrapper/__init__.py
+++ b/salt/client/ssh/wrapper/__init__.py
@@ -30,7 +30,7 @@ class FunctionWrapper(dict):
super(FunctionWrapper, self).__init__()
self.wfuncs = wfuncs if isinstance(wfuncs, dict) else {}
self.opts = opts
- self.mods = mods
+ self.mods = mods if isinstance(mods, dict) else {}
self.kwargs = {'id_': id_,
'host': host}
self.kwargs.update(kwargs) | Add some safetly to mods |
diff --git a/java/calcite/src/main/java/com/mapd/parser/extension/ddl/heavydb/HeavyDBGeo.java b/java/calcite/src/main/java/com/mapd/parser/extension/ddl/heavydb/HeavyDBGeo.java
index <HASH>..<HASH> 100644
--- a/java/calcite/src/main/java/com/mapd/parser/extension/ddl/heavydb/HeavyDBGeo.java
+++ b/java/calcite/src/main/java/com/mapd/parser/extension/ddl/heavydb/HeavyDBGeo.java
@@ -1,3 +1,3 @@
package com.mapd.parser.extension.ddl.heavydb;
-public enum HeavyDBGeo { POINT, LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON }
+public enum HeavyDBGeo { POINT, LINESTRING, POLYGON, MULTIPOLYGON, MULTILINESTRING } | Preserve original order in HeavyDBGeo enum, append instead of insert |
diff --git a/test/Robots.js b/test/Robots.js
index <HASH>..<HASH> 100644
--- a/test/Robots.js
+++ b/test/Robots.js
@@ -11,7 +11,7 @@ function testRobots(url, contents, allowed, disallowed) {
});
disallowed.forEach(function (url) {
- expect(robots.isAllowed(url)).to.equal(false);
+ expect(robots.isDisallowed(url)).to.equal(true);
});
}
@@ -211,6 +211,7 @@ describe('Robots', function () {
expect(robots.getCrawlDelay('b')).to.equal(undefined);
expect(robots.getCrawlDelay('c')).to.equal(10);
expect(robots.getCrawlDelay('d')).to.equal(10);
+ expect(robots.getCrawlDelay()).to.equal(undefined);
done();
});
@@ -377,4 +378,4 @@ describe('Robots', function () {
done();
});
-});
\ No newline at end of file
+}); | Extended tests to cover <I>% |
diff --git a/src/View/Input/Button.php b/src/View/Input/Button.php
index <HASH>..<HASH> 100644
--- a/src/View/Input/Button.php
+++ b/src/View/Input/Button.php
@@ -53,7 +53,7 @@ class Button implements InputInterface {
*
* Any other keys provided in $data will be converted into HTML attributes.
*
- * @param array $data The data to build an input with.
+ * @param array $data The data to build a button with.
* @return string
*/
public function render(array $data) {
diff --git a/src/View/Input/File.php b/src/View/Input/File.php
index <HASH>..<HASH> 100644
--- a/src/View/Input/File.php
+++ b/src/View/Input/File.php
@@ -45,7 +45,7 @@ class File implements InputInterface {
* Unlike other input objects the `val` property will be specifically
* ignored.
*
- * @param array $data The data to build a textarea with.
+ * @param array $data The data to build a file input with.
* @return string HTML elements.
*/
public function render(array $data) { | Correct Button and File widget docblocks |
diff --git a/pybars/_compiler.py b/pybars/_compiler.py
index <HASH>..<HASH> 100644
--- a/pybars/_compiler.py
+++ b/pybars/_compiler.py
@@ -199,6 +199,8 @@ class Scope:
return self.last
if name == 'this':
return self.context
+ if isinstance(name, str) and hasattr(self.context, name):
+ return getattr(self.context, name)
try:
return self.context[name]
diff --git a/pybars/tests/test_acceptance.py b/pybars/tests/test_acceptance.py
index <HASH>..<HASH> 100644
--- a/pybars/tests/test_acceptance.py
+++ b/pybars/tests/test_acceptance.py
@@ -606,6 +606,17 @@ class TestAcceptance(TestCase):
self.assertEqual("goodbye! Goodbye! GOODBYE! cruel world!",
render(source, context))
+ def test_context_with_attrs(self):
+ class TestContext():
+ @property
+ def text(self):
+ return 'Goodbye'
+
+ source = u"{{#each .}}{{text}}! {{/each}}cruel world!"
+ context = [TestContext()]
+ self.assertEqual("Goodbye! cruel world!",
+ render(source, context))
+
def test_each(self):
source = u"{{#each goodbyes}}{{text}}! {{/each}}cruel {{world}}!"
context = {'goodbyes': | Added support for using object attributes in scopes |
diff --git a/components/utils/scripts/proxy.js b/components/utils/scripts/proxy.js
index <HASH>..<HASH> 100644
--- a/components/utils/scripts/proxy.js
+++ b/components/utils/scripts/proxy.js
@@ -25,7 +25,10 @@ elation.require(['utils.events'], function() {
function executeCallback(fn, target, args) {
try {
if (elation.utils.isString(fn)) {
- eval(fn);
+ (function(fn) {
+ var event = args[0];
+ return eval(fn);
+ }).call(self._proxyobj, fn);
} else if (fn instanceof Function) {
fn.apply(target, args);
} | Event callback "this" and "event" scope bindings |
diff --git a/jenetics/src/main/java/io/jenetics/util/SeqView.java b/jenetics/src/main/java/io/jenetics/util/SeqView.java
index <HASH>..<HASH> 100644
--- a/jenetics/src/main/java/io/jenetics/util/SeqView.java
+++ b/jenetics/src/main/java/io/jenetics/util/SeqView.java
@@ -83,4 +83,14 @@ final class SeqView<T> implements Seq<T> {
return ISeq.<T>of(_list).prepend(values);
}
+ @Override
+ public Object[] toArray() {
+ return _list.toArray();
+ }
+
+ @Override
+ public <B> B[] toArray(final B[] array) {
+ return _list.toArray(array);
+ }
+
} | #<I>: Override 'toArray' methods. |
diff --git a/src/forms/drop.js b/src/forms/drop.js
index <HASH>..<HASH> 100644
--- a/src/forms/drop.js
+++ b/src/forms/drop.js
@@ -222,10 +222,12 @@ d3plus.forms.drop = function(vars,styles,timing) {
.parent(vars.tester)
.id(vars.id)
.timing(0)
+ .large(9999)
.draw()
var w = button.width()
drop_width = d3.max(w)
+ drop_width += styles.stroke*2
button.remove()
if (vars.dev) d3plus.console.timeEnd("calculating width")
@@ -470,7 +472,7 @@ d3plus.forms.drop = function(vars,styles,timing) {
text = "text"
}
- var large = timing ? vars.large : 0
+ var large = vars.data.array.length < vars.large ? vars.large : 0
var buttons = d3plus.forms(style)
.dev(vars.dev) | fixed auto-width of drop down menus |
diff --git a/lib/byebug/helpers/parse.rb b/lib/byebug/helpers/parse.rb
index <HASH>..<HASH> 100644
--- a/lib/byebug/helpers/parse.rb
+++ b/lib/byebug/helpers/parse.rb
@@ -10,7 +10,7 @@ module Byebug
# If either +min+ or +max+ is nil, that value has no bound.
#
def get_int(str, cmd, min = nil, max = nil)
- if str !~ /\A[0-9]+\z/
+ if str !~ /\A-?[0-9]+\z/
err = pr('parse.errors.int.not_number', cmd: cmd, str: str)
return nil, errmsg(err)
end | make frame cmd work with negative arg |
diff --git a/tests/TestCase/Datasource/PaginatorTest.php b/tests/TestCase/Datasource/PaginatorTest.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase/Datasource/PaginatorTest.php
+++ b/tests/TestCase/Datasource/PaginatorTest.php
@@ -17,7 +17,6 @@ declare(strict_types=1);
namespace Cake\Test\TestCase\Datasource;
use Cake\ORM\Entity;
-use Cake\TestSuite\Fixture\TransactionStrategy;
use Cake\TestSuite\TestCase;
class PaginatorTest extends TestCase
@@ -25,11 +24,6 @@ class PaginatorTest extends TestCase
use PaginatorTestTrait;
/**
- * @inheritDoc
- */
- protected $stateResetStrategy = TransactionStrategy::class;
-
- /**
* fixtures property
*
* @var array | Remove transaction state management from another test
This relies on fixed auto-increment values as well. |
diff --git a/a10_neutron_lbaas/tests/unit/v1/test_handler_pool.py b/a10_neutron_lbaas/tests/unit/v1/test_handler_pool.py
index <HASH>..<HASH> 100644
--- a/a10_neutron_lbaas/tests/unit/v1/test_handler_pool.py
+++ b/a10_neutron_lbaas/tests/unit/v1/test_handler_pool.py
@@ -93,14 +93,15 @@ class TestPools(test_base.UnitTestBase):
def test_update_remove_monitor(self):
old_pool = self.fake_pool('TCP', 'LEAST_CONNECTIONS')
- old_pool['health_monitors_status'] = [{'monitor_id': 'hm1'}]
+ fake_mon = {'monitor_id': 'hm1'}
+ old_pool['health_monitors_status'] = [fake_mon]
pool = self.fake_pool('TCP', 'ROUND_ROBIN')
pool['health_monitors_status'] = []
self.a.pool.update(None, old_pool, pool)
self.print_mocks()
self.a.last_client.slb.service_group.update.assert_called()
- self.a.last_client.slb.hm.delete.assert_called()
+ self.a.last_client.slb.hm.delete.assert_called(self.a.hm._name(fake_mon))
def test_delete(self):
pool = self.fake_pool('TCP', 'LEAST_CONNECTIONS') | Another passing test. Next tests are update-oriented. |
diff --git a/lib/specjour/rsync_daemon.rb b/lib/specjour/rsync_daemon.rb
index <HASH>..<HASH> 100644
--- a/lib/specjour/rsync_daemon.rb
+++ b/lib/specjour/rsync_daemon.rb
@@ -15,7 +15,7 @@ module Specjour
def start
write_config
system("rsync", "--daemon", "--config=#{config_file}", "--port=8989")
- at_exit { puts 'shutting down rsync'; stop }
+ at_exit { stop }
end
def stop | Rsync Daemon stops quietly |
diff --git a/src/components/button/component.js b/src/components/button/component.js
index <HASH>..<HASH> 100644
--- a/src/components/button/component.js
+++ b/src/components/button/component.js
@@ -33,7 +33,16 @@ export let Button = xcomponent.create({
scrolling: false,
containerTemplate,
- componentTemplate,
+ componentTemplate({ props, htmlDom } : { props : Object, htmlDom : Function }) : HTMLElement {
+
+ let template = htmlDom(componentTemplate({ props }));
+
+ template.addEventListener('click', () => {
+ $logger.warn('button_pre_template_click');
+ });
+
+ return template;
+ },
sacrificialComponentTemplate: true, | Log if button clicked before fully loaded |
diff --git a/wcmatch/_wcparse.py b/wcmatch/_wcparse.py
index <HASH>..<HASH> 100644
--- a/wcmatch/_wcparse.py
+++ b/wcmatch/_wcparse.py
@@ -73,6 +73,7 @@ EXT_TYPES = frozenset(('*', '?', '+', '@', '!'))
# Common flags are found between `0x0001 - 0xffff`
# Implementation specific (`glob` vs `fnmatch` vs `wcmatch`) are found between `0x00010000 - 0xffff0000`
# Internal special flags are found at `0x100000000` and above
+CASE = 0x0001
IGNORECASE = 0x0002
RAWCHARS = 0x0004
NEGATE = 0x0008
@@ -90,7 +91,6 @@ NODIR = 0x4000
NEGATEALL = 0x8000
FORCEWIN = 0x10000
FORCEUNIX = 0x20000
-CASE = 0x40000
# Internal flag
_TRANSLATE = 0x100000000 # Lets us know we are performing a translation, and we just want the regex. | CASE flag now takes the value of the old retired FORCECASE
As this is an internal value, and users should be using the flag and
not the value, this should be fine. |
diff --git a/golbin/run.go b/golbin/run.go
index <HASH>..<HASH> 100644
--- a/golbin/run.go
+++ b/golbin/run.go
@@ -7,19 +7,22 @@ import (
"fmt"
)
+
type Console struct {
Command, StdInput, StdOutput string
}
-func start_Command(sys_Command string) *exec.Cmd{
- cmd_tokens := strings.Split(sys_Command, " ")
+
+func start_command(sys_command string) *exec.Cmd{
+ cmd_tokens := strings.Split(sys_command, " ")
cmd := cmd_tokens[0]
args := strings.Join(cmd_tokens[1:], " ")
return exec.Command(cmd, args)
}
+
func (konsole *Console) Run() {
- cmd := start_Command(konsole.Command)
+ cmd := start_command(konsole.Command)
if konsole.StdInput != ""{ cmd.Stdin = strings.NewReader(konsole.StdInput) }
@@ -33,6 +36,7 @@ func (konsole *Console) Run() {
}
}
+
func ExecOutput(cmdline string) string {
cmd := start_Command(cmdline) | [golbin] naming Case correction |
diff --git a/spec/integration/run_flag_spec.rb b/spec/integration/run_flag_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/integration/run_flag_spec.rb
+++ b/spec/integration/run_flag_spec.rb
@@ -4,12 +4,20 @@ describe 'overcommit --run' do
subject { shell(%w[overcommit --run]) }
context 'when using an existing pre-commit hook script' do
+ if Overcommit::OS.windows?
+ let(:script_name) { 'test-script.exe' }
+ let(:script_contents) { 'exit 0' }
+ else
+ let(:script_name) { 'test-script' }
+ let(:script_contents) { "#!/bin/bash\nexit 0" }
+ end
+
let(:config) do
{
'PreCommit' => {
'MyHook' => {
'enabled' => true,
- 'required_executable' => './test-script',
+ 'required_executable' => "./#{script_name}",
}
}
}
@@ -18,9 +26,9 @@ describe 'overcommit --run' do
around do |example|
repo do
File.open('.overcommit.yml', 'w') { |f| f.puts(config.to_yaml) }
- echo("#!/bin/bash\nexit 0", 'test-script')
- `git add test-script`
- FileUtils.chmod(0755, 'test-script')
+ echo(script_contents, script_name)
+ `git add #{script_name}`
+ FileUtils.chmod(0755, script_name)
example.run
end
end | Use different script name and contents for Windows |
diff --git a/bin/fuzzy-redirect-server.js b/bin/fuzzy-redirect-server.js
index <HASH>..<HASH> 100755
--- a/bin/fuzzy-redirect-server.js
+++ b/bin/fuzzy-redirect-server.js
@@ -11,7 +11,8 @@
, subdir = process.argv[4] || ''
, server
;
-
+
+ app.use(connect.favicon());
app.use(connect.static(directory));
app.use(connect.directory(directory)); | added favicon for easier debugging
all them daggon' favicon requests always showing up that I have no interest in. |
diff --git a/src/main/java/nl/hsac/fitnesse/fixture/slim/SlimFixture.java b/src/main/java/nl/hsac/fitnesse/fixture/slim/SlimFixture.java
index <HASH>..<HASH> 100644
--- a/src/main/java/nl/hsac/fitnesse/fixture/slim/SlimFixture.java
+++ b/src/main/java/nl/hsac/fitnesse/fixture/slim/SlimFixture.java
@@ -220,7 +220,7 @@ public class SlimFixture implements InteractionAwareFixture {
*/
public static class PollCompletion extends FunctionalCompletion {
public PollCompletion(Supplier<Boolean> isFinishedSupplier) {
- super(isFinishedSupplier, () -> {});
+ super(isFinishedSupplier, null);
}
}
@@ -246,7 +246,9 @@ public class SlimFixture implements InteractionAwareFixture {
@Override
public void repeat() {
- repeater.run();
+ if (repeater != null) {
+ repeater.run();
+ }
}
public void setIsFinishedSupplier(Supplier<Boolean> isFinishedSupplier) { | Remove need for no-op runnable if no repeat is needed |
diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go
index <HASH>..<HASH> 100644
--- a/pkg/features/kube_features.go
+++ b/pkg/features/kube_features.go
@@ -589,6 +589,7 @@ const (
// owner: @robscott
// kep: http://kep.k8s.io/2433
// alpha: v1.21
+ // beta: v1.23
//
// Enables topology aware hints for EndpointSlices
TopologyAwareHints featuregate.Feature = "TopologyAwareHints"
@@ -890,7 +891,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
ProbeTerminationGracePeriod: {Default: false, PreRelease: featuregate.Beta}, // Default to false in beta 1.22, set to true in 1.24
NodeSwap: {Default: false, PreRelease: featuregate.Alpha},
PodDeletionCost: {Default: true, PreRelease: featuregate.Beta},
- TopologyAwareHints: {Default: false, PreRelease: featuregate.Alpha},
+ TopologyAwareHints: {Default: false, PreRelease: featuregate.Beta},
PodAffinityNamespaceSelector: {Default: true, PreRelease: featuregate.Beta},
ServiceLoadBalancerClass: {Default: true, PreRelease: featuregate.Beta},
IngressClassNamespacedParams: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.24 | Bumping TopologyAwareHints feature gate to beta |
diff --git a/lib/ApiAdmin.php b/lib/ApiAdmin.php
index <HASH>..<HASH> 100644
--- a/lib/ApiAdmin.php
+++ b/lib/ApiAdmin.php
@@ -83,7 +83,7 @@ class ApiAdmin extends ApiWeb {
function isAjaxOutput(){
// TODO: chk, i wonder if you pass any arguments through get when in ajax mode. Well
// if you do, then make a check here. Form_Field::displayFieldError relies on this.
- return true;
+ return false;
}
diff --git a/lib/static.php b/lib/static.php
index <HASH>..<HASH> 100644
--- a/lib/static.php
+++ b/lib/static.php
@@ -7,7 +7,7 @@ function lowlevel_error($error,$lev=null){
/*
* This function will be called for low level fatal errors
*/
- echo "<font color=red>Low level error:</font> $error (note: please use exception instead)<br>";
+ echo "<font color=red>Low level error:</font> $error<br>";
exit;
}
};if(!function_exists('error_handler')){ | fixed dummy method. Now it won't think every form was submitted with ajax, and it's back to how it was before previous commit |
diff --git a/clients/web/src/models/FileModel.js b/clients/web/src/models/FileModel.js
index <HASH>..<HASH> 100644
--- a/clients/web/src/models/FileModel.js
+++ b/clients/web/src/models/FileModel.js
@@ -4,6 +4,7 @@ import FolderModel from 'girder/models/FolderModel';
import ItemModel from 'girder/models/ItemModel';
import Model from 'girder/models/Model';
import { restRequest, uploadHandlers, getUploadChunkSize } from 'girder/rest';
+import 'girder/utilities/S3UploadHandler'; // imported for side effect
var FileModel = Model.extend({
resourceName: 'file', | Import S3 upload handler via FileModel
This makes it so that any downstreams that use the FileModel or
the UploadWidget will also support direct-to-S3 uploads, since
unfortunately this module has to be imported for a side effect.
Refs <URL> |
diff --git a/test/server/SimpleServer.js b/test/server/SimpleServer.js
index <HASH>..<HASH> 100644
--- a/test/server/SimpleServer.js
+++ b/test/server/SimpleServer.js
@@ -221,7 +221,7 @@ class SimpleServer {
return;
}
response.setHeader('Cache-Control', 'public, max-age=31536000');
- response.setHeader('Last-Modified', this._startTime.toString());
+ response.setHeader('Last-Modified', this._startTime.toISOString());
} else {
response.setHeader('Cache-Control', 'no-cache, no-store');
} | test: make tests work on non-English locales (#<I>)
`Data.prototype.toString` may return non-ASCII characters, which aren't accepted by `setHeader`.
E.g., on Russian locale, it might look like this:
```
> new Date().toString()
'Thu Jun <I> <I> <I>:<I>:<I> GMT<I> (Финляндия (лето))'
``` |
diff --git a/shared/folders/index.desktop.js b/shared/folders/index.desktop.js
index <HASH>..<HASH> 100644
--- a/shared/folders/index.desktop.js
+++ b/shared/folders/index.desktop.js
@@ -74,9 +74,8 @@ class FoldersRender extends Component<Props> {
<TabBar
styleTabBar={{
...tabBarStyle,
- backgroundColor: !this.props.smallMode && !this.props.installed
- ? globalColors.grey
- : globalColors.white,
+ backgroundColor: globalColors.white,
+ opacity: !this.props.smallMode && !this.props.installed ? 0.4 : 1,
minHeight: this.props.smallMode ? 32 : 48,
}}
>
diff --git a/shared/folders/row.desktop.js b/shared/folders/row.desktop.js
index <HASH>..<HASH> 100644
--- a/shared/folders/row.desktop.js
+++ b/shared/folders/row.desktop.js
@@ -146,7 +146,8 @@ const Row = ({
const containerStyle = {
...styles.rowContainer,
minHeight: smallMode ? 40 : 48,
- backgroundColor: !smallMode && !installed ? globalColors.grey : globalColors.white,
+ backgroundColor: globalColors.white,
+ opacity: !smallMode && !installed ? 0.4 : 1,
}
return ( | Changed grey background to <I>% opaque (#<I>) |
diff --git a/PyFin/__init__.py b/PyFin/__init__.py
index <HASH>..<HASH> 100644
--- a/PyFin/__init__.py
+++ b/PyFin/__init__.py
@@ -7,7 +7,7 @@ Created on 2015-7-9
__all__ = ['__version__', 'API', 'DateUtilities', 'Enums', 'Env', 'Math', 'PricingEngines', 'Risk', 'AlgoTrading']
-__version__ = "0.3.3"
+__version__ = "0.3.4"
import PyFin.API as API
import PyFin.DateUtilities as DateUtilities | update version number to <I> |
diff --git a/fusesoc/section/__init__.py b/fusesoc/section/__init__.py
index <HASH>..<HASH> 100644
--- a/fusesoc/section/__init__.py
+++ b/fusesoc/section/__init__.py
@@ -235,7 +235,10 @@ Verilog top module : {top_module}
args += ['-DVL_PRINTF=printf']
args += ['-DVM_TRACE=1']
args += ['-DVM_COVERAGE=0']
- args += ['-I'+os.getenv('SYSTEMC_INCLUDE')]
+ if os.getenv('SYSTEMC_INCLUDE'):
+ args += ['-I'+os.getenv('SYSTEMC_INCLUDE')]
+ if os.getenv('SYSTEMC'):
+ args += ['-I'+os.path.join(os.getenv('SYSTEMC'),'include')]
args += ['-Wno-deprecated']
if os.getenv('SYSTEMC_CXX_FLAGS'):
args += [os.getenv('SYSTEMC_CXX_FLAGS')] | section/verilator: add $(SYSTEMC)/include to include dirs
Also, only add the SYSTEMC_INCLUDE environment variable to
the include dirs if it's set. |
diff --git a/numdifftools/tests/test_numdifftools.py b/numdifftools/tests/test_numdifftools.py
index <HASH>..<HASH> 100644
--- a/numdifftools/tests/test_numdifftools.py
+++ b/numdifftools/tests/test_numdifftools.py
@@ -461,7 +461,9 @@ def approx_fprime(x, f, epsilon=None, args=(), kwargs=None, centered=True):
class TestJacobian(unittest.TestCase):
@staticmethod
def test_scalar_to_vector():
- fun = lambda x: np.array([x, x**2, x**3])
+ def fun(x):
+ return np.array([x, x**2, x**3])
+
val = np.random.randn()
j0 = nd.Jacobian(fun)(val)
assert np.allclose(j0, [1., 2*val, 3*val**2]) | Replace lambda function with a def |
diff --git a/daemon/cluster/cluster.go b/daemon/cluster/cluster.go
index <HASH>..<HASH> 100644
--- a/daemon/cluster/cluster.go
+++ b/daemon/cluster/cluster.go
@@ -39,7 +39,6 @@ package cluster
//
import (
- "crypto/x509"
"fmt"
"net"
"os"
@@ -171,13 +170,8 @@ func New(config Config) (*Cluster, error) {
logrus.Error("swarm component could not be started before timeout was reached")
case err := <-nr.Ready():
if err != nil {
- if errors.Cause(err) == errSwarmLocked {
- return c, nil
- }
- if err, ok := errors.Cause(c.nr.err).(x509.CertificateInvalidError); ok && err.Reason == x509.Expired {
- return c, nil
- }
- return nil, errors.Wrap(err, "swarm component could not be started")
+ logrus.WithError(err).Error("swarm component could not be started")
+ return c, nil
}
}
return c, nil | cluster: Proceed with startup if cluster component can't be created
The current behavior is for dockerd to fail to start if the swarm
component can't be started for some reason. This can be difficult to
debug remotely because the daemon won't be running at all, so it's not
possible to hit endpoints like /info to see what's going on. It's also
very difficult to recover from the situation, since commands like
"docker swarm leave" are unavailable.
Change the behavior to allow startup to proceed. |
diff --git a/server.go b/server.go
index <HASH>..<HASH> 100644
--- a/server.go
+++ b/server.go
@@ -371,6 +371,17 @@ type Server struct {
// msg to the client if there are more than Server.Concurrency concurrent
// handlers h are running at the moment.
func TimeoutHandler(h RequestHandler, timeout time.Duration, msg string) RequestHandler {
+ return TimeoutWithCodeHandler(h,timeout,msg, StatusRequestTimeout)
+}
+
+// TimeoutWithCodeHandler creates RequestHandler, which returns an error with
+// the given msg and status code to the client if h didn't return during
+// the given duration.
+//
+// The returned handler may return StatusTooManyRequests error with the given
+// msg to the client if there are more than Server.Concurrency concurrent
+// handlers h are running at the moment.
+func TimeoutWithCodeHandler(h RequestHandler, timeout time.Duration, msg string, statusCode int) RequestHandler {
if timeout <= 0 {
return h
}
@@ -398,7 +409,7 @@ func TimeoutHandler(h RequestHandler, timeout time.Duration, msg string) Request
select {
case <-ch:
case <-ctx.timeoutTimer.C:
- ctx.TimeoutError(msg)
+ ctx.TimeoutErrorWithCode(msg, statusCode)
}
stopTimer(ctx.timeoutTimer)
} | ADD TimeoutWithCodeHandler support (#<I>)
* ADD TimeoutWithCodeHandler support
* FIX description |
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -239,7 +239,7 @@ function smartMergeTests(merge, loadersKey) {
assert.deepEqual(merge(a, b), result);
});
- it('should compare loaders by their whole name ' + loadersKey, function () {
+ it('should compare loaders by their whole name with ' + loadersKey, function () {
const a = {};
a[loadersKey] = [{
test: /\.js$/, | Add missing "with" to test naming |
diff --git a/src/transformers/file_utils.py b/src/transformers/file_utils.py
index <HASH>..<HASH> 100644
--- a/src/transformers/file_utils.py
+++ b/src/transformers/file_utils.py
@@ -68,8 +68,12 @@ except (ImportError, AssertionError):
try:
import datasets # noqa: F401
- _datasets_available = True
- logger.debug(f"Succesfully imported datasets version {datasets.__version__}")
+ # Check we're not importing a "datasets" directory somewhere
+ _datasets_available = hasattr(datasets, "__version__") and hasattr(datasets, "load_dataset")
+ if _datasets_available:
+ logger.debug(f"Succesfully imported datasets version {datasets.__version__}")
+ else:
+ logger.debug("Imported a datasets object but this doesn't seem to be the 🤗 datasets library.")
except ImportError:
_datasets_available = False | Catch import datasets common errors (#<I>) |
diff --git a/IPython/html/widgets/interaction.py b/IPython/html/widgets/interaction.py
index <HASH>..<HASH> 100644
--- a/IPython/html/widgets/interaction.py
+++ b/IPython/html/widgets/interaction.py
@@ -210,6 +210,8 @@ def interactive(__interact_f, **kwargs):
container.kwargs[widget.description] = value
if co:
clear_output(wait=True)
+ if on_demand:
+ on_demand_button.disabled = True
try:
container.result = f(**container.kwargs)
except Exception as e:
@@ -218,6 +220,9 @@ def interactive(__interact_f, **kwargs):
container.log.warn("Exception in interact callback: %s", e, exc_info=True)
else:
ip.showtraceback()
+ finally:
+ if on_demand:
+ on_demand_button.disabled = False
# Wire up the widgets
# If we are doing on demand running, the callback is only triggered by the button | Disable run button until the function finishes |
diff --git a/src/saml2/__init__.py b/src/saml2/__init__.py
index <HASH>..<HASH> 100644
--- a/src/saml2/__init__.py
+++ b/src/saml2/__init__.py
@@ -786,3 +786,27 @@ def extension_element_to_element(extension_element, translation_functions,
return None
+def extension_elements_to_elements(extension_elements, schemas):
+ """ Create a list of elements each one matching one of the
+ given extenstion elements. This is of course dependent on the access
+ to schemas that describe the extension elements.
+
+ :param extenstion_elements: The list of extension elements
+ :param schemas: Imported Python modules that represent the different
+ known schemas used for the extension elements
+ :return: A list of elements, representing the set of extension elements
+ that was possible to match against a Class in the given schemas.
+ The elements returned are the native representation of the elements
+ according to the schemas.
+ """
+ res = []
+ for extension_element in extension_elements:
+ for schema in schemas:
+ inst = extension_element_to_element(extension_element,
+ schema.ELEMENT_FROM_STRING,
+ schema.NAMESPACE)
+ if inst:
+ res.append(inst)
+ break
+
+ return res
\ No newline at end of file | Converting extension elemenst into elements |
diff --git a/middleman-core/lib/middleman-core/sitemap/extensions/redirects.rb b/middleman-core/lib/middleman-core/sitemap/extensions/redirects.rb
index <HASH>..<HASH> 100644
--- a/middleman-core/lib/middleman-core/sitemap/extensions/redirects.rb
+++ b/middleman-core/lib/middleman-core/sitemap/extensions/redirects.rb
@@ -66,9 +66,11 @@ module Middleman
super(store, path)
end
+ # rubocop:disable Style/AccessorMethodName
def get_source_file
nil
end
+ # rubocop:enable Style/AccessorMethodName
def template?
true | Supress warning because of method name offense |
diff --git a/classes/ezjsccssoptimizer.php b/classes/ezjsccssoptimizer.php
index <HASH>..<HASH> 100644
--- a/classes/ezjsccssoptimizer.php
+++ b/classes/ezjsccssoptimizer.php
@@ -70,7 +70,7 @@ class ezjscCssOptimizer
$css = str_replace( ':0 0 0 0;', ':0;', $css );
// Optimize hex colors from #bbbbbb to #bbb
- $css = preg_replace( "/#([0-9a-fA-F])\\1([0-9a-fA-F])\\2([0-9a-fA-F])\\3/", "#\\1\\2\\3", $css );
+ $css = preg_replace( "/color:#([0-9a-fA-F])\\1([0-9a-fA-F])\\2([0-9a-fA-F])\\3/", "color:#\\1\\2\\3", $css );
}
return $css;
} | Fix CSSOptimizer color hex regex to not apply to IE filters
This will cause the optimizer to not shorten color codes on some css properties, but fixes issues with filter: which extects color codes to always have 6 letters. |
diff --git a/src/Common/TimeExpression.php b/src/Common/TimeExpression.php
index <HASH>..<HASH> 100644
--- a/src/Common/TimeExpression.php
+++ b/src/Common/TimeExpression.php
@@ -197,6 +197,39 @@ class TimeExpression
}
/**
+ * Check if expression is valid
+ *
+ * @param $expression
+ * @return bool
+ */
+ public static function isValid($expression)
+ {
+ try {
+ new self($expression);
+ return true;
+ } catch (Exception $e) {
+ return false;
+ }
+ }
+
+ /**
+ * Try to create a TimeExpression.
+ * If fail, false is returned instead of throwing an exception
+ *
+ * @param $expression
+ * @return mixed
+ */
+ public static function createFrom($expression)
+ {
+ try {
+ $te = new self($expression);
+ return $te;
+ } catch (Exception $e) {
+ return false;
+ }
+ }
+
+ /**
* Decode expression
*
* @throws Exception | added static method isValid() and createFrom() |
diff --git a/soapbox/models.py b/soapbox/models.py
index <HASH>..<HASH> 100644
--- a/soapbox/models.py
+++ b/soapbox/models.py
@@ -39,11 +39,10 @@ class MessageManager(models.Manager):
URL.
"""
- results = set()
- for message in self.active():
- if message.is_global or message.match(url):
- results.add(message)
- return list(results)
+ return list({
+ message for message in self.active() if
+ message.is_global or message.match(url)
+ })
@python_2_unicode_compatible | Slightly cleaner approach to message matching.
This also has the side effect of explicitly breaking Python <I>
compatibility, which should not break anyone's install since Python
<I> is unsupported by any current version of Django, but is worth
noting. |
diff --git a/lib/stripe_mock/data.rb b/lib/stripe_mock/data.rb
index <HASH>..<HASH> 100644
--- a/lib/stripe_mock/data.rb
+++ b/lib/stripe_mock/data.rb
@@ -10,13 +10,23 @@ module StripeMock
:object => "customer",
:id => "c_test_customer",
:active_card => {
- :type => "Visa",
+ :object => "card",
:last4 => "4242",
- :exp_month => 11,
+ :type => "Visa",
+ :exp_month => 12,
+ :exp_year => 2013,
+ :fingerprint => "3TQGpK9JoY1GgXPw",
:country => "US",
- :exp_year => 2012,
- :id => "cc_test_card",
- :object => "card"
+ :name => "From Here",
+ :address_line1 => nil,
+ :address_line2 => nil,
+ :address_city => nil,
+ :address_state => nil,
+ :address_zip => nil,
+ :address_country => nil,
+ :cvc_check => "pass",
+ :address_line1_check => nil,
+ :address_zip_check => nil
},
:created => 1304114758
}.merge(params) | Updated customer data mock to match stripe's api docs |
diff --git a/src/pyshark/config.py b/src/pyshark/config.py
index <HASH>..<HASH> 100644
--- a/src/pyshark/config.py
+++ b/src/pyshark/config.py
@@ -4,10 +4,19 @@ from configparser import ConfigParser
import pyshark
-CONFIG_PATH = os.path.join(os.path.dirname(pyshark.__file__), 'config.ini')
+
+fp_config_path = os.path.join(os.getcwd(), 'config.ini') # get config from the current directory
+pyshark_config_path = os.path.join(os.path.dirname(pyshark.__file__), 'config.ini')
def get_config():
+ if os.path.exists(fp_config_path):
+ CONFIG_PATH = fp_config_path
+ elif os.path.exists(pyshark_config_path):
+ CONFIG_PATH = pyshark_config_path
+ else:
+ return None
+
config = ConfigParser()
config.read(CONFIG_PATH)
return config | Get `config.ini` from the current directory first. |
diff --git a/src/Auth0/Login/LoginServiceProvider.php b/src/Auth0/Login/LoginServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/Auth0/Login/LoginServiceProvider.php
+++ b/src/Auth0/Login/LoginServiceProvider.php
@@ -50,8 +50,11 @@ class LoginServiceProvider extends ServiceProvider {
public function register()
{
// Bind the auth0 name to a singleton instance of the Auth0 Service
+ $this->app->singleton(Auth0Service::class, function () {
+ return new Auth0Service();
+ });
$this->app->singleton('auth0', function () {
- return new Auth0Service();
+ return $this->app->make(Auth0Service::class);
});
// When Laravel logs out, logout the auth0 SDK trough the service | Added the Auth0Service as a singleton through the classname |
diff --git a/lib/ruck/clock.rb b/lib/ruck/clock.rb
index <HASH>..<HASH> 100644
--- a/lib/ruck/clock.rb
+++ b/lib/ruck/clock.rb
@@ -3,13 +3,17 @@ require "rubygems"
require "priority_queue"
module Ruck
- # Clock keeps track of events on a virtual timeline.
+ # Clock keeps track of events on a virtual timeline. Clocks can be
+ # configured to run fast or slow relative to another clock by
+ # changing their relative_rate and providing them a parent via
+ # add_child_clock.
#
# Clocks and their sub-clocks are always at the same time; they
# fast-forward in lock-step. You should not call fast_forward on
# a clock with a parent.
class Clock
attr_reader :now # current time in this clock's units
+ attr_accessor :relative_rate # rate relative to parent clock
def initialize(relative_rate = 1.0)
@relative_rate = relative_rate
@@ -68,6 +72,7 @@ module Ruck
protected
+ # returns [clock, [event, relative_time]]
def next_event_with_clock
possible = [] # set of clocks/events to find the min of
@@ -78,7 +83,7 @@ module Ruck
# earliest event of each child, converting to absolute time
possible += @children.map { |c| [c, c.next_event] }.map do |clock, (event, relative_time)|
- [clock, [event, unscale_time(now + relative_time)]] if event
+ [clock, [event, unscale_relative_time(relative_time)]] if event
end.compact
possible.min do |(clock1, (event1, time1)), (clock2, (event2, time2))| | a little more documentation of Clock |
diff --git a/lib/minicron/cli.rb b/lib/minicron/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/minicron/cli.rb
+++ b/lib/minicron/cli.rb
@@ -26,7 +26,7 @@ module Minicron
@commander.default_command :help
# Hide --trace and -t from the help menu, waiting on commander pull request
- # Commander::Runner.instance.disable_tracing
+ # @commander.disable_tracing
# Add a global option for verbose mode
@commander.global_option '--verbose', 'Turn on verbose mode' | Not using the singleton instance anymore |
diff --git a/dump2polarion/transform.py b/dump2polarion/transform.py
index <HASH>..<HASH> 100644
--- a/dump2polarion/transform.py
+++ b/dump2polarion/transform.py
@@ -13,6 +13,13 @@ import re
from dump2polarion.verdicts import Verdicts
+def only_passed_and_wait(result):
+ """Returns PASS and WAIT results only, skips everything else."""
+ verdict = result.get('verdict', '').strip().lower()
+ if verdict in Verdicts.PASS + Verdicts.WAIT:
+ return result
+
+
# pylint: disable=unused-argument
def get_results_transform_cfme(config):
"""Return result transformation function for CFME.""" | transform func that filters only passed and wait |
diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py
index <HASH>..<HASH> 100644
--- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py
+++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py
@@ -12,6 +12,6 @@ from ._shared_access_signature_credential import EventGridSharedAccessSignatureC
from ._version import VERSION
__all__ = ['EventGridPublisherClient', 'EventGridConsumer',
- 'CloudEvent', 'CustomEvent', 'DeserializedEvent', 'EventGridEvent', 'StorageBlobCreatedEventData'
+ 'CloudEvent', 'CustomEvent', 'DeserializedEvent', 'EventGridEvent', 'StorageBlobCreatedEventData',
'generate_shared_access_signature', 'EventGridSharedAccessSignatureCredential']
__version__ = VERSION | CI fix (#<I>) |
diff --git a/plugins/noembed/trumbowyg.noembed.js b/plugins/noembed/trumbowyg.noembed.js
index <HASH>..<HASH> 100644
--- a/plugins/noembed/trumbowyg.noembed.js
+++ b/plugins/noembed/trumbowyg.noembed.js
@@ -52,6 +52,10 @@
noembed: 'Incorporar',
noembedError: 'Erro'
},
+ ko: {
+ noembed: 'oEmbed 넣기',
+ noembedError: '에러'
+ },
},
plugins: { | feat: add korean translation to noembed plugin |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@ long_description = "\n\n".join([
setup(
name='marcxml_parser',
version=getVersion(changelog),
- description="MARC XML / OAI parser.",
+ description="MARC XML / OAI parser, with few highlevel getters.",
long_description=long_description,
url='https://github.com/edeposit/marcxml_parser',
@@ -34,8 +34,6 @@ setup(
package_dir={'': 'src'},
include_package_data=True,
- # scripts=[''],
-
zip_safe=False,
install_requires=[
'setuptools', | setup.py fixed. Package registered at pypi. Closes #2. |
diff --git a/spyder/widgets/findinfiles.py b/spyder/widgets/findinfiles.py
index <HASH>..<HASH> 100644
--- a/spyder/widgets/findinfiles.py
+++ b/spyder/widgets/findinfiles.py
@@ -489,10 +489,12 @@ class FindOptions(QWidget):
@Slot()
def select_directory(self):
"""Select directory"""
+ self.parent().redirect_stdio.emit(False)
directory = getexistingdirectory(self, _("Select directory"),
self.path)
if directory:
directory = to_text_string(osp.abspath(to_text_string(directory)))
+ self.parent().redirect_stdio.emit(True)
return directory
def set_directory(self, directory): | Find in files: Restore redirect_stdio signal when selecting a directory |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -5,6 +5,8 @@ module.exports = {
"sort-object-props": function(context) {
var caseSensitive = context.options[0].caseSensitive;
var ignoreMethods = context.options[0].ignoreMethods;
+ var ignorePrivate = context.options[0].ignorePrivate;
+
var MSG = "Property names in object literals should be sorted";
return {
"ObjectExpression": function(node) {
@@ -25,6 +27,11 @@ module.exports = {
lastPropId = lastPropId.toLowerCase();
propId = propId.toLowerCase();
}
+
+ if (ignorePrivate && /^_/.test(propId)) {
+ return prop;
+ }
+
if (propId < lastPropId) {
context.report(prop, MSG);
} | Add an `ignorePrivate` option.
With `ignorePrivate: true` set, all keys that start with a `_` are ignored. |
diff --git a/src/Illuminate/Database/DetectsLostConnections.php b/src/Illuminate/Database/DetectsLostConnections.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Database/DetectsLostConnections.php
+++ b/src/Illuminate/Database/DetectsLostConnections.php
@@ -23,6 +23,7 @@ trait DetectsLostConnections
'Lost connection',
'is dead or not enabled',
'Error while sending',
+ 'decryption failed or bad record mac',
]);
}
} | Added another lost connection case for pgsql |
diff --git a/js/lib/ext.core.TemplateHandler.js b/js/lib/ext.core.TemplateHandler.js
index <HASH>..<HASH> 100644
--- a/js/lib/ext.core.TemplateHandler.js
+++ b/js/lib/ext.core.TemplateHandler.js
@@ -198,7 +198,9 @@ TemplateHandler.prototype._expandTemplate = function ( state, frame, cb, attribs
attribTokens = Util.flattenAndAppendToks(attribTokens, null, kv.k);
}
if (kv.v) {
- attribTokens = Util.flattenAndAppendToks(attribTokens, "=", kv.v);
+ attribTokens = Util.flattenAndAppendToks(attribTokens,
+ kv.k ? "=" : '',
+ kv.v);
}
attribTokens.push('|');
} ); | Fix re-joining of key/value pairs for invalid templates
The equal sign was inserted even for empty keys. One more parser test green.
Change-Id: I7f<I>a7c<I>bbffe<I>fbbcf<I>e<I>bd<I>f<I>d8 |
diff --git a/scripts/performance/perf_load/perf_client.py b/scripts/performance/perf_load/perf_client.py
index <HASH>..<HASH> 100644
--- a/scripts/performance/perf_load/perf_client.py
+++ b/scripts/performance/perf_load/perf_client.py
@@ -244,14 +244,6 @@ class LoadClient:
return
for auth_rule in data_f:
- if not auth_rule['constraint']:
- # TODO INDY-2077
- self._logger.warning(
- "Skip auth rule setting since constraint is empty: {}"
- .format(auth_rule)
- )
- continue
-
try:
metadata_addition = self._auth_rule_metadata.get(auth_rule['auth_type'], None)
if metadata_addition: | removes a workaround for unexpected auth rule |
diff --git a/src/edeposit/amqp/harvester/scrappers/zonerpress_cz/__init__.py b/src/edeposit/amqp/harvester/scrappers/zonerpress_cz/__init__.py
index <HASH>..<HASH> 100755
--- a/src/edeposit/amqp/harvester/scrappers/zonerpress_cz/__init__.py
+++ b/src/edeposit/amqp/harvester/scrappers/zonerpress_cz/__init__.py
@@ -247,7 +247,7 @@ def get_publications():
"""
books = []
for link in get_book_links(LINKS):
- books.append(
+ books.append(
_process_book(link)
) | Aplied coding style to zonerpress scrapper. |
diff --git a/fontbakery-check-ttf.py b/fontbakery-check-ttf.py
index <HASH>..<HASH> 100755
--- a/fontbakery-check-ttf.py
+++ b/fontbakery-check-ttf.py
@@ -3051,6 +3051,9 @@ def main():
fb.new_check("METADATA.pb: Designer exists in GWF profiles.csv ?")
if family.designer == "":
fb.error('METADATA.pb field "designer" MUST NOT be empty!')
+ elif family.designer == "Multiple Designers":
+ fb.skip("Found 'Multiple Designers' at METADATA.pb, which is OK,"
+ "so we won't look for it at profiles.cvs")
else:
try:
fp = urllib.urlopen(PROFILES_RAW_URL)
@@ -3059,9 +3062,7 @@ def main():
if not row:
continue
designers.append(row[0].decode('utf-8'))
- if family.designer == "Multiple Designers":
- fb.ok("Found 'Multiple Designers' at METADATA.pb")
- elif family.designer not in designers:
+ if family.designer not in designers:
fb.error(("METADATA.pb: Designer '{}' is not listed"
" in profiles.csv"
" (at '{}')").format(family.designer, | actually skip "profiles.csv" check of "Multiple Designers"
(issue #<I>) |
diff --git a/tck/src/org/objenesis/tck/TextReporter.java b/tck/src/org/objenesis/tck/TextReporter.java
index <HASH>..<HASH> 100644
--- a/tck/src/org/objenesis/tck/TextReporter.java
+++ b/tck/src/org/objenesis/tck/TextReporter.java
@@ -73,9 +73,9 @@ public class TextReporter implements Reporter {
private int errorCount = 0;
- private SortedMap<String, Object> allCandidates;
+ private SortedMap<String, Object> allCandidates = new TreeMap<String, Object>();
- private SortedMap<String, Object> allInstantiators;
+ private SortedMap<String, Object> allInstantiators = new TreeMap<String, Object>();
private String currentObjenesis;
@@ -100,8 +100,8 @@ public class TextReporter implements Reporter {
// HT: in case the same reporter is reused, I'm guessing that it will
// always be the same platform
this.platformDescription = platformDescription;
- this.allCandidates = new TreeMap<String, Object>(allCandidates);
- this.allInstantiators = new TreeMap<String, Object>(allInstantiators);
+ this.allCandidates.putAll(allCandidates);
+ this.allInstantiators.putAll(allInstantiators);
for(String desc : allInstantiators.keySet()) {
objenesisResults.put(desc, new HashMap<String, Result>()); | Should putAll to be able to reuse the reporter |
diff --git a/backends/graphite.js b/backends/graphite.js
index <HASH>..<HASH> 100644
--- a/backends/graphite.js
+++ b/backends/graphite.js
@@ -59,6 +59,7 @@ var flush_stats = function graphite_flush(ts, metrics) {
var counters = metrics.counters;
var gauges = metrics.gauges;
var timers = metrics.timers;
+ var sets = metrics.sets;
var pctThreshold = metrics.pctThreshold;
for (key in counters) {
@@ -135,6 +136,11 @@ var flush_stats = function graphite_flush(ts, metrics) {
numStats += 1;
}
+ for (key in sets) {
+ statString += 'stats.sets.' + key + '.count ' + sets[key].values().length + ' ' + ts + "\n";
+ numStats += 1;
+ }
+
statString += 'statsd.numStats ' + numStats + ' ' + ts + "\n";
statString += 'stats.statsd.graphiteStats.calculationtime ' + (Date.now() - starttime) + ' ' + ts + "\n";
post_stats(statString); | Add sets support in the graphite backend
The backend doesn't support sets of data, so the count of unique
elements is sent instead |
diff --git a/horoscope_generator/HoroscopeGenerator.py b/horoscope_generator/HoroscopeGenerator.py
index <HASH>..<HASH> 100644
--- a/horoscope_generator/HoroscopeGenerator.py
+++ b/horoscope_generator/HoroscopeGenerator.py
@@ -2,13 +2,16 @@
import logging
from nltk.grammar import Nonterminal
from nltk import CFG
+from os import path
import random
import re
+HERE = path.abspath(path.dirname(__file__))
+
try:
- GRAMMAR = CFG.fromstring(open('data/grammar.txt').read())
+ GRAMMAR = CFG.fromstring(open('%s/data/grammar.txt' % HERE).read())
except IOError:
- logging.error('Unable to load GRAMMAR')
+ logging.error('Unable to load grammar file')
raise IOError
def get_sentence(start=None, depth=7): | Fixes path to access data files |
diff --git a/lib/librato.js b/lib/librato.js
index <HASH>..<HASH> 100644
--- a/lib/librato.js
+++ b/lib/librato.js
@@ -253,13 +253,15 @@ var flush_stats = function librato_flush(ts, metrics)
countStat = typeof countStat !== 'undefined' ? countStat : true;
var match;
- if (sourceRegex && (match = measure.name.match(sourceRegex)) && match[1]) {
- // Use first capturing group as source name
+ var measureName = globalPrefix + measure.name;
+
+ // Use first capturing group as source name
+ if (sourceRegex && (match = measureName.match(sourceRegex)) && match[1]) {
measure.source = sanitize_name(match[1]);
// Remove entire matching string from the measure name & add global prefix.
- measure.name = globalPrefix + sanitize_name(measure.name.slice(0, match.index) + measure.name.slice(match.index + match[0].length));
+ measure.name = sanitize_name(measureName.slice(0, match.index) + measureName.slice(match.index + match[0].length));
} else {
- measure.name = globalPrefix + sanitize_name(measure.name);
+ measure.name = sanitize_name(measureName);
}
if (brokenMetrics[measure.name]) { | Add globalPrefix before performing sourceRegex match |
diff --git a/mqlight.js b/mqlight.js
index <HASH>..<HASH> 100644
--- a/mqlight.js
+++ b/mqlight.js
@@ -511,7 +511,7 @@ Client.prototype.send = function(topic, data, options, callback) {
}
// Validate the passed parameters
- if (topic === undefined) {
+ if (!topic) {
throw new Error('Cannot send to undefined topic');
} else if (typeof topic !== 'string') {
throw new TypeError('topic must be a string type');
@@ -647,8 +647,8 @@ Client.prototype.subscribe = function(pattern, share, options, callback) {
}
// Validate the pattern parameter
- if (pattern === undefined) {
- throw new Error('Cannot subscribe to undefined pattern');
+ if (!pattern) {
+ throw new Error('Cannot subscribe to undefined pattern.');
} else if (typeof pattern !== 'string') {
throw new TypeError('pattern must be a string type');
} | catch "" and null topic strings |
diff --git a/ConnectionResolver.php b/ConnectionResolver.php
index <HASH>..<HASH> 100644
--- a/ConnectionResolver.php
+++ b/ConnectionResolver.php
@@ -56,6 +56,17 @@ class ConnectionResolver implements ConnectionResolverInterface {
}
/**
+ * Check if a connection has been registered.
+ *
+ * @param string $name
+ * @return bool
+ */
+ public function hasConnection($name)
+ {
+ return isset($this->connections[$name]);
+ }
+
+ /**
* Get the default connection name.
*
* @return string | Added `hasConnection` method to ConnectionResolver. |
diff --git a/lib/ui/Editor.js b/lib/ui/Editor.js
index <HASH>..<HASH> 100644
--- a/lib/ui/Editor.js
+++ b/lib/ui/Editor.js
@@ -677,7 +677,11 @@ Editor.prototype._initHandlers = function () {
}
self.select({x: startX, y: mouse.y}, {x: endX, y: mouse.y});
} else {
- if (!self.data.mouseDown) self.startSelection(mouse);
+ if (!self.data.mouseDown) {
+ self.data.hideSelection = true;
+ self.startSelection(mouse);
+ self.data.hideSelection = false;
+ }
self.data.mouseDown = true;
}
}
@@ -802,7 +806,7 @@ Editor.prototype.render = function () {
line.slice(markupScrollX, markup.index(line, x + size.x)) +
_.repeat(' ', size.x).join('');
- if (selectionStyle && visibleSelection.start.y <= y && y <= visibleSelection.end.y) {
+ if (!self.data.hideSelection && selectionStyle && visibleSelection.start.y <= y && y <= visibleSelection.end.y) {
line = markup(line, selectionStyle,
y === visibleSelection.start.y ? visibleSelection.start.x - x : 0,
y === visibleSelection.end.y ? visibleSelection.end.x - x : Infinity); | Fixes selection flicker on click |
diff --git a/views/block/index.js b/views/block/index.js
index <HASH>..<HASH> 100644
--- a/views/block/index.js
+++ b/views/block/index.js
@@ -60,7 +60,10 @@ module.exports = view.extend({
this.page(this.$data.back);
},
onCancel: function (e) {
- global.history.back();
+ e.preventDefault();
+ app.remove(index);
+ var id = this.$root.$data.params.id;
+ this.page('/make/' + id + '/add');
}
},
created: function () { | Fix #<I> - Cancel shouldn't add block to my app |
diff --git a/ClassCollectionLoader.php b/ClassCollectionLoader.php
index <HASH>..<HASH> 100644
--- a/ClassCollectionLoader.php
+++ b/ClassCollectionLoader.php
@@ -116,8 +116,8 @@ class ClassCollectionLoader
}
// cache the core classes
- if (!is_dir(dirname($cache))) {
- mkdir(dirname($cache), 0777, true);
+ if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) {
+ throw new \RuntimeException(sprintf('Class Collection Loader was not able to create directory "%s"', $cacheDir));
}
self::writeCacheFile($cache, '<?php '.$content);
diff --git a/ClassMapGenerator.php b/ClassMapGenerator.php
index <HASH>..<HASH> 100644
--- a/ClassMapGenerator.php
+++ b/ClassMapGenerator.php
@@ -134,7 +134,7 @@ class ClassMapGenerator
}
if ($isClassConstant) {
- continue;
+ break;
}
// Find the classname | [<I>] Static Code Analysis for Components |
diff --git a/tests/test_cache.py b/tests/test_cache.py
index <HASH>..<HASH> 100644
--- a/tests/test_cache.py
+++ b/tests/test_cache.py
@@ -52,6 +52,9 @@ class InlineTestT(Transformer):
def NUM(self, token):
return int(token)
+ def __reduce__(self):
+ raise TypeError("This Transformer should not be pickled.")
+
def append_zero(t):
return t.update(value=t.value + '0')
@@ -107,6 +110,8 @@ class TestCache(TestCase):
def test_inline(self):
# Test inline transformer (tree-less) & lexer_callbacks
+ # Note: the Transformer should not be saved to the file,
+ # and is made unpickable to check for that
g = """
start: add+
add: NUM "+" NUM
@@ -134,7 +139,7 @@ class TestCache(TestCase):
assert len(self.mock_fs.files) == 1
res = parser.parse("ab")
self.assertEqual(res, Tree('startab', [Tree('expr', ['a', 'b'])]))
-
+ | added test for not caching the Transformer |
diff --git a/src/Worker.php b/src/Worker.php
index <HASH>..<HASH> 100644
--- a/src/Worker.php
+++ b/src/Worker.php
@@ -49,4 +49,12 @@ class Worker implements WorkerInterface
{
return $this->busy;
}
+
+ /*
+ * @return PromiseInterface
+ */
+ public function terminate()
+ {
+ return $this->messenger->softTerminate();
+ }
}
diff --git a/src/WorkerInterface.php b/src/WorkerInterface.php
index <HASH>..<HASH> 100644
--- a/src/WorkerInterface.php
+++ b/src/WorkerInterface.php
@@ -24,4 +24,9 @@ interface WorkerInterface extends EventEmitterInterface
* @return bool
*/
public function isBusy();
+
+ /**
+ * @return PromiseInterface
+ */
+ public function terminate();
} | Added terminate to be passed on to the messenger |
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -449,7 +449,7 @@ describe('CachingBrowserify', function() {
expect(loader.entries).to.have.keys(['npm:my-module']);
var file = fs.readFileSync(result.directory + '/browserify/browserify.js', 'UTF8');
- expect(file).to.match(/sourceMappingURL=data:application\/json;base64/);
+ expect(file).to.match(/sourceMappingURL=data:application\/json;.*base64,/);
expect(spy).to.have.callCount(1);
return builder.build();
}).then(function(){ | allow additional entries (like encoding) before base<I>, |
diff --git a/HMpTy/mysql/conesearch.py b/HMpTy/mysql/conesearch.py
index <HASH>..<HASH> 100644
--- a/HMpTy/mysql/conesearch.py
+++ b/HMpTy/mysql/conesearch.py
@@ -285,7 +285,7 @@ class conesearch():
trixelArray = self._get_trixel_ids_that_overlap_conesearch_circles()
htmLevel = "htm%sID" % self.htmDepth
- if trixelArray.size > 50000:
+ if trixelArray.size > 35000:
minID = np.min(trixelArray)
maxID = np.max(trixelArray)
htmWhereClause = "where %(htmLevel)s between %(minID)s and %(maxID)s " % locals( | decreasing the size of the HTMid selection query again |
diff --git a/lib/utils.js b/lib/utils.js
index <HASH>..<HASH> 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -69,6 +69,7 @@ var CommonController = {
var setResData = function setResData(data, scope) {
if (scope.req.method.toLowerCase() !== 'head') {
scope.restfulResult = data;
+ scope.res.restfulResult = data; // we need a way to get it from res
}
}; | put `restfulResult` to `res` |
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -95,7 +95,8 @@ master_doc = 'index'
# General information about the project.
project = 'MetPy'
# noinspection PyShadowingBuiltins
-copyright = ('2019, MetPy Developers. Development supported by National Science Foundation grants '
+copyright = ('2019-2020, MetPy Developers. '
+ 'Development supported by National Science Foundation grants '
'AGS-1344155, OAC-1740315, and AGS-1901712.')
# The version info for the project you're documenting, acts as replacement for | Update copyright year to include <I> |
diff --git a/src/plugins/withTyping.js b/src/plugins/withTyping.js
index <HASH>..<HASH> 100644
--- a/src/plugins/withTyping.js
+++ b/src/plugins/withTyping.js
@@ -2,15 +2,19 @@ import sleep from 'delay';
const methods = [
'sendText',
+ 'sendMessage',
'sendAttachment',
'sendImage',
'sendAudio',
'sendVideo',
'sendFile',
'sendQuickReplies',
+ 'sendTemplate',
'sendGenericTemplate',
'sendButtonTemplate',
'sendListTemplate',
+ 'sendOpenGraphTemplate',
+ 'sendMediaTemplate',
'sendReceiptTemplate',
'sendAirlineBoardingPassTemplate',
'sendAirlineCheckinTemplate',
@@ -28,7 +32,6 @@ const methods = [
'sendVoice',
'sendVenue',
'sendContact',
- 'sendChatAction',
];
export default options => context => { | refined affected methods in withTyping |
diff --git a/cmd/lncli/commands.go b/cmd/lncli/commands.go
index <HASH>..<HASH> 100644
--- a/cmd/lncli/commands.go
+++ b/cmd/lncli/commands.go
@@ -60,7 +60,7 @@ var newAddressCommand = cli.Command{
Description: "Generate a wallet new address. Address-types has to be one of:\n" +
" - p2wkh: Push to witness key hash\n" +
" - np2wkh: Push to nested witness key hash\n" +
- " - p2pkh: Push to public key hash",
+ " - p2pkh: Push to public key hash (can't be used to fund channels)",
Action: newAddress,
}
diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go
index <HASH>..<HASH> 100644
--- a/lnwallet/wallet.go
+++ b/lnwallet/wallet.go
@@ -60,7 +60,7 @@ type ErrInsufficientFunds struct {
}
func (e *ErrInsufficientFunds) Error() string {
- return fmt.Sprintf("not enough outputs to create funding transaction,"+
+ return fmt.Sprintf("not enough witness outputs to create funding transaction,"+
" need %v only have %v available", e.amountAvailable,
e.amountSelected)
} | cmd/lncli+lnwallet: specify need for witness outputs for funding channels
In this commit, we extend the help message for `newaddress`
to indicate which address types can be used when directly
funding channels. Additionally, we add some additional text
to the insufficient funding error to detail that we don't have
enough witness outputs. |
diff --git a/pkg/urlutil/urlutil.go b/pkg/urlutil/urlutil.go
index <HASH>..<HASH> 100644
--- a/pkg/urlutil/urlutil.go
+++ b/pkg/urlutil/urlutil.go
@@ -9,7 +9,15 @@ import (
var (
validPrefixes = map[string][]string{
- "url": {"http://", "https://"},
+ "url": {"http://", "https://"},
+
+ // The github.com/ prefix is a special case used to treat context-paths
+ // starting with `github.com` as a git URL if the given path does not
+ // exist locally. The "github.com/" prefix is kept for backward compatibility,
+ // and is a legacy feature.
+ //
+ // Going forward, no additional prefixes should be added, and users should
+ // be encouraged to use explicit URLs (https://github.com/user/repo.git) instead.
"git": {"git://", "github.com/", "git@"},
"transport": {"tcp://", "tcp+tls://", "udp://", "unix://", "unixgram://"},
} | Be explicit about github.com prefix being a legacy feature |
diff --git a/lib/datalib.php b/lib/datalib.php
index <HASH>..<HASH> 100644
--- a/lib/datalib.php
+++ b/lib/datalib.php
@@ -256,7 +256,7 @@ function record_exists($table, $field1="", $value1="", $field2="", $value2="", $
*/
function record_exists_sql($sql) {
- global $db;
+ global $CFG, $db;
if (!$rs = $db->Execute($sql)) {
if (isset($CFG->debug) and $CFG->debug > 7) {
@@ -328,7 +328,7 @@ function count_records_select($table, $select="") {
*/
function count_records_sql($sql) {
- global $db;
+ global $CFG, $db;
$rs = $db->Execute("$sql");
if (!$rs) {
@@ -648,7 +648,7 @@ function get_records_select_menu($table, $select="", $sort="", $fields="*") {
*/
function get_records_sql_menu($sql) {
- global $db;
+ global $CFG, $db;
if (!$rs = $db->Execute($sql)) {
if (isset($CFG->debug) and $CFG->debug > 7) { | Decalre some globals so debugging works better |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -19,11 +19,17 @@ setup(
platforms=['OS Independent'],
license='MIT License',
classifiers=[
- 'Development Status :: 4 - Beta',
- 'Environment :: Web Environment',
+ 'Development Status :: 2 - Pre-Alpha',
+ 'Environment :: Console',
'Intended Audience :: Developers',
+ 'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: Implementation :: PyPy',
+ 'Topic :: Multimedia :: Graphics',
+ 'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities',
],
install_requires=[ | Used more accurate trove classifiers. |
diff --git a/src/pyctools/core/compound.py b/src/pyctools/core/compound.py
index <HASH>..<HASH> 100644
--- a/src/pyctools/core/compound.py
+++ b/src/pyctools/core/compound.py
@@ -38,6 +38,8 @@ from .config import ConfigGrandParent
class Compound(object):
def __init__(self, **kw):
super(Compound, self).__init__()
+ self.inputs = []
+ self.outputs = []
# get child components
self._compound_children = {}
for key in kw:
@@ -54,6 +56,7 @@ class Compound(object):
getattr(self._compound_children[dest], inbox))
elif dest == 'self':
self._compound_outputs[inbox] = (src, outbox)
+ self.outputs.append(inbox)
else:
self._compound_children[src].bind(
outbox, self._compound_children[dest], inbox)
@@ -66,7 +69,6 @@ class Compound(object):
config = ConfigGrandParent()
for name, child in self._compound_children.iteritems():
child_config = child.get_config()
- child_config.name = name
config[name] = child_config
return config | Add 'inputs' and 'outputs' to compound components |
diff --git a/lib/catissue/wustl/logger.rb b/lib/catissue/wustl/logger.rb
index <HASH>..<HASH> 100644
--- a/lib/catissue/wustl/logger.rb
+++ b/lib/catissue/wustl/logger.rb
@@ -4,8 +4,6 @@ require 'fileutils'
module Wustl
# Logger configures the +edu.wustl+ logger.
module Logger
- include FileUtils
-
# @quirk caTissue caTissue requires that a +log+ directory exist in the working directory.
# Messages are logged to +client.log+ and +catissuecore.log+ in this directory. Although
# these logs are large and the content is effectively worthless, nevertheless the directory
@@ -32,7 +30,7 @@ module Wustl
# directory contains a log subdirectory.
def self.configure
dir = File.expand_path('log')
- mkdir(dir) unless File.exists?(dir)
+ FileUtils.mkdir(dir) unless File.exists?(dir)
# Set the configured flag. Configure only once.
if @configured then return else @configured = true end | Scope mkdir by FileUtils. |
diff --git a/app/controllers/media_controller.rb b/app/controllers/media_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/media_controller.rb
+++ b/app/controllers/media_controller.rb
@@ -24,7 +24,7 @@ class MediaController < ApplicationController
q = params[:q]
if q.to_s != ''
# Search with ES if query provided
- @media = Media.search :load => {:include => %w(user tags)}, :page => page, :per_page => per_page do
+ @media = Media.search :load => true, :page => page, :per_page => per_page do
query { string q }
sort { by :created_at, :desc }
end | Simplify load options until we determine reason for errors (demo) |
diff --git a/src/core.js b/src/core.js
index <HASH>..<HASH> 100755
--- a/src/core.js
+++ b/src/core.js
@@ -1150,6 +1150,9 @@ window.me = window.me || {};
// dummy current level
api.currentLevel = {pos:{x:0,y:0}};
+ // reset the transform matrix to the normal one
+ frameBuffer.setTransform(1, 0, 0, 1, 0, 0);
+
// reset the frame counter
frameCounter = 0;
frameRate = Math.round(60/me.sys.fps); | putting back this one as a safety net :) |
diff --git a/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java b/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java
index <HASH>..<HASH> 100644
--- a/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java
+++ b/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java
@@ -64,6 +64,10 @@ public class ForwardingService {
// Parse the address given as the first parameter.
var address = Address.fromString(NetworkParameters.of(network), args[0]);
+ forward(network, address);
+ }
+
+ public static void forward(BitcoinNetwork network, Address address) {
System.out.println("Network: " + network.id());
System.out.println("Forwarding address: " + address); | ForwardingService: split main() into main() and forward() |
diff --git a/Media/DisplayBlock/Strategies/DisplayMediaStrategy.php b/Media/DisplayBlock/Strategies/DisplayMediaStrategy.php
index <HASH>..<HASH> 100644
--- a/Media/DisplayBlock/Strategies/DisplayMediaStrategy.php
+++ b/Media/DisplayBlock/Strategies/DisplayMediaStrategy.php
@@ -54,7 +54,7 @@ class DisplayMediaStrategy extends AbstractStrategy
if (!empty($nodeToLink)) {
$language = $this->currentSiteManager->getCurrentSiteDefaultLanguage();
$siteId = $this->currentSiteManager->getCurrentSiteId();
- $linkUrl = $this->nodeRepository->findOneCurrentlyPublished($nodeToLink, $language, $siteId);
+ $linkUrl = $this->nodeRepository->findOnePublished($nodeToLink, $language, $siteId);
}
$parameters = array( | remove currently version (#<I>) |
diff --git a/lib/rollbar/plugins/basic_socket.rb b/lib/rollbar/plugins/basic_socket.rb
index <HASH>..<HASH> 100644
--- a/lib/rollbar/plugins/basic_socket.rb
+++ b/lib/rollbar/plugins/basic_socket.rb
@@ -1,4 +1,5 @@
Rollbar.plugins.define('basic_socket') do
+
load_on_demand
dependency { !configuration.disable_core_monkey_patch }
@@ -9,11 +10,8 @@ Rollbar.plugins.define('basic_socket') do
Gem::Version.new(ActiveSupport::VERSION::STRING) < Gem::Version.new('5.2.0')
end
- @original_as_json = ::BasicSocket.public_instance_method(:as_json)
-
execute do
- require 'socket'
-
+ @original_as_json = ::BasicSocket.public_instance_method(:as_json)
class BasicSocket # :nodoc:
def as_json(_options = nil)
{ | <I>: move socket require so it's only invoked if the dependencies are met |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@ except:
setup(
name = 'flask-whooshee',
- version = '0.0.6',
+ version = '0.0.7',
description = 'Flask - SQLAlchemy - Whoosh integration',
long_description = 'Flask - SQLAlchemy - Whoosh integration that allows to create and search custom indexes.',
keywords = 'flask, sqlalchemy, whoosh', | Bump to version <I> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.