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 |
|---|---|---|---|---|---|
80580aa6e3fc7e0db869235d22e734db83ceb514
|
diff --git a/src/main/kernels.js b/src/main/kernels.js
index <HASH>..<HASH> 100644
--- a/src/main/kernels.js
+++ b/src/main/kernels.js
@@ -25,9 +25,6 @@ export function condaInfoObservable() {
.map(info => JSON.parse(info));
}
-// var condak = require('./src/notebook/epics/conda-kernel-provider-epic');
-// var envy = condak.condaEnvsObservable(condak.condaInfoObservable());
-
export function condaEnvsObservable(condaInfo$) {
return condaInfo$.map(info => {
const envs = info.envs.map(env => ({ name: path.basename(env), prefix: env }));
|
chore(rm): clean up misc. commented out code
|
nteract_nteract
|
train
|
js
|
fb06cc4aeffc08630c32a5af7e79dcdc4d19729b
|
diff --git a/src/index.esm.js b/src/index.esm.js
index <HASH>..<HASH> 100644
--- a/src/index.esm.js
+++ b/src/index.esm.js
@@ -14,6 +14,7 @@ export default {
export {
Store,
+ install,
mapState,
mapMutations,
mapGetters,
|
refactor: export `install` as named export for tree shaking (#<I>)
|
vuejs_vuex
|
train
|
js
|
d8f1d09b57f74c6ed4abb490c3d10fa48632cbaa
|
diff --git a/src/validations/base.js b/src/validations/base.js
index <HASH>..<HASH> 100644
--- a/src/validations/base.js
+++ b/src/validations/base.js
@@ -103,11 +103,6 @@ export default class BaseValidation {
}
listener (e) {
- if (e.relatedTarget
- && (e.relatedTarget.tagName === 'A' || e.relatedTarget.tagName === 'BUTTON')) {
- return
- }
-
if (this.guardValidate(e.target, e.type)) {
return
}
|
fix(validation): touched property issues
Closes #<I>
|
kazupon_vue-validator
|
train
|
js
|
d04ec3c3399883aa84ed7493c0e2e49160a9f6ec
|
diff --git a/flask_appbuilder/security/manager.py b/flask_appbuilder/security/manager.py
index <HASH>..<HASH> 100644
--- a/flask_appbuilder/security/manager.py
+++ b/flask_appbuilder/security/manager.py
@@ -618,13 +618,14 @@ class BaseSecurityManager(AbstractSecurityManager):
# for Okta
if provider == "okta":
me = self.appbuilder.sm.oauth_remotes[provider].get("userinfo")
- log.debug("User info from Okta: {0}".format(me.data))
+ data = me.json()
+ log.debug("User info from Okta: %s", data)
return {
- "username": "okta_" + me.data.get("sub", ""),
- "first_name": me.data.get("given_name", ""),
- "last_name": me.data.get("family_name", ""),
- "email": me.data.get("email", ""),
- "role_keys": me.data.get("groups", []),
+ "username": "okta_" + data.get("sub", ""),
+ "first_name": data.get("given_name", ""),
+ "last_name": data.get("family_name", ""),
+ "email": data.get("email", ""),
+ "role_keys": data.get("groups", []),
}
else:
return {}
|
fix: load user info for okta (#<I>)
|
dpgaspar_Flask-AppBuilder
|
train
|
py
|
e0cf23c4b3bfc9fede82b3bf5104163584269f10
|
diff --git a/pbxproj/__init__.py b/pbxproj/__init__.py
index <HASH>..<HASH> 100644
--- a/pbxproj/__init__.py
+++ b/pbxproj/__init__.py
@@ -27,4 +27,4 @@ from pbxproj.PBXRootObject import rootObject
from pbxproj.XcodeProject import XcodeProject
from pbxproj.pbxsections import *
-__version__ = '2.1.2'
+__version__ = '2.2.0'
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -45,7 +45,7 @@ setup(name='pbxproj',
]
},
url="http://github.com/kronenthaler/mod-pbxproj",
- version='2.1.2',
+ version='2.2.0',
license='MIT License',
install_requires=['openstep_parser', 'docopt', 'future'],
packages=find_packages(exclude=['tests']),
|
chore: pump version <I>
|
kronenthaler_mod-pbxproj
|
train
|
py,py
|
540c717f4757c5feffc8498ae09a43013ef59d7c
|
diff --git a/src/components/application-shell/application-shell.js b/src/components/application-shell/application-shell.js
index <HASH>..<HASH> 100644
--- a/src/components/application-shell/application-shell.js
+++ b/src/components/application-shell/application-shell.js
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
import { Router, Redirect, Route, Switch } from 'react-router-dom';
import { ApolloProvider } from 'react-apollo';
import { ReconfigureFlopFlip } from '@flopflip/react-broadcast';
-import { ConfigurationProvider } from '@commercetools-local/core/components/configuration';
import { joinPaths } from '@commercetools-local/utils/url';
import * as storage from '@commercetools-local/utils/storage';
import { DOMAINS, LOGOUT_REASONS } from '@commercetools-local/constants';
@@ -35,6 +34,7 @@ import IntercomUserTracker from '../intercom-user-tracker';
import IntercomBooter from '../intercom-booter';
// import VersionCheckSubscriber from '../version-check-subscriber';
import RequestsInFlightLoader from '../requests-in-flight-loader';
+import { ConfigurationProvider } from '../configuration-provider';
import PageRedirect from '../page-redirect';
import GtmUserTracker from '../gtm-user-tracker';
import GtmBooter from '../gtm-booter';
|
refactor(app-shell): re-wire configuration provider import
|
commercetools_merchant-center-application-kit
|
train
|
js
|
07495ab26dd415f127afa57b6a608c34118f9f81
|
diff --git a/components/form/formItem.js b/components/form/formItem.js
index <HASH>..<HASH> 100644
--- a/components/form/formItem.js
+++ b/components/form/formItem.js
@@ -218,6 +218,7 @@ export default class FormItem extends Intact {
// for select, the focusout event triggers before select
// so we put off validating it
setTimeout(() => {
+ if (this.destroyed) return;
this.validate()
}, 100);
}
|
fix(Form): disable validate on destroyed, close #<I>
|
ksc-fe_kpc
|
train
|
js
|
1be42436dcce24c096efa4f4a6fd287beaa63ade
|
diff --git a/vyper/context/types/value/array_value.py b/vyper/context/types/value/array_value.py
index <HASH>..<HASH> 100644
--- a/vyper/context/types/value/array_value.py
+++ b/vyper/context/types/value/array_value.py
@@ -66,7 +66,9 @@ class _ArrayValueDefinition(ValueTypeDefinition):
# enough additional slots to store the data if it uses the max available length
# because this data type is single-bytes, we make it so it takes the max 32 byte
# boundary as it's size, instead of giving it a size that is not cleanly divisble by 32
- return 32 + math.ceil(self.length / 32) * 32
+
+ # TODO adding 64 here instead of 32 to be compatible with parser - fix this!
+ return 64 + math.ceil(self.length / 32) * 32
@property
def canonical_type(self) -> str:
|
fix: add <I> bytes to size of Bytes and String for `parser` compatibility
|
ethereum_vyper
|
train
|
py
|
10a53b7f5dc54032fbaa5a73b04da3b9801953fe
|
diff --git a/superset-frontend/src/middleware/loggerMiddleware.js b/superset-frontend/src/middleware/loggerMiddleware.js
index <HASH>..<HASH> 100644
--- a/superset-frontend/src/middleware/loggerMiddleware.js
+++ b/superset-frontend/src/middleware/loggerMiddleware.js
@@ -116,7 +116,7 @@ const loggerMiddleware = store => next => action => {
};
}
- if (eventData.target_id && dashboardLayout.present) {
+ if (eventData.target_id && dashboardLayout?.present?.[eventData.target_id]) {
const { meta } = dashboardLayout.present[eventData.target_id];
// chart name or tab/header text
eventData.target_name = meta.chartId ? meta.sliceName : meta.text;
|
fix: Add extra check to loggerMiddleware (#<I>)
* Add extra check
* Update superset-frontend/src/middleware/loggerMiddleware.js
|
apache_incubator-superset
|
train
|
js
|
db00c874e04f8cc1daa4259b374781089d753bad
|
diff --git a/service/ImageUploader.php b/service/ImageUploader.php
index <HASH>..<HASH> 100644
--- a/service/ImageUploader.php
+++ b/service/ImageUploader.php
@@ -137,7 +137,10 @@ class ImageUploader
*/
private function getUniqueName($fileName)
{
- return microtime(true) . strtolower(preg_replace('/([A-Z]+)/', "-$1", urlencode($fileName)));
+ $prefix = preg_replace('/[^0-9]/', '', microtime(true));
+ $name = preg_replace('/([A-Z]+)/', "-$1", pathinfo($fileName, PATHINFO_FILENAME));
+ $extension = pathinfo($fileName, PATHINFO_EXTENSION);
+ return $prefix . strtolower($name . '.' . $extension);
}
|
fix: get unique name (fixes uppercased file extensions & creates nicer file name)
|
fluid-cms_admin-module
|
train
|
php
|
2f6d53d840cf373606891fc8008489fb04091194
|
diff --git a/src/Structure.php b/src/Structure.php
index <HASH>..<HASH> 100644
--- a/src/Structure.php
+++ b/src/Structure.php
@@ -203,7 +203,7 @@ class Structure
*/
public function getData()
{
- foreach ($this->data as $key => $value) {
+ foreach ($this->data as $value) {
$this->validateDefinitions($value);
}
return $this->data;
@@ -314,6 +314,15 @@ class Structure
}
/**
+ * Get structure version for compatibility.
+ * @return int
+ */
+ public function getVersion()
+ {
+ return 3;
+ }
+
+ /**
* Return a legacy type for the given node.
* @param NodePath $nodePath
* @return string
@@ -420,7 +429,7 @@ class Structure
public function load(array $definitions)
{
$this->data = $definitions;
- foreach ($definitions as $key => $value) {
+ foreach ($definitions as $value) {
$this->validateDefinitions($value);
}
}
|
fix: cs issues
feat: add version method
|
keboola_php-jsonparser
|
train
|
php
|
a7af0ed4b8d2710b92395b241cb891cf24ca03e2
|
diff --git a/packages/components/bolt-video/src/video.standalone.js b/packages/components/bolt-video/src/video.standalone.js
index <HASH>..<HASH> 100644
--- a/packages/components/bolt-video/src/video.standalone.js
+++ b/packages/components/bolt-video/src/video.standalone.js
@@ -599,28 +599,11 @@ class BoltVideo extends withPreact {
}
this.hasInitialized = true;
-
- if (this.offsetHeight) {
- // Set flag so that video will not be re-initialized unnecessarily on update()
- this.removeAttribute('will-update', '');
- } else {
- // If not visible, add attribute so that it can be found by other components and updated manually.
- this.setAttribute('will-update', '');
- }
} catch (error) {
console.log(error);
}
}
- update() {
- // Brightcove doesn't have a simple "reset/update" method that I could find, so we must dispose and reinit
- if (this.player) {
- this.player.dispose();
- this.hasInitialized = false;
- this.triggerUpdate();
- }
- }
-
rendered() {
super.rendered && super.rendered();
|
fix: remove original fix for loading hidden videos, not necessary anymore, actually causing new bug
|
bolt-design-system_bolt
|
train
|
js
|
c517125ea169f081202ca1639521d7f7732e66b0
|
diff --git a/agent.go b/agent.go
index <HASH>..<HASH> 100644
--- a/agent.go
+++ b/agent.go
@@ -79,9 +79,6 @@ type sandbox struct {
sync.RWMutex
id string
- running bool
- noPivotRoot bool
- enableGrpcTrace bool
containers map[string]*container
channel channel
network network
@@ -94,6 +91,9 @@ type sandbox struct {
deviceWatchers map[string](chan string)
sharedUTSNs namespace
sharedIPCNs namespace
+ running bool
+ noPivotRoot bool
+ enableGrpcTrace bool
sandboxPidNs bool
}
|
ci: Refactor to pass metalinter checks
Refactor for struct checks.
|
kata-containers_agent
|
train
|
go
|
58e1e0268861802c2613d7fa346e6059af450428
|
diff --git a/etcd/etcd.go b/etcd/etcd.go
index <HASH>..<HASH> 100644
--- a/etcd/etcd.go
+++ b/etcd/etcd.go
@@ -233,6 +233,6 @@ func (e *Etcd) Stop() {
// ReadyNotify returns a channel that is going to be closed
// when the etcd instance is ready to accept connections.
-func (e *Etcd) ReadyNotify() chan bool {
+func (e *Etcd) ReadyNotify() <-chan bool {
return e.readyC
}
|
refactor(main): return only receiving channel from Etcd.ReadyNotify()
|
etcd-io_etcd
|
train
|
go
|
f0370d9542d75b7ff166429578f60d64097fe945
|
diff --git a/tests/package.js b/tests/package.js
index <HASH>..<HASH> 100644
--- a/tests/package.js
+++ b/tests/package.js
@@ -25,6 +25,8 @@ Package.onTest(function(api) {
api.use('angular:angular@1.4.8', 'client');
api.use('isobuild:compiler-plugin@1.0.0');
+ api.use('mdg:camera@1.1.5');
+
api.addFiles([
'../dist/angular-meteor.js'
], 'client');
@@ -39,4 +41,14 @@ Package.onTest(function(api) {
api.addFiles([
'collections.js'
], 'client', 'server');
+
+ // legacy
+ api.addFiles([
+ // auxiliary
+ 'integration/auxiliary/test_data.js',
+ 'integration/auxiliary/matchers.js',
+ // modules
+ 'integration/pre1.3/angular-meteor-get-updates-spec.js',
+ 'integration/pre1.3/angular-meteor-diff-array-spec.js'
+ ], 'client');
});
|
chore: add missing tests of getUpdates and diffArray
|
Urigo_angular-meteor
|
train
|
js
|
f81e08a84cb6b24348d2bd7695ad498c72a1b8a7
|
diff --git a/packages/razzle/scripts/start.js b/packages/razzle/scripts/start.js
index <HASH>..<HASH> 100755
--- a/packages/razzle/scripts/start.js
+++ b/packages/razzle/scripts/start.js
@@ -133,6 +133,13 @@ function main() {
logger.error(err);
}
});
+
+ ['SIGINT', 'SIGTERM'].forEach(sig => {
+ process.on(sig, () => {
+ clientDevServer.close();
+ });
+ });
+
resolve();
}
);
|
fix(razzle): make sure client dev server closes
|
jaredpalmer_razzle
|
train
|
js
|
e05a4e19822eea3fbf3aa9369bbb9ec8fb6588b1
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -26,7 +26,7 @@ module.exports = function(grunt) {
},
travis: {
singleRun: true,
- browsers: ['sl_chorme', 'sl_firefox', 'sl_opera', 'sl_safari', 'sl_ie10', 'sl_iphone'],
+ browsers: ['sl_safari', 'sl_ie10', 'sl_iphone'],
// global config for SauceLabs
sauceLabs: {
username: process.env.SAUCE_USERNAME,
|
fix: left three most buggy browsers due to parallelization limit
|
flowjs_flow.js
|
train
|
js
|
7f3bdec250fef0a4415d9f25af9823354f5e3fdb
|
diff --git a/src/__tests__/fixtures/eval-macro.js b/src/__tests__/fixtures/eval-macro.js
index <HASH>..<HASH> 100644
--- a/src/__tests__/fixtures/eval-macro.js
+++ b/src/__tests__/fixtures/eval-macro.js
@@ -1 +1 @@
-module.exports = require('./eval.macro.js')
+module.exports = require('./eval.macro')
|
chore: fix build
Probably the new kcd-scripts introduced new lint rule or something. Lack
of lockfile made build less reproducible.
|
kentcdodds_babel-plugin-macros
|
train
|
js
|
d3cae937583492d6e4d6dfef2841984e92a94505
|
diff --git a/update-server/otupdate/balena/__main__.py b/update-server/otupdate/balena/__main__.py
index <HASH>..<HASH> 100644
--- a/update-server/otupdate/balena/__main__.py
+++ b/update-server/otupdate/balena/__main__.py
@@ -14,8 +14,6 @@ def main():
parser.add_argument('--host', dest='host', type=str, default='127.0.0.1')
parser.add_argument('--test', action='store_true')
parser.add_argument('--debug', action='store_true')
- parser.add_argument('--with-migration',
- dest='with_migration', action='store_true')
args = parser.parse_args()
if sys.platform == 'win32':
@@ -59,5 +57,5 @@ def main():
update_package=update_package,
smoothie_version=smoothie_version,
test=args.test,
- with_migration=args.with_migration)
+ with_migration=True)
web.run_app(app, host=args.host, port=args.port)
|
feat(update-server): Default buildroot migration to available (#<I>)
The buildroot migration process is no longer gated behind a feature flag.
|
Opentrons_opentrons
|
train
|
py
|
6ae31751c3439f1d5bf34a7625aa79532592843f
|
diff --git a/jose/jws.py b/jose/jws.py
index <HASH>..<HASH> 100644
--- a/jose/jws.py
+++ b/jose/jws.py
@@ -208,8 +208,11 @@ def _load(jwt):
def _sig_matches_keys(keys, signing_input, signature, alg):
for key in keys:
key = jwk.construct(key, alg)
- if key.verify(signing_input, signature):
- return True
+ try:
+ if key.verify(signing_input, signature):
+ return True
+ except:
+ pass
return False
|
fix: Handler errors in list of keys
|
mpdavis_python-jose
|
train
|
py
|
7363d2a8113d035f48ac7fc2a664fa3bc506b9b6
|
diff --git a/src/__tests__/parse-test.js b/src/__tests__/parse-test.js
index <HASH>..<HASH> 100644
--- a/src/__tests__/parse-test.js
+++ b/src/__tests__/parse-test.js
@@ -73,7 +73,7 @@ describe('parse', () => {
}
});
- it('supports custom parserOptions', () => {
+ it('supports custom parserOptions with plugins', () => {
expect(() =>
parse('const chained: Type = 1;', () => {}, null, {
parserOptions: {
@@ -85,4 +85,14 @@ describe('parse', () => {
}),
).toThrowError(/.*Unexpected token \(1:13\).*/);
});
+
+ it('supports custom parserOptions without plugins', () => {
+ expect(() =>
+ parse('const chained: Type = 1;', () => {}, null, {
+ parserOptions: {
+ allowSuperOutsideMethod: true,
+ },
+ }),
+ ).toThrowError(ERROR_MISSING_DEFINITION);
+ });
});
|
test: Add test for parserOptions without plugins
|
reactjs_react-docgen
|
train
|
js
|
e80ad164d03eba2bdffaf5434d6e2254a6716a65
|
diff --git a/src/network.js b/src/network.js
index <HASH>..<HASH> 100644
--- a/src/network.js
+++ b/src/network.js
@@ -163,6 +163,7 @@ module.exports = class NetworkWrapper {
if (err) return next(response)
// then we can rebuffer the request
loggerHttp(`Re-buffering call to ${httpOpts.url} since authenticated now`)
+ httpOpts.headers.Authorization = `Bearer ${this.tokens.access_token}`
return this._axios.request(httpOpts).then(successNext).catch(next)
})
})
|
fix: replay request on access token expires
The HTTP headers were not updated with the new access_token when
replaying the request, so the request failed again.
|
keymetrics_pm2-io-js-api
|
train
|
js
|
aa1a563ab55743af4ad814d9ef4554fa0a557a72
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -64,6 +64,7 @@ setup(
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
],
keywords="pandas data-science data-analysis python jupyter ipython",
long_description=long_description,
|
chore: add python <I> support
|
pandas-profiling_pandas-profiling
|
train
|
py
|
43ee4867fd0588435d50f9b428375285c6b66a22
|
diff --git a/webapps/ui/cockpit/plugins/base/app/views/processInstance/variableInstancesTab.js b/webapps/ui/cockpit/plugins/base/app/views/processInstance/variableInstancesTab.js
index <HASH>..<HASH> 100644
--- a/webapps/ui/cockpit/plugins/base/app/views/processInstance/variableInstancesTab.js
+++ b/webapps/ui/cockpit/plugins/base/app/views/processInstance/variableInstancesTab.js
@@ -278,7 +278,7 @@ module.exports = function(ngModule) {
return variableService
.count(countParams)
.then(function(response) {
- $scope.total = response.count;
+ $scope.total = response;
// get variables objects
return variableService
.instances(params)
|
fix(cockpit): show variable count in runtime view
|
camunda_camunda-bpm-platform
|
train
|
js
|
326acc90c5b09e8f4f254d54b8914fab05c8ceaf
|
diff --git a/src/Service/CategoryModel.php b/src/Service/CategoryModel.php
index <HASH>..<HASH> 100644
--- a/src/Service/CategoryModel.php
+++ b/src/Service/CategoryModel.php
@@ -5,7 +5,7 @@ namespace Miaoxing\Category\Service;
use Miaoxing\Category\Metadata\CategoryTrait;
use Miaoxing\Plugin\Model\CastTrait;
use Miaoxing\Plugin\Model\GetSetTrait;
-use Miaoxing\Plugin\Model\QuickQueryTrait;
+use Miaoxing\Plugin\Model\ReqQueryTrait;
/**
* CategoryModel
@@ -14,7 +14,7 @@ class CategoryModel extends Category
{
use CategoryTrait;
use CastTrait;
- use QuickQueryTrait;
+ use ReqQueryTrait;
use GetSetTrait;
protected $table = 'category';
|
refactor: quickQuery => reqQuery
|
miaoxing_category
|
train
|
php
|
626b3af0ed1e3a4ca2ea598bb4ab6917830d3136
|
diff --git a/__tests__/situation/mousemove.js b/__tests__/situation/mousemove.js
index <HASH>..<HASH> 100644
--- a/__tests__/situation/mousemove.js
+++ b/__tests__/situation/mousemove.js
@@ -12,7 +12,7 @@ describe("chimee's binder", () => {
// 编解码容器
box: 'native',
// dom容器
- wrapper: 'body',
+ wrapper: document.body,
plugin: [],
events: {},
});
|
test: finish situation/mousemove unit test recovery
|
Chimeejs_chimee
|
train
|
js
|
a65808c2311055b79dc0fd3b0dae5252bf82c99c
|
diff --git a/packages/node_modules/@webex/internal-plugin-services/test/integration/spec/services.js b/packages/node_modules/@webex/internal-plugin-services/test/integration/spec/services.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/internal-plugin-services/test/integration/spec/services.js
+++ b/packages/node_modules/@webex/internal-plugin-services/test/integration/spec/services.js
@@ -28,8 +28,8 @@ describe('plugin-services', () => {
}, 3000);
}))
.then(() => webex.internal.device.register())
- .then(() => services.updateServices('userId', webexUser.id))
- .then(() => services.waitUntilReady()));
+ .then(() => services.waitUntilReady())
+ .then(() => services.updateServices('userId', webexUser.id)));
describe('#status', () => {
it('updates ready when services ready', () => {
|
fix(internal-plugin-services): update before each int test
Update before each int test to run limited catalog request
after authed catalog request.
|
webex_spark-js-sdk
|
train
|
js
|
8d66a84e021662830b20ff697ef603f86c5d36df
|
diff --git a/lib/pact/consumer_contract/interaction.rb b/lib/pact/consumer_contract/interaction.rb
index <HASH>..<HASH> 100644
--- a/lib/pact/consumer_contract/interaction.rb
+++ b/lib/pact/consumer_contract/interaction.rb
@@ -5,7 +5,7 @@ module Pact
class Interaction
include ActiveSupportSupport
- attr_accessor :description, :request, :response, :provider_state, :provider_states, :metadata
+ attr_accessor :description, :request, :response, :provider_state, :provider_states, :metadata, :_id
def initialize attributes = {}
@description = attributes[:description]
@@ -14,6 +14,7 @@ module Pact
@provider_state = attributes[:provider_state] || attributes[:providerState]
@provider_states = attributes[:provider_states]
@metadata = attributes[:metadata]
+ @_id = attributes[:_id]
end
def self.from_hash hash, options = {}
|
feat: parse interaction _id from Pact Broker
|
pact-foundation_pact-support
|
train
|
rb
|
b1d1ef9bca25333e58b8da4002f5e8eb215b810c
|
diff --git a/test/hyperbahn/hyperbahn-down.js b/test/hyperbahn/hyperbahn-down.js
index <HASH>..<HASH> 100644
--- a/test/hyperbahn/hyperbahn-down.js
+++ b/test/hyperbahn/hyperbahn-down.js
@@ -93,6 +93,13 @@ function runTests(HyperbahnCluster) {
});
var attempts = 0;
+ var start = Date.now();
+
+ var gap = {
+ 0: [0, 10],
+ 1: [200, 225],
+ 2: [1200, 1250]
+ };
client.on('error', onError);
client.on('advertise-attempt', onAdvertisementAttempt);
@@ -103,6 +110,10 @@ function runTests(HyperbahnCluster) {
}
function onAdvertisementAttempt() {
+ var delta = Date.now() - start;
+ assert.ok(gap[attempts][0] < delta);
+ assert.ok(delta < gap[attempts][1]);
+
if (++attempts < 3) {
return;
}
|
test: verify that we have backoff
|
uber_tchannel-node
|
train
|
js
|
aa05c926a5f7e69eb54fa8042dcfc1f5b4684ea2
|
diff --git a/View.php b/View.php
index <HASH>..<HASH> 100644
--- a/View.php
+++ b/View.php
@@ -19,17 +19,43 @@ class View
/**
* Make a view
*
- * @param string $path
- * @param array $data
- * @return void
+ * @param string $path
+ * @param array $data
+ * @param bool $return
+ * @return mixed
*/
public static function make(string $path, array $data = [], bool $return = false)
{
$path = self::getPath($path);
+
+ /**
+ * Render error page if this is a whoops call
+ */
+ if (self::isCalledByWhoops()) {
+ return Accessor::view($path, $data, $return)->render();
+ }
+
return Accessor::view($path, $data, $return);
}
/**
+ * Check if this is an exception
+ *
+ * @return bool
+ */
+ public static function isCalledByWhoops() : bool
+ {
+ /**
+ * Get trace
+ */
+ $trace = debug_backtrace();
+
+ $trace = end($trace);
+
+ return isset($trace['class']) && $trace['class'] == 'Whoops\Run';
+ }
+
+ /**
* Render a new view
*
* @return string
|
feat: render error page if this is a whoops call
|
modulusphp_utility
|
train
|
php
|
19f362eb62c7d725ab78bdcb8e7d4dc447c7ee2e
|
diff --git a/views/js/qtiCreator/widgets/interactions/uploadInteraction/states/Question.js b/views/js/qtiCreator/widgets/interactions/uploadInteraction/states/Question.js
index <HASH>..<HASH> 100644
--- a/views/js/qtiCreator/widgets/interactions/uploadInteraction/states/Question.js
+++ b/views/js/qtiCreator/widgets/interactions/uploadInteraction/states/Question.js
@@ -63,11 +63,11 @@ define([
// THEN only -- Any kind of file -- is shown in the selection box.
types[0].selected = true;
} else {
- for (let i in types) {
- if (_.indexOf(preselected, types[i].mime) >= 0) {
- types[i].selected = true;
+ types.forEach(type => {
+ if (preselected.indexOf(type.mime) >= 0) {
+ type.selected = true;
}
- }
+ });
}
$form.html(
|
fix: refactor code forEach, indexOf
|
oat-sa_extension-tao-itemqti
|
train
|
js
|
ee24fb50eefc2cb860d2c2fb6557ab184523c509
|
diff --git a/memote/suite/cli/runner.py b/memote/suite/cli/runner.py
index <HASH>..<HASH> 100644
--- a/memote/suite/cli/runner.py
+++ b/memote/suite/cli/runner.py
@@ -179,7 +179,6 @@ def new(directory, replay):
def _test_history(model, solver, manager, commit, pytest_args, skip):
model = callbacks.validate_model(None, "model", model)
model.solver = solver
- # TODO: This needs to be restructured to use an SQLite database.
_, result = api.test_model(
model, results=True, pytest_args=pytest_args, skip=skip)
manager.store(result, commit=commit)
|
chore: remove comment since SQL is handled now
|
opencobra_memote
|
train
|
py
|
45561b5ee7189e3721ca9bb48583f09415df790e
|
diff --git a/pyxmpp2/mainloop/poll.py b/pyxmpp2/mainloop/poll.py
index <HASH>..<HASH> 100644
--- a/pyxmpp2/mainloop/poll.py
+++ b/pyxmpp2/mainloop/poll.py
@@ -63,7 +63,12 @@ class PollMainLoop(MainLoopBase):
fileno = handler.fileno()
if old_fileno is not None and fileno != old_fileno:
del self._handlers[old_fileno]
- self.poll.unregister(old_fileno)
+ try:
+ self.poll.unregister(old_fileno)
+ except KeyError:
+ # The socket has changed, but the old one isn't registered,
+ # e.g. ``prepare`` wants to connect again
+ pass
if not prepared:
self._unprepared_handlers[handler] = fileno
if not fileno:
|
fix: a socket may be unregistered when not registered
If a connection failed (e.g. network unreachable because no IPv6 access
available), the socket will change, but not the handler.
|
Jajcus_pyxmpp2
|
train
|
py
|
65ca3d9ed56932245b7719d7e3259f5a88d36cf3
|
diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb
index <HASH>..<HASH> 100644
--- a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb
+++ b/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb
@@ -135,7 +135,7 @@ module Google
synchronize do
return {} if @register.empty?
reg = @register
- @register = Concurrent::Map.new
+ @register = {}
reg
end
|
refactor(pubsub): Only set @register to a Hash
pr: #<I>
|
googleapis_google-cloud-ruby
|
train
|
rb
|
595929db69ff7ad2749a96882fb29e6eeacd6ae0
|
diff --git a/packages/tiptap-extensions/src/nodes/Blockquote.js b/packages/tiptap-extensions/src/nodes/Blockquote.js
index <HASH>..<HASH> 100644
--- a/packages/tiptap-extensions/src/nodes/Blockquote.js
+++ b/packages/tiptap-extensions/src/nodes/Blockquote.js
@@ -20,8 +20,8 @@ export default class Blockquote extends Node {
}
}
- commands({ type, schema }) {
- return () => toggleWrap(type, schema.nodes.paragraph)
+ commands({ type }) {
+ return () => toggleWrap(type)
}
keys({ type }) {
|
fix: blockquote unwrap not working
Closes #<I>
|
scrumpy_tiptap
|
train
|
js
|
11716cb636192994e4dcd3d996274a6735aa30d7
|
diff --git a/build/tasks/ci.js b/build/tasks/ci.js
index <HASH>..<HASH> 100644
--- a/build/tasks/ci.js
+++ b/build/tasks/ci.js
@@ -1,4 +1,4 @@
var gulp = require('gulp');
// gulp.task('ci', ['default', 'coveralls']);
-gulp.task('ci', 'default');
+gulp.task('ci', ['default']);
|
chore(ci-build-task): changed ci task to try travis
|
aurelia-ui-toolkits_aurelia-materialize-bridge
|
train
|
js
|
4b2004c1d307c6714952fa4858065d8d719d01a4
|
diff --git a/api/src/opentrons/protocol_api/protocol_context.py b/api/src/opentrons/protocol_api/protocol_context.py
index <HASH>..<HASH> 100644
--- a/api/src/opentrons/protocol_api/protocol_context.py
+++ b/api/src/opentrons/protocol_api/protocol_context.py
@@ -676,7 +676,11 @@ class ProtocolContext(CommandPublisher):
@property # type: ignore
@requires_version(2, 0)
def fixed_trash(self) -> Labware:
- """ The trash fixed to slot 12 of the robot deck. """
+ """ The trash fixed to slot 12 of the robot deck.
+
+ It has one well and should be accessed like labware in your protocol.
+ e.g. ``protocol.fixed_trash['A1']``
+ """
trash = self._deck_layout['12']
if not trash:
raise RuntimeError("Robot must have a trash container in 12")
|
docs(api): explain trash has a well (#<I>)
explain trash has a well and how to use it in pipette commands
|
Opentrons_opentrons
|
train
|
py
|
75cd6a46c79658ff36a9a7912f0c9681bdbd4042
|
diff --git a/src/Strain.js b/src/Strain.js
index <HASH>..<HASH> 100644
--- a/src/Strain.js
+++ b/src/Strain.js
@@ -12,9 +12,9 @@
const URI = require('uri-js');
const YAML = require('yaml');
-const YAML_MAP = require('yaml/map').default;
-const YAML_PAIR = require('yaml/pair').default;
-const YAML_SEQ = require('yaml/seq').default;
+const YAML_MAP = require('yaml/map');
+const YAML_PAIR = require('yaml/pair');
+const YAML_SEQ = require('yaml/seq');
const GitUrl = require('./GitUrl.js');
const Origin = require('./Origin.js');
|
chore(strains): adjust for changed exports
|
adobe_helix-shared
|
train
|
js
|
6e3121e966e054077e940e46decef8c332271ae8
|
diff --git a/docgen/plugins/documentationjs-data.js b/docgen/plugins/documentationjs-data.js
index <HASH>..<HASH> 100644
--- a/docgen/plugins/documentationjs-data.js
+++ b/docgen/plugins/documentationjs-data.js
@@ -80,7 +80,7 @@ function mapConnectors(connectors, symbols, files) {
function mapWidgets(widgets, symbols, files) {
return forEach(widgets, symbol => {
- console.log(symbol.name);
+ // console.log(symbol.name);
const fileName = `widgets/${symbol.name}.html`;
const symbolWithRelatedType = {
@@ -124,7 +124,12 @@ function findRelatedTypes(functionSymbol, symbols) {
const isCustomType = currentTypeName && currentTypeName !== 'Object' && currentTypeName[0] === currentTypeName[0].toUpperCase();
if (isCustomType) {
const typeSymbol = find(symbols, {name: currentTypeName});
- types = [...types, typeSymbol];
+ if(!typeSymbol) console.warn('Undefined type: ', currentTypeName);
+ else {
+ types = [...types, typeSymbol];
+ // iterate over each property to get their types
+ forEach(typeSymbol.properties, p => findParamsTypes(p));
+ }
}
}
};
|
fix(documentationjs): deeper related types
|
algolia_instantsearch.js
|
train
|
js
|
4709c6a308080a32a89bf7edba4515ddc17242f5
|
diff --git a/lib/truncate.js b/lib/truncate.js
index <HASH>..<HASH> 100644
--- a/lib/truncate.js
+++ b/lib/truncate.js
@@ -239,8 +239,7 @@ function contextLength (path, opts) {
case 'tags':
return opts.truncateKeywordsAt
-
- default:
- return opts.truncateStringsAt
}
+
+ return opts.truncateStringsAt
}
|
fix(truncate): ensure context truncate has max (#<I>)
|
elastic_apm-nodejs-http-client
|
train
|
js
|
fac9c613f4fd43da8ddfbcc3a24d8113e6758b2b
|
diff --git a/dev/test/cypress/plugins/index.js b/dev/test/cypress/plugins/index.js
index <HASH>..<HASH> 100644
--- a/dev/test/cypress/plugins/index.js
+++ b/dev/test/cypress/plugins/index.js
@@ -17,7 +17,7 @@ const getDbConnectionConfig = () => {
host: process.env.MYSQL_HOST,
user: process.env.MYSQL_USER,
password: process.env.MYSQL_PASSWORD,
- database: process.env.MYSQL_TEST_DATABASE
+ database: process.env.MYSQL_DATABASE
};
};
|
fix(cypress): fix db connection object SUITEDEV-<I>
|
emartech_magento2-extension
|
train
|
js
|
4b87290b2ae29de7279a4f68a6286a0571db4c10
|
diff --git a/anytemplate/utils.py b/anytemplate/utils.py
index <HASH>..<HASH> 100644
--- a/anytemplate/utils.py
+++ b/anytemplate/utils.py
@@ -75,7 +75,8 @@ def chaincalls(callables, obj):
3
"""
for fun in callables:
- assert callable(fun), "%s is not callable object!" % str(fun)
+ if not callable(fun):
+ raise ValueError("Not callable: %r" % repr(fun))
obj = fun(obj)
return obj
|
refactor: raise ValueError instead of AssertionError in .utils.chaincalls
|
ssato_python-anytemplate
|
train
|
py
|
bc1a397bd1e23acae5e7aeb1a1fb4280818c372f
|
diff --git a/src/lib/ToastContainer.js b/src/lib/ToastContainer.js
index <HASH>..<HASH> 100644
--- a/src/lib/ToastContainer.js
+++ b/src/lib/ToastContainer.js
@@ -139,11 +139,10 @@ export default class ToastContainer extends Component {
}
render() {
- const divProps = _.omit(this.props, [`toastType`, `toastMessageFactory`, `preventDuplicates`,
- `newestOnTop`]);
+ const {toastType, toastMessageFactory, preventDuplicates, newestOnTop, ...restProps} = this.props;
return (
- <div {...divProps} aria-live="polite" role="alert">
+ <div {...restProps} aria-live="polite" role="alert">
{this.state.toasts.map(toast => this.props.toastMessageFactory(toast))}
</div>
);
|
fix(ToastContainer): replace _.omit with object rest
* Original commit: ca<I>f0b<I>e<I>c<I>a7c<I>f<I>e<I>
* Original
|
tomchentw_react-toastr
|
train
|
js
|
65070be5f0e29c8c817d62f7492e5a2cc80c3d5f
|
diff --git a/classes/hypeJunction/Prototyper/Elements/CategoryField.php b/classes/hypeJunction/Prototyper/Elements/CategoryField.php
index <HASH>..<HASH> 100644
--- a/classes/hypeJunction/Prototyper/Elements/CategoryField.php
+++ b/classes/hypeJunction/Prototyper/Elements/CategoryField.php
@@ -42,7 +42,7 @@ class CategoryField extends RelationshipField {
/**
* {@inheritdoc}
*/
- public function getDataType() {
+ public static function getDataType() {
return 'category';
}
|
fix(categories): fix category input class
|
hypeJunction_hypePrototyper
|
train
|
php
|
51d246f408980e56f9e28b815486cc1fad3815ae
|
diff --git a/src/components/tabs/__tests__/CdrTabs.spec.js b/src/components/tabs/__tests__/CdrTabs.spec.js
index <HASH>..<HASH> 100644
--- a/src/components/tabs/__tests__/CdrTabs.spec.js
+++ b/src/components/tabs/__tests__/CdrTabs.spec.js
@@ -168,7 +168,7 @@ describe('CdrTabs.vue', () => {
wrapper.vm.activeTabIndex = 1;
// Trigger resize event
wrapper.vm.$nextTick(() => {
- wrapper.vm.$refs.cdrTabsHeader.children[0].dispatchEvent(new Event('click'));
+ wrapper.vm.$refs.cdrTabsHeader.children[0].children[0].dispatchEvent(new Event('click'));
// Due to debounce function, must use timeout
setTimeout(() => {
expect(wrapper.vm.activeTabIndex).toBe(1);
|
refactor(tabs): added unit test coverage
affects: @rei/cdr-tabs
|
rei_rei-cedar
|
train
|
js
|
a73a6be42d8a0d6968a8dd4581330e1d5e959029
|
diff --git a/test/travis-only.test.js b/test/travis-only.test.js
index <HASH>..<HASH> 100644
--- a/test/travis-only.test.js
+++ b/test/travis-only.test.js
@@ -23,7 +23,7 @@ test.serial('not create a dev certificate on production also with ssl specified'
const {server, url} = await listen(
'./fixture', {h: 'localhost', p: port(), ssl: true}
);
- const res = await t.throws(get(human, url, '/something'));
+ const res = await t.throwsAsync(() => get(human, url, '/something'));
t.is(res.response, undefined);
const resHTTP = await get(human, url.replace('https', 'http'), '/something');
|
chore: fix throws method for ava
|
LasaleFamine_http-server-pwa
|
train
|
js
|
616e0dd3984ac175e1333e949aac091c21fd5cb8
|
diff --git a/src/structures/Message.js b/src/structures/Message.js
index <HASH>..<HASH> 100644
--- a/src/structures/Message.js
+++ b/src/structures/Message.js
@@ -166,7 +166,7 @@ class Message {
const clone = Util.cloneObject(this);
this._edits.unshift(clone);
- if ('editedTimestamp' in data) this.editedTimestamp = new Date(data.edited_timestamp).getTime();
+ if ('edited_timestamp' in data) this.editedTimestamp = new Date(data.edited_timestamp).getTime();
if ('content' in data) this.content = data.content;
if ('pinned' in data) this.pinned = data.pinned;
if ('tts' in data) this.tts = data.tts;
|
fix(Message): properly check for an edited_timestamp in patch
Fixes #<I>
|
discordjs_discord.js
|
train
|
js
|
45dbc9e02056c62d795063c281e1f76162e3a3af
|
diff --git a/packages/react/src/components/Tile/Tile.js b/packages/react/src/components/Tile/Tile.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/Tile/Tile.js
+++ b/packages/react/src/components/Tile/Tile.js
@@ -124,6 +124,7 @@ export class ClickableTile extends Component {
} = this.props;
const classes = classNames(
+ `${prefix}--link`,
`${prefix}--tile`,
`${prefix}--tile--clickable`,
{
|
fix(tile): add link class to clickable tile (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
b13754debb71194ceb3c99b179a4ebc2f5d3947b
|
diff --git a/stream-promise.js b/stream-promise.js
index <HASH>..<HASH> 100644
--- a/stream-promise.js
+++ b/stream-promise.js
@@ -28,6 +28,7 @@ class StreamPromise extends FunStream {
this[STREAM] = new PassThrough(Object.assign({objectMode: true}, this[OPTS]))
this[PROMISE].then(promised => {
const srcStream = fun(is.plainObject(promised) ? [promised] : promised)
+ if (promised == null) srcStream.end()
return StreamPromise.isFun(srcStream) ? srcStream.pipe(this) : this.pipe(srcStream)
}).catch(err => this.emit('error', err))
}
|
fix(stream-promise): empty promises should end their streams
|
iarna_funstream
|
train
|
js
|
5cdb6783edd4e14323276bdb14fb5bcac077d469
|
diff --git a/lib/state_machines/matcher_helpers.rb b/lib/state_machines/matcher_helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/state_machines/matcher_helpers.rb
+++ b/lib/state_machines/matcher_helpers.rb
@@ -46,7 +46,7 @@ module StateMachines
# In the above example, +same+ will match whichever the from state is. In
# the case of the +ignite+ event, it is essential the same as the following:
#
- # transition :parked => :parked, :first_gear => :first_gear
+ # transition :idling => :idling, :first_gear => :first_gear
def same
LoopbackMatcher.instance
end
|
docs: fix example for the `same` helper method (#<I>) [ci skip]
|
state-machines_state_machines
|
train
|
rb
|
82ac6191d76d240b426a283ae32189c2b9f60cd8
|
diff --git a/pakefile_bootstrap.php b/pakefile_bootstrap.php
index <HASH>..<HASH> 100644
--- a/pakefile_bootstrap.php
+++ b/pakefile_bootstrap.php
@@ -59,7 +59,9 @@ if ( !function_exists( 'pake_exception_default_handler' ) )
}
}
set_exception_handler( 'pake_exception_default_handler' );
-mb_internal_encoding( 'utf-8' );
+if (function_exists('mb_internal_encoding')) {
+ mb_internal_encoding( 'utf-8' );
+}
// take over display of help - in case we want to modify some of it
function run_help( $task=null, $args=array(), $cliopts=array() )
|
fix: mbstring is optional
|
gggeek_ezextensionbuilder
|
train
|
php
|
1d7b44a07ccf8064aebb0cb31c8703a43c016a77
|
diff --git a/languagetool-standalone/src/main/java/org/languagetool/gui/Main.java b/languagetool-standalone/src/main/java/org/languagetool/gui/Main.java
index <HASH>..<HASH> 100644
--- a/languagetool-standalone/src/main/java/org/languagetool/gui/Main.java
+++ b/languagetool-standalone/src/main/java/org/languagetool/gui/Main.java
@@ -1100,8 +1100,8 @@ public final class Main {
public void actionPerformed(ActionEvent e) {
try {
addLanguage();
- } catch (InstantiationException | IllegalAccessException ex) {
- throw new RuntimeException(ex);
+ } catch (Exception ex) {
+ Tools.showError(ex);
}
}
}
|
fix: loading an invalid rule file printed the error only to stdout instead of showing a dialog
|
languagetool-org_languagetool
|
train
|
java
|
578167fd9fff35be9e1eda2f4ff43df3b93d42fa
|
diff --git a/webapps/grunt/config/less.js b/webapps/grunt/config/less.js
index <HASH>..<HASH> 100644
--- a/webapps/grunt/config/less.js
+++ b/webapps/grunt/config/less.js
@@ -27,12 +27,12 @@ module.exports = function(config, lessConfig, pathConfig) {
options: {
paths: includePaths,
- compress: true,
+ compress: false,
sourceMap: true,
- sourceMapFilename: (pathConfig.plugin ? 'plugin' : 'styles') + '.css.map',
- sourceMapURL: (pathConfig.plugin ? 'plugin' : 'styles') + '.css.map',
- sourceMapFileInline: false
+ sourceMapFilename: outputFilepath + '.map',
+ sourceMapURL: './' + (pathConfig.plugin ? 'plugin' : 'styles') + '.css.map',
+ sourceMapFileInline: true
},
files: file
};
@@ -46,12 +46,12 @@ module.exports = function(config, lessConfig, pathConfig) {
options: {
paths: includePaths,
- compress: true,
+ compress: false,
sourceMap: true,
- sourceMapFilename: 'styles-components.css.map',
+ sourceMapFilename: outputFilepath + '.map',
sourceMapURL: './styles-components.css.map',
- sourceMapFileInline: false
+ sourceMapFileInline: true
},
files: file
};
|
fix(less-build): correct the source map paths
Related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
js
|
7d9052d5c31a30eba289817372870c90361ca91f
|
diff --git a/app/lib/quasar-config.js b/app/lib/quasar-config.js
index <HASH>..<HASH> 100644
--- a/app/lib/quasar-config.js
+++ b/app/lib/quasar-config.js
@@ -386,7 +386,8 @@ class QuasarConfig {
// special case where a component can be designated for a framework > config prop
if (cfg.framework.importStrategy === 'auto' && cfg.framework.config && cfg.framework.config.loading) {
const component = cfg.framework.config.loading.spinner
- if (component !== void 0) {
+ // Is a component and is a QComponent
+ if (component !== void 0 && /^(Q[A-Z]|q-)/.test(component) === true) {
cfg.framework.components.push(component)
}
}
|
fix(app): Custom Loading not working in the newest version #<I> (#<I>)
|
quasarframework_quasar
|
train
|
js
|
169d53b6ac5857fc6181c38e868a2d1f13250317
|
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 ace from 'ace'; // eslint-disable-line
+import ace from 'brace'; // eslint-disable-line
import extend from 'lodash/extend';
import debounce from 'lodash/debounce';
import DiffMatchPatch from 'diff-match-patch';
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -28,7 +28,7 @@ module.exports = {
],
},
externals: {
- ace: {
+ brace: {
commonjs: 'brace',
commonjs2: 'brace',
amd: 'brace',
|
chore(build): use brace as a default package
|
ace-diff_ace-diff
|
train
|
js,js
|
55a428f430c309342be0ade17b56dbb809788337
|
diff --git a/ui/src/components/tabs/QTabs.js b/ui/src/components/tabs/QTabs.js
index <HASH>..<HASH> 100644
--- a/ui/src/components/tabs/QTabs.js
+++ b/ui/src/components/tabs/QTabs.js
@@ -180,6 +180,11 @@ export default defineComponent({
}
function updateContainer (domSize) {
+ // it can be called faster than component being initialized
+ // so we need to protect against that case
+ // (one example of such case is the docs release notes page)
+ if (domProps.value === void 0) { return }
+
const
size = domSize[ domProps.value.container ],
scrollSize = Math.min(
|
fix(QTabs): protect updateContainer() against being executed too early
|
quasarframework_quasar
|
train
|
js
|
ee289552fe0045e3f22cfab128ececf9c585a3ea
|
diff --git a/tests/test_corpora.py b/tests/test_corpora.py
index <HASH>..<HASH> 100644
--- a/tests/test_corpora.py
+++ b/tests/test_corpora.py
@@ -3,7 +3,6 @@
# Author: Arne Neumann <discoursegraphs.programming@arne.cl>
from copy import deepcopy
-from multiprocessing import Process
import pkgutil
from tempfile import NamedTemporaryFile, mkdtemp
@@ -19,7 +18,9 @@ def test_pcc():
create document graphs for all PCC documents containing all annotation
layers and test them for cyclicity.
"""
- def convert_pcc_doc(doc_id):
+ assert len(pcc.document_ids) == 176
+
+ for doc_id in pcc.document_ids:
docgraph = pcc[doc_id]
assert isinstance(docgraph, dg.DiscourseDocumentGraph)
@@ -36,8 +37,3 @@ def test_pcc():
assert nx.is_directed_acyclic_graph(docgraph)
- assert len(pcc.document_ids) == 176
-
- p = Process(target=convert_pcc_doc, args=pcc.document_ids)
- p.start()
- p.join()
|
fix: removed broken multiprocessing from tests
|
arne-cl_discoursegraphs
|
train
|
py
|
8c58a8d56d223d7fee61d30f5ee2dfbd7d1993c7
|
diff --git a/packages/react/src/components/TimePicker/TimePicker.js b/packages/react/src/components/TimePicker/TimePicker.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/TimePicker/TimePicker.js
+++ b/packages/react/src/components/TimePicker/TimePicker.js
@@ -223,10 +223,10 @@ export default class TimePicker extends Component {
{...timePickerInputProps}
data-invalid={invalid ? invalid : undefined}
/>
- {error}
</div>
{children}
</div>
+ {error}
</div>
);
}
|
fix(TimePicker): reposition validation message (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
0a52cbcdffe690dbce7a46991babb082d98a6093
|
diff --git a/babel.config.js b/babel.config.js
index <HASH>..<HASH> 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -9,6 +9,6 @@ module.exports = {
}],
],
plugins: [
- '@babel/plugin-transform-react-jsx',
+ ['@babel/plugin-transform-react-jsx', {runtime: 'automatic'}],
],
}
diff --git a/test/components.js b/test/components.js
index <HASH>..<HASH> 100644
--- a/test/components.js
+++ b/test/components.js
@@ -1,6 +1,3 @@
-import React from 'react'
-
-
export function Index({children}) {
return <div>
<h1>Index</h1>
diff --git a/test/router.js b/test/router.js
index <HASH>..<HASH> 100644
--- a/test/router.js
+++ b/test/router.js
@@ -1,5 +1,4 @@
import {equal} from 'assert'
-import React from 'react'
import {renderToStaticMarkup} from 'react-dom/server'
import {Index, Users, User, Pets, Pet, AllPets, NotFound, List} from './components'
import {Router} from '..'
|
test: new jsx transform
|
tj_react-enroute
|
train
|
js,js,js
|
3f351eb74746bd2acf2b8dd25ec72d0f759b1806
|
diff --git a/jest.config.js b/jest.config.js
index <HASH>..<HASH> 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -2,5 +2,6 @@ const jestConfig = require('kcd-scripts/jest')
module.exports = Object.assign(jestConfig, {
testEnvironment: 'jest-environment-jsdom',
+ testURL: 'http://localhost/',
setupTestFrameworkScriptFile: '<rootDir>/setupTests.js',
})
|
test: Added testURL in jest.config (#<I>)
Implemented fix from @jgoz to failing TI builds:
<URL>
|
testing-library_jest-dom
|
train
|
js
|
cbcdb483002e51bc3cc4061fd5162627bbac7699
|
diff --git a/lib/runner.js b/lib/runner.js
index <HASH>..<HASH> 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -192,8 +192,9 @@ Runner.prototype.runCucumber_ = function(specs, done) {
cucumberResolvedRequire =
ConfigParser.resolveFilePatterns(self.config_.cucumberOpts.require);
if (cucumberResolvedRequire && cucumberResolvedRequire.length) {
- execOptions.push('-r');
- execOptions = execOptions.concat(cucumberResolvedRequire);
+ execOptions = cucumberResolvedRequire.reduce(function(a, fn) {
+ return a.concat('-r', fn);
+ }, execOptions);
}
}
|
fix(runner): add -r for each cucumber require
|
angular_protractor
|
train
|
js
|
f4a834f84b7d07dffa12594bf93a927b62bbff62
|
diff --git a/pkg/tsdb/opentsdb/opentsdb.go b/pkg/tsdb/opentsdb/opentsdb.go
index <HASH>..<HASH> 100644
--- a/pkg/tsdb/opentsdb/opentsdb.go
+++ b/pkg/tsdb/opentsdb/opentsdb.go
@@ -1,6 +1,7 @@
package opentsdb
import (
+ "context"
"net/http"
"github.com/grafana/grafana/pkg/log"
@@ -25,6 +26,6 @@ func init() {
tsdb.RegisterExecutor("opentsdb", NewOpenTsdbExecutorExecutor)
}
-func (e *OpenTsdbExecutor) Execute(queries tsdb.QuerySlice, queryContext *tsdb.QueryContext) *tsdb.BatchResult {
+func (e *OpenTsdbExecutor) Execute(ctx context.Context, queries tsdb.QuerySlice, queryContext *tsdb.QueryContext) *tsdb.BatchResult {
panic("Missing implementation")
}
|
fix(opentsdb): add context to opentsdb executor
|
grafana_grafana
|
train
|
go
|
2871bcd57d92bd3d7fed4738d3d9315773291f5c
|
diff --git a/utils/bisect.js b/utils/bisect.js
index <HASH>..<HASH> 100755
--- a/utils/bisect.js
+++ b/utils/bisect.js
@@ -116,6 +116,7 @@ function runScript(scriptPath, revisionInfo) {
const child = fork(scriptPath, [], {
stdio: ['inherit', 'inherit', 'inherit', 'ipc'],
env: {
+ ...process.env,
PUPPETEER_EXECUTABLE_PATH: revisionInfo.executablePath,
},
});
|
chore(bisect): inherit parent ENV when launching script (#<I>)
|
GoogleChrome_puppeteer
|
train
|
js
|
44020034cb40878f91fa38eb9aa5ae8159826cdd
|
diff --git a/lib/workers/pr/pr-body.js b/lib/workers/pr/pr-body.js
index <HASH>..<HASH> 100644
--- a/lib/workers/pr/pr-body.js
+++ b/lib/workers/pr/pr-body.js
@@ -69,13 +69,12 @@ async function getPrBody(config) {
.compile(value)(upgrade)
.replace(/^``$/, '');
} catch (err) /* istanbul ignore next */ {
- logger.info({ header, value, err }, 'Handlebars compilation error');
+ logger.warn({ header, value, err }, 'Handlebars compilation error');
}
}
return res;
});
const tableColumns = getNonEmptyColumns(tableDefinitions, tableValues);
- logger.info({ tableDefinitions, tableValues, tableColumns });
let prBody = '';
// istanbul ignore if
if (config.prBanner && !config.isGroup) {
|
refactor: better pr body log levels
|
renovatebot_renovate
|
train
|
js
|
ed775af9c59c33ffb18107dbc83ce4fe207f3160
|
diff --git a/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java b/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
index <HASH>..<HASH> 100644
--- a/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
+++ b/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
@@ -668,7 +668,7 @@ public abstract class ProcessEngineConfigurationImpl extends ProcessEngineConfig
protected boolean enableExpressionsInStoredQueries = true;
/**
- * If true, enables protection against XML eXternal Entity (XXE) Processing attacks.
+ * If false, disables XML eXternal Entity (XXE) Processing. This provides protection against XXE Processing attacks.
*/
protected boolean enableXxeProcessing = false;
|
chore(javadoc): update javadoc for new XXE Processing property
Related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
af7775a7bbbd23c461c5b72777586344a4d796b8
|
diff --git a/jest.setup.js b/jest.setup.js
index <HASH>..<HASH> 100644
--- a/jest.setup.js
+++ b/jest.setup.js
@@ -20,7 +20,7 @@ function toHaveFocus(element) {
return [
matcherHint(`${this.isNot ? ".not" : ""}.toHaveFocus`, "element", ""),
"",
- "Expected",
+ "Expected:",
` ${printExpected(element)}`,
"Received:",
` ${printReceived(element.ownerDocument.getElementById(activeId))}`,
|
chore: Update jest.setup.js
|
reakit_reakit
|
train
|
js
|
f13de340e5b46e6f1a9e7783e7d9b330282fdb2c
|
diff --git a/lib/command/index.js b/lib/command/index.js
index <HASH>..<HASH> 100644
--- a/lib/command/index.js
+++ b/lib/command/index.js
@@ -1,4 +1,3 @@
module.exports = {
- __depends__: [ require('../core') ],
commandStack: [ 'type', require('./CommandStack') ]
-};
\ No newline at end of file
+};
|
chore(command): remove dependency to core to promote reusability
This makes the command module a reusable component that
can be used outside the scope of diagram-js.
BREAKING CHANGE:
- You now need to provide a `eventBus` component yourself if you
want to use the commandStack
|
bpmn-io_diagram-js
|
train
|
js
|
b756a1507f06686540b56b3a29186841ea741bad
|
diff --git a/pgjdbc/src/test/java/org/postgresql/test/jdbc2/GeometricTest.java b/pgjdbc/src/test/java/org/postgresql/test/jdbc2/GeometricTest.java
index <HASH>..<HASH> 100644
--- a/pgjdbc/src/test/java/org/postgresql/test/jdbc2/GeometricTest.java
+++ b/pgjdbc/src/test/java/org/postgresql/test/jdbc2/GeometricTest.java
@@ -125,9 +125,9 @@ public class GeometricTest extends TestCase {
if (roundTripToDatabase) {
try {
checkReadWrite(new PGline(), columnName);
- fail("Expected a PGSQLException to be thrown");
+ fail("Expected a PSQLException to be thrown");
} catch (PSQLException e) {
- assertTrue(e.getMessage().contains("A and B cannot both be zero"));
+ assertEquals("22P02", e.getSQLState());
}
}
|
test: make tests independent from server LC_MESSAGES (#<I>)
|
pgjdbc_pgjdbc
|
train
|
java
|
c8693e778dfdbbc44c21abc7f45742d16b58e237
|
diff --git a/lib/watson_apis/language_translator_v3.rb b/lib/watson_apis/language_translator_v3.rb
index <HASH>..<HASH> 100644
--- a/lib/watson_apis/language_translator_v3.rb
+++ b/lib/watson_apis/language_translator_v3.rb
@@ -229,7 +229,7 @@ module WatsonAPIs
"version" => @version
}
data = text
- headers = { "Content-Type" => "text/plain" }
+ headers["Content-Type"] = "text/plain"
method_url = "/v3/identify"
response = request(
method: "POST",
|
refactor(headers): Adjust generated code to avoid useless assignment
|
watson-developer-cloud_ruby-sdk
|
train
|
rb
|
2b2285528e905a40bfa61f459b013553a2a2a80e
|
diff --git a/packages/react/src/components/NumberInput/NumberInput.js b/packages/react/src/components/NumberInput/NumberInput.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/NumberInput/NumberInput.js
+++ b/packages/react/src/components/NumberInput/NumberInput.js
@@ -223,6 +223,7 @@ class NumberInput extends Component {
if (!disabled && conditional) {
value = direction === 'down' ? value - step : value + step;
+ value = capMax(max, capMin(min, value));
evt.persist();
evt.imaginaryTarget = this._inputRef;
this.setState(
|
fix: respect max and min when using arrows (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
3074c9eaa5c3354a6c99067240bfc547d6127e2e
|
diff --git a/docs/src/utils.js b/docs/src/utils.js
index <HASH>..<HASH> 100644
--- a/docs/src/utils.js
+++ b/docs/src/utils.js
@@ -2,12 +2,13 @@ import Router from 'next/router'
import getConfig from 'next/config'
import TreeModel from 'tree-model'
-export const CommonStyles = () => (
- <>
- <link rel="stylesheet" href={assetPrefix + '/_next/static/css/styles.chunk.css'} />
- <link rel="stylesheet" href={getAssetPath('github/styleguide.css')} />
- </>
-)
+export const CommonStyles = () => {
+ const sheets = [
+ config.production ? getAssetPath('primer.css') : assetPrefix + '/_next/static/css/styles.chunk.css',
+ getAssetPath('github/styleguide.css')
+ ]
+ return sheets.map(href => <link href={href} rel="stylesheet" />)
+}
export const CommonScripts = () => (
<script src={getAssetPath('github/styleguide.js')} />
|
fix: load static primer.css in production
|
primer_css
|
train
|
js
|
fc9df92d52fb1711ce51d2b4e886c4d28a686719
|
diff --git a/task/backend/executor/task_executor_test.go b/task/backend/executor/task_executor_test.go
index <HASH>..<HASH> 100644
--- a/task/backend/executor/task_executor_test.go
+++ b/task/backend/executor/task_executor_test.go
@@ -388,8 +388,8 @@ func testMetrics(t *testing.T) {
}
m = promtest.MustFindMetric(t, mg, "task_executor_run_latency_seconds", map[string]string{"task_type": ""})
- if got := *m.Histogram.SampleCount; got != 1 {
- t.Fatalf("expected to count 1 run latency metric, got %v", got)
+ if got := *m.Histogram.SampleCount; got < 1 {
+ t.Fatal("expected to find run latency metric")
}
if got := *m.Histogram.SampleSum; got <= 100 {
|
fix(tasks): fix flaky run latency metric test (#<I>)
|
influxdata_influxdb
|
train
|
go
|
7152a27b96766fe79fbbed0d3766a5e3f8e17f21
|
diff --git a/GEOparse/GEOTypes.py b/GEOparse/GEOTypes.py
index <HASH>..<HASH> 100755
--- a/GEOparse/GEOTypes.py
+++ b/GEOparse/GEOTypes.py
@@ -258,7 +258,7 @@ class SimpleGEO(BaseGEO):
summary.append(" " * 40 + "..." + " " * 40 + "\n")
summary.append(" " * 40 + "..." + " " * 40 + "\n")
summary.append(self.table.tail().to_string(header=None) + "\n")
- return "\n".join(summary)
+ return "\n".join([str(s) for s in summary])
def show_columns(self):
"""Print columns in SOFT format."""
|
fix: UnicodeDecodeError in head method
|
guma44_GEOparse
|
train
|
py
|
59918772c9433f3cfb603deec38ad11744520bf3
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -45,7 +45,7 @@ properties = dict(
],
extras_require = {
'raml': [
- 'pyraml-parser>=0.0.5',
+ 'pyraml-parser>=0.1.5',
],
'yaml': [
'PyYAML>=3.11',
|
fix: update dependencies to support python 3
|
salsita_pydataloader
|
train
|
py
|
1f023a1614b85782f1840c57005c3fd85e29dfc6
|
diff --git a/src/activation.js b/src/activation.js
index <HASH>..<HASH> 100644
--- a/src/activation.js
+++ b/src/activation.js
@@ -183,7 +183,7 @@ function shouldContinue(output, router) {
}
if(typeof output === 'string') {
- return affirmations.indexOf(value.toLowerCase()) !== -1;
+ return affirmations.indexOf(output.toLowerCase()) !== -1;
}
if(typeof output === 'undefined') {
|
fix(shouldContinue): typo change value to output
|
aurelia_router
|
train
|
js
|
020c596d2f099cc9446ae142b3b5ce3e805271f8
|
diff --git a/test/spec/xml/write.js b/test/spec/xml/write.js
index <HASH>..<HASH> 100644
--- a/test/spec/xml/write.js
+++ b/test/spec/xml/write.js
@@ -583,6 +583,34 @@ describe('bpmn-moddle - write', function() {
describe('should export extensions', function() {
+ it.skip('manually added custom namespace', function(done) {
+
+ // given
+ var definitions = moddle.create('bpmn:Definitions');
+
+ definitions.set('xmlns:foo', 'http://foobar');
+
+ // or alternatively directly assign it to definitions.$attrs
+
+ var expectedXML =
+ '<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" ' +
+ 'xmlns:foo="http://foobar" />';
+
+ // when
+ write(definitions, function(err, result) {
+
+ if (err) {
+ return done(err);
+ }
+
+ // then
+ expect(result).to.eql(expectedXML);
+
+ done(err);
+ });
+ });
+
+
it('attributes on root', function(done) {
// given
|
test(writer): add failing ns export test
|
bpmn-io_bpmn-moddle
|
train
|
js
|
b8980fc6137b53fa4f28665b1d578455e08056c9
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -20,7 +20,7 @@ export default async function (patterns, stategy, ...params) {
action,
url: action[urlSymbol],
method: action[methodSymbol],
- middlewares: action[middlewaresSymbol]
+ middlewares: action[middlewaresSymbol] || []
});
});
});
diff --git a/test/route.js b/test/route.js
index <HASH>..<HASH> 100644
--- a/test/route.js
+++ b/test/route.js
@@ -40,6 +40,10 @@ test('strategy shoud be called for all the routes', async t => {
t.is('deleteUser', result['delete /user/:id'].actionResult);
t.is('unauthorize', result['delete /user/:id'].middlewares[0]());
-
t.is('admin', result['post /user'].middlewares[0]());
+
+ t.same([], result['get /'].middlewares);
+ t.same([], result['get /user'].middlewares);
+ t.same([], result['get /user/:id'].middlewares);
+ t.same([], result['put /user/:id'].middlewares);
});
|
fix(middleware): always return array
|
mastilver_decorator-router
|
train
|
js,js
|
ae5388dd797d9f6a0c07bca07cead78f172ce5b1
|
diff --git a/util/git/client.go b/util/git/client.go
index <HASH>..<HASH> 100644
--- a/util/git/client.go
+++ b/util/git/client.go
@@ -9,6 +9,7 @@ import (
"os"
"os/exec"
"path/filepath"
+ "regexp"
"sort"
"strconv"
"strings"
@@ -120,7 +121,8 @@ func WithEventHandlers(handlers EventHandlers) ClientOpts {
}
func NewClient(rawRepoURL string, creds Creds, insecure bool, enableLfs bool, opts ...ClientOpts) (Client, error) {
- root := filepath.Join(os.TempDir(), strings.Replace(NormalizeGitURL(rawRepoURL), "/", "_", -1))
+ r := regexp.MustCompile("(/|:)")
+ root := filepath.Join(os.TempDir(), r.ReplaceAllString(NormalizeGitURL(rawRepoURL), "_"))
if root == os.TempDir() {
return nil, fmt.Errorf("Repository '%s' cannot be initialized, because its root would be system temp at %s", rawRepoURL, root)
}
|
fix: replace colons in addition to slashes in app tmp directory (#<I>) (#<I>)
closes <URL>
|
argoproj_argo-cd
|
train
|
go
|
543a2f8c84d0639bcf57a86f3573cbc4132c2bc6
|
diff --git a/packages/ui-react-utils/src/passthroughProps.js b/packages/ui-react-utils/src/passthroughProps.js
index <HASH>..<HASH> 100644
--- a/packages/ui-react-utils/src/passthroughProps.js
+++ b/packages/ui-react-utils/src/passthroughProps.js
@@ -78,12 +78,15 @@ function passthroughProps(props) {
Object.keys(props)
// style and className need to be explicitly passed through
+ // styles and makeStyle can not pass through
.filter(
(propName) =>
isPropValid(propName) &&
propName !== 'style' &&
propName !== 'className' &&
- propName !== 'children'
+ propName !== 'children' &&
+ propName !== 'styles' &&
+ propName !== 'makeStyles'
)
.forEach((propName) => {
validProps[propName] = props[propName]
|
fix(ui-react-utils): add styles and makeStyles to passthroughProps exceptions
Components must not pass through the makeStyles and styles props to other components, because these
are generated for each component by the withStyle decorator.
|
instructure_instructure-ui
|
train
|
js
|
fb02ca5920aae405048ebab50e09db67d5bf12a2
|
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -40,7 +40,10 @@ module.exports = {
exclude: [helpers.root('node_modules')]
}, {
test: /\.ts$/,
- loader: 'awesome-typescript-loader?declaration=false',
+ loader: 'awesome-typescript-loader',
+ options: {
+ declaration: false
+ },
exclude: [/\.e2e\.ts$/]
}]
},
|
chore(webpack): fit to webpack v2 best practices
According to [Webpack 2 best practices](<URL>) rather than using the `?options` the more explicit `options` prop should be used.
(Really just a minor thing :wink:)
|
ngx-translate_core
|
train
|
js
|
d44e18da99e93498f3b7a9fc9a688392c92862d3
|
diff --git a/src/convert.js b/src/convert.js
index <HASH>..<HASH> 100644
--- a/src/convert.js
+++ b/src/convert.js
@@ -238,7 +238,12 @@ function makeEslintFixFn(config) {
messages.push(`Skipping "eslint --fix" on ${path}.js because there was no eslint config file.`);
ruleIds = [];
} else {
- let eslintOutput = JSON.parse(eslintOutputStr);
+ let eslintOutput;
+ try {
+ eslintOutput = JSON.parse(eslintOutputStr);
+ } catch (e) {
+ throw new CLIError(`Error while running eslint:\n${eslintOutputStr}`);
+ }
ruleIds = eslintOutput[0].messages
.map(message => message.ruleId).filter(ruleId => ruleId);
ruleIds = Array.from(new Set(ruleIds)).sort();
|
fix: display the full error when eslint fails (#<I>)
Previously, it would always parse the result as JSON, but if it was an error
message, it would just be invalid JSON.
|
decaffeinate_bulk-decaffeinate
|
train
|
js
|
003cceed698ae17dcfb05181eae48b8a5b6d0fde
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -25,6 +25,11 @@ install_requires = [
"filetype"
]
+# Python 2.x?
+is_py2 = (sys.version_info[0] == 2)
+if is_py2:
+ install_requires.append("future")
+
class UploadCommand(Command):
""" Build and publish this package.
Support setup.py upload. Copied from requests_html.
|
fix: ImportError for builtins in Python<I>
|
HttpRunner_HttpRunner
|
train
|
py
|
9a6be9ba2fe6f349fe51b527b1d3bf995a83f5ff
|
diff --git a/docs/source/generate_configs.py b/docs/source/generate_configs.py
index <HASH>..<HASH> 100755
--- a/docs/source/generate_configs.py
+++ b/docs/source/generate_configs.py
@@ -30,7 +30,7 @@ def rewrite_entries(config, path, sec=None, sort=False):
comments = [sec.inline_comments[entry]] + sec.comments[entry]
for c in comments:
if c:
- description += ' '*4 + re.sub('^\s*#\s*', '', c) + '\n'
+ description += ' '*4 + re.sub('^\s*#', '', c) + '\n'
if etype == 'option':
description += '\n :type: option, one of %s\n' % eargs
else:
|
docs: verbatim indenting in generate_configs script
this fixes an issue with indenting not being correctly
copied from comments of specfiles
|
pazz_alot
|
train
|
py
|
0ddada8ce69bb0718bccebf3aa49a09c8e1e3f80
|
diff --git a/lib/webworker/WebWorkerMainTemplatePlugin.js b/lib/webworker/WebWorkerMainTemplatePlugin.js
index <HASH>..<HASH> 100644
--- a/lib/webworker/WebWorkerMainTemplatePlugin.js
+++ b/lib/webworker/WebWorkerMainTemplatePlugin.js
@@ -45,6 +45,9 @@ class WebWorkerMainTemplatePlugin {
"if(!installedChunks[chunkId]) {",
Template.indent([
"importScripts(" +
+ `"` +
+ mainTemplate.getPublicPath({ hash }) +
+ `" + ` +
mainTemplate.getAssetPath(JSON.stringify(chunkFilename), {
hash: `" + ${mainTemplate.renderCurrentHashCode(hash)} + "`,
hashWithLength: length =>
|
fix: add missing public path in importScripts
|
webpack_webpack
|
train
|
js
|
ae72f9846bc907c91acb40466a200cc061da0ec2
|
diff --git a/ui/src/components/drawer/QDrawer.js b/ui/src/components/drawer/QDrawer.js
index <HASH>..<HASH> 100644
--- a/ui/src/components/drawer/QDrawer.js
+++ b/ui/src/components/drawer/QDrawer.js
@@ -672,7 +672,9 @@ export default Vue.extend({
class: this.classes,
style: this.style,
on: this.onNativeEvents,
- directives: this.contentCloseDirective
+ directives: this.belowBreakpoint === true
+ ? this.contentCloseDirective
+ : void 0
}, content)
)
|
fix(QDrawer): put content directives under flag
|
quasarframework_quasar
|
train
|
js
|
c276b98795aa869710146e78091f2d76e28c3022
|
diff --git a/gridsome/lib/server/middlewares/graphql.js b/gridsome/lib/server/middlewares/graphql.js
index <HASH>..<HASH> 100644
--- a/gridsome/lib/server/middlewares/graphql.js
+++ b/gridsome/lib/server/middlewares/graphql.js
@@ -9,6 +9,11 @@ const {
module.exports = ({ store }) => {
return async function (req, res, next) {
const { query, variables, ...body } = await getGraphQLParams(req)
+
+ if (!query || !variables) {
+ return next()
+ }
+
const pageQuery = processPageQuery({ query })
if (variables.path) {
|
fix(graphql): don’t process non graphql requests (#<I>)
|
gridsome_gridsome
|
train
|
js
|
18138fa4c781b05ff4f091135644963a1024cad9
|
diff --git a/system/Common.php b/system/Common.php
index <HASH>..<HASH> 100644
--- a/system/Common.php
+++ b/system/Common.php
@@ -813,11 +813,6 @@ if (! function_exists('old')) {
return $default;
}
- // If the result was serialized array or string, then unserialize it for use...
- if (is_string($value) && (strpos($value, 'a:') === 0 || strpos($value, 's:') === 0)) {
- $value = unserialize($value);
- }
-
return $escape === false ? $value : esc($value, $escape);
}
}
diff --git a/tests/system/CommonFunctionsTest.php b/tests/system/CommonFunctionsTest.php
index <HASH>..<HASH> 100644
--- a/tests/system/CommonFunctionsTest.php
+++ b/tests/system/CommonFunctionsTest.php
@@ -300,7 +300,7 @@ final class CommonFunctionsTest extends CIUnitTestCase
$_GET = ['foo' => 'bar'];
$_POST = [
'bar' => 'baz',
- 'zibble' => serialize('fritz'),
+ 'zibble' => 'fritz',
];
$response = new RedirectResponse(new App());
|
fix: remove unserialize() in old()
I can't think of any use cases.
|
codeigniter4_CodeIgniter4
|
train
|
php,php
|
7cc6f119bdbea0a9760e94e63c092db97e35f8fa
|
diff --git a/test/reducersSpec.js b/test/reducersSpec.js
index <HASH>..<HASH> 100644
--- a/test/reducersSpec.js
+++ b/test/reducersSpec.js
@@ -1,5 +1,5 @@
import * as Actions from '../app/actions';
-import { newId, nodes, lastId, copyNode } from '../app/reducers';
+import { newId, nodes, lastId, copyNode } from '../app/reducers/nodes';
import chai from 'chai';
import R from 'ramda';
|
fix(tests): fix path to nodes reducer
|
xodio_xod
|
train
|
js
|
68e4cc0ae774976599b07110c2d47526242b507d
|
diff --git a/spec/validated_object_spec.rb b/spec/validated_object_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/validated_object_spec.rb
+++ b/spec/validated_object_spec.rb
@@ -21,6 +21,16 @@ describe ValidatedObject do
}.to raise_error(ArgumentError)
end
+ it 'supports readonly attributes' do
+ class ImmutableApple < ValidatedObject::Base
+ attr_reader :diameter
+ validates :diameter, type: Float
+ end
+
+ apple = ImmutableApple.new(diameter: 4.0)
+ expect( apple.diameter ).to eq 4.0
+ end
+
context 'TypeValidator' do
it 'verifies a valid type' do
small_apple = Apple.new diameter: 2.0
|
chore: failing test for readonly attributes
|
public-law_validated_object
|
train
|
rb
|
b057d9de71824106ebba83da0d229c9334c67af1
|
diff --git a/tests/test_jsane.py b/tests/test_jsane.py
index <HASH>..<HASH> 100644
--- a/tests/test_jsane.py
+++ b/tests/test_jsane.py
@@ -6,7 +6,7 @@ import pep8
sys.path.insert(0, os.path.abspath(__file__ + "/../.."))
-from jsane import loads, dumps, JSaneException
+from jsane import loads, dumps, JSaneException, from_dict
from jsane.traversable import Traversable
@@ -57,6 +57,7 @@ class TestClass:
def test_wrapper(self):
assert loads(dumps(self.dict1)).r() == self.dict1
assert json.dumps(self.dict1) == dumps(self.dict1)
+ assert self.dict1["foo"] == from_dict(self.dict1).foo.r()
assert loads(dumps(self.dict1)), Traversable(self.dict1)
def test_access(self):
|
test: Add test for from_dict.
|
skorokithakis_jsane
|
train
|
py
|
0dfdc5b878ad9cef12516e9c5470c6bb4c609bf4
|
diff --git a/tests/test_server.py b/tests/test_server.py
index <HASH>..<HASH> 100644
--- a/tests/test_server.py
+++ b/tests/test_server.py
@@ -89,6 +89,14 @@ def test_new_session(server: Server) -> None:
assert server.has_session("test_new_session")
+def test_new_session_no_name(server: Server) -> None:
+ """Server.new_session works with no name"""
+ mysession = server.new_session()
+ session_name = mysession.get("session_name")
+ assert session_name is not None
+ assert server.has_session(session_name)
+
+
def test_new_session_shell(server: Server) -> None:
"""Server.new_session creates and returns valid session running with
specified command"""
|
test: Server.new_session w/ no name
|
tmux-python_libtmux
|
train
|
py
|
ec3097a5b6b7e4533fd28e944a6ce343c109f390
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -43,7 +43,7 @@ setup(
author_email='aws-sam-developers@amazon.com',
url='https://github.com/awslabs/aws-sam-cli',
license='Apache License 2.0',
- packages=find_packages(exclude=('tests', 'docs')),
+ packages=find_packages(exclude=['tests.*', 'tests']),
keywords="AWS SAM CLI",
# Support Python 2.7 and 3.6 or greater
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
fix: Remove tests from .whl file (bdist_wheel) (#<I>)
|
awslabs_aws-sam-cli
|
train
|
py
|
0f51218146af97d1b43f0d3e6f686f2eefcdb393
|
diff --git a/src/rules.js b/src/rules.js
index <HASH>..<HASH> 100644
--- a/src/rules.js
+++ b/src/rules.js
@@ -1,7 +1,5 @@
-import os from 'os';
-
export default {
indent: 2,
eof: '\n',
- eol: os.EOL
+ eol: '\n'
};
|
fix(rules): return to unix notation, close #<I>
|
Scrum_posthtml-beautify
|
train
|
js
|
6c76fba082872013a4b1c29f858ef636663d4ad1
|
diff --git a/misc/plunk-gen.js b/misc/plunk-gen.js
index <HASH>..<HASH> 100644
--- a/misc/plunk-gen.js
+++ b/misc/plunk-gen.js
@@ -154,7 +154,7 @@ function generateConfigJs() {
'tslib': 'npm:tslib/tslib.js',
'typescript': 'npm:typescript@${versions.typescript}/lib/typescript.js',
- '@ng-bootstrap/ng-bootstrap': 'npm:@ng-bootstrap/ng-bootstrap@${versions.ngBootstrap}/bundles/ng-bootstrap.js'
+ '@ng-bootstrap/ng-bootstrap': 'npm:@ng-bootstrap/ng-bootstrap@${versions.ngBootstrap}/bundles/ng-bootstrap.umd.js'
},
packages: {
app: {
|
chore: fix umd bundle name for plunker (#<I>)
|
ng-bootstrap_ng-bootstrap
|
train
|
js
|
44066f15ab0c5b3e93e4caae1e3169a04f3d480f
|
diff --git a/emannotationschemas/schemas/base.py b/emannotationschemas/schemas/base.py
index <HASH>..<HASH> 100644
--- a/emannotationschemas/schemas/base.py
+++ b/emannotationschemas/schemas/base.py
@@ -39,6 +39,11 @@ def get_geom_from_wkb(wkb):
class ReferenceTableField(mm.fields.Field):
+ def _jsonschema_type_mapping(self):
+ return {
+ "type": "integer",
+ }
+
def _deserialize(self, value, attr, obj, **kwargs):
if not isinstance(value, Integer):
return int(value)
@@ -47,6 +52,7 @@ class ReferenceTableField(mm.fields.Field):
def _serialize(self, value, attr, obj, **kwargs):
return int(value)
+
class IdSchema(mm.Schema):
"""schema with a unique identifier"""
@@ -70,7 +76,9 @@ class AnnotationSchema(mm.Schema):
class ReferenceAnnotation(AnnotationSchema):
"""a annotation that references another annotation"""
- target_id = ReferenceTableField(required=True, description="annotation this references")
+ target_id = ReferenceTableField(
+ required=True, description="annotation this references"
+ )
class FlatSegmentationReference(AnnotationSchema):
|
fix: set referencetablefield json mapping
|
seung-lab_EMAnnotationSchemas
|
train
|
py
|
a0af1449596ecf47a2ca6bbf3620e189acb4e2a0
|
diff --git a/lib/superapi/api.js b/lib/superapi/api.js
index <HASH>..<HASH> 100644
--- a/lib/superapi/api.js
+++ b/lib/superapi/api.js
@@ -183,6 +183,14 @@ Api.prototype = {
return this.buildRequest(method, this.buildUrl(id, params, query), data, options);
},
+ _httpVerb: function(method, url, options, data) {
+ options = options || {};
+ options.data = data;
+ options.method = method;
+
+ return serviceHandler(url).call(this, options);
+ },
+
buildRequest: function (method, url, data, opts) {
method = method.toLowerCase();
opts = opts || {};
|
feat(api): add a generic request caller
Built on top of service hander but for non configured calls.
|
stephanebachelier_superapi
|
train
|
js
|
fb9afc79e929d2987ed99296cd9c29366c9f5523
|
diff --git a/test/runtime/connectivity.go b/test/runtime/connectivity.go
index <HASH>..<HASH> 100644
--- a/test/runtime/connectivity.go
+++ b/test/runtime/connectivity.go
@@ -93,6 +93,15 @@ var runtimeConnectivityTest = func(datapathMode string) func() {
return true
}, "Endpoints are not ready", &helpers.TimeoutConfig{Timeout: 150 * time.Second})
Expect(err).Should(BeNil())
+
+ err = helpers.WithTimeout(func() bool {
+ res := vm.ContainerExec(helpers.Server, "netperf -H 127.0.0.1 -l 1")
+ if !res.WasSuccessful() {
+ logger.Info("Waiting for netserver to come up")
+ }
+ return res.WasSuccessful()
+ }, "netserver did not come up in time", &helpers.TimeoutConfig{Timeout: 20 * time.Second})
+ Expect(err).Should(BeNil(), "timeout while waiting for netserver to start inside netperf container")
}, 150)
AfterEach(func() {
|
test: Wait for netperf server to be up before connecting to it
Test netserver availability before testing connectivity
Fixes: #<I>
|
cilium_cilium
|
train
|
go
|
cd746f3069726b5999013eb75ab4c9dacde888d4
|
diff --git a/src/structures/MessageMentions.js b/src/structures/MessageMentions.js
index <HASH>..<HASH> 100644
--- a/src/structures/MessageMentions.js
+++ b/src/structures/MessageMentions.js
@@ -1,6 +1,5 @@
'use strict';
-const GuildMember = require('./GuildMember');
const Collection = require('../util/Collection');
const { ChannelTypes } = require('../util/Constants');
const Util = require('../util/Util');
@@ -174,6 +173,7 @@ class MessageMentions {
*/
has(data, { ignoreDirect = false, ignoreRoles = false, ignoreEveryone = false } = {}) {
if (!ignoreEveryone && this.everyone) return true;
+ const GuildMember = require('./GuildMember');
if (!ignoreRoles && data instanceof GuildMember) {
for (const role of this.roles.values()) if (data.roles.cache.has(role.id)) return true;
}
|
fix(message_mentions): lazy require GuildMember to avoid circular (#<I>)
|
discordjs_discord.js
|
train
|
js
|
1854092413a1c5be7ff100f8db99ccab8dd6d0c8
|
diff --git a/samples/test/dns.test.js b/samples/test/dns.test.js
index <HASH>..<HASH> 100644
--- a/samples/test/dns.test.js
+++ b/samples/test/dns.test.js
@@ -28,12 +28,14 @@ describe(__filename, () => {
before(async () => {
const projectId = await dns.getProjectId();
- return dns.createZone(zoneName, {
+ await dns.createZone(zoneName, {
dnsName: `${projectId}.appspot.com.`,
});
});
- after(() => dns.zone(zoneName).delete());
+ after(async () => {
+ await dns.zone(zoneName).delete();
+ });
it('should run the quickstart', () => {
const output = exec('node quickstart');
|
test: harden sample tests a bit (#<I>)
|
googleapis_nodejs-dns
|
train
|
js
|
9f7add7021edc0edee7c48558a1308cc97956fe7
|
diff --git a/lib/registry/manifest.js b/lib/registry/manifest.js
index <HASH>..<HASH> 100644
--- a/lib/registry/manifest.js
+++ b/lib/registry/manifest.js
@@ -55,3 +55,5 @@ function fetchFromRegistry (uri, registry, opts, cb) {
cb(err, data)
})
}
+
+module.exports._clearMemoized = function () { memoizedManifests = {} }
diff --git a/test/util/tnock.js b/test/util/tnock.js
index <HASH>..<HASH> 100644
--- a/test/util/tnock.js
+++ b/test/util/tnock.js
@@ -1,8 +1,12 @@
var nock = require('nock')
+var regManifest = require('../../lib/registry/manifest')
module.exports = tnock
function tnock (t, host) {
var server = nock(host)
- t.tearDown(function () { server.done() })
+ t.tearDown(function () {
+ server.done()
+ regManifest._clearMemoized()
+ })
return server
}
|
test: export utility fn to clear memoized registry manifest requests
This should be generalized later
|
zkat_pacote
|
train
|
js,js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.