diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/phpsec/phpsec.rand.php b/phpsec/phpsec.rand.php
index <HASH>..<HASH> 100644
--- a/phpsec/phpsec.rand.php
+++ b/phpsec/phpsec.rand.php
@@ -3,7 +3,7 @@
phpSec - A PHP security library
@author Audun Larsen <larsen@xqus.com>
- @copyright Copyright (c) Audun Larsen, 2011
+ @copyright Copyright (c) Audun Larsen, 2011, 2012
@link https://github.com/phpsec/phpSec
@license http://opensource.org/licenses/mit-license.php The MIT License
@package phpSec
@@ -23,7 +23,7 @@ class phpsecRand {
*/
public static function bytes($len) {
/* Code inspired by this blogpost by Enrico Zimuel
- * http://www.zimuel.it/blog/2011/01/strong-cryptography-in-php/ */
+ * http://www.zimuel.it/en/strong-cryptography-in-php/ */
$strong = false;
if(function_exists('openssl_random_pseudo_bytes')) {
$rnd = openssl_random_pseudo_bytes($len, $strong);
|
Updates URL to the blogpost by Enrico Zimuel.
|
diff --git a/spec/support/star_wars/schema.rb b/spec/support/star_wars/schema.rb
index <HASH>..<HASH> 100644
--- a/spec/support/star_wars/schema.rb
+++ b/spec/support/star_wars/schema.rb
@@ -17,7 +17,6 @@ module StarWars
global_id_field :id
field :name, types.String
field :planet, types.String
- connection :ships, Ship.connection_type
end
# Use an optional block to add fields to the connection type:
|
test(BaseType) show bug on self-referenctial connections
|
diff --git a/activerecord/lib/active_record/railties/collection_cache_association_loading.rb b/activerecord/lib/active_record/railties/collection_cache_association_loading.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/railties/collection_cache_association_loading.rb
+++ b/activerecord/lib/active_record/railties/collection_cache_association_loading.rb
@@ -8,12 +8,12 @@ module ActiveRecord
return super unless options[:cached]
- @relation = relation_from_options(**options)
+ @relation = relation_from_options(options[:partial], options[:collection])
super
end
- def relation_from_options(cached: nil, partial: nil, collection: nil, **_)
+ def relation_from_options(partial, collection)
relation = partial if partial.is_a?(ActiveRecord::Relation)
relation ||= collection if collection.is_a?(ActiveRecord::Relation)
|
Remove hash deconstruction
I don't think this hash deconstruction buys us much in terms of
readability. We only need two parameters, the rest are ignored, and on
top of that we have to allocate a hash. Convert to positional
parameters instead.
|
diff --git a/kontrol/storage.go b/kontrol/storage.go
index <HASH>..<HASH> 100644
--- a/kontrol/storage.go
+++ b/kontrol/storage.go
@@ -2,6 +2,7 @@ package kontrol
import (
"errors"
+ "net/http"
"strings"
"time"
@@ -44,6 +45,10 @@ func NewEtcd(machines []string) (*Etcd, error) {
return nil, errors.New("cannot connect to etcd cluster: " + strings.Join(machines, ","))
}
+ client.CheckRetry = func(c *etcd.Cluster, n int, resp http.Response, err error) error {
+ return err
+ }
+
return &Etcd{
client: client,
}, nil
|
kontrol: checkRetry is spamming etcd
Disable it by returning simply an error. Otherwise subsequent calls are
made which are ddosing the server. go-etcd should be smart, but is not.
|
diff --git a/tests/test_alignmentSimulationRandomSeed.py b/tests/test_alignmentSimulationRandomSeed.py
index <HASH>..<HASH> 100644
--- a/tests/test_alignmentSimulationRandomSeed.py
+++ b/tests/test_alignmentSimulationRandomSeed.py
@@ -86,8 +86,8 @@ class test_simulateAlignmentRandomSeed_ExpCM(unittest.TestCase):
alignments[counter][s.id] = str(s.seq)
# check they are the same
for key in alignments[counter].keys():
- assert alignments[counter][key] == alignments[counter - 1][key]
- #
+ self.assertTrue(alignments[counter][key] == alignments[counter - 1][key])
+
# alignments with different seed numbers should be different
# make an alignment with a different seed number
seed += 1
@@ -98,7 +98,7 @@ class test_simulateAlignmentRandomSeed_ExpCM(unittest.TestCase):
alignments[counter][s.id] = str(s.seq)
# check they are different
for key in alignments[counter].keys():
- assert alignments[counter][key] != alignments[counter - 1][key]
+ self.assertFalse(alignments[counter][key] == alignments[counter - 1][key])
# general clean-up
|
changed assert to self.assertTrue/self.assertFalse in random seed test
|
diff --git a/lib/backburner.js b/lib/backburner.js
index <HASH>..<HASH> 100644
--- a/lib/backburner.js
+++ b/lib/backburner.js
@@ -39,9 +39,6 @@ export default function Backburner(queueNames, options) {
};
}
-// ms of delay before we conclude a timeout was lost
-var TIMEOUT_STALLED_THRESHOLD = 1000;
-
Backburner.prototype = {
begin: function() {
var options = this.options;
@@ -404,8 +401,6 @@ Backburner.prototype = {
return fn;
}
- this._reinstallStalledTimerTimeout();
-
// find position to insert
var i = searchTimer(executeAt, this._timers);
@@ -600,21 +595,6 @@ Backburner.prototype = {
this._installTimerTimeout();
},
- _reinstallStalledTimerTimeout: function () {
- if (!this._timerTimeoutId) {
- return;
- }
- // if we have a timer we should always have a this._timerTimeoutId
- var minExpiresAt = this._timers[0];
- var delay = now() - minExpiresAt;
- // threshold of a second before we assume that the currently
- // installed timeout will not run, so we don't constantly reinstall
- // timeouts that are delayed but good still
- if (delay < TIMEOUT_STALLED_THRESHOLD) {
- return;
- }
- },
-
_reinstallTimerTimeout: function () {
this._clearTimerTimeout();
this._installTimerTimeout();
|
Remove dead code used for dropping stalled timeouts
|
diff --git a/pymatgen/analysis/chemenv/connectivity/connected_components.py b/pymatgen/analysis/chemenv/connectivity/connected_components.py
index <HASH>..<HASH> 100644
--- a/pymatgen/analysis/chemenv/connectivity/connected_components.py
+++ b/pymatgen/analysis/chemenv/connectivity/connected_components.py
@@ -285,10 +285,7 @@ class ConnectedComponent(MSONable):
if edge_data['delta'] == (0, 0, 0):
raise ValueError('There should not be self loops with delta image = (0, 0, 0).')
this_node_cell_img_vectors.append(edge_data['delta'])
- ndeltas = len(this_node_cell_img_vectors)
this_node_cell_img_vectors = get_linearly_independent_vectors(this_node_cell_img_vectors)
- if len(this_node_cell_img_vectors) != ndeltas:
- raise ValueError('There should not be self loops with the same (or opposite) delta image.')
# Here, we adopt a cutoff equal to the size of the graph, contrary to the default of networkX (size - 1),
# because otherwise, the all_simple_paths algorithm fail when the source node is equal to the target node.
paths = []
|
Fixed minor issue in connected_components.
|
diff --git a/lib/mongoid/slug/criterion.rb b/lib/mongoid/slug/criterion.rb
index <HASH>..<HASH> 100644
--- a/lib/mongoid/slug/criterion.rb
+++ b/lib/mongoid/slug/criterion.rb
@@ -83,7 +83,7 @@ module Mongoid
end
def for_slugs(slugs)
- where({ _slugs: { '$in' => slugs } })
+ where({ _slugs: { '$in' => slugs } }).limit(slugs.length)
end
def execute_or_raise_for_slugs(slugs, multi)
|
Limit the query in #find to at most the number of suppled params/slugs.
|
diff --git a/examples/v3arch/asyncore/agent/cmdrsp/multiple-usm-users.py b/examples/v3arch/asyncore/agent/cmdrsp/multiple-usm-users.py
index <HASH>..<HASH> 100644
--- a/examples/v3arch/asyncore/agent/cmdrsp/multiple-usm-users.py
+++ b/examples/v3arch/asyncore/agent/cmdrsp/multiple-usm-users.py
@@ -15,6 +15,7 @@
#
# $ snmpwalk -v3 -u usr-md5-des -l authPriv -A authkey1 -X privkey1 localhost .1.3.6
# $ snmpwalk -v3 -u usr-sha-none -l authNoPriv -a SHA -A authkey1 localhost .1.3.6
+# $ snmpwalk -v3 -u usr-sha-aes128 -l authPriv -a SHA -A authkey1 -x AES -X privkey1 localhost .1.3.6
#
from pysnmp.entity import engine, config
from pysnmp.entity.rfc3413 import cmdrsp, context
|
missing snmpwalk command added
|
diff --git a/app/services/foreman_ansible/ansible_report_importer.rb b/app/services/foreman_ansible/ansible_report_importer.rb
index <HASH>..<HASH> 100644
--- a/app/services/foreman_ansible/ansible_report_importer.rb
+++ b/app/services/foreman_ansible/ansible_report_importer.rb
@@ -18,6 +18,10 @@ module ForemanAnsible
partial_hostname_match(hostname)
end
+ def self.authorized_smart_proxy_features
+ super + ['Ansible']
+ end
+
def partial_hostname_match(hostname)
return @host unless @host.new_record?
hosts = Host.where(Host.arel_table[:name].matches("#{hostname}.%"))
|
Fixes #<I> - Ansible can submit ConfigReport's too
|
diff --git a/lib/tilelive/tile.js b/lib/tilelive/tile.js
index <HASH>..<HASH> 100644
--- a/lib/tilelive/tile.js
+++ b/lib/tilelive/tile.js
@@ -71,4 +71,12 @@ Tile.prototype.render = function(callback) {
);
};
+Tile.prototype.getMap = function(callback) {
+ Pool.acquire(this.type, this.datasource, this.options, function (err,map) {
+ if (err) throw err;
+ callback(null,map);
+ });
+};
+
+
module.exports = Tile;
|
expose a function to get the map for a given tile
|
diff --git a/acos_client/errors.py b/acos_client/errors.py
index <HASH>..<HASH> 100644
--- a/acos_client/errors.py
+++ b/acos_client/errors.py
@@ -131,3 +131,7 @@ class ACOSSystemNotReady(ACOSException):
class ACOSSystemIsBusy(ACOSException):
pass
+
+
+class LicenseOptionNotAllowed(ACOSException):
+ pass
diff --git a/acos_client/v30/responses.py b/acos_client/v30/responses.py
index <HASH>..<HASH> 100644
--- a/acos_client/v30/responses.py
+++ b/acos_client/v30/responses.py
@@ -223,6 +223,7 @@ RESPONSE_CODES = {
},
4294967295: {
'*': {
+ '/axapi/v3/glm': ae.LicenseOptionNotAllowed,
'*': ae.ConfigManagerNotReady
}
},
@@ -243,6 +244,7 @@ def raise_axapi_auth_error(response, method, api_url, headers):
def raise_axapi_ex(response, method, api_url):
+
if 'response' in response and 'err' in response['response']:
code = response['response']['err']['code']
|
Added error for scenario where a glm license option has been set but is not allowed by the license type
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -24,7 +24,7 @@ module.exports = {
const app = express();
const HOTE = 'localhost';
- const PORT = 10500;
+ const PORT = 9220;
/**
* Sur appel de l'URL /abc
|
[fix] duniter-ui should listen on port <I>
|
diff --git a/openvidu-server/docker/openvidu-health-checker/openvidu_helth_check.py b/openvidu-server/docker/openvidu-health-checker/openvidu_helth_check.py
index <HASH>..<HASH> 100644
--- a/openvidu-server/docker/openvidu-health-checker/openvidu_helth_check.py
+++ b/openvidu-server/docker/openvidu-health-checker/openvidu_helth_check.py
@@ -59,7 +59,7 @@ class InfraSmokeTests(unittest.TestCase):
video_error = False
try:
- self.driver.find_elements(By.XPATH, "//*[contains(text(), 'Stream playing')]")
+ self.driver.find_element(By.XPATH, "//*[contains(text(), 'Stream playing')]")
except:
video_error = True
finally:
|
deployment: find_element instead of find_elements in openvidu_health_check
|
diff --git a/lib/ronin/installation.rb b/lib/ronin/installation.rb
index <HASH>..<HASH> 100644
--- a/lib/ronin/installation.rb
+++ b/lib/ronin/installation.rb
@@ -96,8 +96,9 @@ module Ronin
if Installation.gems.empty?
# if there are no gems installed, do a raw Dir.glob
root_dir = File.expand_path(File.join(File.dirname(__FILE__),'..','..'))
+ directory = File.join(root_dir,directory)
- Dir.glob(File.join(root_dir,directory,'**/*.*'),&pass_path)
+ Dir.glob(File.join(directory,'**/*.*'),&pass_path)
else
# query the installed gems
Installation.gems.each do |name,gem|
|
Only pass back the found sub-paths from Installation.each_file.
|
diff --git a/app/models/fluentd/agent/td_agent.rb b/app/models/fluentd/agent/td_agent.rb
index <HASH>..<HASH> 100644
--- a/app/models/fluentd/agent/td_agent.rb
+++ b/app/models/fluentd/agent/td_agent.rb
@@ -36,6 +36,7 @@ class Fluentd
Bundler.with_clean_env do
spawn(cmd)
end
+ sleep 1 # NOTE/FIXME: too early return will be caused incorrect status report, "sleep 1" is a adhoc hack
end
end
end
|
Don't too quickly response of td-agent start/stop/restart
|
diff --git a/Classes/ViewHelpers/HtmlViewHelper.php b/Classes/ViewHelpers/HtmlViewHelper.php
index <HASH>..<HASH> 100644
--- a/Classes/ViewHelpers/HtmlViewHelper.php
+++ b/Classes/ViewHelpers/HtmlViewHelper.php
@@ -38,7 +38,8 @@ class Tx_HappyFeet_ViewHelpers_HtmlViewHelper extends \TYPO3\CMS\Fluid\ViewHelpe
* @param boolean $simulateTSFEinBackend
* @return string the parsed string.
*/
- public function render($parseFuncTSPath = 'lib.parseFunc_RTE', $simulateTSFEinBackend = false) {
+ public function render($parseFuncTSPath = 'lib.parseFunc_RTE', $simulateTSFEinBackend = false)
+ {
if (TYPO3_MODE === 'BE' && $simulateTSFEinBackend === true) {
$this->simulateFrontendEnvironment();
}
|
fix checkstyle warning "Opening brace should be on a new line"
|
diff --git a/data/handleDB.php b/data/handleDB.php
index <HASH>..<HASH> 100644
--- a/data/handleDB.php
+++ b/data/handleDB.php
@@ -1984,5 +1984,5 @@ class DbHandleApplication extends Application
}
}
-$application = new DbHandleApplication('Database handler for CompatInfo', '1.28.0');
+$application = new DbHandleApplication('Database handler for CompatInfo', '1.29.0');
$application->run();
|
Bump new version <I>
|
diff --git a/examples/benchmarks/json/cpu.py b/examples/benchmarks/json/cpu.py
index <HASH>..<HASH> 100755
--- a/examples/benchmarks/json/cpu.py
+++ b/examples/benchmarks/json/cpu.py
@@ -44,6 +44,10 @@ except:
def parse_time(_json_string, _iterations):
return float('inf')
+ @staticmethod
+ def version():
+ return 'unknown'
+
try:
from parsers import parsy_json
except:
@@ -53,6 +57,10 @@ except:
def parse_time(_json_string, _iterations):
return float('inf')
+ @staticmethod
+ def version():
+ return 'unknown'
+
try:
from parsers import pyleri_json
except:
@@ -62,6 +70,10 @@ except:
def parse_time(_json_string, _iterations):
return float('inf')
+ @staticmethod
+ def version():
+ return 'unknown'
+
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
DATA_JSON = os.path.relpath(os.path.join(SCRIPT_DIR, 'data.json'))
|
Added version to CPU benchmark stubs.
|
diff --git a/skyfield/timelib.py b/skyfield/timelib.py
index <HASH>..<HASH> 100644
--- a/skyfield/timelib.py
+++ b/skyfield/timelib.py
@@ -3,7 +3,7 @@ import datetime as dt_module
import re
from collections import namedtuple
from datetime import date, datetime
-from numpy import (array, concatenate, cos, float_, interp, isnan, nan,
+from numpy import (array, concatenate, cos, float_, int64, interp, isnan, nan,
ndarray, pi, rollaxis, searchsorted, sin, where, zeros_like)
from time import strftime, struct_time
from .constants import ASEC2RAD, B1950, DAY_S, T0, tau
@@ -559,7 +559,7 @@ class Time(object):
"""
second, sfr, is_leap_second = self._utc_seconds(offset)
- second = second.astype(int)
+ second = second.astype(int64)
second -= is_leap_second
jd, second = divmod(second + 12*60*60, 86400)
cutoff = self.ts.julian_calendar_cutoff
|
Fix new internal "UTC seconds" on <I> bit platforms
|
diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py
index <HASH>..<HASH> 100644
--- a/spyder/app/mainwindow.py
+++ b/spyder/app/mainwindow.py
@@ -1235,9 +1235,6 @@ class MainWindow(QMainWindow):
logger.info("Setting up window...")
self.setup_layout(default=False)
- if self.splash is not None:
- self.splash.hide()
-
# Enabling tear off for all menus except help menu
if CONF.get('main', 'tear_off_menus'):
for child in self.menuBar().children():
@@ -1354,6 +1351,12 @@ class MainWindow(QMainWindow):
if not self.ipyconsole._isvisible:
self.historylog.add_history(get_conf_path('history.py'))
+ # Process pending events and hide splash before loading the
+ # previous session.
+ QApplication.processEvents()
+ if self.splash is not None:
+ self.splash.hide()
+
if self.open_project:
self.projects.open_project(self.open_project)
else:
|
Main Window: Hide splash screen in post_visible_setup
This maintains the splash visible until the very last second before
loading the previous session.
|
diff --git a/internetarchive/item.py b/internetarchive/item.py
index <HASH>..<HASH> 100644
--- a/internetarchive/item.py
+++ b/internetarchive/item.py
@@ -337,6 +337,8 @@ class Item(object):
ignore_bucket=ignore_bucket)
request = Request('PUT', endpoint, headers=headers)
# TODO: Add support for multipart.
+ # `contextlib.closing()` is used to make StringIO work with
+ # `with` statement.
with closing(local_file) as data:
request.data = data.read()
prepped_request = request.prepare()
|
Added comment about why we are using `contextlib.closing()` in the `upload_file()` method (StringIO).
|
diff --git a/src/Illuminate/Database/Eloquent/Model.php b/src/Illuminate/Database/Eloquent/Model.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Database/Eloquent/Model.php
+++ b/src/Illuminate/Database/Eloquent/Model.php
@@ -332,6 +332,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
public static function clearBootedModels()
{
static::$booted = [];
+ static::$globalScopes = [];
}
/**
|
reset global scopes when booted models get cleared
|
diff --git a/hadoop/src/main/java/water/hadoop/h2odriver.java b/hadoop/src/main/java/water/hadoop/h2odriver.java
index <HASH>..<HASH> 100644
--- a/hadoop/src/main/java/water/hadoop/h2odriver.java
+++ b/hadoop/src/main/java/water/hadoop/h2odriver.java
@@ -138,7 +138,7 @@ public class h2odriver extends Configured implements Tool {
Thread.sleep(1000);
}
}
- catch (Exception _) {
+ catch (Exception e) {
}
finally {
if (! killed) {
diff --git a/hadoop/src/main/java/water/hadoop/h2omapper.java b/hadoop/src/main/java/water/hadoop/h2omapper.java
index <HASH>..<HASH> 100644
--- a/hadoop/src/main/java/water/hadoop/h2omapper.java
+++ b/hadoop/src/main/java/water/hadoop/h2omapper.java
@@ -78,9 +78,9 @@ public class h2omapper extends Mapper<Text, Text, Text, Text> {
try {
e.printStackTrace();
}
- catch (Exception _) {
+ catch (Exception e2) {
System.err.println("_context.write excepted in UserMain");
- _.printStackTrace();
+ e2.printStackTrace();
}
}
finally {
|
Rename swallowed exceptions to not be named _. Java 8 change.
No semantic change.
|
diff --git a/menu/Container.php b/menu/Container.php
index <HASH>..<HASH> 100644
--- a/menu/Container.php
+++ b/menu/Container.php
@@ -359,7 +359,7 @@ class Container extends \yii\base\Component implements ArrayAccess
if (empty($requestPath)) {
$home = $this->getHome();
if (!$home) {
- throw new Exception('Home item could not be found, have you forget to set a default page?');
+ throw new NotFoundHttpException('Home item could not be found, have you forget to set a default page?');
}
$requestPath = $home->alias;
}
@@ -470,7 +470,7 @@ class Container extends \yii\base\Component implements ArrayAccess
$lang = $this->getLanguage($langShortCode);
if (!$lang) {
- throw new Exception(sprintf("The requested language '%s' does not exist in language table", $langShortCode));
+ throw new NotFoundHttpException(sprintf("The requested language '%s' does not exist in language table", $langShortCode));
}
$data = $this->getNavData($lang['id']);
|
changed menu exception to NotFoundHttpException to hide informations
from api as those exception are not system errors.
|
diff --git a/bench.py b/bench.py
index <HASH>..<HASH> 100644
--- a/bench.py
+++ b/bench.py
@@ -29,7 +29,7 @@ def timed(fn):
start = time.time()
fn(*args, **kwargs)
times.append(time.time() - start)
- print fn.__name__, round(sum(times) / N, 3)
+ print(fn.__name__, round(sum(times) / N, 3))
return inner
def populate_register(n):
|
python 3 fix for bench.py
|
diff --git a/src/RouteConditionApplier.php b/src/RouteConditionApplier.php
index <HASH>..<HASH> 100644
--- a/src/RouteConditionApplier.php
+++ b/src/RouteConditionApplier.php
@@ -63,7 +63,18 @@ class RouteConditionApplier
public function getActions($action)
{
- return $this->actions[$action] ?? function(){};
+ if (array_key_exists($action, $this->actions)) {
+ return $this->actions[$action];
+ }
+
+ foreach ($this->actions as $pattern => $callback) {
+ if (Str::is($pattern, $action)) {
+ return $callback;
+ };
+ }
+
+ return function () {
+ };
}
/**
|
make controller actions be matched with patterns
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,6 @@ tests_require = [
'isort>=4.2.2',
'jsonresolver[jsonschema]>=0.2.1',
'pydocstyle>=2.0.0',
- 'pytest-cache>=1.0',
'pytest-cov>=1.8.0',
'pytest-pep8>=1.0.6',
'pytest>=2.8.0',
|
installation: removed pytest-cache dependency
|
diff --git a/tests/VatCalculatorTest.php b/tests/VatCalculatorTest.php
index <HASH>..<HASH> 100644
--- a/tests/VatCalculatorTest.php
+++ b/tests/VatCalculatorTest.php
@@ -921,6 +921,6 @@ class VatCalculatorTest extends PHPUnit
$vatCalculator = new VatCalculator();
$result = $vatCalculator->calculate($gross, $countryCode, $postalCode, $company, $type);
- $this->assertEquals(25.44, $result);
+ $this->assertEquals(26.16, $result);
}
}
|
Update VatCalculatorTest.php
|
diff --git a/tohu/base_NEW.py b/tohu/base_NEW.py
index <HASH>..<HASH> 100644
--- a/tohu/base_NEW.py
+++ b/tohu/base_NEW.py
@@ -176,13 +176,13 @@ class ClonedGenerator(TohuUltraBaseGenerator):
self.parent = parent
self.gen = parent.spawn(dependency_mapping=dict())
- def __repr__(self):
- return textwrap.dedent(f"""
- <ClonedGenerator (id={id(self)}):
- parent generator: {self.parent}
- internal clone: {self.gen}
- >
- """).strip()
+ def __format__(self, fmt):
+ if fmt == 'long':
+ return f'ClonedGenerator(parent={self.parent}) (id={self.tohu_id})'
+ elif fmt == '' or fmt == 'short':
+ return f'ClonedGenerator (id={self.tohu_id})'
+ else:
+ raise ValueError(f"Invalid format spec: '{fmt}'. Valid values are: 'short', 'long'")
def __next__(self):
return next(self.gen)
|
Tweak format method for ClonedGenerator (support short/long format)
|
diff --git a/src/kundera-cassandra/cassandra-pelops/src/test/java/com/impetus/kundera/query/KunderaQueryTest.java b/src/kundera-cassandra/cassandra-pelops/src/test/java/com/impetus/kundera/query/KunderaQueryTest.java
index <HASH>..<HASH> 100644
--- a/src/kundera-cassandra/cassandra-pelops/src/test/java/com/impetus/kundera/query/KunderaQueryTest.java
+++ b/src/kundera-cassandra/cassandra-pelops/src/test/java/com/impetus/kundera/query/KunderaQueryTest.java
@@ -143,7 +143,9 @@ public class KunderaQueryTest
}
catch (JPQLParseException e)
{
- Assert.fail();
+ Assert.assertEquals(
+ "Bad query format FROM clause is mandatory for SELECT queries. For details, see: http://openjpa.apache.org/builds/1.0.4/apache-openjpa-1.0.4/docs/manual/jpa_langref.html#jpa_langref_bnf",
+ e.getMessage());
}
try
{
|
fixed testcases for jpql expression query
|
diff --git a/test/Select-test.js b/test/Select-test.js
index <HASH>..<HASH> 100644
--- a/test/Select-test.js
+++ b/test/Select-test.js
@@ -2051,8 +2051,6 @@ describe('Select', () => {
{ value: 'four', label: 'Four' }
];
- onChange.reset();
-
// Render an instance of the component
wrapper = createControlWithWrapper({
value: '',
|
Don't need to reset onChange spy
|
diff --git a/sksurv/__init__.py b/sksurv/__init__.py
index <HASH>..<HASH> 100644
--- a/sksurv/__init__.py
+++ b/sksurv/__init__.py
@@ -2,6 +2,6 @@ from pkg_resources import get_distribution, DistributionNotFound
try:
__version__ = get_distribution('scikit-survival').version
-except DistributionNotFound:
+except DistributionNotFound: # pragma: no cover
# package is not installed
__version__ = 'unknown'
|
Exclude unknown __version__ from coverage
|
diff --git a/backtrader/brokers/bbroker.py b/backtrader/brokers/bbroker.py
index <HASH>..<HASH> 100644
--- a/backtrader/brokers/bbroker.py
+++ b/backtrader/brokers/bbroker.py
@@ -476,7 +476,7 @@ class BackBroker(bt.BrokerBase):
def _ocoize(self, order, oco):
oref = order.ref
if oco is None:
- self._ocos[oref] = None # no parent
+ self._ocos[oref] = oref # current order is parent
self._ocol[oref].append(oref) # create ocogroup
else:
ocoref = self._ocos[oco.ref] # ref to group leader
|
Fix OCO child order cancel (#<I>)
|
diff --git a/src/Route.php b/src/Route.php
index <HASH>..<HASH> 100644
--- a/src/Route.php
+++ b/src/Route.php
@@ -320,7 +320,9 @@ class Route {
$getModified = true;
}
}
- $this->path = rtrim($this->path, '/');
+ if ($this->path != '/') {
+ $this->path = rtrim($this->path, '/');
+ }
$this->get = $_GET;
}
|
let root keep trailing (only) forward slash
|
diff --git a/internal/lang/funcs/crypto.go b/internal/lang/funcs/crypto.go
index <HASH>..<HASH> 100644
--- a/internal/lang/funcs/crypto.go
+++ b/internal/lang/funcs/crypto.go
@@ -248,6 +248,7 @@ func makeFileHashFunction(baseDir string, hf func() hash.Hash, enc func([]byte)
if err != nil {
return cty.UnknownVal(cty.String), err
}
+ defer f.Close()
h := hf()
_, err = io.Copy(h, f)
diff --git a/internal/lang/funcs/filesystem.go b/internal/lang/funcs/filesystem.go
index <HASH>..<HASH> 100644
--- a/internal/lang/funcs/filesystem.go
+++ b/internal/lang/funcs/filesystem.go
@@ -377,6 +377,7 @@ func readFileBytes(baseDir, path string) ([]byte, error) {
}
return nil, err
}
+ defer f.Close()
src, err := ioutil.ReadAll(f)
if err != nil {
|
funcs: defer close file in funcs
Files opened by these two functions were not being closed,
leaking file descriptors. Close files that were opened when the
function exist.
|
diff --git a/src/utils.js b/src/utils.js
index <HASH>..<HASH> 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -17,10 +17,10 @@ function getCollatorComparator() {
function sortCompare(order) {
return (a, b) => {
- if (a.data === null) a.data = '';
- if (b.data === null) b.data = '';
+ var aData = (a.data === null || typeof a.data === 'undefined') ? '' : a.data;
+ var bData = (b.data === null || typeof b.data === 'undefined') ? '' : b.data;
return (
- (typeof a.data.localeCompare === 'function' ? a.data.localeCompare(b.data) : a.data - b.data) *
+ (typeof aData.localeCompare === 'function' ? aData.localeCompare(bData) : aData - bData) *
(order === 'asc' ? 1 : -1)
);
};
|
fix sort error (#<I>)
|
diff --git a/usr/share/lib/img_proof/tests/SLES/conftest.py b/usr/share/lib/img_proof/tests/SLES/conftest.py
index <HASH>..<HASH> 100644
--- a/usr/share/lib/img_proof/tests/SLES/conftest.py
+++ b/usr/share/lib/img_proof/tests/SLES/conftest.py
@@ -511,7 +511,8 @@ BASE_15_SP4_HPC = [
if 'Python2' not in repo
]
SLE_15_SP4_X86_64_MODULES = [
- repo.replace('SP3', 'SP4') for repo in SLE_15_SP3_X86_64_MODULES
+ repo.replace('SP3', 'SP4') for repo in SLE_15_SP3_X86_64_MODULES \
+ if 'CAP' not in repo
]
PYTHON3_MODULE = [
|
Update repo test for <I> SP4
- CAP has been dropped as a product and the related module that provided tools
in SLES is no longer released.
|
diff --git a/lib/copymitter.js b/lib/copymitter.js
index <HASH>..<HASH> 100644
--- a/lib/copymitter.js
+++ b/lib/copymitter.js
@@ -143,7 +143,7 @@
fs.stat(from, function(error, stat) {
if (!is(error))
fs.unlink(to, function(error) {
- if (error && /^E(ISDIR|NOENT$)/.test(error.code))
+ if (error && !/^E(ISDIR|NOENT)$/.test(error.code))
fn(error);
else
make(stat.mode);
|
fix(copymitter) unlink: regexp
|
diff --git a/src/request/Uri.php b/src/request/Uri.php
index <HASH>..<HASH> 100644
--- a/src/request/Uri.php
+++ b/src/request/Uri.php
@@ -26,6 +26,7 @@ declare(strict_types=1);
namespace froq\http\request;
+use froq\util\Arrays;
use froq\common\interfaces\Stringable;
use froq\collection\ComponentCollection;
use froq\http\request\UriException;
@@ -65,7 +66,7 @@ final class Uri extends ComponentCollection implements Stringable
public function __construct(string $source)
{
// Set component names.
- parent::__construct(['scheme', 'host', 'port', 'user', 'pass', 'path', 'query', 'fragment']);
+ parent::__construct(['path', 'query', 'fragment']);
$this->source = $source;
@@ -74,9 +75,14 @@ final class Uri extends ComponentCollection implements Stringable
throw new UriException('Invalid URI source');
}
+ // Use self component names only.
+ $components = Arrays::include($components, $this->names());
+
foreach ($components as $name => $value) {
$this->set($name, $value);
}
+
+ // Lock.
$this->readOnly(true);
}
|
request.Uri: drop non-used components.
|
diff --git a/src/commands/helpers/defaultPrompt.js b/src/commands/helpers/defaultPrompt.js
index <HASH>..<HASH> 100644
--- a/src/commands/helpers/defaultPrompt.js
+++ b/src/commands/helpers/defaultPrompt.js
@@ -3,23 +3,23 @@
*/
export default [{
type: 'input',
- name: 'rocAppName',
- message: 'What\'s the name of your application?',
- default: 'my-roc-app',
+ name: 'rocName',
+ message: 'What\'s the name of your project?',
+ default: 'my-roc-project',
filter: (input) => input.toLowerCase().split(' ').join('-')
}, {
type: 'input',
- name: 'rocAppDesc',
- message: 'What\'s the description for the application?',
- default: 'My Roc Application'
+ name: 'rocDescription',
+ message: 'What\'s the description for the project?',
+ default: 'My Roc Project'
}, {
type: 'input',
- name: 'rocAppAuthor',
- message: 'Who\'s the author of the application?',
+ name: 'rocAuthor',
+ message: 'Who\'s the author of the project?',
default: 'John Doe'
}, {
type: 'input',
- name: 'rocAppLicense',
- message: 'What\'s the license for the application?',
+ name: 'rocLicense',
+ message: 'What\'s the license for the project?',
default: 'MIT'
}];
|
Renamed the default variable names for templates and better text
|
diff --git a/config.php b/config.php
index <HASH>..<HASH> 100644
--- a/config.php
+++ b/config.php
@@ -34,7 +34,6 @@ return [
],
'services' => [
'database' => ConnectionManager::class,
- 'errors' => ErrorStack::class,
'model_driver' => ModelDriver::class,
'auth' => Auth::class,
'mailer' => MailerService::class,
|
remove deprecated error stack service from test bench
|
diff --git a/theanets/feedforward.py b/theanets/feedforward.py
index <HASH>..<HASH> 100644
--- a/theanets/feedforward.py
+++ b/theanets/feedforward.py
@@ -284,7 +284,7 @@ class Network(object):
k = len(self.layers) // 2
encode = np.asarray(self.layers[:k])
decode = np.asarray(self.layers[k+1:])
- assert np.allclose(encode - decode[::-1], 0), error
+ assert (encode == decode[::-1]).all(), error
sizes = self.layers[:k+1]
return sizes
|
Use equality with all() for palindrome check.
|
diff --git a/ReactNativeClient/lib/components/screens/config.js b/ReactNativeClient/lib/components/screens/config.js
index <HASH>..<HASH> 100644
--- a/ReactNativeClient/lib/components/screens/config.js
+++ b/ReactNativeClient/lib/components/screens/config.js
@@ -447,7 +447,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
if (this.state.profileExportStatus === 'prompt') {
const profileExportPrompt = (
- <View style={this.styles().settingContainer}>
+ <View style={this.styles().settingContainer} key="profileExport">
<Text style={this.styles().settingText}>Path:</Text>
<TextInput style={{ ...this.styles().textInput, paddingRight: 20 }} onChange={(event) => this.setState({ profileExportPath: event.nativeEvent.text })} value={this.state.profileExportPath} placeholder="/path/to/sdcard" keyboardAppearance={theme.keyboardAppearance}></TextInput>
<Button title="OK" onPress={this.exportProfileButtonPress2_}></Button>
|
Mobile: Dev fix: Add missing key
|
diff --git a/extensions/DOMAPI/DOMAPI.moonshine.js b/extensions/DOMAPI/DOMAPI.moonshine.js
index <HASH>..<HASH> 100644
--- a/extensions/DOMAPI/DOMAPI.moonshine.js
+++ b/extensions/DOMAPI/DOMAPI.moonshine.js
@@ -28,7 +28,8 @@
mt = new shine.Table({
__index: function (t, key) {
- var property = obj[key];
+ var property = obj[key],
+ i, children, child;
// Bind methods to object and convert args and return values
if (typeof property == 'function' || (property && property.prototype && typeof property.prototype.constructor == 'function')) { // KLUDGE: Safari reports native constructors as objects, not functions :-s
@@ -40,6 +41,15 @@
return [retval];
};
+ // Add static methods, etc
+ if (Object.getOwnPropertyNames) {
+ children = Object.getOwnPropertyNames(property);
+
+ for (i = 0; child = children[i]; i++) {
+ f[child] = property[child];
+ }
+ }
+
// Add a new method for instantiating classes
f.new = function () {
var args = convertArguments(arguments, luaToJS),
|
Fix to add constructors' static methods to proxy functions.
|
diff --git a/namedstruct/namedstruct.py b/namedstruct/namedstruct.py
index <HASH>..<HASH> 100644
--- a/namedstruct/namedstruct.py
+++ b/namedstruct/namedstruct.py
@@ -1771,8 +1771,8 @@ class nstruct(typedef):
lastinline_properties = []
seqs = []
endian = arguments.get('endian', '>')
- if not members and self.base is None and self.sizefunc is None:
- raise ValueError('Struct cannot be empty')
+ if not members:
+ self.inlineself = False
mrest = len(members)
for m in members:
mrest -= 1
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ except:
pass
from setuptools import setup, find_packages
-VERSION = '1.0.0'
+VERSION = '1.0.1'
setup(name='nstruct',
version=VERSION,
|
BUG FIX: allow empty structs, automatically set inline = False
|
diff --git a/chirptext/leutile.py b/chirptext/leutile.py
index <HASH>..<HASH> 100755
--- a/chirptext/leutile.py
+++ b/chirptext/leutile.py
@@ -135,10 +135,13 @@ class Counter(PythonCounter):
order_list.append([x, self[x]])
return order_list
- def summarise(self, report=None, byfreq=True):
+ def summarise(self, report=None, byfreq=True, limit=None):
if not report:
report = TextReport()
- for k, v in self.get_report_order():
+ items = self.most_common() if byfreq else self.get_report_order()
+ if limit:
+ items = items[:limit]
+ for k, v in items:
report.writeline("%s: %d" % (k, v))
def group_by_count(self):
|
fixed: byfreq doesn't work in Counter.summarise(). added kwarg limit
|
diff --git a/features/support/custom_main.rb b/features/support/custom_main.rb
index <HASH>..<HASH> 100644
--- a/features/support/custom_main.rb
+++ b/features/support/custom_main.rb
@@ -6,7 +6,11 @@ require 'stringio'
class CustomMain
def initialize(argv, stdin, stdout, stderr, kernel)
- @argv, @stdin, @stdout, @stderr, @kernel = argv, stdin, stdout, stderr, kernel
+ @argv = argv
+ @stdin = stdin
+ @stdout = stdout
+ @stderr = stderr
+ @kernel = kernel
end
def execute!
diff --git a/lib/aruba/api.rb b/lib/aruba/api.rb
index <HASH>..<HASH> 100644
--- a/lib/aruba/api.rb
+++ b/lib/aruba/api.rb
@@ -1087,7 +1087,8 @@ module Aruba
class Announcer
def initialize(session, options = {})
- @session, @options = session, options
+ @session = session
+ @options = options
end
def stdout(content)
|
Fixed offenses for Performance/ParallelAssignment
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ setup(
tests_require=[
"Django>=1.7",
"django-reversion>=1.8.1",
- "pinax-invitations>=4.0.0",
+ "pinax-invitations>=4.0.1",
"unicode-slugify>=0.1.1",
"Pillow>=2.3.0",
"django-user-accounts>=1.3",
@@ -32,7 +32,7 @@ setup(
install_requires=[
"Django>=1.7",
"django-reversion>=1.8.1",
- "pinax-invitations>=4.0.0",
+ "pinax-invitations>=4.0.1",
"unicode-slugify>=0.1.1",
"Pillow>=2.3.0",
"django-user-accounts>=1.3",
|
Bump to corrected pinax-invitations
|
diff --git a/salt/states/pip_state.py b/salt/states/pip_state.py
index <HASH>..<HASH> 100644
--- a/salt/states/pip_state.py
+++ b/salt/states/pip_state.py
@@ -327,7 +327,7 @@ def installed(name,
ret['comment'] = ' '.join(comments)
else:
if not prefix:
- pkg_list = []
+ pkg_list = {}
else:
pkg_list = __salt__['pip.list'](
prefix, bin_env, user=user, cwd=cwd
|
despite the name, pkg_list is a dict; initialize accordingly
|
diff --git a/Core/Router/Router.php b/Core/Router/Router.php
index <HASH>..<HASH> 100755
--- a/Core/Router/Router.php
+++ b/Core/Router/Router.php
@@ -96,7 +96,7 @@ class Router extends \AltoRouter implements \ArrayAccess
*
* @see \AltoRouter::generate()
*/
- public function generate(string $routeName, array $params = [])
+ public function generate($routeName, array $params = array())
{
$url = parent::generate($routeName, $params);
|
Corrects signature of generate() to match with parent class
|
diff --git a/spyder/plugins/variableexplorer/plugin.py b/spyder/plugins/variableexplorer/plugin.py
index <HASH>..<HASH> 100644
--- a/spyder/plugins/variableexplorer/plugin.py
+++ b/spyder/plugins/variableexplorer/plugin.py
@@ -37,7 +37,7 @@ dependencies.add("pympler", "pympler",
_("Development tool to measure, monitor and analyze the"
" memory behavior of Python objects in a running Python"
" application."),
- required_version=NUMPY_REQVER, optional=True)
+ required_version=PYMPLER_REQVER, optional=True)
class VariableExplorer(SpyderPluginWidget):
|
PR: Correct Pimpler REQVER
Correct PR #<I> error
|
diff --git a/jsftp.js b/jsftp.js
index <HASH>..<HASH> 100644
--- a/jsftp.js
+++ b/jsftp.js
@@ -492,7 +492,7 @@ var Ftp = module.exports = function(cfg) {
// 'STAT' command. We use 'LIST' instead.
if (err && data.code === 502)
self.list(filePath, function(err, data) {
- entriesToList(err, data.text)
+ entriesToList(err, data)
});
else
entriesToList(err, data.text);
|
Fixed bug in 'list' command fallback in ls method.
|
diff --git a/src/ai/backend/common/types.py b/src/ai/backend/common/types.py
index <HASH>..<HASH> 100644
--- a/src/ai/backend/common/types.py
+++ b/src/ai/backend/common/types.py
@@ -18,6 +18,8 @@ import uuid
import attr
+from .docker import ImageRef
+
__all__ = (
'aobject',
'DeviceId',
@@ -580,6 +582,7 @@ class KernelCreationConfig(TypedDict):
environ: Mapping[str, str]
mounts: Sequence[str] # list of mount expressions
mount_map: Mapping[str, str] # Mapping of vfolder custom mount path
+ package_directory: Sequence[str]
idle_timeout: int
bootstrap_script: Optional[str]
startup_command: Optional[str]
|
Add package_directory to KernelCreationConfig
|
diff --git a/code/forms/GridFieldSortableRows.php b/code/forms/GridFieldSortableRows.php
index <HASH>..<HASH> 100644
--- a/code/forms/GridFieldSortableRows.php
+++ b/code/forms/GridFieldSortableRows.php
@@ -119,7 +119,7 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
$headerState = $gridField->State->GridFieldSortableHeader;
$state = $gridField->State->GridFieldSortableRows;
if ((!is_bool($state->sortableToggle) || $state->sortableToggle==false) && $headerState && !empty($headerState->SortColumn)) {
- return $dataList->sort($this->sortColumn);
+ return $dataList->sort($headerState->SortColumn);
}
if ($state->sortableToggle == true) {
@@ -676,4 +676,4 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
}
}
}
-?>
\ No newline at end of file
+?>
|
Use Sort of GridField Header (#<I>)
When not in 'Drag&Drop reordering' mode ('sortableToggle' is false) and a SortColumn is set by GridField's header, this last one should be used; otherwise, when the user clicks on a sortable header, the list is reloaded and the header shows a up/down sorting arrow, but this doesn't reflect the actual sorting.
|
diff --git a/tests/iacli/test_ia_search.py b/tests/iacli/test_ia_search.py
index <HASH>..<HASH> 100644
--- a/tests/iacli/test_ia_search.py
+++ b/tests/iacli/test_ia_search.py
@@ -15,8 +15,8 @@ def test_ia_search():
stdout, stderr = proc.communicate()
assert proc.returncode == 0
- cmd = 'ia search iacli-test-item --number-found'
+ cmd = 'ia search "identifier:iacli-test-item" --number-found'
proc = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE)
stdout, stderr = proc.communicate()
- assert stdout == '2\n'
+ assert stdout == '1\n'
assert proc.returncode == 0
|
Fixed search query to return an expected number of results found.
|
diff --git a/vext/install/__init__.py b/vext/install/__init__.py
index <HASH>..<HASH> 100644
--- a/vext/install/__init__.py
+++ b/vext/install/__init__.py
@@ -18,7 +18,7 @@ DEFAULT_PTH_CONTENT = """\
#
# Lines beginning with 'import' are executed, so import sys to get
# going.
-import os; import sys; exec("try:\n from vext.gatekeeper import install_importer;install_importer()\nexcept:sys.stderr.write('An error occured while enabling VEXT'); raise;")
+import os; from vext.gatekeeper import install_importer; install_importer()
"""
|
Another attempt at updating the pth
|
diff --git a/src/views/pages-manage/edit.php b/src/views/pages-manage/edit.php
index <HASH>..<HASH> 100644
--- a/src/views/pages-manage/edit.php
+++ b/src/views/pages-manage/edit.php
@@ -75,7 +75,9 @@ $form = \yii\bootstrap\ActiveForm::begin([
'ajax' => [
'url' => $url,
'dataType' => 'json',
- 'data' => new JsExpression('function(params) { return {q:params.term}; }')
+ 'data' => new JsExpression('function(params) { return {q:params.term}; }'),
+ 'delay' => '400',
+ 'error' => new JsExpression('function(error) {alert(error.responseText);}'),
],
'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
'templateResult' => new JsExpression('function(parent) { return parent.text; }'),
|
some features
* added an alert with error message
* added a delay before ajax request
|
diff --git a/src/search/QuickOpen.js b/src/search/QuickOpen.js
index <HASH>..<HASH> 100644
--- a/src/search/QuickOpen.js
+++ b/src/search/QuickOpen.js
@@ -950,7 +950,7 @@ define(function (require, exports, module) {
exports.addQuickOpenPlugin = addQuickOpenPlugin;
exports.highlightMatch = highlightMatch;
- // accessing these from this module will ultimately be deprecated
+ // Convenience exports for functions that most QuickOpen plugins would need.
exports.stringMatch = StringMatch.stringMatch;
exports.SearchResult = StringMatch.SearchResult;
exports.basicMatchSort = StringMatch.basicMatchSort;
|
Add clarifying comment for re-exported StringMatch functions in Quick Open.
|
diff --git a/styleguide.config.js b/styleguide.config.js
index <HASH>..<HASH> 100644
--- a/styleguide.config.js
+++ b/styleguide.config.js
@@ -1,5 +1,4 @@
-``const path = require('path');
-
+const path = require('path');
const isProd = process.env.NODE_ENV === 'production';
const webpackConfig = isProd ?
require('./webpack.config.base.js') :
|
Removed rogue quotes breaking build
|
diff --git a/bin/dbs3DASAccess.py b/bin/dbs3DASAccess.py
index <HASH>..<HASH> 100755
--- a/bin/dbs3DASAccess.py
+++ b/bin/dbs3DASAccess.py
@@ -29,7 +29,7 @@ api_call_name = das_query.keys()[0]
api_call = getattr(api, api_call_name)
query = das_query[api_call_name]
-timing = {'stats':{'query' : str(query), 'api' : api_call_name}}
+timing = {'stats':{'query' : str(query).replace(' ', '+'), 'api' : api_call_name}}
with TimingStat(timing, stat_client) as timer:
result = api_call(**das_query[api_call_name])
|
Bug fix insert query dicts to sqlite
|
diff --git a/misc/plugin/makerss.rb b/misc/plugin/makerss.rb
index <HASH>..<HASH> 100644
--- a/misc/plugin/makerss.rb
+++ b/misc/plugin/makerss.rb
@@ -104,7 +104,7 @@ class MakeRssFull
def file
f = @conf['makerss.file'] || 'index.rdf'
f = 'index.rdf' if f.empty?
- f
+ "#{TDiary.document_root}/#{f}"
end
def writable?
|
puts rss file to the public directory if the Rack environment
|
diff --git a/src/configure-webpack/loaders/javascript.js b/src/configure-webpack/loaders/javascript.js
index <HASH>..<HASH> 100644
--- a/src/configure-webpack/loaders/javascript.js
+++ b/src/configure-webpack/loaders/javascript.js
@@ -27,7 +27,7 @@ export default {
// Disables ES6 module transformation
// which Webpack2 can understand
- modules: false,
+ modules: action === actions.TEST_UNIT ? 'commonjs' : false,
targets: {
// Unfortunately we are bound to what UglifyJS
|
Transplile modules to commonjs while running the tests to fix inject-loader support
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -43,10 +43,11 @@ module.exports = function createReaddirStream (dir, opts) {
}
stream.files.forEach(function (fp, idx) {
- stream.push(new utils.File({
+ var config = utils.extend(opts, {
cwd: opts.cwd,
path: path.join(dir, fp)
- }))
+ })
+ stream.push(new utils.File(config))
if ((idx + 1) === stream.files.length) {
stream.push(null)
|
fix(index.js): allow passing options/config to each Vinyl file which is created
|
diff --git a/kaybee/plugins/articles/author.py b/kaybee/plugins/articles/author.py
index <HASH>..<HASH> 100644
--- a/kaybee/plugins/articles/author.py
+++ b/kaybee/plugins/articles/author.py
@@ -4,4 +4,6 @@ from kaybee.plugins.articles.base_article_reference import BaseArticleReference
@kb.resource('author')
class Author(BaseArticleReference):
- pass
+ def headshot_thumbnail(self, usage):
+ prop = self.find_prop_item('images', 'usage', usage)
+ return prop.filename
|
chg: usr: Make it easier to get an author's headshot.
|
diff --git a/middleman-core/lib/middleman-core/extension.rb b/middleman-core/lib/middleman-core/extension.rb
index <HASH>..<HASH> 100644
--- a/middleman-core/lib/middleman-core/extension.rb
+++ b/middleman-core/lib/middleman-core/extension.rb
@@ -81,7 +81,7 @@ module Middleman
end
end
- protected
+ private
def setup_options(options_hash)
@options = self.class.config.dup
@@ -151,7 +151,6 @@ module Middleman
end
end
end
-
end
end
end
|
Extension setup methods should be private, not protected
|
diff --git a/bigchaindb/commands/utils.py b/bigchaindb/commands/utils.py
index <HASH>..<HASH> 100644
--- a/bigchaindb/commands/utils.py
+++ b/bigchaindb/commands/utils.py
@@ -151,6 +151,10 @@ base_parser.add_argument('-c', '--config',
help='Specify the location of the configuration file '
'(use "-" for stdout)')
+base_parser.add_argument('-l', '--log-level',
+ choices=['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'],
+ help='Log level')
+
base_parser.add_argument('-y', '--yes', '--yes-please',
action='store_true',
help='Assume "yes" as answer to all prompts and run '
|
Add log-level option for all CLI commands
|
diff --git a/go/engine/common_test.go b/go/engine/common_test.go
index <HASH>..<HASH> 100644
--- a/go/engine/common_test.go
+++ b/go/engine/common_test.go
@@ -30,7 +30,7 @@ func NewFakeUser(prefix string) (fu *FakeUser, err error) {
return
}
username := fmt.Sprintf("%s_%s", prefix, hex.EncodeToString(buf))
- email := fmt.Sprintf("%s@email.com", username)
+ email := fmt.Sprintf("%s@noemail.keybase.io", username)
buf = make([]byte, 12)
if _, err = rand.Read(buf); err != nil {
return
|
don't send email to @email.com
|
diff --git a/mpd/tests.py b/mpd/tests.py
index <HASH>..<HASH> 100755
--- a/mpd/tests.py
+++ b/mpd/tests.py
@@ -685,14 +685,13 @@ class TestMPDClient(unittest.TestCase):
# MPD client tests which do not mock the socket, but rather replace it
# with a real socket from a socket
+@unittest.skipIf(not hasattr(socket, "socketpair"),
+ "Socketpair is not supported on this platform")
class TestMPDClientSocket(unittest.TestCase):
longMessage = True
def setUp(self):
- if not hasattr(socket, "socketpair"):
- self.skipTest("Socketpair is not supported on this platform")
-
self.connect_patch = mock.patch("mpd.MPDClient._connect_unix")
self.connect_mock = self.connect_patch.start()
|
Use decorator for conditionally skipping socketpair tests
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -15,9 +15,9 @@ from setuptools import setup
packages = ['textblob_de']
if sys.version_info[0] == 2:
- requires = ["textblob>=0.8.0"]
-else:
requires = ["textblob>=0.8.0", "pattern>=2.6.0"]
+else:
+ requires = ["textblob>=0.8.0"]
PUBLISH_CMD = "python setup.py register sdist bdist_wheel upload"
TEST_PUBLISH_CMD = 'python setup.py register -r test sdist bdist_wheel upload -r test'
|
corrected Py2/3 requirements in setup.py
|
diff --git a/spec/node-spec.js b/spec/node-spec.js
index <HASH>..<HASH> 100644
--- a/spec/node-spec.js
+++ b/spec/node-spec.js
@@ -336,7 +336,7 @@ describe('node feature', () => {
})
it('includes the electron version in process.versions', () => {
- assert(/^\d+\.\d+\.\d+$/.test(process.versions.electron))
+ assert(/^\d+\.\d+\.\d+(\S)?$/.test(process.versions.electron))
})
it('includes the chrome version in process.versions', () => {
|
:construction_worker: Fix the spec
|
diff --git a/test/example-test.js b/test/example-test.js
index <HASH>..<HASH> 100644
--- a/test/example-test.js
+++ b/test/example-test.js
@@ -366,7 +366,7 @@ helpers.makeTests("can-component examples", function(doc) {
});
var viewModel = new SimulatedScope();
- var renderer = stache("<grid deferreddata:bind='viewModel.deferredData'>" +
+ var renderer = stache("<grid deferreddata:bind='viewModel.deferredData()'>" +
"{{#each items}}" +
"<tr>" +
"<td width='40%'>{{first}}</td>" +
|
Fix deferred grid test
<I> doesn’t automatically call functions in `bind`
|
diff --git a/ldapcherry/__init__.py b/ldapcherry/__init__.py
index <HASH>..<HASH> 100644
--- a/ldapcherry/__init__.py
+++ b/ldapcherry/__init__.py
@@ -677,7 +677,7 @@ class LdapCherry(object):
key = self.attributes.get_key()
username = params['attrs'][key]
sess = cherrypy.session
- admin = sess.get(SESSION_KEY, None)
+ admin = sess.get(SESSION_KEY, 'unknown')
cherrypy.log.error(
msg="user '" + username + "' added by '" + admin + "'",
@@ -774,7 +774,7 @@ class LdapCherry(object):
)
sess = cherrypy.session
- admin = sess.get(SESSION_KEY, None)
+ admin = sess.get(SESSION_KEY, 'unknown')
cherrypy.log.error(
msg="user '" + username + "' modified by '" + admin + "'",
@@ -860,7 +860,7 @@ class LdapCherry(object):
def _deleteuser(self, username):
sess = cherrypy.session
- admin = sess.get(SESSION_KEY, None)
+ admin = sess.get(SESSION_KEY, 'unknown')
for b in self.backends:
try:
|
fixing log errors in auth "none" mode
replacing None by unknown as a default value in order to avoid
error in generating log msg because None is not a string
|
diff --git a/lib/Rx/Observable/BaseObservable.php b/lib/Rx/Observable/BaseObservable.php
index <HASH>..<HASH> 100644
--- a/lib/Rx/Observable/BaseObservable.php
+++ b/lib/Rx/Observable/BaseObservable.php
@@ -524,9 +524,9 @@ abstract class BaseObservable implements ObservableInterface
/**
* @return \Rx\Observable\AnonymousObservable
*/
- public function never()
+ public static function never()
{
- return $this->lift(new NeverOperator());
+ return (new EmptyObservable())->lift(new NeverOperator());
}
/**
|
changed never to static on BaseObservable
|
diff --git a/tests/unit/components/compiler-test.js b/tests/unit/components/compiler-test.js
index <HASH>..<HASH> 100644
--- a/tests/unit/components/compiler-test.js
+++ b/tests/unit/components/compiler-test.js
@@ -20,3 +20,11 @@ test('precompile disabled flags', function(assert) {
assert.equal(this.$().text().trim(), '');
});
+
+test('precompile else block', function(assert) {
+ this.render(hbs`
+ {{#if-flag-ENABLE_BAR}}Bar{{else}}Baz{{/if-flag-ENABLE_BAR}}
+ `);
+
+ assert.equal(this.$().text().trim(), 'Baz');
+});
|
Add test for {{else}} block
|
diff --git a/src/Brendt/Stitcher/Parser/YamlParser.php b/src/Brendt/Stitcher/Parser/YamlParser.php
index <HASH>..<HASH> 100644
--- a/src/Brendt/Stitcher/Parser/YamlParser.php
+++ b/src/Brendt/Stitcher/Parser/YamlParser.php
@@ -26,7 +26,7 @@ class YamlParser extends AbstractArrayParser
}
public function parse($path = '*.yml') {
- if (!strpos($path, '.yml')) {
+ if (!strpos($path, '.yml') && !strpos($path, '.yaml')) {
$path .= '.yml';
}
|
Add .yaml check as fallback extension in YamlParser
|
diff --git a/versionner/version.py b/versionner/version.py
index <HASH>..<HASH> 100644
--- a/versionner/version.py
+++ b/versionner/version.py
@@ -63,7 +63,7 @@ class Version:
"""
if field not in self.VALID_UP_FIELDS:
- raise ValueError("Incorrect value of \"type\"")
+ raise ValueError("Invalid field: %s" % field)
if not value:
value = 1
|
changed (unified) error mesage on incorrect field
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -44,18 +44,25 @@ function CacheModule(cacheItem) {
return cacheItem.map;
};
source.node = function() {
- n = SourceNode.fromStringWithSourceMap(
+ var node = SourceNode.fromStringWithSourceMap(
cacheItem.source,
new SourceMapConsumer(cacheItem.map)
);
- // Rehydrate source keys
- var sources = Object.keys(n.sourceContents);
+ // Rehydrate source keys, webpack 1 uses source-map 0.4 which needs an
+ // appended $. webpack 2 uses source-map 0.5 which may append $. Either way
+ // setSourceContent will provide the needed behaviour. This is pretty round
+ // about and ugly but this is less prone to failure than trying to determine
+ // whether we're in webpack 1 or 2 and if they are using webpack-core or
+ // webpack-sources and the version of source-map in that.
+ var setSourceContent = new RawModule('').source().node().setSourceContent;
+ var sources = Object.keys(node.sourceContents);
for (var i = 0; i < sources.length; i++) {
var key = sources[i];
- n.sourceContents['$' + key] = n.sourceContents[key];
- delete n.sourceContents[key];
+ var content = node.sourceContents[key];
+ delete node.sourceContents[key];
+ setSourceContent.call(node, key, content);
}
- return n;
+ return node;
};
source.listMap = function() {
return fromStringWithSourceMap(cacheItem.source, cacheItem.map);
|
Improve source content key hydration
webpack 1 and 2 depend on different source-map versions which have
different source content name behaviour. To resolve this when
rehydrating the SourceNode for the Source.node method we reach into
RawModule's returned RawSource instance which will come from
webpack-core for webpack 1 and webpack-sources for webpack 2. We can
then get a SourceNode from RawSource and steal SourceNode's
setSourceContent function which will perform the right rehydration
behaviour for the active version of webpack.
|
diff --git a/tests/Go/Aop/Framework/ClosureStaticMethodInvocationTest.php b/tests/Go/Aop/Framework/ClosureStaticMethodInvocationTest.php
index <HASH>..<HASH> 100644
--- a/tests/Go/Aop/Framework/ClosureStaticMethodInvocationTest.php
+++ b/tests/Go/Aop/Framework/ClosureStaticMethodInvocationTest.php
@@ -132,7 +132,7 @@ class ClosureStaticMethodInvocationTest extends \PHPUnit_Framework_TestCase
return array(
array('staticSelfPublic', T_PUBLIC),
array('staticSelfProtected', T_PROTECTED),
- // array('staticSelfPrivate', T_PRIVATE), // This will give a Fatal Error for scope
+ array('staticSelfPublicAccessPrivate', T_PRIVATE),
);
}
|
#<I> important test to check scope access and LSB
|
diff --git a/edeposit/amqp/daemonwrapper.py b/edeposit/amqp/daemonwrapper.py
index <HASH>..<HASH> 100644
--- a/edeposit/amqp/daemonwrapper.py
+++ b/edeposit/amqp/daemonwrapper.py
@@ -47,7 +47,7 @@ class DaemonRunnerWrapper(object):
sys.exit(0)
def onIsRunning(self):
- if "stop" not in sys.argv or "restart" not in sys.argv:
+ if "stop" not in sys.argv and "restart" not in sys.argv:
print 'It looks like a daemon is already running!'
sys.exit(1)
|
Fixed bug which blocked stopping the daemon.
|
diff --git a/Slim/Http/Request.php b/Slim/Http/Request.php
index <HASH>..<HASH> 100644
--- a/Slim/Http/Request.php
+++ b/Slim/Http/Request.php
@@ -189,6 +189,10 @@ class Request extends Message implements ServerRequestInterface
return simplexml_load_string($input);
});
+ $this->registerMediaTypeParser('text/xml', function ($input) {
+ return simplexml_load_string($input);
+ });
+
$this->registerMediaTypeParser('application/x-www-form-urlencoded', function ($input) {
parse_str($input, $data);
return $data;
|
Register text/xml in Request
|
diff --git a/utils/seed-classes.js b/utils/seed-classes.js
index <HASH>..<HASH> 100644
--- a/utils/seed-classes.js
+++ b/utils/seed-classes.js
@@ -1,4 +1,4 @@
-import appendStatus from './append-status';
+import appendStatus from './append-status'
export default function(base, statuses = {}, classes = {}) {
if (classes[base]) base = classes[base];
@@ -24,7 +24,7 @@ export default function(base, statuses = {}, classes = {}) {
function addStatuses(sx, arr = []) {
for (var s in sx) {
- arr.push('-' + appendStatus(sx[s], s));
+ arr.push('-' + appendStatus(sx[s], s.replace('@', sx[s])));
}
return arr;
}
|
replace @ with value of prop
This allows us to pass a prop value as a status and have it return only
one class
|
diff --git a/dvc/progress.py b/dvc/progress.py
index <HASH>..<HASH> 100644
--- a/dvc/progress.py
+++ b/dvc/progress.py
@@ -20,7 +20,7 @@ class TqdmThreadPoolExecutor(ThreadPoolExecutor):
Creates a blank initial dummy progress bar if needed so that workers
are forced to create "nested" bars.
"""
- blank_bar = Tqdm(bar_format="Multi-Threaded:", leave=False)
+ blank_bar = Tqdm(bar_format="", leave=False)
if blank_bar.pos > 0:
# already nested - don't need a placeholder bar
blank_bar.close()
|
Remove multi-threaded prefix before progress bar(#<I>)
|
diff --git a/riscvmodel/model.py b/riscvmodel/model.py
index <HASH>..<HASH> 100644
--- a/riscvmodel/model.py
+++ b/riscvmodel/model.py
@@ -1,4 +1,5 @@
from random import randrange
+import sys
from .variant import *
from .types import Register, RegisterFile, TracePC, TraceIntegerRegister, TraceMemory
@@ -111,7 +112,9 @@ class Model(object):
self.state = State(variant)
self.environment = environment if environment is not None else Environment()
self.verbose = verbose
- self.asm_tpl = "{{:{}}} | [{{}}]".format(asm_width)
+ if self.verbose is not False:
+ self.verbose_file = sys.stdout if verbose is True else open(self.verbose, "w")
+ self.asm_tpl = "{{:{}}} | [{{}}]\n".format(asm_width)
def issue(self, insn):
self.state.pc += 4
@@ -119,8 +122,8 @@ class Model(object):
insn.execute(self)
trace = self.state.changes()
- if self.verbose:
- print(self.asm_tpl.format(str(insn), ", ".join([str(t) for t in trace])))
+ if self.verbose is not False:
+ self.verbose_file.write(self.asm_tpl.format(str(insn), ", ".join([str(t) for t in trace])))
self.state.commit()
return trace
|
Allow to write verbose trace to file
|
diff --git a/salt/modules/ebuild.py b/salt/modules/ebuild.py
index <HASH>..<HASH> 100644
--- a/salt/modules/ebuild.py
+++ b/salt/modules/ebuild.py
@@ -317,7 +317,7 @@ def depclean(pkg=None):
CLI Example::
- salt '*' ebuild.depclean <package name>
+ salt '*' pkg.depclean <package name>
'''
ret_pkgs = []
old_pkgs = list_pkgs()
|
Corrected doc for depclean
|
diff --git a/geomdl/utilities.py b/geomdl/utilities.py
index <HASH>..<HASH> 100644
--- a/geomdl/utilities.py
+++ b/geomdl/utilities.py
@@ -536,8 +536,8 @@ def make_triangle_mesh(points, size_u, size_v, **kwargs):
v_range = 1.0 / float(size_v - 1) # for computing vertex parametric v value
# Vertex array size (also used for traversing triangulation loop)
- varr_size_u = int(round((size_u / vertex_spacing) + 10e-8))
- varr_size_v = int(round((size_v / vertex_spacing) + 10e-8))
+ varr_size_u = int(round((float(size_u) / float(vertex_spacing)) + 10e-8))
+ varr_size_v = int(round((float(size_v) / float(vertex_spacing)) + 10e-8))
# Start vertex generation loop
vertices = [Vertex() for _ in range(varr_size_v * varr_size_u)]
|
Fix Python 2 compatibility issue for int division
|
diff --git a/spec/active_record/events_spec.rb b/spec/active_record/events_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/active_record/events_spec.rb
+++ b/spec/active_record/events_spec.rb
@@ -42,17 +42,9 @@ RSpec.describe ActiveRecord::Events do
expect(Task.not_completed).to include(task)
end
- it 'allows overriding methods defined by the gem' do
- task.class.class_eval do
- def complete
- super
- end
- end
-
- task.complete
-
+ it 'allows overriding methods' do
+ task.complete!
expect(task.completed?).to eq(true)
- expect(task.not_completed?).to eq(false)
end
end
diff --git a/spec/dummy/app/models/task.rb b/spec/dummy/app/models/task.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy/app/models/task.rb
+++ b/spec/dummy/app/models/task.rb
@@ -1,3 +1,9 @@
class Task < ActiveRecord::Base
has_event :complete
+
+ def complete!
+ super
+ logger = Logger.new(STDOUT)
+ logger.info("Task #{id} has been completed")
+ end
end
|
Override the complete! task method
|
diff --git a/photutils/datasets/make.py b/photutils/datasets/make.py
index <HASH>..<HASH> 100644
--- a/photutils/datasets/make.py
+++ b/photutils/datasets/make.py
@@ -59,7 +59,7 @@ def make_gaussian_image(shape, table):
for source in table:
aperture = CircularAperture((source['x_0'], source['y_0']),
3 * source['sigma'])
- aperture.plot(color='white', fill=False)
+ aperture.plot(color='white')
"""
y, x = np.indices(shape)
|
Removed plot fill keyword in make_gaussian_image example
|
diff --git a/Lib/glyphsLib/parser.py b/Lib/glyphsLib/parser.py
index <HASH>..<HASH> 100644
--- a/Lib/glyphsLib/parser.py
+++ b/Lib/glyphsLib/parser.py
@@ -116,8 +116,9 @@ class Parser:
i += len(parsed)
return res, i
- # glyphs only supports octal escapes between \000 and \077
- _unescape_re = re.compile(r'(\\0[0-7]{2})|(\\U[0-9a-fA-F]{4,6})')
+ # glyphs only supports octal escapes between \000 and \077 and hexadecimal
+ # escapes between \U0000 and \UFFFF
+ _unescape_re = re.compile(r'(\\0[0-7]{2})|(\\U[0-9a-fA-F]{4})')
@staticmethod
def _unescape_fn(m):
|
[parser] Only parse hex values up to 0xFFFF
For consistency with Glyphs.
|
diff --git a/builder/builder_test.go b/builder/builder_test.go
index <HASH>..<HASH> 100644
--- a/builder/builder_test.go
+++ b/builder/builder_test.go
@@ -9,6 +9,7 @@ import (
"path"
"path/filepath"
"strings"
+ "time"
. "github.com/cloudfoundry-incubator/buildpack_app_lifecycle/Godeps/_workspace/src/github.com/onsi/ginkgo"
. "github.com/cloudfoundry-incubator/buildpack_app_lifecycle/Godeps/_workspace/src/github.com/onsi/gomega"
@@ -113,7 +114,7 @@ var _ = Describe("Building", func() {
})
JustBeforeEach(func() {
- Eventually(builder()).Should(gexec.Exit(0))
+ Eventually(builder(), 5*time.Second).Should(gexec.Exit(0))
})
Describe("the contents of the output tgz", func() {
@@ -221,7 +222,7 @@ start_command: the start command
Context("when the app has a Procfile", func() {
Context("with web defined", func() {
JustBeforeEach(func() {
- Eventually(builder()).Should(gexec.Exit(0))
+ Eventually(builder() * time.Second).Should(gexec.Exit(0))
})
BeforeEach(func() {
|
wait a bit longer for builder to execute & finish
|
diff --git a/go/libkb/api.go b/go/libkb/api.go
index <HASH>..<HASH> 100644
--- a/go/libkb/api.go
+++ b/go/libkb/api.go
@@ -568,7 +568,7 @@ func (a *InternalAPIEngine) fixHeaders(arg APIArg, req *http.Request) error {
if a.G().Env.GetTorMode().UseHeaders() {
req.Header.Set("User-Agent", UserAgent)
- identifyAs := GoClientID + " v" + VersionString() + " " + runtime.GOOS
+ identifyAs := GoClientID + " v" + VersionString() + " " + GetPlatformString()
req.Header.Set("X-Keybase-Client", identifyAs)
if a.G().Env.GetDeviceID().Exists() {
req.Header.Set("X-Keybase-Device-ID", a.G().Env.GetDeviceID().String())
|
fix iOS stats (#<I>)
|
diff --git a/spring-dbunit-test/src/main/java/com/excilys/ebi/spring/dbunit/test/TestConfigurationProcessor.java b/spring-dbunit-test/src/main/java/com/excilys/ebi/spring/dbunit/test/TestConfigurationProcessor.java
index <HASH>..<HASH> 100644
--- a/spring-dbunit-test/src/main/java/com/excilys/ebi/spring/dbunit/test/TestConfigurationProcessor.java
+++ b/spring-dbunit-test/src/main/java/com/excilys/ebi/spring/dbunit/test/TestConfigurationProcessor.java
@@ -118,6 +118,7 @@ public class TestConfigurationProcessor implements ConfigurationProcessor<TestCo
.withDbType(annotation.dbType())/**/
.withDataSourceSpringName(StringUtils.hasText(annotation.dataSourceSpringName()) ? annotation.dataSourceSpringName() : null)/**/
.withDataSetResourceLocations(dataSetResourceLocations)/**/
+ .withEscapePattern(annotation.escapePattern())
.build();
}
|
support escapePattern of @DataSet annotation
|
diff --git a/modin/engines/ray/pandas_on_ray/io.py b/modin/engines/ray/pandas_on_ray/io.py
index <HASH>..<HASH> 100644
--- a/modin/engines/ray/pandas_on_ray/io.py
+++ b/modin/engines/ray/pandas_on_ray/io.py
@@ -51,7 +51,8 @@ def _read_parquet_columns(path, columns, num_splits, kwargs): # pragma: no cove
"""
import pyarrow.parquet as pq
- df = pq.read_pandas(path, columns=columns, **kwargs).to_pandas()
+ df = pq.ParquetDataset(path, **kwargs).read(columns=columns).to_pandas()
+
# Append the length of the index here to build it externally
return _split_result_for_readers(0, num_splits, df) + [len(df.index)]
|
Replace read_pandas with ParquetDataset to support predicate pushdown (#<I>)
* Replace read_pandas with ParquetDataset to support predicate pushdown on parquet
* reformatted as per black
|
diff --git a/jptsmeta.py b/jptsmeta.py
index <HASH>..<HASH> 100644
--- a/jptsmeta.py
+++ b/jptsmeta.py
@@ -428,9 +428,14 @@ class JPTSMeta(object):
def getSupplementaryMaterial(self):
"""
-
- """
- return None
+ <supplementary-material> is an optional element, 0 or more, in
+ <article-meta> to be used to 'alert to the existence of
+ supplementary material and so that it can be accessed from the
+ article'. The use cases will depend heavily on publishers and it will
+ take some effort to fully support. For now, the nodes will merely be
+ collected.
+ """
+ return self.getChildrenByTagName('supplementary-material', self.article_meta)
def getChildrenByTagName(self, searchterm, node):
"""
|
fleshed out docstrings and method for getProduct() and getSupplementaryMaterial()
|
diff --git a/src/Tokenizer/Tokens.php b/src/Tokenizer/Tokens.php
index <HASH>..<HASH> 100644
--- a/src/Tokenizer/Tokens.php
+++ b/src/Tokenizer/Tokens.php
@@ -313,13 +313,14 @@ class Tokens extends \SplFixedArray
if (!$this[$index] || !$this[$index]->equals($newval)) {
$this->changed = true;
- }
- if (isset($this[$index])) {
- $this->unregisterFoundToken($this[$index]);
+ if (isset($this[$index])) {
+ $this->unregisterFoundToken($this[$index]);
+ }
+
+ $this->registerFoundToken($newval);
}
- $this->registerFoundToken($newval);
parent::offsetSet($index, $newval);
}
|
DX: Tokens - do not unregister/register found tokens when it is the same token
|
diff --git a/shutit_main.py b/shutit_main.py
index <HASH>..<HASH> 100755
--- a/shutit_main.py
+++ b/shutit_main.py
@@ -735,7 +735,7 @@ def shutit_main():
])
digraph = digraph + '\n}'
if cfg['action']['show_depgraph']:
- shutit.log(digraph, force_stdout=True)
+ shutit.log('\n' + digraph, force_stdout=True)
shutit.log('\nAbove is the digraph for this shutit invocation. Use graphviz to render into an image, eg\n\n\tshutit depgraph -m library | dot -Tpng -o depgraph.png', force_stdout=True)
# Set build completed
cfg['build']['completed'] = True
|
digraph always computed ready to write out to a file
|
diff --git a/lib/agent/index.js b/lib/agent/index.js
index <HASH>..<HASH> 100644
--- a/lib/agent/index.js
+++ b/lib/agent/index.js
@@ -247,9 +247,7 @@ var Agent = self = {
logger.off();
- if (matches = string.match(/get (\w+) report/))
- this.get_report(matches[1]);
- else if (matches = string.match(/get (\w+)/))
+ if (matches = string.match(/get (\w+)/))
this.get_data(matches[1]);
else if (matches = string.match(/[start|stop] (\w+)/))
this.start_action_by_name(matches[1])
|
Removed 'get [what] report' command from agent, not really needed.
|
diff --git a/init.rb b/init.rb
index <HASH>..<HASH> 100644
--- a/init.rb
+++ b/init.rb
@@ -1,2 +1 @@
require 'attachment_saver'
-ActiveRecord::Base.send(:extend, AttachmentSaver::BaseMethods)
diff --git a/lib/attachment_saver.rb b/lib/attachment_saver.rb
index <HASH>..<HASH> 100644
--- a/lib/attachment_saver.rb
+++ b/lib/attachment_saver.rb
@@ -166,4 +166,6 @@ module AttachmentSaver
return [filename[0..pos - 1], filename[pos + 1..-1]]
end
end
-end
\ No newline at end of file
+end
+
+ActiveRecord::Base.send(:extend, AttachmentSaver::BaseMethods)
|
move ActiveRecord extend call to attachment_saver.rb in preparation for gemifying
|
diff --git a/parsyfiles/plugins_base/support_for_objects.py b/parsyfiles/plugins_base/support_for_objects.py
index <HASH>..<HASH> 100644
--- a/parsyfiles/plugins_base/support_for_objects.py
+++ b/parsyfiles/plugins_base/support_for_objects.py
@@ -83,9 +83,9 @@ class MissingMandatoryAttributeFiles(FileNotFoundError):
"""
return MissingMandatoryAttributeFiles('Multifile object ' + str(obj) + ' cannot be built from constructor of '
- 'type, ' + str(obj_type) +
- 'mandatory constructor argument \'' + arg_name + '\'was not found on '
- 'filesystem')
+ 'type ' + get_pretty_type_str(obj_type) +
+ ', mandatory constructor argument \'' + arg_name + '\'was not found on '
+ 'filesystem')
class InvalidAttributeNameForConstructorError(Exception):
|
Improved error message for MissingMandatoryAttributeFiles in dict_to_object
|
diff --git a/py3status/modules/mpris.py b/py3status/modules/mpris.py
index <HASH>..<HASH> 100644
--- a/py3status/modules/mpris.py
+++ b/py3status/modules/mpris.py
@@ -310,7 +310,7 @@ class Py3status:
self._kill = True
def _name_owner_changed(self, *args):
- player_add = args[5][2]
+ player_add = args[5][0]
player_remove = args[5][1]
if player_add:
self._add_player(player_add)
@@ -382,7 +382,7 @@ class Py3status:
if not p['name'] and p['identity'] in self._mpris_names:
p['name'] = self._mpris_names[p['identity']]
p['full_name'] = u'{} {}'.format(p['name'], p['index'])
- return
+ return False
status = player.PlaybackStatus
state_priority = WORKING_STATES.index(status)
identity = player.Identity
@@ -395,7 +395,7 @@ class Py3status:
self._player_monitor(player_id)
)
except:
- return
+ return False
self._mpris_players[player_id] = {
'_dbus_player': player,
@@ -408,6 +408,7 @@ class Py3status:
'status': status,
'subscription': subscription,
}
+
return True
def _remove_player(self, player_id):
|
Detect players starting after py3status
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.