hash
stringlengths 40
40
| diff
stringlengths 172
2.63k
| message
stringlengths 12
593
| project
stringlengths 7
65
| split
stringclasses 1
value | diff_languages
stringclasses 54
values |
|---|---|---|---|---|---|
f209e312e22cac647e5029d87dbbd437e91456d1
|
diff --git a/schedula/utils/base.py b/schedula/utils/base.py
index <HASH>..<HASH> 100644
--- a/schedula/utils/base.py
+++ b/schedula/utils/base.py
@@ -70,7 +70,7 @@ class Base(object):
format=NONE, engine=NONE, encoding=NONE, graph_attr=NONE,
node_attr=NONE, edge_attr=NONE, body=NONE, node_styles=NONE,
node_data=NONE, node_function=NONE, edge_data=NONE, max_lines=NONE,
- max_width=NONE, directory=None, sites=None):
+ max_width=NONE, directory=None, sites=None, index=False):
"""
Plots the Dispatcher with a graph in the DOT language with Graphviz.
@@ -211,9 +211,9 @@ class Base(object):
if view:
directory = directory or tempfile.mkdtemp()
if sites is None:
- sitemap.render(directory=directory, view=True)
+ sitemap.render(directory=directory, view=True, index=index)
else:
- sites.add(sitemap.site(root_path=directory, view=True))
+ sites.add(sitemap.site(directory, view=True, index=index))
return sitemap
def get_node(self, *node_ids, node_attr=NONE):
|
feat(base): Add index option to plot.
|
vinci1it2000_schedula
|
train
|
py
|
19cd5f76c0d3918e5f46544585c78262816e7412
|
diff --git a/tests/utils/itutils.go b/tests/utils/itutils.go
index <HASH>..<HASH> 100644
--- a/tests/utils/itutils.go
+++ b/tests/utils/itutils.go
@@ -90,7 +90,7 @@ func doCurl(url string) ([]byte, error) {
defer response.Body.Close()
body, err := ioutil.ReadAll(response.Body)
- if !strings.Contains(string(body), "Powered by Deis") {
+ if !strings.Contains(string(body), "Powered by") {
return nil, fmt.Errorf("App not started (%d)\nBody: (%s)", response.StatusCode, string(body))
}
|
fix(tests): check for immovable response
"Deis" in "Powered by Deis" is configured by an environment variable
called $POWERED_BY. We should not be checking for Deis, as it can be
defined as something else.
|
deis_deis
|
train
|
go
|
d4211ba22551f16792640ffafe23e257db43776e
|
diff --git a/packages/dna-core/src/lib/proxy.js b/packages/dna-core/src/lib/proxy.js
index <HASH>..<HASH> 100644
--- a/packages/dna-core/src/lib/proxy.js
+++ b/packages/dna-core/src/lib/proxy.js
@@ -50,13 +50,11 @@ function proxyProto(proto, proxy) {
}
export function proxy(Component) {
- if (!(Component.prototype instanceof HTMLElement)) {
- Component.prototype = Object.create(
- Component.prototype,
- reduce(DOM_PROXY, (prototype, proxy) =>
- proxyProto(prototype, proxy), {}
- )
- );
- }
+ Component.prototype = Object.create(
+ Component.prototype,
+ reduce(DOM_PROXY, (prototype, proxy) =>
+ proxyProto(prototype, proxy), {}
+ )
+ );
return Component;
}
|
refactor: remove prototype control in proxy method
|
chialab_dna
|
train
|
js
|
e80c00fc67da6e0ca96642b86789a82f96368bbe
|
diff --git a/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java b/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
+++ b/library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
@@ -595,13 +595,13 @@ public class DownloadLaunchRunnable implements Runnable, ProcessCallback {
}
private void realDownloadWithMultiConnectionFromResume(final int connectionCount,
- final List<ConnectionModel> connectionModelList)
+ List<ConnectionModel> modelList)
throws InterruptedException {
- if (connectionCount <= 1 || connectionModelList.size() != connectionCount) {
+ if (connectionCount <= 1 || modelList.size() != connectionCount) {
throw new IllegalArgumentException();
}
- fetchWithMultipleConnection(connectionModelList, model.getTotal());
+ fetchWithMultipleConnection(modelList, model.getTotal());
}
private void realDownloadWithMultiConnectionFromBeginning(final long totalLength,
|
chore: fix stylecheck failed on download-launch-runnable
|
lingochamp_FileDownloader
|
train
|
java
|
2af95e5c2ce3117072c685d3fc1f5f2d4f5fbd58
|
diff --git a/src/sortable.js b/src/sortable.js
index <HASH>..<HASH> 100644
--- a/src/sortable.js
+++ b/src/sortable.js
@@ -324,7 +324,7 @@ angular.module('ui.sortable', [])
// the value will be overwritten with the old value
if(!ui.item.sortable.received) {
ui.item.sortable.dropindex = getItemIndex(ui.item);
- var droptarget = ui.item.closest('[ui-sortable]');
+ var droptarget = ui.item.closest('[ui-sortable], [data-ui-sortable], [x-ui-sortable]');
ui.item.sortable.droptarget = droptarget;
ui.item.sortable.droptargetList = ui.item.parent();
|
fix(sortable): restore support for data-ui-sortable declaration
|
angular-ui_ui-sortable
|
train
|
js
|
59f781c62c9289f5d46560462928e3914af1e965
|
diff --git a/cobra/core/model.py b/cobra/core/model.py
index <HASH>..<HASH> 100644
--- a/cobra/core/model.py
+++ b/cobra/core/model.py
@@ -334,6 +334,12 @@ class Model(Object):
# First check whether the metabolites exist in the model
metabolite_list = [x for x in metabolite_list
if x.id not in self.metabolites]
+
+ bad_ids = [m for m in metabolite_list
+ if not isinstance(m.id, string_types) or len(m.id) < 1]
+ if len(bad_ids) != 0:
+ raise ValueError('invalid identifiers in {}'.format(repr(bad_ids)))
+
for x in metabolite_list:
x._model = self
self.metabolites += metabolite_list
diff --git a/cobra/test/test_model.py b/cobra/test/test_model.py
index <HASH>..<HASH> 100644
--- a/cobra/test/test_model.py
+++ b/cobra/test/test_model.py
@@ -118,6 +118,8 @@ class TestReactions:
benchmark(add_remove_metabolite)
def test_add_metabolite(self, model):
+ with pytest.raises(ValueError):
+ model.add_metabolites(Metabolite())
with model:
with model:
reaction = model.reactions.get_by_id("PGI")
|
fix: check valid metabolite id
Ensure that metabolites to add have valid identifiers. Failure to do so
triggers confusing errors when populating solver.
|
opencobra_cobrapy
|
train
|
py,py
|
ae1817a769825856ad63abd84fc5804f94aa075b
|
diff --git a/packages/@vue/cli-service/lib/commands/build/index.js b/packages/@vue/cli-service/lib/commands/build/index.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-service/lib/commands/build/index.js
+++ b/packages/@vue/cli-service/lib/commands/build/index.js
@@ -226,7 +226,7 @@ async function build (args, api, options) {
isFreshBuild
) {
console.log(
- chalk.gray(`Tip: the direcotry is meant to be served by an HTTP server, and will not work if\n` +
+ chalk.gray(`Tip: the directory is meant to be served by an HTTP server, and will not work if\n` +
`you open it directly over file:// protocol. To preview it locally, use an HTTP\n` +
`server like the ${chalk.yellow(`serve`)} package on npm.\n`)
)
|
fix: typo (#<I>)
Fixes typo in console.log output when the build is the first build
(direcotry => directory)
|
vuejs_vue-cli
|
train
|
js
|
73cf78a99457cacbbabcee83f49b9ed300b8bf17
|
diff --git a/src/exporters/file.js b/src/exporters/file.js
index <HASH>..<HASH> 100644
--- a/src/exporters/file.js
+++ b/src/exporters/file.js
@@ -3,28 +3,33 @@
const UnixFS = require('ipfs-unixfs')
const pull = require('pull-stream')
-function extractContent (node) {
- return UnixFS.unmarshal(node.data).data
-}
-
// Logic to export a single (possibly chunked) unixfs file.
module.exports = (node, name, ds) => {
+ const file = UnixFS.unmarshal(node.data)
let content
if (node.links.length === 0) {
- const c = extractContent(node)
- content = pull.values([c])
+ content = pull.values([file.data])
} else {
content = pull(
pull.values(node.links),
pull.map((link) => ds.getStream(link.hash)),
pull.flatten(),
- pull.map(extractContent)
+ pull.map((node) => {
+ try {
+ const ex = UnixFS.unmarshal(node.data)
+ return ex.data
+ } catch (err) {
+ console.error(node)
+ throw new Error('Failed to unmarshal node')
+ }
+ })
)
}
return pull.values([{
content: content,
- path: name
+ path: name,
+ size: file.fileSize()
}])
}
|
feat(exporter): return file sizes
|
ipfs_js-ipfs-unixfs
|
train
|
js
|
6b86419edacdc49c2cbb53812ef6a1c276760912
|
diff --git a/lib/procodile/instance.rb b/lib/procodile/instance.rb
index <HASH>..<HASH> 100644
--- a/lib/procodile/instance.rb
+++ b/lib/procodile/instance.rb
@@ -1,3 +1,4 @@
+require 'fileutils'
require 'procodile/logger'
require 'procodile/rbenv'
@@ -135,6 +136,7 @@ module Procodile
end
if self.process.log_path && @supervisor.run_options[:force_single_log] != true
+ FileUtils.mkdir_p(File.dirname(self.process.log_path))
log_destination = File.open(self.process.log_path, 'a')
io = nil
else
|
fix: create the log directory if it doesn't exist
|
adamcooke_procodile
|
train
|
rb
|
944485d1bd3bcd37eb83880c84aa5ce52745cbcd
|
diff --git a/tests/Controller.js b/tests/Controller.js
index <HASH>..<HASH> 100644
--- a/tests/Controller.js
+++ b/tests/Controller.js
@@ -133,4 +133,14 @@ describe('Controller', () => {
controller.getSignal('foo')(new Date())
})
})
+ it('should throw when pointing to a non existing signal', () => {
+ const controller = new Controller({})
+ assert.throws(() => {
+ controller.getSignal('foo.bar')()
+ })
+ })
+ it('should return undefined when grabbing non existing state', () => {
+ const controller = new Controller({})
+ assert.equal(controller.getState('foo.bar'), undefined)
+ })
})
|
test(Controller): write tests for missing signal and missing state
|
cerebral_cerebral
|
train
|
js
|
47056d0ede56ebb95b248da1ee91920cfaf67aa1
|
diff --git a/okdownload/src/test/java/com/liulishuo/okdownload/core/file/DownloadUriOutputStreamTest.java b/okdownload/src/test/java/com/liulishuo/okdownload/core/file/DownloadUriOutputStreamTest.java
index <HASH>..<HASH> 100644
--- a/okdownload/src/test/java/com/liulishuo/okdownload/core/file/DownloadUriOutputStreamTest.java
+++ b/okdownload/src/test/java/com/liulishuo/okdownload/core/file/DownloadUriOutputStreamTest.java
@@ -152,8 +152,8 @@ public class DownloadUriOutputStreamTest {
when(pdf.getFileDescriptor()).thenReturn(fd);
final File file = new File("/test");
- DownloadUriOutputStream outputStream = (DownloadUriOutputStream) new DownloadUriOutputStream.Factory()
- .create(context, file, 1);
+ DownloadUriOutputStream outputStream = (DownloadUriOutputStream) new DownloadUriOutputStream
+ .Factory().create(context, file, 1);
assertThat(outputStream.pdf).isEqualTo(pdf);
assertThat(outputStream.out).isNotNull();
assertThat(outputStream.fos.getFD()).isEqualTo(fd);
|
chore: fix stylecheck issue on download-uri-output-stream
|
lingochamp_okdownload
|
train
|
java
|
e73880ffaff2c3a61cbe739854c60deec50c7bb2
|
diff --git a/tasks/run-command.js b/tasks/run-command.js
index <HASH>..<HASH> 100644
--- a/tasks/run-command.js
+++ b/tasks/run-command.js
@@ -4,7 +4,7 @@ module.exports = function(gulp, config) {
return function(command, cb) {
var _ = require('lodash');
var spawn = require('child_process').spawn;
- var env = _.extend({}, process.env, config.server.environmentVariables);
+ var env = _.extend({}, config.server.environmentVariables, process.env);
var argv = process.argv.slice(2);
var proc = spawn('node', [command].concat(argv), { env: env, stdio: 'inherit' });
|
feat(run-command): allow environment to override variables defined in tasks config
|
emartech_boar-tasks-server
|
train
|
js
|
d000ba3ed3280942fbbe59a83601b65986f86e57
|
diff --git a/etcd/etcd.go b/etcd/etcd.go
index <HASH>..<HASH> 100644
--- a/etcd/etcd.go
+++ b/etcd/etcd.go
@@ -82,6 +82,7 @@ func (e *Etcd) Run() {
} else if e.Config.Verbose {
log.Verbose = true
}
+
if e.Config.CPUProfileFile != "" {
profile(e.Config.CPUProfileFile)
}
|
chore(main): add a space line between the two if statements
|
etcd-io_etcd
|
train
|
go
|
7fd4aef9dc318093aa3a75fc7f6941beeb304800
|
diff --git a/rules/readfile.go b/rules/readfile.go
index <HASH>..<HASH> 100644
--- a/rules/readfile.go
+++ b/rules/readfile.go
@@ -122,6 +122,7 @@ func NewReadFile(id string, conf gosec.Config) (gosec.Rule, []ast.Node) {
rule.clean.Add("path/filepath", "Clean")
rule.clean.Add("path/filepath", "Rel")
rule.Add("io/ioutil", "ReadFile")
+ rule.Add("os", "ReadFile")
rule.Add("os", "Open")
rule.Add("os", "OpenFile")
return rule, []ast.Node{(*ast.CallExpr)(nil)}
diff --git a/testutils/source.go b/testutils/source.go
index <HASH>..<HASH> 100644
--- a/testutils/source.go
+++ b/testutils/source.go
@@ -1788,6 +1788,22 @@ func main() {
package main
import (
+"os"
+"log"
+)
+
+func main() {
+ f := os.Getenv("tainted_file")
+ body, err := os.ReadFile(f)
+ if err != nil {
+ log.Printf("Error: %v\n", err)
+ }
+ log.Print(body)
+
+}`}, 1, gosec.NewConfig()}, {[]string{`
+package main
+
+import (
"fmt"
"log"
"net/http"
|
feat: add os.ReadFile to G<I> (#<I>)
In Go <I> or higher, the `io/ioutil` has been deprecated and the
`ioutil.ReadFile` function now calls `os.ReadFile`.
|
securego_gosec
|
train
|
go,go
|
e7873093ada02ad6c9d6e190b7184775ab3686ce
|
diff --git a/lib/runner.js b/lib/runner.js
index <HASH>..<HASH> 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -334,6 +334,8 @@ Runner.prototype.run = function() {
pluginPostTestPromises.push(plugins.postTest(false, testInfo));
});
+ log.debug('Running with spec files ' + self.config_.specs);
+
return require(frameworkPath).run(self, self.config_.specs).
then(function(testResults) {
return q.all(pluginPostTestPromises).then(function(postTestResultList) {
|
chore(debugging): add info about current spec file list when troubleshooting
Running with the `--troubleshoot` flag will now list the spec files
for each runner instance.
|
angular_protractor
|
train
|
js
|
7ccf4936ae9d22968feba11b18e082e3a3e17216
|
diff --git a/core/Pimf/Util/Validator.php b/core/Pimf/Util/Validator.php
index <HASH>..<HASH> 100644
--- a/core/Pimf/Util/Validator.php
+++ b/core/Pimf/Util/Validator.php
@@ -298,7 +298,7 @@ class Validator
$func = function($a,$b) use ($operator) {
switch ($operator){
case "<":
- return ($a > $b);
+ return ($a < $b);
case ">":
return ($a > $b);
case "==":
|
fix: refactoring of create_function()
|
gjerokrsteski_pimf-framework
|
train
|
php
|
1b96f0981eeb85d7899d1a6ffdb3b97b1cf98b39
|
diff --git a/src/useSprings.js b/src/useSprings.js
index <HASH>..<HASH> 100644
--- a/src/useSprings.js
+++ b/src/useSprings.js
@@ -26,7 +26,7 @@ export const useSprings = (length, propsArg) => {
[length]
)
- const ref = springs[0].props.ref
+ const ref = springs[0] ? springs[0].props.ref : void 0
const { start, update, stop } = useMemo(
() => ({
/** Apply any pending updates */
|
fix: useSprings "length" of 0
Reported by: <URL>
|
react-spring_react-spring
|
train
|
js
|
5ca5d11ad55df0b9910969873900b966c710d335
|
diff --git a/spec/dummy/spec/lib/punto_pagos_rails/transaction_service_spec.rb b/spec/dummy/spec/lib/punto_pagos_rails/transaction_service_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy/spec/lib/punto_pagos_rails/transaction_service_spec.rb
+++ b/spec/dummy/spec/lib/punto_pagos_rails/transaction_service_spec.rb
@@ -77,7 +77,7 @@ RSpec.describe TransactionService do
allow(Ticket).to receive(:find).with(ticket.id).and_return(ticket)
service.create
expect(ticket.errors[:base]).to include(
- I18n.t("activerecord.errors.models.ticket.attributes.base.invalid_puntopagos_response"))
+ I18n.t("punto_pagos_rails.errors.invalid_puntopagos_response"))
end
end
|
fix(test): compare with wrong error label
|
platanus_punto_pagos_rails
|
train
|
rb
|
0dca83e00182e429ffcb86f16d441394cdc40a57
|
diff --git a/test/cluster/client/client.go b/test/cluster/client/client.go
index <HASH>..<HASH> 100644
--- a/test/cluster/client/client.go
+++ b/test/cluster/client/client.go
@@ -16,6 +16,7 @@ import (
type Client struct {
*httpclient.Client
cluster *tc.Cluster
+ size int
}
var ErrNotFound = errors.New("testcluster: resource not found")
@@ -34,11 +35,12 @@ func NewClient(endpoint string) (*Client, error) {
return nil, err
}
client.cluster = &cluster
+ client.size = cluster.Size()
return client, nil
}
func (c *Client) Size() int {
- return c.cluster.Size()
+ return c.size
}
func (c *Client) BackoffPeriod() time.Duration {
@@ -62,6 +64,7 @@ func (c *Client) AddHost(ch chan *host.HostEvent, vanilla bool) (*tc.Instance, e
select {
case event := <-ch:
if event.HostID == instance.ID {
+ c.size++
return &instance, nil
}
case <-time.After(60 * time.Second):
@@ -71,6 +74,7 @@ func (c *Client) AddHost(ch chan *host.HostEvent, vanilla bool) (*tc.Instance, e
}
func (c *Client) RemoveHost(host *tc.Instance) error {
+ c.size--
return c.Delete("/" + host.ID)
}
|
test: Fix testCluster.Size()
TestOmniJobs uses testCluster.Size() to determine how many jobs to wait
for, so it should not include hosts which have been removed.
|
flynn_flynn
|
train
|
go
|
abd8b9de68cf0039d99f7bf237e2bb5076ecf2d8
|
diff --git a/src/components/navbar/messages.js b/src/components/navbar/messages.js
index <HASH>..<HASH> 100644
--- a/src/components/navbar/messages.js
+++ b/src/components/navbar/messages.js
@@ -97,20 +97,16 @@ export default defineMessages({
id: 'NavBar.Discounts.add',
defaultMessage: 'Add discount',
},
- 'NavBar.ProjectSettings.title': {
- id: 'NavBar.ProjectSettings.title',
+ 'NavBar.Settings.title': {
+ id: 'NavBar.Settings.title',
defaultMessage: 'Settings',
},
- 'NavBar.Taxes.title': {
- id: 'NavBar.Taxes.title',
- defaultMessage: 'Taxes',
- },
- 'NavBar.International.title': {
- id: 'NavBar.International.title',
- defaultMessage: 'International',
+ 'NavBar.ProjectSettings.title': {
+ id: 'NavBar.ProjectSettings.title',
+ defaultMessage: 'Project settings',
},
- 'NavBar.ShippingMethods.title': {
- id: 'NavBar.ShippingMethods.title',
- defaultMessage: 'Shipping methods',
+ 'NavBar.ProductTypes.title': {
+ id: 'NavBar.ProductTypes.title',
+ defaultMessage: 'Product types',
},
});
|
refactor(Settings): move project-settings to sub-route, add product-types sub-route
|
commercetools_merchant-center-application-kit
|
train
|
js
|
d27ef4df2986a8291ccf2c859a41852f45d7843e
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ def tag_version():
"""Generate version number from Git Tag, e.g. v2.0.0, v2.0.0-1."""
recent_tag = subprocess.check_output(shlex.split('git describe --long'))
tag, count, _ = recent_tag.decode().split('-')
- version = '-'.join([tag, count]) if int(count) else tag
+ version = 'a'.join([tag, count]) if int(count) else tag
return version
|
feat: Default to alpha releases
|
foremast_foremast
|
train
|
py
|
de47c3f0eeb9d9b03526a0707f275d3cf752b086
|
diff --git a/src/Message/PurchaseRequest.php b/src/Message/PurchaseRequest.php
index <HASH>..<HASH> 100644
--- a/src/Message/PurchaseRequest.php
+++ b/src/Message/PurchaseRequest.php
@@ -22,9 +22,9 @@ class PurchaseRequest extends AbstractRequest
return $this->setParameter('language', $value);
}
- public function getClient()
+ public function getClient(): string
{
- return $this->getParameter('client');
+ return (string) $this->getParameter('client');
}
public function setClient($value)
|
fix: client could be object and throws exceptions
|
hiqdev_omnipay-freekassa
|
train
|
php
|
58fb802a05f7ea44ef595f118130952176f7190d
|
diff --git a/packages/ipfs-core/src/components/stats/bw.js b/packages/ipfs-core/src/components/stats/bw.js
index <HASH>..<HASH> 100644
--- a/packages/ipfs-core/src/components/stats/bw.js
+++ b/packages/ipfs-core/src/components/stats/bw.js
@@ -53,10 +53,10 @@ function getBandwidthStats (libp2p, opts) {
const { movingAverages, snapshot } = stats
return {
- totalIn: BigInt(snapshot.dataReceived.toString()),
- totalOut: BigInt(snapshot.dataSent.toString()),
- rateIn: BigInt(movingAverages.dataReceived[60000].movingAverage() / 60),
- rateOut: BigInt(movingAverages.dataSent[60000].movingAverage() / 60)
+ totalIn: BigInt(snapshot.dataReceived.integerValue().toString()),
+ totalOut: BigInt(snapshot.dataSent.integerValue().toString()),
+ rateIn: BigInt(Math.round(movingAverages.dataReceived[60000].movingAverage() / 60)),
+ rateOut: BigInt(Math.round(movingAverages.dataSent[60000].movingAverage() / 60))
}
}
|
fix: round bandwidth stats (#<I>)
Dividing the bandwidth stats sometimes results in a fraction which we cannot
convert to a `BigInteger` since it's not an integer...
Fixes #<I>
|
ipfs_js-ipfs
|
train
|
js
|
b626f555d577eef90df29b0fcccbb50910c63930
|
diff --git a/src/Webpage/MenuGenerator.php b/src/Webpage/MenuGenerator.php
index <HASH>..<HASH> 100644
--- a/src/Webpage/MenuGenerator.php
+++ b/src/Webpage/MenuGenerator.php
@@ -24,7 +24,7 @@ use vxPHP\Application\Application;
*
* @author Gregor Kofler
*
- * @version 1.0.0, 2020-10-10
+ * @version 1.0.1, 2020-11-30
*
* @throws MenuGeneratorException
*/
@@ -182,7 +182,7 @@ class MenuGenerator
* @throws ApplicationException
* @throws MenuGeneratorException
*/
- public static function create(string $id = null, int $level = null, bool $forceActiveMenu = null, string $decorator = null, $renderArgs = null): MenuGenerator
+ public static function create(string $id = null, int $level = null, bool $forceActiveMenu = false, string $decorator = null, $renderArgs = null): MenuGenerator
{
return new static($id, $level, $forceActiveMenu, $decorator, $renderArgs);
}
|
fix: wrong default type for hinted argument in MenuGenerator
|
Vectrex_vxPHP
|
train
|
php
|
1be31802970a248d99cc14b2fa6f57333dd0a85d
|
diff --git a/libtmux/window.py b/libtmux/window.py
index <HASH>..<HASH> 100644
--- a/libtmux/window.py
+++ b/libtmux/window.py
@@ -477,9 +477,8 @@ class Window(TmuxMappingObject, TmuxRelationalObject):
# tmux < 1.7. This is added in 1.7.
if pane.stderr:
- raise exc.LibTmuxException(pane.stderr)
if "pane too small" in pane.stderr:
- pass
+ raise exc.LibTmuxException(pane.stderr)
raise exc.LibTmuxException(pane.stderr, self._info, self.panes)
else:
|
chore: Fix raise for older tmux versions
|
tmux-python_libtmux
|
train
|
py
|
e83c17450ee0275dffde334460d8d6a7777874a5
|
diff --git a/ommprotocol/md.py b/ommprotocol/md.py
index <HASH>..<HASH> 100644
--- a/ommprotocol/md.py
+++ b/ommprotocol/md.py
@@ -264,9 +264,7 @@ class Stage(object):
status = '#{}'.format(self._stage_number[0])
if self.total_stages is not None:
status += '/{}'.format(self.total_stages)
- if self.steps:
- status += ': {} @ {}K'.format(self.name, self.temperature)
- status += ', NPT' if self.barostat else ', NVT'
+ status += ': {}'.format(self.name)
if self.restrained_atoms:
status += ' [Restrained {}]'.format(self.restrained_atoms)
elif self.constrained_atoms:
@@ -306,7 +304,10 @@ class Stage(object):
# MD simulation
if self.verbose:
pbc = 'PBC ' if self.system.usesPeriodicBoundaryConditions() else ''
- print(' Running {}MD for {} steps'.format(pbc, self.steps))
+ conditions = 'NPT' if self.barostat else 'NVT'
+ print(' Running {}MD for {} steps @ {}K, {}'.format(pbc, self.steps,
+ self.temperature,
+ conditions))
with self.handle_exceptions():
self.simulate()
|
fix(md): better structured stdout report of conditions
|
insilichem_ommprotocol
|
train
|
py
|
c7e86417d437d1368726a018a0478f5e5d263288
|
diff --git a/lib/init.js b/lib/init.js
index <HASH>..<HASH> 100644
--- a/lib/init.js
+++ b/lib/init.js
@@ -66,28 +66,21 @@ class Init {
await this.writeFile('package.json', JSON.stringify(packageInfo, null, 2))
}
- async writeEditorConfig() {
- const name = '.editorconfig'
- await copyFile(packagePath(name), this.currentPath(name))
- }
-
- async writeESLintConfig() {
- const name = '.eslintrc.js'
+ async writeTemplateFile(name) {
await copyFile(template(name), this.currentPath(name))
}
- async writeCommitlintConfig() {
- const name = '.commitlintrc.js'
- await copyFile(template(name), this.currentPath(name))
+ async writePackageFile(name) {
+ await copyFile(packagePath(name), this.currentPath(name))
}
}
module.exports = async function init() {
const cmd = new Init(process.cwd())
await cmd.updatePackageFile()
- await cmd.writeEditorConfig()
- await cmd.writeESLintConfig()
- await cmd.writeCommitlintConfig()
+ await cmd.writePackageFile('.editorconfig')
+ await cmd.writeTemplateFile('.eslintrc.js')
+ await cmd.writeTemplateFile('.commitlintrc.js')
}
module.exports.desc = `Setup npm project:
|
refactor(init): reduce duplication of methods (#<I>)
|
ybiquitous_ybiq
|
train
|
js
|
3b7b282b697f92ab74f9d9bb2a289d3355f3501b
|
diff --git a/src/client/Client.js b/src/client/Client.js
index <HASH>..<HASH> 100644
--- a/src/client/Client.js
+++ b/src/client/Client.js
@@ -395,8 +395,9 @@ class Client extends EventEmitter {
* <warn>Bots can only fetch their own profile.</warn>
* @param {Snowflake} [id='@me'] ID of application to fetch
* @returns {Promise<OAuth2Application>}
+ * @example
* client.fetchApplication()
- * .then(application => console.log(`Obtained application with name: ${application.name}`)
+ * .then(application => console.log(`Obtained application with name: ${application.name}`))
* .catch(console.error);
*/
fetchApplication(id = '@me') {
|
docs(Client): add missing example tag and closing parenthesis (#<I>)
|
discordjs_discord.js
|
train
|
js
|
1baca604c3a72d3ebc0da66be48197e9f058a057
|
diff --git a/tests/models.py b/tests/models.py
index <HASH>..<HASH> 100644
--- a/tests/models.py
+++ b/tests/models.py
@@ -35,7 +35,7 @@ class Example(models.Model):
@property
def property_should_not_index(self):
- return True
+ return False
@property
def property_string(self):
diff --git a/tests/test_index.py b/tests/test_index.py
index <HASH>..<HASH> 100644
--- a/tests/test_index.py
+++ b/tests/test_index.py
@@ -254,7 +254,7 @@ class IndexTestCase(TestCase):
class ExampleIndex(AlgoliaIndex):
fields = 'name'
- should_index = 'static_should_not_index'
+ should_index = 'property_should_not_index'
index = ExampleIndex(Example, self.client)
self.assertFalse(index._should_index(self.instance),
|
fix: test_should_index_property with correct negative case
|
algolia_algoliasearch-django
|
train
|
py,py
|
9fc39a4c97ad6e9fa14bc3f2c5d26660148901ce
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -169,7 +169,8 @@ describe('Puppeteer', function() {
await browser2.close();
rm(userDataDir);
}));
- it('userDataDir option should restore cookies', SX(async function() {
+ // @see https://github.com/GoogleChrome/puppeteer/issues/1537
+ xit('userDataDir option should restore cookies', SX(async function() {
const userDataDir = fs.mkdtempSync(path.join(__dirname, 'test-user-data-dir'));
const options = Object.assign({userDataDir}, defaultBrowserOptions);
const browser = await puppeteer.launch(options);
|
test: disable 'userDataDir option should restore cookies' (#<I>)
References #<I>
|
GoogleChrome_puppeteer
|
train
|
js
|
5389bcf4fb587f10461439a06bb845a7101232c5
|
diff --git a/src/image-preview/index.js b/src/image-preview/index.js
index <HASH>..<HASH> 100644
--- a/src/image-preview/index.js
+++ b/src/image-preview/index.js
@@ -54,6 +54,7 @@ const ImagePreview = (images, startPosition = 0) => {
});
if (options.onClose) {
+ instance.$off('close');
instance.$once('close', options.onClose);
}
diff --git a/src/image-preview/test/index.spec.js b/src/image-preview/test/index.spec.js
index <HASH>..<HASH> 100644
--- a/src/image-preview/test/index.spec.js
+++ b/src/image-preview/test/index.spec.js
@@ -102,6 +102,26 @@ test('onClose option', async done => {
done();
});
+test('onClose should only trigger once', async done => {
+ const onClose = jest.fn();
+ const instance = ImagePreview({
+ images,
+ startPostion: 1,
+ onClose
+ });
+
+ ImagePreview({
+ images,
+ startPostion: 1,
+ onClose
+ });
+
+ instance.close();
+
+ expect(onClose).toHaveBeenCalledTimes(1);
+ done();
+});
+
test('onChange option', async done => {
const instance = ImagePreview({
images,
|
fix(ImagePreview): onClose should only trigger once (#<I>)
|
youzan_vant
|
train
|
js,js
|
2344247d0eb665ff5a6ed20b3776b27f4ffc1838
|
diff --git a/test/simple.test.js b/test/simple.test.js
index <HASH>..<HASH> 100644
--- a/test/simple.test.js
+++ b/test/simple.test.js
@@ -47,13 +47,6 @@ test('GET /_ping => pong', async (t) => {
t.true(stdout[0].includes('GET /_ping'))
})
-test('GET /_routes => 200 with routes', async (t) => {
- const { statusCode, body } = await $get('/_routes')
- t.is(statusCode, 200)
- t.true(Array.isArray(body))
- t.true(body.length > 0)
-})
-
test('GET /404 => 404 status code', async (t) => {
const { statusCode, body } = await $get('/404')
t.is(statusCode, 404)
|
test: Remove _routes test
|
mono-js_mono
|
train
|
js
|
86c7d2d399da3cc939fb21962004aebdccd19ca3
|
diff --git a/autotls.go b/autotls.go
index <HASH>..<HASH> 100644
--- a/autotls.go
+++ b/autotls.go
@@ -19,7 +19,17 @@ func RunWithManager(r http.Handler, m *autocert.Manager) error {
Handler: r,
}
- go http.ListenAndServe(":http", m.HTTPHandler(nil))
+ go http.ListenAndServe(":http", m.HTTPHandler(http.HandlerFunc(redirect)))
return s.ListenAndServeTLS("", "")
}
+
+func redirect(w http.ResponseWriter, req *http.Request) {
+ target := "https://" + req.Host + req.URL.Path
+
+ if len(req.URL.RawQuery) > 0 {
+ target += "?" + req.URL.RawQuery
+ }
+
+ http.Redirect(w, req, target, http.StatusTemporaryRedirect)
+}
|
chore: support http redirect to https (#<I>)
|
gin-gonic_autotls
|
train
|
go
|
23c20ebd6d912fbed60824bfb15d6fabcbd255f1
|
diff --git a/test/permissions.js b/test/permissions.js
index <HASH>..<HASH> 100644
--- a/test/permissions.js
+++ b/test/permissions.js
@@ -5,23 +5,21 @@ var access = require('../lib/middleware/access')
var assert = require('assertmessage')
var http = require('http')
-var sandbox
-beforeEach(function (done) {
- if (sandbox) {
- sandbox.restore()
- }
- sandbox = sinon.sandbox.create()
- done()
-})
-
-describe('permissions', function () {
+describe('Permissions', function () {
var noop = function () {}
var res = { send: noop }
+ var sandbox
+
+ before(function () {
+ sandbox = sinon.sandbox.create()
+ })
beforeEach(function () {
+ sandbox.restore()
this.mock = sandbox.mock(res)
- this.mock.expects('send').once()
- .withArgs(403, { msg: http.STATUS_CODES[403] })
+ this.mock.expects('send').once().withArgs(403, {
+ msg: http.STATUS_CODES[403]
+ })
})
describe('with access that returns', function () {
|
refactor(tests): permissions
|
florianholzapfel_express-restify-mongoose
|
train
|
js
|
4bda41be1658be7672eb200b3ac9116883b275f8
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -3,8 +3,17 @@ import os
import sys
from setuptools import setup, Extension, find_packages
-from Cython.Build import cythonize
+try:
+ from Cython.Build import cythonize
+except ImportError:
+ # note: This is only to cheat the RTD builds from single requirement file
+ # with -e flag. This package will be either distributed with C
+ # sources or as properly built wheels from Travis CI and Appveyor.
+ if os.environ.get('READTHEDOCS', None) == 'True':
+ cythonize = lambda x: x
+ else:
+ raise
try:
from pypandoc import convert
|
docs: try to hackaround the installation issues on RTD
|
swistakm_pyimgui
|
train
|
py
|
2e379d55cad16f086de862bedca2428efdbaa21a
|
diff --git a/src/defaults.js b/src/defaults.js
index <HASH>..<HASH> 100644
--- a/src/defaults.js
+++ b/src/defaults.js
@@ -44,7 +44,7 @@ module.exports = async (argv = {}) => {
const opts = mixinDeep(
{ project: { name, description: desc } },
defaults,
- { locals: await latestDeps() },
+ { locals: await latestDeps(argv.pkg) },
options,
);
|
fix: allow passing settings.pkg
|
tunnckoCoreLabs_charlike
|
train
|
js
|
8fedc0d9e917ca52d199f3940e10aa6b8a31d977
|
diff --git a/src/Hint/HintContent.js b/src/Hint/HintContent.js
index <HASH>..<HASH> 100644
--- a/src/Hint/HintContent.js
+++ b/src/Hint/HintContent.js
@@ -50,7 +50,7 @@ const styles = theme => ({
position: 'absolute'
},
left: {
- left: -15,
+ left: -theme.hint.paddings.right,
paddingLeft: theme.hint.paddings.left,
paddingRight: theme.hint.paddings.right,
'& $icon': {
@@ -58,7 +58,7 @@ const styles = theme => ({
}
},
right: {
- left: 15,
+ left: theme.hint.paddings.right,
paddingLeft: theme.hint.paddings.right,
paddingRight: theme.hint.paddings.left,
'& $icon': {
|
fix: added hint container left and right position
|
rambler-digital-solutions_rambler-ui
|
train
|
js
|
3638eda0c9b9b617ccccbbbc7b0804e279fd467b
|
diff --git a/django_ses/views.py b/django_ses/views.py
index <HASH>..<HASH> 100644
--- a/django_ses/views.py
+++ b/django_ses/views.py
@@ -174,7 +174,7 @@ def handle_bounce(request):
For the format of the SNS subscription confirmation request see this URL:
http://docs.aws.amazon.com/sns/latest/gsg/json-formats.html#http-subscription-confirmation-json
- SNS message signatures are verified by default. This funcionality can
+ SNS message signatures are verified by default. This functionality can
be disabled by setting AWS_SES_VERIFY_BOUNCE_SIGNATURES to False.
However, this is not recommended.
See: http://docs.amazonwebservices.com/sns/latest/gsg/SendMessageToHttp.verify.signature.html
|
docs: Fix simple typo, funcionality -> functionality (#<I>)
There is a small typo in django_ses/views.py.
Should read `functionality` rather than `funcionality`.
|
django-ses_django-ses
|
train
|
py
|
41bce32b79c029957dc825dd3140450f17e0aeb5
|
diff --git a/lib/plugins/index.js b/lib/plugins/index.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/index.js
+++ b/lib/plugins/index.js
@@ -527,6 +527,7 @@ function resolvePluginRule(req) {
var rules = req.rules;
var plugin = req.pluginMgr = getPluginByRuleUrl(comUtil.rule.getUrl(rules.rule));
var _plugin = getPluginByPluginRule(rules.plugin);
+ req.ruleValue = plugin && comUtil.getMatcherValue(rules.rule);
if (_plugin) {
if (plugin) {
if (plugin != _plugin) {
|
refactor: Refine lib/plugins/index.js
|
avwo_whistle
|
train
|
js
|
fb9d4049d82d2eb2ea6e91874867ecc7064933a9
|
diff --git a/test/mouse.spec.js b/test/mouse.spec.js
index <HASH>..<HASH> 100644
--- a/test/mouse.spec.js
+++ b/test/mouse.spec.js
@@ -136,5 +136,20 @@ module.exports.addTests = function({testRunner, expect, FFOX}) {
[200, 300]
]);
});
+ // @see https://crbug.com/929806
+ xit('should work with mobile viewports and cross process navigations', async({page, server}) => {
+ await page.goto(server.EMPTY_PAGE);
+ await page.setViewport({width: 360, height: 640, isMobile: true});
+ await page.goto(server.CROSS_PROCESS_PREFIX + '/mobile.html');
+ await page.evaluate(() => {
+ document.addEventListener('click', event => {
+ window.result = {x: event.clientX, y: event.clientY};
+ });
+ });
+
+ await page.mouse.click(30, 40);
+
+ expect(await page.evaluate('result')).toEqual({x: 30, y: 40});
+ });
});
};
|
test(mouse): add failing for test for mobile + cross process navigation (#<I>)
|
GoogleChrome_puppeteer
|
train
|
js
|
91f11f912c11136f342f0233a6e7773c8e6c4257
|
diff --git a/tooling/circle-cli/commands/verify-no-builds-on-branch.js b/tooling/circle-cli/commands/verify-no-builds-on-branch.js
index <HASH>..<HASH> 100644
--- a/tooling/circle-cli/commands/verify-no-builds-on-branch.js
+++ b/tooling/circle-cli/commands/verify-no-builds-on-branch.js
@@ -9,9 +9,22 @@ const tap = require(`../lib/tap`);
const blockUntilQueueEmpty = _.curry(function blockUntilQueueEmpty(argv, ci) {
return ci.getBranchBuilds(argv)
.then((builds) => {
- if (_.filter(builds, {status: `pending`}).length > 0 || _.filter(builds, {status: `running`}).length > 0) {
+
+ // lifecycle values:
+ // - queued
+ // - scheduled
+ // - not_run
+ // - not_running
+ // - running
+ // - finished
+ // I'm assuming not_run and finished are the only values the imply the
+ // build is not running or pending
+ const queued = builds
+ .filter((build) => build.lifecycle !== `finished` && build.lifecycle !== `not_run`);
+
+ if (queued.length > 0) {
return new Promise((resolve) => {
- console.log('waiting for queue to drain')
+ console.log(`waiting for queue to drain`);
setTimeout(() => resolve(blockUntilQueueEmpty(argv, ci)), argv.interval);
});
}
|
chore(tooling): adjust queuing logic
|
webex_spark-js-sdk
|
train
|
js
|
cf3be87b68260d9d7e9f3480d9aefeb8bad69e2e
|
diff --git a/src/core/instance/proxy.js b/src/core/instance/proxy.js
index <HASH>..<HASH> 100644
--- a/src/core/instance/proxy.js
+++ b/src/core/instance/proxy.js
@@ -15,9 +15,11 @@ if (process.env.NODE_ENV !== 'production') {
const warnNonPresent = (target, key) => {
warn(
- `Property or method "${key}" is not defined on the instance but ` +
- `referenced during render. Make sure to declare reactive data ` +
- `properties in the data option.`,
+ `Property or method "${key}" is not defined on the instance but` +
+ 'referenced during render. Make sure that this property is reactive, ' +
+ 'either in the data option, or for class-based components, by ' +
+ 'initializing the property.' +
+ 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
target
)
}
|
refactor: improve error msg for non-reactive properties (#<I>)
close #<I>
|
kaola-fed_megalo
|
train
|
js
|
a520f040455aba9cb5a3096be39b3b8e76d2432e
|
diff --git a/packages/babel-preset-pob-env/lib/index.js b/packages/babel-preset-pob-env/lib/index.js
index <HASH>..<HASH> 100644
--- a/packages/babel-preset-pob-env/lib/index.js
+++ b/packages/babel-preset-pob-env/lib/index.js
@@ -119,7 +119,10 @@ module.exports = function (context, opts) {
switch (targetOption) {
case 'node':
if (versionOption === 'current') {
- targetPreset = ['latest-node', { modules, loose, target: 'current' }];
+ targetPreset = [
+ resolvePreset('babel-preset-latest-node'),
+ { modules, loose, target: 'current' },
+ ];
} else {
// targetPreset = ['@babel/preset-env', { modules, loose, targets: { node: versionOption } }];
targetPreset = [
|
fix(babel-preset-pob-env): resolve babel-preset-latest-node when version is current
|
christophehurpeau_pob-lerna
|
train
|
js
|
73b0e6c37bccc910042c22bd1911c9f09cf8bb32
|
diff --git a/pkg/services/sqlstore/migrations/migrations_test.go b/pkg/services/sqlstore/migrations/migrations_test.go
index <HASH>..<HASH> 100644
--- a/pkg/services/sqlstore/migrations/migrations_test.go
+++ b/pkg/services/sqlstore/migrations/migrations_test.go
@@ -6,6 +6,7 @@ import (
"github.com/go-xorm/xorm"
. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/services/sqlstore/sqlutil"
+ "github.com/inconshreveable/log15"
. "github.com/smartystreets/goconvey/convey"
)
@@ -28,7 +29,7 @@ func TestMigrations(t *testing.T) {
sqlutil.CleanDB(x)
mg := NewMigrator(x)
- //mg.LogLevel = log.DEBUG
+ mg.Logger.SetHandler(log15.DiscardHandler())
AddMigrations(mg)
err = mg.Start()
|
feat(logging): disable migrator logging during test
|
grafana_grafana
|
train
|
go
|
39dd9b6483159aa7f39af7dda63cc95f5445464d
|
diff --git a/cmd/iam.go b/cmd/iam.go
index <HASH>..<HASH> 100644
--- a/cmd/iam.go
+++ b/cmd/iam.go
@@ -672,8 +672,10 @@ func (sys *IAMSys) DeletePolicy(policyName string) error {
if pset.Contains(policyName) {
cr, ok := sys.iamUsersMap[u]
if !ok {
- // This case cannot happen
- return errNoSuchUser
+ // This case can happen when an temporary account
+ // is deleted or expired, removed it from userPolicyMap.
+ delete(sys.iamUserPolicyMap, u)
+ continue
}
pset.Remove(policyName)
// User is from STS if the cred are temporary
|
fix: do not return an error on expired credentials (#<I>)
policy might have an associated mapping with an expired
user key, do not return an error during DeletePolicy
for such situations - proceed normally as its an
expected situation.
|
minio_minio
|
train
|
go
|
93e128931f84ca1b921e1eb9ae4331fc207365d2
|
diff --git a/test/server/SimpleServer.js b/test/server/SimpleServer.js
index <HASH>..<HASH> 100644
--- a/test/server/SimpleServer.js
+++ b/test/server/SimpleServer.js
@@ -221,7 +221,7 @@ class SimpleServer {
return;
}
response.setHeader('Cache-Control', 'public, max-age=31536000');
- response.setHeader('Last-Modified', this._startTime.toString());
+ response.setHeader('Last-Modified', this._startTime.toISOString());
} else {
response.setHeader('Cache-Control', 'no-cache, no-store');
}
|
test: make tests work on non-English locales (#<I>)
`Data.prototype.toString` may return non-ASCII characters, which aren't accepted by `setHeader`.
E.g., on Russian locale, it might look like this:
```
> new Date().toString()
'Thu Jun <I> <I> <I>:<I>:<I> GMT<I> (Финляндия (лето))'
```
|
GoogleChrome_puppeteer
|
train
|
js
|
39a6d583e33f44a29026d2be90f0d8c72b7f8967
|
diff --git a/plugins/noembed/trumbowyg.noembed.js b/plugins/noembed/trumbowyg.noembed.js
index <HASH>..<HASH> 100644
--- a/plugins/noembed/trumbowyg.noembed.js
+++ b/plugins/noembed/trumbowyg.noembed.js
@@ -52,6 +52,10 @@
noembed: 'Incorporar',
noembedError: 'Erro'
},
+ ko: {
+ noembed: 'oEmbed 넣기',
+ noembedError: '에러'
+ },
},
plugins: {
|
feat: add korean translation to noembed plugin
|
Alex-D_Trumbowyg
|
train
|
js
|
877cf7baa90ef67b2d07fde7dc3faad8d642e221
|
diff --git a/tests/test_api.py b/tests/test_api.py
index <HASH>..<HASH> 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -206,6 +206,7 @@ class TestHttpRunner(ApiServerUnittest):
log_file_path = os.path.join(os.getcwd(), 'reports', "test_log_file.log")
runner = HttpRunner(failfast=True, log_file=log_file_path)
runner.run(self.testcase_cli_path)
+ time.sleep(1)
self.assertTrue(os.path.isfile(log_file_path))
os.remove(log_file_path)
|
fix: sleep 1 sec to wait log handler
|
HttpRunner_HttpRunner
|
train
|
py
|
2b84118f560754b28ee98c2eed406d6502ff0727
|
diff --git a/lib/find_process.js b/lib/find_process.js
index <HASH>..<HASH> 100644
--- a/lib/find_process.js
+++ b/lib/find_process.js
@@ -136,11 +136,12 @@ const finders = {
if ('pid' in cond) {
return row.ProcessId === String(cond.pid)
} else if (cond.name) {
+ const rowName = row.Name || '' // fix #40
if (cond.strict) {
- return row.Name === cond.name || (row.Name.endsWith('.exe') && row.Name.slice(0, -4) === cond.name)
+ return rowName === cond.name || (rowName.endsWith('.exe') && rowName.slice(0, -4) === cond.name)
} else {
// fix #9
- return matchName(row.CommandLine || row.Name, cond.name)
+ return matchName(row.CommandLine || rowName, cond.name)
}
} else {
return true
@@ -152,7 +153,7 @@ const finders = {
// uid: void 0,
// gid: void 0,
bin: row.ExecutablePath,
- name: row.Name,
+ name: row.Name || '',
cmd: row.CommandLine
}))
resolve(list)
|
fix: fix undefined issue #<I>
|
yibn2008_find-process
|
train
|
js
|
bfd76b99d6e7c1cbe85c61036c6df16ba63c0755
|
diff --git a/tasks/bump.js b/tasks/bump.js
index <HASH>..<HASH> 100644
--- a/tasks/bump.js
+++ b/tasks/bump.js
@@ -50,6 +50,8 @@ module.exports = function(grunt) {
// increment the version
var pkg = grunt.file.readJSON(grunt.config('pkgFile'));
var previousVersion = pkg.version;
+ var minor = parseInt(previousVersion.split('.')[1], 10);
+ var branch = (minor % 2) ? 'master' : 'stable';
var newVersion = pkg.version = bumpVersion(previousVersion, type);
// write updated package.json
@@ -67,7 +69,7 @@ module.exports = function(grunt) {
'Changes committed');
run('git tag -a v' + newVersion + ' -m "Version ' + newVersion + '"', 'New tag "v' +
newVersion + '" created');
- run('git push upstream master --tags', 'Pushed to github');
+ run('git push upstream ' + branch + ' --tags', 'Pushed to github');
});
|
chore(release): push to correct branch (master/stable)
|
karma-runner_karma
|
train
|
js
|
79826b21a4bf417d86315739ffd376a1890bff39
|
diff --git a/tests/test_data_cloud.py b/tests/test_data_cloud.py
index <HASH>..<HASH> 100644
--- a/tests/test_data_cloud.py
+++ b/tests/test_data_cloud.py
@@ -52,7 +52,7 @@ def _should_test_gcp():
try:
check_output(['gcloud', 'auth', 'activate-service-account',
'--key-file', creds])
- except CalledProcessError:
+ except (CalledProcessError, FileNotFoundError):
return False
return True
|
test: gcp: handle FileNotFoundError
|
iterative_dvc
|
train
|
py
|
f0bc51f912079600d4895ed71d2a26689cef09b1
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -13,14 +13,15 @@ export default (env, options) => {
Object.keys(env).forEach(key => {
debug(`key "${key}" before type was ${typeof env[key]}`);
- env[key] = parseKey(env[key], key);
- debug(`key "${key}" after type was ${typeof env[key]}`);
-
- if (envOptions.assignToProcessEnv === true) {
- if (envOptions.overrideProcessEnv === true) {
- process.env[key] = env[key] || process.env[key];
- } else {
- process.env[key] = process.env[key] || env[key];
+ if (env[key]) {
+ env[key] = parseKey(env[key], key);
+ debug(`key "${key}" after type was ${typeof env[key]}`);
+ if (envOptions.assignToProcessEnv === true) {
+ if (envOptions.overrideProcessEnv === true) {
+ process.env[key] = env[key] || process.env[key];
+ } else {
+ process.env[key] = process.env[key] || env[key];
+ }
}
}
});
|
fix: added null condition check (closes #<I>)
|
niftylettuce_dotenv-parse-variables
|
train
|
js
|
ce5ffc55799340c47e95b89ab62dbd56ddd26c65
|
diff --git a/test/hccrawler/index.test.js b/test/hccrawler/index.test.js
index <HASH>..<HASH> 100644
--- a/test/hccrawler/index.test.js
+++ b/test/hccrawler/index.test.js
@@ -619,7 +619,7 @@ describe('HCCrawler', () => {
describe('when an image is responded after the timeout option', () => {
beforeEach(() => {
- this.server.setContent('/', `<body><img src="${PREFIX}/empty.png"></body>`);
+ this.server.setContent('/', `<body><div style="background-image: url('${PREFIX}/empty.png');"></body>`);
this.server.setContent('/empty.png', '');
this.server.setResponseDelay('/empty.png', 200);
});
|
test(hccrawler): use background image for domcontentloaded tests
|
yujiosaka_headless-chrome-crawler
|
train
|
js
|
56968fb1fb454ed592d98cc978deda8f1eb936b1
|
diff --git a/src/Passport/Client.php b/src/Passport/Client.php
index <HASH>..<HASH> 100644
--- a/src/Passport/Client.php
+++ b/src/Passport/Client.php
@@ -69,4 +69,14 @@ class Client extends Model
{
return $this->personal_access_client || $this->password_client;
}
+
+ /**
+ * Determine if the client should skip the authorization prompt.
+ *
+ * @return bool
+ */
+ public function skipsAuthorization()
+ {
+ return false;
+ }
}
|
fix: for designmynight/dmn#<I> fix issue with missing function
|
designmynight_laravel-mongodb-passport
|
train
|
php
|
da1f6e06f3a3bb5aef06a4dcfa4cf6cb81b0c93f
|
diff --git a/wdiffhtml/__init__.py b/wdiffhtml/__init__.py
index <HASH>..<HASH> 100644
--- a/wdiffhtml/__init__.py
+++ b/wdiffhtml/__init__.py
@@ -46,7 +46,7 @@ def wdiff(settings, wrap_with_html=False, fold_breaks=False):
`<br />` tags.
"""
- diff = generate_wdiff(settings.org_file, settings.new_file)
+ diff = generate_wdiff(settings.org_file, settings.new_file, fold_breaks)
if wrap_with_html:
return wrap_content(diff, settings, fold_breaks)
else:
|
fix: `generate_wdiff` call
|
brutus_wdiffhtml
|
train
|
py
|
ec5b9d3a00420c0dafcd0bca5c6a5127b812b6da
|
diff --git a/gruntfile.js b/gruntfile.js
index <HASH>..<HASH> 100644
--- a/gruntfile.js
+++ b/gruntfile.js
@@ -16,8 +16,7 @@ module.exports = function(grunt) {
jshint: {
all: [
'Gruntfile.js',
- 'tasks/*.js',
- '<%= nodeunit.tests %>'
+ 'tasks/*.js'
],
options: {
jshintrc: '.jshintrc'
|
chore: Remoe bad jshint files
|
iVantage_grunt-ivantage-svn-release
|
train
|
js
|
47b4ff945a0fbc01fa863cdb22d1f5e08439cd16
|
diff --git a/src/Tasks/Engines/DoormanRunner.php b/src/Tasks/Engines/DoormanRunner.php
index <HASH>..<HASH> 100644
--- a/src/Tasks/Engines/DoormanRunner.php
+++ b/src/Tasks/Engines/DoormanRunner.php
@@ -103,6 +103,11 @@ class DoormanRunner extends BaseRunner implements TaskRunnerEngine
$manager->setLogPath($logPath);
}
+ $phpBinary = Environment::getEnv('SS_DOORMAN_PHPBINARY');
+ if ($phpBinary && is_executable($phpBinary)) {
+ $manager->setBinary($phpBinary);
+ }
+
// Assign default rules
$defaultRules = $this->getDefaultRules();
|
feat: Allow ProcessManager PHP binary to be configurable via environment variable using Doorman.
|
symbiote_silverstripe-queuedjobs
|
train
|
php
|
a3477cf7bad59f508ce906a51a2ede49704f8128
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,4 +1,4 @@
-import { withTranslation, Trans } from 'react-i18next'
+import { withTranslation, useTranslation, Trans } from 'react-i18next'
import hoistNonReactStatics from 'hoist-non-react-statics'
import createConfig from './config/create-config'
@@ -27,9 +27,12 @@ export default class NextI18Next {
withTranslation(namespace, options)(Component), Component)
const nextI18NextInternals = { config: this.config, i18n: this.i18n }
- this.Trans = Trans
this.Link = withInternals(Link, nextI18NextInternals)
this.Router = wrapRouter(nextI18NextInternals)
+
+ /* Directly export `react-i18next` methods */
+ this.Trans = Trans
+ this.useTranslation = useTranslation
}
}
|
feat: Add useTranslation (#<I>)
|
isaachinman_next-i18next
|
train
|
js
|
9afe5fa7afbf3f143dd2b8d293be59f572a14c79
|
diff --git a/interfaces/python/infomap.py b/interfaces/python/infomap.py
index <HASH>..<HASH> 100644
--- a/interfaces/python/infomap.py
+++ b/interfaces/python/infomap.py
@@ -118,7 +118,7 @@ def _construct_args(
DeprecationWarning,
)
- if not include_self_links:
+ if include_self_links is not None and not include_self_links:
args += " --no-self-links"
if no_self_links:
|
fix(python): no_self_links was always set unless include_self_links=True
|
mapequation_infomap
|
train
|
py
|
1c763f87b58efb307b72e7dc038a5fc7ba45f8c2
|
diff --git a/packages/react/src/components/DatePicker/DatePicker.js b/packages/react/src/components/DatePicker/DatePicker.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/DatePicker/DatePicker.js
+++ b/packages/react/src/components/DatePicker/DatePicker.js
@@ -383,6 +383,13 @@ export default class DatePicker extends Component {
}
}
+ componentDidUpdate({ dateFormat: prevDateFormat }) {
+ const { dateFormat } = this.props;
+ if (this.cal && prevDateFormat !== dateFormat) {
+ this.cal.set({ dateFormat });
+ }
+ }
+
componentWillUnmount() {
if (this.cal) {
this.cal.destroy();
|
fix(date-picker): support changing date format (#<I>)
This change allows change in `dateFormat` prop after initialization
reflected correctly to the underlying Flatpickr.
|
carbon-design-system_carbon-components
|
train
|
js
|
3261f7f710c151b40ad5fca88b8fb95519da0612
|
diff --git a/test.go b/test.go
index <HASH>..<HASH> 100644
--- a/test.go
+++ b/test.go
@@ -176,11 +176,11 @@ func ThreadSafeAddTest(s Storage) func(*testing.T) {
func BucketInstanceConsistencyTest(s Storage) func(*testing.T) {
return func(t *testing.T) {
// Create two bucket instances pointing to the same remote bucket
- bucket1, err := s.Create("testbucket", 5, time.Millisecond)
+ bucket1, err := s.Create("testbucket", 5, time.Second)
if err != nil {
t.Fatal(err)
}
- bucket2, err := s.Create("testbucket", 5, time.Millisecond)
+ bucket2, err := s.Create("testbucket", 5, time.Second)
if err != nil {
t.Fatal(err)
}
|
test: expire slower for more consistency
|
Clever_leakybucket
|
train
|
go
|
bf2030d0b54d678b8b1d27e9d55003dd1fc38806
|
diff --git a/src/foremast/configs/prepare_configs.py b/src/foremast/configs/prepare_configs.py
index <HASH>..<HASH> 100644
--- a/src/foremast/configs/prepare_configs.py
+++ b/src/foremast/configs/prepare_configs.py
@@ -42,7 +42,7 @@ def process_git_configs(git_short=''):
collections.defaultdict: Configurations stored for each environment
found.
"""
- LOG.info('Processing application.json files from GitLab.')
+ LOG.info('Processing application.json files from GitLab "%s".', git_short)
server = gitlab.Gitlab(GIT_URL, token=GITLAB_TOKEN)
|
feat: Include short Git name in INFO
|
foremast_foremast
|
train
|
py
|
d80854aa1c65a0bc02ef422c5eb5a6130ef5a96b
|
diff --git a/src/state.js b/src/state.js
index <HASH>..<HASH> 100644
--- a/src/state.js
+++ b/src/state.js
@@ -172,7 +172,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
var name = state.name;
if (!isString(name) || name.indexOf('@') >= 0) throw new Error("State must have a valid name");
- if (states.hasOwnProperty(name)) throw new Error("State '" + name + "'' is already defined");
+ if (states.hasOwnProperty(name)) throw new Error("State '" + name + "' is already defined");
// Get parent name
var parentName = (name.indexOf('.') !== -1) ? name.substring(0, name.lastIndexOf('.'))
|
chore(state): remove unnecessary character
- Remove unnecessary `'` character
Closes #<I>
|
ui-router_angular
|
train
|
js
|
50bec41726392b333610204e410a4d5a19f23eee
|
diff --git a/java-cloudbuild/synth.py b/java-cloudbuild/synth.py
index <HASH>..<HASH> 100644
--- a/java-cloudbuild/synth.py
+++ b/java-cloudbuild/synth.py
@@ -17,6 +17,8 @@
import synthtool.gcp as gcp
import synthtool.languages.java as java
+AUTOSYNTH_MULTIPLE_COMMITS = True
+
gapic = gcp.GAPICGenerator()
service='devtools-cloudbuild'
|
chore: enable context aware commits (#<I>)
|
googleapis_google-cloud-java
|
train
|
py
|
6b387614825528e0f7f57d7af2de3352bc8637c7
|
diff --git a/ecommerce_worker/configuration/base.py b/ecommerce_worker/configuration/base.py
index <HASH>..<HASH> 100644
--- a/ecommerce_worker/configuration/base.py
+++ b/ecommerce_worker/configuration/base.py
@@ -70,7 +70,7 @@ SITE_OVERRIDES = None
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2021-02-09
# .. toggle_target_removal_date: None
-# .. toggle_warnings: None
+# .. toggle_warning: None
# .. toggle_tickets: ENT-4071
BRAZE = {
'BRAZE_ENABLE': False,
|
refactor: rename toggle_warnings to toggle_warning (#<I>)
Rename toggle_warnings to toggle_warning for consistency
with setting_warning.
|
edx_ecommerce-worker
|
train
|
py
|
451f3d2f5fae5d153d337f00e35be9571638101c
|
diff --git a/packages/@vue/cli/lib/GeneratorAPI.js b/packages/@vue/cli/lib/GeneratorAPI.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli/lib/GeneratorAPI.js
+++ b/packages/@vue/cli/lib/GeneratorAPI.js
@@ -283,7 +283,7 @@ class GeneratorAPI {
this._injectFileMiddleware(async (files) => {
const data = this._resolveData(additionalData)
const globby = require('globby')
- const _files = await globby(['**/*'], { cwd: source })
+ const _files = await globby(['**/*'], { cwd: source, dot: true })
for (const rawPath of _files) {
const targetPath = rawPath.split('/').map(filename => {
// dotfiles are ignored when published to npm, therefore in templates
|
feat: make globby includes dot files (#<I>)
<URL>
|
vuejs_vue-cli
|
train
|
js
|
aad190360b5f8261588026cf36e4ae780a868c5b
|
diff --git a/base.php b/base.php
index <HASH>..<HASH> 100644
--- a/base.php
+++ b/base.php
@@ -45,7 +45,7 @@ final class Base extends Prefab implements ArrayAccess {
//@{ Framework details
const
PACKAGE='Fat-Free Framework',
- VERSION='3.7.3-Release';
+ VERSION='3.7.4-Dev';
//@}
//@{ HTTP status codes (RFC 2616)
@@ -1376,7 +1376,7 @@ final class Base extends Prefab implements ArrayAccess {
if ($this->hive['CLI'])
echo PHP_EOL.'==================================='.PHP_EOL.
'ERROR '.$error['code'].' - '.$error['status'].PHP_EOL.
- $error['text'].PHP_EOL.PHP_EOL.$error['trace'];
+ $error['text'].PHP_EOL.PHP_EOL.(isset($error['trace']) ?: '');
else
echo $this->hive['AJAX']?
json_encode($error):
|
fix: trace not present in error handler when in CLI mode and !DEBUG, #<I>
|
bcosca_fatfree-core
|
train
|
php
|
03fd54eeebd08e6586697e1abc051bd903a040f2
|
diff --git a/packages/vaex-core/vaex/cpu.py b/packages/vaex-core/vaex/cpu.py
index <HASH>..<HASH> 100644
--- a/packages/vaex-core/vaex/cpu.py
+++ b/packages/vaex-core/vaex/cpu.py
@@ -334,7 +334,10 @@ class TaskPartAggregations:
N = i2 - i1
if filter_mask is not None:
- N = filter_mask.astype(np.uint8).sum()
+ if blocks:
+ N = len(blocks[0])
+ else:
+ N == filter_mask.sum()
blocks = [array_types.to_numpy(block, strict=False) for block in blocks]
for block in blocks:
assert len(block) == N, f'Oops, got a block of length {len(block)} while it is expected to be of length {N} (at {i1}-{i2}, filter={filter_mask is not None})'
|
perf: avoid counting filtered rows
|
vaexio_vaex
|
train
|
py
|
1b0ee33ff051ae754cc72bb3c39aca24bd4b5c1d
|
diff --git a/packages/build-tools/svgo-plugins.js b/packages/build-tools/svgo-plugins.js
index <HASH>..<HASH> 100644
--- a/packages/build-tools/svgo-plugins.js
+++ b/packages/build-tools/svgo-plugins.js
@@ -83,9 +83,6 @@ module.exports = [
moveGroupAttrsToElems: true,
},
{
- collapseGroups: true,
- },
- {
removeRasterImages: false,
},
{
|
chore: don't collapse SVG groups in SVGO and instead just stick to using the default SVGO config for this
|
bolt-design-system_bolt
|
train
|
js
|
d95c8378ebaaf8dcfcc5220236bd00b9095a9de4
|
diff --git a/lib/Service/Application.js b/lib/Service/Application.js
index <HASH>..<HASH> 100644
--- a/lib/Service/Application.js
+++ b/lib/Service/Application.js
@@ -16,7 +16,7 @@ module.exports = function(di, config) {
methods: ['GET', 'POST', 'PATCH', 'DELETE', 'OPTIONS']
}));
- app.use(require('../express/response/helpers')({continue: false}));
+ app.use(require('../express/response/helpers')({continue: true}));
app.use(bodyParser.json({type: '*/*'}));
|
fix: no debug response in REST, invalid continue option in Service/Application
|
alekzonder_maf
|
train
|
js
|
78e1c4cf63a8553bde45cdb0bae0db90e0c3bdfb
|
diff --git a/packages/@vue/cli-service/lib/Service.js b/packages/@vue/cli-service/lib/Service.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-service/lib/Service.js
+++ b/packages/@vue/cli-service/lib/Service.js
@@ -189,7 +189,7 @@ module.exports = class Service {
}
plugins = plugins.concat(files.map(file => ({
id: `local:${file}`,
- apply: loadModule(file, this.pkgContext)
+ apply: loadModule(`./${file}`, this.pkgContext)
})))
}
|
fix: fix resolve project local plugin's file path (#<I>)
|
vuejs_vue-cli
|
train
|
js
|
76162dd25770fbc3e877a74867f997912e6681c0
|
diff --git a/packages/react/src/components/DataTable/DataTable-story.js b/packages/react/src/components/DataTable/DataTable-story.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/DataTable/DataTable-story.js
+++ b/packages/react/src/components/DataTable/DataTable-story.js
@@ -349,7 +349,6 @@ export const WithCheckmarkColumns = () => {
className={`la-${cell.info.header}`}>
<Checkbox
id={'check-' + cell.id}
- checked={cell.value}
hideLabel
labelText="checkbox"
/>
|
docs(data-table): switch checkboxes to uncontrolled (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
583f00ce317dfb4c2c6c4df4bd4694c6f0b0bf18
|
diff --git a/aiogram/types/base.py b/aiogram/types/base.py
index <HASH>..<HASH> 100644
--- a/aiogram/types/base.py
+++ b/aiogram/types/base.py
@@ -211,6 +211,15 @@ class TelegramObject(ContextInstanceMixin, metaclass=MetaTelegramObject):
"""
return self.as_json()
+ def __repr__(self) -> str:
+ """
+ Return object readable representation.
+
+ Example: <ObjectName {"id": 123456}>
+ :return: object class name and object data as a string
+ """
+ return f"<{type(self).__name__} {self}>"
+
def __getitem__(self, item: typing.Union[str, int]) -> typing.Any:
"""
Item getter (by key)
|
feat: TelegramObject readable representation (#<I>)
|
aiogram_aiogram
|
train
|
py
|
ca8fd588052a92397f6d643a6c519957433a5cbf
|
diff --git a/unit/manager.go b/unit/manager.go
index <HASH>..<HASH> 100644
--- a/unit/manager.go
+++ b/unit/manager.go
@@ -161,6 +161,10 @@ func (m *SystemdManager) removeUnit(name string) {
log.Printf("Unlinking systemd unit %s from target %s", name, m.Target.Name())
link := m.getLocalPath(path.Join(m.Target.Name()+".wants", name))
syscall.Unlink(link)
+
+ file := m.getLocalPath(name)
+ log.Printf("Removing systemd unit file %s", file)
+ syscall.Unlink(file)
}
func (m *SystemdManager) readUnit(name string) (string, error) {
|
fix(agent): Unlink unit files when jobs are stopped
|
coreos_fleet
|
train
|
go
|
f19760a63b66746b50157768fca57a66845dbf37
|
diff --git a/src/Textfield.js b/src/Textfield.js
index <HASH>..<HASH> 100644
--- a/src/Textfield.js
+++ b/src/Textfield.js
@@ -64,7 +64,7 @@ class Textfield extends React.Component {
const { className, inputClassName, id,
error, expandable, expandableIcon,
floatingLabel, label, maxRows,
- rows, style, ...otherProps } = this.props;
+ rows, style, children, ...otherProps } = this.props;
const hasRows = !!rows;
const customId = id || `textfield-${label.replace(/[^a-z0-9]/gi, '')}`;
@@ -97,12 +97,14 @@ class Textfield extends React.Component {
{labelContainer}
{errorContainer}
</div>
+ {children}
</div>
) : (
<div className={containerClasses} style={style}>
{input}
{labelContainer}
{errorContainer}
+ {children}
</div>
);
}
|
feat(Textfield): Render `children` as last element to ease customization of the Textfield by client code. (#<I>)
SEE Make Textfield render children #<I>
|
tleunen_react-mdl
|
train
|
js
|
4c4ba1953abac0a0b7e9c0f8c64aba7fa1f94234
|
diff --git a/lib/agent.js b/lib/agent.js
index <HASH>..<HASH> 100644
--- a/lib/agent.js
+++ b/lib/agent.js
@@ -61,6 +61,8 @@ module.exports = {
request: dispatchFromAgent('request'),
stream: dispatchFromAgent('stream'),
pipeline: dispatchFromAgent('pipeline'),
+ connect: dispatchFromAgent('connect'),
+ upgrade: dispatchFromAgent('upgrade'),
setGlobalAgent,
Agent
}
|
feat: add connect and upgrade to global methods
|
mcollina_undici
|
train
|
js
|
b82a6738e3fb2e43738c1f20093e7c5fceb3a830
|
diff --git a/add-commands.js b/add-commands.js
index <HASH>..<HASH> 100644
--- a/add-commands.js
+++ b/add-commands.js
@@ -1,4 +1,4 @@
// this file is here so it's easy to register the commands
-// `import 'cypress-testing-library/add-commands'`
+// `import '@testing-library/cypress/add-commands'`
// eslint-disable-next-line
require('./dist/add-commands')
|
chore: update comment in add-commands (#<I>)
|
testing-library_cypress-testing-library
|
train
|
js
|
7e6c9eeb3888a70b95cb05edbef944e8cf949094
|
diff --git a/test/transports.browser.js b/test/transports.browser.js
index <HASH>..<HASH> 100644
--- a/test/transports.browser.js
+++ b/test/transports.browser.js
@@ -168,7 +168,9 @@ describe('transports', () => {
})
})
- it('many writes', (done) => {
+ it('many writes', function (done) {
+ this.timeout(10000)
+
nodeA.dialProtocol(peerB, '/echo/1.0.0', (err, conn) => {
expect(err).to.not.exist()
|
test: increase timeout for many writes
|
libp2p_js-libp2p
|
train
|
js
|
15d443762a9261cb65739b990eb84fe1064d16b2
|
diff --git a/src/main/java/org/casbin/jcasbin/util/Util.java b/src/main/java/org/casbin/jcasbin/util/Util.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/casbin/jcasbin/util/Util.java
+++ b/src/main/java/org/casbin/jcasbin/util/Util.java
@@ -232,7 +232,7 @@ public class Util {
String[] records = null;
if (s != null) {
try {
- CSVParser csvParser = CSVFormat.DEFAULT.parse(new StringReader(s));
+ CSVParser csvParser = CSVFormat.DEFAULT.withEscape('\\').parse(new StringReader(s));
List<CSVRecord> csvRecords = csvParser.getRecords();
records = new String[csvRecords.get(0).size()];
for (int i = 0; i < csvRecords.get(0).size(); i++) {
|
feat: support escape character in policy rule (#<I>)
|
casbin_jcasbin
|
train
|
java
|
e478abac72d66be9cb22998073b3bd4484ae2395
|
diff --git a/test/k8sT/DatapathConfiguration.go b/test/k8sT/DatapathConfiguration.go
index <HASH>..<HASH> 100644
--- a/test/k8sT/DatapathConfiguration.go
+++ b/test/k8sT/DatapathConfiguration.go
@@ -254,11 +254,10 @@ var _ = Describe("K8sDatapathConfig", func() {
Expect(testPodConnectivityAcrossNodes(kubectl)).Should(BeTrue(), "Connectivity test between nodes failed")
})
- It("Check vxlan connectivity with per endpoint routes", func() {
- Skip("Encapsulation mode is not supported with per-endpoint routes")
-
+ It("Check vxlan connectivity with per-endpoint routes", func() {
deploymentManager.DeployCilium(map[string]string{
- "global.autoDirectNodeRoutes": "true",
+ "global.tunnel": "vxlan",
+ "global.endpointRoutes.enabled": "true",
}, DeployCiliumOptionsAndDNS)
Expect(testPodConnectivityAcrossNodes(kubectl)).Should(BeTrue(), "Connectivity test between nodes failed")
|
test: Test for vxlan + per-endpoint routes
<I>a<I> ("datapath: Support enable-endpoint-routes with encapsulation")
enabled combining per-endpoint routes with vxlan encapsulation. This
commit adds a test for that setup.
|
cilium_cilium
|
train
|
go
|
ddf26361b08ab094b5c7a59968f6d7b179c0d9e1
|
diff --git a/src/core/hub.js b/src/core/hub.js
index <HASH>..<HASH> 100755
--- a/src/core/hub.js
+++ b/src/core/hub.js
@@ -1,5 +1,6 @@
import net from 'net';
import logger from 'winston';
+import {Config} from './config';
import {Socket} from './socket';
import {Profile} from './profile';
import {Balancer} from './balancer';
@@ -22,7 +23,10 @@ export class Hub {
_isClosed = false;
- constructor() {
+ constructor(config) {
+ if (config) {
+ Config.init(config);
+ }
this._hub = net.createServer();
this._hub.on('close', this.onClose.bind(this));
this._hub.on('connection', this.onConnect.bind(this));
|
chore(hub): allow pass config directly to contructor
|
blinksocks_blinksocks
|
train
|
js
|
141864917ac920a081df6f6b34c13ba83e660bbf
|
diff --git a/src/client/actions/UserUpdate.js b/src/client/actions/UserUpdate.js
index <HASH>..<HASH> 100644
--- a/src/client/actions/UserUpdate.js
+++ b/src/client/actions/UserUpdate.js
@@ -7,7 +7,7 @@ class UserUpdateAction extends Action {
handle(data) {
const client = this.client;
- const newUser = client.users.cache.get(data.id);
+ const newUser = data.id === client.user.id ? client.user : client.users.cache.get(data.id);
const oldUser = newUser._update(data);
if (!oldUser.equals(newUser)) {
|
fix(UserUpdateAction): rely on client.user when ids match (#<I>)
|
discordjs_discord.js
|
train
|
js
|
4390e8d56749c653d918522363331124935859d2
|
diff --git a/packages/build-tools/create-webpack-config.js b/packages/build-tools/create-webpack-config.js
index <HASH>..<HASH> 100644
--- a/packages/build-tools/create-webpack-config.js
+++ b/packages/build-tools/create-webpack-config.js
@@ -551,6 +551,7 @@ async function createWebpackConfig(buildConfig) {
},
plugins: [
new webpack.DefinePlugin(getGlobalJSData(true)),
+ new CopyWebpackPlugin(config.copy ? config.copy : []),
new MiniCssExtractPlugin({
filename: `[name]${langSuffix}.css`,
chunkFilename: `[id]${langSuffix}.css`,
|
fix: add copy plugin to modern JS build so that copy task runs in local dev mode
|
bolt-design-system_bolt
|
train
|
js
|
a2ff89e051f97ae4f08a5200da2e26b3eb6a111a
|
diff --git a/test/espower_option_test.js b/test/espower_option_test.js
index <HASH>..<HASH> 100644
--- a/test/espower_option_test.js
+++ b/test/espower_option_test.js
@@ -430,7 +430,7 @@ describe('sourceRoot option', function () {
function sourceRootTest (testName, config) {
it(testName, function () {
var jsCode = 'assert(falsyStr);';
- var jsAST = acorn.parse(jsCode, {ecmaVersion: 6, locations: true, sourceFile: config.path});
+ var jsAST = acorn.parse(jsCode, {ecmaVersion: 6, locations: true, sourceFile: config.incomingFilepath});
var espoweredAST = espower(jsAST, {
path: config.incomingFilepath,
sourceRoot: config.espowerSourceRoot
|
chore(espower): fix paths test that does not use `incomingFilepath`
|
power-assert-js_espower
|
train
|
js
|
54309deff0d3bbc30f0c2bd47b68a3e3931473a6
|
diff --git a/src/dawguk/GarminConnect/Connector.php b/src/dawguk/GarminConnect/Connector.php
index <HASH>..<HASH> 100755
--- a/src/dawguk/GarminConnect/Connector.php
+++ b/src/dawguk/GarminConnect/Connector.php
@@ -88,6 +88,9 @@ class Connector
$strUrl .= '?' . http_build_query($arrParams);
}
+ curl_setopt($this->objCurl, CURLOPT_HTTPHEADER, array(
+ 'NK: NT'
+ ));
curl_setopt($this->objCurl, CURLOPT_URL, $strUrl);
curl_setopt($this->objCurl, CURLOPT_FOLLOWLOCATION, (bool)$bolAllowRedirects);
curl_setopt($this->objCurl, CURLOPT_CUSTOMREQUEST, 'GET');
@@ -130,7 +133,6 @@ class Connector
if (! empty($arrParams)) {
$strUrl .= '?' . http_build_query($arrParams);
}
-
curl_setopt($this->objCurl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($this->objCurl, CURLOPT_HEADER, false);
curl_setopt($this->objCurl, CURLOPT_FRESH_CONNECT, true);
|
fix: <I> response code on get calls
|
dawguk_php-garmin-connect
|
train
|
php
|
fc7cfa4084883ffe3fffc81f27e2167140cf2baf
|
diff --git a/tasks/uncss-inline.js b/tasks/uncss-inline.js
index <HASH>..<HASH> 100644
--- a/tasks/uncss-inline.js
+++ b/tasks/uncss-inline.js
@@ -66,9 +66,8 @@ module.exports = function ( grunt ) {
throw error;
}
- // remove all `<style>` tags except the last one
- var styleTags = $('style');
- styleTags.slice(0, styleTags.length - 1).remove();
+ // remove all `<style>` tags except the first one
+ $('style').slice(1).remove();
$('style').text(output);
var html = $.html();
grunt.file.write( file.dest, html );
|
feat: preserve the first for final process
|
sparanoid_grunt-uncss-inline
|
train
|
js
|
900b7f977d02edc2a58ffad12a30128099f13c25
|
diff --git a/test/channel.spec.js b/test/channel.spec.js
index <HASH>..<HASH> 100644
--- a/test/channel.spec.js
+++ b/test/channel.spec.js
@@ -566,16 +566,18 @@ describe('Channel', function() {
let ch1 = new Channel(4);
let ch2 = new Channel(4);
let ch3 = new Channel(4);
+ let ch4 = new Channel(4);
for (let i = 0; i < 4; i++)
await ch1.put(i);
- ch1.pipe(ch2).pipe(ch3);
+ ch1.pipe(ch2).pipe(ch3).pipe(ch4);
ch1.close(true);
for (let i = 0; i < 4; i++)
- assert.equal(await ch3.take(), i);
- await ch3.done();
+ assert.equal(await ch4.take(), i);
+ await ch4.done();
assert.equal(ch1.state, STATES.ENDED);
assert.equal(ch2.state, STATES.ENDED);
assert.equal(ch3.state, STATES.ENDED);
+ assert.equal(ch4.state, STATES.ENDED);
});
});
|
test: extend full channel pipe close unit tests
Full channel pipe close now includes 4 pipes by default
in order to ensure that multiple internal pipes
will all be properly closed.
|
dvlsg_async-csp
|
train
|
js
|
77e2414489088d390de81ef3eb02314f6a5921b9
|
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
|
zabuldon_teslajsonpy
|
train
|
py
|
0243b14e30db91b04d4684aa0ddbde1a127ced7c
|
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>)
|
vuejs_vue-devtools
|
train
|
js
|
5fa250514d260b5189178bc8e5ff495fd8e782cf
|
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
|
sferik_rails_admin
|
train
|
rb
|
dbe38062010ef96a8a6232394b4b3fb0ad8b2494
|
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
|
pyannote_pyannote-metrics
|
train
|
py
|
285440727764881daaa2de106334e83078c5d33c
|
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
|
Vectrex_vxPHP
|
train
|
php
|
8283f46d0bd286e3c84245a94f360e683c153fd8
|
diff --git a/packages/@vue/cli/lib/util/configTransforms.js b/packages/@vue/cli/lib/util/configTransforms.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli/lib/util/configTransforms.js
+++ b/packages/@vue/cli/lib/util/configTransforms.js
@@ -13,7 +13,7 @@ const isObject = val => val && typeof val === 'object'
const transformJS = {
read: ({ filename, context }) => {
try {
- return loadModule(filename, context, true)
+ return loadModule(`./${filename}`, context, true)
} catch (e) {
return null
}
|
fix: fix config merging during `vue invoke` in Node.js <I> (#<I>)
The root cause here is the same as #<I>
The failing `loadModule` call will return `undefined` for a js config
read operation, which later caused config being overwritten.
|
vuejs_vue-cli
|
train
|
js
|
7ac2fe152ae01af98484d88e8c98c612bcb50573
|
diff --git a/src/services/search-builder.js b/src/services/search-builder.js
index <HASH>..<HASH> 100644
--- a/src/services/search-builder.js
+++ b/src/services/search-builder.js
@@ -152,7 +152,9 @@ function SearchBuilder(model, opts, params, fieldNamesRequested) {
if (!Number.isNaN(value)) {
if (Number.isInteger(value) && !Number.isSafeInteger(value)) {
- value = BigInt(params.search);
+ // NOTE: Numbers higher than MAX_SAFE_INTEGER need to be handled as
+ // strings to circumvent precision problems
+ value = params.search;
}
condition[field.field] = value;
|
fix(search): handle tables that contain floats and bigints
|
ForestAdmin_forest-express-sequelize
|
train
|
js
|
44edd17771a552b6f360f79b80a5c215db8573e1
|
diff --git a/packages/cozy-stack-client/src/AppCollection.js b/packages/cozy-stack-client/src/AppCollection.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-stack-client/src/AppCollection.js
+++ b/packages/cozy-stack-client/src/AppCollection.js
@@ -32,4 +32,24 @@ export default class AppCollection {
next: false
}
}
+
+ async find() {
+ throw new Error('find() method is not yet implemented')
+ }
+
+ async get() {
+ throw new Error('get() method is not yet implemented')
+ }
+
+ async create() {
+ throw new Error('create() method is not available for applications')
+ }
+
+ async update() {
+ throw new Error('update() method is not available for applications')
+ }
+
+ async destroy() {
+ throw new Error('destroy() method is not available for applications')
+ }
}
|
feat: ⚠️ Throw error for not available appcollection methods
|
cozy_cozy-client
|
train
|
js
|
fbaab99f791a383bf4ed4c2d0fa29336101baa3a
|
diff --git a/test-app/app/src/main/assets/internal/ts_helpers.js b/test-app/app/src/main/assets/internal/ts_helpers.js
index <HASH>..<HASH> 100644
--- a/test-app/app/src/main/assets/internal/ts_helpers.js
+++ b/test-app/app/src/main/assets/internal/ts_helpers.js
@@ -119,9 +119,10 @@
}
}
- global.__native = __native;
- global.__extends = __extends;
- global.__decorate = __decorate;
+ Object.defineProperty(global, "__native", { value: __native });
+ Object.defineProperty(global, "__extends", { value: __extends });
+ Object.defineProperty(global, "__decorate", { value: __decorate });
+
global.JavaProxy = JavaProxy;
global.Interfaces = Interfaces;
-})()
\ No newline at end of file
+})()
|
feat(typescript): Play nice with tslib (#<I>)
AngularApp started adding tslib in the web pack project.
This PR will set the __native, __extends and __decorate on the global using Object.defineProperty,
so the tslib won't be able to overwrite them.
Ideally adding tslib to a project should bring support for async/await etc.
|
NativeScript_android-runtime
|
train
|
js
|
2389cf3f9ea7f599faca8729583aa37d08c50883
|
diff --git a/lib/platform/github/gh-got-wrapper.js b/lib/platform/github/gh-got-wrapper.js
index <HASH>..<HASH> 100644
--- a/lib/platform/github/gh-got-wrapper.js
+++ b/lib/platform/github/gh-got-wrapper.js
@@ -11,7 +11,7 @@ function sleep(ms) {
async function get(path, opts, retries = 5) {
const method = opts && opts.method ? opts.method : 'get';
- logger.debug({ retries }, `${method.toUpperCase()} ${path}`);
+ logger.debug(`${method.toUpperCase()} ${path} [retries=${retries}]`);
if (method === 'get' && cache[path]) {
logger.debug({ path }, 'Returning cached result');
return cache[path];
|
fix: better retries log in github wrapper
|
renovatebot_renovate
|
train
|
js
|
ac3776ffbf764bc40bda24e84184146865d0a46d
|
diff --git a/.gitignore b/.gitignore
index <HASH>..<HASH> 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,4 @@ _testmain.go
*.test
*.prof
+/.idea
diff --git a/mock_test.go b/mock_test.go
index <HASH>..<HASH> 100644
--- a/mock_test.go
+++ b/mock_test.go
@@ -124,3 +124,11 @@ func TestTimerResets(t *testing.T) {
c.AddTime(3 * time.Millisecond)
assertGets(t, tm.Chan(), "expected timer to get after reset when interval is up after restarted")
}
+
+func TestTickerDeadlock(t *testing.T) { // fixes #6
+ c := NewMockClock()
+ tk := c.NewTicker(5 * time.Millisecond)
+ c.AddTime(6 * time.Millisecond)
+ time.Sleep(1 * time.Millisecond)
+ tk.Stop()
+}
diff --git a/ticker.go b/ticker.go
index <HASH>..<HASH> 100644
--- a/ticker.go
+++ b/ticker.go
@@ -27,7 +27,11 @@ func (m *mockTicker) wait() {
case <-m.stop:
return
case <-m.clock.After(delta):
- m.c <- m.clock.Now()
+ select {
+ case m.c <- m.clock.Now():
+ case <-m.stop:
+ return
+ }
}
}
}
|
fix(ticker): deadlock on Close()
|
mixer_clock
|
train
|
gitignore,go,go
|
85e9fe54c7af573f4280a4265c3c88cdb5e3ffae
|
diff --git a/util/settings/settings.go b/util/settings/settings.go
index <HASH>..<HASH> 100644
--- a/util/settings/settings.go
+++ b/util/settings/settings.go
@@ -368,7 +368,7 @@ const (
kustomizePathPrefixKey = "kustomize.path"
// anonymousUserEnabledKey is the key which enables or disables anonymous user
anonymousUserEnabledKey = "users.anonymous.enabled"
- // anonymousUserEnabledKey is the key which specifies token expiration duration
+ // userSessionDurationKey is the key which specifies token expiration duration
userSessionDurationKey = "users.session.duration"
// diffOptions is the key where diff options are configured
resourceCompareOptionsKey = "resource.compareoptions"
|
chore: fix typo in godoc string (#<I>)
While investigating how to disable the new terminal feature introduced in version <I>, came across this accidental copy/paste. Figured would boyscout it in.
|
argoproj_argo-cd
|
train
|
go
|
20e7a1bd04c6aaba77b79c494edb98f95c776597
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -57,18 +57,7 @@ function adminTasks() {
scss: pathto('stylesheets/scss/**/*.scss')
};
- gulp.task('jshint', function () {
- return gulp.src(scripts.all)
- .pipe(plugins.jshint())
- .pipe(plugins.jshint.reporter('default'));
- });
-
- gulp.task('jscs', function () {
- return gulp.src(scripts.all)
- .pipe(plugins.jscs());
- });
-
- gulp.task('qor', ['jshint', 'jscs'], function () {
+ gulp.task('qor', function () {
return gulp.src([scripts.qorInit,scripts.qor])
.pipe(plugins.concat('qor.js'))
.pipe(plugins.uglify())
|
fix(gulp): remove jshint and jscs for adminTask
|
qor_qor
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.