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 |
|---|---|---|---|---|---|
d4905dedba2d65523edb297482a012f1615f998d
|
diff --git a/examples/lucky.js b/examples/lucky.js
index <HASH>..<HASH> 100644
--- a/examples/lucky.js
+++ b/examples/lucky.js
@@ -2,7 +2,7 @@
const Cursor = require('../lib/Cursor');
const cursor = Cursor.create().reset();
-const colors = ['RED', 'CYAN_1', 'YELLOW', 'GREEN', 'BLUE'];
+const colors = ['red', 'cyan', 'yellow', 'green', 'blue'];
const text = 'Always after me lucky charms.';
let offset = 0;
diff --git a/examples/spin.js b/examples/spin.js
index <HASH>..<HASH> 100644
--- a/examples/spin.js
+++ b/examples/spin.js
@@ -3,7 +3,7 @@
const Cursor = require('../lib/Cursor');
const cursor = Cursor.create().reset();
const radius = 10;
-const colors = ['RED', 'YELLOW', 'GREEN', 'DARK_CYAN', 'BLUE', 'MAGENTA'];
+const colors = ['red', 'yellow', 'green', 'dark_cyan', 'blue', 'magenta'];
let points = [];
let theta = 0;
@@ -21,4 +21,4 @@ setInterval(function () {
points = points.slice(0, 12 * colors.length - 1);
theta += Math.PI / 40;
-}, 1);
+}, 150);
|
docs(cursor): Fix issue with colors in examples
|
kittikjs_cursor
|
train
|
js,js
|
cbcfbe130fceccd6af11a2bd7745d2016564120b
|
diff --git a/examples/transfer-files/public/js/app.js b/examples/transfer-files/public/js/app.js
index <HASH>..<HASH> 100644
--- a/examples/transfer-files/public/js/app.js
+++ b/examples/transfer-files/public/js/app.js
@@ -32,17 +32,8 @@ function start () {
if (!node) {
updateView('starting', node)
- const repoPath = 'ipfs-' + Math.random()
-
node = new self.Ipfs({
- repo: repoPath,
- config: {
- Addresses: {
- Swarm: [
- '/libp2p-webrtc-star/dns4/star-signal.cloud.ipfs.team/wss'
- ]
- }
- }
+ repo: 'ipfs-' + Math.random()
})
node.on('start', () => {
|
docs: update transfer-files example, webrtc is now on by default
|
ipfs_js-ipfs
|
train
|
js
|
82b33fd5694d223801961b96a410f4f961b47dda
|
diff --git a/engine/src/test/java/org/camunda/bpm/engine/test/api/task/TaskServiceTest.java b/engine/src/test/java/org/camunda/bpm/engine/test/api/task/TaskServiceTest.java
index <HASH>..<HASH> 100644
--- a/engine/src/test/java/org/camunda/bpm/engine/test/api/task/TaskServiceTest.java
+++ b/engine/src/test/java/org/camunda/bpm/engine/test/api/task/TaskServiceTest.java
@@ -827,6 +827,8 @@ public class TaskServiceTest {
Map<String, Object> returnedVariables = taskService.completeWithVariablesInReturn(taskId, variables);
// expect empty Map for standalone tasks
assertEquals(0, returnedVariables.size());
+
+ taskService.deleteTask(taskId, true);
}
@Deployment(resources = { "org/camunda/bpm/engine/test/api/twoParallelTasksProcess.bpmn20.xml" })
|
chore(test): cleanup after test
Related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
bf1dfe4d31998f779db4f0e81f861052e55a2dea
|
diff --git a/views/js/qtiCreator/widgets/interactions/extendedTextInteraction/states/Question.js b/views/js/qtiCreator/widgets/interactions/extendedTextInteraction/states/Question.js
index <HASH>..<HASH> 100755
--- a/views/js/qtiCreator/widgets/interactions/extendedTextInteraction/states/Question.js
+++ b/views/js/qtiCreator/widgets/interactions/extendedTextInteraction/states/Question.js
@@ -67,7 +67,7 @@ define([
};
if (config.hasMath) {
- formats.math = {label : __('Rich text') + ' + ' + __('math'), selected : false};
+ formats.math = {label : __('Rich text + math'), selected : false};
}
var constraints = {
|
chore: use a single translation key for a new `Rich text + math` format in `extendedTextInteraction/states/Question.js`
|
oat-sa_extension-tao-itemqti
|
train
|
js
|
a5063dfcfdb75bf940b42d8f5358be08a2dc0dec
|
diff --git a/packages/common/src/deprecated.js b/packages/common/src/deprecated.js
index <HASH>..<HASH> 100644
--- a/packages/common/src/deprecated.js
+++ b/packages/common/src/deprecated.js
@@ -7,7 +7,7 @@ import {deprecated} from 'core-decorators';
/**
* @private
- * @returns {undefined}
+ * @returns {function}
*/
function emptyDecorator() {
return function noop() {/* eslint no-empty:[0] */};
|
fix(common): correct jsdoc for deprecated function
|
webex_spark-js-sdk
|
train
|
js
|
392d88c5e12d3785f669454dc76729a2455ad147
|
diff --git a/connect.js b/connect.js
index <HASH>..<HASH> 100644
--- a/connect.js
+++ b/connect.js
@@ -39,7 +39,10 @@ exports.connect = function (config, PassedClass, callback) {
} catch (e) {}
if (switched) {
- db.switchDatabase(newConf, function () {
+ db.switchDatabase(newConf, function (err) {
+ if (err) {
+ return callback(err);
+ }
internals.locTitle = internals.migrationMode;
callback(
null,
|
fix(switchDatabase): no error was thrown on scope switch
switchDatabase error was unhandled, which resulted in an unhandled
scope switch error.
Fixes #<I>
|
db-migrate_node-db-migrate
|
train
|
js
|
7844af5f040e2eefb3066e439563e2222a696760
|
diff --git a/SailsRest.js b/SailsRest.js
index <HASH>..<HASH> 100644
--- a/SailsRest.js
+++ b/SailsRest.js
@@ -218,7 +218,7 @@ module.exports = (function() {
responseErrorCode = res && /^(4|5)\d+$/.test(res.statusCode.toString());
if (err && ( res === undefined || res === null || responseErrorCode ) ) {
- restError = new RestError(err.message, {req: req, res: res, data: data});
+ restError = new RestError(err.message, {originalError: err, data: data});
callback(restError);
} else {
if (methodName === 'find') {
|
fix: RestError causes a 'TypeError: Converting circular structure to JSON' when Sails tries to stringify it.
|
zohararad_sails-rest
|
train
|
js
|
29ffce48ef987bf177846ebfd69fd6f685ebda28
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -75,17 +75,15 @@ module.exports = exports = function NumberLong (mongoose) {
});
}
- Long.prototype.$conditionalHandlers = {
- '$lt' : handleSingle
- , '$lte': handleSingle
- , '$gt' : handleSingle
- , '$gte': handleSingle
- , '$ne' : handleSingle
- , '$in' : handleArray
- , '$nin': handleArray
- , '$mod': handleArray
- , '$all': handleArray
- };
+ Long.prototype.$conditionalHandlers.$lt = handleSingle;
+ Long.prototype.$conditionalHandlers.$lte = handleSingle;
+ Long.prototype.$conditionalHandlers.$gt = handleSingle;
+ Long.prototype.$conditionalHandlers.$gte = handleSingle;
+ Long.prototype.$conditionalHandlers.$ne = handleSingle;
+ Long.prototype.$conditionalHandlers.$in = handleArray;
+ Long.prototype.$conditionalHandlers.$nin = handleArray;
+ Long.prototype.$conditionalHandlers.$mod = handleArray;
+ Long.prototype.$conditionalHandlers.$all = handleArray;
/**
* Implement query casting, for mongoose 3.0
|
fix: don't overwrite mongoose schematype handlers
|
mongoosejs_mongoose-long
|
train
|
js
|
cab1eec9b05c1b62e9b49b1b7c448c9015383aeb
|
diff --git a/lib/components/app/batch-routing-panel.js b/lib/components/app/batch-routing-panel.js
index <HASH>..<HASH> 100644
--- a/lib/components/app/batch-routing-panel.js
+++ b/lib/components/app/batch-routing-panel.js
@@ -53,7 +53,6 @@ class BatchRoutingPanel extends Component {
!activeSearch && showUserSettings &&
<UserSettings />
*/}
- {/* TODO: Implement mobile view */}
<NarrativeContainer className='desktop-narrative-container'>
<NarrativeItineraries
containerStyle={{
|
refactor(batch-routing-panel): remove mobile view TODO
|
opentripplanner_otp-react-redux
|
train
|
js
|
e8ddbc5c119816cbdb15c70f42875fe857e59e57
|
diff --git a/src/client/index.js b/src/client/index.js
index <HASH>..<HASH> 100644
--- a/src/client/index.js
+++ b/src/client/index.js
@@ -355,6 +355,22 @@ function BroadcastChannel (name = 'nextauth.message') {
}
}
+
+
+// Some methods are exported with more than one name. This provides some
+// flexibility over how they can be invoked and backwards compatibility
+// with earlier releases. These should be removed in a newer release, as it only
+// creates problems for bundlers and adds confusion to users. TypeScript declarations
+// will provide sufficient help when importing
+export {
+ setOptions as options,
+ getSession as session,
+ getProviders as providers,
+ getCsrfToken as csrfToken,
+ signIn as signin,
+ signOut as signout
+}
+
export default {
getSession,
getCsrfToken,
|
fix(build): export aliases from client (#<I>)
|
iaincollins_next-auth
|
train
|
js
|
e7eded1ef647a4e140d80deb6c45c0a32f3832b8
|
diff --git a/cmd/ipfs/util/ulimit.go b/cmd/ipfs/util/ulimit.go
index <HASH>..<HASH> 100644
--- a/cmd/ipfs/util/ulimit.go
+++ b/cmd/ipfs/util/ulimit.go
@@ -22,7 +22,7 @@ var (
)
// maxFds is the maximum number of file descriptors that go-ipfs
-// can use. The default value is 1024. This can be overwritten by the
+// can use. The default value is 2048. This can be overwritten by the
// IPFS_FD_MAX env variable
var maxFds = uint64(2048)
|
fix: ulimit docs mistake
License: MIT
|
ipfs_go-ipfs
|
train
|
go
|
e6edb102cda9148a7480fbb8f878924c12e929c2
|
diff --git a/src/InkTabBarMixin.js b/src/InkTabBarMixin.js
index <HASH>..<HASH> 100755
--- a/src/InkTabBarMixin.js
+++ b/src/InkTabBarMixin.js
@@ -56,7 +56,13 @@ function componentDidUpdate(component, init) {
if (tabBarPosition === 'top' || tabBarPosition === 'bottom') {
let left = tabOffset.left - containerOffset.left;
let width = tabNode.offsetWidth;
- if (styles.inkBar && styles.inkBar.width !== undefined) {
+
+ // If tabNode'width width equal to wrapNode'width when tabBarPosition is top or bottom
+ // It means no css working, then ink bar should not have width until css is loaded
+ // Fix https://github.com/ant-design/ant-design/issues/7564
+ if (width === wrapNode.offsetWidth) {
+ width = 0;
+ } else if (styles.inkBar && styles.inkBar.width !== undefined) {
width = parseFloat(styles.inkBar.width, 10);
if (width) {
left = left + (tabNode.offsetWidth - width) / 2;
|
fix: ink bar too long in development (#<I>)
happened when using style-loader
close ant-design/ant-design#<I>
close ant-design/ant-design#<I>
close ant-design/ant-design#<I>
close ant-tool/atool-doc#<I>
close dvajs/dva#<I>
|
react-component_tabs
|
train
|
js
|
1edcc50ee1d51bb7b5d1c13d10a4a4f7d5942af9
|
diff --git a/generators/deployment/index.js b/generators/deployment/index.js
index <HASH>..<HASH> 100644
--- a/generators/deployment/index.js
+++ b/generators/deployment/index.js
@@ -111,7 +111,7 @@ module.exports = class extends Generator {
_configureSwift() {
this.manifestConfig.buildpack = 'swift_buildpack';
- this.manifestConfig.command = this.name ? (`${this.name}`) : undefined;
+ this.manifestConfig.command = this.bluemix.name ? (`${this.bluemix.name}`) : undefined;
this.manifestConfig.memory = this.manifestConfig.memory || '128M';
this.pipelineConfig.swift = true;
this.cfIgnoreContent = ['.build/*', '.build-ubuntu/*', 'Packages/*'];
|
fix: use bluemix.name for launch command on Swift
|
ibm-developer_generator-ibm-cloud-enablement
|
train
|
js
|
c3806e71d9556ce417d3eeee8f4903ef6720bb43
|
diff --git a/docs/ext_argparse.py b/docs/ext_argparse.py
index <HASH>..<HASH> 100644
--- a/docs/ext_argparse.py
+++ b/docs/ext_argparse.py
@@ -25,6 +25,7 @@ _option_line_re = re.compile(r"^(?!\s{2}|Example: )(.+)$", re.MULTILINE)
_option_re = re.compile(r"(?:^|(?<=\s))(--\w[\w-]*\w)\b")
_prog_re = re.compile(r"%\(prog\)s")
_percent_re = re.compile(r"%%")
+_cli_metadata_variables_section_cross_link_re = re.compile(r"the \"Metadata variables\" section")
def get_parser(module_name, attr):
@@ -86,6 +87,12 @@ class ArgparseDirective(Directive):
# fix escaped chars for percent-formatted argparse help strings
help = _percent_re.sub("%", help)
+ # create cross-link for the "Metadata variables" section
+ help = _cli_metadata_variables_section_cross_link_re.sub(
+ "the \":ref:`Metadata variables <cli/metadata:Variables>`\" section",
+ help
+ )
+
return indent(help)
def generate_group_rst(self, group):
|
docs: make cross-link to "metadata variables" in cli docs
|
streamlink_streamlink
|
train
|
py
|
122516f57382c30cfbec3efcafcdc44876771b12
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -16,15 +16,8 @@ function shouldIncludeImport(existingImports, newImport) {
return existingImports.indexOf(newImport) < 0;
}
-function getSpacer(len, spacer, minWidth){
- var spaceArr = [];
- var mw = minWidth || 0;
- var len = len + mw;
- for(var i = 0; i < len; i++){
- spaceArr.push(spacer);
- }
-
- return spaceArr.join('');
+function getSpacer(length, spacer) {
+ return spacer.repeat(length);
}
function getLongest(propList) {
|
refactor: Simplify the getSpacer function to reduce workload
|
andrewbrandwood_gulp-sass-generate-contents
|
train
|
js
|
cc8aa07c03114a53c7096dda898c12aff27eca73
|
diff --git a/spec/client_spec.rb b/spec/client_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/client_spec.rb
+++ b/spec/client_spec.rb
@@ -1121,7 +1121,7 @@ describe 'Client' do
it "should use request options" do
expect{Algolia.list_indexes}.to_not raise_error
- expect{Algolia.list_indexes('headers' => { 'X-Algolia-API-Key' => 'NotExistentAPIKey' })}.to raise_error
+ expect{Algolia.list_indexes('headers' => { 'X-Algolia-API-Key' => 'NotExistentAPIKey' })}.to raise_error(Algolia::AlgoliaProtocolError)
end
context 'DNS timeout' do
|
fix(tests): Fix warning for unspecified exception (#<I>)
|
algolia_algoliasearch-client-ruby
|
train
|
rb
|
256b5c4539771c368ce2dad026e37539ef510a92
|
diff --git a/anyconfig/tests/common.py b/anyconfig/tests/common.py
index <HASH>..<HASH> 100644
--- a/anyconfig/tests/common.py
+++ b/anyconfig/tests/common.py
@@ -74,10 +74,8 @@ def dicts_equal(dic, ref, ordered=False):
(next_dic, next_ref) = (dic[key], ref[key])
if anyconfig.mdicts.is_dict_like(next_ref):
- if not anyconfig.mdicts.is_dict_like(next_dic):
- return False
-
- if not dicts_equal(next_dic, next_ref):
+ if not anyconfig.mdicts.is_dict_like(next_dic) or \
+ not dicts_equal(next_dic, next_ref):
return False
else:
if next_dic != next_ref:
|
refactor: fuse conditional statements in .tests.common.dicts_equal
|
ssato_python-anyconfig
|
train
|
py
|
7bf95253534437792e3e031d4feaa0e8a0925f61
|
diff --git a/modules/angular2/src/test_lib/benchmark_util.js b/modules/angular2/src/test_lib/benchmark_util.js
index <HASH>..<HASH> 100644
--- a/modules/angular2/src/test_lib/benchmark_util.js
+++ b/modules/angular2/src/test_lib/benchmark_util.js
@@ -16,7 +16,7 @@ export function getStringParameter(name:string) {
for (var i=0; i<els.length; i++) {
el = els[i];
var type = DOM.type(el);
- if ((type !== 'radio' && type !== 'checkbox') || DOM.getChecked(el)) {
+ if ((type != 'radio' && type != 'checkbox') || DOM.getChecked(el)) {
value = DOM.getValue(el);
break;
}
|
fix(benchmark_util): remove strict equality check from getStringParameter
Transpiled dart code was using identical() method to compare, which checks reference
equality, even for strings.
|
angular_angular
|
train
|
js
|
74c2ca9803b1534e0b7d78eeaff7b3c6a9a883df
|
diff --git a/nx-dev/nx-dev/redirect-rules.config.js b/nx-dev/nx-dev/redirect-rules.config.js
index <HASH>..<HASH> 100644
--- a/nx-dev/nx-dev/redirect-rules.config.js
+++ b/nx-dev/nx-dev/redirect-rules.config.js
@@ -152,7 +152,6 @@ const guideUrls = {
'/core-concepts/mental-model': '/using-nx/mental-model',
'/core-concepts/updating-nx': '/using-nx/updating-nx',
'/core-concepts/ci-overview': '/using-nx/ci-overview',
- '/using-nx/nx-devkit': '/getting-started/nx-devkit',
'/getting-started/nx-cli': '/using-nx/nx-cli',
'/getting-started/console': '/using-nx/console',
'/core-extended/affected': '/using-nx/affected',
|
docs(nxdev): remove nxdevkit redirect rule (#<I>)
|
nrwl_nx
|
train
|
js
|
51f4314149cf71209e43311ab4850001cb4a3758
|
diff --git a/ui/src/utils/key-composition.js b/ui/src/utils/key-composition.js
index <HASH>..<HASH> 100644
--- a/ui/src/utils/key-composition.js
+++ b/ui/src/utils/key-composition.js
@@ -1,7 +1,6 @@
let lastKeyCompositionStatus = false
export function onKeyDownComposition (evt) {
- console.log('update', evt.isComposing === true)
lastKeyCompositionStatus = evt.isComposing === true
}
@@ -13,7 +12,6 @@ export function shouldIgnoreKey (evt) {
}
export function isKeyCode (evt, keyCodes) {
- console.log('isKeyCode', keyCodes)
return (
lastKeyCompositionStatus === true ||
evt !== Object(evt) ||
|
chore(ui): Remove debugging statements
|
quasarframework_quasar
|
train
|
js
|
41323390cfe02c11f8490f2e1f0404a84531cf74
|
diff --git a/src/notebook/components/cell/display-area/display.js b/src/notebook/components/cell/display-area/display.js
index <HASH>..<HASH> 100644
--- a/src/notebook/components/cell/display-area/display.js
+++ b/src/notebook/components/cell/display-area/display.js
@@ -18,8 +18,8 @@ export default function Display(props: Props): ?React.Element<any> {
const order = props.displayOrder;
const tf = props.transforms;
const style = {
- height: props.expanded ? 'auto' : '300px',
- overflow: props.expanded ? 'visible' : 'scroll',
+ height: props.expanded ? '300px' : 'auto',
+ overflow: props.expanded ? 'scroll' : 'overflow',
}
if (!props.isHidden) {
|
fix(Display): Swap stylings on expanded
|
nteract_nteract
|
train
|
js
|
991c412adc6a9ba733474b94059fa4c558ec28c0
|
diff --git a/system/Security/Security.php b/system/Security/Security.php
index <HASH>..<HASH> 100644
--- a/system/Security/Security.php
+++ b/system/Security/Security.php
@@ -479,7 +479,7 @@ class Security implements SecurityInterface
&& preg_match('#^[0-9a-f]{32}$#iS', $_COOKIE[$this->cookieName]) === 1;
}
- private function saveHashInCookie()
+ private function saveHashInCookie(): void
{
$this->cookie = new Cookie(
$this->rawCookieName,
|
refactor: add missing return type
|
codeigniter4_CodeIgniter4
|
train
|
php
|
4191bee42581b7509c8b75874f65d8b5f87afbc7
|
diff --git a/utils/model/orm/associations/nestedOperations/belongsTo/beforeUpdate.js b/utils/model/orm/associations/nestedOperations/belongsTo/beforeUpdate.js
index <HASH>..<HASH> 100644
--- a/utils/model/orm/associations/nestedOperations/belongsTo/beforeUpdate.js
+++ b/utils/model/orm/associations/nestedOperations/belongsTo/beforeUpdate.js
@@ -14,7 +14,7 @@ module.exports = function findTargetModelBeforeUpdateSourceModel(as, association
, targetPK = targetModel.primaryKey
, nestedQuery = !!valueAs && !isTargetPk ? {where:{}} : false;
- if (entity === undefined && valueAs && !isTargetPk && (typeof valueAs !== 'object' || valueAs[targetPK] === undefined)) {
+ if (entity === undefined && valueAs && !isTargetPk && (typeof valueAs !== 'object' || valueAs[targetPK] !== undefined)) {
nestedQuery.where.label = valueAs;
targetModel
@@ -27,4 +27,4 @@ module.exports = function findTargetModelBeforeUpdateSourceModel(as, association
} else {
callback(null);
}
-};
\ No newline at end of file
+};
|
fix(associations): Nested Operation for hasOne now correctly checks for targetPK
|
CleverStack_clever-orm
|
train
|
js
|
5cf149c1304e5abc2fccd5477f22f6fd70f1cb85
|
diff --git a/lib/appium_lib/core/ios/xcuitest/search_context.rb b/lib/appium_lib/core/ios/xcuitest/search_context.rb
index <HASH>..<HASH> 100644
--- a/lib/appium_lib/core/ios/xcuitest/search_context.rb
+++ b/lib/appium_lib/core/ios/xcuitest/search_context.rb
@@ -25,8 +25,10 @@ module Appium
# # Require appium-xcuitest-driver 2.54.0+
# # PR: https://github.com/facebook/WebDriverAgent/pull/707/files
# find_elements :class_chain, 'XCUIElementTypeWindow[$name = \"bla$$$bla\"$]'
- # find_elements :class_chain, "**/XCUIElementTypeWindow[$name == 'Buttons'$]"
- # find_elements :class_chain, "**/XCUIElementTypeStaticText[$name == 'Buttons'$]"
+ # e = find_element :class_chain, "**/XCUIElementTypeWindow[$name == 'Buttons'$]"
+ # e.tag_name #=> "XCUIElementTypeWindow"
+ # e = find_element :class_chain, "**/XCUIElementTypeStaticText[$name == 'Buttons'$]"
+ # e.tag_name #=> "XCUIElementTypeStaticText"
#
def self.extend
::Appium::Core::Base::SearchContext.add_finders(class_chain: '-ios class chain')
|
docs: add examples and tag_name (#<I>)
|
appium_ruby_lib
|
train
|
rb
|
6b26fe80df5175fda4f2c84892b9fec1539c24b7
|
diff --git a/ui/app/controllers/jobs/job/index.js b/ui/app/controllers/jobs/job/index.js
index <HASH>..<HASH> 100644
--- a/ui/app/controllers/jobs/job/index.js
+++ b/ui/app/controllers/jobs/job/index.js
@@ -31,13 +31,6 @@ export default class IndexController extends Controller.extend(
sortDescending = false;
@action
- gotoJob(job) {
- this.transitionToRoute('jobs.job', job, {
- queryParams: { jobNamespace: job.get('namespace.name') },
- });
- }
-
- @action
gotoClients(statusFilter) {
this.transitionToRoute('jobs.job.clients', this.job, {
queryParams: {
|
chore: prettify job/index controller
|
hashicorp_nomad
|
train
|
js
|
ec09ea61be811290afa83126b399bb5dd4f34ead
|
diff --git a/nomad/drainer/watch_jobs_test.go b/nomad/drainer/watch_jobs_test.go
index <HASH>..<HASH> 100644
--- a/nomad/drainer/watch_jobs_test.go
+++ b/nomad/drainer/watch_jobs_test.go
@@ -604,13 +604,13 @@ func TestHandleTaskGroup_Migrations(t *testing.T) {
require.Nil(err)
// Handle before and after indexes
- res := &jobResult{}
+ res := newJobResult()
require.Nil(handleTaskGroup(snap, job.TaskGroups[0], allocs, 101, res))
require.Empty(res.drain)
require.Len(res.migrated, 10)
require.True(res.done)
- res = &jobResult{}
+ res = newJobResult()
require.Nil(handleTaskGroup(snap, job.TaskGroups[0], allocs, 103, res))
require.Empty(res.drain)
require.Empty(res.migrated)
|
test: must initialize jobResults with new func
|
hashicorp_nomad
|
train
|
go
|
c396943efe2900a3da4dc2009a4f8afa3f6c827f
|
diff --git a/flask_ecstatic.py b/flask_ecstatic.py
index <HASH>..<HASH> 100644
--- a/flask_ecstatic.py
+++ b/flask_ecstatic.py
@@ -23,6 +23,7 @@ def add(app, url = None, path = None, endpoint=None, decorate=None, index='index
path = os.path.abspath(path or app.static_folder or '.')
endpoint = endpoint or 'static_' + os.path.basename(path)
decorate = decorate or (lambda f: f)
+ endpoints = {}
if path == app.static_folder:
if url != app.static_url_path:
@@ -34,14 +35,22 @@ def add(app, url = None, path = None, endpoint=None, decorate=None, index='index
def static_files(filename):
return send_from_directory(path, filename)
+ endpoints[endpoint] = static_files
+
if index:
@app.route(url + '/', endpoint = endpoint + '_index')
@decorate
def static_index():
return send_from_directory(path, index)
+ endpoints[endpoint + '_index'] = static_index
+
if url:
@app.route(url, endpoint = endpoint + '_index_bare')
@decorate
def static_index_bare():
return send_from_directory(path, index)
+
+ endpoints[endpoint + '_index_bare'] = static_index_bare
+
+ return endpoints
\ No newline at end of file
|
feat: return map of created endpoints
|
salsita_flask-ecstatic
|
train
|
py
|
1b9012ea7878bf44faaabbb6247c406f53b05558
|
diff --git a/lib/markdown/index.js b/lib/markdown/index.js
index <HASH>..<HASH> 100644
--- a/lib/markdown/index.js
+++ b/lib/markdown/index.js
@@ -8,6 +8,7 @@ const emoji = require('markdown-it-emoji')
const anchor = require('markdown-it-anchor')
const toc = require('markdown-it-table-of-contents')
const _slugify = require('./slugify')
+const { parseHeaders } = require('../util')
module.exports = ({ markdown = {}} = {}) => {
// allow user config slugify
@@ -37,7 +38,8 @@ module.exports = ({ markdown = {}} = {}) => {
}, markdown.anchor))
.use(toc, Object.assign({
slugify,
- includeLevel: [2, 3]
+ includeLevel: [2, 3],
+ format: parseHeaders
}, markdown.toc))
// apply user config
diff --git a/lib/util/index.js b/lib/util/index.js
index <HASH>..<HASH> 100644
--- a/lib/util/index.js
+++ b/lib/util/index.js
@@ -1,6 +1,8 @@
const spawn = require('cross-spawn')
const parseHeaders = require('./parseHeaders')
+exports.parseHeaders = parseHeaders
+
exports.normalizeHeadTag = tag => {
if (typeof tag === 'string') {
tag = [tag]
|
fix: emoji doesn't work in toc (close: #<I>) (#<I>)
|
vuejs_vuepress
|
train
|
js,js
|
bf4cc97bbe7ca994894a87df63fdf7da6ee0841a
|
diff --git a/pkg/action/get_values.go b/pkg/action/get_values.go
index <HASH>..<HASH> 100644
--- a/pkg/action/get_values.go
+++ b/pkg/action/get_values.go
@@ -39,6 +39,10 @@ func NewGetValues(cfg *Configuration) *GetValues {
// Run executes 'helm get values' against the given release.
func (g *GetValues) Run(name string) (map[string]interface{}, error) {
+ if err := g.cfg.KubeClient.IsReachable(); err != nil {
+ return nil, err
+ }
+
rel, err := g.cfg.releaseContent(name, g.Version)
if err != nil {
return nil, err
|
fix(cli): IsReachable check for "get values"
The 'helm get values' has its own Run() method in the action package.
So, unlike the other 'get' variants, it needs to check for the
reachability of the cluster itself.
|
helm_helm
|
train
|
go
|
767504da66f49fda673004de5c20df835afced27
|
diff --git a/packages/docs/src/store/modules/documentation.js b/packages/docs/src/store/modules/documentation.js
index <HASH>..<HASH> 100644
--- a/packages/docs/src/store/modules/documentation.js
+++ b/packages/docs/src/store/modules/documentation.js
@@ -59,7 +59,7 @@ function addFooterAd (children = []) {
if (!children.length) return
const index = children.length - 1
- const childChildren = children[index] || []
+ const childChildren = children[index].children || []
childChildren.push({ type: 'ad-exit' })
children[index].children = childChildren
|
docs: adjust footer children target
|
vuetifyjs_vuetify
|
train
|
js
|
d74a95060064cda0a25c3dee820d5848b557620c
|
diff --git a/views/default/forms/lists/sort.php b/views/default/forms/lists/sort.php
index <HASH>..<HASH> 100644
--- a/views/default/forms/lists/sort.php
+++ b/views/default/forms/lists/sort.php
@@ -103,6 +103,7 @@ echo elgg_view_input('hidden', [
echo elgg_view_input('submit', [
'class' => 'hidden',
+ 'field_class' => 'hidden',
]);
?>
<script>
|
fix(forms): hide field containing hidden submit button
|
hypeJunction_hypeLists
|
train
|
php
|
8a31fcedcf8f3cdbdde3dd5fec9ee0295fc7d78d
|
diff --git a/contrib/aws/route53-wildcard.py b/contrib/aws/route53-wildcard.py
index <HASH>..<HASH> 100755
--- a/contrib/aws/route53-wildcard.py
+++ b/contrib/aws/route53-wildcard.py
@@ -65,9 +65,11 @@ def delete_cname(args, block=False):
if __name__ == '__main__':
args = parse_args()
- # calculate zone from provided name
- zone = '.'.join(args['<name>'].split('.')[-2:])
- args['<zone>'] = zone
+ if args['--zone'] == None:
+ zone = '.'.join(args['<name>'].split('.')[-2:])
+ args['<zone>'] = zone
+ else:
+ args['<zone>'] = args['--zone']
# add a * to the provided name
args['<name>'] = u'\\052.'+unicode(args['<name>'])
|
fix(contrib): Zone argument not supported for aws
Fixes the usage of the zone argument for route<I>-wild.card.py
|
deis_deis
|
train
|
py
|
dd0aeb09b7a9242fa53b901d00836224772a4be4
|
diff --git a/client/deis.py b/client/deis.py
index <HASH>..<HASH> 100755
--- a/client/deis.py
+++ b/client/deis.py
@@ -582,7 +582,7 @@ class DeisClient(object):
if response.status_code == requests.codes.ok: # @UndefinedVariable
url = response.json()['url']
# use the OS's default handler to open this URL
- webbrowser.open('http://{}.{}/'.format(app, url))
+ webbrowser.open('http://{}/'.format(url))
return url
else:
raise ResponseError(response)
|
fix(client): do not prepend the app name twice
|
deis_deis
|
train
|
py
|
c8333b4c760df6f12b642b8fa4feb6b5b6374fe7
|
diff --git a/lib/tinker.js b/lib/tinker.js
index <HASH>..<HASH> 100644
--- a/lib/tinker.js
+++ b/lib/tinker.js
@@ -26,7 +26,7 @@ module.exports = function tinker(filePath, eslintrc) {
const tmpFile = tmpDir + path.sep + 'eslint-tinker-tmp-' + Date.now();
fs.writeFileSync(tmpFile, code);
- const cmd = eslint + ' -c ' + eslintrc + ' ' + tmpFile + ' > /dev/null';
+ const cmd = eslint + ' -c ' + eslintrc + ' ' + tmpFile + ' --rule \'eol-last: 0\' > /dev/null';
shjs.exec(cmd);
const fixedCode = fs.readFileSync(tmpFile).toString();
|
fix: suppress eol-last for it is unstable
|
benjycui_eslint-tinker
|
train
|
js
|
139e30c1f69c0fd4e24d096abcc1926790c681b6
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -88,11 +88,8 @@ module.exports = function(grunt) {
},
coveralls: {
options: {
- debug: true,
- coverage_dir: 'test/coverage/',
- dryRun: true,
force: true,
- recursive: true
+ src: 'test/coverage/**/lcov.info'
}
},
dev: {
@@ -137,7 +134,7 @@ module.exports = function(grunt) {
grunt.registerTask('test-debug', ['karma:debug']);
- grunt.registerTask('travis', ['karma:travis', 'karma:travisUnderscore']);
+ grunt.registerTask('travis', ['karma:travis', 'karma:travisUnderscore', 'karma:coveralls']);
// Provides the "bump" task.
grunt.registerTask('bump', 'Increment version number', function() {
|
fix(Gruntfile): coveralls
|
a8m_angular-filter
|
train
|
js
|
4236b290ddc2eb224f9ff834a21b373015aad782
|
diff --git a/git/types.py b/git/types.py
index <HASH>..<HASH> 100644
--- a/git/types.py
+++ b/git/types.py
@@ -40,7 +40,7 @@ else:
if sys.version_info[:2] < (3, 9):
- PathLike = Union[str, bytes, os.PathLike]
+ PathLike = Union[str, os.PathLike[str]]
else:
# os.PathLike only becomes subscriptable from Python 3.9 onwards
PathLike = Union[str, bytes, os.PathLike[str], os.PathLike[bytes]]
|
fix: remove bytes type of PathLike
|
gitpython-developers_GitPython
|
train
|
py
|
b17fe9ec62b6f8ea369cf97f623039ce6f40b0ec
|
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
@@ -4,6 +4,7 @@ import { Router, Redirect, Route, Switch } from 'react-router-dom';
import { ApolloProvider } from 'react-apollo';
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';
import PortalsContainer from '@commercetools-local/core/components/portals-container';
import history from '@commercetools-local/browser-history';
@@ -274,6 +275,9 @@ export default class ApplicationShell extends React.Component {
};
componentDidMount() {
this.props.onRegisterErrorListeners();
+ // NOTE: this is a temporary thingy, to ensure we clear the `token`
+ // from localStorage.
+ storage.remove('token');
}
getBrowserLocale = () =>
(window && window.navigator && window.navigator.language) || 'en';
|
chore(app-shell): ensure to clean up 'token' key from localStorage
|
commercetools_merchant-center-application-kit
|
train
|
js
|
d2bffb67a012a0312a724c149987ab8b8d0eaf2d
|
diff --git a/ladybug/epw.py b/ladybug/epw.py
index <HASH>..<HASH> 100644
--- a/ladybug/epw.py
+++ b/ladybug/epw.py
@@ -1444,7 +1444,7 @@ climate-calculations.html#energyplus-sky-temperature-calculation
"longitude %.2f\n" % -self.location.longitude + \
"time_zone %d\n" % (-self.location.time_zone * 15) + \
"site_elevation %.1f\n" % self.location.elevation + \
- "weather_data_file_unit 1\n"
+ "weather_data_file_units 1\n"
def to_dict(self):
"""Convert the EPW to a dictionary."""
|
fix(epw): Fixed a bug in the EPW.to_wea header
The term for "weather_data_file_units" is being written out as "weather_data_file_unit". This causes dctimestep to raise an error.
|
ladybug-tools_ladybug
|
train
|
py
|
b8ce4223b44408fd71ece68cd1563c94903d1cea
|
diff --git a/lib/resolve.js b/lib/resolve.js
index <HASH>..<HASH> 100644
--- a/lib/resolve.js
+++ b/lib/resolve.js
@@ -1,8 +1,7 @@
var path = require('path');
-var base = path.join(process.cwd(), 'node_modules', 'skatejs-build', 'node_modules');
module.exports = function () {
return [].slice.call(arguments).map(function (arg) {
- return Array.isArray(arg) ? [path.join(base, arg[0]), arg[1]] : path.join(base, arg);
+ return Array.isArray(arg) ? [require.resolve(arg[0]), arg[1]] : require.resolve(arg);
});
};
|
fix: do not assume paths, always resolve
|
skatejs_build
|
train
|
js
|
896a365488ea42e18cdd522e82c9a080d7533c8b
|
diff --git a/xod-client/src/project/actions.js b/xod-client/src/project/actions.js
index <HASH>..<HASH> 100644
--- a/xod-client/src/project/actions.js
+++ b/xod-client/src/project/actions.js
@@ -160,7 +160,7 @@ export const addPatch = (name, folderId) => (dispatch, getState) => {
payload: preparedData,
});
- return preparedData.payload.newId;
+ return preparedData.newId;
};
export const renamePatch = (id, name) => ({
@@ -203,7 +203,7 @@ export const addFolder = (name, parentId) => (dispatch, getState) => {
type: ActionType.FOLDER_ADD,
payload: preparedData,
});
- return preparedData.payload.newId;
+ return preparedData.newId;
};
export const renameFolder = (id, name) => ({
|
fix(actions): fix returning of newId for some actions
|
xodio_xod
|
train
|
js
|
3b68108b26f3d66d7beed4bcfce01a06fd9f469f
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -149,6 +149,7 @@ if (self.timeout) {
req.on('timeout', () => {
const err = new Error(`Timeout Error: ${options.timeout}ms exceeded`);
+ called = true;
callback(err);
});
|
fix: Callback was already called (#<I>)
|
dashevo_dashd-rpc
|
train
|
js
|
67585e84aed3e09cdaf85bd12c4efd43cf3d9d6b
|
diff --git a/packages/netlify-cms-core/src/components/MediaLibrary/MediaLibraryCardGrid.js b/packages/netlify-cms-core/src/components/MediaLibrary/MediaLibraryCardGrid.js
index <HASH>..<HASH> 100644
--- a/packages/netlify-cms-core/src/components/MediaLibrary/MediaLibraryCardGrid.js
+++ b/packages/netlify-cms-core/src/components/MediaLibrary/MediaLibraryCardGrid.js
@@ -46,7 +46,7 @@ const MediaLibraryCardGrid = ({
width={cardWidth}
margin={cardMargin}
isPrivate={isPrivate}
- displayURL={getDisplayURL(file)}
+ displayURL={file.isViewableImage && getDisplayURL(file)}
/>
))}
{!canLoadMore ? null : <Waypoint onEnter={onLoadMore} />}
|
fix(media-library): stop loading non-image previews (#<I>)
|
netlify_netlify-cms
|
train
|
js
|
3f9c76588a6c79ae95296f024491b6652244479b
|
diff --git a/lib/metrics/platforms/linux/stats.js b/lib/metrics/platforms/linux/stats.js
index <HASH>..<HASH> 100644
--- a/lib/metrics/platforms/linux/stats.js
+++ b/lib/metrics/platforms/linux/stats.js
@@ -158,11 +158,11 @@ class Stats {
cpuUsage: next.cpuUsage - prev.cpuUsage,
procTotalTime: next.procTotalTime - prev.procTotalTime
}
- stats['system.cpu.total.norm.pct'] = delta.cpuUsage / delta.cpuTotal
+ stats['system.cpu.total.norm.pct'] = delta.cpuUsage / delta.cpuTotal || 0
stats['system.memory.actual.free'] = next.memAvailable
stats['system.memory.total'] = next.memTotal
- const cpuProcessPercent = delta.procTotalTime / delta.cpuTotal
+ const cpuProcessPercent = delta.procTotalTime / delta.cpuTotal || 0
stats['system.process.cpu.total.norm.pct'] = cpuProcessPercent
stats['system.process.memory.size'] = next.vsize
|
fix(metrics): ensure NaN becomes 0, not null (#<I>)
This fixes #<I>.
|
elastic_apm-agent-nodejs
|
train
|
js
|
2d4080f843576b0e3e9eb051333cffdf119e223c
|
diff --git a/src/Contracts/UserResolver.php b/src/Contracts/UserResolver.php
index <HASH>..<HASH> 100644
--- a/src/Contracts/UserResolver.php
+++ b/src/Contracts/UserResolver.php
@@ -21,5 +21,5 @@ interface UserResolver
*
* @return mixed|null
*/
- public static function resolveId();
+ public static function resolve();
}
|
chore(UserResolver): rename the method from resolveId() to resolve()
|
owen-it_laravel-auditing
|
train
|
php
|
8e668d196b0bc46fdc71ad52559ab9140294d5e9
|
diff --git a/config/rollup.iife.config.js b/config/rollup.iife.config.js
index <HASH>..<HASH> 100644
--- a/config/rollup.iife.config.js
+++ b/config/rollup.iife.config.js
@@ -3,8 +3,18 @@ import commonJS from "@rollup/plugin-commonjs";
import virtual from "@rollup/plugin-virtual";
import replace from "@rollup/plugin-replace";
import visualizer from "rollup-plugin-visualizer";
+// Needed by fastfile
+import { O_TRUNC, O_CREAT, O_RDWR, O_EXCL, O_RDONLY } from "constants";
const empty = "export default {}";
+// We create a stub with these constants instead of including the entire constants definition
+const constants = `
+export const O_TRUNC = ${O_TRUNC};
+export const O_CREAT = ${O_CREAT};
+export const O_RDWR = ${O_RDWR};
+export const O_EXCL = ${O_EXCL};
+export const O_RDONLY = ${O_RDONLY}
+`;
export default {
input: "main.js",
@@ -24,11 +34,12 @@ export default {
crypto: empty,
readline: empty,
ejs: empty,
+ constants: constants,
}),
nodeResolve({
browser: true,
preferBuiltins: false,
- exportConditions: ['browser', 'default', 'module', 'require']
+ exportConditions: ["browser", "default", "module", "require"]
}),
commonJS(),
replace({
|
fix: Stub constants that updated fastfile requires
|
iden3_snarkjs
|
train
|
js
|
48da7859a8500c265f62b47f492226cab3a034be
|
diff --git a/src/poetry/__init__.py b/src/poetry/__init__.py
index <HASH>..<HASH> 100644
--- a/src/poetry/__init__.py
+++ b/src/poetry/__init__.py
@@ -1 +1 @@
-__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore[has-type] # noqa: E501
+__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
fix: drop unneeded # type / # noqa
No longer needed with current mypy / flake8
|
sdispater_poetry
|
train
|
py
|
7ec3df8d146a79e392d39d832a9e3f9019104da6
|
diff --git a/memote/support/basic.py b/memote/support/basic.py
index <HASH>..<HASH> 100644
--- a/memote/support/basic.py
+++ b/memote/support/basic.py
@@ -21,7 +21,7 @@ from __future__ import absolute_import
import logging
-from memote.support.biomass import find_atp_adp_converting_reactions
+from memote.support.helpers import find_atp_adp_converting_reactions
__all__ = ("check_metabolites_formula_presence",)
|
fix: choose original import location (#<I>)
|
opencobra_memote
|
train
|
py
|
29b0fbfbbe8702333f08fd0c9649e53b6769bd43
|
diff --git a/maltego_trx/commands.py b/maltego_trx/commands.py
index <HASH>..<HASH> 100644
--- a/maltego_trx/commands.py
+++ b/maltego_trx/commands.py
@@ -17,7 +17,7 @@ def execute_from_command_line():
elif args[0].lower() == "init":
run_start([], create_dir=False)
else:
- print("Command not recognised. Available commands are: \n 'start'")
+ print("Command not recognised. Available commands are: \n 'start <project_name>' \n 'init'")
def run_start(args, create_dir: bool = True):
|
fix(commands): update helper with init command
|
paterva_maltego-trx
|
train
|
py
|
2f322b27c1a6c8ab0e1db474e29791ee0ebd3d93
|
diff --git a/tests/integration/constructor-test.js b/tests/integration/constructor-test.js
index <HASH>..<HASH> 100644
--- a/tests/integration/constructor-test.js
+++ b/tests/integration/constructor-test.js
@@ -7,7 +7,7 @@ var store = require('humble-localstorage')
test('new Account(options)', function (t) {
store.clear()
var account = new Account({
- url: 'http://localhost:3000/session/account'
+ url: 'http://localhost:3000'
})
t.is(typeof account, 'object', 'Account is a constructor')
|
test: fix url in constructor
|
hoodiehq_hoodie-account-client
|
train
|
js
|
509443895c92ed68b7cc31953d92d97fa99c5688
|
diff --git a/packages/react/src/components/UIShell/SideNavItems.js b/packages/react/src/components/UIShell/SideNavItems.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/UIShell/SideNavItems.js
+++ b/packages/react/src/components/UIShell/SideNavItems.js
@@ -19,7 +19,9 @@ const SideNavItems = ({
}) => {
const className = cx([`${prefix}--side-nav__items`], customClassName);
const childrenWithExpandedState = React.Children.map(children, child => {
- return React.cloneElement(child, { isSideNavExpanded });
+ if (React.isValidElement(child)) {
+ return React.cloneElement(child, { isSideNavExpanded });
+ }
});
return <ul className={className}>{childrenWithExpandedState}</ul>;
};
|
fix(SideNavItems): handle null SideNavItem (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
0cd40a42da778abf2d09068fc6b0c25195654b5a
|
diff --git a/internal/pipe/docker/docker.go b/internal/pipe/docker/docker.go
index <HASH>..<HASH> 100644
--- a/internal/pipe/docker/docker.go
+++ b/internal/pipe/docker/docker.go
@@ -121,6 +121,7 @@ func doRun(ctx *context.Context) error {
var binaries = ctx.Artifacts.Filter(artifact.And(filters...)).List()
// TODO: not so good of a check, if one binary match multiple
// binaries and the other match none, this will still pass...
+ log.WithField("binaries", binaries).Debug("found binaries")
if len(binaries) != len(docker.Binaries) {
return fmt.Errorf(
"%d binaries match docker definition: %v: %s_%s_%s, should be %d",
@@ -257,7 +258,7 @@ func dockerBuild(ctx *context.Context, root string, images, flags []string) erro
log.WithField("cmd", cmd.Args).WithField("cwd", cmd.Dir).Debug("running")
out, err := cmd.CombinedOutput()
if err != nil {
- return errors.Wrapf(err, "failed to build docker image: \n%s", string(out))
+ return errors.Wrapf(err, "failed to build docker image: %s: \n%s", images[0], string(out))
}
log.Debugf("docker build output: \n%s", string(out))
return nil
|
fix: improve docker logs and errors (#<I>)
|
goreleaser_goreleaser
|
train
|
go
|
c82d447c68e7d495dd3ef411843c7d7b966da079
|
diff --git a/packages/mdc-icon-toggle/index.js b/packages/mdc-icon-toggle/index.js
index <HASH>..<HASH> 100644
--- a/packages/mdc-icon-toggle/index.js
+++ b/packages/mdc-icon-toggle/index.js
@@ -77,7 +77,7 @@ export class MDCIconToggle extends MDCComponent {
},
getAttr: (name, value) => this.root_.getAttribute(name, value),
setAttr: (name, value) => this.root_.setAttribute(name, value),
- rmAttr: (name, value) => this.root_.removeAttribute(name, value),
+ rmAttr: (name) => this.root_.removeAttribute(name),
notifyChange: (evtData) => this.emit('MDCIconToggle:change', evtData),
});
}
|
fix(icon-toggle): Use correct fn signature for rmAttr adapter method (#<I>)
|
material-components_material-components-web
|
train
|
js
|
fe1ac7c40e87d7d5c245a402f77daedd1f5e829f
|
diff --git a/packages/cozy-stack-client/src/FileCollection.spec.js b/packages/cozy-stack-client/src/FileCollection.spec.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-stack-client/src/FileCollection.spec.js
+++ b/packages/cozy-stack-client/src/FileCollection.spec.js
@@ -656,6 +656,34 @@ describe('FileCollection', () => {
)
})
+ it('should find the parent with id', async () => {
+ client.fetchJSON
+ .mockReturnValueOnce({
+ data: {
+ _id: 'root-id',
+ dir_id: '',
+ path: '/'
+ }
+ })
+ .mockReturnValueOnce({
+ data: {
+ _id: '123',
+ dir_id: 'root-id',
+ path: '/a'
+ }
+ })
+ .mockReturnValueOnce({
+ data: {
+ _id: 'file-id',
+ dir_id: '123',
+ path: '/a/b'
+ }
+ })
+
+ const res = await collection.isChildOf('file-id', 'root-id')
+ expect(res).toEqual(true)
+ })
+
it('should find the parent with dirID', async () => {
const child = { _id: 'file-id', path: '/a/b/c', dirID: 'root-id' }
const parent = 'root-id'
|
test: IsChildOf by id
|
cozy_cozy-client
|
train
|
js
|
0bdc57d7883d7b2b5fd91951990f898e083e4b91
|
diff --git a/lib/j2119/readlines.js b/lib/j2119/readlines.js
index <HASH>..<HASH> 100644
--- a/lib/j2119/readlines.js
+++ b/lib/j2119/readlines.js
@@ -4,7 +4,7 @@ function * readlines (source) {
const reader = new LineReader(source)
let line
while ((line = reader.next())) {
- yield line.toString('utf-8')
+ yield line.toString('utf-8').trim()
}
} // readlines
|
fix: Trim extraneous trailing whitespace. I'm looking at you Windows.
|
wmfs_j2119
|
train
|
js
|
b9c115eb92f36e08efe4d0052a78dc5b3577cb8b
|
diff --git a/run.go b/run.go
index <HASH>..<HASH> 100644
--- a/run.go
+++ b/run.go
@@ -57,11 +57,17 @@ func setRunningSlowly(slow bool) {
// The typical code with IsRunningSlowly is this:
//
// func update(screen *ebiten.Image) error {
-// // update the state
+//
+// // Update the state.
+//
+// // When IsRunningSlowly is true, the rendered result is not adopted.
+// // Skip rendering then.
// if ebiten.IsRunningSlowly() {
// return nil
// }
-// // draw something to the screen
+//
+// // Draw something to the screen.
+//
// return nil
// }
//
|
docs: Add comment to IsRunningSlowly (again)
|
hajimehoshi_ebiten
|
train
|
go
|
bdcf54030f9f3d821b1fa9ffdbbd105e0ad1769f
|
diff --git a/src/connection.js b/src/connection.js
index <HASH>..<HASH> 100644
--- a/src/connection.js
+++ b/src/connection.js
@@ -658,7 +658,7 @@ const GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(
executable: 'boolean',
owner: 'string',
lamports: 'number',
- data: struct.object({
+ data: struct.pick({
program: 'string',
parsed: 'any',
}),
@@ -722,7 +722,7 @@ const ParsedAccountInfoResult = struct.object({
lamports: 'number',
data: struct.union([
'string',
- struct.object({
+ struct.pick({
program: 'string',
parsed: 'any',
}),
|
fix: ignore extra space field in parsed accounts
|
solana-labs_solana-web3.js
|
train
|
js
|
2904cd32552dc4e25acaf6ff0573a81ce4136cc1
|
diff --git a/src/sagemaker/estimator.py b/src/sagemaker/estimator.py
index <HASH>..<HASH> 100644
--- a/src/sagemaker/estimator.py
+++ b/src/sagemaker/estimator.py
@@ -349,6 +349,9 @@ class EstimatorBase(with_metaclass(ABCMeta, object)): # pylint: disable=too-man
self.profiler_config = profiler_config
self.disable_profiler = disable_profiler
+ if not _region_supports_profiler(self.sagemaker_session.boto_region_name):
+ self.disable_profiler = True
+
self.profiler_rule_configs = None
self.profiler_rules = None
self.debugger_rules = None
|
fix: disable profiler by default for regions not support it (#<I>)
|
aws_sagemaker-python-sdk
|
train
|
py
|
0a6848b4c5b4b03e09277dbe3bc768a12f387420
|
diff --git a/app-vite/templates/entry/client-entry.js b/app-vite/templates/entry/client-entry.js
index <HASH>..<HASH> 100644
--- a/app-vite/templates/entry/client-entry.js
+++ b/app-vite/templates/entry/client-entry.js
@@ -65,7 +65,7 @@ import '@quasar/fastclick'
<% } else if (ctx.mode.pwa) { %>
// Needed only for iOS PWAs
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && window.navigator.standalone) {
- import(/* webpackChunkName: "fastclick" */ '@quasar/fastclick')
+ import('@quasar/fastclick')
}
<% } %>
|
chore(app-vite): remove obsolete comment
|
quasarframework_quasar
|
train
|
js
|
34901ed0ec11ff466023d5f508941a1983c882c0
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -33,6 +33,12 @@ module.exports = function(schema, pluginOptions) {
});
});
+ if (pluginOptions.aggregate !== false) {
+ instrumentAggregate(schema, pluginOptions);
+ }
+}
+
+function instrumentAggregate(schema, pluginOptions) {
schema.post('aggregate', function(res, next) {
if (this.options.explain) {
return next();
|
feat: add flag to disable instrumenting aggregate
|
vkarpov15_mongoose-explain
|
train
|
js
|
99346049cc8cad7c4e350f91f6f72937ec122f00
|
diff --git a/stories/RenderCounter/DivRefreshable.js b/stories/RenderCounter/DivRefreshable.js
index <HASH>..<HASH> 100644
--- a/stories/RenderCounter/DivRefreshable.js
+++ b/stories/RenderCounter/DivRefreshable.js
@@ -6,7 +6,7 @@ import withNestHandlers from './withNestHandlers';
const DivRefreshable = ({ label, onRefresh, children, cloneChild }) => (
<div style={{ padding: 10, border: '1px solid black' }}>
- <button onClick={e => onRefresh(e)}>{label}</button>
+ <button onClick={() => onRefresh()}>{label}</button>
{children && (cloneChild ? React.cloneElement(children) : children)}
</div>
);
@@ -31,8 +31,8 @@ DivRefreshable.propTypes = propTypes;
DivRefreshable.defaultProps = defaultProps;
const hoc = compose(
- withState('event', 'setEvent'),
- withNestHandlers({ onRefresh: 'setEvent' }),
+ withState('state', '_onRefresh'),
+ withNestHandlers({ onRefresh: '_onRefresh' }),
);
export default Object.assign(hoc((DivRefreshable)), DivRefreshable, {
|
fix(DivRefreshable): don't setState event
|
Stupidism_stupid-rc-starter
|
train
|
js
|
0ed7ffb6a18989cba60c46dfad1fbcba65684750
|
diff --git a/pprof.go b/pprof.go
index <HASH>..<HASH> 100644
--- a/pprof.go
+++ b/pprof.go
@@ -8,6 +8,7 @@ import (
)
const (
+ // DefaultPrefix url prefix of pprof
DefaultPrefix = "/debug/pprof"
)
|
fix: golint warning.
|
gin-contrib_pprof
|
train
|
go
|
79973dcfa5a614b4c350542551ce7a8dc69f776f
|
diff --git a/packages/webiny-api/src/graphql/utils/attributeToType.js b/packages/webiny-api/src/graphql/utils/attributeToType.js
index <HASH>..<HASH> 100644
--- a/packages/webiny-api/src/graphql/utils/attributeToType.js
+++ b/packages/webiny-api/src/graphql/utils/attributeToType.js
@@ -39,6 +39,10 @@ export default (
type = new GraphQLList(GraphQLJSON);
}
+ if (attr instanceof attrs.ObjectAttribute) {
+ type = GraphQLJSON;
+ }
+
if (attr instanceof ModelAttribute) {
const model = attr.getModelInstance();
const typeName = model.classId;
|
feat(types): add support for entity's object attribute.
affects: webiny-api
|
Webiny_webiny-js
|
train
|
js
|
c8859356f6affb1364bd5830c93b0b9529dc7114
|
diff --git a/src/youtube.js b/src/youtube.js
index <HASH>..<HASH> 100644
--- a/src/youtube.js
+++ b/src/youtube.js
@@ -53,8 +53,7 @@ module.exports = function(robot) {
robot.respond(/yf add (.*?)$/i, function(msg) {
var name = msg.match[1];
- console.log(msg.room);
- if(notificationList.addNotificationsFor(name, msg.room)) {
+ if(notificationList.addNotificationsFor(name, msg.message.room)) {
msg.reply('Added notifications for: ' + name);
} else {
msg.reply(name + ' is already set for notifications in this channel');
@@ -63,7 +62,7 @@ module.exports = function(robot) {
robot.respond(/yf remove (.*?)$/i, function(msg) {
var name = msg.match[1];
- if(notificationList.removeNotificationsFor(name, msg.room)) {
+ if(notificationList.removeNotificationsFor(name, msg.message.room)) {
msg.reply('Removed notifications for: ' + name);
} else {
msg.reply(name + ' is not set for notifications in this channel');
|
fix: pull the room from the correct place in the msg variable
|
Insorum_hubot-youtube-feed
|
train
|
js
|
1862465b008e3b40aad7fbb2b26329fd4bddc37f
|
diff --git a/lib/requester/requester.js b/lib/requester/requester.js
index <HASH>..<HASH> 100644
--- a/lib/requester/requester.js
+++ b/lib/requester/requester.js
@@ -371,7 +371,7 @@ _.assign(Requester.prototype, /** @lends Requester.prototype */ {
// we can't trust the integrity of this request
// bail out if request url is empty
if (!(request && request.url && request.url.toString && request.url.toString())) {
- return onEnd(new Error('runtime:extenstions~request: request url is empty'));
+ return onEnd(new Error('runtime:extensions~request: request url is empty'));
}
cookieJar = self.options.cookieJar;
|
fix: typo extenstions for extensions
|
postmanlabs_postman-runtime
|
train
|
js
|
82be9700bbc1240b6561cd8e4f877b44ca5f0fe9
|
diff --git a/src/Calendar.js b/src/Calendar.js
index <HASH>..<HASH> 100644
--- a/src/Calendar.js
+++ b/src/Calendar.js
@@ -258,7 +258,7 @@ class Calendar extends React.Component {
* Callback fired when the visible date range changes. Returns an Array of dates
* or an object with start and end dates for BUILTIN views.
*
- * Cutom views may return something different.
+ * Custom views may return something different.
*/
onRangeChange: PropTypes.func,
|
docs: Minor typo fix (#<I>)
|
intljusticemission_react-big-calendar
|
train
|
js
|
babc319d716bfb9caede1d9e86045a08ac7ca8f1
|
diff --git a/lib/pact/consumer_contract/consumer_contract.rb b/lib/pact/consumer_contract/consumer_contract.rb
index <HASH>..<HASH> 100644
--- a/lib/pact/consumer_contract/consumer_contract.rb
+++ b/lib/pact/consumer_contract/consumer_contract.rb
@@ -13,6 +13,7 @@ require 'pact/consumer_contract/pact_file'
require 'pact/consumer_contract/http_consumer_contract_parser'
module Pact
+
class ConsumerContract
include SymbolizeKeys
@@ -30,7 +31,7 @@ module Pact
end
def self.add_parser consumer_contract_parser
- parsers << consumer_contract_parser
+ parsers.unshift(consumer_contract_parser)
end
def self.parsers
|
feat: add custom contract parsers to front of pact parsers list so that customised parsers are tried first
|
pact-foundation_pact-support
|
train
|
rb
|
690a77057ac4176bb93d92e1e3d6cfae41bed1a2
|
diff --git a/webapps/ui/cockpit/client/scripts/directives/processDiagram.js b/webapps/ui/cockpit/client/scripts/directives/processDiagram.js
index <HASH>..<HASH> 100644
--- a/webapps/ui/cockpit/client/scripts/directives/processDiagram.js
+++ b/webapps/ui/cockpit/client/scripts/directives/processDiagram.js
@@ -25,6 +25,11 @@ var DirectiveController = ['$scope', '$compile', 'Views', function( $scope, $c
$scope.control = {};
+ $scope.$on('collapse-change', function() {
+ console.log('bpmn collapse change!');
+ $scope.control.resetZoom();
+ });
+
/**
* If the process diagram changes, then the diagram will be rendered.
*/
|
fix(cockpit): add resetZoom on pane collapse event
related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
js
|
09b7fbe1e4a5090f4620d1d3b52bf0c20de5f1f2
|
diff --git a/teslajsonpy/connection.py b/teslajsonpy/connection.py
index <HASH>..<HASH> 100644
--- a/teslajsonpy/connection.py
+++ b/teslajsonpy/connection.py
@@ -122,6 +122,10 @@ class Connection:
auth = await self.refresh_access_token(
refresh_token=self.sso_oauth.get("refresh_token")
)
+ elif self.refresh_token:
+ auth = await self.refresh_access_token(
+ refresh_token=self.refresh_token
+ )
if auth and all(
(
auth.get(item)
|
fix: allow auth using refresh_token (#<I>)
|
zabuldon_teslajsonpy
|
train
|
py
|
73ad2f844be51998b55ab0ee0802bb727dd5d2a2
|
diff --git a/packages/@vue/cli-service/lib/config/base.js b/packages/@vue/cli-service/lib/config/base.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-service/lib/config/base.js
+++ b/packages/@vue/cli-service/lib/config/base.js
@@ -122,7 +122,7 @@ module.exports = (api, options) => {
// fails to resolve a loader, so we provide custom handlers to improve it
const { transformer, formatter } = require('../webpack/resolveLoaderError')
webpackConfig
- .plugin('firendly-errors')
+ .plugin('friendly-errors')
.use(require('friendly-errors-webpack-plugin'), [{
additionalTransformers: [transformer],
additionalFormatters: [formatter]
|
fix: fix friendly-error plugin name typo (#<I>)
|
vuejs_vue-cli
|
train
|
js
|
d55655f5a3936e76f87bd5db4871659db98fbf00
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1109,7 +1109,7 @@ gulp.task('!bundle.testing', ['build.js.dev'], function() {
var devBundleConfig = merge(true, bundleConfig);
devBundleConfig.paths = merge(true, devBundleConfig.paths, {"*": "dist/js/dev/es5/*.js"});
- return bundler.bundle(devBundleConfig, TESTING_BUNDLE_CONTENT, './dist/js/bundle/testing.js',
+ return bundler.bundle(devBundleConfig, TESTING_BUNDLE_CONTENT, './dist/js/bundle/testing.dev.js',
{sourceMaps: true});
});
|
fix(bundles): rename the testing.js bundle
BREAKING CHANGE:
System.register testing bundle was renamed:
`testing.js` -> `testing.dev.js`
Closes #<I>
Closes #<I>
|
angular_angular
|
train
|
js
|
87df43261cb68da139ef5a576687301ffc3f1759
|
diff --git a/mvi/src/main/java/com/hannesdorfmann/mosby3/mvi/MviDialogFragment.java b/mvi/src/main/java/com/hannesdorfmann/mosby3/mvi/MviDialogFragment.java
index <HASH>..<HASH> 100644
--- a/mvi/src/main/java/com/hannesdorfmann/mosby3/mvi/MviDialogFragment.java
+++ b/mvi/src/main/java/com/hannesdorfmann/mosby3/mvi/MviDialogFragment.java
@@ -24,6 +24,7 @@ import android.os.Bundle;
import android.support.annotation.CallSuper;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
+import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
@@ -55,7 +56,7 @@ import com.hannesdorfmann.mosby3.mvp.MvpView;
* @author Hannes Dorfmann
* @since 3.0.0
*/
-public abstract class MviDialogFragment<V extends MvpView, P extends MviPresenter<V, ?>> extends Fragment
+public abstract class MviDialogFragment<V extends MvpView, P extends MviPresenter<V, ?>> extends DialogFragment
implements MvpView, MviDelegateCallback<V, P> {
private boolean isRestoringViewState = false;
|
fix: MviDialogFragment extends DialogFragment (#<I>)
|
sockeqwe_mosby
|
train
|
java
|
9145770285cceea2f82cd454fa68cc205a774697
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -2,7 +2,7 @@ import { addEvent, getMods, getKeys, compareArray } from './utils';
import { _keyMap, _modifier, modifierMap, _mods, _handlers } from './var';
let _downKeys = []; // 记录摁下的绑定键
-
+let winListendFocus = false; // window是否已经监听了focus事件
let _scope = 'all'; // 默认热键范围
const elementHasBindEvent = []; // 已绑定事件的节点记录
@@ -372,9 +372,12 @@ function hotkeys(key, option, method) {
addEvent(element, 'keydown', (e) => {
dispatch(e);
});
- addEvent(window, 'focus', () => {
- _downKeys = [];
- });
+ if (!winListendFocus) {
+ winListendFocus = true;
+ addEvent(window, 'focus', () => {
+ _downKeys = [];
+ });
+ }
addEvent(element, 'keyup', (e) => {
dispatch(e);
clearModifier(e);
|
fix: Fix the bug that the window will bind multiple focus events when hotkeys is called multiple times by different element option (#<I>)
|
jaywcjlove_hotkeys
|
train
|
js
|
49cadb68da2850b9db86bdc8c6b883cda3c81b5b
|
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
@@ -417,6 +417,8 @@ class TestDataCloudCLIBase(TestDvc):
# NOTE: check if remote gc works correctly on directories
self.main(['gc', '-c', '-f'] + args)
shutil.rmtree(self.dvc.cache.local.cache_dir)
+
+ sleep()
self.main(['pull'] + args)
self.assertTrue(os.path.exists(cache))
self.assertTrue(os.path.isfile(cache))
|
test: don't forget to sleep()
|
iterative_dvc
|
train
|
py
|
b3186967bc722c4ff91897da3f930b74aca3488e
|
diff --git a/src/Response.php b/src/Response.php
index <HASH>..<HASH> 100644
--- a/src/Response.php
+++ b/src/Response.php
@@ -163,6 +163,14 @@ class Response implements ResponseInterface
if ($this->filePath) {
$this->sent = true;
+ // Write Headers to co response
+ foreach ($this->getHeaders() as $key => $value) {
+ $headerLine = implode(';', $value);
+
+ if ($key !== ContentType::KEY) {
+ $this->coResponse->header($key, $headerLine);
+ }
+ }
// Do send file
$this->coResponse->header(ContentType::KEY, $this->fileType);
$this->coResponse->sendfile($this->filePath);
|
fix: Write Headers to co response At send file
|
swoft-cloud_swoft-http-message
|
train
|
php
|
14226649aa1bbaf7b174bcacafdbe47d8ba6c851
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -97,7 +97,8 @@ class HtmlWebpackPlugin {
// Clear the cache once a new HtmlWebpackPlugin is added
childCompiler.clearCache(compiler);
- compiler.hooks.compilation.tap('HtmlWebpackPlugin', (compilation) => {
+ // Clear the cache if the child compiler is outdated
+ compiler.hooks.thisCompilation.tap('HtmlWebpackPlugin', (compilation) => {
if (childCompiler.hasOutDatedTemplateCache(compilation)) {
childCompiler.clearCache(compiler);
}
|
fix: Ignore foreign child compilers
|
jantimon_html-webpack-plugin
|
train
|
js
|
6510d7d3d82d84cc0811a853355deaa918b96941
|
diff --git a/lib/sessions.js b/lib/sessions.js
index <HASH>..<HASH> 100644
--- a/lib/sessions.js
+++ b/lib/sessions.js
@@ -84,6 +84,17 @@ class ClientSession extends EventEmitter {
this.operationTime = operationTime;
}
}
+
+ /**
+ * Used to determine if this session equals another
+ */
+ equals(session) {
+ if (!(session instanceof ClientSession)) {
+ return false;
+ }
+
+ return this.id.id.buffer.equals(session.id.id.buffer);
+ }
}
Object.defineProperty(ClientSession.prototype, 'id', {
|
feat(sessions): add equality operator to ease readability
|
mongodb-js_mongodb-core
|
train
|
js
|
b2b9fa0599df38283729b578f247541f3d5a59ed
|
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index <HASH>..<HASH> 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -9,6 +9,7 @@ module.exports = {
projectName: 'scalapb.github.io',
themeConfig: {
sidebarCollapsible: false,
+ image: 'https://scalapb.github.io/img/ScalaPB.png',
navbar: {
logo: {
alt: 'ScalaPB',
|
docs: add image to theme
|
scalapb_ScalaPB
|
train
|
js
|
d1749c6d1177a4fd95c066626bcba820df4519af
|
diff --git a/app/models/booking.rb b/app/models/booking.rb
index <HASH>..<HASH> 100644
--- a/app/models/booking.rb
+++ b/app/models/booking.rb
@@ -77,6 +77,9 @@ class Booking < ActiveRecord::Base
end
}
+ # Scope for code filter
+ scope :by_code, -> (code) { where(code: code) }
+
# Scope for date filter
#
# @param from [Date]
|
feat(booking): allow filtering by code
Looking up a booking for a receipt code is a common tasks.
This patch adds Booking.by_code scope.
|
huerlisi_has_accounts
|
train
|
rb
|
0c3e424ef1fc389f08fdf8aa9b8867eb0bfb316f
|
diff --git a/jira/client.py b/jira/client.py
index <HASH>..<HASH> 100644
--- a/jira/client.py
+++ b/jira/client.py
@@ -1216,11 +1216,14 @@ class JIRA(object):
result = {}
for user in r["users"]["items"]:
- result[user["key"]] = {
- "name": user["name"],
- "fullname": user["displayName"],
+ result[user["id"]] = {
+ "name": user.get("name"),
+ "id": user.get("id"),
+ "accountId": user.get("accountId"),
+ "fullname": user.get("displayName"),
"email": user.get("emailAddress", "hidden"),
- "active": user["active"],
+ "active": user.get("active"),
+ "timezone": user.get("timezone"),
}
return OrderedDict(sorted(result.items(), key=lambda t: t[0]))
|
fix: group_members (#<I>)
* fix: group_members
Some attributes have become obsolete with the latest GDPR developments.
Avoid client crashes trying to retrieve the members of a group.
* chore: blacken
|
pycontribs_jira
|
train
|
py
|
22550d9477c628ec0fbdb243fad9eb197bfe547d
|
diff --git a/samples/system-test/jobs.test.js b/samples/system-test/jobs.test.js
index <HASH>..<HASH> 100644
--- a/samples/system-test/jobs.test.js
+++ b/samples/system-test/jobs.test.js
@@ -75,9 +75,8 @@ describe('test', () => {
};
// Create job
- return dlp.createDlpJob(request).then(response => {
- return response[0].name;
- });
+ const [response] = await dlp.createDlpJob(request);
+ return response.name;
};
// Create a test job
@@ -110,7 +109,9 @@ describe('test', () => {
it('should list jobs', async function () {
this.retries(5);
await delay(this.test);
- const output = execSync(`node listJobs.js ${projectId} 'state=DONE'`);
+ const output = execSync(
+ `node listJobs.js ${projectId} 'state=DONE' RISK_ANALYSIS_JOB`
+ );
assert.match(
output,
/Job projects\/(\w|-)+\/locations\/global\/dlpJobs\/\w-\d+ status: DONE/
|
test: fix sample test for listJobs (#<I>)
* test: fix sample test for listJobs
* test: fix sample test for listJobs
* 🦉 Updates from OwlBot post-processor
See <URL>
|
googleapis_nodejs-dlp
|
train
|
js
|
b7e329fa651f3cc343831259b99fac020570d802
|
diff --git a/packages/build-tools/tasks/pattern-lab-tasks.js b/packages/build-tools/tasks/pattern-lab-tasks.js
index <HASH>..<HASH> 100644
--- a/packages/build-tools/tasks/pattern-lab-tasks.js
+++ b/packages/build-tools/tasks/pattern-lab-tasks.js
@@ -96,7 +96,7 @@ async function compileWithNoExit() {
compileWithNoExit.displayName = 'pattern-lab:compile';
async function watch() {
- config = config || await getConfig();
+ config = config || await asyncConfig();
const dirs = await manifest.getAllDirs();
// Used by watches
|
fix: fix async / await in PL build config
|
bolt-design-system_bolt
|
train
|
js
|
12fe3827e6d4ec28f68598be4a1649054b2ff065
|
diff --git a/src/Tippy.js b/src/Tippy.js
index <HASH>..<HASH> 100644
--- a/src/Tippy.js
+++ b/src/Tippy.js
@@ -5,6 +5,7 @@ import {
ssrSafeCreateDiv,
toDataAttributes,
deepPreserveProps,
+ isBrowser,
} from './utils';
import {useMutableBox, useIsomorphicLayoutEffect} from './util-hooks';
import {classNamePlugin} from './className-plugin';
@@ -209,10 +210,13 @@ export default function TippyGenerator(tippy) {
},
})
: null}
- {createPortal(
- render ? render(toDataAttributes(attrs), singletonContent) : content,
- mutableBox.container,
- )}
+ {isBrowser &&
+ createPortal(
+ render
+ ? render(toDataAttributes(attrs), singletonContent)
+ : content,
+ mutableBox.container,
+ )}
</>
);
}
|
fix: portal SSR (#<I>)
|
atomiks_tippy.js-react
|
train
|
js
|
9c5aa29d2cc7a0e01dee3cdd944e7cb518856d72
|
diff --git a/fuocore/player.py b/fuocore/player.py
index <HASH>..<HASH> 100644
--- a/fuocore/player.py
+++ b/fuocore/player.py
@@ -131,8 +131,7 @@ class Player(object):
self.destroy()
def play_song(self, url):
- if self.state == State.playing:
- self.destroy()
+ self.destroy()
cmd = 'L {0}\n'.format(url)
self.handler.stdin.write(cmd.encode('utf8'))
self.handler.stdin.flush()
|
fix: cant play after a song was finished.
|
cosven_feeluown-core
|
train
|
py
|
b4ee644cedc7d394d979d043da568a999c8a59b1
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -165,6 +165,11 @@ export function inspect(value, options) {
return inspectObject(value, options)
}
+ // last chance to check if it's an object
+ if (value === Object(value)) {
+ return inspectObject(value, options)
+ }
+
// We have run out of options! Just stringify the value
return options.stylize(String(value), type)
}
diff --git a/test/objects.js b/test/objects.js
index <HASH>..<HASH> 100644
--- a/test/objects.js
+++ b/test/objects.js
@@ -39,6 +39,10 @@ for (const [suite, inspect] of Object.entries({
expect(inspect(Object.create({ a: 1 }))).to.equal('{}')
})
+ it('returns `{}` for empty objects with a null prototype', () => {
+ expect(inspect(Object.create(Object.create(null)))).to.equal('{}')
+ })
+
it("shows objects' own properties for objects with an anonoymous prototype", () => {
const obj = Object.create({ a: 1 })
obj.b = 2
|
fix: inspect null prototype objects (#<I>)
this previously worked in chai, but not since moving to loupe
|
chaijs_loupe
|
train
|
js,js
|
baa277a4baaedbdbc68e6dde8fa6145b10a14a6c
|
diff --git a/src/uploader/qiniu.js b/src/uploader/qiniu.js
index <HASH>..<HASH> 100644
--- a/src/uploader/qiniu.js
+++ b/src/uploader/qiniu.js
@@ -134,7 +134,7 @@ class ShardUploader {
* @param {string} uploadId
* @param {number} partNumber
* @param {any} data
- * @returns {Promise<{ partNumber: number; etag: string; }>}
+ * @returns {Promise<{ partNumber: number, etag: string }>}
*/
uploadPart(uploadId, partNumber, data) {
return ajax({
|
fix: make jsdoc happy (#<I>)
|
leancloud_javascript-sdk
|
train
|
js
|
a330f9623d8ece731ed5db47a9e0daf8ffdde9ae
|
diff --git a/packages/vuetifyjs.com/src/plugins/rollbar.js b/packages/vuetifyjs.com/src/plugins/rollbar.js
index <HASH>..<HASH> 100644
--- a/packages/vuetifyjs.com/src/plugins/rollbar.js
+++ b/packages/vuetifyjs.com/src/plugins/rollbar.js
@@ -1,7 +1,10 @@
import Vue from 'vue'
import Rollbar from 'vue-rollbar'
-if (process.env.ROLLBAR_ACCESS_TOKEN) {
+if (
+ process.env.NODE_ENV === 'production' &&
+ process.env.ROLLBAR_ACCESS_TOKEN
+) {
Vue.use(Rollbar, {
accessToken: process.env.ROLLBAR_ACCESS_TOKEN,
captureUncaught: true,
|
docs: disable rollbar on non-production environments
|
vuetifyjs_vuetify
|
train
|
js
|
41b3e9d05b85908429d319165a257cc07982a9a4
|
diff --git a/actor-sdk/sdk-core/core/core-js/src/main/java/im/actor/core/js/JsFacade.java b/actor-sdk/sdk-core/core/core-js/src/main/java/im/actor/core/js/JsFacade.java
index <HASH>..<HASH> 100644
--- a/actor-sdk/sdk-core/core/core-js/src/main/java/im/actor/core/js/JsFacade.java
+++ b/actor-sdk/sdk-core/core/core-js/src/main/java/im/actor/core/js/JsFacade.java
@@ -416,6 +416,10 @@ public class JsFacade implements Exportable {
}
}
+ public void deleteMessage(JsPeer peer, String id) {
+ messenger.deleteMessages(peer.convert(), new long[]{Long.parseLong(id)});
+ }
+
public JsPromise deleteChat(final JsPeer peer) {
return JsPromise.create(new JsPromiseExecutor() {
@Override
|
feat(js): Added message deletion
|
actorapp_actor-platform
|
train
|
java
|
b1dc7db06ab06867cadbc7ae78f1842862b38020
|
diff --git a/test/unit/unpipe.js b/test/unit/unpipe.js
index <HASH>..<HASH> 100644
--- a/test/unit/unpipe.js
+++ b/test/unit/unpipe.js
@@ -7,6 +7,7 @@ const spooks = require('spooks')
const modulePath = '../../src/unpipe'
mockery.registerAllowable(modulePath)
+mockery.registerAllowable('stream')
suite('unpipe:', () => {
let log, results
|
fix(tests): eliminate mockery allowed module warning
|
philbooth_bfj
|
train
|
js
|
72c39b366b27a194b4ff88f46e40ad37cc237a14
|
diff --git a/packages/site/pages/components/code.js b/packages/site/pages/components/code.js
index <HASH>..<HASH> 100644
--- a/packages/site/pages/components/code.js
+++ b/packages/site/pages/components/code.js
@@ -67,7 +67,7 @@ const CodeColors = _ => (
keywords, storage, selector, markup italic, diff changed
</ColorDesc>
<ColorDesc varName="codeOrange">
- Integers, Boolean, Constants, XML Attributes, Markup Link Url
+ integers, boolean, constants, XML attributes, markup link url
</ColorDesc>
<ColorDesc varName="codeYellow">
classes, markup bold, search text background
@@ -85,7 +85,7 @@ const CodeColors = _ => (
variables, XML tags, markup link text, markup lists, diff deleted
</ColorDesc>
<ColorDesc varName="codeSand">
- deprecated, opening/closing embedded language tags e.g.
+ {`deprecated, opening/closing embedded language tags e.g. <?php?>`}
</ColorDesc>
<style jsx>{`
.colors {
|
refactor(site): cleanup code highlight guidelines
|
pluralsight_design-system
|
train
|
js
|
0220c55b40cd18b7d51df5343bc450970b6ecbf3
|
diff --git a/client/deis.py b/client/deis.py
index <HASH>..<HASH> 100755
--- a/client/deis.py
+++ b/client/deis.py
@@ -566,7 +566,7 @@ class DeisClient(object):
response = self._dispatch('post',
"/api/apps/{}/logs".format(app))
if response.status_code == requests.codes.ok: # @UndefinedVariable
- print(response.json())
+ sys.stdout.write(response.json())
else:
raise ResponseError(response)
|
fix(client): use sys.stdout.write for logs
The logs already print out newline characters, so using print()
adds an extra empty line to the log output. Using sys.stdout.write()
removes this empty line.
|
deis_deis
|
train
|
py
|
deda90b749750281bece98f1fe313bfdfd0454a2
|
diff --git a/cmd/influx_inspect/buildtsi/buildtsi.go b/cmd/influx_inspect/buildtsi/buildtsi.go
index <HASH>..<HASH> 100644
--- a/cmd/influx_inspect/buildtsi/buildtsi.go
+++ b/cmd/influx_inspect/buildtsi/buildtsi.go
@@ -14,9 +14,9 @@ import (
"strings"
"sync/atomic"
- "github.com/influxdata/influxdb/toml"
"github.com/influxdata/platform/logger"
"github.com/influxdata/platform/models"
+ "github.com/influxdata/platform/toml"
"github.com/influxdata/platform/tsdb"
"github.com/influxdata/platform/tsdb/tsi1"
"github.com/influxdata/platform/tsdb/tsm1"
|
fix: buildtsi should use the platform toml package instead of influxdb
|
influxdata_influxdb
|
train
|
go
|
56a7f31c443551c0f0c83635dc685a4ff166bfcf
|
diff --git a/lib/Bacon/Loader.php b/lib/Bacon/Loader.php
index <HASH>..<HASH> 100644
--- a/lib/Bacon/Loader.php
+++ b/lib/Bacon/Loader.php
@@ -1,7 +1,7 @@
<?php
/**
- Copyright 2012-2013 Brainsware
+ Copyright Brainsware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,11 +20,11 @@
namespace Bacon;
/**
- * Template loader for Twig so the layout is automatically extended by the
+ * Template loader for Twig so the layout is automatically extended by the
* main template. This makes '{% extend layout %}' unnecessary.
*
* @package System
- */
+ */
class Loader extends \Twig_Loader_Filesystem
{
protected $default_template;
@@ -40,15 +40,15 @@ class Loader extends \Twig_Loader_Filesystem
$this->base_template = $base_template;
}
- public function getSource($name)
+ public function getSourceContext($name)
{
$source = file_get_contents($this->findTemplate($name));
if ($name == $this->default_template && $this->base_template) {
- return '{% extends layout %}' . $source;
+ return new \Twig_Source('{% extends layout %}' . $source, $name);
}
- return $source;
+ return new \Twig_Source($source, $name);
}
}
|
fix(twig): fixed loader getSourceContext for twig 2.*
|
Brainsware_bacon
|
train
|
php
|
a1923926222e8e33941acb24735d610997da8073
|
diff --git a/packages/xod-func-tools/src/types.js b/packages/xod-func-tools/src/types.js
index <HASH>..<HASH> 100644
--- a/packages/xod-func-tools/src/types.js
+++ b/packages/xod-func-tools/src/types.js
@@ -38,7 +38,7 @@ const typeUrl = R.curry(
// hasType :: Type -> (x -> Boolean)
export const hasType = R.curry(
- type => x => type.validate(x).isRight
+ (type, x) => type.validate(x).isRight
);
// hasOneOfType :: [Type] -> (x -> Boolean)
|
fix(xod-func-tools): fix currying of ‘hasType’
|
xodio_xod
|
train
|
js
|
9822ea93502151066472ed624db38579a8e6c906
|
diff --git a/src/i18n/fi.js b/src/i18n/fi.js
index <HASH>..<HASH> 100644
--- a/src/i18n/fi.js
+++ b/src/i18n/fi.js
@@ -50,7 +50,7 @@ export default {
password_strength_error: 'Salasana on liian heikko.',
user_exists: 'Käyttäjä on jo olemassa.',
username_exists: 'Käyttäjätunnus on jo olemassa.',
- social_signup_needs_terms_acception: 'Ole hyvä ja hyväksy allaolevat käyttöehdot jatkaaksesi'
+ social_signup_needs_terms_acception: 'Ole hyvä ja hyväksy alla olevat käyttöehdot jatkaaksesi'
}
},
success: {
|
fix: Typographical error in finnish translation
|
auth0_lock
|
train
|
js
|
3da34d6c725e5e6100c8a34d3e377687aadfe395
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -92,7 +92,7 @@ language = None
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = None
+pygments_style = 'tango'
highlight_language = 'python3'
|
docs: Set code-block style to tango
|
lablup_backend.ai-client-py
|
train
|
py
|
409b59bd0c2b6f2726c39b453d9b6e5d18e65dc9
|
diff --git a/app/reducers/pins.js b/app/reducers/pins.js
index <HASH>..<HASH> 100644
--- a/app/reducers/pins.js
+++ b/app/reducers/pins.js
@@ -12,7 +12,6 @@ export const getLastId = (state) => {
// -1 is important because if nodes store doesn't contain nodes then we should return 0 as newId
return R.reduce(R.max, -1, ids);
};
-export const getNewId = (state) => getLastId(state) + 1;
const createPins = (state, nodeId, pins) => {
let lastId = getLastId(state);
@@ -36,8 +35,6 @@ const createPins = (state, nodeId, pins) => {
};
export const pins = (state = {}, action, projectState) => {
- let newId;
-
switch (action.type) {
case NODE_ADD: {
const nodeType = getNodeTypes(projectState)[action.payload.typeId];
|
refactor(pinsReducer): remove unnecessary method and variable
|
xodio_xod
|
train
|
js
|
0273a3a85d6bd95bc0732fce045f327a267b129a
|
diff --git a/src/api/log.js b/src/api/log.js
index <HASH>..<HASH> 100644
--- a/src/api/log.js
+++ b/src/api/log.js
@@ -6,7 +6,7 @@ const promisify = require('promisify-es6')
module.exports = (send) => {
return {
tail: promisify((callback) => {
- send({
+ return send({
path: 'log/tail'
}, (err, response) => {
if (err) {
|
fix: Return req from tail
|
ipfs_js-ipfs
|
train
|
js
|
d97c682d98f0edb6fa2db0c6e32a59f4fafcb315
|
diff --git a/src/Telebot/Message.php b/src/Telebot/Message.php
index <HASH>..<HASH> 100644
--- a/src/Telebot/Message.php
+++ b/src/Telebot/Message.php
@@ -8,9 +8,6 @@
namespace Telebot;
-
-use namespacetest\model\User;
-
class Message {
/**
|
fix: Remove mistakenly added `use`
|
emados_telebot-sdk
|
train
|
php
|
c89420a436ec7d3759f2d66ac69dd176ef323228
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -12,6 +12,7 @@
# serve to show the default.
import sys, os
+from datetime import datetime
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -42,7 +43,7 @@ master_doc = 'index'
# General information about the project.
project = u'Vingd API for Python'
-copyright = u'2012, Vingd Inc.'
+copyright = unicode(datetime.utcnow().year) + u', Vingd Inc.'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
|
docs: copyright year always current
|
vingd_vingd-api-python
|
train
|
py
|
80f56137fdcdfdec38ebde820e0f0bf40b54b875
|
diff --git a/components/input/__tests__/textarea.test.js b/components/input/__tests__/textarea.test.js
index <HASH>..<HASH> 100644
--- a/components/input/__tests__/textarea.test.js
+++ b/components/input/__tests__/textarea.test.js
@@ -140,7 +140,7 @@ describe('TextArea', () => {
it('maxLength', () => {
const wrapper = mount(<TextArea maxLength={5} showCount value="12345678" />);
const textarea = wrapper.find('.ant-input-textarea');
- expect(wrapper.find('textarea').prop('value')).toBe('12345678');
+ expect(wrapper.find('textarea').prop('value')).toBe('12345');
expect(textarea.prop('data-count')).toBe('5 / 5');
});
|
test: Fix maxLength test case
|
ant-design_ant-design
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.