diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/andes/models/area.py b/andes/models/area.py
index <HASH>..<HASH> 100644
--- a/andes/models/area.py
+++ b/andes/models/area.py
@@ -3,6 +3,7 @@ from andes.core.model import Model, ModelData
from andes.core.var import ExtAlgeb, Algeb # NOQA
from andes.core.service import NumReduce, NumRepeat, BackRef
from andes.shared import np
+from andes.utils.tab import Tab
class AreaData(ModelData):
@@ -32,3 +33,20 @@ class Area(AreaData, Model):
info='Bus voltage magnitude')
# self.time = Algeb(e_str='time - dae_t', v_setter=True)
+
+ def bus_table(self):
+ """
+ Return a formatted table with area idx and bus idx correspondence
+
+ Returns
+ -------
+ str
+ Formatted table
+
+ """
+ if self.n:
+ header = ['Area ID', 'Bus ID']
+ rows = [(i, j) for i, j in zip(self.idx.v, self.Bus.v)]
+ return Tab(header=header, data=rows).draw()
+ else:
+ return ''
|
Added `Area.bus_table` for printing the area-bus correspondence.
|
diff --git a/source/test/network_test/test_non_acknowledged_messages.py b/source/test/network_test/test_non_acknowledged_messages.py
index <HASH>..<HASH> 100644
--- a/source/test/network_test/test_non_acknowledged_messages.py
+++ b/source/test/network_test/test_non_acknowledged_messages.py
@@ -33,6 +33,7 @@ def wait_for_test_finished(queue, udp_endpoint, connector):
print('process with id {0} will stop reactor'.format(str(os.getpid())))
reactor.callFromThread(reactor.stop)
print('process with id {0} did stop reactor'.format(str(os.getpid())))
+ os._exit(0)
@@ -142,5 +143,5 @@ def test_non_acknowledged_messages():
if __name__ == '__main__':
- # test_non_acknowledged_messages()
- pytest.main([__file__])
\ No newline at end of file
+ test_non_acknowledged_messages()
+ # pytest.main([__file__])
\ No newline at end of file
|
add process shutdown
as the shutting down twisted in a controlled manner does not work the process is killed
|
diff --git a/src/app/actions/psmtable/refine.py b/src/app/actions/psmtable/refine.py
index <HASH>..<HASH> 100644
--- a/src/app/actions/psmtable/refine.py
+++ b/src/app/actions/psmtable/refine.py
@@ -190,7 +190,7 @@ def generate_psms_with_proteingroups(psms, pgdb, specfncol, unroll):
psm_masters.append(master)
psm_pg_proteins.append([protein[lookups.PROTEIN_ACC_INDEX]
for protein in group])
- outpsm = {mzidtsvdata.HEADER_MASTER_PROT: ';'.join(psm_masters),
+ outpsm = {mzidtsvdata.HEADER_MASTER_PROT: ';'.join(sorted(psm_masters)),
mzidtsvdata.HEADER_PG_CONTENT: ';'.join(
[','.join([y for y in x]) for x in psm_pg_proteins]),
mzidtsvdata.HEADER_PG_AMOUNT_PROTEIN_HITS: ';'.join(
|
Sort proteingroup masters if multiple so we can have reproducible output
|
diff --git a/tools/fixsubjectNames.go b/tools/fixsubjectNames.go
index <HASH>..<HASH> 100644
--- a/tools/fixsubjectNames.go
+++ b/tools/fixsubjectNames.go
@@ -5,6 +5,7 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
+ "os"
"strings"
"github.com/mozilla/tls-observatory/certificate"
@@ -13,11 +14,11 @@ import (
func main() {
db, err := database.RegisterConnection(
- "postgres",
- "postgres",
- "pass",
- "172.17.0.1:5432",
- "disable")
+ os.Getenv("TLSOBS_POSTGRESDB"),
+ os.Getenv("TLSOBS_POSTGRESUSER"),
+ os.Getenv("TLSOBS_POSTGRESPASS"),
+ os.Getenv("TLSOBS_POSTGRES"),
+ "require")
defer db.Close()
if err != nil {
panic(err)
|
Use env variable to access the DB in fixsubjectNames script
|
diff --git a/pylint/lint.py b/pylint/lint.py
index <HASH>..<HASH> 100644
--- a/pylint/lint.py
+++ b/pylint/lint.py
@@ -135,20 +135,6 @@ def _merge_stats(stats):
return merged
-@contextlib.contextmanager
-def _patch_sysmodules():
- # Context manager that permits running pylint, on Windows, with -m switch
- # and with --jobs, as in 'python -2 -m pylint .. --jobs'.
- # For more details why this is needed,
- # see Python issue http://bugs.python.org/issue10845.
-
- mock_main = __name__ != "__main__" # -m switch
- if mock_main:
- sys.modules["__main__"] = sys.modules[__name__]
-
- yield
-
-
# Python Linter class #########################################################
MSGS = {
@@ -949,8 +935,7 @@ class PyLinter(
if self.config.jobs == 1:
self._do_check(files_or_modules)
else:
- with _patch_sysmodules():
- self._parallel_check(files_or_modules)
+ self._parallel_check(files_or_modules)
def _get_jobs_config(self):
child_config = collections.OrderedDict()
|
remove entire _patch_submodules
|
diff --git a/Controller/Listener/TranslationsListener.php b/Controller/Listener/TranslationsListener.php
index <HASH>..<HASH> 100644
--- a/Controller/Listener/TranslationsListener.php
+++ b/Controller/Listener/TranslationsListener.php
@@ -1,7 +1,7 @@
<?php
App::uses('CrudSubject', 'Crud.Controller/Listener');
-App::uses('CrudListener', 'Crud.Controller/Listener');
+App::uses('CakeEventListener', 'Event');
/**
* TranslationsEvent for Crud
@@ -16,7 +16,7 @@ App::uses('CrudListener', 'Crud.Controller/Listener');
* @see http://book.cakephp.org/2.0/en/controllers/components.html#Component
* @copyright Nodes ApS, 2012
*/
-class TranslationsListener extends CrudListener {
+class TranslationsListener implements CakeEventListener {
/**
* Configurations for TranslationsEvent
|
TranslationsListener does not need to extend CrudListener
|
diff --git a/src/main/java/com/couchbase/lite/Attachment.java b/src/main/java/com/couchbase/lite/Attachment.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/couchbase/lite/Attachment.java
+++ b/src/main/java/com/couchbase/lite/Attachment.java
@@ -201,7 +201,7 @@ public class Attachment {
else if (value instanceof AttachmentInternal) {
throw new IllegalArgumentException("AttachmentInternal objects not expected here. Could indicate a bug");
}
- else {
+ else if (value != null) {
updatedAttachments.put(name, value);
}
}
|
Update to pull request #<I> from b-smets -- looks like it cause another unit test to fail. This change fixes that failure.
|
diff --git a/dev/com.ibm.ws.microprofile.faulttolerance.metrics.2.0/src/com/ibm/ws/microprofile/faulttolerance/metrics_20/MetricRecorderImpl.java b/dev/com.ibm.ws.microprofile.faulttolerance.metrics.2.0/src/com/ibm/ws/microprofile/faulttolerance/metrics_20/MetricRecorderImpl.java
index <HASH>..<HASH> 100644
--- a/dev/com.ibm.ws.microprofile.faulttolerance.metrics.2.0/src/com/ibm/ws/microprofile/faulttolerance/metrics_20/MetricRecorderImpl.java
+++ b/dev/com.ibm.ws.microprofile.faulttolerance.metrics.2.0/src/com/ibm/ws/microprofile/faulttolerance/metrics_20/MetricRecorderImpl.java
@@ -35,7 +35,7 @@ public class MetricRecorderImpl extends AbstractMetricRecorderImpl {
}
private static Metadata createMD(String metaDataName, MetricType metaDataMetricType, String metadataUnit) {
- Metadata metaData = Metadata.builder().withDisplayName(metaDataName).withType(metaDataMetricType).withUnit(metadataUnit).build();
+ Metadata metaData = Metadata.builder().withName(metaDataName).withType(metaDataMetricType).withUnit(metadataUnit).build();
return metaData;
}
|
Set the metric name rather than the displayName
Name is required, displayName defaults to name if not set.
|
diff --git a/gothic/gothic.go b/gothic/gothic.go
index <HASH>..<HASH> 100644
--- a/gothic/gothic.go
+++ b/gothic/gothic.go
@@ -109,7 +109,7 @@ as either "provider" or ":provider".
See https://github.com/markbates/goth/examples/main.go to see this in action.
*/
-func CompleteUserAuth(res http.ResponseWriter, req *http.Request) (goth.User, error) {
+var CompleteUserAuth = func(res http.ResponseWriter, req *http.Request) (goth.User, error) {
providerName, err := GetProviderName(req)
if err != nil {
|
Made CompleteUserAuth a var function to make it easier for people to
test with
|
diff --git a/src/MessageBird/Client.php b/src/MessageBird/Client.php
index <HASH>..<HASH> 100644
--- a/src/MessageBird/Client.php
+++ b/src/MessageBird/Client.php
@@ -19,7 +19,7 @@ class Client
const ENABLE_CONVERSATIONSAPI_WHATSAPP_SANDBOX = 'ENABLE_CONVERSATIONSAPI_WHATSAPP_SANDBOX';
const CONVERSATIONSAPI_WHATSAPP_SANDBOX_ENDPOINT = 'https://whatsapp-sandbox.messagebird.com/v1';
- const CLIENT_VERSION = '2.0.1';
+ const CLIENT_VERSION = '2.1.0';
/**
* @var string
|
CHORE: bump release version (#<I>)
|
diff --git a/chef/lib/chef/provider/ohai.rb b/chef/lib/chef/provider/ohai.rb
index <HASH>..<HASH> 100644
--- a/chef/lib/chef/provider/ohai.rb
+++ b/chef/lib/chef/provider/ohai.rb
@@ -28,14 +28,13 @@ class Chef
def action_reload
ohai = ::Ohai::System.new
- if not @new_resource.plugin
+ if @new_resource.plugin
ohai.require_plugin @new_resource.plugin
else
ohai.all_plugins
end
node.automatic_attrs.merge! ohai.data
- node.save
end
end
end
|
removing unnecessary save and fixing if statement
|
diff --git a/howdoi/howdoi.py b/howdoi/howdoi.py
index <HASH>..<HASH> 100644
--- a/howdoi/howdoi.py
+++ b/howdoi/howdoi.py
@@ -32,9 +32,7 @@ from cachelib import FileSystemCache, NullCache
from keep import utils as keep_utils
-from pygments import highlight
from pygments.lexers import guess_lexer, get_lexer_by_name
-from pygments.formatters.terminal import TerminalFormatter
from pygments.util import ClassNotFound
from rich.syntax import Syntax
from rich.console import Console
@@ -333,13 +331,12 @@ def _format_output(args, code):
# no lexer found above, use the guesser
if not lexer:
try:
- lexer = guess_lexer(code)
+ lexer = guess_lexer(code).name
except ClassNotFound:
return code
- return highlight(code,
- lexer,
- TerminalFormatter(bg='dark'))
+ syntax = Syntax(code, lexer, background_color="default", line_numbers=False)
+ return syntax
def _is_question(link):
@@ -814,10 +811,8 @@ def command_line_runner(): # pylint: disable=too-many-return-statements,too-man
args['color'] = True
result = howdoi(args)
- lang = guess_lexer(result).name
- syntax = Syntax(result, lang, background_color="default", line_numbers=False)
console = Console()
- console.print(syntax)
+ console.print(result)
# close the session to release connection
howdoi_session.close()
|
replaced pygment's highlight with rich's syntax func
|
diff --git a/logging_tree/format.py b/logging_tree/format.py
index <HASH>..<HASH> 100644
--- a/logging_tree/format.py
+++ b/logging_tree/format.py
@@ -156,7 +156,7 @@ def describe_handler(h):
yield ' Filter %s' % describe_filter(f)
formatter = getattr(h, 'formatter', None)
if formatter is not None:
- if type(formatter) is logging.Formatter:
+ if class_of(formatter) is logging.Formatter:
yield ' Formatter fmt=%r datefmt=%r' % (
getattr(formatter, '_fmt', None),
getattr(formatter, 'datefmt', None))
@@ -168,3 +168,17 @@ def describe_handler(h):
yield ' Handler ' + next(g)
for line in g:
yield ' ' + line
+
+
+def class_of(obj):
+ """Try to learn the class of `obj`.
+
+ We perform the operation gingerly, as `obj` could be any kind of
+ user-supplied object: an old-style class, a new-style class, or a
+ built-in type that doesn't follow normal rules.
+
+ """
+ cls = getattr(obj, '__class__', None)
+ if cls is None:
+ cls = type(obj)
+ return cls
|
Restore full compatibility with Python <I>
|
diff --git a/graphene_django_extras/__init__.py b/graphene_django_extras/__init__.py
index <HASH>..<HASH> 100644
--- a/graphene_django_extras/__init__.py
+++ b/graphene_django_extras/__init__.py
@@ -7,7 +7,7 @@ from .mutation import DjangoSerializerMutation
from .pagination import LimitOffsetGraphqlPagination, PageGraphqlPagination, CursorGraphqlPagination
from .types import DjangoObjectType, DjangoInputObjectType, DjangoListObjectType
-VERSION = (0, 0, 1, 'final', '')
+VERSION = (0, 0, 2, 'final', '')
__version__ = get_version(VERSION)
|
Updated dependency DRF in setup.py, to avoid an import error (from rest_framework.compat import get_related_model) produced by the new version of DRF <I>
|
diff --git a/src/Plugin.php b/src/Plugin.php
index <HASH>..<HASH> 100644
--- a/src/Plugin.php
+++ b/src/Plugin.php
@@ -42,7 +42,7 @@ class Plugin extends \craft\base\Plugin
parent::init();
// Add in our Twig extensions
- Craft::$app->view->twig->addExtension(new AgnosticFetchTwigExtension());
+ Craft::$app->view->registerTwigExtension(new AgnosticFetchTwigExtension());
}
/**
|
Use registerTwigExtension()
Fixes a bug where the plugin may cause Twig to be loaded before it should be, and another bug where the extension might not be available if the Template Mode ever changes from CP to Site, or vise-versa.
|
diff --git a/packages/icon/src/Icon.js b/packages/icon/src/Icon.js
index <HASH>..<HASH> 100644
--- a/packages/icon/src/Icon.js
+++ b/packages/icon/src/Icon.js
@@ -16,7 +16,11 @@
/* @flow */
import React, { PureComponent } from 'react';
-import { createStyledComponent, generateId } from '@mineral-ui/component-utils';
+import {
+ createStyledComponent,
+ pxToEm,
+ generateId
+} from '@mineral-ui/component-utils';
type Props = {
/** Available sizes, including custom - e.g. '5em' or '20px' */
@@ -34,9 +38,9 @@ type Props = {
const iconStyles = (props, baseTheme) => {
const theme = {
Icon_fill: baseTheme.color_gray_60,
- Icon_size_small: '2em',
- Icon_size_medium: '3em',
- Icon_size_large: '4em',
+ Icon_size_small: pxToEm(12),
+ Icon_size_medium: pxToEm(16),
+ Icon_size_large: pxToEm(20),
...baseTheme
};
|
refactor(icon): Update sizes
Updates sizes to match those used in Button
BREAKING CHANGE: Sizes changed
|
diff --git a/html/pfappserver/root/src/utils/api.js b/html/pfappserver/root/src/utils/api.js
index <HASH>..<HASH> 100644
--- a/html/pfappserver/root/src/utils/api.js
+++ b/html/pfappserver/root/src/utils/api.js
@@ -180,12 +180,13 @@ apiCall.interceptors.response.use((response) => {
/* Intercept successful API call */
const { config: { url } = {}, data: { message, warnings, quiet } = {} } = response
if (message && !quiet) {
- store.dispatch('notification/info', { message, url })
+
+ store.dispatch('notification/info', { message, url: decodeURIComponent(url) })
}
if (warnings && !quiet) {
warnings.forEach(warning => {
const { message } = warning
- store.dispatch('notification/warning', { message, url })
+ store.dispatch('notification/warning', { message, url: decodeURIComponent(url) })
})
}
store.commit('session/API_OK')
|
fix(admin(js)): decode URI in api notifications
|
diff --git a/releaser/releaser.go b/releaser/releaser.go
index <HASH>..<HASH> 100644
--- a/releaser/releaser.go
+++ b/releaser/releaser.go
@@ -53,17 +53,13 @@ type ReleaseHandler struct {
func (r ReleaseHandler) calculateVersions() (helpers.HugoVersion, helpers.HugoVersion) {
newVersion := helpers.MustParseHugoVersion(r.cliVersion)
- finalVersion := newVersion
+ finalVersion := newVersion.Next()
finalVersion.PatchLevel = 0
if newVersion.Suffix != "-test" {
newVersion.Suffix = ""
}
- if newVersion.PatchLevel == 0 {
- finalVersion = finalVersion.Next()
- }
-
finalVersion.Suffix = "-DEV"
return newVersion, finalVersion
|
releaser: Correctly set final version on patch releases
|
diff --git a/deep-core/src/test/java/com/stratio/deep/core/context/DeepSparkContextTest.java b/deep-core/src/test/java/com/stratio/deep/core/context/DeepSparkContextTest.java
index <HASH>..<HASH> 100644
--- a/deep-core/src/test/java/com/stratio/deep/core/context/DeepSparkContextTest.java
+++ b/deep-core/src/test/java/com/stratio/deep/core/context/DeepSparkContextTest.java
@@ -16,7 +16,7 @@
package com.stratio.deep.core.context;
-import static junit.framework.Assert.assertSame;
+import static org.junit.Assert.assertSame;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyString;
|
Removing deprecated class reference
|
diff --git a/lib/bugsnag/resque.rb b/lib/bugsnag/resque.rb
index <HASH>..<HASH> 100644
--- a/lib/bugsnag/resque.rb
+++ b/lib/bugsnag/resque.rb
@@ -6,8 +6,15 @@
#
module Bugsnag
class Resque < ::Resque::Failure::Base
- def self.configure
- Resque::Failure.backend = self
+ def self.configure(&block)
+ unless ::Resque::Failure.backend < ::Resque::Failure::Multiple
+ original_backend = ::Resque::Failure.backend
+ ::Resque::Failure.backend = ::Resque::Failure::Multiple
+ ::Resque::Failure.backend.classes ||= []
+ ::Resque::Failure.backend.classes << original_backend
+ end
+
+ ::Resque::Failure.backend.classes << self
::Bugsnag.configure(&block)
end
|
Auto configuration for non-rails projects
|
diff --git a/lib/questionlib.php b/lib/questionlib.php
index <HASH>..<HASH> 100644
--- a/lib/questionlib.php
+++ b/lib/questionlib.php
@@ -260,7 +260,8 @@ function match_grade_options($gradeoptionsfull, $grade, $matchgrades='error') {
// if we just need an error...
if ($matchgrades=='error') {
foreach($gradeoptionsfull as $value => $option) {
- if ($grade==$value) {
+ // slightly fuzzy test, never check floats for equality :-)
+ if (abs($grade-$value)<0.00001) {
return $grade;
}
}
|
Don't compare floats for equality! Bug #<I>
|
diff --git a/models/classes/search/index/DocumentBuilder/IndexDocumentBuilder.php b/models/classes/search/index/DocumentBuilder/IndexDocumentBuilder.php
index <HASH>..<HASH> 100644
--- a/models/classes/search/index/DocumentBuilder/IndexDocumentBuilder.php
+++ b/models/classes/search/index/DocumentBuilder/IndexDocumentBuilder.php
@@ -246,7 +246,9 @@ class IndexDocumentBuilder extends InjectionAwareService implements IndexDocumen
$customPropertiesValues = $resource->getPropertyValuesCollection($property);
$customProperties[$fieldName][] = array_map(
function (core_kernel_classes_Container $property): string {
- return $property instanceof Resource ? $property->getUri() : (string)$property;
+ return tao_helpers_Uri::encode(
+ $property instanceof Resource ? $property->getUri() : (string)$property
+ );
},
$customPropertiesValues->toArray()
);
|
fix: keep value econded in tao format
|
diff --git a/src/__tests__/ReduxRouter-test.js b/src/__tests__/ReduxRouter-test.js
index <HASH>..<HASH> 100644
--- a/src/__tests__/ReduxRouter-test.js
+++ b/src/__tests__/ReduxRouter-test.js
@@ -130,13 +130,14 @@ describe('<ReduxRouter>', () => {
});
const store = server.reduxReactRouter({ routes })(createStore)(reducer);
- store.dispatch(server.match('/parent/child/850', () => {
+ store.dispatch(server.match('/parent/child/850?key=value', (err, redirectLocation, routerState) => {
const output = renderToString(
<Provider store={store}>
<ReduxRouter />
</Provider>
);
expect(output).to.match(/Pathname: \/parent\/child\/850/);
+ expect(routerState.location.query).to.eql({ key: 'value' });
}));
});
|
Test for presence of query on server-side
|
diff --git a/core/src/main/java/jenkins/security/ResourceDomainConfiguration.java b/core/src/main/java/jenkins/security/ResourceDomainConfiguration.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/jenkins/security/ResourceDomainConfiguration.java
+++ b/core/src/main/java/jenkins/security/ResourceDomainConfiguration.java
@@ -36,6 +36,7 @@ import jenkins.util.UrlHelper;
import org.apache.commons.codec.binary.Base64;
import org.jenkinsci.Symbol;
import org.kohsuke.accmod.Restricted;
+import org.kohsuke.accmod.restrictions.Beta;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.Stapler;
@@ -62,9 +63,10 @@ import static jenkins.security.ResourceDomainFilter.ERROR_RESPONSE;
* @see ResourceDomainFilter
* @see ResourceDomainRootAction
*
- * @since TODO
+ * @since 2.200, unrestricted since TODO
*/
@Extension(ordinal = JenkinsLocationConfiguration.ORDINAL-1) // sort just below the regular location config
+@Restricted(Beta.class)
@Symbol("resourceRoot")
public final class ResourceDomainConfiguration extends GlobalConfiguration {
|
Switching to Beta at @daniel-beck’s suggestion.
|
diff --git a/config/config.php b/config/config.php
index <HASH>..<HASH> 100644
--- a/config/config.php
+++ b/config/config.php
@@ -190,6 +190,12 @@ return [
/*
* Automatic Persisted Queries (APQ)
* See https://www.apollographql.com/docs/apollo-server/performance/apq/
+ *
+ * Note 1: this requires the `AutomaticPersistedQueriesMiddleware` being enabled
+ *
+ * Note 2: even if APQ is disabled per configuration and, according to the "APQ specs" (see above),
+ * to return a correct response in case it's not enabled, the middleware needs to be active.
+ * Of course if you know you do not have a need for APQ, feel free to remove the middleware completely.
*/
'apq' => [
// Enable/Disable APQ - See https://www.apollographql.com/docs/apollo-server/performance/apq/#disabling-apq
@@ -210,6 +216,7 @@ return [
*/
'execution_middleware' => [
\Rebing\GraphQL\Support\ExecutionMiddleware\ValidateOperationParamsMiddleware::class,
+ // AutomaticPersistedQueriesMiddleware listed even if APQ is disabled, see the docs for the `'apq'` configuration
\Rebing\GraphQL\Support\ExecutionMiddleware\AutomaticPersistedQueriesMiddleware::class,
\Rebing\GraphQL\Support\ExecutionMiddleware\AddAuthUserContextValueMiddleware::class,
// \Rebing\GraphQL\Support\ExecutionMiddleware\UnusedVariablesMiddleware::class,
|
Clarify the behaviour of AutomaticPersistedQueriesMiddleware
|
diff --git a/spec/lib/reportsv2_spec.rb b/spec/lib/reportsv2_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/reportsv2_spec.rb
+++ b/spec/lib/reportsv2_spec.rb
@@ -96,7 +96,7 @@ describe 'ReportsV2' do
it 'revision has not changed' do
reports = TogglV8::ReportsV2.new(api_token: Testing::API_TOKEN)
reports.workspace_id = @workspace_id
- expect(reports.revision).to eq "0.0.38\n-8a007ca"
+ expect(reports.revision).to start_with "0.0.38\n"
end
end
@@ -237,7 +237,7 @@ describe 'ReportsV2' do
end
end
- context 'XLS reports' do
+ context 'XLS reports', :pro_account do
it 'summary' do
filename = File.join(@tmp_home, 'summary.xls')
summary = @reports.write_summary(filename)
@@ -251,4 +251,4 @@ describe 'ReportsV2' do
end
end
end
-end
\ No newline at end of file
+end
|
XLS reports are :pro_account. Only expect reports.revision prefix.
|
diff --git a/src/geshi/powershell.php b/src/geshi/powershell.php
index <HASH>..<HASH> 100644
--- a/src/geshi/powershell.php
+++ b/src/geshi/powershell.php
@@ -264,7 +264,7 @@ $language_data = array (
'PARSER_CONTROL' => array(
'KEYWORDS' => array(
4 => array(
- 'DISALLOWED_AFTER' => '(?![a-zA-Z])'
+ 'DISALLOWED_AFTER' => '(?![a-zA-Z])',
'DISALLOWED_BEFORE' => ''
),
6 => array(
|
fix: Missing comma in Parser Control
|
diff --git a/src/OAuth/ServiceAbstract.php b/src/OAuth/ServiceAbstract.php
index <HASH>..<HASH> 100644
--- a/src/OAuth/ServiceAbstract.php
+++ b/src/OAuth/ServiceAbstract.php
@@ -95,6 +95,26 @@ abstract class ServiceAbstract implements InjectionAwareInterface
}
/**
+ * Returns access token for current service
+ *
+ * @return \OAuth\Common\Token\TokenInterface
+ */
+ public function getAccessToken()
+ {
+ return $this->sessionStorage->retrieveAccessToken($this->getServiceName());
+ }
+
+ /**
+ * Returns authorization state for current service
+ *
+ * @return string
+ */
+ public function getAuthorizationState()
+ {
+ return $this->sessionStorage->retrieveAuthorizationState($this->getServiceName());
+ }
+
+ /**
* Returns the name of current service
*
* @return mixed
|
Added retrieving access token and authorization state to ServiceAbstract;
|
diff --git a/examples/excepthook.py b/examples/excepthook.py
index <HASH>..<HASH> 100644
--- a/examples/excepthook.py
+++ b/examples/excepthook.py
@@ -3,4 +3,5 @@ import daiquiri
daiquiri.setup(set_excepthook=False)
logger = daiquiri.getLogger(__name__)
-raise Exception("Something went wrong") # This exception will not pass through Daiquiri
+# This exception will not pass through Daiquiri:
+raise Exception("Something went wrong")
|
Reformats the excepthook example to appease flake8's line length constraint.
|
diff --git a/packages/okidoc-md/src/utils/nodeAST.js b/packages/okidoc-md/src/utils/nodeAST.js
index <HASH>..<HASH> 100644
--- a/packages/okidoc-md/src/utils/nodeAST.js
+++ b/packages/okidoc-md/src/utils/nodeAST.js
@@ -56,6 +56,7 @@ function cleanUpClassProperty(
// https://github.com/babel/babel/blob/v7.0.0-beta.44/packages/babel-plugin-transform-typescript/src/index.js#L155-L168
node.accessibility = null;
node.decorators = [];
+ item.optional = false;
cleanUpNodeJSDoc(node, JSDocCommentValue);
}
|
fix(okidoc-md): fix issue ts vs flow issue for optional class property
|
diff --git a/cli.js b/cli.js
index <HASH>..<HASH> 100755
--- a/cli.js
+++ b/cli.js
@@ -121,6 +121,7 @@ cli
console.log('[FATAL] There was an error while reading the file:', err)
} else {
cpu = new LC2(cli.debug)
+ cpu.turnOn()
// Start catching key events from STDIN and pass them to the onRead
process.stdin.setRawMode(true)
process.stdin.on('data', onRead)
diff --git a/lib/LC2.js b/lib/LC2.js
index <HASH>..<HASH> 100644
--- a/lib/LC2.js
+++ b/lib/LC2.js
@@ -352,7 +352,7 @@ LC2.prototype.jsrr = function (src, i6, l) {
LC2.prototype.trap = function (trapn) {
this.gpr[7] = this.pc
this.pc = this.mem(trapn)
- if (this.debug) console.log('PC = x' + common.pad(this.pc.toString(16), 4))
+ if (this.debug) console.log('PC = mem[mem[x' + common.pad(trapn.toString(16)) + ']] =', common.pad(this.pc.toString(16), 4))
}
LC2.prototype.ret = function () {
this.pc = this.gpr[7]
|
fixed bug in cli, better trap debugging
|
diff --git a/lib/open_exchange_rates/version.rb b/lib/open_exchange_rates/version.rb
index <HASH>..<HASH> 100644
--- a/lib/open_exchange_rates/version.rb
+++ b/lib/open_exchange_rates/version.rb
@@ -1,3 +1,3 @@
module OpenExchangeRates
- VERSION = "0.2.0"
+ VERSION = "0.2.1"
end
|
Bumped version number to <I>
|
diff --git a/image.go b/image.go
index <HASH>..<HASH> 100644
--- a/image.go
+++ b/image.go
@@ -400,7 +400,7 @@ type DrawTrianglesShaderOptions struct {
Uniforms map[string]interface{}
// Images is a set of the source images.
- // All the image must be the same bounds.
+ // All the images must be the same sizes.
Images [4]*Image
// FillRule indicates the rule how an overlapped region is rendered.
@@ -542,7 +542,7 @@ type DrawRectShaderOptions struct {
Uniforms map[string]interface{}
// Images is a set of the source images.
- // All the image must be the same bounds.
+ // All the images must be the same sizes.
Images [4]*Image
}
|
ebiten: bug fix: wrong comments
Updates #<I>
Updates #<I>
|
diff --git a/Entity/ContactSourceRepository.php b/Entity/ContactSourceRepository.php
index <HASH>..<HASH> 100644
--- a/Entity/ContactSourceRepository.php
+++ b/Entity/ContactSourceRepository.php
@@ -64,7 +64,7 @@ class ContactSourceRepository extends CommonRepository
return $this->addStandardCatchAllWhereClause(
$q,
$filter,
- ['f.name', 'f.description', 'f.description_public', 'f.token', 'f.utmSource']
+ ['f.name', 'f.description', 'f.descriptionPublic', 'f.token', 'f.utmSource']
);
}
|
fix camel casing of description_public to descriptionPublic
|
diff --git a/js/bitstamp.js b/js/bitstamp.js
index <HASH>..<HASH> 100644
--- a/js/bitstamp.js
+++ b/js/bitstamp.js
@@ -294,6 +294,10 @@ module.exports = class bitstamp extends Exchange {
'mpl_address/': 1,
'euroc_withdrawal/': 1,
'euroc_address/': 1,
+ 'sol_withdrawal/': 1,
+ 'sol_address/': 1,
+ 'dot_withdrawal/': 1,
+ 'dot_address/': 1,
},
},
},
|
Added support for SOL and DOT
|
diff --git a/test/bad-dns-warning.js b/test/bad-dns-warning.js
index <HASH>..<HASH> 100644
--- a/test/bad-dns-warning.js
+++ b/test/bad-dns-warning.js
@@ -78,7 +78,7 @@ describe("BADDNS", () => {
getdns.BAD_DNS_CNAME_RETURNED_FOR_OTHER_TYPE,
];
- return badDnsValus.includes(badDns);
+ return badDnsValus.indexOf(badDns) !== -1;
});
expect(badDnsReplies.length).to.be(reply.bad_dns.length);
});
|
Replace [].includes() call for node.js v4 support
|
diff --git a/runtests.py b/runtests.py
index <HASH>..<HASH> 100644
--- a/runtests.py
+++ b/runtests.py
@@ -18,6 +18,7 @@ if not settings.configured:
'NAME': ':memory:',
}
},
+ MIDDLEWARE_CLASSES=(),
INSTALLED_APPS=(
'selectable',
),
|
Set middleware classes to suppress warning on <I>+
|
diff --git a/amino/util/mod.py b/amino/util/mod.py
index <HASH>..<HASH> 100644
--- a/amino/util/mod.py
+++ b/amino/util/mod.py
@@ -6,4 +6,8 @@ def unsafe_import_name(modname: str, name: str) -> Optional[Any]:
mod = importlib.import_module(modname)
return getattr(mod, name) if hasattr(mod, name) else None
-__all__ = ('unsafe_import_name',)
+
+def class_path(cls: type) -> str:
+ return f'{cls.__module__}.{cls.__name__}'
+
+__all__ = ('unsafe_import_name', 'class_path')
|
helper `class_path` that creates a string for a class
|
diff --git a/LiSE/LiSE/rule.py b/LiSE/LiSE/rule.py
index <HASH>..<HASH> 100644
--- a/LiSE/LiSE/rule.py
+++ b/LiSE/LiSE/rule.py
@@ -445,11 +445,11 @@ class RuleMapping(MutableMapping, Signal):
def __init__(self, engine, rulebook):
super().__init__()
self.engine = engine
+ self._rule_cache = self.engine.rule._cache
if isinstance(rulebook, RuleBook):
self.rulebook = rulebook
else:
self.rulebook = self.engine.rulebook[rulebook]
- self._rule_cache = {}
def __repr__(self):
return 'RuleMapping({})'.format([k for k in self])
@@ -466,9 +466,6 @@ class RuleMapping(MutableMapping, Signal):
def __getitem__(self, k):
if k not in self:
raise KeyError("Rule '{}' is not in effect".format(k))
- if k not in self._rule_cache:
- self._rule_cache[k] = Rule(self.engine, k)
- self._rule_cache[k].active = True
return self._rule_cache[k]
def __getattr__(self, k):
|
Make all RuleMapping instances use the AllRules cache
Fixes a bug where actions were getting deleted right after adding.
|
diff --git a/qtpylib/futures.py b/qtpylib/futures.py
index <HASH>..<HASH> 100644
--- a/qtpylib/futures.py
+++ b/qtpylib/futures.py
@@ -79,8 +79,14 @@ def create_continous_contract(df, resolution="1T"):
except:
pass
- return flags[['symbol', 'expiry', 'gap']]
+ flags = flags[flags['symbol'] == flags['symbol'].unique()]
+
+ # single row df won't resample
+ if len(flags) <= 1:
+ flags = pd.DataFrame(index=pd.date_range(start=flags[0:1].index[0],
+ periods=24, freq="1H"), data=flags[['symbol', 'expiry', 'gap']]).ffill()
+ return flags[['symbol', 'expiry', 'gap']]
# gonna need this later
df['datetime'] = df.index
|
fixed bug where pandas won't resample df with 1 row
|
diff --git a/mod/wiki/ewiki/ewiki.php b/mod/wiki/ewiki/ewiki.php
index <HASH>..<HASH> 100644
--- a/mod/wiki/ewiki/ewiki.php
+++ b/mod/wiki/ewiki/ewiki.php
@@ -1087,6 +1087,8 @@ function ewiki_page_versions($id=0, $data=0) {
function ewiki_page_search($id, &$data, $action) {
+ global $CFG;
+
$o = ewiki_make_title($id, $id, 2, $action);
if (! ($q = @$_REQUEST["q"])) {
@@ -1099,7 +1101,11 @@ function ewiki_page_search($id, &$data, $action) {
else {
$found = array();
- $q = preg_replace('/\s*[^\w]+\s*/', ' ', $q);
+ if ($CFG->unicodedb) {
+ $q = preg_replace('/\s*[\W]+\s*/u', ' ', $q);
+ } else {
+ $q = preg_replace('/\s*[^\w]+\s*/', ' ', $q);
+ }
foreach (explode(" ", $q) as $search) {
if (empty($search)) { continue; }
|
Now wiki supports Unicode searches
Merged from MOODLE_<I>_STABLE
|
diff --git a/src/AutosizeInput.js b/src/AutosizeInput.js
index <HASH>..<HASH> 100644
--- a/src/AutosizeInput.js
+++ b/src/AutosizeInput.js
@@ -76,7 +76,7 @@ var AutosizeInput = React.createClass({
this.refs.input.getDOMNode().select();
},
render () {
- var escapedValue = (this.props.value || '').replace(/ /g, ' ').replace(/\</g, '<').replace(/\>/g, '>');
+ var escapedValue = (this.props.value || '').replace(/\&/g, '&').replace(/ /g, ' ').replace(/\</g, '<').replace(/\>/g, '>');
var wrapperStyle = this.props.style || {};
wrapperStyle.display = 'inline-block';
var inputStyle = this.props.inputStyle || {};
|
Escaping & characters in input, fixes #9
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -136,6 +136,6 @@ setup(
ext_modules=extensions,
setup_requires=['numpy'],
install_requires=['numpy>=1.9.2', 'six'],
- tests_require=['nose', 'decorator', 'trollius', 'netifaces'],
+ tests_require=['nose', 'decorator', 'trollius'],
test_suite='nose.collector',
packages=['spead2', 'spead2.recv', 'spead2.send'])
|
Remove accidentally added netifaces dependency
|
diff --git a/packages/qiskit-sdk/bin/cmds/sim.js b/packages/qiskit-sdk/bin/cmds/sim.js
index <HASH>..<HASH> 100644
--- a/packages/qiskit-sdk/bin/cmds/sim.js
+++ b/packages/qiskit-sdk/bin/cmds/sim.js
@@ -50,15 +50,16 @@ exports.handler = argv => {
const pathCode = path.resolve(process.cwd(), argv.circuit);
- logger.info(`${logger.emoji('mag')} Reading the circuit file: ${pathCode}`);
+ logger.info(`${logger.emoji('mag')} Reading the circuit file: ${pathCode}`);
readFile(pathCode, 'utf8')
// TODO: .then(code => {
.then(() => {
logger.error(
- 'Still not supported, waiting for the new simulator implementation',
+ '\nStill not supported, waiting for the new simulator implementation',
);
process.exit(1);
})
+ // TODO from here.
// logger.info('Parsing the code file ...');
// let codeParsed;
|
Minor improvement to beautify a CLI output
|
diff --git a/src/Composer/Command/DiagnoseCommand.php b/src/Composer/Command/DiagnoseCommand.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Command/DiagnoseCommand.php
+++ b/src/Composer/Command/DiagnoseCommand.php
@@ -474,10 +474,10 @@ EOT
if ($hadError) {
$io->write('<error>FAIL</error>');
- $this->exitCode = 2;
+ $this->exitCode = max($this->exitCode, 2);
} elseif ($hadWarning) {
$io->write('<warning>WARNING</warning>');
- $this->exitCode = 1;
+ $this->exitCode = max($this->exitCode, 1);
}
if ($result) {
@@ -716,7 +716,7 @@ EOT
*
* @return bool|string
*/
- private function checkConnectivity()
+ private function checkConnectivity()
{
if (!ini_get('allow_url_fopen')) {
$result = '<info>Skipped because allow_url_fopen is missing.</info>';
|
Avoid downgrading from error to warning
|
diff --git a/Kwc/Directories/List/ViewAjax/Component.defer.js b/Kwc/Directories/List/ViewAjax/Component.defer.js
index <HASH>..<HASH> 100644
--- a/Kwc/Directories/List/ViewAjax/Component.defer.js
+++ b/Kwc/Directories/List/ViewAjax/Component.defer.js
@@ -346,6 +346,7 @@ Kwc.Directories.List.ViewAjax.prototype = {
}
}
this.$el.html(html);
+ this.$el.trigger('load', data);
Kwf.callOnContentReady(this.$el, { action: 'render' });
}).bind(this));
},
|
Add js-event for ajax-view loaded
Needed for web to update totalResults for search-params
|
diff --git a/release/long_running_tests/workloads/serve.py b/release/long_running_tests/workloads/serve.py
index <HASH>..<HASH> 100644
--- a/release/long_running_tests/workloads/serve.py
+++ b/release/long_running_tests/workloads/serve.py
@@ -38,9 +38,8 @@ def update_progress(result):
result["last_update"] = time.time()
test_output_json = os.environ.get("TEST_OUTPUT_JSON",
"/tmp/release_test_output.json")
- with open(test_output_json, "at") as f:
+ with open(test_output_json, "wt") as f:
json.dump(result, f)
- f.write("\n")
cluster = Cluster()
|
[ci/release] Fix long running serve test result fetching (#<I>)
|
diff --git a/src/java/voldemort/xml/StoreDefinitionsMapper.java b/src/java/voldemort/xml/StoreDefinitionsMapper.java
index <HASH>..<HASH> 100644
--- a/src/java/voldemort/xml/StoreDefinitionsMapper.java
+++ b/src/java/voldemort/xml/StoreDefinitionsMapper.java
@@ -93,7 +93,6 @@ public class StoreDefinitionsMapper {
}
}
- @SuppressWarnings("unchecked")
public List<StoreDefinition> readStoreList(Reader input) {
try {
@@ -106,8 +105,8 @@ public class StoreDefinitionsMapper {
throw new MappingException("Invalid root element: "
+ doc.getRootElement().getName());
List<StoreDefinition> stores = new ArrayList<StoreDefinition>();
- for(Element store: (List<Element>) root.getChildren(STORE_ELMT))
- stores.add(readStore(store));
+ for(Object store: root.getChildren(STORE_ELMT))
+ stores.add(readStore((Element) store));
return stores;
} catch(JDOMException e) {
throw new MappingException(e);
|
Replace unchecked cast with checked one and remove now unnecessary @SuppressWarnings.
|
diff --git a/src/tools/mountainchart/mountainchart.js b/src/tools/mountainchart/mountainchart.js
index <HASH>..<HASH> 100644
--- a/src/tools/mountainchart/mountainchart.js
+++ b/src/tools/mountainchart/mountainchart.js
@@ -5,6 +5,7 @@ import MountainChartComponent from './mountainchart-component';
import {
timeslider,
buttonlist,
+ treemenu,
datawarning
}
from 'components/_index';
@@ -36,6 +37,10 @@ var MountainChart = Tool.extend('MountainChart', {
placeholder: '.vzb-tool-buttonlist',
model: ['state', 'ui', 'language']
}, {
+ component: treemenu,
+ placeholder: '.vzb-tool-treemenu',
+ model: ['state.marker', 'language']
+ }, {
component: datawarning,
placeholder: '.vzb-tool-datawarning',
model: ['language']
|
Add treemenu to mountain chart, closes #<I>
|
diff --git a/src/sap.m/src/sap/m/Page.js b/src/sap.m/src/sap/m/Page.js
index <HASH>..<HASH> 100644
--- a/src/sap.m/src/sap/m/Page.js
+++ b/src/sap.m/src/sap/m/Page.js
@@ -456,6 +456,7 @@ function(
};
Page.prototype._adjustFooterWidth = function () {
+ var bDirection = sap.ui.getCore().getConfiguration().getRTL() ? "left" : "right";
if (!this.getShowFooter() || !this.getFloatingFooter() || !this.getFooter()) {
return;
}
@@ -463,10 +464,10 @@ function(
var $footer = jQuery(this.getDomRef()).find(".sapMPageFooter").last();
if (this._contentHasScroll()) {
- $footer.css("right", jQuery.position.scrollbarWidth() + "px");
+ $footer.css(bDirection, jQuery.position.scrollbarWidth() + "px");
$footer.css("width", "initial");
} else {
- $footer.css("right", 0);
+ $footer.css(bDirection, 0);
$footer.css("width", "");
}
};
|
[FIX] sap.m.Page: Initial rendering of floating footer corrected
If the floating footer page is inially loaded in rtl language
the footer width was set incorrectly.
BCP: <I>
Change-Id: I<I>fdd<I>a<I>e<I>ab<I>f<I>b8abdcd<I>
|
diff --git a/gen_markdown.py b/gen_markdown.py
index <HASH>..<HASH> 100644
--- a/gen_markdown.py
+++ b/gen_markdown.py
@@ -18,7 +18,7 @@ Register Map
for m in memory_maps.memoryMap:
for block in m.addressBlock:
for reg in sorted(block.register, key=lambda addr: addr.addressOffset):
- s += "\n## 0x{:x} {}\n\n".format(offset+reg.addressOffset, reg.name)
+ s += "\n## 0x{:x} {}\n\n".format(offset+block.baseAddress+reg.addressOffset, reg.name)
if reg.description:
s += "{}\n\n".format(reg.description)
|
gen_markdown.py: Consider address block offset
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -74,9 +74,9 @@ author = "caner & inso & vit"
# built documents.
#
# The short X.Y version.
-version = "0.57.0"
+version = "0.61.0"
# The full version, including alpha/beta/rc tags.
-release = "0.57.0"
+release = "0.61.0"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
|
[fix] !<I>: Update documentation to <I>
It wasn't updated because the regex didn't match the old version
|
diff --git a/holoviews/plotting/bokeh/element.py b/holoviews/plotting/bokeh/element.py
index <HASH>..<HASH> 100644
--- a/holoviews/plotting/bokeh/element.py
+++ b/holoviews/plotting/bokeh/element.py
@@ -181,10 +181,6 @@ class ElementPlot(BokehPlot, GenericElementPlot):
# Get the bottom layer and range element
el = element.traverse(lambda x: x, [Element])
el = el[0] if el else element
- if self.batched and not isinstance(self, OverlayPlot):
- range_el = el
- else:
- range_el = element
dims = el.dimensions()
xlabel, ylabel, zlabel = self._get_axis_labels(dims)
@@ -215,7 +211,10 @@ class ElementPlot(BokehPlot, GenericElementPlot):
else:
y_axis_type = 'log' if self.logy else 'auto'
+ # Get the Element that determines the range and get_extents
+ range_el = el if self.batched and not isinstance(self, OverlayPlot) else element
l, b, r, t = self.get_extents(range_el, ranges)
+
if not 'x_range' in plot_ranges:
if 'x_range' in ranges:
plot_ranges['x_range'] = ranges['x_range']
|
Small fix to clean up bokeh range initialization
|
diff --git a/lib/origen/database/key_value_store.rb b/lib/origen/database/key_value_store.rb
index <HASH>..<HASH> 100644
--- a/lib/origen/database/key_value_store.rb
+++ b/lib/origen/database/key_value_store.rb
@@ -75,6 +75,8 @@ module Origen
# Deletes a key from the active store
def delete_key(key)
store.delete(key)
+ save_to_file
+ load_from_file
end
# Return an array of store keys, excluding the 'infrastructure' key(s)
|
updated the delete_key method to be a permanent delete by saving hte store to file and reloading the store from file
|
diff --git a/src/sap.ui.core/src/sap/ui/core/delegate/ItemNavigation.js b/src/sap.ui.core/src/sap/ui/core/delegate/ItemNavigation.js
index <HASH>..<HASH> 100644
--- a/src/sap.ui.core/src/sap/ui/core/delegate/ItemNavigation.js
+++ b/src/sap.ui.core/src/sap/ui/core/delegate/ItemNavigation.js
@@ -577,6 +577,12 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/base/EventProvider'],
ItemNavigation.prototype.setFocusedIndex = function(iIndex) {
var $Item;
+ if (this.aItemDomRefs.length < 0) {
+ // no items -> don't change TabIndex
+ this.iFocusedIndex = -1;
+ return this;
+ }
+
if (iIndex < 0) {
iIndex = 0;
}
|
[FIX] sap.ui.core.delegate.ItemNavigation: no items
if there are no Items in the ItemNavigation the tabIndex 0 must not be
removed from the root DOM-Ref
Change-Id: I2f<I>c1e<I>f<I>dd<I>d<I>a1aa<I>b<I>
BCP: <I>
|
diff --git a/lib/merb-core.rb b/lib/merb-core.rb
index <HASH>..<HASH> 100644
--- a/lib/merb-core.rb
+++ b/lib/merb-core.rb
@@ -10,9 +10,9 @@ root = root.to_a.empty? ? Dir.getwd : root
if File.directory?(gems_dir = File.join(root, 'gems'))
$BUNDLE = true; Gem.clear_paths; Gem.path.unshift(gems_dir)
# Warn if local merb-core is available but not loaded.
- if !($0 =~ /^(\.\/)?bin\/merb$/) &&
+ if File.expand_path($0).index(root) != 0 &&
(local_mc = Dir[File.join(gems_dir, 'specifications', 'merb-core-*.gemspec')].last)
- puts "Warning: please use bin/merb to load #{File.basename(local_mc, '.gemspec')} from ./gems"
+ puts "Warning: please use bin/#{File.basename($0)} to load #{File.basename(local_mc, '.gemspec')} from ./gems"
end
end
|
More fine-grained check to see if a local ./bin executable should have been used
|
diff --git a/stanza/models/constituency_parser.py b/stanza/models/constituency_parser.py
index <HASH>..<HASH> 100644
--- a/stanza/models/constituency_parser.py
+++ b/stanza/models/constituency_parser.py
@@ -245,7 +245,7 @@ def parse_args(args=None):
# 0.015: 0.81721
# 0.010: 0.81474348
# 0.005: 0.81503
- DEFAULT_WEIGHT_DECAY = { "adamw": 0.01, "adadelta": 0.02, "sgd": 0.01, "adabelief": 1.2e-6, "madgrad": 1e-6 }
+ DEFAULT_WEIGHT_DECAY = { "adamw": 0.05, "adadelta": 0.02, "sgd": 0.01, "adabelief": 1.2e-6, "madgrad": 1e-6 }
parser.add_argument('--weight_decay', default=None, type=float, help='Weight decay (eg, l2 reg) to use in the optimizer')
parser.add_argument('--optim', default='Adadelta', help='Optimizer type: SGD, AdamW, Adadelta, AdaBelief')
parser.add_argument('--learning_rho', default=0.9, type=float, help='Rho parameter in Adadelta')
|
This WD seems to work better? needs more testing
|
diff --git a/packages/cli/cli.js b/packages/cli/cli.js
index <HASH>..<HASH> 100644
--- a/packages/cli/cli.js
+++ b/packages/cli/cli.js
@@ -4,14 +4,14 @@ const yargs = require("yargs");
const { log, getProject } = require("./utils");
const { boolean } = require("boolean");
+// Disable help processing until after plugins are imported.
+yargs.help(false);
+
// Immediately load .env.{PASSED_ENVIRONMENT} and .env files.
// This way we ensure all of the environment variables are not loaded too late.
const project = getProject();
let paths = [path.join(project.root, ".env")];
-// Disable help processing until after plugins are imported
-yargs.help(false);
-
if (yargs.argv.env) {
paths.push(path.join(project.root, `.env.${yargs.argv.env}`));
}
@@ -102,6 +102,6 @@ yargs
(async () => {
await createCommands(yargs, context);
- // Run
+ // Enable help and run the CLI.
yargs.help().argv;
})();
|
refactor: bring `yargs.help(false);` to the top
|
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -477,7 +477,7 @@ module ActiveRecord
@foreign_key_drops << name
end
- def add_column(name, type, options)
+ def add_column(name, type, **options)
name = name.to_s
type = type.to_sym
@adds << AddColumnDefinition.new(@td.new_column_definition(name, type, **options))
diff --git a/activerecord/lib/active_record/migration/compatibility.rb b/activerecord/lib/active_record/migration/compatibility.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/migration/compatibility.rb
+++ b/activerecord/lib/active_record/migration/compatibility.rb
@@ -150,7 +150,7 @@ module ActiveRecord
super
end
- def add_column(table_name, column_name, type, options = {})
+ def add_column(table_name, column_name, type, **options)
if type == :primary_key
type = :integer
options[:primary_key] = true
|
Unify `add_column` method definition with other ones that take keyword arguments
|
diff --git a/antfarm/urls.py b/antfarm/urls.py
index <HASH>..<HASH> 100644
--- a/antfarm/urls.py
+++ b/antfarm/urls.py
@@ -15,8 +15,9 @@ specified, they will default to {}.
'''
from collections import namedtuple
-
+from functools import partial
import re
+
from . import response
class KeepLooking(Exception):
@@ -29,7 +30,7 @@ class url_dispatcher(object):
__slots__ = ('patterns',)
def __init__(self, *patterns):
- self.patterns = tuple(self._make_url(pattern) for pattern in patterns)
+ self.patterns = [self._make_url(pattern) for pattern in patterns]
def _make_url(self, pattern):
'''Helper to ensure all patterns are url instances.'''
@@ -51,3 +52,10 @@ class url_dispatcher(object):
def handle_not_found(self, request):
return response.NotFound()
+
+ def register(self, pattern, view=None):
+ '''Allow decorator-style construction of URL pattern lists.'''
+ if view is None:
+ return partial(self.register, pattern)
+ self.patterns.append(self._make_url((pattern, view)))
+ return view
|
Add register to urls_dispatcher
|
diff --git a/src/Application/LayoutApplication.php b/src/Application/LayoutApplication.php
index <HASH>..<HASH> 100644
--- a/src/Application/LayoutApplication.php
+++ b/src/Application/LayoutApplication.php
@@ -78,7 +78,7 @@ class LayoutApplication extends Application
// twig template namespaces
foreach ($elementTypesModel->getAllElementTypes() as $elementType)
{
- $this["twig.loader.filesystem"]->addPath($elementTypesModel->getUserSubDirectory($elementType), $elementType);
+ $this["twig.loader.filesystem"]->addPath($elementTypesModel->getUserSubDirectory("{$elementType}s"), $elementType);
}
diff --git a/src/Model/ElementTypesModel.php b/src/Model/ElementTypesModel.php
index <HASH>..<HASH> 100644
--- a/src/Model/ElementTypesModel.php
+++ b/src/Model/ElementTypesModel.php
@@ -134,6 +134,6 @@ class ElementTypesModel
*/
public function getUserSubDirectory ($directoryName)
{
- return "{$this->baseDir}/layout/views/{$directoryName}s";
+ return "{$this->baseDir}/layout/views/{$directoryName}";
}
}
|
Explicitly add the "s" at the end of the layout subdirs
|
diff --git a/dygraph.js b/dygraph.js
index <HASH>..<HASH> 100644
--- a/dygraph.js
+++ b/dygraph.js
@@ -2736,7 +2736,7 @@ Dygraph.prototype.computeYAxisRanges_ = function(extremes) {
p_axis = axis;
}
}
- if(p_axis == undefined)
+ if(p_axis === undefined)
throw ("Configuration Error: At least one axis has to have the \"independentTicks\" option activated.");
// Add ticks. By default, all axes inherit the tick positions of the
// primary axis. However, if an axis is specifically marked as having
|
BUG FIX: Changed check to undefined with === as proposed by jslint.
|
diff --git a/lib/aasm/core/event.rb b/lib/aasm/core/event.rb
index <HASH>..<HASH> 100644
--- a/lib/aasm/core/event.rb
+++ b/lib/aasm/core/event.rb
@@ -139,6 +139,7 @@ module AASM::Core
end
transitions.each do |transition|
+ transition.failures.clear #https://github.com/aasm/aasm/issues/383
next if to_state and !Array(transition.to).include?(to_state)
if (options.key?(:may_fire) && transition.eql?(options[:may_fire])) ||
(!options.key?(:may_fire) && transition.allowed?(obj, *args))
|
Fix failures array in transition not being reset
|
diff --git a/src/config/config.php b/src/config/config.php
index <HASH>..<HASH> 100644
--- a/src/config/config.php
+++ b/src/config/config.php
@@ -24,7 +24,7 @@ return array(
|
*/
- 'keyName' => 'X-API-KEY',
+ 'keyName' => 'Authorization',
/*
|--------------------------------------------------------------------------
|
Changed default api key header parameter to "Authorization" so that it is encrypted when using SSL
|
diff --git a/test/headful.spec.js b/test/headful.spec.js
index <HASH>..<HASH> 100644
--- a/test/headful.spec.js
+++ b/test/headful.spec.js
@@ -118,11 +118,11 @@ module.exports.addTests = function({testRunner, expect, puppeteer, defaultBrowse
await browser.close();
});
it('should open devtools when "devtools: true" option is given', async({server}) => {
- const browser = await puppeteer.launch({...headfulOptions, devtools: true});
+ const browser = await puppeteer.launch(Object.assign({devtools: true}, headfulOptions));
const context = await browser.createIncognitoBrowserContext();
await Promise.all([
context.newPage(),
- context.waitForTarget(target => target.url().startsWith('devtools://')),
+ context.waitForTarget(target => target.url().includes('devtools://')),
]);
await browser.close();
});
|
test: fix tests to work on node6 (#<I>)
Our magical node6 transpiler can't handle object spreads :(
Drive-by: use "includes" instead of "startsWith" for devtools URL
since I remember that it used to be "chrome-devtools://", and somehow
I saw it as "devtools://" somewhere.
|
diff --git a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/docker_cli_network_unix_test.go
index <HASH>..<HASH> 100644
--- a/integration-cli/docker_cli_network_unix_test.go
+++ b/integration-cli/docker_cli_network_unix_test.go
@@ -1417,8 +1417,9 @@ func (s *DockerSuite) TestDockerNetworkInternalMode(c *check.C) {
c.Assert(waitRun("first"), check.IsNil)
dockerCmd(c, "run", "-d", "--net=internal", "--name=second", "busybox", "top")
c.Assert(waitRun("second"), check.IsNil)
- _, _, err := dockerCmdWithTimeout(time.Second, "exec", "first", "ping", "-c", "1", "www.google.com")
+ out, _, err := dockerCmdWithError("exec", "first", "ping", "-W", "4", "-c", "1", "www.google.com")
c.Assert(err, check.NotNil)
+ c.Assert(out, checker.Contains, "100% packet loss")
_, _, err = dockerCmdWithError("exec", "second", "ping", "-c", "1", "first")
c.Assert(err, check.IsNil)
}
|
Update ping command timeout to 4 sec
|
diff --git a/lib/rawHandler.js b/lib/rawHandler.js
index <HASH>..<HASH> 100644
--- a/lib/rawHandler.js
+++ b/lib/rawHandler.js
@@ -114,7 +114,13 @@ function createMiddleware(options) {
const { owner } = req.params;
const repoName = req.params.repo;
const refName = req.params.ref;
- const fpath = req.params[0];
+ let fpath = req.params[0];
+
+ // issue #247: lenient handling of redundant leading slashes in path
+ while (fpath.length && fpath[0] === '/') {
+ // trim leading slash
+ fpath = fpath.substr(1);
+ }
// TODO: handle branch names containing '/' (e.g. 'foo/bar')
|
#<I>: lenient handling of redundant leading slashes in path
|
diff --git a/lib/jets/util.rb b/lib/jets/util.rb
index <HASH>..<HASH> 100644
--- a/lib/jets/util.rb
+++ b/lib/jets/util.rb
@@ -23,15 +23,15 @@ module Jets::Util
# Especially since Lambda functions will usually only require some of the
# classes most of the time.
def boot
+ # app/models/application_record
application_files = %w[
app/controllers/application_controller
app/jobs/application_job
- app/models/application_record
app/models/application_item
]
application_files.each do |p|
path = "#{Jets.root}#{p}"
- require path if File.exist?(path)
+ require path# if File.exist?(path)
end
Dir.glob("#{Jets.root}app/**/*").each do |path|
|
error if application file doesnt require
|
diff --git a/src/php/wp-cli/commands/internals/theme.php b/src/php/wp-cli/commands/internals/theme.php
index <HASH>..<HASH> 100644
--- a/src/php/wp-cli/commands/internals/theme.php
+++ b/src/php/wp-cli/commands/internals/theme.php
@@ -121,6 +121,21 @@ class ThemeCommand extends WP_CLI_Command {
WP_CLI::line( $path );
}
+ /**
+ * Delete a theme
+ *
+ * @param array $args
+ */
+ function delete( $args ) {
+ list( $file, $name ) = $this->parse_name( $args, __FUNCTION__ );
+
+ $r = delete_theme( $name );
+
+ if ( is_wp_error( $r ) ) {
+ WP_CLI::error( $r );
+ }
+ }
+
protected function parse_name( $args, $subcommand ) {
if ( empty( $args ) ) {
WP_CLI::line( "usage: wp theme $subcommand <theme-name>" );
@@ -155,6 +170,7 @@ Available sub-commands:
status display status of all installed themes or of a particular theme
activate activate a particular theme
path print path to the theme's stylesheet
+ delete delete a theme
EOB
);
}
|
add theme delete subcommand. fixes #<I>
|
diff --git a/client/state/data-layer/wpcom/read/tags/mine/new/index.js b/client/state/data-layer/wpcom/read/tags/mine/new/index.js
index <HASH>..<HASH> 100644
--- a/client/state/data-layer/wpcom/read/tags/mine/new/index.js
+++ b/client/state/data-layer/wpcom/read/tags/mine/new/index.js
@@ -47,6 +47,11 @@ export function receiveFollowTag( store, action, next, apiResponse ) {
}
export function receiveError( store, action, next, error ) {
+ // exit early and do nothing if the error is that the user is already following the tag
+ if ( error && error.error === 'already_subscribed' ) {
+ return;
+ }
+
const errorText = translate( 'Could not follow tag: %(tag)s', {
args: { tag: action.payload.slug }
} );
|
Reader: fix for following something you are already follwing (#<I>)
|
diff --git a/src/bindings/python/setup.py b/src/bindings/python/setup.py
index <HASH>..<HASH> 100644
--- a/src/bindings/python/setup.py
+++ b/src/bindings/python/setup.py
@@ -190,6 +190,10 @@ class CMakeBuild(build_ext):
'CMAKE_GENERATOR'
])
+ if is_osx:
+ cmake_args.append('-DCLANG_USE_LIBCPP=ON')
+ cmake_args.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9')
+
# example of build args
build_args = [
'--config', config,
@@ -305,9 +309,6 @@ class CMakeBuild(build_ext):
if DEP_DIR64:
cmake_args.append('-DLIBSEDML_DEPENDENCY_DIR=' + DEP_DIR64)
cmake_args.append('-DLIBEXPAT_INCLUDE_DIR=' + join(DEP_DIR64, 'include'))
- elif is_osx:
- cmake_args.append('-DCLANG_USE_LIBCPP=ON')
- cmake_args.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9')
os.chdir(build_temp)
self.spawn(['cmake', SRC_DIR] + cmake_args)
|
- fix build on osx
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,7 @@ setup(
url='https://github.com/jwodder/javaproperties',
setup_requires=['pytest-runner>=2.0,<3'],
- install_requires=['six'],
+ install_requires=['six>=1.4.0,<2'],
tests_require=['pytest>=2.8,<3'],
extras_require={
|
Requires six>=<I> (in which `unichr` was added)
|
diff --git a/pyculiarity/detect_anoms.py b/pyculiarity/detect_anoms.py
index <HASH>..<HASH> 100644
--- a/pyculiarity/detect_anoms.py
+++ b/pyculiarity/detect_anoms.py
@@ -78,7 +78,7 @@ def detect_anoms(data, k=0.49, alpha=0.05, num_obs_per_period=None,
p = {
'timestamp': decomp.index,
- 'value': (decomp['trend'] + decomp['seasonal']).truncate().convert_objects(convert_numeric=True)
+ 'value': ps.to_numeric((decomp['trend'] + decomp['seasonal']).truncate())
}
data_decomp = ps.DataFrame(p)
|
Fix deprecation warning
Pandas says convert_objects is deprecated and suggests specific to_numeric instead.
|
diff --git a/src/styles/lines/lines.js b/src/styles/lines/lines.js
index <HASH>..<HASH> 100644
--- a/src/styles/lines/lines.js
+++ b/src/styles/lines/lines.js
@@ -179,7 +179,7 @@ Object.assign(Lines, {
// Reusable outline style object, marked as already wrapped in cache objects (preprocessed = true)
style.outline = style.outline || { width: {}, next_width: {}, preprocessed: true };
- if (draw.outline && draw.outline.color && draw.outline.width) {
+ if (draw.outline && draw.outline.visible !== false && draw.outline.color && draw.outline.width) {
// outline width in meters
// NB: multiply by 2 because outline is applied on both sides of line
let outline_width = this.calcWidth(draw.outline.width, context) * 2;
|
support `visible` property for `outline` block (under `lines`)
|
diff --git a/nomnom.js b/nomnom.js
index <HASH>..<HASH> 100644
--- a/nomnom.js
+++ b/nomnom.js
@@ -118,20 +118,8 @@ function ArgParser() {
return parser;
},
- parseArgs : function(argv, parserOpts) {
+ parseArgs : function(argv) {
var printHelp = true;
- if(!Array.isArray(argv) || (argv.length
- && typeof argv[0] != "string")) {
- // using old API
- parserOpts = parserOpts || {};
- parser.specs = argv;
- parser.script = parserOpts.script;
- parser.print = parserOpts.printFunc;
- printHelp = parserOpts.printHelp;
- if(printHelp === undefined)
- printHelp = true;
- argv = parserOpts.argv;
- }
parser.print = parser.print || function(str) {
require("sys").puts(str);
process.exit(0);
|
remove support for old <I>.x api
|
diff --git a/lib/XeroOAuth.php b/lib/XeroOAuth.php
index <HASH>..<HASH> 100644
--- a/lib/XeroOAuth.php
+++ b/lib/XeroOAuth.php
@@ -587,7 +587,7 @@ class XeroOAuth {
* @return string the current URL
*/
public static function php_self($dropqs = true) {
- $url = sprintf ( '%s://%s%s', empty ( $_SERVER ['HTTPS'] ) ? (@$_SERVER ['SERVER_PORT'] == '443' ? 'https' : 'http') : 'https', $_SERVER ['SERVER_NAME'], $_SERVER ['REQUEST_URI'] );
+ $url = sprintf ( '%s://%s%s', empty ( $_SERVER ['HTTPS'] ) ? (@$_SERVER ['SERVER_PORT'] == '443' ? 'https' : 'http') : 'http', $_SERVER ['SERVER_NAME'], $_SERVER ['REQUEST_URI'] );
$parts = parse_url ( $url );
|
Update XeroOAuth.php
reverted earlier change
|
diff --git a/src/Backup.php b/src/Backup.php
index <HASH>..<HASH> 100644
--- a/src/Backup.php
+++ b/src/Backup.php
@@ -12,7 +12,7 @@ class Backup extends Extension
{
public function getExists()
{
- $statuses = BackupDestinationStatusFactory::createForMonitorConfig(config('backup.monitorBackups'));
+ $statuses = BackupDestinationStatusFactory::createForMonitorConfig(config('backup.monitor_backups'));
$listCommand = new ListCommand();
|
Config key changes update for moniter backups
Moniter Backup camel case updated as per the backup config file.
|
diff --git a/github/github-accessors.go b/github/github-accessors.go
index <HASH>..<HASH> 100644
--- a/github/github-accessors.go
+++ b/github/github-accessors.go
@@ -9132,6 +9132,14 @@ func (r *Repository) GetDescription() string {
return *r.Description
}
+// GetDisabled returns the Disabled field if it's non-nil, zero value otherwise.
+func (r *Repository) GetDisabled() bool {
+ if r == nil || r.Disabled == nil {
+ return false
+ }
+ return *r.Disabled
+}
+
// GetDownloadsURL returns the DownloadsURL field if it's non-nil, zero value otherwise.
func (r *Repository) GetDownloadsURL() string {
if r == nil || r.DownloadsURL == nil {
diff --git a/github/repos.go b/github/repos.go
index <HASH>..<HASH> 100644
--- a/github/repos.go
+++ b/github/repos.go
@@ -57,6 +57,7 @@ type Repository struct {
AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"`
Topics []string `json:"topics,omitempty"`
Archived *bool `json:"archived,omitempty"`
+ Disabled *bool `json:"disabled,omitempty"`
// Only provided when using RepositoriesService.Get while in preview
License *License `json:"license,omitempty"`
|
Add disabled bit to Organization struct. (#<I>)
|
diff --git a/Controller/GeneratorController.php b/Controller/GeneratorController.php
index <HASH>..<HASH> 100755
--- a/Controller/GeneratorController.php
+++ b/Controller/GeneratorController.php
@@ -22,8 +22,11 @@ class GeneratorController extends Controller {
foreach ($list as $entity) {
list($bundleName, $path) = explode("/", substr($entity, 1), 2);
$bundle = $kernel->getBundle($bundleName, true);
- if ($entity[strlen($entity)-1] == "/") {
- /** Entity end with backslash, it is a directory */
+
+ /** Entity end with backslash, it is a directory */
+ $loadAllEntitiesFromDir = ($entity[strlen($entity)-1] == "/");
+
+ if ( $loadAllEntitiesFromDir ) {
$bundleRef = new \ReflectionClass($bundle);
$dir = new Finder();
$dir->files()->depth('== 0')->in(dirname($bundleRef->getFileName()).'/'.$path)->name('/.*\.php$/');
|
refactoring for better code understanding
line $entity[strlen($entity)-1] == "/" is not so obvious
|
diff --git a/pysat/_instrument.py b/pysat/_instrument.py
index <HASH>..<HASH> 100644
--- a/pysat/_instrument.py
+++ b/pysat/_instrument.py
@@ -1176,7 +1176,7 @@ class Instrument(object):
- def to_netcdf4(self, fname=None, base_instrument=None, epoch_name='epoch', zlib=False):
+ def to_netcdf4(self, fname=None, base_instrument=None, epoch_name='Epoch', zlib=False):
"""Stores loaded data into a netCDF3/4 file.
Parameters
diff --git a/pysat/utils.py b/pysat/utils.py
index <HASH>..<HASH> 100644
--- a/pysat/utils.py
+++ b/pysat/utils.py
@@ -77,7 +77,7 @@ def set_data_dir(path=None, store=None):
raise ValueError('Path does not lead to a valid directory.')
-def load_netcdf4(fnames=None, strict_meta=False, file_format=None, epoch_name='epoch',
+def load_netcdf4(fnames=None, strict_meta=False, file_format=None, epoch_name='Epoch',
units_label='units', name_label='long_name'):
# unix_time=False, **kwargs):
"""Load netCDF-3/4 file produced by pysat.
|
updated to Epoch from epoch
|
diff --git a/spec/factories/concern/env.rb b/spec/factories/concern/env.rb
index <HASH>..<HASH> 100644
--- a/spec/factories/concern/env.rb
+++ b/spec/factories/concern/env.rb
@@ -1,6 +1,16 @@
-# -*- coding: utf-8 -*-
# frozen_string_literal: true
+# Files are described by path and data (content loaded as env)
+sample_files = {
+ math: [
+ SAMPLES_PATH.join('concern/env/math.env').realpath,
+ {
+ 'MATH_E' => Math::E.to_s,
+ 'MATH_PI' => Math::PI.to_s
+ }
+ ]
+}
+
FactoryBot.define do
factory 'concern/env', class: FactoryStruct do
sequence(:subject) do |seq|
@@ -10,5 +20,17 @@ FactoryBot.define do
include SwagDev::Project::Concern::Env
end.new
end
+
+ sequence(:files) do |seq|
+ @files ||= []
+
+ sample_files.each do |k, v|
+ @files
+ .tap { |h| h[seq] = {} } [seq]
+ .merge!(k => FactoryStruct.new(path: v.fetch(0), data: v.fetch(1)))
+ end
+
+ @files[seq]
+ end
end
end
|
concern/env (spec/factories) files sequence added
|
diff --git a/tchannel/tornado/tchannel.py b/tchannel/tornado/tchannel.py
index <HASH>..<HASH> 100644
--- a/tchannel/tornado/tchannel.py
+++ b/tchannel/tornado/tchannel.py
@@ -41,21 +41,17 @@ class TChannel(object):
def __init__(self):
self.peers = {}
- @tornado.gen.coroutine
def add_peer(self, hostport):
if hostport not in self.peers:
self.peers[hostport] = TornadoConnection.outgoing(hostport)
- connection = yield self.peers[hostport]
- raise tornado.gen.Return(connection)
+ return self.peers[hostport]
def remove_peer(self, hostport):
# TODO: Connection cleanup
return self.peers.pop(hostport)
- @tornado.gen.coroutine
def get_peer(self, hostport):
- peer = yield self.add_peer(hostport)
- raise tornado.gen.Return(peer)
+ return self.add_peer(hostport)
def request(self, hostport, service=None):
return TChannelClientOperation(hostport, service, self)
|
[python] Eliminate unnecessary coroutines
|
diff --git a/gooey/python_bindings/config_generator.py b/gooey/python_bindings/config_generator.py
index <HASH>..<HASH> 100644
--- a/gooey/python_bindings/config_generator.py
+++ b/gooey/python_bindings/config_generator.py
@@ -41,8 +41,3 @@ def create_from_parser(parser, source_path, **kwargs):
build_spec['manual_start'] = True
return build_spec
-
-
-
-def has_argparse(module_path):
- return any(['.parse_args(' in line.lower() for line in f.readlines()])
|
Remove broken function.
config_generator.has_argparse could not work as
`f` does not exist in scope. Furthermore, I suspect it is
probably a duplication accident, as it's very similar
to source_parser.has_argparse, which is the only one
used in the codebase.
|
diff --git a/holoviews/core/options.py b/holoviews/core/options.py
index <HASH>..<HASH> 100644
--- a/holoviews/core/options.py
+++ b/holoviews/core/options.py
@@ -687,6 +687,8 @@ class Store(object):
object.
"""
+ renderers = {} # The set of available Renderers across all backends.
+
# A mapping from ViewableElement types to their corresponding plot
# types. Set using the register_plots methods.
registry = {}
diff --git a/holoviews/plotting/mpl/__init__.py b/holoviews/plotting/mpl/__init__.py
index <HASH>..<HASH> 100644
--- a/holoviews/plotting/mpl/__init__.py
+++ b/holoviews/plotting/mpl/__init__.py
@@ -101,6 +101,9 @@ def default_options(options):
# Interface
options.TimeSeries = Options('style', color=Cycle())
+
+Store.renderers['matplotlib'] = MPLRenderer
+
# Register the default options
Store.option_setters.append(default_options)
|
Introduced Store.renderers containing the set of available Renderers
|
diff --git a/lib/fog/xenserver/models/compute/pool.rb b/lib/fog/xenserver/models/compute/pool.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/xenserver/models/compute/pool.rb
+++ b/lib/fog/xenserver/models/compute/pool.rb
@@ -19,19 +19,41 @@ module Fog
attribute :restrictions
attribute :ha_enabled
attribute :vswitch_controller
+ attribute :__suspend_image_sr, :aliases => :suspend_image_SR
def default_sr
connection.storage_repositories.get __default_sr
end
+ def default_sr=(sr)
+ connection.set_attribute( 'pool', reference, 'default_SR', sr.reference )
+ end
+ alias :default_storage_repository= :default_sr=
+
def default_storage_repository
default_sr
end
+ def suspend_image_sr=(sr)
+ connection.set_attribute( 'pool', reference, 'suspend_image_SR', sr.reference )
+ end
+
+ def suspend_image_sr
+ connection.storage_repositories.get __suspend_image_sr
+ end
+
def master
connection.hosts.get __master
end
+
+ def set_attribute(name, *val)
+ data = connection.set_attribute( 'pool', reference, name, *val )
+ # Do not reload automatically for performance reasons
+ # We can set multiple attributes at the same time and
+ # then reload manually
+ #reload
+ end
end
|
[xenserver] missing Pool model attribute, new methods
- Added missing suspend_image_sr attribute
- added default_sr getter/setter
- added suspend_image_sr getter/setter
- added generic set_attribute method
|
diff --git a/lxd/daemon.go b/lxd/daemon.go
index <HASH>..<HASH> 100644
--- a/lxd/daemon.go
+++ b/lxd/daemon.go
@@ -1943,11 +1943,15 @@ func (d *Daemon) hasNodeListChanged(heartbeatData *cluster.APIHeartbeat) bool {
return true
}
- // Check for node address changes.
+ // Check for member address or state changes.
for lastMemberID, lastMember := range d.lastNodeList.Members {
if heartbeatData.Members[lastMemberID].Address != lastMember.Address {
return true
}
+
+ if heartbeatData.Members[lastMemberID].Online != lastMember.Online {
+ return true
+ }
}
return false
|
lxd/daemon: Update hasNodeListChanged to detect member state changes
|
diff --git a/molgenis-core-ui/src/main/java/org/molgenis/ui/MolgenisInterceptor.java b/molgenis-core-ui/src/main/java/org/molgenis/ui/MolgenisInterceptor.java
index <HASH>..<HASH> 100644
--- a/molgenis-core-ui/src/main/java/org/molgenis/ui/MolgenisInterceptor.java
+++ b/molgenis-core-ui/src/main/java/org/molgenis/ui/MolgenisInterceptor.java
@@ -21,9 +21,7 @@ public class MolgenisInterceptor extends HandlerInterceptorAdapter
public static final String APP_HREF_LOGO = "app.href.logo";
private final ResourceFingerprintRegistry resourceFingerprintRegistry;
private final MolgenisSettings molgenisSettings;
-
public static final String I18N_LOCALE = "i18nLocale";
-
private final String environment;
@Autowired
|
revert changes (spacing)
|
diff --git a/tests/ApiTest.php b/tests/ApiTest.php
index <HASH>..<HASH> 100644
--- a/tests/ApiTest.php
+++ b/tests/ApiTest.php
@@ -2,6 +2,12 @@
namespace WardenApi;
+/**
+ * Class to test the Warden API functionality.
+ *
+ * @package WardenApi
+ * @author John Ennew <johne@deeson.co.uk>
+ */
class ApiTest extends \PHPUnit_Framework_TestCase {
/**
|
Added doc comments to test class
|
diff --git a/core/src/main/java/lucee/runtime/net/http/ServletContextDummy.java b/core/src/main/java/lucee/runtime/net/http/ServletContextDummy.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/lucee/runtime/net/http/ServletContextDummy.java
+++ b/core/src/main/java/lucee/runtime/net/http/ServletContextDummy.java
@@ -319,37 +319,37 @@ public class ServletContextDummy implements ServletContext {
- @Override
+
public ServletRegistration.Dynamic addJspFile(String s, String s1) {
return null;
}
- @Override
+
public int getSessionTimeout() {
return 0;
}
- @Override
+
public void setSessionTimeout(int i) {
}
- @Override
+
public String getRequestCharacterEncoding() {
return null;
}
- @Override
+
public void setRequestCharacterEncoding(String s) {
}
- @Override
+
public String getResponseCharacterEncoding() {
return null;
}
- @Override
+
public void setResponseCharacterEncoding(String s) {
}
|
removed override from noop impl of abstract methods that were added in Servlet <I>
this causes some version mismatches between dev environment and build environment
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -20,6 +20,7 @@ module.exports = {
browser: require('./configs/browser'),
es6: require('./configs/es6'),
flow: require('./configs/flow'),
+ node: require('./configs/node'),
react: require('./configs/react'),
recommended: require('./configs/recommended'),
relay: require('./configs/relay')
|
add node to list of configs
|
diff --git a/tests/test_contract.py b/tests/test_contract.py
index <HASH>..<HASH> 100755
--- a/tests/test_contract.py
+++ b/tests/test_contract.py
@@ -14,7 +14,7 @@ class ContractTestSuite(unittest.TestCase):
@staticmethod
def test_balance_json_with_proxy():
- proxies = {'http': 'http://78.188.162.174:45318', 'https': 'https://78.188.162.174:45318'}
+ proxies = {'http': 'http://196.43.235.238:53281', 'https': 'https://196.43.235.238:53281'}
flightradar24.Api(proxies=proxies)
@staticmethod
|
new proxy server defined for travisci
|
diff --git a/platform/android/build/android_tools.rb b/platform/android/build/android_tools.rb
index <HASH>..<HASH> 100644
--- a/platform/android/build/android_tools.rb
+++ b/platform/android/build/android_tools.rb
@@ -208,7 +208,8 @@ def get_addon_classpath(addon_pattern, apilevel = nil)
unless found_classpath
msg = "No Android SDK add-on found: #{addon_pattern}"
msg += "; API level: #{apilevel}" if apilevel
- raise msg
+
+ @@logger.warn msg
end
if USE_TRACES
|
don't break build if Google APIs not found
|
diff --git a/discord/guild.py b/discord/guild.py
index <HASH>..<HASH> 100644
--- a/discord/guild.py
+++ b/discord/guild.py
@@ -1116,6 +1116,13 @@ class Guild(Hashable):
:class:`AuditLogEntry`
The audit log entry.
+ Raises
+ -------
+ Forbidden
+ You are not allowed to fetch audit logs
+ HTTPException
+ An error occurred while fetching the audit logs.
+
Examples
----------
|
Document that exceptions happen in Guild.audit_logs.
|
diff --git a/lib/after_do.rb b/lib/after_do.rb
index <HASH>..<HASH> 100644
--- a/lib/after_do.rb
+++ b/lib/after_do.rb
@@ -38,10 +38,6 @@ module AfterDo
end
private
- def _after_do_callbacks
- @_after_do_callbacks
- end
-
def _after_do_define_callback(type, methods, block)
@_after_do_callbacks ||= _after_do_basic_hash
methods = methods.flatten #in case someone used an Array
@@ -107,7 +103,7 @@ module AfterDo
end
def _after_do_execute_callbacks(type, method, object, *args)
- _after_do_callbacks[type][method].each do |block|
+ @_after_do_callbacks[type][method].each do |block|
_after_do_execute_callback(block, method, object, *args)
end
end
|
Actually we do not need the the accessor anymore at all - jay
|
diff --git a/paperpress.js b/paperpress.js
index <HASH>..<HASH> 100644
--- a/paperpress.js
+++ b/paperpress.js
@@ -40,7 +40,7 @@ Paperpress.prototype._getCollections = function(){
})
return collections
} catch (e) {
- // console.error('[Paperpress] ERROR - Can\'t read directory:', this.baseDirectory)
+ console.error('[Paperpress] ERROR - Can\'t read directory:', this.baseDirectory)
}
}
|
Error when directory is not found
|
diff --git a/lib/proxies/dom.js b/lib/proxies/dom.js
index <HASH>..<HASH> 100644
--- a/lib/proxies/dom.js
+++ b/lib/proxies/dom.js
@@ -192,10 +192,12 @@ function DomProxy(raja, opts) {
var h = this;
raja.retrieve(inst.user.url, req, function(err, resource) {
if (err) return cb(err);
- if (!resource) resource = raja.create(inst.user, req).save();
+ if (!resource) resource = raja.create(inst.user, res);
inst.user = resource;
if (!resource.headers) resource.headers = {};
+ resource.headers['Content-Type'] = 'text/html';
if (!resource.resources) resource.resources = {};
+ resource.save();
if (inst.page && inst.live && !inst.reloads) {
inst.page.locked = true;
inst.output(inst.page, function(err, str) {
@@ -219,7 +221,6 @@ function DomProxy(raja, opts) {
if (!resource.itime || resource.itime <= resource.mtime) {
resource.valid = true;
resource.mtime = new Date();
- resource.headers['Content-Type'] = 'text/html';
resource.save();
} else if (!resource.mtime) {
resource.mtime = new Date();
|
Make sure Content-Type is set when building key in dom proxy
|
diff --git a/src/game.js b/src/game.js
index <HASH>..<HASH> 100644
--- a/src/game.js
+++ b/src/game.js
@@ -299,7 +299,7 @@
isDirty = api.viewport.update(updateDelta) || isDirty;
me.timer.lastUpdate = window.performance.now();
- updateAverageDelta = (updateAverageDelta * 2/3) + ( (me.timer.lastUpdate - lastUpdateStart) * 1/3 );
+ updateAverageDelta = me.timer.lastUpdate - lastUpdateStart;
accumulator -= accumulatorUpdateDelta;
if (me.sys.interpolation) {
|
Removed update delta averaging... seemed to only cause lag problems
|
diff --git a/lib/metamorpher/builders/ast/builder.rb b/lib/metamorpher/builders/ast/builder.rb
index <HASH>..<HASH> 100644
--- a/lib/metamorpher/builders/ast/builder.rb
+++ b/lib/metamorpher/builders/ast/builder.rb
@@ -2,6 +2,7 @@ require "metamorpher/builders/ast/literal_builder"
require "metamorpher/builders/ast/variable_builder"
require "metamorpher/builders/ast/greedy_variable_builder"
require "metamorpher/builders/ast/derivation_builder"
+require "forwardable"
module Metamorpher
module Builders
diff --git a/spec/integration/ruby/refactorer_spec.rb b/spec/integration/ruby/refactorer_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/integration/ruby/refactorer_spec.rb
+++ b/spec/integration/ruby/refactorer_spec.rb
@@ -1,4 +1,5 @@
require "metamorpher"
+require "tempfile"
describe "Refactorer" do
describe "for Ruby" do
|
Fix dependencies on components that are no longer in Ruby core.
|
diff --git a/tests/db/models_test.py b/tests/db/models_test.py
index <HASH>..<HASH> 100644
--- a/tests/db/models_test.py
+++ b/tests/db/models_test.py
@@ -549,7 +549,6 @@ class GmfSetIterTestCase(unittest.TestCase):
self.assertTrue(equal, error)
-
@attr('slow')
def test_iter(self):
# Test data
|
tests/db/models_test:
pep8
|
diff --git a/assertpy/__init__.py b/assertpy/__init__.py
index <HASH>..<HASH> 100644
--- a/assertpy/__init__.py
+++ b/assertpy/__init__.py
@@ -1 +1 @@
-from assertpy import assert_that, contents_of, fail
+from assertpy import assert_that, contents_of, fail, __version__
diff --git a/assertpy/assertpy.py b/assertpy/assertpy.py
index <HASH>..<HASH> 100644
--- a/assertpy/assertpy.py
+++ b/assertpy/assertpy.py
@@ -28,6 +28,8 @@
"""Fluent assertion framework for better, more readable tests."""
+__version__ = '0.5'
+
import re
import os
import datetime
|
added version string, <I>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.