diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/dev/TestRunner.php b/dev/TestRunner.php
index <HASH>..<HASH> 100644
--- a/dev/TestRunner.php
+++ b/dev/TestRunner.php
@@ -37,25 +37,25 @@ class TestRunner extends Controller {
'module/$ModuleName' => 'module',
'all' => 'all',
'build' => 'build',
- '$TestCase' => 'only',
+ '$TestCase' => 'only'
);
static $allowed_actions = array(
- 'index',
- 'browse',
- 'coverage',
- 'coverageOnly',
- 'startsession',
- 'endsession',
- 'cleanupdb',
- 'module',
- 'all',
- 'build',
- 'only'
+ 'index',
+ 'browse',
+ 'coverage',
+ 'coverageAll',
+ 'coverageModule',
+ 'coverageOnly',
+ 'startsession',
+ 'endsession',
+ 'cleanupdb',
+ 'module',
+ 'all',
+ 'build',
+ 'only'
);
-
-
/**
* @var Array Blacklist certain directories for the coverage report.
* Filepaths are relative to the webroot, without leading slash.
|
BUGFIX Allowing actions related to coverage tests
|
diff --git a/angr/analyses/vfg.py b/angr/analyses/vfg.py
index <HASH>..<HASH> 100644
--- a/angr/analyses/vfg.py
+++ b/angr/analyses/vfg.py
@@ -1665,7 +1665,11 @@ class VFG(ForwardAnalysis, Analysis): # pylint:disable=abstract-method
# we are entering a new function. now it's time to figure out how to optimally traverse the control flow
# graph by generating the sorted merge points
- new_function = self.kb.functions[function_address]
+ try:
+ new_function = self.kb.functions[function_address]
+ except KeyError:
+ # the function does not exist
+ return [ ]
if function_address not in self._function_merge_points:
ordered_merge_points = CFGUtils.find_merge_points(function_address, new_function.endpoints,
|
VFG: take care of missing functiosn in _merge_points()
|
diff --git a/HydraServer/python/HydraServer/soap_server/hydra_complexmodels.py b/HydraServer/python/HydraServer/soap_server/hydra_complexmodels.py
index <HASH>..<HASH> 100644
--- a/HydraServer/python/HydraServer/soap_server/hydra_complexmodels.py
+++ b/HydraServer/python/HydraServer/soap_server/hydra_complexmodels.py
@@ -1060,6 +1060,7 @@ class ProjectSummary(Resource):
self.cr_date = str(parent.cr_date)
self.created_by = parent.created_by
self.summary = parent.summary
+ self.status = parent.status
class User(HydraComplexModel):
"""
|
#<I>: Include status in get_projects.
|
diff --git a/ruby/server/lib/roma/event/handler.rb b/ruby/server/lib/roma/event/handler.rb
index <HASH>..<HASH> 100644
--- a/ruby/server/lib/roma/event/handler.rb
+++ b/ruby/server/lib/roma/event/handler.rb
@@ -88,6 +88,8 @@ module Roma
@connected = true
@last_access = Time.now
@fiber = Fiber.new { dispatcher }
+ rescue Exception =>e
+ @log.error("#{__FILE__}:#{__LINE__}:#{e.inspect} #{$@}")
end
def receive_data(data)
|
added a rescue block in a post_init method
|
diff --git a/devices/tuya.js b/devices/tuya.js
index <HASH>..<HASH> 100644
--- a/devices/tuya.js
+++ b/devices/tuya.js
@@ -20,7 +20,8 @@ module.exports = [
exposes: [e.temperature(), e.humidity(), e.battery()],
},
{
- fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_8ygsuhe1'}],
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_8ygsuhe1'},
+ {modelID: 'TS0601', manufacturerName: '_TZE200_yvx5lh6k'}],
model: 'TS0601_air_quality_sensor',
vendor: 'Tuya',
description: 'Air quality sensor',
|
Add _TZE<I>_yvx5lh6k to TS<I>_air_quality_sensor (#<I>)
|
diff --git a/auto_ml/predictor.py b/auto_ml/predictor.py
index <HASH>..<HASH> 100644
--- a/auto_ml/predictor.py
+++ b/auto_ml/predictor.py
@@ -757,7 +757,7 @@ class Predictor(object):
if orig_row_count <= 10000:
num_rows_to_use = orig_row_count
- X, ignored_X, y, ignored_y = train_test_split(X_transformed, y, train_size=int(num_rows_to_use * row_multiplier) )
+ X, ignored_X, y, ignored_y = train_test_split(X_transformed, y, train_size=row_multiplier )
# X = X_transformed
else:
percent_row_count = int(self.analytics_config['percent_rows'] * orig_row_count)
|
handles num_rows = <I>% for train_test_split
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -54,7 +54,7 @@ extras_require = {
],
'tests': tests_require,
'search': [
- 'invenio-search>=1.0.0a2',
+ 'invenio-search>=1.0.0a4',
'invenio-indexer>=1.0.0a1',
]
}
diff --git a/tests/conftest.py b/tests/conftest.py
index <HASH>..<HASH> 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -50,7 +50,6 @@ def app(request):
TESTING=True,
SQLALCHEMY_DATABASE_URI=os.getenv('SQLALCHEMY_DATABASE_URI',
'sqlite://'),
- SEARCH_AUTOINDEX=[],
SERVER_NAME='localhost',
)
Babel(app)
|
tests: SEARCH_AUTOINDEX removal
* Removes obsolete configuration.
(see inveniosoftware/invenio-search@cc<I>a<I>)
|
diff --git a/spyder/widgets/sourcecode/codeeditor.py b/spyder/widgets/sourcecode/codeeditor.py
index <HASH>..<HASH> 100644
--- a/spyder/widgets/sourcecode/codeeditor.py
+++ b/spyder/widgets/sourcecode/codeeditor.py
@@ -1988,7 +1988,8 @@ class CodeEditor(TextEditBaseWidget):
def uncomment(self):
"""Uncomment current line or selection."""
- self.remove_prefix(self.comment_string)
+ if not self.unblockcomment():
+ self.remove_prefix(self.comment_string)
def __blockcomment_bar(self):
return self.comment_string + ' ' + '=' * (78 - len(self.comment_string))
@@ -2068,7 +2069,7 @@ class CodeEditor(TextEditBaseWidget):
if cursor1.atStart():
break
if not __is_comment_bar(cursor1):
- return
+ return False
def __in_block_comment(cursor):
cs = self.comment_string
return to_text_string(cursor.block().text()).startswith(cs)
@@ -2080,7 +2081,7 @@ class CodeEditor(TextEditBaseWidget):
if cursor2.block() == self.document().lastBlock():
break
if not __is_comment_bar(cursor2):
- return
+ return False
# Removing block comment
cursor3 = self.textCursor()
cursor3.beginEditBlock()
|
Fix incompatibility between block comments and line comments.
|
diff --git a/lib/remi.rb b/lib/remi.rb
index <HASH>..<HASH> 100644
--- a/lib/remi.rb
+++ b/lib/remi.rb
@@ -1,5 +1,8 @@
$LOAD_PATH << File.dirname(__FILE__)
+require 'rubygems'
+require 'bundler/setup'
+
require 'remi/version'
require 'remi/log'
require 'remi/dataset'
|
Enable use of bundler gems
|
diff --git a/lib/plugin.js b/lib/plugin.js
index <HASH>..<HASH> 100644
--- a/lib/plugin.js
+++ b/lib/plugin.js
@@ -687,7 +687,7 @@ exports.register = function (plugin, opts, next) {
// hapi wont find the local swig without this
plugin.expose(api);
plugin.route({ method: 'get', path: settings.relsPath, config: internals.namespacesRoute(settings.relsAuth) });
- plugin.route({ method: 'get', path: path.join(settings.relsPath, '{namespace}/{rel}'), config: internals.relRoute(settings.relsAuth) });
+ plugin.route({ method: 'get', path: settings.relsPath + '/{namespace}/{rel}'), config: internals.relRoute(settings.relsAuth) });
selection.ext('onPreResponse', internals.preResponse.bind(internals, api, settings));
|
don't use path for URL construction
path.join() uses \ instead of / and causes a hapi exception on windows
|
diff --git a/rtv/content.py b/rtv/content.py
index <HASH>..<HASH> 100644
--- a/rtv/content.py
+++ b/rtv/content.py
@@ -374,7 +374,7 @@ class SubredditContent(Content):
def from_name(cls, reddit, name, loader, order=None, query=None,
listing='r', period=None):
- # Strip leading, trailing and redundant backslashes
+ # Strip leading, trailing, and redundant backslashes
n = ''
n = ''.join([n + ''.join(list(g)) if k != '/' else '/' \
for k, g in groupby(name)]).strip(' /')
@@ -431,8 +431,12 @@ class SubredditContent(Content):
elif listing in ['u', 'user']:
if '/m/' in name:
multireddit = reddit.get_multireddit(*name.split('/')[::2])
- submissions = eval('multireddit.get_{0}{1}(limit=None)' \
- .format((order or 'hot'), time[period]))
+ if order in ['top', 'controversial']:
+ submissions = eval('multireddit.get_{0}{1}(limit=None)' \
+ .format((order), time[period]))
+ else:
+ submissions = eval('multireddit.get_{0}(limit=None)' \
+ .format((order or 'hot')))
elif name == 'me':
if not reddit.is_oauth_session():
|
Apply time period only to appropriatly sorted multireddits
|
diff --git a/pyradio/player.py b/pyradio/player.py
index <HASH>..<HASH> 100644
--- a/pyradio/player.py
+++ b/pyradio/player.py
@@ -279,7 +279,7 @@ class MpPlayer(Player):
if sys.platform.startswith('darwin'):
config_files.append("/usr/local/etc/mplayer/mplayer.conf")
elif sys.platform.startswith('win'):
- pass
+ config_files[0] = os.path.join(os.getenv('APPDATA'), "mplayer", "config")
else:
# linux, freebsd, etc.
config_files.append("/etc/mplayer/mplayer.conf")
|
implementing volume save for linux, mac, windows (4)
forgot to define mplayer windows config...
|
diff --git a/pyaavso/utils.py b/pyaavso/utils.py
index <HASH>..<HASH> 100644
--- a/pyaavso/utils.py
+++ b/pyaavso/utils.py
@@ -29,6 +29,7 @@ def download_observations(observer_code):
'obs_types': 'all',
'page': page_number,
})
+ logger.debug(response.request.url)
parser = WebObsResultsParser(response.text)
observations.extend(parser.get_observations())
# kinda silly, but there's no need for lxml machinery here
|
Log request URL in download_observations.
|
diff --git a/pkg/k8s/utils/factory.go b/pkg/k8s/utils/factory.go
index <HASH>..<HASH> 100644
--- a/pkg/k8s/utils/factory.go
+++ b/pkg/k8s/utils/factory.go
@@ -58,25 +58,25 @@ type lister func(client interface{}) func() (versioned.Map, error)
// the HasSynced method with the help of our own ResourceEventHandler
// implementation.
type ControllerSyncer struct {
- c cache.Controller
- reh ResourceEventHandler
+ Controller cache.Controller
+ ResourceEventHandler ResourceEventHandler
}
// Run starts the controller, which will be stopped when stopCh is closed.
func (c *ControllerSyncer) Run(stopCh <-chan struct{}) {
- c.c.Run(stopCh)
+ c.Controller.Run(stopCh)
}
// HasSynced returns true if the controller has synced and the resource event
// handler has handled all requests.
func (c *ControllerSyncer) HasSynced() bool {
- return c.reh.HasSynced()
+ return c.ResourceEventHandler.HasSynced()
}
// LastSyncResourceVersion is the resource version observed when last synced
// with the underlying store.
func (c *ControllerSyncer) LastSyncResourceVersion() string {
- return c.c.LastSyncResourceVersion()
+ return c.Controller.LastSyncResourceVersion()
}
// ResourceEventHandler is a wrapper for the cache.ResourceEventHandler
|
k8s/utils: make the ControllerSynced fields public
|
diff --git a/src/Message/AIMResponse.php b/src/Message/AIMResponse.php
index <HASH>..<HASH> 100644
--- a/src/Message/AIMResponse.php
+++ b/src/Message/AIMResponse.php
@@ -46,7 +46,7 @@ class AIMResponse extends AbstractResponse
* A result of 0 is returned if there is no transaction response returned, e.g. a validation error in
* some data, or invalid login credentials.
*
- * @return int 1 = Approved, 2 = Declined, 3 = Error, 4 = Held for Review, 0 = Validation Error
+ * @return int 1 = Approved, 2 = Declined, 3 = Error, 4 = Held for Review
*/
public function getResultCode()
{
@@ -55,9 +55,8 @@ class AIMResponse extends AbstractResponse
return intval((string)$this->data->transactionResponse[0]->responseCode);
}
- // No transaction response, so no transaction was attempted, hence no
- // transaction response code that we can return.
- return 0;
+ // No transaction response, so return 3 aka "error".
+ return 3;
}
/**
|
Issue #<I> switch the "0" result code to "3" (error).
|
diff --git a/test/org/opencms/test/OpenCmsTestProperties.java b/test/org/opencms/test/OpenCmsTestProperties.java
index <HASH>..<HASH> 100644
--- a/test/org/opencms/test/OpenCmsTestProperties.java
+++ b/test/org/opencms/test/OpenCmsTestProperties.java
@@ -155,7 +155,6 @@ public final class OpenCmsTestProperties {
return;
}
- String testPropPath;
m_testSingleton = new OpenCmsTestProperties();
m_testSingleton.m_basePath = basePath;
@@ -164,7 +163,17 @@ public final class OpenCmsTestProperties {
}
try {
- testPropPath = OpenCmsTestProperties.getResourcePathFromClassloader("test.properties");
+ String testPropPath = null;
+ String propertiesFileName = "test.properties";
+
+ if (basePath != null) {
+ testPropPath = CmsFileUtil.addTrailingSeparator(basePath) + propertiesFileName;
+ File propFile = new File(testPropPath);
+ if (!propFile.exists()) {
+ testPropPath = OpenCmsTestProperties.getResourcePathFromClassloader(propertiesFileName);
+ }
+ }
+
if (testPropPath == null) {
throw new RuntimeException(
"Test property file ('test.properties') could not be found by context Classloader.");
|
Fixed issue when test data was located in another Eclipse project.
|
diff --git a/py3status/modules/pomodoro.py b/py3status/modules/pomodoro.py
index <HASH>..<HASH> 100644
--- a/py3status/modules/pomodoro.py
+++ b/py3status/modules/pomodoro.py
@@ -107,7 +107,7 @@ class Py3status:
self.__setup('break')
self.run = False
- def setup_mmss_time(self, form=None):
+ def _setup_mmss_time(self, form=None):
"""
Setup the formatted time string.
"""
@@ -124,7 +124,7 @@ class Py3status:
return time
- def setup_bar(self):
+ def _setup_bar(self):
"""
Setup the process bar.
"""
@@ -148,10 +148,10 @@ class Py3status:
Return the response full_text string
"""
formatters = {
- 'bar': self.setup_bar(),
+ 'bar': self._setup_bar(),
'ss': self.timer,
- 'mm': self.setup_mmss_time(form='mm'),
- 'mmss': self.setup_mmss_time()
+ 'mm': self._setup_mmss_time(form='mm'),
+ 'mmss': self._setup_mmss_time()
}
if self.display_bar is True:
|
Eliminate intrusive log messages from pomodoro
Py3status imports all methods of a module except those starting with an
underscore and special methods. It then call these methods with self,
i3s_output_list and i3s_config.
Because of these rules, py3status call setup_mmss_time and setup_bar
with too many arguments, causing intrusive messages in logs. This
commit fix this behaviour by adding an underscore before these
methods' name.
|
diff --git a/wandb/cli.py b/wandb/cli.py
index <HASH>..<HASH> 100644
--- a/wandb/cli.py
+++ b/wandb/cli.py
@@ -43,6 +43,11 @@ def display_error(func):
return wrapper
+def _require_init():
+ if __stage_dir__ is None:
+ print('Directory not initialized. Please run "wandb init" to get started.')
+ sys.exit(1)
+
def editor(content='', marker='# Enter a description, markdown is allowed!\n'):
message = click.edit(content + '\n\n' + marker)
if message is not None:
@@ -360,6 +365,7 @@ RUN_CONTEXT['ignore_unknown_options'] = True
help='New files in <run_dir> that match will be saved to wandb. (default: \'*\')')
@display_error
def run(ctx, program, args, id, dir, glob):
+ _require_init()
env = copy.copy(os.environ)
env['WANDB_MODE'] = 'run'
if id is None:
|
Show error message if "wandb init" hasn't been run, for run. Fixes # <I>.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ from setuptools import setup, find_packages, Extension
from setuptools.command.build_ext import build_ext
VERSION = "2.10.1"
-LIBUAST_VERSION = "v1.9.1"
+LIBUAST_VERSION = "v1.9.4"
SDK_VERSION = "v1.16.1"
SDK_MAJOR = SDK_VERSION.split('.')[0]
FORMAT_ARGS = globals()
|
Bump libuast dependency version
|
diff --git a/stats_test.go b/stats_test.go
index <HASH>..<HASH> 100644
--- a/stats_test.go
+++ b/stats_test.go
@@ -687,7 +687,7 @@ func TestQuartile(t *testing.T) {
}
}
- _, err := Sum([]float64{})
+ _, err := Quartile([]float64{})
if err == nil {
t.Errorf("Should have returned an error")
}
|
Fix copy pasta mistake testing the wrong function
|
diff --git a/glim/app.py b/glim/app.py
index <HASH>..<HASH> 100644
--- a/glim/app.py
+++ b/glim/app.py
@@ -1,5 +1,5 @@
# application initiation script
-import os
+import os, sys, traceback
from glim.core import Config as C, Database as D, Orm as O, App
from glim.facades import Config, Database, Orm, Session, Cookie
@@ -94,9 +94,10 @@ def start(host = '127.0.0.1', port = '8080', environment = 'development', use_re
app = Glim(mroutes.urls)
- run_simple(host, int(port), app, use_debugger = True, use_reloader = True)
+ run_simple(host, int(port), app, use_debugger = Config.get('glim.debugger'), use_reloader = Config.get('glim.reloader'))
except Exception, e:
- print e
+ print traceback.format_exc()
+ print sys.exc_info()[0]
exit()
|
fix a bug that prevents dynamically loading facades
|
diff --git a/couchdb_schematics/document.py b/couchdb_schematics/document.py
index <HASH>..<HASH> 100644
--- a/couchdb_schematics/document.py
+++ b/couchdb_schematics/document.py
@@ -21,7 +21,8 @@ class SchematicsDocument(Model):
_rev = StringType()
doc_type = StringType()
- def __init__(self, id=None, **kwargs):
+ def __init__(self, **kwargs):
+ id = kwargs.pop('id', None)
super(SchematicsDocument, self).__init__(raw_data=kwargs)
if id:
self.id = id
diff --git a/tests/test_schematics_document.py b/tests/test_schematics_document.py
index <HASH>..<HASH> 100644
--- a/tests/test_schematics_document.py
+++ b/tests/test_schematics_document.py
@@ -16,8 +16,8 @@ class User1(User1Model,SchematicsDocument):
class User2(User2Model,SchematicsDocument):
- def __init__(self, id=None, **kwargs):
- super(User2, self).__init__(id, **kwargs)
+ def __init__(self, **kwargs):
+ super(User2, self).__init__(**kwargs)
if 'password' in kwargs and '_rev' not in kwargs:
self.password = kwargs['password']
|
removed id as an optional initialization argument
|
diff --git a/tests/testing.py b/tests/testing.py
index <HASH>..<HASH> 100644
--- a/tests/testing.py
+++ b/tests/testing.py
@@ -13,10 +13,20 @@ def setup_django():
'django.contrib.auth',
'django.contrib.contenttypes',
'django_ftpserver',
- )
+ ),
+ MIDDLEWARE_CLASSES=(),
)
- from django.db.models.loading import cache as model_cache
- if not model_cache.loaded:
- model_cache._populate()
- from django.core.management import call_command
- call_command('syncdb', interactive=False)
+ from django import VERSION as version
+ # In Django 1.7 or later, using "django.apps" module.
+ if version[0] == 1 and version[1] >= 7:
+ from django.apps import apps
+ if not apps.ready:
+ apps.populate(settings.INSTALLED_APPS)
+ from django.core.management import call_command
+ call_command('syncdb', interactive=False)
+ else:
+ from django.db.models.loading import cache as model_cache
+ if not model_cache.loaded:
+ model_cache._populate()
+ from django.core.management import call_command
+ call_command('syncdb', interactive=False)
|
modify testing utility for Django <I>
|
diff --git a/aiohttp/__init__.py b/aiohttp/__init__.py
index <HASH>..<HASH> 100644
--- a/aiohttp/__init__.py
+++ b/aiohttp/__init__.py
@@ -1,4 +1,4 @@
-__version__ = "3.8.0a4"
+__version__ = "3.8.0a5"
from typing import Tuple
|
Bump to <I>a5
|
diff --git a/src/ROH/Util/Thing.php b/src/ROH/Util/Thing.php
index <HASH>..<HASH> 100644
--- a/src/ROH/Util/Thing.php
+++ b/src/ROH/Util/Thing.php
@@ -8,7 +8,7 @@ class Thing extends Collection
public function __construct($attributes)
{
- if (is_callable($attributes)) {
+ if (is_callable($attributes) || is_object($attributes)) {
$this->handler = $attributes;
} else {
parent::__construct($attributes);
|
FIXED bug when create new collection with non-array param
|
diff --git a/nodeconductor/iaas/migrations/0038_securitygroup_state.py b/nodeconductor/iaas/migrations/0038_securitygroup_state.py
index <HASH>..<HASH> 100644
--- a/nodeconductor/iaas/migrations/0038_securitygroup_state.py
+++ b/nodeconductor/iaas/migrations/0038_securitygroup_state.py
@@ -5,6 +5,11 @@ from django.db import models, migrations
import django_fsm
+def mark_security_groups_as_synced(apps, schema_editor):
+ SecurityGroup = apps.get_model('iaas', 'SecurityGroup')
+ SecurityGroup.objects.all().update(state=3)
+
+
class Migration(migrations.Migration):
dependencies = [
@@ -18,4 +23,5 @@ class Migration(migrations.Migration):
field=django_fsm.FSMIntegerField(default=1, choices=[(1, 'Sync Scheduled'), (2, 'Syncing'), (3, 'In Sync'), (4, 'Erred')]),
preserve_default=True,
),
+ migrations.RunPython(mark_security_groups_as_synced),
]
|
Mark all exist security groups as synced
- itacloud-<I>
|
diff --git a/src/ImageHotspotBundle/mappers/TPkgImageHotspotMapper.class.php b/src/ImageHotspotBundle/mappers/TPkgImageHotspotMapper.class.php
index <HASH>..<HASH> 100644
--- a/src/ImageHotspotBundle/mappers/TPkgImageHotspotMapper.class.php
+++ b/src/ImageHotspotBundle/mappers/TPkgImageHotspotMapper.class.php
@@ -76,7 +76,7 @@ class TPkgImageHotspotMapper extends AbstractViewMapper
$oVisitor->SetMappedValue('sHeadline', $oPkgImageHotspot->fieldName);
$oVisitor->SetMappedValue('sBackgroundImageId', $oActiveItemImage->id);
- $oVisitor->SetMappedValue('backgroundImageCropId', $oActiveItem->fieldCmsMediaIdImageCropId);
+ $oVisitor->SetMappedValue('backgroundImageCropId', '' !== $oActiveItem->fieldCmsMediaIdImageCropId ? $oActiveItem->fieldCmsMediaIdImageCropId : null);
$oVisitor->SetMappedValue('sBackgroundImageAlt', $oActiveItem->fieldName);
$oNextItem = $oActiveItem->GetNextItem();
|
ref #<I>: don't auto select image preset for image hotspot background image
|
diff --git a/runtimes/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java b/runtimes/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java
index <HASH>..<HASH> 100644
--- a/runtimes/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java
+++ b/runtimes/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java
@@ -47,7 +47,8 @@ public abstract class PagedList<E> implements List<E> {
* @param page the {@link Page} object.
*/
public PagedList(Page<E> page) {
- items = page.getItems();
+ this();
+ items.addAll(page.getItems());
nextPageLink = page.getNextPageLink();
currentPage = page;
}
|
Fixing UnsupportedOperation exception in PagedList
|
diff --git a/openxc-it/src/main/java/com/openxc/VehicleServiceTest.java b/openxc-it/src/main/java/com/openxc/VehicleServiceTest.java
index <HASH>..<HASH> 100644
--- a/openxc-it/src/main/java/com/openxc/VehicleServiceTest.java
+++ b/openxc-it/src/main/java/com/openxc/VehicleServiceTest.java
@@ -2,11 +2,18 @@ package com.openxc;
import com.openxc.VehicleService;
+import android.content.Intent;
+
+import android.os.IBinder;
+
import android.test.ServiceTestCase;
+import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
public class VehicleServiceTest extends ServiceTestCase<VehicleService> {
+ Intent startIntent;
+
public VehicleServiceTest() {
super(VehicleService.class);
}
@@ -14,10 +21,21 @@ public class VehicleServiceTest extends ServiceTestCase<VehicleService> {
@Override
protected void setUp() throws Exception {
super.setUp();
+ startIntent = new Intent();
+ startIntent.setClass(getContext(), VehicleService.class);
}
@SmallTest
public void testPreconditions() {
- assertTrue(false);
+ }
+
+ @SmallTest
+ public void testStartable() {
+ startService(startIntent);
+ }
+
+ @MediumTest
+ public void testBindable() {
+ IBinder service = bindService(startIntent);
}
}
|
Test that the VehicleService can be started and bound.
|
diff --git a/lib/svtplay_dl/__init__.py b/lib/svtplay_dl/__init__.py
index <HASH>..<HASH> 100644
--- a/lib/svtplay_dl/__init__.py
+++ b/lib/svtplay_dl/__init__.py
@@ -66,10 +66,14 @@ def get_media(url, options):
title_tag = re.sub(r'&[^\s]*;', '', match.group(1))
if is_py3:
title = re.sub(r'[^\w\s-]', '', title_tag).strip().lower()
- options.output = re.sub(r'[-\s]+', '-', title)
+ tmp = re.sub(r'[-\s]+', '-', title)
else:
title = unicode(re.sub(r'[^\w\s-]', '', title_tag).strip().lower())
- options.output = unicode(re.sub(r'[-\s]+', '-', title))
+ tmp = "%s%s" % (options.output, unicode(re.sub(r'[-\s]+', '-', title)))
+ if options.output and os.path.isdir(options.output):
+ options.output += "/%s" % tmp
+ else:
+ options.output = tmp
stream.get(options, url)
|
get_media: output to dir and get automagic name again.
removed it in f<I>d<I>d. but this one is better
|
diff --git a/config/routes.rb b/config/routes.rb
index <HASH>..<HASH> 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,7 +1,7 @@
Trestle::Engine.routes.draw do
- root to: "trestle/dashboard#index"
-
Trestle.admins.each do |name, admin|
instance_eval(&admin.routes)
end
+
+ root to: "trestle/dashboard#index"
end
|
Set dashboard route to lower priority than admins
|
diff --git a/safe/impact_functions/earthquake/itb_earthquake_fatality_model/test/test_itb_earthquake_fatality_model.py b/safe/impact_functions/earthquake/itb_earthquake_fatality_model/test/test_itb_earthquake_fatality_model.py
index <HASH>..<HASH> 100644
--- a/safe/impact_functions/earthquake/itb_earthquake_fatality_model/test/test_itb_earthquake_fatality_model.py
+++ b/safe/impact_functions/earthquake/itb_earthquake_fatality_model/test/test_itb_earthquake_fatality_model.py
@@ -67,7 +67,7 @@ class TestITBEarthquakeFatalityFunction(unittest.TestCase):
expected_result = {
'total_population': 200,
- 'total_fatalities': 10, # should be zero FIXME
+ 'total_fatalities': 0, # should be zero FIXME
'total_displaced': 200
}
for key_ in expected_result.keys():
|
re fix test code to reflect the change in the zero fatality
|
diff --git a/test/object-test.js b/test/object-test.js
index <HASH>..<HASH> 100755
--- a/test/object-test.js
+++ b/test/object-test.js
@@ -522,6 +522,13 @@ describe("bindable object", function() {
});
+ it("cannot reference a property on the bindable object if the context isn't the bindable property", function() {
+ var bindable = new BindableObject();
+ bindable.name = "craig";
+ expect(bindable.get("name")).to.be(undefined);
+ })
+
+
describe("with delays", function() {
it("can be added to a map", function() {
|
change @data to @__context - needs to be super private
|
diff --git a/lib/sidekiq-status/client_middleware.rb b/lib/sidekiq-status/client_middleware.rb
index <HASH>..<HASH> 100644
--- a/lib/sidekiq-status/client_middleware.rb
+++ b/lib/sidekiq-status/client_middleware.rb
@@ -21,7 +21,7 @@ module Sidekiq::Status
jid: msg['jid'],
status: :queued,
worker: worker_class,
- args: msg['args'].to_a.empty? ? nil : msg['args']
+ args: msg['args'].to_a.empty? ? nil : msg['args'].to_json
}
store_for_id msg['jid'], initial_metadata, @expiration, redis_pool
yield
|
ClientMiddleware updates
- Worker arguments converted to JSON before saving
into redis status hash to aviod Redis::CommandError
|
diff --git a/src/Database/Schema/Builder.php b/src/Database/Schema/Builder.php
index <HASH>..<HASH> 100644
--- a/src/Database/Schema/Builder.php
+++ b/src/Database/Schema/Builder.php
@@ -306,7 +306,7 @@ class Builder
// keep lock_attributes state
$lock_attributes = (isset($collection_config['lock_attributes']))
? $collection_config['lock_attributes']
- : (isset($table_schema['lock_attributes'])) ? $table_schema['lock_attributes'] : false;
+ : ((isset($table_schema['lock_attributes'])) ? $table_schema['lock_attributes'] : false);
// add new attributes to table_schema
if (isset($collection_config['attributes'])) {
|
fix nested ternary syntax.
|
diff --git a/tools/c7n_gcp/c7n_gcp/handler.py b/tools/c7n_gcp/c7n_gcp/handler.py
index <HASH>..<HASH> 100644
--- a/tools/c7n_gcp/c7n_gcp/handler.py
+++ b/tools/c7n_gcp/c7n_gcp/handler.py
@@ -18,8 +18,7 @@ import os
import uuid
from c7n.config import Config
-from c7n.policy import PolicyCollection
-
+from c7n.loader import PolicyLoader
# Load resource plugins
from c7n_gcp.entry import initialize_gcp
@@ -48,11 +47,13 @@ def run(event, context=None):
# merge all our options in
options = Config.empty(**options_overrides)
+ loader = PolicyLoader(options)
- policies = PolicyCollection.from_data(policy_config, options)
+ policies = loader.load_data(policy_config, 'config.json', validate=False)
if policies:
for p in policies:
log.info("running policy %s", p.name)
+ p.validate()
p.push(event, context)
return True
|
gcp - functions use loader for initializing policy (#<I>)
|
diff --git a/lib/hocon/impl/simple_config_origin.rb b/lib/hocon/impl/simple_config_origin.rb
index <HASH>..<HASH> 100644
--- a/lib/hocon/impl/simple_config_origin.rb
+++ b/lib/hocon/impl/simple_config_origin.rb
@@ -327,7 +327,7 @@ class Hocon::Impl::SimpleConfigOrigin
def self.merge_value_origins(stack)
# stack is an array of AbstractConfigValue
origins = stack.map { |v| v.origin}
- self.class.merge_origins(origins)
+ merge_origins(origins)
end
def self.merge_origins(stack)
|
(maint) fix bad reference to self.class
|
diff --git a/numina/array/display/polfit_residuals.py b/numina/array/display/polfit_residuals.py
index <HASH>..<HASH> 100644
--- a/numina/array/display/polfit_residuals.py
+++ b/numina/array/display/polfit_residuals.py
@@ -265,21 +265,12 @@ def polfit_residuals(
marker='x', s=srejected, color=crejected,
label="rejected")
- # shrink axes and put a legend
- box = ax2.get_position()
- ax2.set_position([box.x0, box.y0,
- box.width, box.height * 0.92])
- delta_ybox = box.height*0.15
- box = ax.get_position()
- ax.set_position([box.x0, box.y0 - delta_ybox,
- box.width, box.height * 0.92])
- ax.legend(loc=3, bbox_to_anchor=(0.0, 1.1, 1., 0.07),
- mode="expand", borderaxespad=0., ncol=4,
- numpoints=1)
+ # put a legend
+ ax.legend(numpoints=1)
# graph title
if title is not None:
- plt.title(title + "\n\n")
+ plt.title(title)
pause_debugplot(debugplot, pltshow=True, tight_layout=True)
|
Leave legend in plots to float around.
|
diff --git a/Call/HttpGetHtml.php b/Call/HttpGetHtml.php
index <HASH>..<HASH> 100644
--- a/Call/HttpGetHtml.php
+++ b/Call/HttpGetHtml.php
@@ -54,6 +54,7 @@ class HttpGetHtml extends CurlCall implements ApiCallInterface
}
$curl->setopt(CURLOPT_URL, $url);
$curl->setopt(CURLOPT_COOKIE, $this->cookie);
+ $curl->setopt(CURLOPT_HTTPGET, TRUE);
$curl->setoptArray($options);
$this->curlExec($curl);
}
|
HttpGetHtml was not defaulting back to GET but rather staying with POST if the previous curl call was a POST.
|
diff --git a/src/Backend/DrupalSubscriptionCursor.php b/src/Backend/DrupalSubscriptionCursor.php
index <HASH>..<HASH> 100644
--- a/src/Backend/DrupalSubscriptionCursor.php
+++ b/src/Backend/DrupalSubscriptionCursor.php
@@ -92,9 +92,6 @@ class DrupalSubscriptionCursor extends AbstractDrupalCursor
break;
case Field::SUB_CREATED_TS:
- if ($value instanceof \DateTime) {
- $value = $value->format(Misc::SQL_DATETIME);
- }
$query->orderBy('s.created', $direction);
break;
|
removed dead code, and potential php warning
|
diff --git a/envy/application.py b/envy/application.py
index <HASH>..<HASH> 100644
--- a/envy/application.py
+++ b/envy/application.py
@@ -110,7 +110,9 @@ def clean(args):
for package in os.listdir(get_envy_base() + "/{}".format(get_active_venv())):
restore_environment(package)
else:
- restore_environment(args.package[0])
+ # needs to be args.package instead of args.package[0] here-- as we can also pass --all, making package technically
+ # an optional argument, and hence we use nargs='?' instead of nargs=1.
+ restore_environment(args.package)
def restore_environment(package_name):
|
Fix #<I> - correctly pass package arg to restore_environment
|
diff --git a/enoslib/infra/enos_chameleonkvm/schema.py b/enoslib/infra/enos_chameleonkvm/schema.py
index <HASH>..<HASH> 100644
--- a/enoslib/infra/enos_chameleonkvm/schema.py
+++ b/enoslib/infra/enos_chameleonkvm/schema.py
@@ -15,7 +15,7 @@ SCHEMA = {
"subnet": {"$ref": "#/os_subnet"},
"prefix": {"type": "string"}
},
- "additionalProperties": False,
+ "additionalProperties": True,
"required": ["resources", "key_name"],
"os_allocation_pool": {
@@ -46,7 +46,7 @@ SCHEMA = {
"name": {"type": "string"},
"cidr": {"type": "string"}
},
- "required": ["name", "cidr"],
+ "required": ["name"],
"additionalProperties": False
},
|
Relax a bit the schema of Chameleon
It's shared between chameleonkvm (ckvm) and chameleonbaremetal (cbm). cbm needs
some more keys in comparison to ckvm. Logically speaking cbm inheritate from
ckvm and instead of duplicating the whole schema, we choose to relax a bit so
that this inheritance can occur also at the schema level. (It seems that there
isn't an obvious mechanism to map the inheritance from the objet layer to the
schema level).
|
diff --git a/src/Mongolid/ActiveRecord.php b/src/Mongolid/ActiveRecord.php
index <HASH>..<HASH> 100644
--- a/src/Mongolid/ActiveRecord.php
+++ b/src/Mongolid/ActiveRecord.php
@@ -228,4 +228,14 @@ abstract class ActiveRecord
return $this->getDataMapper()->$action($this);
}
+
+ /**
+ * Getter for the $collection attribute.
+ *
+ * @return string
+ */
+ public function getCollectionName()
+ {
+ return $this->collection;
+ }
}
diff --git a/tests/Mongolid/ActiveRecordTest.php b/tests/Mongolid/ActiveRecordTest.php
index <HASH>..<HASH> 100644
--- a/tests/Mongolid/ActiveRecordTest.php
+++ b/tests/Mongolid/ActiveRecordTest.php
@@ -262,4 +262,13 @@ class ActiveRecordTest extends TestCase
$this->assertInstanceOf(DataMapper\DataMapper::class, $result);
$this->assertEquals($schema, $result->schema);
}
+
+ public function testShouldGetCollectionName()
+ {
+ $entity = new class extends ActiveRecord {
+ public $collection = 'collection_name';
+ };
+
+ $this->assertEquals($entity->getCollectionName(), 'collection_name');
+ }
}
|
Added getter for $collection attribute
|
diff --git a/anyconfig/schema.py b/anyconfig/schema.py
index <HASH>..<HASH> 100644
--- a/anyconfig/schema.py
+++ b/anyconfig/schema.py
@@ -132,8 +132,7 @@ def gen_schema(node, **options):
:return: A dict represents JSON schema of this node
"""
- typemap = options["ac_schema_typemap"] \
- if "ac_schema_typemap" in options else _SIMPLETYPE_MAP
+ typemap = options.get("ac_schema_typemap", _SIMPLETYPE_MAP)
strict = options.get("ac_schema_type", False) == _STRICT_SCHEMA_TYPE
ret = dict(type="null")
|
refactor: simplify a conditional branch statement in .schema.gen_schema
|
diff --git a/pysparkling/sql/expressions/aggregate/stat_aggregations.py b/pysparkling/sql/expressions/aggregate/stat_aggregations.py
index <HASH>..<HASH> 100644
--- a/pysparkling/sql/expressions/aggregate/stat_aggregations.py
+++ b/pysparkling/sql/expressions/aggregate/stat_aggregations.py
@@ -107,3 +107,11 @@ class StddevPop(SimpleStatAggregation):
def __str__(self):
return "stddev_pop({0})".format(self.column)
+
+class Skewness(SimpleStatAggregation):
+ def eval(self, row, schema):
+ return self.stat_helper.skewness
+
+ def __str__(self):
+ return "skewness({0})".format(self.column)
+
|
Implement Skewness aggregation
|
diff --git a/input/utils/fieldset-item.js b/input/utils/fieldset-item.js
index <HASH>..<HASH> 100644
--- a/input/utils/fieldset-item.js
+++ b/input/utils/fieldset-item.js
@@ -53,7 +53,7 @@ module.exports = FieldsetItem = function (document, relation/*, options*/) {
this.dom.classList.add('dbjs');
this.domLabel.setAttribute('for', 'input-' + this.id);
- this.input.castAttribute('id', 'input-' + this.id);
+ (this.input.control || this.input.dom).setAttribute('id', 'input-' + this.id);
this.domError.setAttribute('id', 'error-' + this.id);
this.domError.classList.add('error-message-' +
|
Set id on either control or container
|
diff --git a/tag/tag.js b/tag/tag.js
index <HASH>..<HASH> 100644
--- a/tag/tag.js
+++ b/tag/tag.js
@@ -72,8 +72,7 @@ export const TagNormalBody = props => (
[getClickableContentWrapperTypeClassName({
type: props.type,
isRemovable: Boolean(props.onRemove),
- })]:
- Boolean(props.onClick) && !props.isDisabled,
+ })]: Boolean(props.onClick) && !props.isDisabled,
[styles.clickableContentWrapper]:
!props.isDisabled && Boolean(props.onClick),
[styles.disabledContent]: props.isDisabled,
|
chore: apply prettier to js
|
diff --git a/src/Label.php b/src/Label.php
index <HASH>..<HASH> 100644
--- a/src/Label.php
+++ b/src/Label.php
@@ -9,24 +9,9 @@ use CultuurNet\Entry\Keyword;
class Label extends Keyword
{
- /**
- * @var bool
- */
- protected $visible;
-
- /**
- * @return boolean
- */
- public function isVisible()
- {
- return $this->visible;
- }
-
public function __construct($value, $visible = true)
{
- parent::__construct($value);
-
- $this->visible = $visible;
+ parent::__construct($value, $visible);
}
/**
|
III-<I>: Adapt Label to the changes to Keyword
|
diff --git a/src/main/java/com/cloudesire/tisana4j/RestClient.java b/src/main/java/com/cloudesire/tisana4j/RestClient.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/cloudesire/tisana4j/RestClient.java
+++ b/src/main/java/com/cloudesire/tisana4j/RestClient.java
@@ -996,6 +996,13 @@ public class RestClient implements RestClientInterface
this.mapper.configure( DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, flag );
}
+ @Deprecated
+ @Override
+ public ObjectMapper getObjectMapper()
+ {
+ return mapper;
+ }
+
@Override
public void setObjectMapper( ObjectMapper mapper )
{
diff --git a/src/main/java/com/cloudesire/tisana4j/RestClientInterface.java b/src/main/java/com/cloudesire/tisana4j/RestClientInterface.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/cloudesire/tisana4j/RestClientInterface.java
+++ b/src/main/java/com/cloudesire/tisana4j/RestClientInterface.java
@@ -113,5 +113,7 @@ public interface RestClientInterface
void setObjectMapperFailOnUknownField( boolean flag );
+ ObjectMapper getObjectMapper();
+
void setObjectMapper( ObjectMapper mapper );
}
|
Reintroduce getObjectMapper as a deprecated method
|
diff --git a/stremio-addon/addon.js b/stremio-addon/addon.js
index <HASH>..<HASH> 100644
--- a/stremio-addon/addon.js
+++ b/stremio-addon/addon.js
@@ -107,9 +107,9 @@ var service = new Stremio.Server({
},
"stats.get": function(args, callback, user) { // TODO
var c = Object.keys(db.indexes.seeders).length;
- callback(null, [
+ callback(null, { stats: [
{ name: "number of torrents - "+c, count: c, colour: "green" }
- ]);
+ ] });
},
}, { allow: [cfg.stremioCentral], secret: cfg.stremioSecret }, _.extend(require("./stremio-manifest"), _.pick(require("../package"), "version")));
|
stats must be wrapped in stats.get
|
diff --git a/Tests/ApplicationTest.php b/Tests/ApplicationTest.php
index <HASH>..<HASH> 100644
--- a/Tests/ApplicationTest.php
+++ b/Tests/ApplicationTest.php
@@ -66,6 +66,9 @@ class ApplicationTest extends Base
}
}
+ /**
+ * @psalm-suppress AbstractInstantiation
+ */
final public function DataProviderDaftConsoleCommands() : Generator
{
/**
|
suppressing abstract instantiation, as psalm does not presently pick up on the reflection
|
diff --git a/tests/unit/components/sl-radio-group-test.js b/tests/unit/components/sl-radio-group-test.js
index <HASH>..<HASH> 100644
--- a/tests/unit/components/sl-radio-group-test.js
+++ b/tests/unit/components/sl-radio-group-test.js
@@ -28,8 +28,8 @@ test( 'Event handlers are registered and unregistered', function( assert ) {
const radioButtonsArray = this.$( 'input:radio' ).toArray();
const matchElements = sinon.match( ( elements ) => {
- return elements.toArray().every( function( element ) {
- const found = radioButtonsArray.find( ( radioElement ) => {
+ return radioButtonsArray.every( function( element ) {
+ const found = elements.toArray().find( ( radioElement ) => {
return element === radioElement;
});
|
Changed order of looping arrays closes#<I>
|
diff --git a/oled/device.py b/oled/device.py
index <HASH>..<HASH> 100644
--- a/oled/device.py
+++ b/oled/device.py
@@ -342,7 +342,6 @@ class pygame(device, mixin.noop, mixin.capabilities):
"""
Takes an image and renders it to a pygame display surface.
"""
- assert(image.mode == self.mode)
assert(image.size[0] == self.width)
assert(image.size[1] == self.height)
|
Don't enforce the mode - it will be converted to RGB anyway
|
diff --git a/examples/debiangraph.py b/examples/debiangraph.py
index <HASH>..<HASH> 100644
--- a/examples/debiangraph.py
+++ b/examples/debiangraph.py
@@ -29,7 +29,7 @@ from pyArango.graph import *
from pyArango.theExceptions import *
# Configure your ArangoDB server connection here
-conn = Connection(arangoURL="http://localhost:8529", username="USERNAME", password="SECRET")
+conn = Connection(arangoURL="http://localhost:8529", username="root", password="")
db = None
edgeCols = {}
|
make username/passvoid better findeable ;-)
|
diff --git a/searx/utils.py b/searx/utils.py
index <HASH>..<HASH> 100644
--- a/searx/utils.py
+++ b/searx/utils.py
@@ -206,7 +206,13 @@ def format_date_by_locale(date, locale_string):
if locale_string == 'all':
locale_string = settings['ui']['default_locale'] or 'en_US'
- return format_date(date, locale=locale_string)
+ # to avoid crashing if locale is not supported by babel
+ try:
+ formatted_date = format_date(date, locale=locale_string)
+ except:
+ formatted_date = format_date(date, "YYYY-MM-dd")
+
+ return formatted_date
def dict_subset(d, properties):
|
[fix] exception if locale doesn't have a date format
occitan, for example
|
diff --git a/lib/eye/patch.rb b/lib/eye/patch.rb
index <HASH>..<HASH> 100644
--- a/lib/eye/patch.rb
+++ b/lib/eye/patch.rb
@@ -8,7 +8,7 @@ rescue LoadError
end
begin
- require "eye/notify/aws_sdk"
+ require "eye/notify/awssdk"
rescue LoadError
# Don't worry about loading the aws_sdk notifier when
# `aws-sdk-core` is unavailable
|
properly reference the awssdk.rb file
|
diff --git a/hypertools/datageometry.py b/hypertools/datageometry.py
index <HASH>..<HASH> 100644
--- a/hypertools/datageometry.py
+++ b/hypertools/datageometry.py
@@ -214,16 +214,16 @@ class DataGeometry(object):
# put geo vars into a dict
geo = {
- 'data' : data,
- 'xform_data' : np.array(self.xform_data),
- 'reduce' : self.reduce,
- 'align' : self.align,
- 'normalize' : self.normalize,
- 'semantic' : self.semantic,
- 'corpus' : np.array(self.corpus) if isinstance(self.corpus, list) else self.corpus,
- 'kwargs' : self.kwargs,
- 'version' : self.version,
- 'dtype' : self.dtype
+ 'data': data,
+ 'xform_data': self.xform_data,
+ 'reduce': self.reduce,
+ 'align': self.align,
+ 'normalize': self.normalize,
+ 'semantic': self.semantic,
+ 'corpus': self.corpus,
+ 'kwargs': self.kwargs,
+ 'version': self.version,
+ 'dtype': self.dtype
}
# if extension wasn't included, add it
|
don't wrap lists in numpy arrays (less efficient with pickle
|
diff --git a/lib/rjr/node.rb b/lib/rjr/node.rb
index <HASH>..<HASH> 100644
--- a/lib/rjr/node.rb
+++ b/lib/rjr/node.rb
@@ -138,7 +138,7 @@ class Node
#
# @return self
def halt
- em.stop_event_loop
+ em.halt
tp.stop
self
end
diff --git a/lib/rjr/util/em_adapter.rb b/lib/rjr/util/em_adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/rjr/util/em_adapter.rb
+++ b/lib/rjr/util/em_adapter.rb
@@ -48,7 +48,7 @@ class EMAdapter
#
# @return self
def halt
- self.stop_event_loop if self.reactor_running?
+ EventMachine.stop_event_loop if EventMachine.reactor_running?
self
end
|
Correctly call stop_event_loop during halt operation
|
diff --git a/py3status/modules/taskwarrior.py b/py3status/modules/taskwarrior.py
index <HASH>..<HASH> 100644
--- a/py3status/modules/taskwarrior.py
+++ b/py3status/modules/taskwarrior.py
@@ -13,7 +13,7 @@ Format placeholders:
Requires
task: https://taskwarrior.org/download/
-@author James Smith http://jazmit.github.io/
+@author James Smith https://jazmit.github.io
@license BSD
SAMPLE OUTPUT
|
taskwarrior: replace http with secure https
|
diff --git a/test/autofit/test_non_linear.py b/test/autofit/test_non_linear.py
index <HASH>..<HASH> 100644
--- a/test/autofit/test_non_linear.py
+++ b/test/autofit/test_non_linear.py
@@ -1,6 +1,7 @@
import os
import shutil
from functools import wraps
+import itertools
import pytest
from autolens import conf
@@ -1323,6 +1324,7 @@ class TestLabels(object):
r'x4p2_{\mathrm{a1}}', r'x4p3_{\mathrm{a1}}']
def test_real_class(self, label_optimizer):
+ mass_profiles.EllipticalMassProfile._ids = itertools.count()
label_optimizer.variable.mass_profile = mass_profiles.EllipticalSersic
labels = label_optimizer.paramnames_labels
|
resetting _id/component number for testing
|
diff --git a/lib/term.js b/lib/term.js
index <HASH>..<HASH> 100644
--- a/lib/term.js
+++ b/lib/term.js
@@ -1449,7 +1449,7 @@ Term.prototype.object = function() {
term._query.push(termTypes.OBJECT)
var args = [];
for(var i=0; i<_args.length; i++) {
- args.push(new Term(this._r).expr(_args[i])._wrap()._query)
+ args.push(new Term(this._r).expr(_args[i])._query)
}
term._query.push(args)
return term;
|
r.object shouldn't wrap for implicit terms. Fix #<I>
|
diff --git a/rdfunit-validate/src/test/java/org/aksw/rdfunit/validate/integration/PatternsGeneratorsIntegrationTest.java b/rdfunit-validate/src/test/java/org/aksw/rdfunit/validate/integration/PatternsGeneratorsIntegrationTest.java
index <HASH>..<HASH> 100644
--- a/rdfunit-validate/src/test/java/org/aksw/rdfunit/validate/integration/PatternsGeneratorsIntegrationTest.java
+++ b/rdfunit-validate/src/test/java/org/aksw/rdfunit/validate/integration/PatternsGeneratorsIntegrationTest.java
@@ -111,6 +111,8 @@ public class PatternsGeneratorsIntegrationTest {
} else {
assertEquals(executionType + ": Failed test cases not as expected for " + resource, failedTestCases, overviewResults.getFailedTests());
}
+
+ assertEquals(executionType + ": There should be no failed test cases for " + resource, 0, overviewResults.getErrorTests());
}
}
|
check for test cases that returned an Error
|
diff --git a/montblanc/tests/test_meq_tf.py b/montblanc/tests/test_meq_tf.py
index <HASH>..<HASH> 100644
--- a/montblanc/tests/test_meq_tf.py
+++ b/montblanc/tests/test_meq_tf.py
@@ -116,7 +116,7 @@ def get_point_sources(nsrc):
Q[:] = rf(size=Q.shape)*0.1
U[:] = rf(size=U.shape)*0.1
V[:] = rf(size=V.shape)*0.1
- I[:] = np.sqrt(Q**2 + U**2 + V**2)
+ I[:] = np.sqrt(Q**2 + U**2 + V**2)*1.5 + rf(size=I.shape)*0.1
# Zero and invert selected stokes parameters
if nsrc > 0:
|
Make radiation non-coherent
to make the test case more representative
|
diff --git a/mocket/mocket.py b/mocket/mocket.py
index <HASH>..<HASH> 100644
--- a/mocket/mocket.py
+++ b/mocket/mocket.py
@@ -94,7 +94,6 @@ class FakeSSLContext(SuperFakeSSLContext):
return sock
def wrap_bio(self, incoming, outcoming, *args, **kwargs):
- # FIXME: fake SSLObject implementation
ssl_obj = MocketSocket()
ssl_obj._host = kwargs['server_hostname']
return ssl_obj
|
Removing old FIXME.
|
diff --git a/pulsarpy/submit_to_dcc.py b/pulsarpy/submit_to_dcc.py
index <HASH>..<HASH> 100644
--- a/pulsarpy/submit_to_dcc.py
+++ b/pulsarpy/submit_to_dcc.py
@@ -387,6 +387,17 @@ class Submit():
payload["size_range"] = rec.size_range
payload["strand_specificity"] = rec.strand_specific
payload["source"] = rec.vendor["id"]
+
+ def post_single_cell_sorting(self, rec_id, patch=False)
+ rec = models.SingleCellSorting(rec_id)
+ aliases = []
+ aliases.append(rec.abbrev_id())
+ name = rec.name
+ if name:
+ aliases.append(self.clean_name(name))
+ payload = {}
+ payload["aliases"] = aliases
+ sreqs = rec.sequencing_requests
|
Started method to post single_cell_sortings
|
diff --git a/lib/sprockets/sass_template.rb b/lib/sprockets/sass_template.rb
index <HASH>..<HASH> 100644
--- a/lib/sprockets/sass_template.rb
+++ b/lib/sprockets/sass_template.rb
@@ -27,7 +27,7 @@ module Sprockets
cache_store: SassCacheStore.new(input[:cache]),
load_paths: input[:environment].paths,
sprockets: {
- context: input[:context],
+ context: input[:environment].context_class.new(input),
environment: input[:environment]
}
}
|
Initialize fresh context for sass template
|
diff --git a/lib/socket.js b/lib/socket.js
index <HASH>..<HASH> 100644
--- a/lib/socket.js
+++ b/lib/socket.js
@@ -586,12 +586,22 @@ Socket.prototype.close = function () {
close();
}
+ function waitForUpgrade() {
+ // wait for upgrade to finish since we can't send packets while pausing a transport
+ self.once('upgrade', cleanupAndClose);
+ self.once('upgradeError', cleanupAndClose);
+ }
+
if (this.writeBuffer.length) {
- this.once('drain', close);
+ this.once('drain', function() {
+ if (this.upgrading) {
+ waitForUpgrade();
+ } else {
+ close();
+ }
+ });
} else if (this.upgrading) {
- // wait for upgrade to finish since we can't send packets while pausing a transport
- this.once('upgrade', cleanupAndClose);
- this.once('upgradeError', cleanupAndClose);
+ waitForUpgrade();
} else {
close();
}
|
Fixed transport close deferring logic.
Transport can still be upgrading after deferring until the drain event.
|
diff --git a/shared/api/url.go b/shared/api/url.go
index <HASH>..<HASH> 100644
--- a/shared/api/url.go
+++ b/shared/api/url.go
@@ -57,7 +57,7 @@ func (u *URL) Project(projectName string) *URL {
// Target sets the "target" query parameter in the URL if the clusterMemberName is not empty or "default".
func (u *URL) Target(clusterMemberName string) *URL {
- if clusterMemberName != "" {
+ if clusterMemberName != "" && clusterMemberName != "none" {
queryArgs := u.Query()
queryArgs.Add("target", clusterMemberName)
u.RawQuery = queryArgs.Encode()
|
shared/api/url: Don't allow 'none' as target
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -100,7 +100,8 @@ with readme_file:
with changes_file:
long_description = readme_file.read() + '\n' + changes_file.read()
-package_data = {'setuptools': ['site-patch.py']}
+package_data = {
+ 'setuptools': ['script (dev).tmpl', 'script.tmpl', 'site-patch.py']}
force_windows_specific_files = (
os.environ.get("SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES")
not in (None, "", "0")
|
Include the script template files - fixes #<I>
The rename of the script template files to be .tmpl put them
into the realm of package data, rather than python files that
would be bundled automatically. Include them specifically in
package data so that they'll actually be installed.
|
diff --git a/src/transformers/models/auto/tokenization_auto.py b/src/transformers/models/auto/tokenization_auto.py
index <HASH>..<HASH> 100644
--- a/src/transformers/models/auto/tokenization_auto.py
+++ b/src/transformers/models/auto/tokenization_auto.py
@@ -369,7 +369,13 @@ class AutoTokenizer:
if tokenizer_class_fast and (use_fast or tokenizer_class_py is None):
return tokenizer_class_fast.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
else:
- return tokenizer_class_py.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
+ if tokenizer_class_py is not None:
+ return tokenizer_class_py.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
+ else:
+ raise ValueError(
+ "This tokenizer cannot be instantiated. Please make sure you have `sentencepiece` installed "
+ "in order to use this tokenizer."
+ )
raise ValueError(
"Unrecognized configuration class {} to build an AutoTokenizer.\n"
|
Better warning when loading a tokenizer with AutoTokenizer w/o SnetencePiece (#<I>)
|
diff --git a/src/Middleware/EmbeddedMiddleware.php b/src/Middleware/EmbeddedMiddleware.php
index <HASH>..<HASH> 100644
--- a/src/Middleware/EmbeddedMiddleware.php
+++ b/src/Middleware/EmbeddedMiddleware.php
@@ -60,7 +60,12 @@ class EmbeddedMiddleware extends AbstractMiddleware
public function getCallable()
{
- return $this->getInvokable()->getCallable();
+ $invokable = $this->getInvokable();
+ if($application = $this->getApplication()) {
+ $invokable->setApplication($this->getApplication());
+ }
+
+ return $invokable->getCallable();
}
|
Inject application in invokables embedded in EmbeddedMiddleware
|
diff --git a/flubber/loop.py b/flubber/loop.py
index <HASH>..<HASH> 100644
--- a/flubber/loop.py
+++ b/flubber/loop.py
@@ -36,6 +36,7 @@ def get_loop():
class Handler(object):
+ __slots__ = ('_callback', '_args', '_kwargs', '_cancelled')
def __init__(self, callback, args=(), kwargs={}):
self._callback = callback
@@ -61,6 +62,7 @@ class Handler(object):
class Timer(Handler):
+ __slots__ = ('_timer')
def __init__(self, callback, args=(), kwargs={}, timer=None):
super(Timer, self).__init__(callback, args, kwargs)
|
Added __slots__ to Handler and Timer objects
|
diff --git a/languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanSpellerRule.java b/languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanSpellerRule.java
index <HASH>..<HASH> 100644
--- a/languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanSpellerRule.java
+++ b/languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanSpellerRule.java
@@ -64,7 +64,7 @@ public class GermanSpellerRule extends CompoundAwareHunspellRule {
// some exceptions for changes to the spelling in 2017 - just a workaround so we don't have to touch the binary dict:
private static final Pattern PREVENT_SUGGESTION = Pattern.compile(
- ".*(?i:Majonäse|Bravur|Anschovis|Belkanto|Campagne|Frotté|Grisli|Jockei|Joga|Kalvinismus|Kanossa|Kargo|Ketschup|" +
+ ".*(Majonäse|Bravur|Anschovis|Belkanto|Campagne|Frotté|Grisli|Jockei|Joga|Kalvinismus|Kanossa|Kargo|Ketschup|" +
"Kollier|Kommunikee|Masurka|Negligee|Nessessär|Poulard|Varietee|Wandalismus|kalvinist).*");
private final Set<String> wordsToBeIgnoredInCompounds = new HashSet<>();
|
[de] exceptions are case-sensitive now, as "Kolier" otherwise hides the suggestions for misspelled "protokolieren", being a substring of it (#<I>)
|
diff --git a/src/phenomic-loader/minify.js b/src/phenomic-loader/minify.js
index <HASH>..<HASH> 100644
--- a/src/phenomic-loader/minify.js
+++ b/src/phenomic-loader/minify.js
@@ -4,7 +4,7 @@ export default (
): PhenomicCollection => {
if (!Array.isArray(collection)) {
throw new Error(
- `minify except a valid collection instead of ${ typeof collection }`
+ `minify expect a valid collection instead of ${ typeof collection }`
)
}
|
Fix typo error in phenomic/loader/minify.js (#<I>)
|
diff --git a/lib/pdk/module/update_manager.rb b/lib/pdk/module/update_manager.rb
index <HASH>..<HASH> 100644
--- a/lib/pdk/module/update_manager.rb
+++ b/lib/pdk/module/update_manager.rb
@@ -86,13 +86,13 @@ module PDK
files_to_write = @added_files
files_to_write += @modified_files.reject { |file| @diff_cache[file[:path]].nil? }
- files_to_write.each do |file|
- write_file(file[:path], file[:content])
- end
-
@removed_files.each do |file|
unlink_file(file)
end
+
+ files_to_write.each do |file|
+ write_file(file[:path], file[:content])
+ end
end
private
|
Delete files before writing into them
If a template rolls out one of the files we would delete in the regular
course of action, it should be there after the conversion.
|
diff --git a/registry/response/terraform_provider.go b/registry/response/terraform_provider.go
index <HASH>..<HASH> 100644
--- a/registry/response/terraform_provider.go
+++ b/registry/response/terraform_provider.go
@@ -45,13 +45,14 @@ type TerraformProviderPlatform struct {
// structure for a provider platform with all details required to perform a
// download.
type TerraformProviderPlatformLocation struct {
- OS string `json:"os"`
- Arch string `json:"arch"`
- Filename string `json:"filename"`
- DownloadURL string `json:"download_url"`
- ShasumsURL string `json:"shasums_url"`
- ShasumsSignatureURL string `json:"shasums_signature_url"`
- Shasum string `json:"shasum"`
+ Protocols []string `json:"protocols"`
+ OS string `json:"os"`
+ Arch string `json:"arch"`
+ Filename string `json:"filename"`
+ DownloadURL string `json:"download_url"`
+ ShasumsURL string `json:"shasums_url"`
+ ShasumsSignatureURL string `json:"shasums_signature_url"`
+ Shasum string `json:"shasum"`
SigningKeys SigningKeyList `json:"signing_keys"`
}
|
registry/response: Add protocols to DL resp
|
diff --git a/src/client.js b/src/client.js
index <HASH>..<HASH> 100644
--- a/src/client.js
+++ b/src/client.js
@@ -490,7 +490,7 @@ MatrixClient.prototype.rehydrateDevice = async function() {
},
);
} catch (e) {
- logger.info("could not get dehydrated device", e);
+ logger.info("could not get dehydrated device", e.toString());
return;
}
|
Omit stack trace if rehydration fails
|
diff --git a/test/dnsimple.spec.js b/test/dnsimple.spec.js
index <HASH>..<HASH> 100644
--- a/test/dnsimple.spec.js
+++ b/test/dnsimple.spec.js
@@ -18,12 +18,12 @@ describe('dnsimple module', function() {
describe('#setUserAgent', function() {
it('respects the default User-Agent', function() {
- expect(dnsimple._api.userAgent).to.equal('dnsimple-node/v2');
+ expect(dnsimple._api.userAgent).to.equal('dnsimple-node/2.4.0');
});
it('composes the User-Agent', function() {
dnsimple.setUserAgent('my-app');
- expect(dnsimple._api.userAgent).to.equal('dnsimple-node/v2 my-app');
+ expect(dnsimple._api.userAgent).to.equal('dnsimple-node/2.4.0 my-app');
});
});
|
Update User-Agent version in tests
|
diff --git a/tests/test_decode.py b/tests/test_decode.py
index <HASH>..<HASH> 100644
--- a/tests/test_decode.py
+++ b/tests/test_decode.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from bencoder import bdecode
+from bencoder import bdecode, bdecode2
import os
import sys
@@ -10,6 +10,12 @@ TORRENT_PATH = os.path.join(
)
+def test_decode2():
+ decoded, length = bdecode2(b'6:WWWWWWi233e')
+ assert decoded == b'WWWWWW'
+ assert length == 8
+
+
def test_decode_str(benchmark):
assert benchmark(bdecode, b'6:WWWWWW') == b"WWWWWW"
|
Add test for bdecode2
|
diff --git a/src/sap.m/src/sap/m/OverflowToolbarAssociativePopover.js b/src/sap.m/src/sap/m/OverflowToolbarAssociativePopover.js
index <HASH>..<HASH> 100644
--- a/src/sap.m/src/sap/m/OverflowToolbarAssociativePopover.js
+++ b/src/sap.m/src/sap/m/OverflowToolbarAssociativePopover.js
@@ -186,6 +186,7 @@ sap.ui.define(['./Popover', './PopoverRenderer', './OverflowToolbarAssociativePo
}
oPosParams._fMarginBottom = oPosParams._fDocumentHeight - oPosParams._$parent.offset().top + this._arrowOffset + oPosParams._fOffsetY;
+ return oPosParams;
};
/**
|
[INTERNAL] Changes in the popover computation lead to exposing this issue.
- The oPosParams are not returned in some case which looks like a miss and leads to error now.
Change-Id: I<I>b<I>f<I>d<I>b4c<I>ca8d<I>cec0a9f<I>ac6
|
diff --git a/src/toil/test/sort/sortTest.py b/src/toil/test/sort/sortTest.py
index <HASH>..<HASH> 100755
--- a/src/toil/test/sort/sortTest.py
+++ b/src/toil/test/sort/sortTest.py
@@ -73,9 +73,9 @@ class SortTest(ToilTest, MesosTestSupport, ParasolTestSupport):
self.inputFile = os.path.join(self.tempDir, "fileToSort.txt")
def tearDown(self):
- ToilTest.tearDown(self)
if os.path.exists(self.tempDir):
shutil.rmtree(self.tempDir)
+ ToilTest.tearDown(self)
def _toilSort(self, jobStoreLocator, batchSystem,
lines=defaultLines, N=defaultN, testNo=1, lineLen=defaultLineLen,
|
tearDown after removing the folder.
|
diff --git a/src/Object/Klip/Klip.php b/src/Object/Klip/Klip.php
index <HASH>..<HASH> 100644
--- a/src/Object/Klip/Klip.php
+++ b/src/Object/Klip/Klip.php
@@ -21,6 +21,20 @@ class Klip extends BaseApiResource
'id', 'company', 'date_created', 'last_updated', 'created_by', 'share_rights'
];
+
+ /**
+ * BaseApiResource constructor.
+ * @param array $data
+ */
+ public function __construct(array $data = [])
+ {
+ parent::__construct($data);
+
+ if(isset($this->schema)){
+ $this->schema = new KlipSchema($this->schema);
+ }
+ }
+
/**
* @param $name
* @return $this
|
S<I> Auto resolve KlipSchema to Klips
|
diff --git a/revel.go b/revel.go
index <HASH>..<HASH> 100644
--- a/revel.go
+++ b/revel.go
@@ -227,6 +227,17 @@ func getLogger(name string) *log.Logger {
output = os.DevNull
}
+ logPath := filepath.Dir(output)
+ if _, err := os.Stat(logPath); err != nil {
+ if os.IsNotExist(err) {
+ if err := os.MkdirAll(logPath, 0777); err != nil {
+ log.Fatalln("Failed to create log dir", output, ":", err)
+ }
+ } else {
+ log.Fatalln("Failed to stat log dir", output, ":", err)
+ }
+ }
+
file, err := os.OpenFile(output, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
if err != nil {
log.Fatalln("Failed to open log file", output, ":", err)
|
create the log directory if it does not already exist
|
diff --git a/jquery-loadTemplate/jquery.loadTemplate-1.2.0.js b/jquery-loadTemplate/jquery.loadTemplate-1.2.0.js
index <HASH>..<HASH> 100644
--- a/jquery-loadTemplate/jquery.loadTemplate-1.2.0.js
+++ b/jquery-loadTemplate/jquery.loadTemplate-1.2.0.js
@@ -361,7 +361,7 @@
formatter = $elem.attr("data-format");
if (formatter && typeof formatters[formatter] === "function") {
var formatOptions = $elem.attr("data-format-options");
- return formatters[formatter](value, formatOptions);
+ return formatters[formatter].call($elem[0],value, formatOptions);
}
}
|
Pass element to formatter function
let others control elements as well as values associated with template
formatters by passing element as this to to the formatter function
|
diff --git a/lib/datalib.php b/lib/datalib.php
index <HASH>..<HASH> 100644
--- a/lib/datalib.php
+++ b/lib/datalib.php
@@ -717,7 +717,7 @@ function get_courses_search($searchterms, $sort='fullname ASC', $page=0, $record
$params = array();
$i = 0;
- $concat = $DB->sql_concat("COALESCE(c.summary, ". $DB->sql_empty() .")", "' '", 'c.fullname', "' '", 'c.idnumber', "' '", 'c.shortname');
+ $concat = $DB->sql_concat("COALESCE(c.summary, '". $DB->sql_empty() ."')", "' '", 'c.fullname', "' '", 'c.idnumber', "' '", 'c.shortname');
foreach ($searchterms as $searchterm) {
$i++;
|
MDL-<I> course search - emergency regression fix
|
diff --git a/driver/src/main/java/org/neo4j/driver/internal/connector/socket/SocketClient.java b/driver/src/main/java/org/neo4j/driver/internal/connector/socket/SocketClient.java
index <HASH>..<HASH> 100644
--- a/driver/src/main/java/org/neo4j/driver/internal/connector/socket/SocketClient.java
+++ b/driver/src/main/java/org/neo4j/driver/internal/connector/socket/SocketClient.java
@@ -109,7 +109,14 @@ public class SocketClient
}
catch ( IOException e )
{
- throw new ClientException( "Unable to close socket connection properly." + e.getMessage(), e );
+ if( e.getMessage().equals( "An existing connection was forcibly closed by the remote host" ) )
+ {
+ // Swallow this exception as it is caused by connection already closed by server
+ }
+ else
+ {
+ throw new ClientException("Unable to close socket connection properly." + e.getMessage(), e);
+ }
}
}
|
Mute IOE in socket.close caused by server get killed
|
diff --git a/src/FeedIo/Rule/DateTimeBuilder.php b/src/FeedIo/Rule/DateTimeBuilder.php
index <HASH>..<HASH> 100644
--- a/src/FeedIo/Rule/DateTimeBuilder.php
+++ b/src/FeedIo/Rule/DateTimeBuilder.php
@@ -150,7 +150,7 @@ class DateTimeBuilder
if (false === strtotime($string)) {
throw new \InvalidArgumentException('Impossible to convert date : '.$string);
}
- $date = new \DateTime($string);
+ $date = new \DateTime($string, $this->getFeedTimezone());
$date->setTimezone($this->getTimezone());
return $date;
|
Sometimes we need to set the timezone for non-standards date
|
diff --git a/lib/byebug.rb b/lib/byebug.rb
index <HASH>..<HASH> 100644
--- a/lib/byebug.rb
+++ b/lib/byebug.rb
@@ -102,11 +102,7 @@ module Byebug
Byebug.const_set('INITIAL_DIR', Dir.pwd) unless defined? Byebug::INITIAL_DIR
end
Byebug.tracing = options[:tracing] unless options[:tracing].nil?
- if Byebug.started?
- retval = block && block.call(self)
- else
- retval = Byebug._start(&block)
- end
+ retval = Byebug._start(&block)
post_mortem if options[:post_mortem]
return retval
end
|
Same behaviour is implemented in _start
|
diff --git a/lib/uirusu/vturl.rb b/lib/uirusu/vturl.rb
index <HASH>..<HASH> 100644
--- a/lib/uirusu/vturl.rb
+++ b/lib/uirusu/vturl.rb
@@ -38,9 +38,10 @@ module Uirusu
params = {
apikey: api_key,
- resource: resource
+ url: resource
}
- Uirusu.query_api SCAN_URL, params
+
+ Uirusu.query_api SCAN_URL, params, true
end
# Searches reports by URL from Virustotal.com
@@ -58,7 +59,8 @@ module Uirusu
apikey: api_key,
resource: resource
}
- Uirusu.query_api REPORT_URL, params.merge!(args)
+
+ Uirusu.query_api REPORT_URL, params.merge!(args), true
end
# Searches reports by URL from Virustotal.com
|
Fixed URL api
It had the wrong parameter and wasn’t a post
|
diff --git a/lib/ui/labels/tests/removable-label-spec.js b/lib/ui/labels/tests/removable-label-spec.js
index <HASH>..<HASH> 100644
--- a/lib/ui/labels/tests/removable-label-spec.js
+++ b/lib/ui/labels/tests/removable-label-spec.js
@@ -9,7 +9,7 @@ describe('avRemovableLabel', function() {
});
beforeEach(inject(function($templateCache) {
- $templateCache.put('ui/removable-label/removable-label-tpl.html', '');
+ $templateCache.put('ui/labels/removable-label-tpl.html', '');
}));
availity.mock.directiveSpecHelper();
|
fix label test
* broke on refactor
|
diff --git a/lib/CancellationToken.php b/lib/CancellationToken.php
index <HASH>..<HASH> 100644
--- a/lib/CancellationToken.php
+++ b/lib/CancellationToken.php
@@ -42,6 +42,8 @@ interface CancellationToken
* Throws the `CancelledException` if cancellation has been requested, otherwise does nothing.
*
* @return void
+ *
+ * @throws CancelledException
*/
public function throwIfRequested();
}
|
Annotate that throwIfRequested might throw CancelledException
|
diff --git a/lib/migration_runner.rb b/lib/migration_runner.rb
index <HASH>..<HASH> 100644
--- a/lib/migration_runner.rb
+++ b/lib/migration_runner.rb
@@ -54,7 +54,7 @@ module DataMapper
if level.nil?
migration.perform_up()
else
- migration.perform_up() if migration.position <= level
+ migration.perform_up() if migration.position <= level.to_i
end
end
end
@@ -68,7 +68,7 @@ module DataMapper
if level.nil?
migration.perform_down()
else
- migration.perform_down() if migration.position > level
+ migration.perform_down() if migration.position > level.to_i
end
end
end
|
Make sure our level is an integer.
|
diff --git a/telebot/apihelper.py b/telebot/apihelper.py
index <HASH>..<HASH> 100644
--- a/telebot/apihelper.py
+++ b/telebot/apihelper.py
@@ -1,6 +1,10 @@
# -*- coding: utf-8 -*-
import requests
+try:
+ from requests.packages.urllib3 import fields
+except ImportError:
+ fields = None
import telebot
from telebot import types
from telebot import util
@@ -29,6 +33,8 @@ def _make_request(token, method_name, method='get', params=None, files=None, bas
logger.debug("Request: method={0} url={1} params={2} files={3}".format(method, request_url, params, files))
read_timeout = READ_TIMEOUT
connect_timeout = CONNECT_TIMEOUT
+ if files and fields:
+ fields.format_header_param = _no_encode(fields.format_header_param)
if params:
if 'timeout' in params: read_timeout = params['timeout'] + 10
if 'connect-timeout' in params: connect_timeout = params['connect-timeout'] + 10
@@ -568,6 +574,15 @@ def _convert_markup(markup):
return markup
+def _no_encode(func):
+ def wrapper(key, val):
+ if key == 'filename':
+ return '{0}={1}'.format(key, val)
+ else:
+ return func(key, val)
+ return wrapper
+
+
class ApiException(Exception):
"""
This class represents an Exception thrown when a call to the Telegram API fails.
|
Non-ASCII chars for filename. Telegram doesn't accept rfc<I> styled filename. Using utf-8 directly.
|
diff --git a/web/concrete/single_pages/dashboard/system/seo/tracking_codes.php b/web/concrete/single_pages/dashboard/system/seo/tracking_codes.php
index <HASH>..<HASH> 100644
--- a/web/concrete/single_pages/dashboard/system/seo/tracking_codes.php
+++ b/web/concrete/single_pages/dashboard/system/seo/tracking_codes.php
@@ -10,9 +10,6 @@ $form = Loader::helper('form');
<form id="tracking-code-form" action="<?=$this->action('')?>" method="post">
<div class="ccm-pane-body">
<?=$this->controller->token->output('update_tracking_code')?>
- <?php if (!empty($token_error) && is_array($token_error)) { ?>
- <div class="alert-message error"><?=$token_error[0]?></div>
- <?php } ?>
<div class="clearfix">
<?=$form->label('tracking_code', t('Tracking Codes'))?>
<div class="input">
|
Remove unnecessary error printing. As it is done by the default error handler now.
Former-commit-id: 4f4eaa<I>f<I>d3eacb<I>e<I>c<I>c1e8dac<I>
|
diff --git a/cmd/minikube/cmd/cache.go b/cmd/minikube/cmd/cache.go
index <HASH>..<HASH> 100644
--- a/cmd/minikube/cmd/cache.go
+++ b/cmd/minikube/cmd/cache.go
@@ -38,8 +38,8 @@ const allFlag = "all"
// cacheCmd represents the cache command
var cacheCmd = &cobra.Command{
Use: "cache",
- Short: "Add, delete, or push a local image into minikube",
- Long: "Add, delete, or push a local image into minikube",
+ Short: "Manage cache for images",
+ Long: "Add an image into minikube as a local cache, or delete, reload the cached images",
}
// addCacheCmd represents the cache add command
|
Improve description for minikube cache command
|
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
@@ -4,9 +4,11 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
-SimpleCov.start
+SimpleCov.start do
+ add_filter('.gems')
+end
-ENV['RACK_ENV'] ||= "test"
+ENV['RACK_ENV'] ||= 'test'
require 'tilt/jbuilder'
require 'sinatra/jbuilder'
|
Ignore .gems directory when running coverage
|
diff --git a/lib/haml/helpers/action_view_mods.rb b/lib/haml/helpers/action_view_mods.rb
index <HASH>..<HASH> 100644
--- a/lib/haml/helpers/action_view_mods.rb
+++ b/lib/haml/helpers/action_view_mods.rb
@@ -107,9 +107,9 @@ module ActionView
return content_tag_without_haml(name, *args) {preserve(&block)}
end
- returning content_tag_without_haml(name, *args, &block) do |content|
- return Haml::Helpers.preserve(content) if preserve && content
- end
+ content = content_tag_without_haml(name, *args, &block)
+ content = Haml::Helpers.preserve(content) if preserve && content
+ content
end
alias_method :content_tag_without_haml, :content_tag
|
[Haml] Avoid using Object#returning which was removed in Rails 3.
See <URL>
|
diff --git a/dvc/command/init.py b/dvc/command/init.py
index <HASH>..<HASH> 100644
--- a/dvc/command/init.py
+++ b/dvc/command/init.py
@@ -63,7 +63,7 @@ StoragePath =
ProjectName =
'''
- EMPTY_FILE_NAME = 'empty'
+ EMPTY_FILE_NAME = '.empty'
EMPTY_FILE_CHECKSUM = '0000000'
def __init__(self, settings):
|
dvc: rename empty to .empty
This will allow us to hide it.
Fixes #<I>
|
diff --git a/admin.go b/admin.go
index <HASH>..<HASH> 100644
--- a/admin.go
+++ b/admin.go
@@ -608,7 +608,9 @@ func (ca *clusterAdmin) ListConsumerGroupOffsets(group string, topicPartitions m
partitions: topicPartitions,
}
- if ca.conf.Version.IsAtLeast(V0_8_2_2) {
+ if ca.conf.Version.IsAtLeast(V0_10_2_0) {
+ request.Version = 2
+ } else if ca.conf.Version.IsAtLeast(V0_8_2_2) {
request.Version = 1
}
|
support ListConsumerGroupOffsets without topicPartition
|
diff --git a/lib/airborne/request_expectations.rb b/lib/airborne/request_expectations.rb
index <HASH>..<HASH> 100644
--- a/lib/airborne/request_expectations.rb
+++ b/lib/airborne/request_expectations.rb
@@ -72,6 +72,8 @@ module Airborne
end
def expect_json_impl(expected, actual)
+ return if nil_optional_hash?(expected, actual)
+
actual = actual.to_s if expected.class == Regexp
return expect(actual).to match(expected) if property?(expected)
@@ -90,7 +92,7 @@ module Airborne
expected_value = extract_expected(expected, prop)
actual_value = extract_actual(actual, prop)
- next expect_json_impl(expected_value, actual_value) if expected_value.is_a?(Hash)
+ next expect_json_impl(expected_value, actual_value) if hash?(expected_value)
next expected_value.call(actual_value) if expected_value.is_a?(Proc)
next expect(actual_value.to_s).to match(expected_value) if expected_value.is_a?(Regexp)
|
add optional hash to expect_json
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.