diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/les/utils/expiredvalue.go b/les/utils/expiredvalue.go
index <HASH>..<HASH> 100644
--- a/les/utils/expiredvalue.go
+++ b/les/utils/expiredvalue.go
@@ -88,8 +88,9 @@ func (e *ExpiredValue) Add(amount int64, logOffset Fixed64) int64 {
if base >= 0 || uint64(-base) <= e.Base {
// This is a temporary fix to circumvent a golang
// uint conversion issue on arm64, which needs to
- // be investigated further. FIXME
- e.Base = uint64(int64(e.Base) + int64(base))
+ // be investigated further. More details at:
+ // https://github.com/golang/go/issues/43047
+ e.Base += uint64(int64(base))
return amount
}
net := int64(-float64(e.Base) / factor)
|
les: cosmetic rewrite of the arm<I> float bug workaround (#<I>)
* les: revert arm float bug workaround to check go <I>
* add traces to reproduce outside travis
* simpler workaround
|
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
@@ -26,11 +26,11 @@ RSpec.configure do |c|
end
c.before(:suite) do
- Delfos.reset!
+ Delfos.reset! if Delfos.respond_to?(:reset!)
end
c.before(:each) do
- Delfos.reset!
+ Delfos.reset! if Delfos.respond_to?(:reset!)
ShowClassInstanceVariables.variables_for(Delfos)
Delfos.logger = $delfos_test_logger if defined? $delfos_test_logger
end
|
only reset in specs when methods is defined: this is needed when running single unit tests
|
diff --git a/raven/base.py b/raven/base.py
index <HASH>..<HASH> 100644
--- a/raven/base.py
+++ b/raven/base.py
@@ -231,6 +231,8 @@ class Client(object):
>>> # Specify a scheme to use (http or https)
>>> print client.get_public_dsn('https')
"""
+ if not self.is_enabled():
+ return
url = self._get_public_dsn()
if not scheme:
return url
diff --git a/raven/contrib/django/templatetags/raven.py b/raven/contrib/django/templatetags/raven.py
index <HASH>..<HASH> 100644
--- a/raven/contrib/django/templatetags/raven.py
+++ b/raven/contrib/django/templatetags/raven.py
@@ -16,4 +16,4 @@ register = template.Library()
@register.simple_tag
def sentry_public_dsn(scheme=None):
from raven.contrib.django.models import client
- return client.get_public_dsn(scheme)
+ return client.get_public_dsn(scheme) or ''
|
Dont try to return a public_dsn if Raven is disabled
|
diff --git a/ella/articles/models.py b/ella/articles/models.py
index <HASH>..<HASH> 100644
--- a/ella/articles/models.py
+++ b/ella/articles/models.py
@@ -121,10 +121,9 @@ class ArticleOptions(admin.ModelAdmin):
fields = (
(_("Article heading"), {'fields': ('title', 'upper_title', 'updated', 'slug')}),
(_("Article contents"), {'fields': ('perex',)}),
- (_("Metadata"), {'fields': ('category', 'authors', 'source')})
-# (_("Metadata"), {'fields': ('category', 'authors', 'source', 'photo')})
+ (_("Metadata"), {'fields': ('category', 'authors', 'source', 'photo')})
)
-# raw_id_fields = ('photo',)
+ raw_id_fields = ('photo',)
list_filter = ('created',)
search_fields = ('title', 'perex',)
inlines = (ArticleContentInlineOptions(ArticleContents, extra=3),)
|
Article has editable photo in admin
git-svn-id: <URL>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ setup(
license='GPLv3',
packages=find_packages(exclude=['doc', 'test']),
include_package_data=True,
- install_requires=['numpy','pyomo','scipy','pandas>=0.19.0','networkx>=1.10'],
+ install_requires=['numpy','pyomo>=5.3','scipy','pandas>=0.19.0','networkx>=1.10'],
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
|
setup: Add dependency on PYOMO version <I>
|
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -67,8 +67,17 @@ function runTests(filter) {
var args = m[2], kind = m[1];
++tests;
if (kind == "+") {
- for (var pos = m.index; /\s/.test(text.charAt(pos - 1)); --pos) {}
- var query = {type: "completions", end: pos, file: fname};
+ var query, columnInfo = /\s*@(\d+)$/.exec(args);
+ if (columnInfo) {
+ var line = acorn.getLineInfo(server.files[0].text, m.index).line;
+ var endInfo = {line: line - 1, ch: parseInt(columnInfo[1]) - 1};
+ query = {type: "completions", lineCharPositions: true, end: endInfo, file: fname};
+ args = args.slice(0, columnInfo.index);
+ }
+ else {
+ for (var pos = m.index; /\s/.test(text.charAt(pos - 1)); --pos) {}
+ query = {type: "completions", end: pos, file: fname};
+ }
var andOthers = /,\s*\.\.\.$/.test(args);
if (andOthers) args = args.slice(0, args.lastIndexOf(","));
var parts = args.split(/\s*,\s*/);
|
Add custom @columnNumber suffix for completion hint tests to allow intra-line testing
|
diff --git a/core/cb.files.sync/environment.js b/core/cb.files.sync/environment.js
index <HASH>..<HASH> 100644
--- a/core/cb.files.sync/environment.js
+++ b/core/cb.files.sync/environment.js
@@ -55,10 +55,18 @@ Environment.prototype.userExit = function(user) {
// Remove user from environment
this.removeUser(user);
- // Close the file
- // then notify other users of departure
- return Q(this.pingOthers(user));
+ var base = Q();
+ if (this.doc.path != null) {
+ // Close the file
+ base = user.close(this.doc.path)
+ }
+
+ var that = this;
+ // then notify other users of departure
+ return base.then(function() {
+ return that.pingOthers(user);
+ });
};
Environment.prototype.removeUser = function(user) {
@@ -144,7 +152,8 @@ Environment.prototype.getSyncData = function() {
return {
content: this.doc.getContent(),
participants: this.usersInfo(),
- state: this.modified
+ state: this.modified,
+ path: this.doc.path
};
};
|
Add exit for user from sync environment
|
diff --git a/lib/fluent-query/connection.rb b/lib/fluent-query/connection.rb
index <HASH>..<HASH> 100755
--- a/lib/fluent-query/connection.rb
+++ b/lib/fluent-query/connection.rb
@@ -256,7 +256,12 @@ module FluentQuery
public
def transaction(&block)
self.begin
- block.call
+ begin
+ block.call
+ rescue ::Exception => e
+ self.rollback
+ raise e
+ end
self.commit
end
|
bug: transactions must correctly rollback in case of exception
|
diff --git a/src/Access/Asset.php b/src/Access/Asset.php
index <HASH>..<HASH> 100644
--- a/src/Access/Asset.php
+++ b/src/Access/Asset.php
@@ -99,6 +99,22 @@ class Asset extends Nested
}
/**
+ * Generates automatic parent_id field value
+ *
+ * @param array $data the data being saved
+ * @return string
+ */
+ public function automaticParentId($data)
+ {
+ if (!isset($data['parent_id']) || $data['parent_id'] == 0)
+ {
+ $data['parent_id'] = self::getRootId();
+ }
+
+ return $data['parent_id'];
+ }
+
+ /**
* Method to load an asset by it's name.
*
* @param string $name
|
[fix] Adding missing method (#<I>)
|
diff --git a/pyphi/utils.py b/pyphi/utils.py
index <HASH>..<HASH> 100644
--- a/pyphi/utils.py
+++ b/pyphi/utils.py
@@ -543,10 +543,13 @@ def block_cm(cm):
outputs = list(range(cm.shape[1]))
# CM helpers:
- # All nodes that `nodes` connect (output) to
- outputs_of = lambda nodes: np.where(cm[nodes, :].sum(0))[0]
- # All nodes which connect (input) to `nodes`
- inputs_to = lambda nodes: np.where(cm[:, nodes].sum(1))[0]
+ def outputs_of(nodes):
+ # All nodes that `nodes` connect to (output to)
+ return np.where(cm[nodes, :].sum(0))[0]
+
+ def inputs_to(nodes):
+ # All nodes which connect to (input to) `nodes`
+ return np.where(cm[:, nodes].sum(1))[0]
# Start: source node with most outputs
sources = [np.argmax(cm.sum(1))]
|
Make `block_cm` lambdas conform to PEP8
|
diff --git a/docker/models/containers.py b/docker/models/containers.py
index <HASH>..<HASH> 100644
--- a/docker/models/containers.py
+++ b/docker/models/containers.py
@@ -15,7 +15,12 @@ from .resource import Collection, Model
class Container(Model):
-
+ """ Local representation of a container object. Detailed configuration may
+ be accessed through the :py:attr:`attrs` attribute. Note that local
+ attributes are cached; users may call :py:meth:`reload` to
+ query the Docker daemon for the current properties, causing
+ :py:attr:`attrs` to be refreshed.
+ """
@property
def name(self):
"""
|
Document attr caching for Container objects
|
diff --git a/test/unit-test.js b/test/unit-test.js
index <HASH>..<HASH> 100644
--- a/test/unit-test.js
+++ b/test/unit-test.js
@@ -766,6 +766,10 @@ title']",
"@import url('https://pro.goalsmashers.com/test.css');",
"@import url(https://pro.goalsmashers.com/test.css);"
],
+ 'of a url starting with //': [
+ "@import url(//fonts.googleapis.com/css?family=Lato:400,700,400italic|Merriweather:400,700);",
+ "@import url(//fonts.googleapis.com/css?family=Lato:400,700,400italic|Merriweather:400,700);"
+ ],
'of a directory': [
"@import url(test/data/partials);",
""
|
test for:fixed import of remote font file starting with //
|
diff --git a/Kwc/Basic/ImageParent/Component.php b/Kwc/Basic/ImageParent/Component.php
index <HASH>..<HASH> 100644
--- a/Kwc/Basic/ImageParent/Component.php
+++ b/Kwc/Basic/ImageParent/Component.php
@@ -36,8 +36,11 @@ class Kwc_Basic_ImageParent_Component extends Kwc_Abstract
);
}
$ret['baseUrl'] = $this->_getBaseImageUrl();
- $ret['lazyLoadOutOfViewport'] = $this->_getSetting('lazyLoadOutOfViewport');
$ret['defineWidth'] = $this->_getSetting('defineWidth');
+ $ret['lazyLoadOutOfViewport'] = $this->_getSetting('lazyLoadOutOfViewport');
+
+ $ret['style'] = 'max-width:'.$ret['width'].'px;';
+ if ($this->_getSetting('defineWidth')) $ret['style'] .= 'width:'.$ret['width'].'px;';
$ret['containerClass'] = 'container';
if (isset($ret['width']) && $ret['width'] > 100) $ret['containerClass'] .= ' webResponsiveImgLoading';
|
Fix ImageParent, add missing style
style moved from tpl to getTemplateVars in Image component, also do that in ImageParent
|
diff --git a/spec/integration/request_spec.rb b/spec/integration/request_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/integration/request_spec.rb
+++ b/spec/integration/request_spec.rb
@@ -4,8 +4,8 @@ describe "Integration" do
subject(:client) {
client = Savon.client(service_endpoint)
- client.http.open_timeout = 10
- client.http.read_timeout = 10
+ client.http.open_timeout = 3
+ client.http.read_timeout = 3
client
}
|
lowered request spec timeouts
|
diff --git a/lib/slack-ruby-bot-server/app.rb b/lib/slack-ruby-bot-server/app.rb
index <HASH>..<HASH> 100644
--- a/lib/slack-ruby-bot-server/app.rb
+++ b/lib/slack-ruby-bot-server/app.rb
@@ -4,7 +4,6 @@ module SlackRubyBotServer
check_database!
init_database!
mark_teams_active!
- update_team_name_and_id!
purge_inactive_teams!
configure_global_aliases!
end
@@ -34,18 +33,6 @@ module SlackRubyBotServer
Team.where(active: nil).update_all(active: true)
end
- def update_team_name_and_id!
- Team.active.where(team_id: nil).each do |team|
- begin
- auth = team.ping![:auth]
- team.update_attributes!(team_id: auth['team_id'], name: auth['team'])
- rescue StandardError => e
- logger.warn "Error pinging team #{team.id}: #{e.message}."
- team.set(active: false)
- end
- end
- end
-
def purge_inactive_teams!
Team.purge!
end
|
Removed legacy migration that updated team name and ID.
|
diff --git a/Clipper/joplin-webclipper/content_scripts/index.js b/Clipper/joplin-webclipper/content_scripts/index.js
index <HASH>..<HASH> 100644
--- a/Clipper/joplin-webclipper/content_scripts/index.js
+++ b/Clipper/joplin-webclipper/content_scripts/index.js
@@ -134,11 +134,17 @@
const src = absoluteUrl(imageSrc(node));
node.setAttribute('src', src);
if (!(src in imageIndexes)) imageIndexes[src] = 0;
- const imageSize = imageSizes[src][imageIndexes[src]];
- imageIndexes[src]++;
- if (imageSize && convertToMarkup === 'markdown') {
- node.width = imageSize.width;
- node.height = imageSize.height;
+
+ if (!imageSizes[src]) {
+ // This seems to concern dynamic images that don't really such as Gravatar, etc.
+ console.warn('Found an image for which the size had not been fetched:', src);
+ } else {
+ const imageSize = imageSizes[src][imageIndexes[src]];
+ imageIndexes[src]++;
+ if (imageSize && convertToMarkup === 'markdown') {
+ node.width = imageSize.width;
+ node.height = imageSize.height;
+ }
}
}
|
Clipper: Fixes #<I>: Some pages could not be clipped in Firefox due to an issue with dynamic images
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -228,7 +228,7 @@ module.exports = function(grunt) {
grunt.task.loadTasks('tasks');
grunt.registerTask('bench', ['metrics']);
- grunt.registerTask('sauce', process.env.SAUCE_USERNAME ? ['tests', 'connect', 'saucelabs-mocha'] : []);
+ grunt.registerTask('sauce', [] /* process.env.SAUCE_USERNAME ? ['tests', 'connect', 'saucelabs-mocha'] : [] */);
grunt.registerTask('travis', process.env.PUBLISH ? ['default', 'sauce', 'metrics', 'publish:latest'] : ['default']);
|
chore: disable sauce-labs
Related to #<I>
|
diff --git a/pycbc/filter/zpk.py b/pycbc/filter/zpk.py
index <HASH>..<HASH> 100644
--- a/pycbc/filter/zpk.py
+++ b/pycbc/filter/zpk.py
@@ -70,7 +70,7 @@ def filter_zpk(timeseries, z, p, k):
Examples
--------
- To apply a 5 zeroes at 1Hz, 5 poles at 1Hz, and a gain of 1e-10 filter
+ To apply a 5 zeroes at 100Hz, 5 poles at 1Hz, and a gain of 1e-10 filter
to a TimeSeries instance, do:
>>> filtered_data = zpk_filter(timeseries, [100]*5, [1]*5, 1e-10)
"""
|
Fix typo in zpk_filter docstring.
|
diff --git a/src/Meta.php b/src/Meta.php
index <HASH>..<HASH> 100644
--- a/src/Meta.php
+++ b/src/Meta.php
@@ -41,7 +41,18 @@ class Meta
return $this->allFields;
}
-
+
+ /**
+ * Get a list of fields for this class
+ *
+ * The field list is a hash of 2-tuples keyed by property name.
+ * The first 2-tuple element contains either an explicit field
+ * name that the property maps to, or boolean "false" if the field
+ * name should be inferred.
+ * The second element contains the field's "type", for the purpose
+ * of looking up a type handler. This may be false if the type handler
+ * should be either inferred or ignored.
+ */
function getField($field)
{
if (!$this->allFields)
@@ -70,7 +81,7 @@ class Meta
if (!$this->primary) {
$pos = strrpos($class, '\\');
$name = $pos ? substr($class, $pos+1) : $class;
- $this->primary = lcfirst($name).'Id';
+ $this->primary = lcfirst($name.'Id');
}
return $this->primary;
|
tweaked lcfirst primary call
|
diff --git a/lib/restclient.rb b/lib/restclient.rb
index <HASH>..<HASH> 100644
--- a/lib/restclient.rb
+++ b/lib/restclient.rb
@@ -166,6 +166,7 @@ module RestClient
# Add a Proc to be called before each request in executed.
# The proc parameters will be the http request and the request params.
def self.add_before_execution_proc &proc
+ raise ArgumentError.new('block is required') unless proc
@@before_execution_procs << proc
end
|
Validate that proc passed to add_before_exec...
Previously, you could call RestClient.add_before_execution_proc() with
no arguments or block, and it would add `nil` to the list of procs. This
would cause a nil NoMethodError down the line. Instead, immediately
raise an ArgumentError.
|
diff --git a/lib/deferrable_gratification/combinators.rb b/lib/deferrable_gratification/combinators.rb
index <HASH>..<HASH> 100644
--- a/lib/deferrable_gratification/combinators.rb
+++ b/lib/deferrable_gratification/combinators.rb
@@ -182,11 +182,11 @@ module DeferrableGratification
# returns falsy, and subsequent callbacks will fire only if all the
# predicates pass.
#
- # @param [String] message optional description of the reason for the guard:
- # specifying this will both serve as code
- # documentation, and be included in the
- # {GuardFailed} exception for error handling
- # purposes.
+ # @param [String] reason optional description of the reason for the guard:
+ # specifying this will both serve as code
+ # documentation, and be included in the
+ # {GuardFailed} exception for error handling
+ # purposes.
#
# @yieldparam *args the arguments passed to callbacks if this Deferrable
# succeeds.
@@ -195,10 +195,10 @@ module DeferrableGratification
# should fire.
#
# @raise [ArgumentError] if called without a predicate
- def guard(message = nil)
+ def guard(reason = nil)
raise ArgumentError, 'must be called with a block' unless block_given?
callback do |*callback_args|
- fail(::DeferrableGratification::GuardFailed.new(message)) unless yield(*callback_args)
+ fail(::DeferrableGratification::GuardFailed.new(reason)) unless yield(*callback_args)
end
self
end
|
Rename #guard argument to 'reason' for clarity
|
diff --git a/vyper/parser/context.py b/vyper/parser/context.py
index <HASH>..<HASH> 100644
--- a/vyper/parser/context.py
+++ b/vyper/parser/context.py
@@ -42,7 +42,7 @@ class Context:
# Global variables, in the form (name, storage location, type)
self.globals = global_ctx._globals
# ABI objects, in the form {classname: ABI JSON}
- self.sigs = sigs or {}
+ self.sigs = sigs or {'self': {}}
# Variables defined in for loops, e.g. for i in range(6): ...
self.forvars = forvars or {}
# Return type of the function
|
fix 'self' keyerror when attempting to assign a function to a constant
|
diff --git a/src/vendor/erdiko/core/Response.php b/src/vendor/erdiko/core/Response.php
index <HASH>..<HASH> 100755
--- a/src/vendor/erdiko/core/Response.php
+++ b/src/vendor/erdiko/core/Response.php
@@ -67,7 +67,8 @@ class Response
*/
public function getThemeName()
{
- return $this->_themeName;
+ $name = (empty($this->_themeName)) ? $this->_theme->getName() : $this->_themeName;
+ return $name;
}
/**
diff --git a/src/vendor/erdiko/core/Theme.php b/src/vendor/erdiko/core/Theme.php
index <HASH>..<HASH> 100755
--- a/src/vendor/erdiko/core/Theme.php
+++ b/src/vendor/erdiko/core/Theme.php
@@ -147,6 +147,11 @@ class Theme extends Container
$this->_name = $name;
}
+ public function getName()
+ {
+ return $this->_name;
+ }
+
/**
* Get template file populated by the config
* e.g. get header/footer
|
Updated response class and theme class.
|
diff --git a/keanu-python/keanu/plots/traceplot.py b/keanu-python/keanu/plots/traceplot.py
index <HASH>..<HASH> 100644
--- a/keanu-python/keanu/plots/traceplot.py
+++ b/keanu-python/keanu/plots/traceplot.py
@@ -1,7 +1,7 @@
try:
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
-except ImportError: # mpl is optional
+except ImportError: # mpl is optional
pass
import numpy as np
|
Apply gradlew formatApply.
|
diff --git a/app/controllers/api/DashboardsApiController.java b/app/controllers/api/DashboardsApiController.java
index <HASH>..<HASH> 100644
--- a/app/controllers/api/DashboardsApiController.java
+++ b/app/controllers/api/DashboardsApiController.java
@@ -136,7 +136,7 @@ public class DashboardsApiController extends AuthenticatedController {
DashboardWidget widget = dashboard.getWidget(widgetId);
DashboardWidgetValueResponse widgetValue = widget.getValue(api());
- Object resultValue = filterValuesByResolution(resolution, widgetValue.result);
+ Object resultValue = (widget instanceof SearchResultChartWidget) ? filterValuesByResolution(resolution, widgetValue.result) : widgetValue.result;
Map<String, Object> result = Maps.newHashMap();
result.put("result", resultValue);
result.put("took_ms", widgetValue.tookMs);
|
Possible fix for issue #<I>
- added additional check to ensure sampling of data only applies to search result chart widgets
|
diff --git a/core/src/main/java/io/undertow/server/session/InMemorySessionManager.java b/core/src/main/java/io/undertow/server/session/InMemorySessionManager.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/io/undertow/server/session/InMemorySessionManager.java
+++ b/core/src/main/java/io/undertow/server/session/InMemorySessionManager.java
@@ -115,8 +115,11 @@ public class InMemorySessionManager implements SessionManager {
throw UndertowMessages.MESSAGES.couldNotFindSessionCookieConfig();
}
String sessionID = config.findSessionId(serverExchange);
- if(sessionID == null) {
+ while (sessionID == null) {
sessionID = sessionIdGenerator.createSessionId();
+ if(sessions.containsKey(sessionID)) {
+ sessionID = null;
+ }
}
Object evictionToken;
if (evictionQueue != null) {
|
Guard against session ID conflicts
The chances of this happening should be quite small, but add an explicit check anyway
|
diff --git a/Pragma/DB/DB.php b/Pragma/DB/DB.php
index <HASH>..<HASH> 100644
--- a/Pragma/DB/DB.php
+++ b/Pragma/DB/DB.php
@@ -142,4 +142,25 @@ class DB{
return $description;
}
+
+ public static function getPDOParamsFor($tab, &$params){
+ if(is_array($tab)){
+ if(!empty($tab)){
+ $subparams = [];
+ $counter_params = count($params) + 1;
+ foreach($tab as $val){
+ $subparams[':param'.$counter_params] = $val;
+ $counter_params++;
+ }
+ $params = array_merge($params, $subparams);
+ return implode(',',array_keys($subparams));
+ }
+ else{
+ throw new \Exception("getPDOParamsFor : Tryin to get PDO Params on an empty array");
+ }
+ }
+ else{
+ throw new \Exception("getPDOParamsFor : Params should be an array");
+ }
+ }
}
|
DB - helpers to parse params from an array
|
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index <HASH>..<HASH> 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -157,7 +157,7 @@ public class FeatureCoverageTest {
MeanTest.class,
MinTest.class,
OrderTest.class,
- PageRankTest.class,
+ //PageRankTest.class,
PathTest.class,
// PeerPressureTest.class,
// ProfileTest.class,
|
TINKERPOP-<I> PageRank tests aren't currently part of the required tests
|
diff --git a/pysat/utils/time.py b/pysat/utils/time.py
index <HASH>..<HASH> 100644
--- a/pysat/utils/time.py
+++ b/pysat/utils/time.py
@@ -12,6 +12,7 @@ import numpy as np
import pandas as pds
import re
+
def getyrdoy(date):
"""Return a tuple of year, day of year for a supplied datetime object.
|
STY: added missing whitespace
Added an extra line before the first routine.
|
diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
index <HASH>..<HASH> 100644
--- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
+++ b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
@@ -1762,7 +1762,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
return Math.min(clientResumptionTime, serverResumptionTime);
}
- private void processHandledCount(long handledCount) throws NotConnectedException, StreamManagementCounterError {
+ private void processHandledCount(long handledCount) throws StreamManagementCounterError {
long ackedStanzasCount = SMUtils.calculateDelta(handledCount, serverHandledStanzasCount);
final List<Stanza> ackedStanzas = new ArrayList<Stanza>(
handledCount <= Integer.MAX_VALUE ? (int) handledCount
|
Remove not thrown NotConnectedException in XMPPTCPConnection
|
diff --git a/biodata-models/src/main/java/org/opencb/biodata/models/core/Region.java b/biodata-models/src/main/java/org/opencb/biodata/models/core/Region.java
index <HASH>..<HASH> 100644
--- a/biodata-models/src/main/java/org/opencb/biodata/models/core/Region.java
+++ b/biodata-models/src/main/java/org/opencb/biodata/models/core/Region.java
@@ -102,7 +102,7 @@ public class Region {
@Override
public String toString() {
StringBuilder sb = new StringBuilder(this.chromosome);
- if (this.start != 0 && this.end != Integer.MAX_VALUE) {
+ if (this.end != Integer.MAX_VALUE) {
sb.append(":").append(this.start).append("-").append(this.end);
} else {
if (this.start != 0 && this.end == Integer.MAX_VALUE) {
|
biodata: Minor change in toString method of Region
|
diff --git a/pymzn/_mzn/_solvers.py b/pymzn/_mzn/_solvers.py
index <HASH>..<HASH> 100644
--- a/pymzn/_mzn/_solvers.py
+++ b/pymzn/_mzn/_solvers.py
@@ -193,7 +193,7 @@ class Gecode(Solver):
args.append(parallel)
if timeout > 0:
args.append('-time')
- args.append(int(timeout * 1000)) # Gecode takes milliseconds
+ args.append(str(timeout * 1000)) # Gecode takes milliseconds
if seed != 0:
args.append('-r')
args.append(seed)
@@ -344,4 +344,3 @@ optimathsat = Optimathsat(path=config.get('optimathsat'))
#: Default Opturion instance.
opturion = Opturion(path=config.get('opturion'))
-
|
solver: fix bug with timeout cast to str
|
diff --git a/distutils/tests/test_install.py b/distutils/tests/test_install.py
index <HASH>..<HASH> 100644
--- a/distutils/tests/test_install.py
+++ b/distutils/tests/test_install.py
@@ -19,6 +19,8 @@ from distutils.extension import Extension
from distutils.tests import support
from test import support as test_support
+import pytest
+
def _make_ext_name(modname):
return modname + sysconfig.get_config_var('EXT_SUFFIX')
@@ -29,6 +31,9 @@ class InstallTestCase(support.TempdirManager,
support.LoggingSilencer,
unittest.TestCase):
+ @pytest.mark.xfail(
+ 'platform.system() == "Windows" and sys.version_info > (3, 11)',
+ reason="pypa/distutils#148")
def test_home_installation_scheme(self):
# This ensure two things:
# - that --home generates the desired set of directory names
|
Mark test as xfail. Ref #<I>.
|
diff --git a/bot.js b/bot.js
index <HASH>..<HASH> 100644
--- a/bot.js
+++ b/bot.js
@@ -43,7 +43,7 @@ twit.stream('statuses/sample', function(stream) {
var isTwss = classify.knn.isTwss({
"promt": tweet.text,
"trainingData": trainingData,
- "numNeighbours": 10
+ "numNeighbours": 2
});
if (isTwss) console.log(tweet.text + '\n');
|
Maybe improved the k-NN slightly
|
diff --git a/lxd/storage/load.go b/lxd/storage/load.go
index <HASH>..<HASH> 100644
--- a/lxd/storage/load.go
+++ b/lxd/storage/load.go
@@ -32,7 +32,7 @@ func volIDFuncMake(state *state.State, poolID int64) func(volType drivers.Volume
volID, _, err := state.Cluster.StoragePoolNodeVolumeGetTypeByProject("default", volName, volTypeID, poolID)
if err != nil {
if err == db.ErrNoSuchObject {
- return -1, fmt.Errorf("Volume doesn't exist")
+ return -1, fmt.Errorf("Failed to get volume ID, volume '%s' of type '%s' doesn't exist", volName, volType)
}
return -1, err
|
lxd/storage/load: Improves getVolID error when volume not found
|
diff --git a/tests/test_hooks.py b/tests/test_hooks.py
index <HASH>..<HASH> 100755
--- a/tests/test_hooks.py
+++ b/tests/test_hooks.py
@@ -155,7 +155,9 @@ class TestExternalHooks(object):
assert 'tests' not in os.getcwd()
def test_run_hook(self):
- """Execute hook from specified template in specified output directory"""
+ """Execute hook from specified template in specified output
+ directory.
+ """
tests_dir = os.path.join(self.repo_path, 'input{{hooks}}')
with utils.work_in(self.repo_path):
hooks.run_hook('pre_gen_project', tests_dir, {})
|
Fix pep8 in test_run_hook
|
diff --git a/spyderlib/spyder.py b/spyderlib/spyder.py
index <HASH>..<HASH> 100644
--- a/spyderlib/spyder.py
+++ b/spyderlib/spyder.py
@@ -1246,6 +1246,8 @@ def initialize():
sys.exit = fake_sys_exit
# Translation
+ qt_translator = None
+ app_translator = None
if CONF.get('main', 'translation'):
locale = QLocale.system().name()
qt_translator = QTranslator()
|
Fixed: error when running Spyder with [main] Translate = False
|
diff --git a/modules/__tests__/URLUtils-test.js b/modules/__tests__/URLUtils-test.js
index <HASH>..<HASH> 100644
--- a/modules/__tests__/URLUtils-test.js
+++ b/modules/__tests__/URLUtils-test.js
@@ -260,6 +260,12 @@ describe('formatPattern', function () {
expect(formatPattern(pattern, { id: 'alt.black.helicopter' })).toEqual('comments/alt.black.helicopter/edit');
});
});
+
+ describe('and some params contain special characters', function () {
+ it('returns the correct path', function () {
+ expect(formatPattern(pattern, { id: '?not=confused&with=query#string' })).toEqual('comments/%3Fnot%3Dconfused%26with%3Dquery%23string/edit');
+ });
+ });
});
describe('when a pattern has one splat', function () {
|
[fixed] URI escape path components with special chars
Fixes #<I>
|
diff --git a/lib/expressapp.js b/lib/expressapp.js
index <HASH>..<HASH> 100644
--- a/lib/expressapp.js
+++ b/lib/expressapp.js
@@ -369,6 +369,17 @@ ExpressApp.prototype.start = function(opts, cb) {
});
});
+ router.post('/v1/txproposals/:id/send/', function(req, res) {
+ getServerWithAuth(req, res, function(server) {
+ req.body.txProposalId = req.params['id'];
+ server.sendTx(req.body, function(err, txp) {
+ if (err) return returnError(err, res, req);
+ res.json(txp);
+ res.end();
+ });
+ });
+ });
+
// TODO Check HTTP verb and URL name
router.post('/v1/txproposals/:id/broadcast/', function(req, res) {
getServerWithAuth(req, res, function(server) {
|
add express endpoint for sending tx
|
diff --git a/src/assertions/prop.js b/src/assertions/prop.js
index <HASH>..<HASH> 100644
--- a/src/assertions/prop.js
+++ b/src/assertions/prop.js
@@ -3,21 +3,21 @@ import should from 'should';
const Assertion = should.Assertion;
-Assertion.add('prop', function(expectedKey, expectedValue){
+Assertion.add('prop', function (expectedKey, expectedValue) {
const wrapper = WrapperBuilder(this.obj),
- wrapperProp = wrapper.prop(expectedKey);
+ wrapperProp = wrapper.prop(expectedKey);
- if(arguments.length > 1 && typeof wrapperProp !== 'undefined') {
+ if (arguments.length > 1 && typeof wrapperProp !== 'undefined') {
this.params = {
actual: wrapper.name(),
operator: `prop '${expectedKey}' to have value ${should.format(expectedValue)}, instead found ${should.format(wrapperProp)}`
};
should(wrapperProp).be.eql(expectedValue, ' ');
- }else{
+ } else {
this.params = {
actual: wrapper.name(),
operator: `to have prop '${expectedKey}'`
};
- should(wrapperProp).not.be.undefined(' ');
+ should(wrapperProp).not.be.undefined();
}
});
\ No newline at end of file
|
No args needed for undefined() assert
Errors thrown because no args needed to be passed into the undefined() assert.
Type checking has recently been added to should.js using TypeScript.
|
diff --git a/angr/engines/successors.py b/angr/engines/successors.py
index <HASH>..<HASH> 100644
--- a/angr/engines/successors.py
+++ b/angr/engines/successors.py
@@ -140,10 +140,9 @@ class SimSuccessors(object):
# trigger inspect breakpoints here since this statement technically shows up in the IRSB as the "next"
state.regs.ip = state.scratch.target
- # Consider those less fortunate among us with no stack pointer
- # EDG and rhelmot would like to warn you that if you don't do this (and don't have a SP)
- # SimProcedures that call other SimProcedures are going to be very broken
- if hasattr(self.initial_state.regs, 'sp'):
+ # For architectures with no stack pointer, we can't manage a callstack. This has the side effect of breaking
+ # SimProcedures that call out to binary code self.call.
+ if self.initial_state.arch.sp_offset is not None:
self._manage_callstack(state)
# clean up the state
|
Change the less-fortunate-among-us check to not trigger breakpoints, also fix narrative voice in comments
|
diff --git a/tests/test_models.py b/tests/test_models.py
index <HASH>..<HASH> 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -11,7 +11,7 @@ def test_simple_source():
# make a new source without failing
ss = models.SimpleSource()
ss.ra = np.float32(12)
- ss.sanitise()
+ ss._sanitise()
assert isinstance(ss.ra, np.float64)
# convert to string without failing
a = "{0}".format(ss)
|
refactor sanitise -> _sanitise
|
diff --git a/app/models/alchemy/page.rb b/app/models/alchemy/page.rb
index <HASH>..<HASH> 100644
--- a/app/models/alchemy/page.rb
+++ b/app/models/alchemy/page.rb
@@ -467,19 +467,14 @@ module Alchemy
definition["redirects_to_external"]
end
+ # Returns the first published child
def first_public_child
- self.children.where(:public => true).limit(1).first
+ children.published.first
end
# Gets the language_root page for page
def get_language_root
- return self if self.language_root
- page = self
- while page.parent do
- page = page.parent
- break if page.language_root?
- end
- return page
+ self_and_ancestors.where(:language_root => true).first
end
def copy_children_to(new_parent)
|
Refactors two page methods with scopes.
|
diff --git a/examples/hybrid_simple/tests.js b/examples/hybrid_simple/tests.js
index <HASH>..<HASH> 100644
--- a/examples/hybrid_simple/tests.js
+++ b/examples/hybrid_simple/tests.js
@@ -13,7 +13,7 @@ describe('hello', function(){
});
it('should say hello to person', function(){
- expect(hello('Bob')).to.equal('hello Bob')
+ expect(hello('Bob')).to.equal('hello Bob');
});
});
\ No newline at end of file
|
Added a semicolon;
|
diff --git a/dddp/server/views.py b/dddp/server/views.py
index <HASH>..<HASH> 100644
--- a/dddp/server/views.py
+++ b/dddp/server/views.py
@@ -187,6 +187,8 @@ class MeteorView(View):
def get(self, request, path):
"""Return HTML (or other related content) for Meteor."""
+ if path[:1] != '/':
+ path = '/%s' % path
if path == '/meteor_runtime_config.js':
config = {
'DDP_DEFAULT_CONNECTION_URL': request.build_absolute_uri('/'),
|
Normalise paths in dddp.server.views before comparison.
|
diff --git a/EventListener/SoftDeleteListener.php b/EventListener/SoftDeleteListener.php
index <HASH>..<HASH> 100644
--- a/EventListener/SoftDeleteListener.php
+++ b/EventListener/SoftDeleteListener.php
@@ -86,9 +86,11 @@ class SoftDeleteListener
}
elseif($manyToMany) {
- $mappedSide = get_class($entity) === $namespace;
- $inversedSide = ($ns && $entity instanceof $ns);
- if ($mappedSide || $inversedSide) {
+ // For ManyToMany relations, we only delete the relationship between
+ // two entities. This can be done on both side of the relation.
+ $allowMappedSide = get_class($entity) === $namespace;
+ $allowInversedSide = ($ns && $entity instanceof $ns);
+ if ($allowMappedSide || $allowInversedSide) {
if (strtoupper($onDelete->type) === 'SET NULL') {
throw new \Exception('SET NULL is not supported for ManyToMany relationships');
|
renamed variables and added comment
|
diff --git a/lib/rfd.rb b/lib/rfd.rb
index <HASH>..<HASH> 100644
--- a/lib/rfd.rb
+++ b/lib/rfd.rb
@@ -440,11 +440,11 @@ module Rfd
def ask(prompt = '(y/n)')
command_line.set_prompt prompt
command_line.wrefresh
- while (c = Curses.getch.chr)
- next unless %(y Y n N).include? c
+ while (c = Curses.getch)
+ next unless [78, 89, 110, 121] .include? c # N, Y, n, y
command_line.wclear
command_line.wrefresh
- break %(y Y).include? c
+ break [89, 121].include? c # Y, y
end
end
|
chring a getch explodes when the getch was out of char range
|
diff --git a/spec/flipper/instrumentation/log_subscriber_spec.rb b/spec/flipper/instrumentation/log_subscriber_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/flipper/instrumentation/log_subscriber_spec.rb
+++ b/spec/flipper/instrumentation/log_subscriber_spec.rb
@@ -81,7 +81,6 @@ describe Flipper::Instrumentation::LogSubscriber do
end
it "logs adapter value" do
- puts log
adapter_line = find_line('Flipper feature(search) adapter(memory) enable')
adapter_line.should include("[ result=")
end
|
Kill a puts with :fire:
|
diff --git a/monasca_common/kafka/producer.py b/monasca_common/kafka/producer.py
index <HASH>..<HASH> 100644
--- a/monasca_common/kafka/producer.py
+++ b/monasca_common/kafka/producer.py
@@ -16,6 +16,7 @@
import logging
import time
+from oslo_utils import encodeutils
from six import PY3
import monasca_common.kafka_lib.client as kafka_client
@@ -53,11 +54,11 @@ class KafkaProducer(object):
success = False
if key is None:
key = int(time.time() * 1000)
- if PY3:
- key = bytes(str(key), 'utf-8')
- messages = [m.encode("utf-8") for m in messages]
- else:
- key = str(key)
+
+ messages = [encodeutils.to_utf8(m) for m in messages]
+
+ key = bytes(str(key), 'utf-8') if PY3 else str(key)
+
while not success:
try:
self._producer.send_messages(topic, key, *messages)
|
Ensures that messages pass to kafka client are bytes string
Story: <I>
Task: <I>
Change-Id: I3ae<I>fbbe<I>bf<I>d<I>c<I>dda<I>d<I>
|
diff --git a/lib/rolify/resource.rb b/lib/rolify/resource.rb
index <HASH>..<HASH> 100644
--- a/lib/rolify/resource.rb
+++ b/lib/rolify/resource.rb
@@ -8,11 +8,16 @@ module Rolify
def find_roles(role_name = nil, user = nil)
roles = user && (user != :any) ? user.roles : self.role_class
roles = roles.where(:resource_type => self.to_s)
- roles = roles.where(:name => role_name) if role_name && (role_name != :any)
+ roles = roles.where(:name => role_name.to_s) if role_name && (role_name != :any)
roles
end
def with_role(role_name, user = nil)
+ if role_name.is_a? Array
+ role_name.map!(&:to_s)
+ else
+ role_name = role_name.to_s
+ end
resources = self.adapter.resources_find(self.role_table_name, self, role_name)
user ? self.adapter.in(resources, user, role_name) : resources
end
|
fixed compatibility issue with Squeel gem when using symbols as role name
closes #<I>
closes #<I>
|
diff --git a/generators/entity-client/index.js b/generators/entity-client/index.js
index <HASH>..<HASH> 100644
--- a/generators/entity-client/index.js
+++ b/generators/entity-client/index.js
@@ -24,7 +24,7 @@ const { entityClientI18nFiles } = require('../entity-i18n/files');
const utils = require('../utils');
const BaseBlueprintGenerator = require('../generator-base-blueprint');
const {
- SUPPORTED_CLIENT_FRAMEWORKS: { ANGULAR, REACT },
+ SUPPORTED_CLIENT_FRAMEWORKS: { ANGULAR, REACT, VUE },
} = require('../generator-constants');
const { GENERATOR_ENTITY_CLIENT } = require('../generator-list');
const { SQL } = require('../../jdl/jhipster/database-types');
@@ -72,7 +72,9 @@ module.exports = class extends BaseBlueprintGenerator {
setupCypress() {
const entity = this.entity;
- this.cypressBootstrapEntities = !entity.reactive || entity.databaseType !== SQL;
+ this.cypressBootstrapEntities =
+ (!entity.reactive || entity.databaseType !== SQL) &&
+ (this.clientFramework !== VUE || !entity.relationships.some(rel => rel.relationshipRequired && rel.collection));
},
};
}
|
Re-enable many-to-many workaround for vue.
|
diff --git a/src/components/MultiSelect/MultiSelect.js b/src/components/MultiSelect/MultiSelect.js
index <HASH>..<HASH> 100644
--- a/src/components/MultiSelect/MultiSelect.js
+++ b/src/components/MultiSelect/MultiSelect.js
@@ -12,6 +12,7 @@ import { defaultItemToString } from './tools/itemToString';
import { defaultSortItems, defaultCompareItems } from './tools/sorting';
const { prefix } = settings;
+const noop = () => undefined;
export default class MultiSelect extends React.Component {
static propTypes = {
@@ -203,7 +204,7 @@ export default class MultiSelect extends React.Component {
<ListBox.Field {...getButtonProps({ disabled })}>
{selectedItem.length > 0 && (
<ListBox.Selection
- clearSelection={clearSelection}
+ clearSelection={!disabled ? clearSelection : noop}
selectionCount={selectedItem.length}
/>
)}
|
fix(MultiSelect): disabled multiSelect being able to clear its select… (#<I>)
* fix(MultiSelect): disabled multiSelect being able to clear its selected items
* Update src/components/MultiSelect/MultiSelect.js
clearSection returns noop so that when clicked and disabled no function is ran
|
diff --git a/ftpretty.py b/ftpretty.py
index <HASH>..<HASH> 100644
--- a/ftpretty.py
+++ b/ftpretty.py
@@ -59,7 +59,7 @@ class ftpretty(object):
a file: opened for writing
None: contents are returned
"""
- if isinstance(local, file):
+ if isinstance(local, io.IOBase):
local_file = local
elif local is None:
local_file = io.StringIO()
@@ -68,7 +68,7 @@ class ftpretty(object):
self.conn.retrbinary("RETR %s" % remote, local_file.write)
- if isinstance(local, file):
+ if isinstance(local, io.IOBase):
local_file = local
elif local is None:
contents = local_file.getvalue()
@@ -94,7 +94,7 @@ class ftpretty(object):
if contents:
# local is ignored if contents is set
local_file = io.StringIO(contents)
- elif isinstance(local, file):
+ elif isinstance(local, io.IOBase):
local_file = local
else:
local_file = open(local, 'rb')
|
PY3: use io.IOBase instead of file
|
diff --git a/lib/model/adapters/mongo.js b/lib/model/adapters/mongo.js
index <HASH>..<HASH> 100644
--- a/lib/model/adapters/mongo.js
+++ b/lib/model/adapters/mongo.js
@@ -98,7 +98,7 @@ var Mongo = function (config) {
opts = {};
}
query = transformQuery(query);
- this.collection.find(query)
+ this.collection.find(query, opts.fields)
.sort(opts.sort)
.limit(opts.limit)
.skip(opts.skip)
|
feilds can now be included and excluded from queries
|
diff --git a/generators/generator-constants.js b/generators/generator-constants.js
index <HASH>..<HASH> 100644
--- a/generators/generator-constants.js
+++ b/generators/generator-constants.js
@@ -61,7 +61,7 @@ const DOCKER_MONGODB = 'mongo:4.4.1';
const DOCKER_COUCHBASE = 'couchbase:6.6.0';
const DOCKER_CASSANDRA = 'cassandra:3.11.8';
const DOCKER_MSSQL = 'mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04';
-const DOCKER_NEO4J = 'neo4j:4.1.1';
+const DOCKER_NEO4J = 'neo4j:4.1.3';
const DOCKER_HAZELCAST_MANAGEMENT_CENTER = 'hazelcast/management-center:4.0.3';
const DOCKER_MEMCACHED = 'memcached:1.6.6-alpine';
const DOCKER_REDIS = 'redis:6.0.7';
|
Update neo4j docker image version to <I>
|
diff --git a/src/Factory/Mail/ConfirmationFactory.php b/src/Factory/Mail/ConfirmationFactory.php
index <HASH>..<HASH> 100644
--- a/src/Factory/Mail/ConfirmationFactory.php
+++ b/src/Factory/Mail/ConfirmationFactory.php
@@ -23,7 +23,7 @@ use Laminas\ServiceManager\Factory\FactoryInterface;
*/
class ConfirmationFactory implements FactoryInterface
{
- public function __invoke(ContainerInterface $container, $requestedName, array $options = [])
+ public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null)
{
$router = $container->get('Router');
$options['router'] = $router;
|
fix(Applications): Confirmation mail factory is incompatible with Factory Interface.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@ except (IOError, ImportError, RuntimeError):
package = 'tapioca'
requirements = [
- 'requests>=2.6,<2.8',
+ 'requests>=2.6',
'arrow>=0.6.0,<0.7',
'six>=1',
]
|
Set requests<I> as minimum dependency on setup.py
|
diff --git a/devices.js b/devices.js
index <HASH>..<HASH> 100755
--- a/devices.js
+++ b/devices.js
@@ -10267,6 +10267,20 @@ const devices = [
await configureReporting.brightness(endpoint);
},
},
+ {
+ zigbeeModel: ['BDP3001'],
+ model: '81855',
+ vendor: 'AduroSmart',
+ description: 'ERIA smart plug (dimmer)',
+ extend: generic.light_onoff_brightness,
+ meta: {configureKey: 1},
+ configure: async (device, coordinatorEndpoint) => {
+ const endpoint = device.getEndpoint(1);
+ await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
+ await configureReporting.onOff(endpoint);
+ await configureReporting.brightness(endpoint);
+ },
+ },
// Danfoss
{
|
Support <I> (#<I>)
Added Adurosmart Eria smart plug (dimmer)
|
diff --git a/Web/Robot.php b/Web/Robot.php
index <HASH>..<HASH> 100644
--- a/Web/Robot.php
+++ b/Web/Robot.php
@@ -39,7 +39,7 @@ class sb_Web_Robot{
private $cookies = '';
/**
- * Additional headers converted from an array in add_additional_headers
+ * Additional headers converted from an array in set_additional_headers
*
* @var string
*/
@@ -131,12 +131,12 @@ class sb_Web_Robot{
}
/**
- * Add other additional headers
+ * Sets other additional headers
*
* @param array $data
* @return string
*/
- public function add_additional_headers($data){
+ public function set_additional_headers($data){
$additional_headers = '';
|
add_additional_headers() now called set_additional_headers as it is in the phpdocs
|
diff --git a/pyinfra/api/facts.py b/pyinfra/api/facts.py
index <HASH>..<HASH> 100644
--- a/pyinfra/api/facts.py
+++ b/pyinfra/api/facts.py
@@ -155,6 +155,9 @@ def get_facts(
fact = get_fact_class(name_or_cls)()
name = name_or_cls
+ if isinstance(fact, ShortFactBase):
+ return get_short_facts(state, fact, args=args, ensure_hosts=ensure_hosts)
+
args = args or ()
kwargs = kwargs or {}
if args or kwargs:
|
Restore/fix short fact functionality.
|
diff --git a/lancet/issue_tracker.py b/lancet/issue_tracker.py
index <HASH>..<HASH> 100644
--- a/lancet/issue_tracker.py
+++ b/lancet/issue_tracker.py
@@ -68,11 +68,18 @@ class GitlabTracker(Tracker):
project = self.api.projects.get(project_id, lazy=True)
group = self.api.groups.get(self.group_id, lazy=True)
+ def fromisoformat(datestr):
+ # datetime.date.isoformat is only available on python 3.7+
+ year, month, day = datestr.split("-")
+ return datetime.date(
+ year=int(year), month=int(month), day=int(day)
+ )
+
def is_current(milestone):
return (
- datetime.date.fromisoformat(milestone.start_date)
+ fromisoformat(milestone.start_date)
<= datetime.date.today()
- <= datetime.date.fromisoformat(milestone.due_date)
+ <= fromisoformat(milestone.due_date)
)
if add_to_active_sprint:
|
Restore compatibility with python < <I>
|
diff --git a/test_isort.py b/test_isort.py
index <HASH>..<HASH> 100644
--- a/test_isort.py
+++ b/test_isort.py
@@ -673,3 +673,6 @@ def test_settings_combine_instead_of_overwrite():
"""Test to ensure settings combine logically, instead of fully overwriting."""
assert set(SortImports(known_standard_library=['not_std_library']).config['known_standard_library']) == \
set(SortImports().config['known_standard_library'] + ['not_std_library'])
+
+ assert set(SortImports(not_known_standard_library=['thread']).config['known_standard_library']) == \
+ set(item for item in SortImports().config['known_standard_library'] if item != 'thread')
|
Add test to ensure full configurability is still present using 'not_' settings, since settings are no longer fully replaced each time
|
diff --git a/src/Stagehand/TestRunner/Core/Plugin/PluginRepository.php b/src/Stagehand/TestRunner/Core/Plugin/PluginRepository.php
index <HASH>..<HASH> 100644
--- a/src/Stagehand/TestRunner/Core/Plugin/PluginRepository.php
+++ b/src/Stagehand/TestRunner/Core/Plugin/PluginRepository.php
@@ -86,7 +86,9 @@ class PluginRepository
{
foreach (Finder::create()->name('/^.+Plugin\.php$/')->files()->in(__DIR__) as $file) { /* @var $file \SplFileInfo */
$pluginClass = new \ReflectionClass(__NAMESPACE__ . '\\' . $file->getBasename('.php'));
- if (!$pluginClass->isInterface() && !$pluginClass->isAbstract()) {
+ if (!$pluginClass->isInterface()
+ && !$pluginClass->isAbstract()
+ && $pluginClass->isSubclassOf('Stagehand\TestRunner\Core\Plugin\IPlugin')) {
self::$plugins[] = $pluginClass->newInstance();
}
}
|
Added checking whether the target class is an instance of the IPlugin interface.
|
diff --git a/pywal/__main__.py b/pywal/__main__.py
index <HASH>..<HASH> 100644
--- a/pywal/__main__.py
+++ b/pywal/__main__.py
@@ -69,7 +69,7 @@ def get_args(args):
help="Print \"wal\" version.")
arg.add_argument("-e", action="store_true",
- help="Skip Reloading Environment gtk/xrdb/i3/sway/polybar")
+ help="Skip reloading gtk/xrdb/i3/sway/polybar")
return arg.parse_args(args)
|
Keep line length under <I>c
|
diff --git a/tests/mongodb_settings.py b/tests/mongodb_settings.py
index <HASH>..<HASH> 100644
--- a/tests/mongodb_settings.py
+++ b/tests/mongodb_settings.py
@@ -11,7 +11,7 @@ DATABASES['mongo'] = {
}
}
-SOUTH_DATABASE_ADAPTERS = {'mongo': 'django_mongodb_engine.south'}
+SOUTH_DATABASE_ADAPTERS = {'mongo': 'django_mongodb_engine.south_adapter'}
INSTALLED_APPS.extend(['django_mongodb_engine', 'djangotoolbox'])
|
Make sure to load the new mongo south adapter
|
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/HttpKernel/Kernel.php
+++ b/src/Symfony/Component/HttpKernel/Kernel.php
@@ -76,12 +76,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
private static $freshCache = [];
- const VERSION = '4.4.5';
- const VERSION_ID = 40405;
+ const VERSION = '4.4.6-DEV';
+ const VERSION_ID = 40406;
const MAJOR_VERSION = 4;
const MINOR_VERSION = 4;
- const RELEASE_VERSION = 5;
- const EXTRA_VERSION = '';
+ const RELEASE_VERSION = 6;
+ const EXTRA_VERSION = 'DEV';
const END_OF_MAINTENANCE = '11/2022';
const END_OF_LIFE = '11/2023';
|
bumped Symfony version to <I>
|
diff --git a/jquery.cookieBar.js b/jquery.cookieBar.js
index <HASH>..<HASH> 100644
--- a/jquery.cookieBar.js
+++ b/jquery.cookieBar.js
@@ -26,7 +26,7 @@
{
cookiebar.append('<a class="cookiebar-close">Continue</a>');
settings = $.extend( {
- 'closeButtonClass' : '.cookiebar-close'
+ 'closeButton' : '.cookiebar-close'
}, options);
}
@@ -34,7 +34,7 @@
cookiebar.show();
}
- cookiebar.find(settings.closeButtonClass).click(function() {
+ cookiebar.find(settings.closeButton).click(function() {
cookiebar.hide();
$.cookie('cookiebar', 'hide', { path: settings.path, secure: settings.secure, domain: settings.domain, expires: 30 });
return false;
|
fixed an issue with custom close buttons not working
|
diff --git a/ait/core/tlm.py b/ait/core/tlm.py
index <HASH>..<HASH> 100644
--- a/ait/core/tlm.py
+++ b/ait/core/tlm.py
@@ -743,7 +743,7 @@ class PacketDefinition(json.SlotSerializer, object):
def simulate(self, fill=None):
size = self.nbytes
- values = bytearray(range(size)) if fill is None else bytearray(str(fill) * size, 'ascii')
+ values = bytearray(range(size)) if fill is None else bytearray(str(fill) * size, 'utf-8')
return Packet(self, values)
|
Updated tlm simulate to use utf-8 encoding
|
diff --git a/ccmlib/node.py b/ccmlib/node.py
index <HASH>..<HASH> 100644
--- a/ccmlib/node.py
+++ b/ccmlib/node.py
@@ -1002,6 +1002,7 @@ class Node():
with open(full_options['yaml_file'], 'r') as f:
user_yaml = yaml.load(f)
data = common.yaml_merge(user_yaml, data)
+ data.pop('yaml_file')
with open(conf_file, 'w') as f:
yaml.safe_dump(data, f, default_flow_style=False)
|
Do not add yaml_file to cassandra.yaml
|
diff --git a/Controller/ResourceController.php b/Controller/ResourceController.php
index <HASH>..<HASH> 100644
--- a/Controller/ResourceController.php
+++ b/Controller/ResourceController.php
@@ -325,9 +325,15 @@ class ResourceController extends Controller implements ResourceControllerInterfa
return $this->redirect($redirectPath);
}
+ if ($this->hasParent()) {
+ $returnRoute = $this->getParent()->getConfiguration()->getRoute('show');
+ } else {
+ $returnRoute = $this->config->getRoute('list');
+ }
+
return $this->redirect(
$this->generateUrl(
- $this->config->getRoute('list'),
+ $returnRoute,
$context->getIdentifiers()
)
);
|
Fix delete action redirect (child controller)
|
diff --git a/bin/eve.js b/bin/eve.js
index <HASH>..<HASH> 100755
--- a/bin/eve.js
+++ b/bin/eve.js
@@ -7,7 +7,7 @@ var minimist = require("minimist");
var config = require("../build/src/config");
var server = require("../build/src/runtime/server");
-const argv = minimist(process.argv.slice(2));
+const argv = minimist(process.argv.slice(2), {boolean: ["server", "editor"]});
// Since our current development pattern uses npm as its package repository, we treat the nearest ancestor directory with a package.json (inclusive) as the directory's "root".
function findRoot(root) {
@@ -23,10 +23,10 @@ function findRoot(root) {
}
+var port = argv["port"] || process.env.PORT || 8080;
var browser = !argv["server"];
-var port = process.env.PORT || argv["port"] || 8080;
-var filepath = argv["_"][0]; // @FIXME: This should really be the first positional argument, not the first of any argument. (undefined if a user flags first).
var editor = argv["editor"] || false;
+var filepath = argv["_"][0];
var internal = false;
var root = findRoot(process.cwd());
|
Fix port flag not overriding ENV and file argument following a boolean flag
|
diff --git a/kernel/src/main/java/com/qspin/qtaste/config/TestBedConfiguration.java b/kernel/src/main/java/com/qspin/qtaste/config/TestBedConfiguration.java
index <HASH>..<HASH> 100644
--- a/kernel/src/main/java/com/qspin/qtaste/config/TestBedConfiguration.java
+++ b/kernel/src/main/java/com/qspin/qtaste/config/TestBedConfiguration.java
@@ -294,7 +294,12 @@ public class TestBedConfiguration extends XMLConfiguration {
*/
protected static void onConfigurationChange() {
for (ConfigurationChangeHandler handler : configurationChangeHandlers) {
- handler.onConfigurationChange();
+ try {
+ handler.onConfigurationChange();
+ } catch (Exception pExc)
+ {
+ logger.error("An error occured during the testbed configuration change event management:" + pExc.getMessage(), pExc);
+ }
}
}
|
[KERNEL] add exception management in the testbed configuration change event emitter
|
diff --git a/interp/interp_test.go b/interp/interp_test.go
index <HASH>..<HASH> 100644
--- a/interp/interp_test.go
+++ b/interp/interp_test.go
@@ -870,10 +870,12 @@ var fileCases = []struct {
"echo foo >/dev/null; echo bar",
"bar\n",
},
- {
- ">a; echo foo >>b; wc -c <a >>b; cat b",
- "foo\n0\n",
- },
+ // TODO: reenable once we've made a decision on
+ // https://github.com/mvdan/sh/issues/289
+ // {
+ // ">a; echo foo >>b; wc -c <a >>b; cat b",
+ // "foo\n0\n",
+ // },
{
"echo foo >a; wc -c <a",
"4\n",
|
interp: disable test that's failing on AppVeyor
To keep CI green.
Updates #<I>.
|
diff --git a/tasks/documentjs.js b/tasks/documentjs.js
index <HASH>..<HASH> 100644
--- a/tasks/documentjs.js
+++ b/tasks/documentjs.js
@@ -10,8 +10,13 @@ module.exports = function(grunt) {
*
* @signature `grunt documentjs[:NAME[@PATH]]`
*
- * Calls the configured grunt task. If no name or path is given, all
- * versions and sites will be generated.
+ * Calls the configured grunt task.
+ *
+ * If no name or path is given, all
+ * versions and sites will be generated.
+ *
+ * If no `documentjs` task is configured, the grunt task will read from
+ * a local _documentjs.json_.
*
* @param {String} [NAME] The name of a version or site that this generation will
* be limited too.
@@ -68,13 +73,15 @@ module.exports = function(grunt) {
return {name: name};
});
}
-
- var docConfig = grunt.config.getRaw(this.name);
-
- configured.generateProject({
- path: process.cwd(),
- docConfig: docConfig
- }, undefined, options)
+ var project = {
+ path: process.cwd()
+ },
+ docConfig = grunt.config.getRaw(this.name);
+
+ if(docConfig) {
+ project.docConfig = docConfig;
+ }
+ configured.generateProject(project, undefined, options)
.then(done,function(err){
console.log(err);
done(err);
|
the documentjs task can read from documentjs.json
|
diff --git a/vault/activity_log_test.go b/vault/activity_log_test.go
index <HASH>..<HASH> 100644
--- a/vault/activity_log_test.go
+++ b/vault/activity_log_test.go
@@ -445,7 +445,9 @@ func TestActivityLog_MultipleFragmentsAndSegments(t *testing.T) {
// enabled check is now inside AddEntityToFragment
a.enabled = true
// set a nonzero segment
+ a.l.Lock()
a.currentSegment.startTimestamp = time.Now().Unix()
+ a.l.Unlock()
// Stop timers for test purposes
close(a.doneCh)
|
Use a lock to address race. (#<I>)
|
diff --git a/lib/lolapi.js b/lib/lolapi.js
index <HASH>..<HASH> 100644
--- a/lib/lolapi.js
+++ b/lib/lolapi.js
@@ -149,12 +149,13 @@
historyOptions += '&endIndex=' + options.endIndex;
}
if (options.beginTime) {
- historyOptions += '&beginTime=' + options.beginIndex;
+ historyOptions += '&beginTime=' + options.beginTime;
}
if (options.endTime) {
- historyOptions += '&endTime=' + options.endIndex;
+ historyOptions += '&endTime=' + options.endTime;
}
historyOptions += '&';
+ historyOptions = historyOptions.substr(1);
}
url = util.craftUrl(endpoint, regionAndFunc.region, matchHistoryUrl + '/' +
summonerId + '?' + historyOptions, authKey);
|
fix (MatchHistory) actually use the options too
* right options set for beginTime / endTime
* cleaning url
|
diff --git a/src/Admin/AbstractAdmin.php b/src/Admin/AbstractAdmin.php
index <HASH>..<HASH> 100644
--- a/src/Admin/AbstractAdmin.php
+++ b/src/Admin/AbstractAdmin.php
@@ -2914,7 +2914,7 @@ EOT;
$mapper = new ListMapper($this->getListBuilder(), $this->list, $this);
- if (\count($this->getBatchActions()) > 0 && !$this->getRequest()->isXmlHttpRequest()) {
+ if (\count($this->getBatchActions()) > 0 && $this->hasRequest() && !$this->getRequest()->isXmlHttpRequest()) {
$fieldDescription = $this->getModelManager()->getNewFieldDescriptionInstance(
$this->getClass(),
'batch',
|
Add hasRequest to prevent error in dashboard
Add hasRequest to prevent error : `The Request object has not been set` in dashboard
|
diff --git a/lib/plugins/retry.js b/lib/plugins/retry.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/retry.js
+++ b/lib/plugins/retry.js
@@ -34,7 +34,9 @@ retry.prototype.argsKey = function(){
var self = this;
// return crypto.createHash('sha1').update(self.args.join('-')).digest('hex');
if(!self.args || self.args.length === 0){ return ''; }
- return self.args.join('-');
+ return self.args.map(function(elem){
+ return typeof(elem) === "object" ? JSON.stringify(elem) : elem;
+ }).join("-");
};
retry.prototype.retryKey = function(){
|
Stringify elements of args array that are of object type to avoid creating an [object object] key in redis
|
diff --git a/backbone.js b/backbone.js
index <HASH>..<HASH> 100644
--- a/backbone.js
+++ b/backbone.js
@@ -1079,7 +1079,7 @@
// Helper function to escape a string for HTML rendering.
var escapeHTML = function(string) {
- return string.replace(/&(?!\w+;)/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
+ return string.replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
};
}).call(this);
|
Fixed escapeHTML function
to skip not only &***;, but also &#***; and &x***;
|
diff --git a/server/server.js b/server/server.js
index <HASH>..<HASH> 100644
--- a/server/server.js
+++ b/server/server.js
@@ -35,11 +35,10 @@ if (!process.env.SILENT_MODE) {
}
router.get('/', function (req, res) {
- console.log("'" + req.ip + "'");
- if ( req.ip.match(/^16\./) ) {
+ if ( req.ip.match(/^15\./) ) {
res.redirect('/docs/hpe');
}
- else if ( req.ip.match(/^15\./) ) {
+ else if ( req.ip.match(/^16\./) ) {
res.redirect('/docs/hpinc');
}
else {
|
Removed log message and fixed IP mapping
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -13,7 +13,7 @@ function IndexRegistry(taker) {
DefaultRegistry.call(this);
- var setTask = taker.set || taker._setTask;
+ var setTask = (taker.set || taker._setTask).bind(taker);
setTask('ng:beforeServe', noop);
setTask('ng:afterServe', noop);
|
fix(undertaker): comply with undertaker new <I> interface bis repetita
|
diff --git a/unleash/git.py b/unleash/git.py
index <HASH>..<HASH> 100644
--- a/unleash/git.py
+++ b/unleash/git.py
@@ -5,11 +5,11 @@ from stat import S_ISLNK, S_ISDIR, S_ISREG, S_IFDIR, S_IRWXU, S_IRWXG, S_IRWXO
import time
from dateutil.tz import tzlocal
+from dulwich.errors import NotTreeError
from dulwich.objects import S_ISGITLINK, Blob, Commit, Tree
import logbook
from stuf.collects import ChainMap
-
log = logbook.Logger('git')
HASH_RE = re.compile('^[a-zA-Z0-9]{40}$')
@@ -307,7 +307,7 @@ class MalleableCommit(object):
try:
self.get_path_data(path)
return True
- except KeyError:
+ except (KeyError, NotTreeError):
return False
def get_path_id(self, path):
|
Do not fail if a file exists that is named similar to a directory that is supposed to exist.
|
diff --git a/lib/zold/node/farmers.rb b/lib/zold/node/farmers.rb
index <HASH>..<HASH> 100755
--- a/lib/zold/node/farmers.rb
+++ b/lib/zold/node/farmers.rb
@@ -127,7 +127,7 @@ for #{after.host}:#{after.port} in #{Age.new(start)}: #{after.suffixes}")
stdin, stdout = IO.pipe
Process.fork do
score = score.next
- stdout.puts "#{score.to_s}|#{Process.pid}"
+ stdout.puts "#{score}|#{Process.pid}"
end
Process.wait
stdout.close
|
Issue #<I> - Fix for rubocop
|
diff --git a/lib/prey/providers/system/platform/mac/index.js b/lib/prey/providers/system/platform/mac/index.js
index <HASH>..<HASH> 100644
--- a/lib/prey/providers/system/platform/mac/index.js
+++ b/lib/prey/providers/system/platform/mac/index.js
@@ -8,6 +8,8 @@ exports.get_os_version = function(callback){
callback('lion');
}
+// when battery is charging, time remaining is actually
+// what remains until the battery is full.
exports.get_battery_info = function(callback){
var cmd = 'pmset -g batt';
@@ -19,7 +21,8 @@ exports.get_battery_info = function(callback){
var percentage_remaining = output.match(/(\d+)%;/)[1];
var state = output.match(/%;\s+(\w+)/)[1];
- var time_remaining = output.match(/;\s+(\d+:\d+)/)[1];
+ if(time_value = output.match(/;\s+(\d+:\d+)/))
+ var time_remaining = time_value[1];
var data = {
percentage_remaining: percentage_remaining,
|
Fix battery info on Mac when no time remaining is given
|
diff --git a/coconut/constants.py b/coconut/constants.py
index <HASH>..<HASH> 100644
--- a/coconut/constants.py
+++ b/coconut/constants.py
@@ -543,6 +543,7 @@ all_reqs = {
),
"mypy": (
"mypy[python2]",
+ "types-backports",
),
"watch": (
"watchdog",
@@ -579,6 +580,7 @@ min_versions = {
"psutil": (5,),
"jupyter": (1, 0),
"mypy[python2]": (0, 900),
+ "types-backports": (0, 1),
"futures": (3, 3),
"backports.functools-lru-cache": (1, 6),
"argparse": (1, 4),
|
Add types-backports req
|
diff --git a/wireprotocol/2_6_support.js b/wireprotocol/2_6_support.js
index <HASH>..<HASH> 100644
--- a/wireprotocol/2_6_support.js
+++ b/wireprotocol/2_6_support.js
@@ -43,7 +43,7 @@ var executeWrite = function(pool, bson, type, opsField, ns, ops, options, callba
}
// Do we have bypassDocumentValidation set, then enable it on the write command
- if (typeof options.bypassDocumentValidation === 'boolean') {
+ if (options.bypassDocumentValidation === true) {
writeCommand.bypassDocumentValidation = options.bypassDocumentValidation;
}
diff --git a/wireprotocol/3_2_support.js b/wireprotocol/3_2_support.js
index <HASH>..<HASH> 100644
--- a/wireprotocol/3_2_support.js
+++ b/wireprotocol/3_2_support.js
@@ -101,7 +101,7 @@ var executeWrite = function(pool, bson, type, opsField, ns, ops, options, callba
}
// Do we have bypassDocumentValidation set, then enable it on the write command
- if (typeof options.bypassDocumentValidation === 'boolean') {
+ if (options.bypassDocumentValidation === true) {
writeCommand.bypassDocumentValidation = options.bypassDocumentValidation;
}
|
fix(wireprotocol): only send bypassDocumentValidation if true
The bypassDocumentValidation key will only be set if it explicitly
receives a true, otherwise it remains undefined.
Fixes NODE-<I>
|
diff --git a/src/constructors/css.js b/src/constructors/css.js
index <HASH>..<HASH> 100644
--- a/src/constructors/css.js
+++ b/src/constructors/css.js
@@ -6,7 +6,7 @@ import NestedSelector from "../models/NestedSelector";
import ValidRuleSetChild from "../models/ValidRuleSetChild";
const declaration = /^\s*([\w-]+):\s*([^;]*);\s*$/
-const startNesting = /^\s*([\w\.:&>][^{]+?)\s*\{\s*$/
+const startNesting = /^\s*([\w\.#:&>][^{]+?)\s*\{\s*$/
const stopNesting = /^\s*}\s*$/
/* This is a bit complicated.
@@ -66,6 +66,11 @@ export default (strings, ...interpolations) => {
const newRule = rule(camelize(property), value)
currentLevel.ruleSet.add(newRule)
} else if (popNesting) {
+ if (!currentLevel.parent) {
+ console.error(linesAndInterpolations)
+ console.error(currentLevel)
+ throw new Error("CSS Syntax Error — Trying to un-nest one too many times")
+ }
currentLevel = currentLevel.parent
}
}
|
allowing # for ids in selectors
|
diff --git a/tests/Doctrine/Tests/ORM/Tools/Pagination/PaginationTestCase.php b/tests/Doctrine/Tests/ORM/Tools/Pagination/PaginationTestCase.php
index <HASH>..<HASH> 100644
--- a/tests/Doctrine/Tests/ORM/Tools/Pagination/PaginationTestCase.php
+++ b/tests/Doctrine/Tests/ORM/Tools/Pagination/PaginationTestCase.php
@@ -6,6 +6,9 @@ use Doctrine\Tests\OrmTestCase;
abstract class PaginationTestCase extends OrmTestCase
{
+ /**
+ * @var \Doctrine\ORM\EntityManagerInterface
+ */
public $entityManager;
public function setUp()
|
DDC-<I> - adding missing type-hint docblock
|
diff --git a/src/actions/pause.js b/src/actions/pause.js
index <HASH>..<HASH> 100644
--- a/src/actions/pause.js
+++ b/src/actions/pause.js
@@ -3,6 +3,7 @@
import { selectSource, ensureParserHasSourceText } from "./sources";
import { PROMISE } from "../utils/redux/middleware/promise";
+import { togglePaneCollapse } from "./ui";
import {
getPause,
pausedInEval,
@@ -137,6 +138,8 @@ export function paused(pauseInfo: Pause) {
const { line, column } = frame.location;
dispatch(selectSource(frame.location.sourceId, { line, column }));
+
+ dispatch(togglePaneCollapse("end", false));
};
}
|
fix #<I> - expand the right sidebar on pausing at breakpoint
|
diff --git a/openquake/commonlib/commands/info.py b/openquake/commonlib/commands/info.py
index <HASH>..<HASH> 100644
--- a/openquake/commonlib/commands/info.py
+++ b/openquake/commonlib/commands/info.py
@@ -50,6 +50,8 @@ def info(name, filtersources=False):
oqparam, sitecol, prefilter=filtersources, in_memory=filtersources)
assoc = csm.get_rlzs_assoc()
print assoc.csm_info
+ print('See https://github.com/gem/oq-risklib/blob/master/docs/'
+ 'effective-realizations.rst for an explanation')
print assoc
if filtersources:
# display information about the size of the hazard curve matrices
|
Added a reference to the documentation
|
diff --git a/src/main/java/info/gehrels/voting/Candidate.java b/src/main/java/info/gehrels/voting/Candidate.java
index <HASH>..<HASH> 100644
--- a/src/main/java/info/gehrels/voting/Candidate.java
+++ b/src/main/java/info/gehrels/voting/Candidate.java
@@ -14,6 +14,10 @@ public class Candidate {
this.name = validateThat(name, not(isEmptyOrNullString()));
}
+ public String getName() {
+ return name;
+ }
+
@Override
public String toString() {
return this.name;
|
Replaced thymeleaf by JSP, Extended the Form binding to hold multiple elections,
|
diff --git a/core/codegen/javagen/src/main/java/org/overture/codegen/vdm2java/JavaCodeGen.java b/core/codegen/javagen/src/main/java/org/overture/codegen/vdm2java/JavaCodeGen.java
index <HASH>..<HASH> 100644
--- a/core/codegen/javagen/src/main/java/org/overture/codegen/vdm2java/JavaCodeGen.java
+++ b/core/codegen/javagen/src/main/java/org/overture/codegen/vdm2java/JavaCodeGen.java
@@ -255,7 +255,7 @@ public class JavaCodeGen extends CodeGenBase implements IJavaQouteEventCoordinat
{
try
{
- if (!isTestCase(status))
+ if (!getInfo().getDeclAssistant().isLibraryName(status.getIrNodeName()))
{
generator.applyPartialTransformation(status, trans);
}
|
Fix to Java code generator: only transform non-library modules/classes
|
diff --git a/src/react/src/routes/SprkAlertDocs/SprkAlertDocs.js b/src/react/src/routes/SprkAlertDocs/SprkAlertDocs.js
index <HASH>..<HASH> 100644
--- a/src/react/src/routes/SprkAlertDocs/SprkAlertDocs.js
+++ b/src/react/src/routes/SprkAlertDocs/SprkAlertDocs.js
@@ -7,7 +7,7 @@ const SprkAlertDocs = () => {
return (
<CentralColumnLayout>
<div className="sprk-u-mbm">
- <SprkAlert message="Information alert message placeholder." variant="info" idString="alert-1"/>
+ <SprkAlert message="Information alert message placeholder." variant="info" idString="alert-1" additionalClasses="sprk-u-mbh"/>
</div>
<div className="sprk-u-mbm">
|
add additionalClasses prop test to react test page
|
diff --git a/tests/cases/access_test.py b/tests/cases/access_test.py
index <HASH>..<HASH> 100644
--- a/tests/cases/access_test.py
+++ b/tests/cases/access_test.py
@@ -24,7 +24,6 @@ from girder.api import access
from girder.constants import AccessType
-
# We deliberately don't have an access decorator
def defaultFunctionHandler(**kwargs):
return
|
Really make pep8 happy this time.
|
diff --git a/validator/sawtooth_validator/merkle.py b/validator/sawtooth_validator/merkle.py
index <HASH>..<HASH> 100644
--- a/validator/sawtooth_validator/merkle.py
+++ b/validator/sawtooth_validator/merkle.py
@@ -40,7 +40,13 @@ class MerkleDatabase(object):
yield item
def _yield_iter(self, path, hash_key):
- node = self._get_by_hash(hash_key)
+ try:
+ node = self._get_by_addr(path)
+ except KeyError:
+ raise StopIteration()
+
+ if path == INIT_ROOT_KEY:
+ node = self._get_by_hash(hash_key)
if node["v"] is not None:
yield (path, self._decode(node["v"]))
|
Updates for iterating from non-root paths in MerkleDatabase
If the path isn't in the trie, raise StopIteration().
If the path isn't the root node, use _get_by_addr()
to get it.
|
diff --git a/keyring/backend.py b/keyring/backend.py
index <HASH>..<HASH> 100644
--- a/keyring/backend.py
+++ b/keyring/backend.py
@@ -12,6 +12,7 @@ import base64
import json
from keyring.util.escape import escape as escape_for_ini
+import keyring.util.escape
from keyring.util import properties
import keyring.util.platform
import keyring.util.loc_compat
@@ -603,8 +604,10 @@ class CryptedFileKeyring(BasicFileKeyring):
self.keyring_key = keyring_password
config.remove_option(KEYRING_SETTING, CRYPTED_PASSWORD)
- config.write(self.file_path)
- self.set_password('keyring-setting', 'reference password')
+ with open(self.file_path, 'w') as f:
+ config.write(f)
+ self.set_password('keyring-setting', 'password reference',
+ 'password reference value')
from Crypto.Cipher import AES
password = keyring_password + (
@@ -616,6 +619,8 @@ class CryptedFileKeyring(BasicFileKeyring):
cipher = AES.new(password, AES.MODE_CFB,
'\0' * AES.block_size)
password_c = config.get(service, user).decode('base64')
+ service = keyring.util.escape.unescape(service)
+ user = keyring.util.escape.unescape(user)
password_p = cipher.decrypt(password_c)
self.set_password(service, user, password_p)
|
Fixed some issues with the conversion routine from <I>
|
diff --git a/glymur/__init__.py b/glymur/__init__.py
index <HASH>..<HASH> 100644
--- a/glymur/__init__.py
+++ b/glymur/__init__.py
@@ -1,5 +1,6 @@
"""glymur - read, write, and interrogate JPEG 2000 files
"""
+import sys
from .jp2k import Jp2k
from .jp2dump import jp2dump
|
Needed to import sys.
|
diff --git a/builder/setup.py b/builder/setup.py
index <HASH>..<HASH> 100644
--- a/builder/setup.py
+++ b/builder/setup.py
@@ -11,7 +11,7 @@ setup(
include_package_data=True,
install_requires=[
'vr.runners>=2.0.4,<3',
- 'PyYAML>=3.10',
+ 'PyYAML==3.10',
],
entry_points={
'console_scripts': [
|
Pin PyYAML version to <I> to be happy with dependencies
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -44,7 +44,7 @@ BIPPath.fromPathArray = function (path) {
BIPPath.fromString = function (text, reqRoot) {
// skip the root
- if (text.startsWith('m/')) {
+ if (/^m\//i.test(text)) {
text = text.slice(2)
} else if (reqRoot) {
throw new Error('Root element is required')
|
Do not use startsWith() as it has limited browser support
|
diff --git a/exam.js b/exam.js
index <HASH>..<HASH> 100755
--- a/exam.js
+++ b/exam.js
@@ -38,7 +38,7 @@ var exam = module.exports = function (options) {
function readManifest() {
waits++;
fs.readFile(manifestPath, function (err, content) {
- manifest = JSON.parse(content || '{}');
+ manifest = JSON.parse(content || '{"files":[]}');
unwait();
});
}
|
Preventing error when manifest is missing
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.