diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/src/Hint/HintContent.js b/src/Hint/HintContent.js
index <HASH>..<HASH> 100644
--- a/src/Hint/HintContent.js
+++ b/src/Hint/HintContent.js
@@ -50,7 +50,7 @@ const styles = theme => ({
position: 'absolute'
},
left: {
- left: -15,
+ left: -theme.hint.paddings.right,
paddingLeft: theme.hint.paddings.left,
paddingRight: theme.hint.paddings.right,
'& $icon': {
@@ -58,7 +58,7 @@ const styles = theme => ({
}
},
right: {
- left: 15,
+ left: theme.hint.paddings.right,
paddingLeft: theme.hint.paddings.right,
paddingRight: theme.hint.paddings.left,
'& $icon': { | fix: added hint container left and right position |
diff --git a/src/nu/validator/servlet/Statistics.java b/src/nu/validator/servlet/Statistics.java
index <HASH>..<HASH> 100644
--- a/src/nu/validator/servlet/Statistics.java
+++ b/src/nu/validator/servlet/Statistics.java
@@ -107,8 +107,8 @@ public class Statistics {
"Logic errors in schema stats"), PARSER_XML_EXTERNAL(
"Parser set to XML with external entities"), PARSER_HTML4(
"Parser set to explicit HTML4 mode"),
- ABOUT_LEGACY_COMPAT("Doctype with\u300cSYSTEM \"about:legacy-compat\"\u300dfound"),
- XHTML1_SYSTEM_ID("Doctype with XHTML1 system ID found"),
+ ABOUT_LEGACY_COMPAT("Doctype with about:legacy-compat system ID"),
+ XHTML1_SYSTEM_ID("Doctype with XHTML1 system ID"),
XMLNS_FILTER( "XMLNS filter set"), LAX_TYPE(
"Being lax about HTTP content type"), IMAGE_REPORT(
"Image report"), SHOW_SOURCE("Show source"), SHOW_OUTLINE( | Slightly reword a stats description |
diff --git a/fsquery/fsquery.py b/fsquery/fsquery.py
index <HASH>..<HASH> 100644
--- a/fsquery/fsquery.py
+++ b/fsquery/fsquery.py
@@ -1,6 +1,6 @@
import os
import re
-
+import datetime
from shutil import copyfile
@@ -37,6 +37,14 @@ class FSNode :
def relative(self) :
return self.abs.replace(self.root,"")
+ def ts_changed(self) :
+ "TimeStamp of last changed time / date"
+ return os.path.getmtime(self.abs)
+
+ def changed(self) :
+ "Formatted last changed time / date"
+ return "%s"%datetime.datetime.fromtimestamp(self.ts_changed())
+
def isdir(self) :
"True if this FSNode is a directory"
return os.path.isdir(self.abs) | added time functions to FSNode |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
from setuptools import find_packages, setup
import subprocess
-subprocess.call(["apt-get", "install", "libgeos-dev"])
+subprocess.call(["sudo", "apt-get", "install", "libgeos-dev"])
setup(name='dingo',
author='openego development group', | Try libgeos with sudo |
diff --git a/aioauth_client.py b/aioauth_client.py
index <HASH>..<HASH> 100644
--- a/aioauth_client.py
+++ b/aioauth_client.py
@@ -505,7 +505,7 @@ class LichessClient(OAuth2Client):
if self.access_token:
headers['Authorization'] = "Bearer {}".format(self.access_token)
- return self._request(method, url, headers=headers, **aio_kwargs),
+ return self._request(method, url, headers=headers, **aio_kwargs)
class Meetup(OAuth1Client): | Fix TypeError: object tuple can't be used in 'await' expression |
diff --git a/lib/jazzy/doc_builder.rb b/lib/jazzy/doc_builder.rb
index <HASH>..<HASH> 100644
--- a/lib/jazzy/doc_builder.rb
+++ b/lib/jazzy/doc_builder.rb
@@ -183,7 +183,7 @@ module Jazzy
doc[:structure] = source_module.doc_structure
doc[:module_name] = source_module.name
doc[:author_name] = source_module.author_name
- doc[:github_url] = source_module.github_url.to_s
+ doc[:github_url] = source_module.github_url
doc[:dash_url] = source_module.dash_url
doc[:path_to_root] = path_to_root
doc[:hide_name] = true
@@ -287,7 +287,7 @@ module Jazzy
doc[:tasks] = render_tasks(source_module, doc_model.children)
doc[:module_name] = source_module.name
doc[:author_name] = source_module.author_name
- doc[:github_url] = source_module.github_url.to_s
+ doc[:github_url] = source_module.github_url
doc[:dash_url] = source_module.dash_url
doc[:path_to_root] = path_to_root
doc.render | Fixed bug where "View on GitHub" was always shown |
diff --git a/lib/support/chromePerflogParser.js b/lib/support/chromePerflogParser.js
index <HASH>..<HASH> 100644
--- a/lib/support/chromePerflogParser.js
+++ b/lib/support/chromePerflogParser.js
@@ -101,7 +101,15 @@ module.exports = {
entry.time = max(0, blocked) + max(0, dns) + max(0, connect) + send + wait + receive;
- //TODO: figure out how to correctly calculate startedDateTime for connections reused
+ // Calculate offset of any connection already in use and add
+ // it to the entries startedDateTime(ignore main page request)
+ if(response.connectionReused && (entry._requestId !== entry._frameId)) {
+ let requestSentDelta = entry._requestSentTime - entry._requestWillBeSentTime;
+ let newStartDateTime = entry._wallTime + requestSentDelta;
+ entry._requestSentDelta = requestSentDelta;
+ entry.startedDateTime = moment.unix(newStartDateTime).toISOString();
+ }
+
} else {
entry.timings = {
blocked: -1, | Used the delta from requestWillBeSent and requestSent and added it to the startedDateTime of reused connnections |
diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js
index <HASH>..<HASH> 100644
--- a/spec/api-browser-window-spec.js
+++ b/spec/api-browser-window-spec.js
@@ -82,7 +82,10 @@ describe('browser-window module', function () {
})
afterEach(function () {
- return closeWindow(w).then(function () { w = null })
+ return closeWindow(w).then(function () {
+ w = null
+ assert.equal(BrowserWindow.getAllWindows().length, 1)
+ })
})
describe('BrowserWindow.close()', function () { | Assert windows are not leaking across tests |
diff --git a/silverberg/client.py b/silverberg/client.py
index <HASH>..<HASH> 100644
--- a/silverberg/client.py
+++ b/silverberg/client.py
@@ -182,8 +182,11 @@ class CQLClient(object):
prep_query = prepare(query, args)
def _execute(client):
- return client.execute_cql3_query(prep_query,
- ttypes.Compression.NONE, consistency)
+ exec_d = client.execute_cql3_query(prep_query,
+ ttypes.Compression.NONE, consistency)
+ cancellable_d = defer.Deferred(lambda d: self.disconnect())
+ exec_d.chainDeferred(cancellable_d)
+ return cancellable_d
def _proc_results(result):
if result.type == ttypes.CqlResultType.ROWS:
diff --git a/silverberg/thrift_client.py b/silverberg/thrift_client.py
index <HASH>..<HASH> 100644
--- a/silverberg/thrift_client.py
+++ b/silverberg/thrift_client.py
@@ -109,7 +109,7 @@ class OnDemandThriftClient(object):
return d
def _notify_on_connect(self):
- d = Deferred()
+ d = Deferred(lambda d: self.disconnect())
self._waiting_on_connect.append(d)
return d | Query can be cancelled
Cancelling a running query will try to disconnect TCP connection |
diff --git a/encryption/src/main/java/se/simbio/encryption/Encryption.java b/encryption/src/main/java/se/simbio/encryption/Encryption.java
index <HASH>..<HASH> 100644
--- a/encryption/src/main/java/se/simbio/encryption/Encryption.java
+++ b/encryption/src/main/java/se/simbio/encryption/Encryption.java
@@ -14,6 +14,7 @@
package se.simbio.encryption;
import android.R.string;
+import android.os.Build;
import android.util.Base64;
import android.util.Log;
@@ -40,7 +41,7 @@ public class Encryption {
private String mCharsetName = "UTF8";
//base mode
private int mBase64Mode = Base64.DEFAULT;
- //type of aes key that will be created
+ //type of aes key that will be created, on KITKAT+ the API has changed, if you are getting problems please @see <a href="http://android-developers.blogspot.com.br/2013/12/changes-to-secretkeyfactory-api-in.html">http://android-developers.blogspot.com.br/2013/12/changes-to-secretkeyfactory-api-in.html</a>
private String mSecretKeyType = "PBKDF2WithHmacSHA1";
//value used for salting. can be anything
private String mSalt = "some_salt"; | Add an observation for possibles bugs in KitKat+ if you are supporting olders apis, because the API has change in <I>, to solve this problem, you just need to use the PBKDF2WithHmacSHA1And8bit more details please read <URL> |
diff --git a/java/com/couchbase/lite/ApiTest.java b/java/com/couchbase/lite/ApiTest.java
index <HASH>..<HASH> 100644
--- a/java/com/couchbase/lite/ApiTest.java
+++ b/java/com/couchbase/lite/ApiTest.java
@@ -82,7 +82,7 @@ public class ApiTest extends LiteTestCase {
}
boolean readOnly = true;
boolean noReplicator = false;
- ManagerOptions options= new ManagerOptions(readOnly, noReplicator);
+ ManagerOptions options= new ManagerOptions(readOnly);
Manager roManager=new Manager(new File(manager.getDirectory()), options);
Assert.assertTrue(roManager!=null); | Remove noReplicator property from ManagerOptions -- no longer needed. |
diff --git a/jaraco/util/string.py b/jaraco/util/string.py
index <HASH>..<HASH> 100644
--- a/jaraco/util/string.py
+++ b/jaraco/util/string.py
@@ -136,7 +136,7 @@ def trim(s):
is common due to indentation and formatting.
>>> trim("\n\tfoo = bar\n\t\tbar = baz\n")
- 'foo = bar\n\tbar = baz'
+ u'foo = bar\n\tbar = baz'
"""
return textwrap.dedent(s).strip() | Fixed failing doctest (unicode variation) |
diff --git a/ecs-init/engine/engine.go b/ecs-init/engine/engine.go
index <HASH>..<HASH> 100644
--- a/ecs-init/engine/engine.go
+++ b/ecs-init/engine/engine.go
@@ -261,7 +261,7 @@ func (e *Engine) PostStop() error {
err := e.loopbackRouting.RestoreDefault()
// Ignore error from Remove() as the netfilter might never have been
- // addred in the first place
+ // added in the first place
e.credentialsProxyRoute.Remove()
return err
} | Fix typo in comment (#<I>) |
diff --git a/Kwf_js/EyeCandy/Lightbox/Lightbox.js b/Kwf_js/EyeCandy/Lightbox/Lightbox.js
index <HASH>..<HASH> 100644
--- a/Kwf_js/EyeCandy/Lightbox/Lightbox.js
+++ b/Kwf_js/EyeCandy/Lightbox/Lightbox.js
@@ -377,8 +377,14 @@ Kwf.EyeCandy.Lightbox.Styles.CenterBox = Ext.extend(Kwf.EyeCandy.Lightbox.Styles
var xy = this.lightbox.innerLightboxEl.getXY();
xy[0] = centerXy[0];
if (centerXy[1] < xy[1]) xy[1] = centerXy[1]; //move up, but not down
+ /*
+ //animation to new position disabled, buggy
this.lightbox.innerLightboxEl.setXY(xy, true);
this.lightbox.innerLightboxEl.setSize(originalSize); //set back to previous size for animation
this.lightbox.innerLightboxEl.setSize(newSize, null, true); //now animate to new size
+ */
+
+ //instead center unanimated
+ this.lightbox.innerLightboxEl.setXY(xy);
}
}); | disable animation when re-opening lightbox
it made unintentional animations |
diff --git a/lib/vagrant/ui/remote.rb b/lib/vagrant/ui/remote.rb
index <HASH>..<HASH> 100644
--- a/lib/vagrant/ui/remote.rb
+++ b/lib/vagrant/ui/remote.rb
@@ -12,6 +12,11 @@ module Vagrant
# no-op
end
+ def ask(message, **opts)
+ opts[:style] ||= :detail
+ @client.input(message.gsub("%", "%%"), **opts)
+ end
+
# This method handles actually outputting a message of a given type
# to the console.
def say(type, message, opts={}) | Add remote override for #ask method |
diff --git a/spyder/widgets/sourcecode/base.py b/spyder/widgets/sourcecode/base.py
index <HASH>..<HASH> 100644
--- a/spyder/widgets/sourcecode/base.py
+++ b/spyder/widgets/sourcecode/base.py
@@ -55,7 +55,7 @@ class CompletionWidget(QListWidget):
self.setWindowFlags(Qt.SubWindow | Qt.FramelessWindowHint)
self.textedit = parent
self.completion_list = None
- self.case_sensitive = True
+ self.case_sensitive = False
self.enter_select = None
self.hide()
self.itemActivated.connect(self.item_selected)
@@ -85,8 +85,7 @@ class CompletionWidget(QListWidget):
if any(types):
for (c, t) in zip(completion_list, types):
icon = icons_map.get(t, 'no_match')
- #self.addItem(QListWidgetItem(ima.icon(icon), c))
- self.addItem(QListWidgetItem(c))
+ self.addItem(QListWidgetItem(ima.icon(icon), c))
else:
self.addItems(completion_list)
@@ -181,7 +180,6 @@ class CompletionWidget(QListWidget):
if completion_text:
for row, completion in enumerate(self.completion_list):
- #print(completion_text)
if not self.case_sensitive:
print(completion_text)
completion = completion.lower() | Editor: Minor fixes after PR #<I> |
diff --git a/yandextank/plugins/Bfg/worker.py b/yandextank/plugins/Bfg/worker.py
index <HASH>..<HASH> 100644
--- a/yandextank/plugins/Bfg/worker.py
+++ b/yandextank/plugins/Bfg/worker.py
@@ -61,6 +61,15 @@ Gun: {gun.__class__.__name__}
Say the workers to finish their jobs and quit.
"""
self.quit.set()
+ while sorted([self.pool[i].is_alive() for i in xrange(len(self.pool))])[-1]:
+ time.sleep(1)
+ try:
+ while not self.task_queue.empty():
+ self.task_queue.get(timeout=0.1)
+ self.task_queue.close()
+ self.feeder.join()
+ except Exception, ex:
+ logger.info(ex)
def _feed(self):
""" | Update worker.py
Partially solves bfg zombie problem. You need to put os._exit(0) at the end of teardown to make sure instances are dead. |
diff --git a/packages/hw-app-btc/src/Btc.js b/packages/hw-app-btc/src/Btc.js
index <HASH>..<HASH> 100644
--- a/packages/hw-app-btc/src/Btc.js
+++ b/packages/hw-app-btc/src/Btc.js
@@ -228,22 +228,25 @@ const tx1 = btc.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc
}
getTrustedInput(
- transport: Transport<*>,
indexLookup: number,
transaction: Transaction,
additionals: Array<string> = []
): Promise<string> {
- return getTrustedInput(transport, indexLookup, transaction, additionals);
+ return getTrustedInput(
+ this.transport,
+ indexLookup,
+ transaction,
+ additionals
+ );
}
getTrustedInputBIP143(
- transport: Transport<*>,
indexLookup: number,
transaction: Transaction,
additionals: Array<string> = []
): string {
return getTrustedInputBIP143(
- transport,
+ this.transport,
indexLookup,
transaction,
additionals | getTrustedInput* should not take a transport in param |
diff --git a/moa/src/main/java/moa/tasks/EvaluatePrequentialCV.java b/moa/src/main/java/moa/tasks/EvaluatePrequentialCV.java
index <HASH>..<HASH> 100644
--- a/moa/src/main/java/moa/tasks/EvaluatePrequentialCV.java
+++ b/moa/src/main/java/moa/tasks/EvaluatePrequentialCV.java
@@ -93,7 +93,7 @@ public class EvaluatePrequentialCV extends MainTask {
"File to append intermediate csv results to.", null, "csv", true);
public IntOption numFoldsOption = new IntOption("numFolds", 'w',
- "The number of folds (e.g. distributed models) to be use.", 10, 1, Integer.MAX_VALUE);
+ "The number of folds (e.g. distributed models) to be used.", 10, 1, Integer.MAX_VALUE);
public MultiChoiceOption validationMethodologyOption = new MultiChoiceOption(
"validationMethodology", 'a', "Validation methodology to use.", new String[]{ | Doing the same spelling correction to numFolds in EvaluatePrequentialCV |
diff --git a/src/prop-types/ref.js b/src/prop-types/ref.js
index <HASH>..<HASH> 100644
--- a/src/prop-types/ref.js
+++ b/src/prop-types/ref.js
@@ -1,5 +1,3 @@
import PropTypes from 'prop-types';
-export default PropTypes.shape({
- current: PropTypes.any,
-});
+export default PropTypes.object; | Use Object proptype for refs
Using shape with non-required keys is basically the same as using Object in the first place. And we cannot make the current key required here because at certain points in the component lifecycle it will be null. |
diff --git a/osmdroid-android/src/main/java/org/osmdroid/views/overlay/ItemizedIconOverlay.java b/osmdroid-android/src/main/java/org/osmdroid/views/overlay/ItemizedIconOverlay.java
index <HASH>..<HASH> 100644
--- a/osmdroid-android/src/main/java/org/osmdroid/views/overlay/ItemizedIconOverlay.java
+++ b/osmdroid-android/src/main/java/org/osmdroid/views/overlay/ItemizedIconOverlay.java
@@ -74,6 +74,7 @@ public class ItemizedIconOverlay<Item extends OverlayItem> extends ItemizedOverl
public void addItem(final int location, final Item item) {
mItemList.add(location, item);
+ populate();
}
public boolean addItems(final List<Item> items) { | Update issue <I>
Status: ReadyForTesting
Added populate() call to addItem(int, Item) |
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -121,6 +121,7 @@ gulp.task('conda:build', async () => {
if (os.platform() == 'win32') {
title('installing buildtools (must be running as Administrator)');
await spawnAsync(`npm install --global --production windows-build-tools`);
+ await spawnAsync(`npm config set msvs_version 2015 --global`);
}
title('installing microdrop'); | ensure msvs_version is <I> |
diff --git a/mozilla_django_oidc/auth.py b/mozilla_django_oidc/auth.py
index <HASH>..<HASH> 100644
--- a/mozilla_django_oidc/auth.py
+++ b/mozilla_django_oidc/auth.py
@@ -28,7 +28,7 @@ def default_username_algo(email):
# this protects against data leakage because usernames are often
# treated as public identifiers (so we can't use the email address).
return base64.urlsafe_b64encode(
- hashlib.sha224(smart_bytes(email)).digest()
+ hashlib.sha1(smart_bytes(email)).digest()
).rstrip(b'=') | Replace sh<I> with sha1 in username_algo. |
diff --git a/foxpuppet/windows/browser.py b/foxpuppet/windows/browser.py
index <HASH>..<HASH> 100644
--- a/foxpuppet/windows/browser.py
+++ b/foxpuppet/windows/browser.py
@@ -23,7 +23,7 @@ class BrowserWindow(BaseWindow):
"""Returns True if this is a Private Browsing window."""
self.switch_to()
- with self.selenium.context('chrome'):
+ with self.selenium.context(self.selenium.CONTEXT_CHROME):
return self.selenium.execute_script(
"""
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
@@ -42,7 +42,7 @@ class BrowserWindow(BaseWindow):
handles_before = self.selenium.window_handles
self.switch_to()
- with self.selenium.context('chrome'):
+ with self.selenium.context(self.selenium.CONTEXT_CHROME):
# Opens private or non-private window
self.selenium.find_element(*self._file_menu_button_locator).click()
if private: | Switch to class variables for context values (#<I>) |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -177,7 +177,7 @@ function processParameter(param,op,path,index,openapi) {
for (var mimetype of consumes) {
result.content[mimetype] = {};
if (param.description) result.content[mimetype].description = param.description;
- result.content[mimetype].schema = param.schema||{};
+ result.content[mimetype].schema = common.clone(param.schema)||{};
}
}
@@ -269,7 +269,7 @@ function processPaths(container,containerName,options,requestBodyCache,openapi)
response.content = {};
for (var mimetype of produces) {
response.content[mimetype] = {};
- response.content[mimetype].schema = response.schema;
+ response.content[mimetype].schema = common.clone(response.schema);
}
delete response.schema;
} | Clone schemas to prevent internal refs in yaml |
diff --git a/config/initializers/url_for_patch.rb b/config/initializers/url_for_patch.rb
index <HASH>..<HASH> 100644
--- a/config/initializers/url_for_patch.rb
+++ b/config/initializers/url_for_patch.rb
@@ -1,8 +1,8 @@
module ActionDispatch
module Routing
class RouteSet
-
- def url_for_with_storytime(options = {})
+
+ def handle_storytime_urls(options)
if options[:controller] == "storytime/posts" && options[:action] == "index"
options[:use_route] = "root_post_index" if Storytime::Site.first.root_page_content == "posts"
elsif options[:controller] == "storytime/posts" && options[:action] == "show"
@@ -35,14 +35,22 @@ module ActionDispatch
end
end
end
-
- url_for_without_storytime(options)
- rescue Exception => e
- # binding.pry
+ end
+
+ if Rails::VERSION::MINOR >= 2
+ def url_for_with_storytime(options, route_name = nil, url_strategy = UNKNOWN)
+ handle_storytime_urls(options)
+ url_for_without_storytime(options, route_name, url_strategy)
+ end
+ else
+ def url_for_with_storytime(options = {})
+ handle_storytime_urls(options)
+ url_for_without_storytime(options)
+ end
end
alias_method_chain :url_for, :storytime
+
end
end
-end
-
+end
\ No newline at end of file | Fix url_for_patch to work with rails <I> |
diff --git a/src/controllers/HubController.php b/src/controllers/HubController.php
index <HASH>..<HASH> 100644
--- a/src/controllers/HubController.php
+++ b/src/controllers/HubController.php
@@ -31,7 +31,9 @@ class HubController extends CrudController
$action = $event->sender;
$dataProvider = $action->getDataProvider();
$dataProvider->query->joinWith(['bindings']);
- $dataProvider->query->andWhere(['with_bindings' => 1]);
+ $dataProvider->query
+ ->andWhere(['with_bindings' => 1])
+ ->andWhere(['with_servers' => 1]);
},
'class' => ViewAction::class,
], | Added `with_servers` to HubController view |
diff --git a/Samba/Connection.php b/Samba/Connection.php
index <HASH>..<HASH> 100644
--- a/Samba/Connection.php
+++ b/Samba/Connection.php
@@ -169,7 +169,7 @@ class sb_Samba_Connection {
public function ls($subdir = '', &$raw = NULL) {
$teststr = str_replace('\\', '-', $subdir);
- $nub = (preg_match('/[-?|\/?]*([\w -]+\.\w{1,4})/', $teststr))?'':'\*';
+ $nub = (preg_match('/[-?|\/?]*([\w \-]+\.\w{1,4})/', $teststr))?'':'\*';
$this->execute("ls $subdir".$nub, $raw_ls);
@@ -214,7 +214,7 @@ class sb_Samba_Connection {
*/
private function parseListing($listing, $subdir = '') {
$ret = new sb_Samba_Listing();
- $exp = '/^\s*([\w ]+\.?\w{3,4})\s+([A-Z]?)\s+(\d+)\s+(\w{3}.+)$/';
+ $exp = '/^\s*([\w \-]+\.?\w{3,4})\s+([A-Z]?)\s+(\d+)\s+(\w{3}.+)$/';
preg_match_all($exp, $listing, $matches); | added support for dashes in filename |
diff --git a/db/migrate/20150930183738_migrate_content_hosts.rb b/db/migrate/20150930183738_migrate_content_hosts.rb
index <HASH>..<HASH> 100644
--- a/db/migrate/20150930183738_migrate_content_hosts.rb
+++ b/db/migrate/20150930183738_migrate_content_hosts.rb
@@ -310,6 +310,8 @@ class MigrateContentHosts < ActiveRecord::Migration
fail _("Some backend services are not running: %s") % ping.inspect
end
+ ::Katello::System.where(:uuid => nil).destroy_all
+
ensure_one_system_per_hostname(MigrateContentHosts::System.all)
systems = get_systems_with_facts(MigrateContentHosts::System.all) | Fixes #<I> - handle systems with nil uuid on upgrade (#<I>) |
diff --git a/src/main/resources/core/scripts/selenium-remoterunner.js b/src/main/resources/core/scripts/selenium-remoterunner.js
index <HASH>..<HASH> 100644
--- a/src/main/resources/core/scripts/selenium-remoterunner.js
+++ b/src/main/resources/core/scripts/selenium-remoterunner.js
@@ -271,7 +271,9 @@ objectExtend(RemoteRunner.prototype, {
},
_HandleHttpResponse : function() {
+ // When request is completed
if (this.xmlHttpForCommandsAndResults.readyState == 4) {
+ // OK
if (this.xmlHttpForCommandsAndResults.status == 200) {
if (this.xmlHttpForCommandsAndResults.responseText=="") {
LOG.error("saw blank string xmlHttpForCommandsAndResults.responseText");
@@ -280,7 +282,9 @@ objectExtend(RemoteRunner.prototype, {
var command = this._extractCommand(this.xmlHttpForCommandsAndResults);
this.currentCommand = command;
this.continueTestAtCurrentCommand();
- } else {
+ }
+ // Not OK
+ else {
var s = 'xmlHttp returned: ' + this.xmlHttpForCommandsAndResults.status + ": " + this.xmlHttpForCommandsAndResults.statusText;
LOG.error(s);
this.currentCommand = null; | Add comments to HandleHttpResponse as reported in SEL-<I>.
r<I> |
diff --git a/test/CoreTest/Entity/AttachableEntityTraitTest.php b/test/CoreTest/Entity/AttachableEntityTraitTest.php
index <HASH>..<HASH> 100644
--- a/test/CoreTest/Entity/AttachableEntityTraitTest.php
+++ b/test/CoreTest/Entity/AttachableEntityTraitTest.php
@@ -100,16 +100,6 @@ class AttachableEntityTraitTest extends \PHPUnit_Framework_TestCase
}
/**
- * @covers ::setAttachableEntityManager()
- */
- public function testSetAttachableEntityManagerWithManagerAlreadySet()
- {
- $this->injectManager($this->attachableEntityTrait);
- $this->setExpectedException(\LogicException::class, 'Attachable entity manager is already set');
- $this->injectManager($this->attachableEntityTrait);
- }
-
- /**
* @covers ::addAttachedEntity()
* @covers ::getAttachableEntityManager()
*/ | [Organizations] adds company logo to the list of profiles page
removes testSetAttachableEntityManagerWithManagerAlreadySet. Test is not deeded any more |
diff --git a/src/phpDocumentor/Plugin/Core/Transformer/Writer/Statistics.php b/src/phpDocumentor/Plugin/Core/Transformer/Writer/Statistics.php
index <HASH>..<HASH> 100644
--- a/src/phpDocumentor/Plugin/Core/Transformer/Writer/Statistics.php
+++ b/src/phpDocumentor/Plugin/Core/Transformer/Writer/Statistics.php
@@ -78,7 +78,7 @@ class Statistics extends Checkstyle
protected function appendPhpdocStatsElement(\DOMDocument $document)
{
$stats = $document->createElement('phpdoc-stats');
- $stats->setAttribute('version', rtrim(Application::$VERSION));
+ $stats->setAttribute('version', Application::$VERSION);
$document->appendChild($stats);
return $document; | No need for trim version - fixed in meantime |
diff --git a/Framework/Gt.php b/Framework/Gt.php
index <HASH>..<HASH> 100644
--- a/Framework/Gt.php
+++ b/Framework/Gt.php
@@ -8,8 +8,11 @@
* defaults for when there aren't any. Then the request is handled, followed by
* the response. The final task is to compute all code and render the page. This
* is done by the Dispatcher.
+ *
+ * For unit tests, passing in true to $skipRequestResponse will stop the usual
+ * request-response execution.
*/
-public function __construct($t) {
+public function __construct($t, $skipRequestResponse = false) {
// set_error_handler(array("ErrorHandler", "error"),
// E_ALL & E_NOTICE & E_RECOVERABLE_ERROR);
@@ -40,6 +43,10 @@ public function __construct($t) {
$c::init();
}
+ if($skipRequestResponse) {
+ return;
+ }
+
// Compute the request, instantiating the relavent PageCode/Api.
$request = new Request($config, $t);
$response = new Response($request); | Added skipRequestReturn variable for when inside a test, if the request/response isn't needed to be executed |
diff --git a/lib/graphql_grpc/function.rb b/lib/graphql_grpc/function.rb
index <HASH>..<HASH> 100644
--- a/lib/graphql_grpc/function.rb
+++ b/lib/graphql_grpc/function.rb
@@ -96,7 +96,13 @@ module GraphqlGrpc
if result.is_a?(Enumerator)
[].tap { |arr| result.each { |e| arr << e } }
else
- result.to_hash
+ if result.respond_to?(:to_hash)
+ result.to_hash
+ elsif result.respond_to?(:to_h)
+ result.to_h
+ else
+ raise NotImplementedError
+ end
end
end
diff --git a/lib/graphql_grpc/version.rb b/lib/graphql_grpc/version.rb
index <HASH>..<HASH> 100644
--- a/lib/graphql_grpc/version.rb
+++ b/lib/graphql_grpc/version.rb
@@ -1,3 +1,3 @@
module GraphqlGrpc
- VERSION = '0.1.12'.freeze
+ VERSION = '0.1.13'.freeze
end | Updating code to handle refactored gRPC response method; #to_hash -> #to_h. |
diff --git a/start.js b/start.js
index <HASH>..<HASH> 100644
--- a/start.js
+++ b/start.js
@@ -1,10 +1,12 @@
-"use strict"
-var R = require("ramda");
-var minimist = require("minimist");
-var chalk = require("chalk");
-var server = require("./lib/server");
+'use strict'
+require('babel-polyfill');
+var R = require('ramda');
+var minimist = require('minimist');
+var chalk = require('chalk');
+var server = require('./lib/server');
var log = require('./lib/shared/log').default;
+// Read-in command-line arguments.
var args = process.argv.slice(2);
args = args.length > 0 ? args = minimist(args) : {};
@@ -29,10 +31,10 @@ if (R.is(String, args.entry)) {
port: args.port
})
.catch(err => {
- log.error(chalk.red("Failed to start."));
+ log.error(chalk.red('Failed to start.'));
log.error(chalk.red(err.message));
log.error()
});
} else {
- log.error(chalk.red("No entry path was specified, for example: `--entry ./src/specs`\n"));
+ log.error(chalk.red('No entry path was specified, for example: `--entry ./src/specs`\n'));
} | Ensure async methods run / and changed " => ' (quotes). |
diff --git a/redis/asyncio/lock.py b/redis/asyncio/lock.py
index <HASH>..<HASH> 100644
--- a/redis/asyncio/lock.py
+++ b/redis/asyncio/lock.py
@@ -3,7 +3,7 @@ import sys
import threading
import uuid
from types import SimpleNamespace
-from typing import TYPE_CHECKING, Awaitable, NoReturn, Optional, Union
+from typing import TYPE_CHECKING, Awaitable, Optional, Union
from redis.exceptions import LockError, LockNotOwnedError
@@ -243,7 +243,7 @@ class Lock:
stored_token = encoder.encode(stored_token)
return self.local.token is not None and stored_token == self.local.token
- def release(self) -> Awaitable[NoReturn]:
+ def release(self) -> Awaitable[None]:
"""Releases the already acquired lock"""
expected_token = self.local.token
if expected_token is None:
@@ -251,7 +251,7 @@ class Lock:
self.local.token = None
return self.do_release(expected_token)
- async def do_release(self, expected_token: bytes):
+ async def do_release(self, expected_token: bytes) -> None:
if not bool(
await self.lua_release(
keys=[self.name], args=[expected_token], client=self.redis | Fix incorrect return annotation in asyncio.lock (#<I>)
NoReturn should be used only when the function never returns. In this case, the awaitable returns None if releasing the lock succeeds, so `Awaitable[None]` is right.
Noticed this while reviewing python/typeshed#<I> |
diff --git a/src/geshi/pascal.php b/src/geshi/pascal.php
index <HASH>..<HASH> 100644
--- a/src/geshi/pascal.php
+++ b/src/geshi/pascal.php
@@ -84,6 +84,7 @@ $language_data = array (
),
),
'SYMBOLS' => array(
+ ',', ':', '=', '.', '+', '-', '*', '/'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false, | add: some symbols for pascal... still pretty colour-less |
diff --git a/splunklib/modularinput/event_writer.py b/splunklib/modularinput/event_writer.py
index <HASH>..<HASH> 100755
--- a/splunklib/modularinput/event_writer.py
+++ b/splunklib/modularinput/event_writer.py
@@ -48,7 +48,7 @@ class EventWriter(object):
else:
self._out = TextIOWrapper(output)
- if isinstance(output, TextIOBase):
+ if isinstance(error, TextIOBase):
self._err = error
else:
self._err = TextIOWrapper(error)
diff --git a/tests/modularinput/test_event.py b/tests/modularinput/test_event.py
index <HASH>..<HASH> 100644
--- a/tests/modularinput/test_event.py
+++ b/tests/modularinput/test_event.py
@@ -144,9 +144,6 @@ class EventTestCase(unittest.TestCase):
out = BytesIO()
err = BytesIO()
- outwrap = TextIOWrapper(out)
- errwrap = TextIOWrapper(err)
-
ew = EventWriter(out, err)
expected_xml = ET.parse(data_open("data/event_maximal.xml")).getroot() | error in checking to see if error output is a TextIOBase
Also removed a couple unused objects in a test |
diff --git a/spf/parser.go b/spf/parser.go
index <HASH>..<HASH> 100644
--- a/spf/parser.go
+++ b/spf/parser.go
@@ -112,6 +112,14 @@ func (p *Parser) sortTokens(tokens []*Token) error {
return nil
}
+func (p *Parser) setDomain(t *Token) string {
+ if !isEmpty(&t.Value) {
+ return t.Value
+ } else {
+ return p.Domain
+ }
+}
+
func (p *Parser) parseVersion(t *Token) (bool, SPFResult) {
if t.Value == spfPrefix {
return true, None | Fix setDomain()
A logic inversion was required, as Parser.Domain was returned upon
nonempty Token.Value. |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -29,3 +29,4 @@ setup(
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
+) | fixed a small issue with setup.py |
diff --git a/src/League/StatsD/Laravel/Provider/StatsdServiceProvider.php b/src/League/StatsD/Laravel/Provider/StatsdServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/League/StatsD/Laravel/Provider/StatsdServiceProvider.php
+++ b/src/League/StatsD/Laravel/Provider/StatsdServiceProvider.php
@@ -3,7 +3,7 @@
namespace League\StatsD\Laravel\Provider;
use Illuminate\Support\ServiceProvider;
-use League\StatsD\Client as StatsdClient;
+use League\StatsD\Client as Statsd;
/**
* StatsD Service provider for Laravel
@@ -20,6 +20,7 @@ class StatsdServiceProvider extends ServiceProvider
*/
public function boot()
{
+ $this->package('league/statsd', 'statsd');
}
/**
@@ -33,7 +34,7 @@ class StatsdServiceProvider extends ServiceProvider
}
/**
- * Register Statsd
+ * Register Statsd
*
* @return void
*/
@@ -54,7 +55,7 @@ class StatsdServiceProvider extends ServiceProvider
}
// Create
- $statsd = new StatsdClient();
+ $statsd = new Statsd();
$statsd->configure($options);
return $statsd;
} | Added $this->package to service provider boot function |
diff --git a/src/main/java/uk/co/real_logic/agrona/collections/Int2ObjectCache.java b/src/main/java/uk/co/real_logic/agrona/collections/Int2ObjectCache.java
index <HASH>..<HASH> 100644
--- a/src/main/java/uk/co/real_logic/agrona/collections/Int2ObjectCache.java
+++ b/src/main/java/uk/co/real_logic/agrona/collections/Int2ObjectCache.java
@@ -104,6 +104,15 @@ public class Int2ObjectCache<V>
}
/**
+ * Reset the cache statistics counters to zero.
+ */
+ public void resetCounters()
+ {
+ cacheHits = 0;
+ cacheMisses = 0;
+ }
+
+ /**
* Get the maximum size the cache of values can grow to.
*
* @return the maximum size the cache of values can grow to.
@@ -403,12 +412,24 @@ public class Int2ObjectCache<V>
}
/**
- * {@inheritDoc}
+ * Clear down all items in the cache.
+ *
+ * If an exception occurs during the eviction handler callback then clear may need to be called again to complete.
*/
+ @SuppressWarnings("unchecked")
public void clear()
{
- size = 0;
- Arrays.fill(values, null);
+ for (int i = 0, size = values.length; i < size; i++)
+ {
+ final Object value = values[i];
+ if (null != value)
+ {
+ values[i] = null;
+ this.size--;
+
+ evictionHandler.accept((V)value);
+ }
+ }
}
/** | [Java]: Added the ability to reset cache counters and notify of eviction on clear. |
diff --git a/tests/unit/modules/test_win_wua.py b/tests/unit/modules/test_win_wua.py
index <HASH>..<HASH> 100644
--- a/tests/unit/modules/test_win_wua.py
+++ b/tests/unit/modules/test_win_wua.py
@@ -40,6 +40,7 @@ class WinWuaInstalledTestCase(TestCase):
"""
Test the functions in the win_wua.installed function
"""
+
service_auto = {"StartType": "Auto"}
service_disabled = {"StartType": "Disabled"} | Fix pre-commit (black) |
diff --git a/src/utils/parse.js b/src/utils/parse.js
index <HASH>..<HASH> 100644
--- a/src/utils/parse.js
+++ b/src/utils/parse.js
@@ -58,7 +58,13 @@ function sanitizeFunction(functionString) {
params = match.groups.params.split(',').map((x) => x.trim())
}
- const func = Function(...params, match.groups.body || '');
+ // Here's the security flaw. We want this functionality for supporting
+ // JSONP, so we've opted for the best attempt at maintaining some amount
+ // of security. This should be a little better than eval because it
+ // shouldn't automatically execute code, just create a function which can
+ // be called later.
+ // eslint-disable-next-line no-new-func
+ const func = new Function(...params, match.groups.body || '');
func.displayName = match.groups.name;
return func;
} | Fix not using `new` and add comment about the security flaw. |
diff --git a/src/Instagram.php b/src/Instagram.php
index <HASH>..<HASH> 100644
--- a/src/Instagram.php
+++ b/src/Instagram.php
@@ -52,7 +52,7 @@ class Instagram {
* @param array $params
* @param array $config
*/
- public function __construct(array $params, array $config = [])
+ public function __construct(array $params = [], array $config = [])
{
$this->accessToken = array_key_exists('accessToken',$params) ? $params['accessToken'] : '';
$this->clientId = array_key_exists('clientId',$params) ? $params['clientId'] : ''; | allow instantiation without params |
diff --git a/spyder/plugins/completion/kite/plugin.py b/spyder/plugins/completion/kite/plugin.py
index <HASH>..<HASH> 100644
--- a/spyder/plugins/completion/kite/plugin.py
+++ b/spyder/plugins/completion/kite/plugin.py
@@ -157,7 +157,7 @@ class KiteCompletionPlugin(SpyderCompletionPlugin):
box.set_checked(False)
box.set_check_visible(True)
box.setText(
- _("It seems like your Kite installation is faulty. "
+ _("It seems that your Kite installation is faulty. "
"If you want to use Kite, please remove the "
"directory that appears bellow, "
"and try a reinstallation:<br><br>" | Kite: Update faulty installation message |
diff --git a/pgcontents/tests/test_synchronization.py b/pgcontents/tests/test_synchronization.py
index <HASH>..<HASH> 100644
--- a/pgcontents/tests/test_synchronization.py
+++ b/pgcontents/tests/test_synchronization.py
@@ -142,11 +142,24 @@ class TestReEncryption(TestCase):
crypto1_factory = {user_id: crypto1}.__getitem__
crypto2_factory = {user_id: crypto2}.__getitem__
- reencrypt_all_users(engine, no_crypto_factory, crypto1_factory, logger)
- check_reencryption(no_crypto_manager, manager1)
+ # Verify that reencryption is idempotent:
+ for _ in range(2):
+ reencrypt_all_users(
+ engine,
+ no_crypto_factory,
+ crypto1_factory,
+ logger,
+ )
+ check_reencryption(no_crypto_manager, manager1)
- reencrypt_all_users(engine, crypto1_factory, crypto2_factory, logger)
- check_reencryption(manager1, manager2)
+ for _ in range(2):
+ reencrypt_all_users(
+ engine,
+ crypto1_factory,
+ crypto2_factory,
+ logger,
+ )
+ check_reencryption(manager1, manager2)
with self.assertRaises(ValueError):
# Using reencrypt_all_users with a no-encryption target isn't | TEST: Explicitly test re-entrancy. |
diff --git a/app/components/medication-allergy.js b/app/components/medication-allergy.js
index <HASH>..<HASH> 100644
--- a/app/components/medication-allergy.js
+++ b/app/components/medication-allergy.js
@@ -1,5 +1,8 @@
import Ember from 'ember';
-import { translationMacro as t } from 'ember-i18n';
+
+const {
+ computed
+} = Ember;
export default Ember.Component.extend({
store: Ember.inject.service(),
@@ -7,8 +10,18 @@ export default Ember.Component.extend({
patient: null,
displayModal: false,
currentAllergy: false,
- buttonConfirmText: t('buttons.add'),
- additionalButtons: Ember.computed('currentAllergy', function() {
+
+ buttonConfirmText: computed('currentAllergy', function() {
+ let i18n = this.get('i18n');
+ let currentAllergy = this.get('currentAllergy');
+ if (currentAllergy) {
+ return i18n.t('buttons.update');
+ } else {
+ return i18n.t('buttons.add');
+ }
+ }),
+
+ additionalButtons: computed('currentAllergy', function() {
let currentAllergy = this.get('currentAllergy');
let btn = this.get('i18n').t('buttons.delete');
if (currentAllergy) { | Updated button on edit allergy from add to update. |
diff --git a/umbra/behaviors.d/facebook.js b/umbra/behaviors.d/facebook.js
index <HASH>..<HASH> 100644
--- a/umbra/behaviors.d/facebook.js
+++ b/umbra/behaviors.d/facebook.js
@@ -102,7 +102,7 @@ var umbraIntervalFunc = function() {
if (where == 0) { // on screen
// var pos = target.getBoundingClientRect().top;
// window.scrollTo(0, target.getBoundingClientRect().top - 100);
- console.log("clicking at " + target.getBoundingClientRect().top + " on " + target.outerHTML);
+ console.log("clicking at " + target.getBoundingClientRect().top + " on " + target.id);
if (target.click != undefined) {
umbraState.expectingSomething = 'closeButton';
target.click(); | Less verbose logging. |
diff --git a/lib/jekyll/readers/data_reader.rb b/lib/jekyll/readers/data_reader.rb
index <HASH>..<HASH> 100644
--- a/lib/jekyll/readers/data_reader.rb
+++ b/lib/jekyll/readers/data_reader.rb
@@ -7,20 +7,20 @@ module Jekyll
@entry_filter = EntryFilter.new(site)
end
- # Read all the files in <source>/<dir>/_drafts and create a new Draft
- # object with each one.
+ # Read all the files in <dir> and adds them to @content
#
# dir - The String relative path of the directory to read.
#
- # Returns nothing.
+ # Returns @content, a Hash of the .yaml, .yml,
+ # .json, and .csv files in the base directory
def read(dir)
base = site.in_source_dir(dir)
read_data_to(base, @content)
@content
end
- # Read and parse all yaml files under <dir> and add them to the
- # <data> variable.
+ # Read and parse all .yaml, .yml, .json, and .csv
+ # files under <dir> and add them to the <data> variable.
#
# dir - The string absolute path of the directory to read.
# data - The variable to which data will be added. | Fixes #<I>
Updated data_reader.rb comments to more accurately reflect read() and read_data_to() functionality. |
diff --git a/library/CM/Mail.php b/library/CM/Mail.php
index <HASH>..<HASH> 100644
--- a/library/CM/Mail.php
+++ b/library/CM/Mail.php
@@ -1,6 +1,8 @@
<?php
-class CM_Mail extends CM_View_Abstract implements CM_Typed {
+class CM_Mail extends CM_View_Abstract implements CM_Typed, CM_Service_ManagerAwareInterface {
+
+ use CM_Service_ManagerAwareTrait;
/** @var CM_Model_User|null */
private $_recipient;
@@ -51,6 +53,8 @@ class CM_Mail extends CM_View_Abstract implements CM_Typed {
* @throws CM_Exception_Invalid
*/
public function __construct($recipient = null, array $tplParams = null, CM_Site_Abstract $site = null) {
+ $this->setServiceManager(CM_Service_Manager::getInstance());
+
if ($this->hasTemplate()) {
$this->setRenderLayout(true);
} | CM_Mail implements CM_Service_ManagerAwareInterface |
diff --git a/psamm/command.py b/psamm/command.py
index <HASH>..<HASH> 100644
--- a/psamm/command.py
+++ b/psamm/command.py
@@ -91,6 +91,22 @@ class Command(object):
logger.warning('Only the first medium will be used')
medium = media[0] if len(media) > 0 else None
+ # Warn about undefined compounds
+ compounds = set()
+ for compound in model.parse_compounds():
+ compounds.add(compound.id)
+
+ undefined_compounds = set()
+ for reaction in database.reactions:
+ for compound, _ in database.get_reaction_values(reaction):
+ if compound.name not in compounds:
+ undefined_compounds.add(compound.name)
+
+ for compound in sorted(undefined_compounds):
+ logger.warning(
+ 'The compound {} was not defined in the list'
+ ' of compounds'.format(compound))
+
self._mm = MetabolicModel.load_model(
database, model.parse_model(), medium, model.parse_limits(),
v_max=model.get_default_flux_limit()) | command: Warn about compounds that are not defined in the model |
diff --git a/lib/whois/answer/parser/whois.publicinterestregistry.net.rb b/lib/whois/answer/parser/whois.publicinterestregistry.net.rb
index <HASH>..<HASH> 100644
--- a/lib/whois/answer/parser/whois.publicinterestregistry.net.rb
+++ b/lib/whois/answer/parser/whois.publicinterestregistry.net.rb
@@ -177,12 +177,11 @@ module Whois
end
def trim_newline
- # The last line is \r\n\n
- @input.scan(/\n+/)
+ @input.skip(/\n+/)
end
def parse_not_found
- @input.scan(/^NOT FOUND\n/)
+ @input.skip(/^NOT FOUND\n/)
end
def parse_throttle | Use skip instead of scan when the consumed string is not relevant |
diff --git a/spec/bolt/transport/winrm_spec.rb b/spec/bolt/transport/winrm_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/bolt/transport/winrm_spec.rb
+++ b/spec/bolt/transport/winrm_spec.rb
@@ -15,6 +15,8 @@ describe Bolt::Transport::WinRM do
def mk_config(conf)
stringified = conf.each_with_object({}) { |(k, v), coll| coll[k.to_s] = v }
+ # The default of 10 seconds seems to be too short to always succeed in AppVeyor.
+ stringified['connect-timeout'] ||= 20
Bolt::Config.new(transport: 'winrm', transports: { winrm: stringified })
end | (maint) Increase winrm timeout in spec tests
AppVeyor periodically times out connecting over WinRM during spec tests.
Increase the default timeout to avoid connection problems during
testing. |
diff --git a/python/lowdim.py b/python/lowdim.py
index <HASH>..<HASH> 100644
--- a/python/lowdim.py
+++ b/python/lowdim.py
@@ -112,7 +112,7 @@ if len(argsIn) > 10 :
if analMode == 'mean' :
resp = X.map(lambda x : dot(y,x))
-if analMode == 'standardize' :
+if analMode == 'corr' :
resp = X.map(lambda x : dot(y,(x-mean(x))/norm(x)))
if analMode == 'regress' :
yhat = dot(inv(dot(y,transpose(y))),y) | Changed name of correlation based analysis |
diff --git a/schema.py b/schema.py
index <HASH>..<HASH> 100644
--- a/schema.py
+++ b/schema.py
@@ -197,7 +197,8 @@ class Schema(object):
required = set(k for k in s if type(k) is not Optional)
if not required.issubset(coverage):
missing_keys = required - coverage
- s_missing_keys = ", ".join(repr(k) for k in missing_keys)
+ s_missing_keys = ', '.join(repr(k) for k in sorted(missing_keys,
+ key=repr))
raise SchemaMissingKeyError('Missing keys: ' + s_missing_keys, e)
if not self._ignore_extra_keys and (len(new) != len(data)):
wrong_keys = set(data.keys()) - set(new.keys()) | Sort missing keys
Wrong keys are sorted, but for some reason, missing keys are not.
Sorting them in the error message looks better and is useful for testability. |
diff --git a/twitter/statuses.go b/twitter/statuses.go
index <HASH>..<HASH> 100644
--- a/twitter/statuses.go
+++ b/twitter/statuses.go
@@ -27,6 +27,8 @@ type Tweet struct {
InReplyToUserIDStr string `json:"in_reply_to_user_id_str"`
Lang string `json:"lang"`
PossiblySensitive bool `json:"possibly_sensitive"`
+ QuoteCount int `json:"quote_count"`
+ ReplyCount int `json:"reply_count"`
RetweetCount int `json:"retweet_count"`
Retweeted bool `json:"retweeted"`
RetweetedStatus *Tweet `json:"retweeted_status"` | Add QuoteCount and RetweetCount to Tweet (#<I>) |
diff --git a/app/models/katello/concerns/pulp_database_unit.rb b/app/models/katello/concerns/pulp_database_unit.rb
index <HASH>..<HASH> 100644
--- a/app/models/katello/concerns/pulp_database_unit.rb
+++ b/app/models/katello/concerns/pulp_database_unit.rb
@@ -194,7 +194,12 @@ module Katello
def db_values_copy(source_repo, dest_repo)
db_values = []
- new_units = self.repository_association_class.where(repository: source_repo).where.not(unit_id_field => self.repository_association_class.where(repository: dest_repo).pluck(unit_id_field))
+ existing_unit_ids = self.repository_association_class.where(repository: dest_repo).pluck(unit_id_field)
+ if existing_unit_ids.empty?
+ new_units = self.repository_association_class.where(repository: source_repo)
+ else
+ new_units = self.repository_association_class.where(repository: source_repo).where.not("#{unit_id_field} in (?) ", existing_unit_ids)
+ end
unit_backend_identifier_field = backend_identifier_field
unit_identifier_filed = unit_id_field
new_units.each do |unit| | Fixes #<I> - Large CV publish (#<I>) |
diff --git a/test/test.index.js b/test/test.index.js
index <HASH>..<HASH> 100644
--- a/test/test.index.js
+++ b/test/test.index.js
@@ -81,7 +81,7 @@ describe("tgfancy", function() {
describe("Text Paging (using Tgfancy#sendMessage())", function() {
- this.timeout(timeout);
+ this.timeout(timeout * 2);
it("pages long message", function() {
const length = 5500;
const longText = Array(length + 1).join("#");
@@ -126,6 +126,7 @@ describe("Queued-methods (using Tgfancy#sendMessage())", function() {
describe("Chat-ID Resolution (using Tgfancy#sendMessage())", function() {
+ this.timeout(timeout);
it("resolves username", function() {
return client.sendMessage(username, "message")
.then(function(message) { | [test] Increase timeouts for network ops |
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index <HASH>..<HASH> 100755
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -1,4 +1,6 @@
<?php
require_once('../autoload.php');
-require_once('../vendor/autoload.php');
\ No newline at end of file
+require_once('../vendor/autoload.php');
+
+error_reporting(E_ERROR);
\ No newline at end of file | Changed error reporting level in PHPUnit |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -11,17 +11,17 @@ __author__ = 'Jason R. Coombs <jaraco@jaraco.com>'
name = 'jaraco.windows'
-setup_params=dict(
+setup_params = dict(
name = name,
- use_hg_version = dict(increment='0.1'),
+ use_hg_version = dict(increment='0.0.1'),
description = 'Windows Routines by Jason R. Coombs',
long_description = open('README').read(),
author = 'Jason R. Coombs',
author_email = 'jaraco@jaraco.com',
- url = 'http://pypi.python.org/pypi/'+name,
+ url = 'http://pypi.python.org/pypi/' + name,
packages = find_packages(),
zip_safe=True,
- namespace_packages = ['jaraco',],
+ namespace_packages = ['jaraco'],
license = 'MIT',
classifiers = [
"Development Status :: 5 - Production/Stable", | Updated setup.py with default increment |
diff --git a/claripy/backends/backend_vsa.py b/claripy/backends/backend_vsa.py
index <HASH>..<HASH> 100644
--- a/claripy/backends/backend_vsa.py
+++ b/claripy/backends/backend_vsa.py
@@ -268,6 +268,15 @@ class BackendVSA(Backend):
# TODO: Implement other operations!
@staticmethod
+ def Or(*args):
+ first = args[0]
+ others = args[1:]
+
+ for o in others:
+ first = first.union(o)
+ return first
+
+ @staticmethod
def LShR(expr, shift_amount):
return expr >> shift_amount | added Or operation to BackendVSA (maps to union on bools) |
diff --git a/logagg/collector.py b/logagg/collector.py
index <HASH>..<HASH> 100644
--- a/logagg/collector.py
+++ b/logagg/collector.py
@@ -62,13 +62,15 @@ class LogCollector(object):
self.formatters = {}
self.queue = Queue.Queue(maxsize=self.QUEUE_MAX_SIZE)
- def validate_log_format(self, log):
+ def _remove_redundancy(self, log):
for key in log:
- #To avoid duplicate information
if key in log and key in log['data']:
log[key] = log['data'].pop(key)
+ return log
- assert bool(key in self.LOG_STRUCTURE)
+ def validate_log_format(self, log):
+ for key in log:
+ assert (key in self.LOG_STRUCTURE)
assert isinstance(log[key], self.LOG_STRUCTURE[key])
@keeprunning(LOG_FILE_POLL_INTERVAL, on_error=util.log_exception)
@@ -101,6 +103,7 @@ class LogCollector(object):
_log = util.load_object(formatter)(raw_log)
log.update(_log)
+ log = self._remove_redundancy(log)
self.validate_log_format(log)
except (SystemExit, KeyboardInterrupt) as e: raise
except: | made _remove_redundancy a separate fn |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@
# -*- coding:utf-8 -*-
import setuptools
-version = "0.6.9"
+version = "0.6.10"
with open("README.md", "r") as fh:
long_description = fh.read() | Up the version. Thanks to Anders Melchiorsen for his PR's |
diff --git a/helper/schema/schema.go b/helper/schema/schema.go
index <HASH>..<HASH> 100644
--- a/helper/schema/schema.go
+++ b/helper/schema/schema.go
@@ -674,7 +674,7 @@ func (m schemaMap) InternalValidate(topSchemaMap schemaMap) error {
var ok bool
if target, ok = sm[part]; !ok {
- return fmt.Errorf("%s: ConflictsWith references unknown attribute (%s)", k, key)
+ return fmt.Errorf("%s: ConflictsWith references unknown attribute (%s) at part (%s)", k, key, part)
}
if subResource, ok := target.Elem.(*Resource); ok { | add "part" to ConflictsWith validation error |
diff --git a/pyautogui/_pyautogui_x11.py b/pyautogui/_pyautogui_x11.py
index <HASH>..<HASH> 100644
--- a/pyautogui/_pyautogui_x11.py
+++ b/pyautogui/_pyautogui_x11.py
@@ -34,26 +34,26 @@ def _vscroll(clicks, x=None, y=None):
clicks = int(clicks)
if clicks == 0:
return
-
- if clicks > 0:
+ elif clicks > 0:
button = 4 # scroll up
else:
button = 5 # scroll down
- _click(x, y, button=button, clicks=abs(clicks)) # TODO - broken
+ for i in range(abs(clicks)):
+ _click(x, y, button=button)
def _hscroll(clicks, x=None, y=None):
clicks = int(clicks)
if clicks == 0:
return
-
- if clicks > 0:
+ elif clicks > 0:
button = 7 # scroll right
else:
button = 6 # scroll left
- _click(x, y, button=button, clicks=abs(clicks)) # TODO - broken
+ for i in range(abs(clicks)):
+ _click(x, y, button=button)
def _scroll(clicks, x=None, y=None): | Fixing X<I> scroll. |
diff --git a/Component/Drivers/BaseDriver.php b/Component/Drivers/BaseDriver.php
index <HASH>..<HASH> 100644
--- a/Component/Drivers/BaseDriver.php
+++ b/Component/Drivers/BaseDriver.php
@@ -31,12 +31,23 @@ abstract class BaseDriver extends ContainerAware
* BaseDriver constructor.
*
* @param ContainerInterface $container
- * @param array $settings
+ * @param array $args
*/
- public function __construct(ContainerInterface $container, array $settings = array())
+ public function __construct(ContainerInterface $container, array $args = array())
{
$this->setContainer($container);
- $this->settings = $settings;
+
+ // init $methods by $args
+ if (is_array($args)) {
+ $methods = get_class_methods(get_class($this));
+ foreach ($args as $key => $value) {
+ $keyMethod = "set" . ucwords($key);
+ if (in_array($keyMethod, $methods)) {
+ $this->$keyMethod($value);
+ }
+ }
+ }
+ $this->settings = $args;
}
/** | Fill BaseDriver by args |
diff --git a/src/StefanoTree/NestedSet/NodeInfo.php b/src/StefanoTree/NestedSet/NodeInfo.php
index <HASH>..<HASH> 100644
--- a/src/StefanoTree/NestedSet/NodeInfo.php
+++ b/src/StefanoTree/NestedSet/NodeInfo.php
@@ -108,7 +108,7 @@ class NodeInfo
*/
public function isRoot(): bool
{
- if (0 == $this->getParentId()) {
+ if (1 === $this->getLeft()) {
return true;
} else {
return false; | Check the `left` property in order to understand if a node is root or not:
In order to be able to use `id` (and so `parentId`) as string I would like
to check the `left` property to discover if a node is root, because 0 ==
'an-id-string' is true in php.
Also the parentId can be null. |
diff --git a/lib/behat/form_field/behat_form_field.php b/lib/behat/form_field/behat_form_field.php
index <HASH>..<HASH> 100644
--- a/lib/behat/form_field/behat_form_field.php
+++ b/lib/behat/form_field/behat_form_field.php
@@ -106,7 +106,9 @@ class behat_form_field {
// using the generic behat_form_field is because we are
// dealing with a fgroup element.
$instance = $this->guess_type();
- return $instance->field->keyPress($char, $modifier);
+ $instance->field->keyDown($char, $modifier);
+ $instance->field->keyPress($char, $modifier);
+ $instance->field->keyUp($char, $modifier);
}
/** | MDL-<I> behat: Key press should be down-press-up
As we simulate real user key press event, the
event should down followed by press and then up key |
diff --git a/src/platforms/web/util/attrs.js b/src/platforms/web/util/attrs.js
index <HASH>..<HASH> 100644
--- a/src/platforms/web/util/attrs.js
+++ b/src/platforms/web/util/attrs.js
@@ -33,14 +33,13 @@ const isAttr = makeMap(
)
/* istanbul ignore next */
-const isRenderableAttr = (name: string): boolean => {
+export const isRenderableAttr = (name: string): boolean => {
return (
isAttr(name) ||
name.indexOf('data-') === 0 ||
name.indexOf('aria-') === 0
)
}
-export { isRenderableAttr }
export const propsToAttrMap = {
acceptCharset: 'accept-charset', | Inline export for consistency (#<I>) |
diff --git a/config.go b/config.go
index <HASH>..<HASH> 100644
--- a/config.go
+++ b/config.go
@@ -125,10 +125,9 @@ type Config struct {
// never be used except for testing purposes, as it can cause a split-brain.
StartAsLeader bool
- // The unique ID for this server across all time. If using protocol
- // version 0 this is optional and will be populated with the server's
- // network address if not given. For protocol version > 0 this is
- // required.
+ // The unique ID for this server across all time. For protocol version
+ // > 1 this is required, and for older protocols it will be populated with
+ // the server's network address.
LocalID ServerID
// NotifyCh is used to provide a channel that will be notified of leadership
@@ -168,7 +167,7 @@ func ValidateConfig(config *Config) error {
return fmt.Errorf("Protocol version %d must be >= %d and <= %d",
config.ProtocolVersion, ProtocolVersionMin, ProtocolVersionMax)
}
- if config.ProtocolVersion > 0 && len(config.LocalID) == 0 {
+ if config.ProtocolVersion > 1 && len(config.LocalID) == 0 {
return fmt.Errorf("LocalID cannot be empty")
}
if config.HeartbeatTimeout < 5*time.Millisecond { | Tweaks LocalID comments and requirements. |
diff --git a/pylogit/mixed_logit.py b/pylogit/mixed_logit.py
index <HASH>..<HASH> 100755
--- a/pylogit/mixed_logit.py
+++ b/pylogit/mixed_logit.py
@@ -419,8 +419,9 @@ class MixedLogit(base_mcm.MNDC_Model):
if "intercept_ref_pos" in kwargs:
if kwargs["intercept_ref_pos"] is not None:
- msg = "All Mixed Logit intercepts should be in the index."
- raise ValueError(msg)
+ msg = "All Mixed Logit intercepts should be in the index. "
+ msg_2 = "intercept_ref_pos should be None."
+ raise ValueError(msg + msg_2)
# Carry out the common instantiation process for all choice models
model_name = model_type_to_display_name["Mixed Logit"] | Changed the ValueError message for when an individual includes the intercept_ref_pos in the fit_mle method so that it is more specific in pointing out the offense. |
diff --git a/spyderlib/widgets/externalshell/namespacebrowser.py b/spyderlib/widgets/externalshell/namespacebrowser.py
index <HASH>..<HASH> 100644
--- a/spyderlib/widgets/externalshell/namespacebrowser.py
+++ b/spyderlib/widgets/externalshell/namespacebrowser.py
@@ -249,14 +249,23 @@ class NamespaceBrowser(QWidget):
settings = self.get_view_settings()
communicate(self._get_sock(),
'set_remote_view_settings()', settings=[settings])
-
+
def visibility_changed(self, enable):
- """Notify the widget whether its container (the namespace browser
+ """Notify the widget whether its container (the namespace browser
plugin is visible or not"""
- self.is_visible = enable
- if enable:
- self.refresh_table()
-
+ # This is slowing down Spyder a lot if too much data is present in
+ # the Variable Explorer, and users give focus to it after being hidden.
+ # This also happens when the Variable Explorer is visible and users
+ # give focus to Spyder after using another application (like Chrome
+ # or Firefox).
+ # That's why we've decided to remove this feature
+ # Fixes Issue 2593
+ #
+ # self.is_visible = enable
+ # if enable:
+ # self.refresh_table()
+ pass
+
def toggle_auto_refresh(self, state):
"""Toggle auto refresh state"""
self.autorefresh = state | Variable Explorer: Don't refresh it after giving focus to it
Fixes #<I> |
diff --git a/vendor/plugins/refinery/lib/refinery/application_controller.rb b/vendor/plugins/refinery/lib/refinery/application_controller.rb
index <HASH>..<HASH> 100644
--- a/vendor/plugins/refinery/lib/refinery/application_controller.rb
+++ b/vendor/plugins/refinery/lib/refinery/application_controller.rb
@@ -59,7 +59,7 @@ class Refinery::ApplicationController < ActionController::Base
protected
def default_url_options(options={})
- Refinery::I18n.enabled? ? { :locale => I18n.locale } : {}
+ ::Refinery::I18n.enabled? ? { :locale => I18n.locale } : {}
end
# get all the pages to be displayed in the site menu.
@@ -88,7 +88,7 @@ protected
::I18n.locale = locale
elsif locale.present? and locale != ::Refinery::I18n.default_frontend_locale
params[:locale] = I18n.locale = ::Refinery::I18n.default_frontend_locale
- redirect_to(params, :message => "The locale '#{locale.to_s}' is not supported.") and return
+ redirect_to(params, :notice => "The locale '#{locale.to_s}' is not supported.") and return
else
::I18n.locale = ::Refinery::I18n.default_frontend_locale
end | fully qualify Refinery as ::Refinery and use :notice instead of :message |
diff --git a/packages/twig-extensions/functions/custom-functions/pattern-template/pattern_template.function.php b/packages/twig-extensions/functions/custom-functions/pattern-template/pattern_template.function.php
index <HASH>..<HASH> 100644
--- a/packages/twig-extensions/functions/custom-functions/pattern-template/pattern_template.function.php
+++ b/packages/twig-extensions/functions/custom-functions/pattern-template/pattern_template.function.php
@@ -15,6 +15,8 @@ $function = new \Twig_SimpleFunction('pattern_template', function ($patternName)
return '@bolt/button.twig';
case 'card':
return '@bolt/card.twig';
+ case 'card-w-teaser':
+ return '@bolt/card-w-teaser.twig';
case 'eyebrow':
return '@bolt/eyebrow.twig';
case 'flag': | add "card-w-teaser" to "pattern_include" custom twig function |
diff --git a/aioworkers/queue/base.py b/aioworkers/queue/base.py
index <HASH>..<HASH> 100644
--- a/aioworkers/queue/base.py
+++ b/aioworkers/queue/base.py
@@ -1,5 +1,6 @@
import asyncio
import time
+from typing import Any, Callable
from ..core.base import AbstractReader, AbstractWriter
from ..utils import import_name
@@ -36,6 +37,10 @@ class ScoreQueueMixin:
default_score: default value score
"""
+ default_score: str
+ _default_score: Callable[[Any], float]
+ _loop: asyncio.AbstractEventLoop
+
def __init__(self, *args, **kwargs):
self._base_timestamp = time.time()
self._set_default(kwargs)
@@ -51,14 +56,15 @@ class ScoreQueueMixin:
self._default_score = import_name(default)
def _loop_time(self) -> float:
- return self.loop.time() + self._base_timestamp
+ return self._loop.time() + self._base_timestamp
def set_config(self, config):
super().set_config(config)
self._set_default(self._config)
async def init(self):
- self._base_timestamp = -self.loop.time() + time.time()
+ self._loop = asyncio.get_running_loop()
+ self._base_timestamp = -self._loop.time() + time.time()
await super().init()
def put(self, value, score=None): | fix typing for ScoreQueueMixin |
diff --git a/lib/gpx/track.rb b/lib/gpx/track.rb
index <HASH>..<HASH> 100644
--- a/lib/gpx/track.rb
+++ b/lib/gpx/track.rb
@@ -55,7 +55,6 @@ module GPX
def append_segment(seg)
update_meta_data(seg)
@segments << seg
- @points.concat(seg.points) unless seg.nil?
end
# Returns true if the given time occurs within any of the segments of this track.
@@ -125,7 +124,7 @@ module GPX
@distance += seg.distance
end
end
-
+
protected
def update_meta_data(seg)
diff --git a/tests/track_test.rb b/tests/track_test.rb
index <HASH>..<HASH> 100644
--- a/tests/track_test.rb
+++ b/tests/track_test.rb
@@ -69,4 +69,13 @@ class TrackTest < Minitest::Test
assert_equal(-109.447045, @track.bounds.max_lon)
end
+ def test_append_segment
+ trk = GPX::Track.new
+ seg = GPX::Segment.new(track: trk)
+ pt = GPX::TrackPoint.new(lat: -118, lon: 34)
+ seg.append_point(pt)
+ trk.append_segment(seg)
+ assert_equal(1, trk.points.size)
+ end
+
end | Fix duplication of points on appending segment to track |
diff --git a/src/plugins/docker/command-handlers.js b/src/plugins/docker/command-handlers.js
index <HASH>..<HASH> 100644
--- a/src/plugins/docker/command-handlers.js
+++ b/src/plugins/docker/command-handlers.js
@@ -21,7 +21,7 @@ import nodemiral from 'nodemiral';
const log = debug('mup:module:docker');
function uniqueSessions(api) {
- const {servers, swarm} = api.getConfig().servers;
+ const {servers, swarm} = api.getConfig();
const sessions = api.getSessions(['app', 'mongo', 'proxy']);
if (swarm) { | Fix getting docker sessions when swarm is enabled |
diff --git a/app/controllers/impressionist_controller.rb b/app/controllers/impressionist_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/impressionist_controller.rb
+++ b/app/controllers/impressionist_controller.rb
@@ -3,13 +3,13 @@ require 'digest/sha2'
module ImpressionistController
module ClassMethods
def impressionist(opts={})
- before_filter { |c| c.impressionist_subapp_filter(opts) }
+ before_action { |c| c.impressionist_subapp_filter(opts) }
end
end
module InstanceMethods
def self.included(base)
- base.before_filter :impressionist_app_filter
+ base.before_action :impressionist_app_filter
end
def impressionist(obj,message=nil,opts={}) | before_filter -> before_action
`before_filter` is deprecated in favor of `before_action` and removed in Rails <I> |
diff --git a/openquake/risklib/asset.py b/openquake/risklib/asset.py
index <HASH>..<HASH> 100644
--- a/openquake/risklib/asset.py
+++ b/openquake/risklib/asset.py
@@ -787,7 +787,8 @@ class Exposure(object):
costs.append(Node('cost', a))
occupancies = Node('occupancies')
for period in occupancy_periods:
- a = dict(occupants=dic[period], period=period)
+ a = dict(occupants=float(dic[period]),
+ period=period)
occupancies.append(Node('occupancy', a))
tags = Node('tags')
for tagname in self.tagcol.tagnames:
@@ -813,6 +814,8 @@ class Exposure(object):
insurance_limits = {}
retrofitted = None
asset_id = asset_node['id'].encode('utf8')
+ # FIXME: in case of an exposure split in CSV files the line number
+ # is None because param['fname'] points to the .xml file :-(
with context(param['fname'], asset_node):
self.asset_refs.append(asset_id)
taxonomy = asset_node['taxonomy'] | Now the line number for CSV exposures without occupancy is returned correctly in case of errors [skip CI]
Former-commit-id: <I>c<I>c<I>fde5f<I>f2b<I>bc6d<I>ee |
diff --git a/PheanstalkProducer.php b/PheanstalkProducer.php
index <HASH>..<HASH> 100644
--- a/PheanstalkProducer.php
+++ b/PheanstalkProducer.php
@@ -66,22 +66,6 @@ class PheanstalkProducer implements PsrProducer
/**
* {@inheritdoc}
*/
- public function setCompletionListener(CompletionListener $listener = null)
- {
- $this->completionListener = $listener;
- }
-
- /**
- * @return CompletionListener|null
- */
- public function getCompletionListener()
- {
- return $this->completionListener;
- }
-
- /**
- * {@inheritdoc}
- */
public function getDeliveryDelay()
{
return $this->deliveryDelay; | remove completion listnere feature for now. |
diff --git a/src/main/java/org/jboss/netty/bootstrap/Bootstrap.java b/src/main/java/org/jboss/netty/bootstrap/Bootstrap.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jboss/netty/bootstrap/Bootstrap.java
+++ b/src/main/java/org/jboss/netty/bootstrap/Bootstrap.java
@@ -123,11 +123,17 @@ public class Bootstrap {
* {@link Channel} is created. Bootstrap creates a new pipeline which has
* the same entries with the returned pipeline for a new {@link Channel}.
*
- * @return the default {@link ChannelPipeline}. {@code null} if
- * {@link #setPipelineFactory(ChannelPipelineFactory)} was
- * called last time.
+ * @return the default {@link ChannelPipeline}
+ *
+ * @throws IllegalStateException
+ * if {@link #setPipelineFactory(ChannelPipelineFactory)} was
+ * called by a user last time.
*/
public ChannelPipeline getPipeline() {
+ ChannelPipeline pipeline = this.pipeline;
+ if (pipeline == null) {
+ throw new IllegalStateException("pipelineFactory in use");
+ }
return pipeline;
}
@@ -143,7 +149,7 @@ public class Bootstrap {
if (pipeline == null) {
throw new NullPointerException("pipeline");
}
- pipeline = this.pipeline;
+ this.pipeline = pipeline;
pipelineFactory = pipelineFactory(pipeline);
} | Fixed NETTY-<I> (Bootstrap.getPipeline() shold throw an IllegalStateException if pipelineFactory property is in use.) and NETTY-<I> (Bootstrap.setPipeline() doesn't update the pipeline property at all.) |
diff --git a/src/expression.js b/src/expression.js
index <HASH>..<HASH> 100755
--- a/src/expression.js
+++ b/src/expression.js
@@ -103,8 +103,16 @@ pp.parseMaybeAssign = function(noIn, refShorthandDefaultPos, afterLeftParse) {
node.left = this.type === tt.eq ? this.toAssignable(left) : left
refShorthandDefaultPos.start = 0 // reset because shorthand default was used correctly
this.checkLVal(left)
- if (left.parenthesizedExpression && (left.type === "ObjectPattern" || left.type === "ArrayPattern")) {
- this.raise(left.start, "You're trying to assign to a parenthesized expression, instead of `({ foo }) = {}` use `({ foo } = {})`");
+ if (left.parenthesizedExpression) {
+ let errorMsg
+ if (left.type === "ObjectPattern") {
+ errorMsg = "`({a}) = 0` use `({a} = 0)`"
+ } else if (left.type === "ArrayPattern") {
+ errorMsg = "`([a]) = 0` use `([a] = 0)`"
+ }
+ if (errorMsg) {
+ this.raise(left.start, `You're trying to assign to a parenthesized expression, eg. instead of ${errorMsg}`)
+ }
}
this.next()
node.right = this.parseMaybeAssign(noIn) | make illegal LHS pattern error messages more user friendly |
diff --git a/etcdserver/server.go b/etcdserver/server.go
index <HASH>..<HASH> 100644
--- a/etcdserver/server.go
+++ b/etcdserver/server.go
@@ -247,7 +247,10 @@ func NewServer(cfg *ServerConfig) (srv *EtcdServer, err error) {
plog.Fatalf("create snapshot directory error: %v", err)
}
ss := snap.New(cfg.SnapDir())
- be := backend.NewDefaultBackend(path.Join(cfg.SnapDir(), databaseFilename))
+
+ bepath := path.Join(cfg.SnapDir(), databaseFilename)
+ beExist := fileutil.Exist(bepath)
+ be := backend.NewDefaultBackend(bepath)
defer func() {
if err != nil {
be.Close()
@@ -351,6 +354,10 @@ func NewServer(cfg *ServerConfig) (srv *EtcdServer, err error) {
cl.SetStore(st)
cl.SetBackend(be)
cl.Recover()
+ if cl.Version() != nil && cl.Version().LessThan(semver.Version{Major: 3}) && !beExist {
+ os.RemoveAll(bepath)
+ return nil, fmt.Errorf("database file (%v) of the backend is missing", bepath)
+ }
default:
return nil, fmt.Errorf("unsupported bootstrap config")
} | etcdserver: refuse to restart if backend file is missing |
diff --git a/xchange-okcoin/src/main/java/com/xeiam/xchange/okcoin/OkCoinExchange.java b/xchange-okcoin/src/main/java/com/xeiam/xchange/okcoin/OkCoinExchange.java
index <HASH>..<HASH> 100644
--- a/xchange-okcoin/src/main/java/com/xeiam/xchange/okcoin/OkCoinExchange.java
+++ b/xchange-okcoin/src/main/java/com/xeiam/xchange/okcoin/OkCoinExchange.java
@@ -55,7 +55,7 @@ public class OkCoinExchange extends BaseExchange {
/** Extract futures leverage used by spec */
private static int futuresLeverageOfConfig(ExchangeSpecification exchangeSpecification) {
if (exchangeSpecification.getExchangeSpecificParameters().containsKey("Futures_Leverage")) {
- return (Integer) exchangeSpecification.getExchangeSpecificParameters().get("Futures_Leverage");
+ return Integer.valueOf((String) exchangeSpecification.getExchangeSpecificParameters().get("Futures_Leverage"));
} else {
// default choice of 10x leverage is "safe" choice and default by OkCoin.
return 10; | Fix wrong casting in okcoin Futures_Leverage config |
diff --git a/lib/Site.php b/lib/Site.php
index <HASH>..<HASH> 100644
--- a/lib/Site.php
+++ b/lib/Site.php
@@ -163,7 +163,7 @@ class Site extends Core implements CoreInterface {
$this->title = $this->name;
$this->description = get_bloginfo('description');
$this->theme = new Theme();
- $this->language_attributes = Helper::function_wrapper('language_attributes');
+ $this->language_attributes = get_language_attributes();
$this->multisite = false;
} | ref #<I> -- Replace wrapped function with function that doesn’t echo anything |
diff --git a/lib/ttf/tables/maxp.js b/lib/ttf/tables/maxp.js
index <HASH>..<HASH> 100644
--- a/lib/ttf/tables/maxp.js
+++ b/lib/ttf/tables/maxp.js
@@ -5,16 +5,13 @@
var _ = require('lodash');
var jDataView = require('jDataView');
-// Find max points in glyph contours.
-// Actual number of points can be reduced in the further code, but it is not a problem.
-// This number cannot be less than max glyph points because of glyph missing
-// in certain cases in some browser (like Chrome in MS Windows).
+// Find max points in glyph TTF contours.
function getMaxPoints(font) {
var maxPoints = 0;
return _.reduce(font.glyphs, function (maxPoints, glyph) {
- var sumPoints = _.reduce(glyph.contours, function (sumPoints, contour) {
- return (sumPoints || 0) + contour.points.length;
+ var sumPoints = _.reduce(glyph.ttfContours, function (sumPoints, contour) {
+ return (sumPoints || 0) + contour.length;
}, sumPoints);
return Math.max(sumPoints || 0, maxPoints); | Addition fix for MAXP table. |
diff --git a/markdownlint.js b/markdownlint.js
index <HASH>..<HASH> 100755
--- a/markdownlint.js
+++ b/markdownlint.js
@@ -5,15 +5,16 @@
var pkg = require('./package');
var program = require('commander');
var values = require('lodash.values');
+var rc = require('rc');
+var extend = require('deep-extend');
+var fs = require('fs');
+var markdownlint = require('markdownlint');
function readConfiguration(args) {
- var rc = require('rc');
var config = rc('markdownlint', {});
if (args.config) {
- var fs = require('fs');
try {
var userConfig = JSON.parse(fs.readFileSync(args.config));
- var extend = require('deep-extend');
config = extend(config, userConfig);
} catch (e) {
console.warn('Cannot read or parse config file', args.config);
@@ -23,7 +24,6 @@ function readConfiguration(args) {
}
function lint(lintFiles, config) {
- var markdownlint = require('markdownlint');
var lintOptions = {
files: lintFiles,
config: config | Refactoring: move all requires to top |
diff --git a/assess_container_networking.py b/assess_container_networking.py
index <HASH>..<HASH> 100755
--- a/assess_container_networking.py
+++ b/assess_container_networking.py
@@ -388,7 +388,7 @@ def assess_container_networking(client, types):
log.info("Restarting hosted machine: {}".format(host))
client.juju(
'run', ('--machine', host, 'sudo shutdown -r now'))
- client.juju('show-action-status', ('--name', 'juju-run'))
+ client.juju('show-action-status', ('--name', 'juju-run'))
log.info("Restarting controller machine 0")
controller_client = client.get_controller_client() | Call show-action-status once. |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -182,7 +182,7 @@ ModulationController.prototype = {
getRawWavData: function(array, lbr, version) {
var rawPcmData = this.transcode(array, lbr, version);
- return this.getWavArray(samples);
+ return this.getWavArray(rawPcmData);
},
fillU16: function(arr, off, val) { | index: fix getRawWavData
We were passing the wrong variable name to getWavArray(), and as such it
wasn't working at all. |
diff --git a/structr-ui/src/main/resources/structr/js/flow-editor/src/js/editor/entities/components/QueryBuilder/QueryStringValue.js b/structr-ui/src/main/resources/structr/js/flow-editor/src/js/editor/entities/components/QueryBuilder/QueryStringValue.js
index <HASH>..<HASH> 100644
--- a/structr-ui/src/main/resources/structr/js/flow-editor/src/js/editor/entities/components/QueryBuilder/QueryStringValue.js
+++ b/structr-ui/src/main/resources/structr/js/flow-editor/src/js/editor/entities/components/QueryBuilder/QueryStringValue.js
@@ -37,6 +37,10 @@ export class QueryStringValue extends QueryValue {
this._dispatchChangeEvent();
});
+ this.handles.value.addEventListener("keydown", (event) => {
+ event.stopPropagation();
+ });
+
}
_getTemplate() { | Fixes small UX issue with value components in FlowEditor. |
diff --git a/jishaku/meta.py b/jishaku/meta.py
index <HASH>..<HASH> 100644
--- a/jishaku/meta.py
+++ b/jishaku/meta.py
@@ -13,6 +13,8 @@ Meta information about jishaku.
from collections import namedtuple
+import pkg_resources
+
__all__ = (
'__author__',
'__copyright__',
@@ -33,3 +35,6 @@ __docformat__ = 'restructuredtext en'
__license__ = 'MIT'
__title__ = 'jishaku'
__version__ = '.'.join(map(str, (version_info.major, version_info.minor, version_info.micro)))
+
+# This ensures that when jishaku is reloaded, pkg_resources requeries it to provide correct version info
+del pkg_resources.working_set.by_key['jishaku'] | Force pkg_resources to update Jishaku version info |
diff --git a/backtrader/lineseries.py b/backtrader/lineseries.py
index <HASH>..<HASH> 100644
--- a/backtrader/lineseries.py
+++ b/backtrader/lineseries.py
@@ -25,6 +25,16 @@ import metabase
class LineAlias(object):
+ ''' Descriptor class that store a line reference and returns that line from the owner
+
+ Keyword Args:
+ line (int): reference to the line that will be returned fro owner's *lines* buffer
+
+ As a convenience the __set__ method of the descriptor is used not set the *line* reference
+ because this is a constant along the live of the descriptor instance, but rather to
+ set the value of the *line* at the instant '0' (the current one)
+ '''
+
def __init__(self, line):
self.line = line | lineseries 1st documentation addition |
diff --git a/lib/dm-core/collection.rb b/lib/dm-core/collection.rb
index <HASH>..<HASH> 100644
--- a/lib/dm-core/collection.rb
+++ b/lib/dm-core/collection.rb
@@ -66,10 +66,7 @@ module DataMapper
def get(*key)
key = model.typecast_key(key)
if loaded?
- # find indexed resource (create index first if it does not exist)
- if @cache.empty?
- each { |r| @cache[r.key] = r }
- end
+ # find indexed resource
@cache[key]
elsif query.limit || query.offset > 0
# current query is exclusive, find resource within the set | Removed dead code
* Cache should be kept in sync through orphan_resource and relate_resource
so this block of code should never be executed. |
diff --git a/test/integration/image-component/default/test/index.test.js b/test/integration/image-component/default/test/index.test.js
index <HASH>..<HASH> 100644
--- a/test/integration/image-component/default/test/index.test.js
+++ b/test/integration/image-component/default/test/index.test.js
@@ -1150,7 +1150,7 @@ function runTests(mode) {
}
})
- it('should be valid W3C HTML', async () => {
+ it('should be valid HTML', async () => {
let browser
try {
browser = await webdriver(appPort, '/valid-html-w3c')
@@ -1161,8 +1161,10 @@ function runTests(mode) {
url,
format: 'json',
isLocal: true,
+ validator: 'whatwg',
})
- expect(result.messages).toEqual([])
+ expect(result.isValid).toBe(true)
+ expect(result.errors).toEqual([])
} finally {
if (browser) {
await browser.close() | Update to use whatwg validator for test (#<I>)
The w3c validator seems to be down and this shouldn't block our tests so this uses the whatwg validator instead
x-ref: <URL> |
diff --git a/django_ses/views.py b/django_ses/views.py
index <HASH>..<HASH> 100644
--- a/django_ses/views.py
+++ b/django_ses/views.py
@@ -174,7 +174,7 @@ def handle_bounce(request):
For the format of the SNS subscription confirmation request see this URL:
http://docs.aws.amazon.com/sns/latest/gsg/json-formats.html#http-subscription-confirmation-json
- SNS message signatures are verified by default. This funcionality can
+ SNS message signatures are verified by default. This functionality can
be disabled by setting AWS_SES_VERIFY_BOUNCE_SIGNATURES to False.
However, this is not recommended.
See: http://docs.amazonwebservices.com/sns/latest/gsg/SendMessageToHttp.verify.signature.html | docs: Fix simple typo, funcionality -> functionality (#<I>)
There is a small typo in django_ses/views.py.
Should read `functionality` rather than `funcionality`. |
diff --git a/lib/jekyll/commands/build.rb b/lib/jekyll/commands/build.rb
index <HASH>..<HASH> 100644
--- a/lib/jekyll/commands/build.rb
+++ b/lib/jekyll/commands/build.rb
@@ -38,7 +38,7 @@ module Jekyll
# Build your Jekyll site.
#
# site - the Jekyll::Site instance to build
- # options - the
+ # options - A Hash of options passed to the command
#
# Returns nothing.
def build(site, options) | Fill in a bit of missing TomDoc
Fill in a piece of missing doc for the `build` function in `commands/build.rb` |
diff --git a/lib/generators/double_entry/install/templates/migration.rb b/lib/generators/double_entry/install/templates/migration.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/double_entry/install/templates/migration.rb
+++ b/lib/generators/double_entry/install/templates/migration.rb
@@ -1,5 +1,10 @@
-class CreateDoubleEntryTables < ActiveRecord::Migration[4.2]
+if Rails::VERSION::STRING[0..2].to_f < 5
+ active_record_migration_class = ActiveRecord::Migration[Rails::VERSION::STRING[0..2].to_f]
+else
+ active_record_migration_class = ActiveRecord::Migration
+end
+class CreateDoubleEntryTables < active_record_migration_class
def self.up
create_table "double_entry_account_balances", :force => true do |t|
t.string "account", :limit => 31, :null => false | gracefully fallback class so rails 4 doesn't break |
diff --git a/lib/carto/external.js b/lib/carto/external.js
index <HASH>..<HASH> 100644
--- a/lib/carto/external.js
+++ b/lib/carto/external.js
@@ -228,7 +228,7 @@ External.types = [
}
},
{
- extension: /\.geojson/,
+ extension: /\.geojson|\.json/,
datafile: function(d, c) { c(null, d.path()) },
ds_options: {
type: 'ogr', | Accept .json extension as geojson. |
diff --git a/lib/configurate/proxy.rb b/lib/configurate/proxy.rb
index <HASH>..<HASH> 100644
--- a/lib/configurate/proxy.rb
+++ b/lib/configurate/proxy.rb
@@ -36,7 +36,9 @@ module Configurate
:to_ary => :to_a
}.each do |method, converter|
define_method method do
- target.public_send converter
+ value = target
+ return value.public_send converter if value.respond_to? converter
+ value.public_send method
end
end | fallback to implicit converter if there's no explicit converter defined |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.