diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/JsonApi/Request/ParamEntityFinder.php b/JsonApi/Request/ParamEntityFinder.php
index <HASH>..<HASH> 100644
--- a/JsonApi/Request/ParamEntityFinder.php
+++ b/JsonApi/Request/ParamEntityFinder.php
@@ -73,7 +73,7 @@ class ParamEntityFinder
$access = self::$actionToAccess[$params->action->name];
- if ($this->securityContext->isGranted($access, $entity)) {
+ if (!$this->securityContext->isGranted($access, $entity)) {
throw new EntityAccessDeniedException(
self::ERROR_ACCESS_DENIED
);
|
Same mistake twice - Trix are for kids after all.
|
diff --git a/libs/Parser/Section.php b/libs/Parser/Section.php
index <HASH>..<HASH> 100644
--- a/libs/Parser/Section.php
+++ b/libs/Parser/Section.php
@@ -24,7 +24,7 @@ class Section
*/
private $content='';
- public function __construct( string$name )
+ public function __construct( string$name=null )
{
$this->name = $name;
}
@@ -40,4 +40,9 @@ class Section
{
return $this->content;
}
+
+ public function getName()//:string|null
+ {
+ return $this->name;
+ }
}
|
Allow nameless Section with name value of null.
|
diff --git a/natasha/grammars/person/grammars.py b/natasha/grammars/person/grammars.py
index <HASH>..<HASH> 100644
--- a/natasha/grammars/person/grammars.py
+++ b/natasha/grammars/person/grammars.py
@@ -523,4 +523,33 @@ class ProbabilisticPerson(Enum):
POSSIBLE_PART_OF_NAME_GRAMMAR,
]
- FirstnameAndLastnameWithPosition = Person.WithPosition.value[:-1] + FirstnameAndLastname
+ FirstnameAndLastnameWithPosition = Person.WithPosition.value[:-1] + [
+ FirstnameAndLastname[-1]
+ ]
+
+ Latin = [
+ {
+ 'labels': [
+ gram('LATN'),
+ is_capitalized(True),
+ ],
+ },
+ {
+ 'labels': [
+ gram('LATN'),
+ is_capitalized(True),
+ ],
+ },
+ {
+ 'labels': [
+ gram('PUNCT'),
+ eq('.')
+ ],
+ },
+ {
+ 'labels': [
+ gram('LATN'),
+ is_capitalized(True),
+ ],
+ },
+ ]
|
Added probabilistic grammar for english names (in 'John W. Doe' format)
|
diff --git a/server/index.js b/server/index.js
index <HASH>..<HASH> 100644
--- a/server/index.js
+++ b/server/index.js
@@ -131,7 +131,7 @@ export default class Server {
return await renderScriptError(req, res, '/_error', error, customFields, this.renderOpts)
}
- const p = join(this.dir, '.next/bundles/pages/_error.js')
+ const p = join(this.dir, `${this.dist}/bundles/pages/_error.js`)
await this.serveStatic(req, res, p)
},
diff --git a/server/render.js b/server/render.js
index <HASH>..<HASH> 100644
--- a/server/render.js
+++ b/server/render.js
@@ -109,7 +109,8 @@ async function doRender (req, res, pathname, query, {
export async function renderScript (req, res, page, opts) {
try {
- const path = join(opts.dir, '.next', 'bundles', 'pages', page)
+ const dist = getConfig(opts.dir).distDir
+ const path = join(opts.dir, dist, 'bundles', 'pages', page)
const realPath = await resolvePath(path)
await serveStatic(req, res, realPath)
} catch (err) {
|
use configured distDir where required (#<I>)
|
diff --git a/lib/rasn1/types/base.rb b/lib/rasn1/types/base.rb
index <HASH>..<HASH> 100644
--- a/lib/rasn1/types/base.rb
+++ b/lib/rasn1/types/base.rb
@@ -115,7 +115,11 @@ module Rasn1
if primitive?
raise ASN1Error, "malformed #{type} TAG (#@name): indefinite length forbidden for primitive types"
else
- raise ASN1Error, "TAG #@name: indefinite length not supported yet"
+ if ber
+ raise NotImplementedError, "TAG #@name: indefinite length not supported yet"
+ else
+ raise ASN1Error, "TAG #@name: indefinite length forbidden in DER encoding"
+ end
end
elsif length < INDEFINITE_LENGTH
der_to_value(der[2, length], ber: ber)
diff --git a/spec/types/base_spec.rb b/spec/types/base_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/types/base_spec.rb
+++ b/spec/types/base_spec.rb
@@ -94,7 +94,9 @@ module Rasn1::Types
expect { bool.parse!(der) }.to raise_error(Rasn1::ASN1Error).
with_message('malformed BOOLEAN TAG (bool): indefinite length forbidden for primitive types')
end
- it 'raises on indefinite length with constructed types'
+
+ it 'raises on indefinite length with constructed types on DER encoding'
+ it 'raises on indefinite length with constructed types on BER encoding'
end
end
end
|
Types::Base#parse!: differentiate BER and DER encoding on indefinite length
|
diff --git a/tests/pipeline/test_engine.py b/tests/pipeline/test_engine.py
index <HASH>..<HASH> 100644
--- a/tests/pipeline/test_engine.py
+++ b/tests/pipeline/test_engine.py
@@ -1221,6 +1221,9 @@ class ParameterizedFactorTestCase(WithTradingEnvironment, ZiplineTestCase):
expected_5 = rolling_mean((self.raw_data ** 2) * 2, window=5)[5:]
assert_frame_equal(results['dv5'].unstack(), expected_5)
+ # The following two use USEquityPricing.open and .volume as inputs.
+ # The former uses self.raw_data_with_nans, and the latter uses
+ # .raw_data * 2. Thus we multiply instead of squaring as above.
expected_1_nan = (self.raw_data_with_nans[5:]
* self.raw_data[5:] * 2).fillna(0)
assert_frame_equal(results['dv1_nan'].unstack(), expected_1_nan)
|
DOC: Add comment explaining ADV NaN test expected result calculation.
|
diff --git a/src/Passbook/PassFactory.php b/src/Passbook/PassFactory.php
index <HASH>..<HASH> 100644
--- a/src/Passbook/PassFactory.php
+++ b/src/Passbook/PassFactory.php
@@ -219,7 +219,6 @@ class PassFactory
throw new FileException("Couldn't open zip file.");
}
if ($handle = opendir($passDir)) {
- $zip->addFile($passDir);
while (false !== ($entry = readdir($handle))) {
if ($entry == '.' or $entry == '..') continue;
$zip->addFile($passDir . $entry, $entry);
|
Pass dir removed from zip archive. closes #<I>
|
diff --git a/storage/remote/client.go b/storage/remote/client.go
index <HASH>..<HASH> 100644
--- a/storage/remote/client.go
+++ b/storage/remote/client.go
@@ -101,7 +101,9 @@ func (c *Client) Store(samples model.Samples) error {
}
httpReq.Header.Add("Content-Encoding", "snappy")
- ctx, _ := context.WithTimeout(context.Background(), c.timeout)
+ ctx, cancel := context.WithTimeout(context.Background(), c.timeout)
+ defer cancel()
+
httpResp, err := ctxhttp.Do(ctx, c.client, httpReq)
if err != nil {
return err
@@ -144,6 +146,10 @@ func (c *Client) Read(ctx context.Context, from, through model.Time, matchers me
if err != nil {
return nil, fmt.Errorf("unable to create request: %v", err)
}
+
+ ctx, cancel := context.WithTimeout(ctx, c.timeout)
+ defer cancel()
+
httpResp, err := ctxhttp.Do(ctx, c.client, httpReq)
if err != nil {
return nil, fmt.Errorf("error sending request: %v", err)
|
Fix/unify context-based remote storage timeouts
|
diff --git a/lib/xcodeproj/project/object/build_configuration.rb b/lib/xcodeproj/project/object/build_configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/xcodeproj/project/object/build_configuration.rb
+++ b/lib/xcodeproj/project/object/build_configuration.rb
@@ -215,14 +215,15 @@ module Xcodeproj
settings.keys.each do |key|
next unless value = settings[key]
+ stripped_key = key.sub(/\[[^\]]+\]$/, '')
case value
when String
- next unless array_settings.include?(key)
+ next unless array_settings.include?(stripped_key)
array_value = split_build_setting_array_to_string(value)
next unless array_value.size > 1
settings[key] = array_value
when Array
- next if value.size > 1 && array_settings.include?(key)
+ next if value.size > 1 && array_settings.include?(stripped_key)
settings[key] = value.join(' ')
end
end
|
Fix incorrect formatting of build settings with modifiers
|
diff --git a/code/libraries/koowa/libraries/template/helper/listbox.php b/code/libraries/koowa/libraries/template/helper/listbox.php
index <HASH>..<HASH> 100644
--- a/code/libraries/koowa/libraries/template/helper/listbox.php
+++ b/code/libraries/koowa/libraries/template/helper/listbox.php
@@ -328,15 +328,20 @@ class KTemplateHelperListbox extends KTemplateHelperSelect
if (form.hasClass("-koowa-form") || form.hasClass("-koowa-grid")) {
form.submit(explode);
} else {
- var element = form.get(0);
-
- if (element.addEvent) {
- element.addEvent("submit", explode);
- } else if (element.addEventListener) {
- element.addEventListener("submit", explode, false);
- } else if (element.attachEvent) {
- element.attachEvent("onsubmit", explode);
- }
+ // See: https://github.com/joomla/joomla-cms/pull/5914 for why we use onsubmit
+ var element = form.get(0),
+ previous = element.onsubmit;
+
+ element.onsubmit = function() {
+ if (typeof previous === "function") {
+ previous();
+ }
+
+ explode();
+
+ // Avoid explode to be executed more than once.
+ element.onsubmit = previous;
+ };
}
});</script>';
}
|
re #<I> Avoid explode from being executed more than once.
IE makes a second call to onsubmit when a fireEvent call is made.
|
diff --git a/pyang/translators/schemanode.py b/pyang/translators/schemanode.py
index <HASH>..<HASH> 100644
--- a/pyang/translators/schemanode.py
+++ b/pyang/translators/schemanode.py
@@ -175,7 +175,7 @@ class SchemaNode(object):
def _default_format(self, occur):
"""Return the default serialization format."""
if self.text or self.children:
- return self.start_tag() + "%s" + self.end_tag()
+ return self.start_tag() + self._chorder() + self.end_tag()
else:
return self.start_tag(empty=True) + "%s"
|
Interleave for elements other that rng:element.
|
diff --git a/teslajsonpy/controller.py b/teslajsonpy/controller.py
index <HASH>..<HASH> 100644
--- a/teslajsonpy/controller.py
+++ b/teslajsonpy/controller.py
@@ -874,7 +874,7 @@ class Controller:
tasks = []
for vin, online in self.car_online.items():
# If specific car_id provided, only update match
- if (car_vin and car_vin != vin) or (
+ if (car_vin and car_vin != vin) or vin not in self.__lock.keys() or (
vin and self.car_state[vin].get("in_service")
):
continue
|
fix(vins): ensure vin is in saved state
|
diff --git a/lib/puppet-repl/support/input_responders.rb b/lib/puppet-repl/support/input_responders.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet-repl/support/input_responders.rb
+++ b/lib/puppet-repl/support/input_responders.rb
@@ -17,10 +17,10 @@ module PuppetRepl
def vars(args=[])
# remove duplicate variables that are also in the facts hash
- vars = scope.to_hash.delete_if {| key, value | node.facts.values.key?(key) }
- vars['facts'] = 'removed by the puppet-repl' if vars.key?('facts')
+ variables = scope.to_hash.delete_if {| key, value | node.facts.values.key?(key) }
+ variables['facts'] = 'removed by the puppet-repl' if variables.key?('facts')
ap 'Facts were removed for easier viewing'
- ap(vars, {:sort_keys => true, :indent => -1})
+ ap(variables, {:sort_keys => true, :indent => -1})
end
def environment(args=[])
|
use different variable name to prevent stack overflow
|
diff --git a/provider.go b/provider.go
index <HASH>..<HASH> 100644
--- a/provider.go
+++ b/provider.go
@@ -5,7 +5,8 @@ import (
"sync"
"time"
- "github.com/awslabs/aws-sdk-go/aws/credentials"
+ "github.com/aws/aws-sdk-go/aws/credentials"
+ "github.com/awslabs/aws-sdk-go/aws/credentials/ec2rolecreds"
"github.com/hashicorp/terraform/helper/hashcode"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/terraform"
@@ -39,7 +40,7 @@ func Provider() terraform.ResourceProvider {
conn, err := net.DialTimeout("tcp", "169.254.169.254:80", 100*time.Millisecond)
if err == nil {
conn.Close()
- providers = append(providers, &credentials.EC2RoleProvider{})
+ providers = append(providers, &ec2rolecreds.EC2RoleProvider{})
}
credVal, credErr = credentials.NewChainCredentials(providers).Get()
|
provider/aws: match with upstream changes
|
diff --git a/lib/resource_renderer/version.rb b/lib/resource_renderer/version.rb
index <HASH>..<HASH> 100644
--- a/lib/resource_renderer/version.rb
+++ b/lib/resource_renderer/version.rb
@@ -1,3 +1,3 @@
module ResourceRenderer
- VERSION = '1.2.2'
+ VERSION = '1.2.3'
end
|
Bumped version to <I>
|
diff --git a/dimod/core/bqm.py b/dimod/core/bqm.py
index <HASH>..<HASH> 100644
--- a/dimod/core/bqm.py
+++ b/dimod/core/bqm.py
@@ -860,7 +860,7 @@ class BQM(metaclass=abc.ABCMeta):
"""
if not inplace:
- return self.copy().relabel_variables(inplace=True)
+ return self.copy().relabel_variables_as_integers(inplace=True)
mapping = dict((v, i) for i, v in enumerate(self.variables) if i != v)
return (self.relabel_variables(mapping, inplace=True),
|
fixed relabel variables as integers with no inplace
|
diff --git a/src/java/com/threerings/presents/peer/server/PeerManager.java b/src/java/com/threerings/presents/peer/server/PeerManager.java
index <HASH>..<HASH> 100644
--- a/src/java/com/threerings/presents/peer/server/PeerManager.java
+++ b/src/java/com/threerings/presents/peer/server/PeerManager.java
@@ -680,6 +680,7 @@ public class PeerManager
public void shutdown ()
{
if (_client.isActive()) {
+ log.info("Logging off of peer " + _record + ".");
_client.logoff(false);
}
}
|
Log when we're calling logoff() for our local peers to see if this is or isn't
happening on the hanging dev server.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@<I> <I>f4-<I>e9-<I>-aa3c-eee0fc<I>fb1
|
diff --git a/app/helpers/i18n_helpers.rb b/app/helpers/i18n_helpers.rb
index <HASH>..<HASH> 100644
--- a/app/helpers/i18n_helpers.rb
+++ b/app/helpers/i18n_helpers.rb
@@ -82,15 +82,18 @@ module I18nHelpers
#
def t_title(action = nil, model = nil)
action ||= action_name
+ I18n.translate("#{t_context(model)}.#{action}.title", default: [:"crud.title.#{action}"],
+ model: t_model(model))
+ end
+ alias :t_crud :t_title
+
+ def t_context(model = nil)
if model
- context = model.name.pluralize.underscore
+ model.name.pluralize.underscore
else
- context = controller_name.underscore
+ controller_name
end
-
- I18n::translate("#{context}.#{action}.title", :default => [:"crud.title.#{action}"], :model => t_model(model))
end
- alias :t_crud :t_title
# Returns translated string for current +action+.
#
|
get context with method and controller_name needn't to be underscored
|
diff --git a/test/app.js b/test/app.js
index <HASH>..<HASH> 100644
--- a/test/app.js
+++ b/test/app.js
@@ -5,6 +5,10 @@ var Joi = require('joi');
var config = require('./config.js');
+
+var personRoutingKey = 'name' // used in the customRouting.spec.js tests
+
+
function configureApp(harvesterApp) {
var peopleSearch, equipmentSearch, warriorSearch;
//This circumvents a dependency issue between harvest and elastic-harvest.
@@ -56,6 +60,7 @@ function configureApp(harvesterApp) {
peopleSearch.setHarvestRoute(harvesterApp.createdResources['person']);
peopleSearch.enableAutoSync("person");
peopleSearch.enableAutoIndexUpdate();
+ peopleSearch.setCustomRouting(personRoutingKey)
equipmentSearch = new ElasticHarvest(harvesterApp, options.es_url, options.es_index, 'equipment');
equipmentSearch.setHarvestRoute(harvesterApp.createdResources['equipment']);
@@ -97,6 +102,7 @@ function createAndConfigure() {
*/
module.exports = function () {
var that = this;
+ that.personRoutingKey = personRoutingKey
return createAndConfigure().spread(function (app, peopleSearch) {
app.listen(config.harvester.port);
that.harvesterApp = app;
|
Exposed customRouting key for use in tests.
|
diff --git a/topgg/errors.py b/topgg/errors.py
index <HASH>..<HASH> 100644
--- a/topgg/errors.py
+++ b/topgg/errors.py
@@ -70,46 +70,30 @@ class HTTPException(TopGGException):
class Unauthorized(HTTPException):
- """Exception that's thrown when status code 401 occurs.
-
- Subclass of :exc:`HTTPException`
- """
+ """Exception that's thrown when status code 401 occurs."""
pass
class UnauthorizedDetected(TopGGException):
- """Exception that's thrown when no API Token is provided.
-
- Subclass of :exc:`TopGGException`
- """
+ """Exception that's thrown when no API Token is provided."""
pass
class Forbidden(HTTPException):
- """Exception that's thrown when status code 403 occurs.
-
- Subclass of :exc:`HTTPException`
- """
+ """Exception that's thrown when status code 403 occurs."""
pass
class NotFound(HTTPException):
- """Exception that's thrown when status code 404 occurs.
-
- Subclass of :exc:`HTTPException`
- """
+ """Exception that's thrown when status code 404 occurs."""
pass
class ServerError(HTTPException):
- """Exception that's thrown when Top.gg returns "Server Error" responses
- (status codes such as 500 and 503).
-
- Subclass of :exc:`HTTPException`
- """
+ """Exception that's thrown when Top.gg returns "Server Error" responses (status codes such as 500 and 503)."""
pass
|
Exception inheritance in docstrings rephrased
|
diff --git a/test/gorpc_protocols_flavor.py b/test/gorpc_protocols_flavor.py
index <HASH>..<HASH> 100644
--- a/test/gorpc_protocols_flavor.py
+++ b/test/gorpc_protocols_flavor.py
@@ -45,7 +45,6 @@ class GoRpcProtocolsFlavor(protocols_flavor.ProtocolsFlavor):
return [
'bsonrpc-vt-queryservice',
'bsonrpc-vt-tabletmanager',
- 'bsonrpc-vt-toporeader',
'bsonrpc-vt-updatestream',
'bsonrpc-vt-vtctl',
'bsonrpc-vt-vtgateservice',
diff --git a/test/grpc_protocols_flavor.py b/test/grpc_protocols_flavor.py
index <HASH>..<HASH> 100644
--- a/test/grpc_protocols_flavor.py
+++ b/test/grpc_protocols_flavor.py
@@ -41,7 +41,6 @@ class GRpcProtocolsFlavor(protocols_flavor.ProtocolsFlavor):
def service_map(self):
return [
- 'bsonrpc-vt-toporeader',
'bsonrpc-vt-vtgateservice',
'grpc-queryservice',
'grpc-updatestream',
|
Removed toporeader from service map in tests.
|
diff --git a/master/buildbot/test/unit/test_process_properties.py b/master/buildbot/test/unit/test_process_properties.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/test/unit/test_process_properties.py
+++ b/master/buildbot/test/unit/test_process_properties.py
@@ -1534,6 +1534,11 @@ class Renderer(unittest.TestCase):
self.assertIn('args=[\'a\']', repr(rend))
self.assertIn('kwargs={\'kwarg\': \'kw\'}', repr(rend))
+ @defer.inlineCallbacks
+ def test_interpolate_worker(self):
+ rend = yield self.build.render(Interpolate("%(worker:test)s"))
+ self.assertEqual(rend, "test")
+
class Compare(unittest.TestCase):
@@ -1585,6 +1590,11 @@ class Compare(unittest.TestCase):
Interpolate('testing: %(kw:test)s', test="test", other=3),
Interpolate('testing: %(kw:test)s', test="test", other=3))
+ def test_Interpolate_worker(self):
+ self.assertEqual(
+ Interpolate('testing: %(worker:test)s'),
+ Interpolate('testing: %(worker:test)s'))
+
def test_renderer(self):
self.assertNotEqual(
renderer(lambda p: 'val'),
|
test_process_properties: Test that worker interpolation works
|
diff --git a/test/socket.io.js b/test/socket.io.js
index <HASH>..<HASH> 100644
--- a/test/socket.io.js
+++ b/test/socket.io.js
@@ -1536,7 +1536,7 @@ describe('socket.io', function(){
});
it('should handle very large binary data', function(done){
- this.timeout(10000);
+ this.timeout(30000);
var srv = http();
var sio = io(srv, { perMessageDeflate: false });
var received = 0;
|
socket.io: increase large binary data test timeout
|
diff --git a/test/responder_test.rb b/test/responder_test.rb
index <HASH>..<HASH> 100644
--- a/test/responder_test.rb
+++ b/test/responder_test.rb
@@ -68,7 +68,7 @@ class ResponderTest < ActionController::TestCase
end
tests SingersController
- test "returns non-represented json of model by falling back to Rails default responding" do
+ test "returns non-represented json of model by falling back to Rails default responding when supressed in respond_with" do
singer = Singer.new('Bumi', 42)
get do
@@ -77,6 +77,18 @@ class ResponderTest < ActionController::TestCase
assert_equal singer.to_json, @response.body
end
+
+ test "return non-represented json model by falling back to Rails default responding when supressed in the configuration" do
+ singer = Singer.new('Bumi', 42)
+
+ Rails.application.config.representer.represented_formats = []
+ get do
+ respond_with singer
+ end
+ Rails.application.config.representer.represented_formats = nil
+
+ assert_equal singer.to_json, @response.body
+ end
end
class ProvidingRepresenterForFormatTest < ResponderTest
|
Add test for supressing the representation for specific formats from the application configuration.
|
diff --git a/lib/model/folder_sendonly.go b/lib/model/folder_sendonly.go
index <HASH>..<HASH> 100644
--- a/lib/model/folder_sendonly.go
+++ b/lib/model/folder_sendonly.go
@@ -92,7 +92,7 @@ func (f *sendOnlyFolder) Override() {
}
func (f *sendOnlyFolder) override() {
- l.Infof("Overriding global state on folder %v", f.Description)
+ l.Infoln("Overriding global state on folder", f.Description())
f.setState(FolderScanning)
defer f.setState(FolderIdle)
|
model: Actually print folder description in "Overriding" log message
|
diff --git a/src/main/java/org/apache/jmeter/JMeterMojo.java b/src/main/java/org/apache/jmeter/JMeterMojo.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/apache/jmeter/JMeterMojo.java
+++ b/src/main/java/org/apache/jmeter/JMeterMojo.java
@@ -310,12 +310,15 @@ public class JMeterMojo extends AbstractMojo {
*/
private void checkForErrors(List<String> results) throws MojoExecutionException, MojoFailureException {
ErrorScanner scanner = new ErrorScanner(this.jmeterIgnoreError, this.jmeterIgnoreFailure);
+ int errorCount = 0;
try {
for (String file : results) {
if (scanner.scanForProblems(new File(file))) {
- getLog().warn("There were test errors. See the jmeter logs for details");
+ errorCount++;
}
}
+ getLog().info("\n\nResults :\n\n");
+ getLog().info("Tests Run: " + results.size() + ", Errors: " + errorCount +"\n\n");
} catch (IOException e) {
throw new MojoExecutionException("Can't read log file", e);
}
|
Error checking tweaked to display tests run as well as number of failures.
|
diff --git a/examples/plotting/file/stocks.py b/examples/plotting/file/stocks.py
index <HASH>..<HASH> 100644
--- a/examples/plotting/file/stocks.py
+++ b/examples/plotting/file/stocks.py
@@ -44,7 +44,7 @@ def stocks():
scatter(aapl_dates, aapl,
x_axis_type = "datetime",
- color='#A6CEE3', radius=1, tools="pan,zoom,resize,embed", legend='close')
+ color='#A6CEE3', radius=1, tools="pan,zoom,resize", legend='close')
line(aapl_dates, aapl_avg,
color='red', tools="pan,zoom,resize", legend='avg', name="stocks")
|
removed embed_tool because it isn't applicable to file based plots
|
diff --git a/rpcclient.go b/rpcclient.go
index <HASH>..<HASH> 100644
--- a/rpcclient.go
+++ b/rpcclient.go
@@ -266,7 +266,7 @@ func NewRpcClientPool(transmissionType string, replyTimeout time.Duration) *RpcC
}
func (pool *RpcClientPool) AddClient(rcc RpcClientConnection) {
- if rcc != nil {
+ if rcc != nil && !reflect.ValueOf(rcc).IsNil() {
pool.connections = append(pool.connections, rcc)
}
}
|
Make sure we don't hide nil into interface for connections in the pool
|
diff --git a/discord/gateway.py b/discord/gateway.py
index <HASH>..<HASH> 100644
--- a/discord/gateway.py
+++ b/discord/gateway.py
@@ -63,6 +63,7 @@ class KeepAliveHandler(threading.Thread):
self.msg = 'Keeping websocket alive with sequence %s.'
self._stop_ev = threading.Event()
self._last_ack = time.time()
+ self._last_send = time.time()
def run(self):
while not self._stop_ev.wait(self.interval):
@@ -88,6 +89,8 @@ class KeepAliveHandler(threading.Thread):
f.result()
except Exception:
self.stop()
+ else:
+ self._last_send = time.time()
def get_payload(self):
return {
@@ -408,6 +411,12 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol):
for index in reversed(removed):
del self._dispatch_listeners[index]
+ @property
+ def latency(self):
+ """float: Measures latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds."""
+ heartbeat = self._keep_alive
+ return float('inf') if heartbeat is None else heartbeat._last_ack - heartbeat._last_send
+
def _can_handle_close(self, code):
return code not in (1000, 4004, 4010, 4011)
|
Add DiscordWebSocket.latency to measure discord heartbeat latency.
|
diff --git a/public/ModuleDlstatsStatisticsDetails.php b/public/ModuleDlstatsStatisticsDetails.php
index <HASH>..<HASH> 100644
--- a/public/ModuleDlstatsStatisticsDetails.php
+++ b/public/ModuleDlstatsStatisticsDetails.php
@@ -33,8 +33,7 @@ while ($dir != '.' && $dir != '/' && !is_file($dir . '/system/initialize.php'))
if (!is_file($dir . '/system/initialize.php'))
{
- echo 'Could not find initialize.php!';
- exit(1);
+ throw new \ErrorException('Could not find initialize.php!',2,1,basename(__FILE__),__LINE__);
}
require($dir . '/system/initialize.php');
|
Fixed #<I> - exit() and die() functions should be avoided
|
diff --git a/version.go b/version.go
index <HASH>..<HASH> 100644
--- a/version.go
+++ b/version.go
@@ -2,4 +2,4 @@ package manifold
// Version is the package version of go-manifold. This gets automatically
// updated by running `make release`.
-const Version = "0.9.5"
+const Version = "0.9.7"
|
Tagging <I> (#<I>)
|
diff --git a/src/com/google/javascript/jscomp/ProcessClosurePrimitives.java b/src/com/google/javascript/jscomp/ProcessClosurePrimitives.java
index <HASH>..<HASH> 100644
--- a/src/com/google/javascript/jscomp/ProcessClosurePrimitives.java
+++ b/src/com/google/javascript/jscomp/ProcessClosurePrimitives.java
@@ -1502,16 +1502,8 @@ class ProcessClosurePrimitives extends AbstractPostOrderCallback
return decl;
}
- /**
- * There are some special cases where clients of the compiler
- * do not run TypedScopeCreator after running this pass.
- * So always give the namespace literal a type.
- */
private Node createNamespaceLiteral() {
- Node objlit = IR.objectlit();
- objlit.setJSType(
- compiler.getTypeRegistry().createAnonymousObjectType(null));
- return objlit;
+ return IR.objectlit();
}
/**
|
Remove a leftover use of the old type checker in ProcessClosurePrimitives.
-------------
Created by MOE: <URL>
|
diff --git a/src/util.js b/src/util.js
index <HASH>..<HASH> 100644
--- a/src/util.js
+++ b/src/util.js
@@ -524,6 +524,10 @@ export function get (object, path) {
}
export function has (object, path, parent = false) {
+ if (typeof object === 'undefined') {
+ return false
+ }
+
const sections = path.split('.')
const size = !parent ? 1 : 2
while (sections.length > size) {
|
fix: error on edit data of component without properties in devtools (#<I>)
|
diff --git a/lib/adapters/postgres.js b/lib/adapters/postgres.js
index <HASH>..<HASH> 100644
--- a/lib/adapters/postgres.js
+++ b/lib/adapters/postgres.js
@@ -577,15 +577,11 @@ var DB = define(Database, {
},
primaryKey:function (table, opts) {
- var ret = new Promise();
- var quotedTable = this.__quoteSchemaTable(table), pks = this.__primaryKeys;
+ var ret, quotedTable = this.__quoteSchemaTable(table).toString(), pks = this.__primaryKeys;
if (pks.hasOwnProperty(quotedTable.toString())) {
- ret.callback(pks[quotedTable.toString()]);
+ ret = pks[quotedTable];
} else {
- this.__primarykey(table).then(function (res) {
- pks[quotedTable] = res;
- ret.callback(res);
- }, ret);
+ ret = (pks[quotedTable] = this.__primarykey(table));
}
return ret.promise();
},
|
fixed primarykey caching to use the promise.
|
diff --git a/pipdeps.py b/pipdeps.py
index <HASH>..<HASH> 100755
--- a/pipdeps.py
+++ b/pipdeps.py
@@ -52,7 +52,8 @@ def command_install(bucket, verbose=False):
for key in bucket.list(prefix=PREFIX):
archive = key.name[len(PREFIX):]
key.get_contents_to_filename(os.path.join(archives_dir, archive))
- run_pip_install(["--user", "--no-index", "--find-links", archives_dir],
+ archives_url = "file://" + archives_dir
+ run_pip_install(["--user", "--no-index", "--find-links", archives_url],
verbose=verbose)
|
Support precise pip by using file: url for directory
|
diff --git a/lib/distillery/document.rb b/lib/distillery/document.rb
index <HASH>..<HASH> 100644
--- a/lib/distillery/document.rb
+++ b/lib/distillery/document.rb
@@ -27,7 +27,7 @@ module Distillery
# HTML elements that are possible unrelated to the content of the content HTML
# element.
- POSSIBLE_UNRELATED_ELEMENTS = %w[table ul div]
+ POSSIBLE_UNRELATED_ELEMENTS = %w[table ul div a]
# The Nokogiri document
attr_reader :doc
|
Add <a> tags to the list list of possible unrelated elements. This helps remove bad anchors that are not part of the content.
|
diff --git a/test/feature-emulation-helpers.js b/test/feature-emulation-helpers.js
index <HASH>..<HASH> 100644
--- a/test/feature-emulation-helpers.js
+++ b/test/feature-emulation-helpers.js
@@ -120,6 +120,34 @@
return result;
}
+ function fromCodePoint()
+ {
+ var codeUnits = [];
+ Array.prototype.forEach.call(
+ arguments,
+ function (arg)
+ {
+ var codePoint = Number(arg);
+ if ((codePoint & 0x1fffff) !== codePoint || codePoint > 0x10ffff)
+ {
+ throw RangeError(codePoint + ' is not a valid code point');
+ }
+ if (codePoint <= 0xffff)
+ {
+ codeUnits.push(codePoint);
+ }
+ else
+ {
+ var highSurrogate = (codePoint - 0x10000 >> 10) + 0xd800;
+ var lowSurrogate = (codePoint & 0x3ff) + 0xdc00;
+ codeUnits.push(highSurrogate, lowSurrogate);
+ }
+ }
+ );
+ var result = String.fromCharCode.apply(null, codeUnits);
+ return result;
+ }
+
function makeEmuFeatureEntries(str, regExp)
{
var result =
@@ -385,7 +413,7 @@
{
setUp: function ()
{
- override(this, 'String.fromCodePoint', { value: String.fromCharCode });
+ override(this, 'String.fromCodePoint', { value: fromCodePoint });
}
},
GMT:
|
FROM_CODE_POINT feature emulation
|
diff --git a/mode/haxe/haxe.js b/mode/haxe/haxe.js
index <HASH>..<HASH> 100644
--- a/mode/haxe/haxe.js
+++ b/mode/haxe/haxe.js
@@ -191,21 +191,20 @@ CodeMirror.defineMode("haxe", function(config, parserConfig) {
pass.apply(null, arguments);
return true;
}
+ function inList(name, list) {
+ for (var v = list; v; v = v.next)
+ if (v.name == name) return true;
+ return false;
+ }
function register(varname) {
- function inList(list) {
- for (var v = list; v; v = v.next)
- if (v.name == varname) return true;
- return false;
- }
var state = cx.state;
if (state.context) {
cx.marked = "def";
- if (inList(state.localVars)) return;
+ if (inList(varname, state.localVars)) return;
state.localVars = {name: varname, next: state.localVars};
- } else {
- if (inList(state.globalVars)) return;
- if (parserConfig.globalVars)
- state.globalVars = {name: varname, next: state.globalVars};
+ } else if (state.globalVars) {
+ if (inList(varname, state.globalVars)) return;
+ state.globalVars = {name: varname, next: state.globalVars};
}
}
|
[haxe mode] Tweak previous patch
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ with open(os.path.join(os.path.abspath(os.path.dirname(__file__)),
setup(
name='cartoframes',
- version='0.2.1-beta.1',
+ version='0.2.1b2',
description='An experimental Python pandas interface for using CARTO',
long_description=LONG_DESCRIPTION,
url='https://github.com/CartoDB/cartoframes',
@@ -29,6 +29,7 @@ setup(
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
@@ -41,6 +42,13 @@ setup(
'webcolors>=1.7.0',
'carto>=1.0.1',
'tqdm>=4.14.0',],
+ extras_require={
+ ':python_version <= "2.7"': [
+ 'IPython>=5.0.0,<6.0.0',
+ ],
+ ':python_version >= "3.0"': [
+ 'IPython>=6.0.0'
+ ]},
package_dir={'cartoframes': 'cartoframes'},
package_data={
'': ['LICENSE',
|
conditionally installs IPython depending on major python version
|
diff --git a/app/controllers/administrate/application_controller.rb b/app/controllers/administrate/application_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/administrate/application_controller.rb
+++ b/app/controllers/administrate/application_controller.rb
@@ -27,7 +27,7 @@ module Administrate
end
def new
- resource = resource_class.new
+ resource = new_resource
authorize_resource(resource)
render locals: {
page: Administrate::Page::Form.new(dashboard, resource),
|
Use new_resource in new action (#<I>)
|
diff --git a/simra/engine.go b/simra/engine.go
index <HASH>..<HASH> 100644
--- a/simra/engine.go
+++ b/simra/engine.go
@@ -61,9 +61,11 @@ func (simra *Simra) Start(onStart, onStop chan bool) {
func (simra *Simra) SetScene(driver Driver) {
peer.LogDebug("IN")
peer.GetGLPeer().Reset()
+ peer.GetTouchPeer().RemoveAllTouchListener()
peer.GetSpriteContainer().RemoveSprites()
simra.driver = driver
+ peer.GetSpriteContainer().Initialize()
driver.Initialize()
peer.LogDebug("OUT")
}
|
remove and initialize touch listener on scene change
|
diff --git a/incoming_request.js b/incoming_request.js
index <HASH>..<HASH> 100644
--- a/incoming_request.js
+++ b/incoming_request.js
@@ -109,8 +109,10 @@ TChannelIncomingRequest.prototype.handleFrame = function handleFrame(parts) {
self._argstream.handleFrame(parts);
} else {
if (!parts) return;
- if (parts.length !== 3 ||
- self.state !== States.Initial) throw new Error('not implemented');
+ if (parts.length !== 3 || self.state !== States.Initial) {
+ self.emit('error', new Error(
+ 'un-streamed argument defragmentation is not implemented'));
+ }
self.arg1 = parts[0] || emptyBuffer;
self.arg2 = parts[1] || emptyBuffer;
self.arg3 = parts[2] || emptyBuffer;
@@ -124,7 +126,7 @@ TChannelIncomingRequest.prototype.handleFrame = function handleFrame(parts) {
TChannelIncomingRequest.prototype.finish = function finish() {
var self = this;
if (self.state === States.Done) {
- throw new Error('request already done'); // TODO: typed error
+ self.emit('error', new Error('request already done')); // TODO: typed error
} else {
self.state = States.Done;
}
|
IncomingRequest: emit errors rather than throw them
|
diff --git a/src/main/java/wyil/builders/VerificationConditionGenerator.java b/src/main/java/wyil/builders/VerificationConditionGenerator.java
index <HASH>..<HASH> 100644
--- a/src/main/java/wyil/builders/VerificationConditionGenerator.java
+++ b/src/main/java/wyil/builders/VerificationConditionGenerator.java
@@ -582,12 +582,12 @@ public class VerificationConditionGenerator {
//
for (int i = 0; i != type.size(); ++i) {
String field = fields[i];
- Opcode op = field.equals(bytecode.fieldName()) ? Opcode.EXPR_eq : Opcode.EXPR_neq;
WyalFile.Identifier fieldIdentifier = new WyalFile.Identifier(field);
- Expr oldField = new Expr.RecordAccess(originalSource, fieldIdentifier);
+ Expr oldField = field.equals(bytecode.fieldName()) ? rval
+ : new Expr.RecordAccess(originalSource, fieldIdentifier);
oldField.attributes().addAll(lval.attributes());
Expr newField = new Expr.RecordAccess(newSource, fieldIdentifier);
- context = context.assume(new Expr.Operator(op, oldField, newField));
+ context = context.assume(new Expr.Operator(Opcode.EXPR_eq, oldField, newField));
}
return context;
} catch (ResolveError e) {
|
Bug fix for record assignment
There was a bug in the way that record assignment was being translated
in the VerificationConditionGenerator. It wasn't really doing anything
that made sense for the field being assigned!!
|
diff --git a/runtests.py b/runtests.py
index <HASH>..<HASH> 100644
--- a/runtests.py
+++ b/runtests.py
@@ -8,8 +8,10 @@
File for running tests programmatically.
"""
+# Standard library imports
+import sys
+
# Third party imports
-import qtpy
import pytest
@@ -17,9 +19,9 @@ def main():
"""
Run pytest tests.
"""
- pytest.main(['-x', 'spyderlib', '-v', '-rw', '--durations=10',
- '--cov=spyderlib', '--cov-report=term-missing'])
-
+ errno = pytest.main(['-x', 'spyderlib', '-v', '-rw', '--durations=10',
+ '--cov=spyderlib', '--cov-report=term-missing'])
+ sys.exit(errno)
if __name__ == '__main__':
main()
|
Tests: Exit runtests.py with error code from py.test
This allows CI tools to notice when tests fail.
|
diff --git a/src/Middleware/Middleware.php b/src/Middleware/Middleware.php
index <HASH>..<HASH> 100644
--- a/src/Middleware/Middleware.php
+++ b/src/Middleware/Middleware.php
@@ -41,7 +41,7 @@ class Middleware implements MiddlewareInterface
public function __invoke($request)
{
if ($this->isMatch($request)) {
- $app = $this->next;
+ $app = $this->app;
$response = $app($request);
if ($response) {
return $response;
|
bug fix: use the main app from $this->app, not $this->next.
|
diff --git a/src/finalisers/shared/getExportBlock.js b/src/finalisers/shared/getExportBlock.js
index <HASH>..<HASH> 100644
--- a/src/finalisers/shared/getExportBlock.js
+++ b/src/finalisers/shared/getExportBlock.js
@@ -1,3 +1,7 @@
+function propertyAccess ( name ) {
+ return name === 'default' ? `['default']` : `.${name}`;
+}
+
export default function getExportBlock ( bundle, exportMode, mechanism = 'return' ) {
if ( exportMode === 'default' ) {
const defaultExportName = bundle.exports.lookup( 'default' ).name;
@@ -7,9 +11,12 @@ export default function getExportBlock ( bundle, exportMode, mechanism = 'return
return bundle.toExport
.map( name => {
- const prop = name === 'default' ? `['default']` : `.${name}`;
const id = bundle.exports.lookup( name );
- return `exports${prop} = ${id.name};`;
+
+ const reference = ( id.originalName !== 'default' && id.module && id.module.isExternal ) ?
+ id.module.name + propertyAccess( id.name ) : id.name;
+
+ return `exports${propertyAccess( name )} = ${reference};`;
})
.join( '\n' );
}
|
Fixed `getExportBlock` for external names.
|
diff --git a/lib/rails_admin/config/fields/types/multiple_file_upload.rb b/lib/rails_admin/config/fields/types/multiple_file_upload.rb
index <HASH>..<HASH> 100644
--- a/lib/rails_admin/config/fields/types/multiple_file_upload.rb
+++ b/lib/rails_admin/config/fields/types/multiple_file_upload.rb
@@ -38,7 +38,8 @@ module RailsAdmin
image_html = v.image_tag(thumb_url, class: 'img-thumbnail')
url != thumb_url ? v.link_to(image_html, url, target: '_blank', rel: 'noopener noreferrer') : image_html
else
- v.link_to(value, url, target: '_blank', rel: 'noopener noreferrer')
+ display_value = value.respond_to?(:filename) ? value.filename : value
+ v.link_to(display_value, url, target: '_blank', rel: 'noopener noreferrer')
end
end
end
|
feat(types): show correct file name
|
diff --git a/src/interfaces/writablestream.js b/src/interfaces/writablestream.js
index <HASH>..<HASH> 100644
--- a/src/interfaces/writablestream.js
+++ b/src/interfaces/writablestream.js
@@ -6,6 +6,7 @@
"use strict";
/*global _gpfDefineInterface*/ // Internal interface definition helper
/*global _gpfSyncReadSourceJSON*/ // Reads a source json file (only in source mode)
+/*exported _gpfIWritableStream*/ // gpf.interfaces.IWritableStream
/*#endif*/
/**
@@ -24,4 +25,10 @@
* @since 0.1.9
*/
-_gpfDefineInterface("WritableStream", _gpfSyncReadSourceJSON("interfaces/writablestream.json"));
+/**
+ * IWritableStream interface specifier
+ *
+ * @type {gpf.interfaces.IWritableStream}
+ */
+var _gpfIWritableStream = _gpfDefineInterface("WritableStream",
+ _gpfSyncReadSourceJSON("interfaces/writablestream.json"));
|
export _gpfIWritableStream
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -63,6 +63,7 @@ setup(
'License :: OSI Approved :: MIT License',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
+ 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
|
Fix programming language classifier (we do support python <I>)
|
diff --git a/lib/stats/DefaultStatsPrinterPlugin.js b/lib/stats/DefaultStatsPrinterPlugin.js
index <HASH>..<HASH> 100644
--- a/lib/stats/DefaultStatsPrinterPlugin.js
+++ b/lib/stats/DefaultStatsPrinterPlugin.js
@@ -305,7 +305,7 @@ const SIMPLE_PRINTERS = {
rendered ? green(formatFlag("rendered")) : undefined,
"chunk.recorded": (recorded, { formatFlag, green }) =>
recorded ? green(formatFlag("recorded")) : undefined,
- "chunk.reason": (reason, { yellow }) => yellow(reason),
+ "chunk.reason": (reason, { yellow }) => (reason ? yellow(reason) : undefined),
"chunk.rootModules": (modules, context) => {
let maxModuleId = 0;
for (const module of modules) {
|
avoid printing undefined when there is no chunk reason
|
diff --git a/src/global.js b/src/global.js
index <HASH>..<HASH> 100644
--- a/src/global.js
+++ b/src/global.js
@@ -29,8 +29,8 @@
}
// CommonJS module 1.1.1 spec (`exports` cannot be a function)
exports.me = me;
- } else {
- global.me = me;
}
+ // declare me globally
+ global.me = me;
}(this));
/* eslint-enable no-undef */
|
always export/declare `me` globally
|
diff --git a/lib/chef/knife/core/bootstrap_context.rb b/lib/chef/knife/core/bootstrap_context.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/knife/core/bootstrap_context.rb
+++ b/lib/chef/knife/core/bootstrap_context.rb
@@ -223,6 +223,7 @@ validation_client_name "#{@chef_config[:validation_client_name]}"
attributes[:run_list] = @run_list
end
+ attributes.delete(:run_list) if attributes[:policy_name] && !attributes[:policy_name].empty?
attributes.merge!(:tags => @config[:tags]) if @config[:tags] && !@config[:tags].empty?
end
end
diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/knife/bootstrap_spec.rb
+++ b/spec/unit/knife/bootstrap_spec.rb
@@ -586,6 +586,10 @@ describe Chef::Knife::Bootstrap do
expect(knife.bootstrap_context.first_boot).to have_key(:policy_group)
end
+ it "ensures that run_list is not set in the bootstrap context" do
+ expect(knife.bootstrap_context.first_boot).to_not have_key(:run_list)
+ end
+
end
# https://github.com/chef/chef/issues/4131
|
If we don't have a run_list, don't send it
This should help bootstrapping with policies
Fixes: #<I>
|
diff --git a/openid.js b/openid.js
index <HASH>..<HASH> 100644
--- a/openid.js
+++ b/openid.js
@@ -1021,7 +1021,7 @@ openid.verifyAssertion = function(requestOrUrl, callback, stateless, extensions,
if(typeof(requestOrUrl) !== typeof(''))
{
if(requestOrUrl.method == 'POST') {
- if(requestOrUrl.headers['content-type'] == 'application/x-www-form-urlencoded') {
+ if((requestOrUrl.headers['content-type'] || '').toLowerCase().indexOf('application/x-www-form-urlencoded') === 0) {
// POST response received
var data = '';
|
Looser content-type check for POST responses accepts charsets (fixes #<I>)
|
diff --git a/kerncraft/cacheprediction.py b/kerncraft/cacheprediction.py
index <HASH>..<HASH> 100755
--- a/kerncraft/cacheprediction.py
+++ b/kerncraft/cacheprediction.py
@@ -83,12 +83,14 @@ class LayerConditionPredictor(CachePredictor):
raise ValueError("Only one loop counter may appear per term. "
"Problematic term: {}.".format(t))
else: # len(idx) == 1
+ idx = idx.pop()
# Check that number of multiplication match access order of iterator
- stride_dim = len(t.as_ordered_factors())
- #if loop_stack[len(loop_stack)-stride_dim]['index'] != idx.pop().name:
- # raise ValueError("Number of multiplications in index term does not "
- # "match loop counter order. "
- # "Problematic term: {}.".format(t))
+ pow_dict = {k: v for k, v in t.as_powers_dict().items() if k != idx}
+ stride_dim = sum(pow_dict.values())
+ if loop_stack[-stride_dim-1]['index'] != idx.name:
+ raise ValueError("Number of multiplications in index term does not "
+ "match loop counter order. "
+ "Problematic term: {}.".format(t))
# 3. Indices may only increase with one
# TODO use a public interface, not self.kernel._*
|
improved compatibility check in layer condition predictor
|
diff --git a/lib/plugins/aws/invokeLocal/index.js b/lib/plugins/aws/invokeLocal/index.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/aws/invokeLocal/index.js
+++ b/lib/plugins/aws/invokeLocal/index.js
@@ -233,7 +233,7 @@ class AwsInvokeLocal {
'package',
'-f',
path.join(javaBridgePath, 'pom.xml'),
- ]);
+ ], { shell: true });
this.serverless.cli
.log('Building Java bridge, first invocation might take a bit longer.');
|
Add Windows support for spawning mvn
|
diff --git a/parsl/dataflow/futures.py b/parsl/dataflow/futures.py
index <HASH>..<HASH> 100644
--- a/parsl/dataflow/futures.py
+++ b/parsl/dataflow/futures.py
@@ -45,8 +45,31 @@ class AppFuture(Future):
super().__init__()
self.parent = parent
+
+ def parent_callback(self, executor_fu):
+ ''' Callback from executor future to update the parent.
+ Args:
+ executor_fu (Future): Future returned by the executor along with callback
+
+ Updates the super() with the result() or exception()
+ '''
+ logger.debug("App_fu updated with executor_Fu state")
+
+ if executor_fu.done() == True:
+ super().set_result(executor_fu.result())
+
+ e = executor_fu.exception()
+ if e:
+ super().set_exception(e)
+
+
def update_parent(self, fut):
+ ''' Handle the case where the user has called result on the AppFuture
+ before the parent exists. Add a callback to the parent to update the
+ state
+ '''
self.parent = fut
+ fut.add_done_callback(self.parent_callback)
def result(self, timeout=None):
#print("FOooo")
|
Added the callback to update super() when executor_future is resolved.
|
diff --git a/src/org/parosproxy/paros/core/scanner/PluginFactory.java b/src/org/parosproxy/paros/core/scanner/PluginFactory.java
index <HASH>..<HASH> 100644
--- a/src/org/parosproxy/paros/core/scanner/PluginFactory.java
+++ b/src/org/parosproxy/paros/core/scanner/PluginFactory.java
@@ -42,6 +42,7 @@
// ZAP: 2015/11/02 Issue 1969: Issues with installation of scanners
// ZAP: 2015/12/21 Issue 2112: Wrong policy on active Scan
// ZAP: 2016/01/26 Fixed findbugs warning
+// ZAP: 2016/05/04 Use existing Plugin instances when setting them as completed
package org.parosproxy.paros.core.scanner;
@@ -637,9 +638,11 @@ public class PluginFactory {
}
synchronized void setRunningPluginCompleted(Plugin plugin) {
- listRunning.remove(plugin);
- listCompleted.add(plugin);
- plugin.setTimeFinished();
+ if (listRunning.remove(plugin)) {
+ Plugin completedPlugin = mapAllPlugin.get(plugin.getId());
+ listCompleted.add(completedPlugin);
+ completedPlugin.setTimeFinished();
+ }
}
boolean isRunning(Plugin plugin) {
|
Set existing Plugin instance as completed
Change PluginFactory to set the existing Plugin instance as completed
instead of the instance passed as parameter, to ensure that the Plugin
that's returned as completed is the correct instance and not one of the
instances created during and for the active scan (which might not have
all its state up-to-date).
The change prevents completed AbstractHostPlugin scanners from having
unknown status when returning scans' progress through the active scan
API.
|
diff --git a/src/settings.js b/src/settings.js
index <HASH>..<HASH> 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -107,7 +107,7 @@ export class Settings {
/**
* Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
- * @type {Zone}
+ * @type {boolean}
*/
static get throwOnInvalid() {
return throwOnInvalid;
@@ -115,7 +115,7 @@ export class Settings {
/**
* Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
- * @type {Zone}
+ * @type {boolean}
*/
static set throwOnInvalid(t) {
throwOnInvalid = t;
|
throwOnInvalid is a boolean (#<I>)
|
diff --git a/languagetool-language-modules/de/src/main/java/org/languagetool/tokenizers/de/GermanCompoundTokenizer.java b/languagetool-language-modules/de/src/main/java/org/languagetool/tokenizers/de/GermanCompoundTokenizer.java
index <HASH>..<HASH> 100644
--- a/languagetool-language-modules/de/src/main/java/org/languagetool/tokenizers/de/GermanCompoundTokenizer.java
+++ b/languagetool-language-modules/de/src/main/java/org/languagetool/tokenizers/de/GermanCompoundTokenizer.java
@@ -139,6 +139,7 @@ public class GermanCompoundTokenizer implements Tokenizer {
wordSplitter.addException("Siebengestirnen", asList("Sieben", "gestirnen"));
wordSplitter.addException("Siebengestirns", asList("Sieben", "gestirns"));
wordSplitter.addException("Siebengestirnes", asList("Sieben", "gestirnes"));
+ wordSplitter.addException("Alpinforum", asList("Alpin", "forum"));
wordSplitter.setStrictMode(strictMode);
wordSplitter.setMinimumWordLength(3);
}
|
[de] fix splitting of Alpinforum
|
diff --git a/jimfs/src/main/java/com/google/jimfs/internal/PathMatchers.java b/jimfs/src/main/java/com/google/jimfs/internal/PathMatchers.java
index <HASH>..<HASH> 100644
--- a/jimfs/src/main/java/com/google/jimfs/internal/PathMatchers.java
+++ b/jimfs/src/main/java/com/google/jimfs/internal/PathMatchers.java
@@ -20,6 +20,7 @@ import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Ascii;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableSet;
import com.google.jimfs.path.Normalization;
@@ -53,7 +54,7 @@ final class PathMatchers {
checkArgument(syntaxSeparator > 0, "Must be of the form 'syntax:pattern': %s",
syntaxAndPattern);
- String syntax = syntaxAndPattern.substring(0, syntaxSeparator);
+ String syntax = Ascii.toLowerCase(syntaxAndPattern.substring(0, syntaxSeparator));
String pattern = syntaxAndPattern.substring(syntaxSeparator + 1);
switch (syntax) {
|
Make path matcher syntax (e.g. "glob:" or "regex:") case insensitive as specified.
|
diff --git a/Proxy/Client/SoapClient.php b/Proxy/Client/SoapClient.php
index <HASH>..<HASH> 100644
--- a/Proxy/Client/SoapClient.php
+++ b/Proxy/Client/SoapClient.php
@@ -16,8 +16,8 @@ use Biplane\YandexDirectBundle\Exception\NetworkException;
*/
class SoapClient extends \SoapClient implements ClientInterface
{
- const ENDPOINT = 'http://soap.direct.yandex.ru/live/v4/wsdl/';
- const API_NS = 'API';
+ const ENDPOINT = 'https://api.direct.yandex.ru/live/v4/wsdl/';
+ const API_NS = 'API';
const INVALID_NS = 'http://namespaces.soaplite.com/perl';
private static $classmap = array(
|
Changed the endpoint for SOAP
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -68,9 +68,16 @@ class TestCommand(Command):
sys.exit(exit_code)
+from os import path
+this_directory = path.abspath(path.dirname(__file__))
+with open(path.join(this_directory, 'README.rst')) as f:
+ long_description = f.read()
+
setup(name='pyxtuml',
version='2.2.2', # ensure that this is the same as in xtuml.version
description='Library for parsing, manipulating, and generating BridgePoint xtUML models',
+ long_description=long_description,
+ long_description_content_type='text/x-rst',
author=u'John Törnblom',
author_email='john.tornblom@gmail.com',
url='https://github.com/xtuml/pyxtuml',
|
Adjust setup.py to fix missing long description
|
diff --git a/src/main/java/org/jdbdt/Table.java b/src/main/java/org/jdbdt/Table.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jdbdt/Table.java
+++ b/src/main/java/org/jdbdt/Table.java
@@ -152,7 +152,7 @@ public final class Table extends DataSource {
* Ensure table is bound to a connection,
* otherwise throw {@link InvalidUsageException}.
*/
- private void checkIfBound() {
+ void checkIfBound() {
if (connection == null) {
throw new InvalidUsageException("Table is not bound to a connection.");
}
@@ -161,7 +161,7 @@ public final class Table extends DataSource {
* Ensure table is NOT bound to a connection,
* otherwise throw {@link InvalidUsageException}.
*/
- private void checkIfNotBound() {
+ void checkIfNotBound() {
if (connection != null) {
throw new InvalidUsageException("Table is already bound to a connection.");
}
|
Table: checkIfBound/notBound package protected (again)
|
diff --git a/tests/__init__.py b/tests/__init__.py
index <HASH>..<HASH> 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,8 +1,7 @@
import os
import sys
-
f = os.readlink(__file__) if os.path.islink(__file__) else __file__
path = os.path.realpath(os.path.join(f, "..", "..", "src"))
if path not in sys.path:
- sys.path.append(path)
+ sys.path.insert(0, path)
|
ensure code from src dir is used
|
diff --git a/app/models/socializer/activity.rb b/app/models/socializer/activity.rb
index <HASH>..<HASH> 100644
--- a/app/models/socializer/activity.rb
+++ b/app/models/socializer/activity.rb
@@ -5,6 +5,7 @@ module Socializer
class Activity < ActiveRecord::Base
include ObjectTypeBase
+ # TODO: Remove default_scope. Prevents the Rails 4.2 adequate record caching
default_scope { order(created_at: :desc) }
attr_accessible :verb, :circles, :actor_id, :activity_object_id, :target_id
diff --git a/app/models/socializer/notification.rb b/app/models/socializer/notification.rb
index <HASH>..<HASH> 100644
--- a/app/models/socializer/notification.rb
+++ b/app/models/socializer/notification.rb
@@ -3,6 +3,7 @@
#
module Socializer
class Notification < ActiveRecord::Base
+ # TODO: Remove default_scope. Prevents the Rails 4.2 adequate record caching
default_scope { order(created_at: :desc) }
attr_accessible :read
|
add some TODOs related to default_scope
|
diff --git a/src/main/java/com/github/tomakehurst/wiremock/client/VerificationException.java b/src/main/java/com/github/tomakehurst/wiremock/client/VerificationException.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/github/tomakehurst/wiremock/client/VerificationException.java
+++ b/src/main/java/com/github/tomakehurst/wiremock/client/VerificationException.java
@@ -54,7 +54,7 @@ public class VerificationException extends AssertionError {
}
- private static String renderList(List list) {
+ private static String renderList(List<?> list) {
return Joiner.on("\n\n").join(
from(list).transform(toStringFunction())
);
|
Added missing type parameter to List in method signature in VerificationException
|
diff --git a/go/libkb/ca.go b/go/libkb/ca.go
index <HASH>..<HASH> 100644
--- a/go/libkb/ca.go
+++ b/go/libkb/ca.go
@@ -11,7 +11,7 @@ var apiCAOverrideForTest = ""
// no matching CA is found for host.
func GetBundledCAsFromHost(host string) (rootCA []byte, ok bool) {
host = strings.TrimSpace(strings.ToLower(host))
- realAPICA := apiCA
+ realAPICA := APICA
if len(apiCAOverrideForTest) > 0 {
realAPICA = apiCAOverrideForTest
}
@@ -39,7 +39,7 @@ func GetBundledCAsFromHost(host string) (rootCA []byte, ok bool) {
}
}
-const apiCA = `
+const APICA = `
-----BEGIN CERTIFICATE-----
MIIGmzCCBIOgAwIBAgIJAPzhpcIBaOeNMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYD
VQQGEwJVUzELMAkGA1UECBMCTlkxETAPBgNVBAcTCE5ldyBZb3JrMRQwEgYDVQQK
|
expose API CA (#<I>)
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -35,15 +35,14 @@ setup(author='Mateusz Susik',
'Topic :: Utilities'
],
cmdclass={'test': PyTest},
- description='A python wrapper over ORCID API',
+ description='A python wrapper over the ORCID API',
install_requires=['requests', 'simplejson'],
keywords=['orcid', 'api', 'wrapper'],
license='BSD',
long_description=open('README.rst', 'r').read(),
name='orcid',
- package_data={'orcid': ['templates/*.xml']},
packages=['orcid'],
tests_require=['pytest', 'coverage', 'httpretty'],
- url='https://github.com/MSusik/python-orcid',
+ url='https://github.com/ORCID/python-orcid',
version='0.5.1'
)
|
setup: move to ORCID organisation
|
diff --git a/test/vain.js b/test/vain.js
index <HASH>..<HASH> 100644
--- a/test/vain.js
+++ b/test/vain.js
@@ -129,5 +129,22 @@ describe('Vain', function() {
router.handle({ url: testPath, method: 'GET', path: testPath}, res);
});
+
+ it("should return a 404 for invalid paths", function(done) {
+ var testPath = '/nonexistent-path',
+ router = vain.router("./test/examples"),
+ res = {
+ render: function(val) {
+ done("Render was invoked.");
+ },
+
+ send: function(code) {
+ code.should.equal(404);
+ done();
+ }
+ };
+
+ router.handle({ url: testPath, method: 'GET', path: testPath}, res);
+ });
});
});
|
Add a spec for returning <I> for invalid paths.
|
diff --git a/moz_sql_parser/sql_parser.py b/moz_sql_parser/sql_parser.py
index <HASH>..<HASH> 100644
--- a/moz_sql_parser/sql_parser.py
+++ b/moz_sql_parser/sql_parser.py
@@ -99,7 +99,7 @@ KNOWN_OPS = [
Literal("==").setName("eq").setDebugActions(*debug),
Literal("!=").setName("neq").setDebugActions(*debug),
IN.setName("in").setDebugActions(*debug),
- NOTIN.setName("not in").setDebugActions(*debug),
+ NOTIN.setName("nin").setDebugActions(*debug),
IS.setName("is").setDebugActions(*debug),
LIKE.setName("like").setDebugActions(*debug),
OR.setName("or").setDebugActions(*debug),
|
rename the not in keyword in SQL ast to nin
|
diff --git a/symphony/lib/toolkit/class.mysql.php b/symphony/lib/toolkit/class.mysql.php
index <HASH>..<HASH> 100644
--- a/symphony/lib/toolkit/class.mysql.php
+++ b/symphony/lib/toolkit/class.mysql.php
@@ -326,7 +326,8 @@
elseif($this->_lastResult == NULL){
return array();
}
-
+
+ $newArray = array();
foreach ($this->_lastResult as $row){
$newArray[] = get_object_vars($row);
}
|
In case of mysql->query() returning empty array, fetch() was returning NULL. Initialize to fix that.
|
diff --git a/pharen.php b/pharen.php
index <HASH>..<HASH> 100644
--- a/pharen.php
+++ b/pharen.php
@@ -860,7 +860,7 @@ class LeafNode extends Node{
public $value;
public $tok;
- public function __construct($parent, $children, $value, $tok){
+ public function __construct($parent, $children, $value, $tok=Null){
parent::__construct($parent);
$this->children = Null;
$this->value = $value;
|
Let LeafNodes have a reference to the ancestral token.
|
diff --git a/minimongo/test.py b/minimongo/test.py
index <HASH>..<HASH> 100644
--- a/minimongo/test.py
+++ b/minimongo/test.py
@@ -164,7 +164,6 @@ class TestSimpleModel(unittest.TestCase):
self.assertEqual(indices['x_1'],
{'key': [('x', 1)]})
-
def test_unique_index(self):
"""Test behavior of indices with unique=True"""
# This will work (y is undefined)
@@ -391,9 +390,7 @@ class TestNoAutoIndex(unittest.TestCase):
def tearDown(self):
"""unittest teardown, drop all collections."""
- TestModel.collection.drop()
- TestModelUnique.collection.drop()
- TestDerivedModel.collection.drop()
+ TestNoAutoIndexModel.collection.drop()
def test_no_auto_index(self):
TestNoAutoIndexModel({'x': 1}).save()
@@ -462,6 +459,5 @@ class TestOptions(unittest.TestCase):
del Options.foo
-
if __name__ == '__main__':
unittest.main()
|
Fixed bad test for previous changeset, pep8
|
diff --git a/treeherder/settings/base.py b/treeherder/settings/base.py
index <HASH>..<HASH> 100644
--- a/treeherder/settings/base.py
+++ b/treeherder/settings/base.py
@@ -308,9 +308,9 @@ BUILDAPI_BUILDS4H_URL = "https://secure.pub.build.mozilla.org/builddata/buildjso
# data job ingestion.
# If TreeherderCollections are larger, they will be chunked
# to this size.
-BUILDAPI_PENDING_CHUNK_SIZE = 50
-BUILDAPI_RUNNING_CHUNK_SIZE = 50
-BUILDAPI_BUILDS4H_CHUNK_SIZE = 50
+BUILDAPI_PENDING_CHUNK_SIZE = 150
+BUILDAPI_RUNNING_CHUNK_SIZE = 150
+BUILDAPI_BUILDS4H_CHUNK_SIZE = 150
PARSER_MAX_STEP_ERROR_LINES = 100
PARSER_MAX_SUMMARY_LINES = 200
|
bump chunk size to <I> from <I>
|
diff --git a/spec/unit/parser/ast/definition.rb b/spec/unit/parser/ast/definition.rb
index <HASH>..<HASH> 100755
--- a/spec/unit/parser/ast/definition.rb
+++ b/spec/unit/parser/ast/definition.rb
@@ -30,7 +30,7 @@ describe Puppet::Parser::AST::Definition, "when evaluating" do
end
it "should have a get_classname method" do
- @definition.should respond_to :get_classname
+ @definition.should respond_to(:get_classname)
end
it "should return the current classname with get_classname" do
|
Fixing ruby warning in definition test
|
diff --git a/src/ZineInc/Storage/Common/FileId.php b/src/ZineInc/Storage/Common/FileId.php
index <HASH>..<HASH> 100644
--- a/src/ZineInc/Storage/Common/FileId.php
+++ b/src/ZineInc/Storage/Common/FileId.php
@@ -41,6 +41,23 @@ final class FileId
return count($this->attributes->all()) > 0 || $this->filename() !== $this->id;
}
+ /**
+ * Creates variant with given attributes of this file
+ *
+ * @param array $attrs Variant attributes - it might be image size, file name etc.
+ *
+ * @return FileId
+ */
+ public function variant(array $attrs)
+ {
+ return new self($this->id, $attrs);
+ }
+
+ /**
+ * Creates id to original file.
+ *
+ * @return FileId
+ */
public function original()
{
return new self($this->id);
|
FileId::variant factory method
|
diff --git a/bin/templates/scripts/cordova/lib/Podfile.js b/bin/templates/scripts/cordova/lib/Podfile.js
index <HASH>..<HASH> 100644
--- a/bin/templates/scripts/cordova/lib/Podfile.js
+++ b/bin/templates/scripts/cordova/lib/Podfile.js
@@ -39,7 +39,7 @@ function Podfile (podFilePath, projectName, minDeploymentTarget) {
this.path = podFilePath;
this.projectName = projectName;
- this.minDeploymentTarget = minDeploymentTarget || '9.0';
+ this.minDeploymentTarget = minDeploymentTarget || '10.0';
this.contents = null;
this.sources = null;
this.declarations = null;
@@ -75,7 +75,7 @@ Podfile.prototype.__parseForDeclarations = function (text) {
// split by \n
var arr = text.split('\n');
- // getting lines between "platform :ios, '9.0'"" and "target 'HelloCordova'" do
+ // getting lines between "platform :ios, '10.0'"" and "target 'HelloCordova'" do
var declarationsPreRE = new RegExp('platform :ios,\\s+\'[^\']+\'');
var declarationsPostRE = new RegExp('target\\s+\'[^\']+\'\\s+do');
var declarationRE = new RegExp('^\\s*[^#]');
|
Bump default minDeploymentTarget to <I> in Podfile (#<I>)
|
diff --git a/src/com/google/javascript/rhino/jstype/UnionType.java b/src/com/google/javascript/rhino/jstype/UnionType.java
index <HASH>..<HASH> 100644
--- a/src/com/google/javascript/rhino/jstype/UnionType.java
+++ b/src/com/google/javascript/rhino/jstype/UnionType.java
@@ -352,7 +352,7 @@ public class UnionType extends JSType {
* A {@link UnionType} contains a given type (alternate) iff the member
* vector contains it.
*
- * @param alternate The alternate which might be in this union.
+ * @param type The alternate which might be in this union.
*
* @return {@code true} if the alternate is in the union
*/
|
fix a javadoc warning that was bugging me
R=zhuyi
DELTA=1 (0 added, 0 deleted, 1 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=<I>
git-svn-id: <URL>
|
diff --git a/version.php b/version.php
index <HASH>..<HASH> 100644
--- a/version.php
+++ b/version.php
@@ -29,11 +29,11 @@
defined('MOODLE_INTERNAL') || die();
-$version = 2015111600.00; // 20151116 = branching date YYYYMMDD - do not modify!
+$version = 2015111600.00; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
-$release = '3.0 (Build: 20151116)'; // Human-friendly version name
+$release = '3.1dev (Build: 20151116)'; // Human-friendly version name
-$branch = '30'; // This version's branch.
-$maturity = MATURITY_STABLE; // This version's maturity level.
+$branch = '31'; // This version's branch.
+$maturity = MATURITY_ALPHA; // This version's maturity level.
|
weekly back-to-dev release <I>dev
|
diff --git a/easypysmb/easypysmb.py b/easypysmb/easypysmb.py
index <HASH>..<HASH> 100644
--- a/easypysmb/easypysmb.py
+++ b/easypysmb/easypysmb.py
@@ -71,11 +71,12 @@ class EasyPySMB():
logger.warning(
'Share {} does not exist on the server'.format(self.share_name)
)
- dir_content = [x.filename for x in self.ls(os.path.dirname(self.file_path))]
- if os.path.basename(self.file_path) not in dir_content:
- logger.warning(
- 'File {} does not exist on the server'.format(self.file_path)
- )
+ if self.file_path:
+ dir_content = [x.filename for x in self.ls(os.path.dirname(self.file_path))]
+ if os.path.basename(self.file_path) not in dir_content:
+ logger.warning(
+ 'File {} does not exist on the server'.format(self.file_path)
+ )
def __decompose_smb_path(self, path):
'''
|
Skip file path check if not set
|
diff --git a/pyannote/metrics/spotting.py b/pyannote/metrics/spotting.py
index <HASH>..<HASH> 100644
--- a/pyannote/metrics/spotting.py
+++ b/pyannote/metrics/spotting.py
@@ -58,8 +58,8 @@ class LowLatencySpeakerSpotting(BaseMetric):
'true_negative': 0.,
'false_negative': 0.}
- def __init__(self, thresholds=None, **kwargs):
- super(LowLatencySpeakerSpotting, self).__init__(**kwargs)
+ def __init__(self, thresholds=None):
+ super(LowLatencySpeakerSpotting, self).__init__(parallel=False)
self.thresholds = np.sort(thresholds)
def compute_metric(self, detail):
|
chore: disable parallel processing for speaker spotting metric
|
diff --git a/src/User/User.php b/src/User/User.php
index <HASH>..<HASH> 100644
--- a/src/User/User.php
+++ b/src/User/User.php
@@ -17,7 +17,7 @@ use vxPHP\Security\Password\PasswordEncrypter;
* wraps authentication and role assignment
*
* @author Gregor Kofler, info@gregorkofler.com
- * @version 2.1.2 2021-04-28
+ * @version 2.1.3 2021-05-22
*/
class User implements UserInterface
{
@@ -132,7 +132,7 @@ class User implements UserInterface
* {@inheritDoc}
* @see \vxPHP\User\UserInterface::getAttribute()
*/
- public function getAttribute(string $attribute, $default = null): string
+ public function getAttribute(string $attribute, $default = null): ?string
{
if (!$this->attributes || !array_key_exists(strtolower($attribute), $this->attributes)) {
return $default;
|
fix: User::getAttribute() can return null
|
diff --git a/redis_collections/dicts.py b/redis_collections/dicts.py
index <HASH>..<HASH> 100644
--- a/redis_collections/dicts.py
+++ b/redis_collections/dicts.py
@@ -84,13 +84,6 @@ class Dict(RedisCollection, collections.MutableMapping):
if data:
self.update(data)
- def _get_hash_dict(self, key, redis):
- key_hash = hash(key)
- D = redis.hget(self.key, key_hash)
- D = {} if D is None else self._unpickle(D)
-
- return key_hash, D
-
def __len__(self, pipe=None):
"""Return the number of items in the dictionary."""
pipe = pipe or self.redis
|
Remove _get_hash_dict method
|
diff --git a/thinc/extra/datasets.py b/thinc/extra/datasets.py
index <HASH>..<HASH> 100644
--- a/thinc/extra/datasets.py
+++ b/thinc/extra/datasets.py
@@ -74,6 +74,8 @@ def read_conll(loc):
word, pos, head, label = pieces
else:
idx, word, lemma, pos1, pos, morph, head, label, _, _2 = pieces
+ if '-' in idx:
+ continue
words.append(word)
tags.append(pos)
yield words, tags
|
Filter fused tokens from Ancora data
|
diff --git a/ontrack-extension-git/src/main/java/net/nemerosa/ontrack/extension/git/GitIssueSearchExtension.java b/ontrack-extension-git/src/main/java/net/nemerosa/ontrack/extension/git/GitIssueSearchExtension.java
index <HASH>..<HASH> 100644
--- a/ontrack-extension-git/src/main/java/net/nemerosa/ontrack/extension/git/GitIssueSearchExtension.java
+++ b/ontrack-extension-git/src/main/java/net/nemerosa/ontrack/extension/git/GitIssueSearchExtension.java
@@ -101,7 +101,7 @@ public class GitIssueSearchExtension extends AbstractExtension implements Search
// ... and creates a result entry
results.add(
new SearchResult(
- issue.getKey(),
+ issue.getDisplayKey(),
String.format("Issue %s in Git repository %s for branch %s/%s",
issue.getKey(),
c.getGitConfiguration().getName(),
|
#<I> Displaying the GitHub issue with a leading #
|
diff --git a/lib/erector/needs.rb b/lib/erector/needs.rb
index <HASH>..<HASH> 100644
--- a/lib/erector/needs.rb
+++ b/lib/erector/needs.rb
@@ -1,5 +1,7 @@
module Erector
module Needs
+ NO_DUP_CLASSES = [NilClass, FalseClass, TrueClass, 0.class, Float, Symbol].freeze
+
def self.included(base)
base.extend ClassMethods
end
@@ -83,7 +85,7 @@ module Erector
# set variables with default values
self.class.needed_defaults.each do |name, value|
unless assigned.include?(name)
- value = [NilClass, FalseClass, TrueClass, Fixnum, Float, Symbol].include?(value.class) ? value : value.dup
+ value = NO_DUP_CLASSES.include?(value.class) ? value : value.dup
instance_variable_set("@#{name}", value)
assigned << name
end
|
Fixnum is deprecated in ruby >= <I>
|
diff --git a/graphistry/tests/test_compute.py b/graphistry/tests/test_compute.py
index <HASH>..<HASH> 100644
--- a/graphistry/tests/test_compute.py
+++ b/graphistry/tests/test_compute.py
@@ -118,3 +118,9 @@ class TestComputeMixin(NoAuthTestCase):
cg = CGFull()
g = cg.edges(pd.DataFrame({'s': ['a', 'b'], 'd': ['b', 'a']}), 's', 'd').get_topological_levels(allow_cycles=True)
assert g._nodes.to_dict(orient='records') == [{'id': 'a', 'level': 0}, {'id': 'b', 'level': 1}]
+
+ def test_drop_nodes(self):
+ cg = CGFull()
+ g = cg.edges(pd.DataFrame({'x': ['m', 'm', 'n', 'm'], 'y': ['a', 'b', 'c', 'd']}), 'x', 'y')
+ g2 = g.drop_nodes(['m'])
+ assert g2._edges.to_dict(orient='records') == [{'x': 'n', 'y': 'c'}]
|
add tests for drop_nodes (#<I>)
|
diff --git a/templates/html/views/methodDetails.php b/templates/html/views/methodDetails.php
index <HASH>..<HASH> 100644
--- a/templates/html/views/methodDetails.php
+++ b/templates/html/views/methodDetails.php
@@ -23,6 +23,7 @@ ArrayHelper::multisort($methods, 'name');
<div class="detailHeader h3" id="<?= $method->name . '()-detail' ?>">
<?= $method->name ?>()
<span class="detailHeaderTag small">
+ <?= $method->visibility ?>
method
<?php if (!empty($method->since)): ?>
(available since version <?php echo $method->since; ?>)
|
added method visibility to api docs
issue #<I>
|
diff --git a/src/ContextMenu.js b/src/ContextMenu.js
index <HASH>..<HASH> 100644
--- a/src/ContextMenu.js
+++ b/src/ContextMenu.js
@@ -96,12 +96,11 @@ export default class ContextMenu extends Component {
}
getMenuPosition = (x, y) => {
- const {scrollTop: scrollX, scrollLeft: scrollY} = document.documentElement;
const { innerWidth, innerHeight } = window;
const rect = this.menu.getBoundingClientRect();
const menuStyles = {
- top: y + scrollY,
- left: x + scrollX
+ top: y,
+ left: x
};
if (y + rect.height > innerHeight) {
|
Fix bug for menu not showing when page is scrolled
|
diff --git a/vdom/patch-op.js b/vdom/patch-op.js
index <HASH>..<HASH> 100644
--- a/vdom/patch-op.js
+++ b/vdom/patch-op.js
@@ -137,7 +137,7 @@ function reorderChildren(domNode, bIndex) {
move = bIndex[i]
if (move !== undefined && move !== i) {
// the element currently at this index will be moved later so increase the insert offset
- if (reverseIndex[i] > i) {
+ if (reverseIndex[i] > i + 1) {
insertOffset++
}
@@ -148,7 +148,7 @@ function reorderChildren(domNode, bIndex) {
}
// the moved element came from the front of the array so reduce the insert offset
- if (move < i) {
+ if (move < i - 1) {
insertOffset--
}
}
|
optimize the case where a new element is added to front of list
|
diff --git a/bse/refconverters/bib.py b/bse/refconverters/bib.py
index <HASH>..<HASH> 100644
--- a/bse/refconverters/bib.py
+++ b/bse/refconverters/bib.py
@@ -13,6 +13,9 @@ def _ref_bib(key,ref):
entry_lines = []
for k,v in ref.items():
+ if k == 'type':
+ continue
+
# Handle authors/editors
if k == 'authors':
entry_lines.append(u' author = {{{}}}'.format(' and '.join(v)))
|
Don't use type key in bibtex output
|
diff --git a/core-bundle/contao/library/Contao/Model.php b/core-bundle/contao/library/Contao/Model.php
index <HASH>..<HASH> 100644
--- a/core-bundle/contao/library/Contao/Model.php
+++ b/core-bundle/contao/library/Contao/Model.php
@@ -183,7 +183,6 @@ abstract class Model
}
$this->arrData[$strKey] = $varValue;
-
unset($this->arrRelated[$key]);
}
@@ -280,7 +279,6 @@ abstract class Model
public function mergeRow(array $arrData)
{
$this->setRow(array_diff_key($arrData, $this->arrModified));
-
return $this;
}
|
[Core] Fix some minor code formatting issues
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -43,7 +43,7 @@ setup_params = dict(
extras_require={
':sys_platform=="win32"': 'jaraco.windows>=3.4',
':sys_platform=="darwin"': richxerox,
- ':sys_platform=="linux2" or sys.platform=="linux"': pyperclip,
+ ':sys_platform=="linux2" or sys.platform=="linux"': "pyperclip",
},
setup_requires=[
'setuptools_scm>=1.9',
|
Literally pyperclip.
|
diff --git a/post-processing.rb b/post-processing.rb
index <HASH>..<HASH> 100755
--- a/post-processing.rb
+++ b/post-processing.rb
@@ -9,7 +9,7 @@ buffer = ARGF.inject(String.new) do |buffer, line|
# line filters
line.gsub!(/\s*\n$/, "\n")
line.gsub!("'", '"')
- line.gsub!('u"', '"')
+ line.gsub!('u"', '"') if line =~ /^\s*# \[/
buffer += line
end
|
Made the u"..." removal a bit safer
|
diff --git a/matplotlib2tikz.py b/matplotlib2tikz.py
index <HASH>..<HASH> 100644
--- a/matplotlib2tikz.py
+++ b/matplotlib2tikz.py
@@ -666,7 +666,7 @@ def _transform_to_data_coordinates(obj, xdata, ydata):
'''
try:
import matplotlib.transforms
- points = zip(xdata, ydata)
+ points = np.array(zip(xdata, ydata))
transform = matplotlib.transforms.composite_transform_factory(
obj.get_transform(),
obj.get_axes().transData.inverted()
|
Fix transformation error
In "_transform_to_data_coordinates" the points are passed to
"Transform.transform" which expects a numpy array. Fix this by
converting points to numpy array.
|
diff --git a/src/map.js b/src/map.js
index <HASH>..<HASH> 100644
--- a/src/map.js
+++ b/src/map.js
@@ -446,12 +446,12 @@ map.cellAtTile = function(x, y) {
// Get the cell at the given pixel coordinates, or return a dummy cell.
map.cellAtPixel = function(x, y) {
- return map.cellAtTile(Math.round(this.x / TILE_SIZE_PIXEL), Math.round(this.y / TILE_SIZE_PIXEL));
+ return map.cellAtTile(Math.round(x / TILE_SIZE_PIXEL), Math.round(y / TILE_SIZE_PIXEL));
};
// Get the cell at the given world coordinates, or return a dummy cell.
map.cellAtWorld = function(x, y) {
- return map.cellAtTile(Math.round(this.x / TILE_SIZE_WORLD), Math.round(this.y / TILE_SIZE_WORLD));
+ return map.cellAtTile(Math.round(x / TILE_SIZE_WORLD), Math.round(y / TILE_SIZE_WORLD));
};
// Iterate over the map cells, either the complete map or a specific area.
|
Fix silly copy&paste mistake.
|
diff --git a/visidata/sheets.py b/visidata/sheets.py
index <HASH>..<HASH> 100644
--- a/visidata/sheets.py
+++ b/visidata/sheets.py
@@ -1077,7 +1077,9 @@ def preloadHook(sheet):
@VisiData.api
def newSheet(vd, name, ncols, **kwargs):
- return Sheet(name, columns=[SettableColumn() for i in range(ncols)], **kwargs)
+ vs = Sheet(name, columns=[SettableColumn() for i in range(ncols)], **kwargs)
+ vs.options.quitguard = True
+ return vs
@Sheet.api
|
[quitguard] guard new sheets by default #<I>
|
diff --git a/lib/lol/request.rb b/lib/lol/request.rb
index <HASH>..<HASH> 100644
--- a/lib/lol/request.rb
+++ b/lib/lol/request.rb
@@ -115,7 +115,7 @@ module Lol
# @param body [Hash] Body for POST request
# @param options [Hash] Options passed to HTTParty
# @return [String] raw response of the call
- def perform_request url, verb = :get, body = nil, options = {}
+ def perform_request (url, verb = :get, body = nil, options = {})
options_id = options.inspect
can_cache = [:post, :put].include?(verb) ? false : cached?
if can_cache && result = store.get("#{clean_url(url)}#{options_id}")
@@ -126,14 +126,14 @@ module Lol
response
end
- def perform_rate_limited_request url, verb = :get, body = nil, options = {}
+ def perform_rate_limited_request (url, verb = :get, body = nil, options = {})
return perform_uncached_request(url, verb, body, options) unless rate_limiter
@rate_limiter.times 1 do
perform_uncached_request(url, verb, body, options)
end
end
- def perform_uncached_request url, verb = :get, body = nil, options = {}
+ def perform_uncached_request (url, verb = :get, body = nil, options = {})
options[:headers] ||= {}
options[:headers].merge!({
"Content-Type" => "application/json",
|
Rubymine linter suggestions for parens according to Ruby Style Guide
|
diff --git a/lib/hocon/impl/config_number.rb b/lib/hocon/impl/config_number.rb
index <HASH>..<HASH> 100644
--- a/lib/hocon/impl/config_number.rb
+++ b/lib/hocon/impl/config_number.rb
@@ -30,16 +30,9 @@ class Hocon::Impl::ConfigNumber
end
def int_value_range_checked(path)
- l = long_value
-
- # guess we don't need to bother with this ...
- #
- # if (l < Integer.MIN_VALUE || l > Integer.MAX_VALUE)
- # {
- # throw new ConfigException.WrongType(origin(), path, "32-bit integer",
- # "out-of-range value " + l);
- # }
- l
+ # We don't need to do any range checking here due to the way Ruby handles
+ # integers (doesn't have the 32-bit/64-bit distinction that Java does).
+ long_value
end
def long_value
|
(maint) add comment about Ruby vs. Java integers
|
diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go
index <HASH>..<HASH> 100644
--- a/cmd/syncthing/gui.go
+++ b/cmd/syncthing/gui.go
@@ -1123,7 +1123,7 @@ func (s *apiService) getSupportBundle(w http.ResponseWriter, r *http.Request) {
}
// Set zip file name and path
- zipFileName := fmt.Sprintf("support-bundle-%s.zip", time.Now().Format("2018-01-02T15.04.05"))
+ zipFileName := fmt.Sprintf("support-bundle-%s.zip", time.Now().Format("2006-01-02T150405"))
zipFilePath := filepath.Join(baseDirs["config"], zipFileName)
// Write buffer zip to local zip file (back up)
|
cmd/syncthing: Fix support bundle zip name pattern
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.