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
a17c183b539cf496b499bba7b0c44b33aa80208a
diff --git a/debugger/cerebral-debugger/src/components/Debugger/index.js b/debugger/cerebral-debugger/src/components/Debugger/index.js index <HASH>..<HASH> 100644 --- a/debugger/cerebral-debugger/src/components/Debugger/index.js +++ b/debugger/cerebral-debugger/src/components/Debugger/index.js @@ -39,7 +39,7 @@ export default connect({ <Components /> </div> ) - case 'timeTravel': + case 'mutations': return ( <div className='debugger-content'> <Mutations />
fix(debugger): fix mutations page key in small mode
cerebral_cerebral
train
js
f1900723768dcfef0ecfa8b8d323cc21df8179aa
diff --git a/lib/change_stream.js b/lib/change_stream.js index <HASH>..<HASH> 100644 --- a/lib/change_stream.js +++ b/lib/change_stream.js @@ -272,10 +272,14 @@ class ChangeStreamCursor extends Cursor { if (this.options[optionName]) result[optionName] = this.options[optionName]; } - if (this.resumeToken) { - Object.assign(result, { resumeAfter: this.resumeToken }); - } else if (this.startAtOperationTime && maxWireVersion(this.server) >= 7) { - Object.assign(result, { startAtOperationTime: this.startAtOperationTime }); + if (this.resumeToken || this.startAtOperationTime) { + ['resumeAfter', 'startAfter', 'startAtOperationTime'].forEach(key => delete result[key]); + + if (this.resumeToken) { + result.resumeAfter = this.resumeToken; + } else if (this.startAtOperationTime && maxWireVersion(this.server) >= 7) { + result.startAtOperationTime = this.startAtOperationTime; + } } return result;
fix(change-streams): don't copy irrelevant resume options
mongodb_node-mongodb-native
train
js
42558c13127c7dd135a9602cb260afc26c2373bd
diff --git a/src/validation/validationRenderer.js b/src/validation/validationRenderer.js index <HASH>..<HASH> 100644 --- a/src/validation/validationRenderer.js +++ b/src/validation/validationRenderer.js @@ -26,9 +26,11 @@ export class MaterializeFormValidationRenderer { underlineInput(element) { let input; + let validationContainer; switch (element.tagName) { case 'MD-INPUT': { input = element.querySelector('input') || element.querySelector('textarea'); + validationContainer = element; break; } case 'SELECT': { @@ -36,16 +38,18 @@ export class MaterializeFormValidationRenderer { if (selectWrapper) { input = selectWrapper.querySelector('input'); } + validationContainer = selectWrapper; break; } case 'INPUT': { input = element; + validationContainer = element.ParentNode; break; } default: break; } if (input) { - if (element.querySelectorAll('.' + this.className).length === 0) { + if (validationContainer.querySelectorAll('.' + this.className).length === 0) { input.classList.remove('invalid'); input.classList.add('valid'); }
fix(validation): use correct parent Search for validation messages in the correct input parent. Current implementation does not underline invalid SELECT
aurelia-ui-toolkits_aurelia-materialize-bridge
train
js
72a5720ceeeb798f3b3fd5d64a1db16fb8dc3b62
diff --git a/dodo.py b/dodo.py index <HASH>..<HASH> 100644 --- a/dodo.py +++ b/dodo.py @@ -3,7 +3,7 @@ import glob from doit.action import CmdAction PACKAGE = "ehforwarderbot" -DEFAULT_BUMP_MODE = "beta" +DEFAULT_BUMP_MODE = "minor" # major, minor, patch, alpha, beta, dev, post DOIT_CONFIG = { "default_tasks": ["msgfmt"] @@ -88,7 +88,7 @@ def task_bump_version(): "actions": [CmdAction(gen_bump_version)], "params": [ { - "name": "Version bump mode", + "name": "mode", "short": "b", "long": "bump", "default": DEFAULT_BUMP_MODE,
ci: build script update for stable releases
blueset_ehForwarderBot
train
py
7f8d5fe70c4a352818e76e80b19cab145241346d
diff --git a/client/subscriptions/forms/credit-card-form.js b/client/subscriptions/forms/credit-card-form.js index <HASH>..<HASH> 100644 --- a/client/subscriptions/forms/credit-card-form.js +++ b/client/subscriptions/forms/credit-card-form.js @@ -39,11 +39,11 @@ const CreditCardForm = ({ <b className='block mb1'>Dados do último cartão</b> <div> <span className='caps'>{card.brand}: </span> - {card.firstDigits.slice(0, 4)} {card.firstDigits.slice(4, 6)}XX XXXX {card.lastDigits} + {card.first_digits.slice(0, 4)} {card.first_digits.slice(4, 6)}XX XXXX {card.last_digits} </div> - <div>Nome: <span className='caps'>{card.holderName}</span></div> + <div>Nome: <span className='caps'>{card.holder_name}</span></div> <div> - Validade: {card.expirationDate.slice(0, 2)}/{card.expirationDate.slice(2, 4)} + Validade: {card.expiration_date.slice(0, 2)}/{card.expiration_date.slice(2, 4)} </div> </div> )}
chore(subscription): change card keys case #<I>
nossas_bonde-client
train
js
63e9005f011ccbc371025b199e408acf90693287
diff --git a/cmd/erasure-object.go b/cmd/erasure-object.go index <HASH>..<HASH> 100644 --- a/cmd/erasure-object.go +++ b/cmd/erasure-object.go @@ -973,6 +973,11 @@ func (er erasureObjects) PutObjectTags(ctx context.Context, bucket, object strin } for i, fi := range metaArr { + if errs[i] != nil { + // Avoid disks where loading metadata fail + continue + } + // clean fi.Meta of tag key, before updating the new tags delete(fi.Metadata, xhttp.AmzObjectTagging) // Don't update for empty tags
fix: Avoid updating object tags on failed disks (#<I>)
minio_minio
train
go
77102743c194e4f3005447d825d482682280abde
diff --git a/scripts/pkg/upload/index.js b/scripts/pkg/upload/index.js index <HASH>..<HASH> 100755 --- a/scripts/pkg/upload/index.js +++ b/scripts/pkg/upload/index.js @@ -41,4 +41,15 @@ if (!/^v\d+\.\d+\.\d+$/.test(versionTag)) { } require('./world')(versionTag, { isLegacyVersion: argv.legacy }); -require('./china')(versionTag, { isLegacyVersion: argv.legacy }); +require('./china')(versionTag, { isLegacyVersion: argv.legacy }).catch(error => { + // TODO: Remove after China region accessibility issue is solved + process.stdout.error(` +************************************************** + +ERROR: Upload of binaries to China region failed with: + +${error.stack} + +************************************************** +`); +});
ci: Temporary patch to handle China upload issues as non fatal
serverless_serverless
train
js
01284536b3c5a3ea40b489a3435651bdad420227
diff --git a/tests/test_ptaskgroup.py b/tests/test_ptaskgroup.py index <HASH>..<HASH> 100644 --- a/tests/test_ptaskgroup.py +++ b/tests/test_ptaskgroup.py @@ -115,5 +115,35 @@ async def test_ptaskgroup_exc_handler(): assert count == 0 assert error_count == 10 - # after handlign error, all refs should be gone + # after handling error, all refs should be gone + assert len(tg._tasks) == 0 + + +@pytest.mark.asyncio +async def test_ptaskgroup_cancel_with_await(): + + count = 0 + + vclock = aiotools.VirtualClock() + with vclock.patch_loop(): + + async def subtask(): + nonlocal count + try: + await asyncio.sleep(0.1) + count += 1 # should not be executed + except asyncio.CancelledError: + await asyncio.sleep(0.1) + count += 10 # should be executed + + async with aiotools.PersistentTaskGroup() as tg: + for _ in range(10): + tg.create_task(subtask()) + assert len(tg._tasks) == 10 + # close it immediately after starting subtasks + await asyncio.sleep(0) + + # ensure that awaits in all cancellation handling blocks have been executed + assert count == 100 + # after handling error, all refs should be gone assert len(tg._tasks) == 0
test: Fortify ptaskgroup test case * Cancellation handling blocks of subtasks may have additional awaits to clean up their resources, and those should be executed while shutting down the ptaskgroup. * It has been working as expected, but let's add an explicit test case to prevent regression.
achimnol_aiotools
train
py
65e6b744610a237070b15548e4aa01c55c780ea0
diff --git a/packages/webpack-cli/lib/utils/cli-flags.js b/packages/webpack-cli/lib/utils/cli-flags.js index <HASH>..<HASH> 100644 --- a/packages/webpack-cli/lib/utils/cli-flags.js +++ b/packages/webpack-cli/lib/utils/cli-flags.js @@ -14,6 +14,23 @@ const commands = [ type: String, usage: 'init [scaffold]', description: 'Initialize a new webpack configuration', + flags: [ + { + name: 'auto', + type: Boolean, + description: 'To generate default config', + }, + { + name: 'force', + type: Boolean, + description: 'To force config generation', + }, + { + name: 'generation-path', + type: String, + description: 'To scaffold in a specified path', + }, + ], }, { name: 'migrate',
feat: display options as part of help info (#<I>)
webpack_webpack-cli
train
js
6c8b7f479f824fb5f8082439acbaa8b7cb8fa381
diff --git a/lib/datasource/docker.js b/lib/datasource/docker.js index <HASH>..<HASH> 100644 --- a/lib/datasource/docker.js +++ b/lib/datasource/docker.js @@ -187,7 +187,10 @@ async function getPkgReleases(purl) { const res = await got(url, { json: true, headers, timeout: 10000 }); tags = tags.concat(res.body.tags); const linkHeader = parseLinkHeader(res.headers.link); - url = linkHeader && linkHeader.next ? linkHeader.next.url : null; + url = + linkHeader && linkHeader.next + ? URL.resolve(url, linkHeader.next.url) + : null; page += 1; } while (url && page < 20); logger.debug({ length: tags.length }, 'Got docker tags');
fix(docker): resolve relative URLs from registry (#<I>) fix(docker): resolve relative URLs from registry
renovatebot_renovate
train
js
4f7f8f89eb7829a1a421ed88ca84ada8bf445cf5
diff --git a/packages/__docs__/webpack.config.js b/packages/__docs__/webpack.config.js index <HASH>..<HASH> 100644 --- a/packages/__docs__/webpack.config.js +++ b/packages/__docs__/webpack.config.js @@ -43,7 +43,7 @@ const config = merge(baseConfig, { }, output: { path: outputPath, - filename: '[name].[contenthash].js' + filename: '[name].js' }, devServer: {
chore: remove `[contenthash]` being added to bundled files
instructure_instructure-ui
train
js
0530ef84600c6d347b0b7330decb143504451176
diff --git a/models/classes/Lists/Business/Domain/ValueCollection.php b/models/classes/Lists/Business/Domain/ValueCollection.php index <HASH>..<HASH> 100644 --- a/models/classes/Lists/Business/Domain/ValueCollection.php +++ b/models/classes/Lists/Business/Domain/ValueCollection.php @@ -83,6 +83,10 @@ class ValueCollection implements IteratorAggregate, JsonSerializable, Countable $counter = 0; foreach ($this->values as $value) { + if (empty($value->getUri())) { + continue; + } + $duplicationCandidate = $this->extractValueByUri($value->getUri()); if ($duplicationCandidate !== null && $duplicationCandidate !== $value) {
fix: avoid consider duplicated empty URIs
oat-sa_tao-core
train
php
53e1fa06a293b49d40c375c2e9ba517d0e341b1f
diff --git a/tests/test_push.py b/tests/test_push.py index <HASH>..<HASH> 100644 --- a/tests/test_push.py +++ b/tests/test_push.py @@ -25,10 +25,10 @@ def setup_func(): @with_setup(setup_func) def test_basic_push(): # type: () -> None - instanlation = leancloud.Installation() - instanlation.set('deviceType', 'ios') - instanlation.set('deviceToken', 'xxx') - instanlation.save() + installation = leancloud.Installation() + installation.set('deviceType', 'ios') + installation.set('deviceToken', 'xxx') + installation.save() data = { "alert": { @@ -47,7 +47,7 @@ def test_basic_push(): # type: () -> None notification = push.send(data, where=query, push_time=now, expiration_time=two_hours_later) time.sleep(5) # notification write may have delay notification.fetch() - assert(notification.id) + assert notification.id try: notification.save()
refactor: typo in variable naming
leancloud_python-sdk
train
py
1c0625661c144b88ebb100b62e8248dfb4487943
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 @@ -1185,6 +1185,9 @@ class BaseSecurityManager(AbstractSecurityManager): if self.auth_role_admin not in self.builtin_roles: self.add_permission_role(role_admin, pv) for perm_view in perm_views: + if perm_view.permission is None: + # Skip this perm_view, it has a null permission + continue if perm_view.permission.name not in base_permissions: # perm to delete roles = self.get_all_roles()
fix: Fixed an AttributeError in manager.py when a permission is null. (#<I>)
dpgaspar_Flask-AppBuilder
train
py
7ec7a6b226f8d92b31d5fcffaec91192994d4aae
diff --git a/api/src/opentrons/system/log_control.py b/api/src/opentrons/system/log_control.py index <HASH>..<HASH> 100644 --- a/api/src/opentrons/system/log_control.py +++ b/api/src/opentrons/system/log_control.py @@ -58,4 +58,8 @@ async def set_syslog_level(level: str) -> Tuple[int, str, str]: 'syslog-ng-ctl', 'reload', stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) stdout, stderr = await proc.communicate() - return int(proc.returncode or -1), stdout.decode(), stderr.decode() + if proc.returncode is None: + snc_reload_result = -1 + else: + snc_reload_result: int = proc.returncode # type: ignore + return snc_reload_result, stdout.decode(), stderr.decode()
fix(api): fix return code of set_syslog_level (#<I>) If you use (val or -1) when the happy path of val is 0, you're always going to get -1! And that's gonna make the caller think that the call failed! Incredible!
Opentrons_opentrons
train
py
fd8478f06f769bbf6586732a221a14a4773b81a4
diff --git a/feedly.php b/feedly.php index <HASH>..<HASH> 100644 --- a/feedly.php +++ b/feedly.php @@ -112,7 +112,7 @@ class Feedly { $r = null; if(is_array($get_params)) - $url = $url . http_build_query($get_params); + $url = $url . '?' . http_build_query($get_params); if (($r = @curl_init($url)) == false) { throw new Exception("Cannot initialize cUrl session.
fix: issue when there's parameters in url
kbariotis_feedly-api
train
php
56a71e5f9797abe35a9566c86f9ce9c1f485c11a
diff --git a/errors.go b/errors.go index <HASH>..<HASH> 100644 --- a/errors.go +++ b/errors.go @@ -245,7 +245,7 @@ const ( errInsufficientEntropyName = "insufficient_entropy" errInvalidTokenFormatName = "invalid_token" errTokenSignatureMismatchName = "token_signature_mismatch" - errTokenExpiredName = "token_expired" + errTokenExpiredName = "invalid_token" // https://tools.ietf.org/html/rfc6750#section-3.1 errScopeNotGrantedName = "scope_not_granted" errTokenClaimName = "token_claim" errTokenInactiveName = "token_inactive"
fix: use correct error code for expired token (#<I>) BREAKING CHANGE: Replaces `token_expired` error ID with `invalid_token` which is the correct value according to <URL>
ory_fosite
train
go
3f798411d40a19e684806446edc5b49dadef0f90
diff --git a/actor-apps/app-android/src/free/java/im/actor/core/AndroidPushActor.java b/actor-apps/app-android/src/free/java/im/actor/core/AndroidPushActor.java index <HASH>..<HASH> 100644 --- a/actor-apps/app-android/src/free/java/im/actor/core/AndroidPushActor.java +++ b/actor-apps/app-android/src/free/java/im/actor/core/AndroidPushActor.java @@ -9,7 +9,7 @@ import im.actor.runtime.actors.Actor; public class AndroidPushActor extends Actor { - public AndroidPushActor(Context context, Modules messenger) { + public AndroidPushActor(Context context, AndroidMessenger messenger) { }
chore(android): fix exclude for free builds
actorapp_actor-platform
train
java
653784b56445b015a1584de1b693e57fc9069050
diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index <HASH>..<HASH> 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -68,8 +68,6 @@ class StreamDispatcher extends Writable { this.on('finish', () => { this._cleanup(); - // Still emitting end for backwards compatibility, probably remove it in the future! - this.emit('end'); this._setSpeaking(0); });
chore(StreamDispatcher): remove end event use finish event instead
discordjs_discord.js
train
js
6b00f2928d2a2fab30928c24bd3805972596e1a8
diff --git a/lib/platform/git/storage.js b/lib/platform/git/storage.js index <HASH>..<HASH> 100644 --- a/lib/platform/git/storage.js +++ b/lib/platform/git/storage.js @@ -85,10 +85,7 @@ class Storage { git = Git(cwd).silent(true); await git.raw(['remote', 'set-url', 'origin', config.url]); const fetchStart = process.hrtime(); - await git.fetch(config.url, { - '--depth': '2', - '--no-single-branch': true, - }); + await git.fetch([config.url, '--depth=2', '--no-single-branch']); await determineBaseBranch(); await resetToBranch(config.baseBranch); await cleanLocalBranches();
fix(gitfs): fix fetch args again (#<I>)
renovatebot_renovate
train
js
1ebfb7eba46225693b96968c7b98b356d674dbbc
diff --git a/src/Connect.js b/src/Connect.js index <HASH>..<HASH> 100644 --- a/src/Connect.js +++ b/src/Connect.js @@ -531,7 +531,7 @@ class Connect { } // Upload to ipfs - return this.credentials.createVerification({sub: this.did, claim: {profile}}) + return this.credentials.createVerification({sub: this.did, claim: profile}) .then(jwt => ipfsAdd(jwt)) .then(hash => { console.log('uploaded, ', this.vc) diff --git a/test/Connect.js b/test/Connect.js index <HASH>..<HASH> 100644 --- a/test/Connect.js +++ b/test/Connect.js @@ -258,7 +258,7 @@ describe('Connect', () => { ipfs.cat(uport.vc[0].replace(/^\/ipfs\//, ''), (err, res) => { if (err) reject(err) const { payload } = decodeJWT(res) - const { profile } = payload.claim + const profile = payload.claim expect(profile.name).to.equal(jwt.name) expect(profile.description).to.equal(jwt.description) expect(profile.url).to.equal(jwt.url)
fix: destructure profile claim (#<I>) * Fix profile claim * Fix profile test
uport-project_uport-connect
train
js,js
b6e6f1a33959c664f753731921f02f061d64bf3c
diff --git a/test/extract-coverage.js b/test/extract-coverage.js index <HASH>..<HASH> 100644 --- a/test/extract-coverage.js +++ b/test/extract-coverage.js @@ -6,7 +6,7 @@ var fs = require('fs') var path = require('path') var concatStream = require('concat-stream') -var covPath = path.join(__dirname, '..', 'coverage', 'coverage.json') +var covPath = path.join(__dirname, '..', '.nyc_output', 'coverage.json') process.stdin.pipe(concatStream(function (input) {
fix(test): fix extract coverage
cwrc_wikidata-entity-lookup
train
js
47d9d571597bbda020d44f9ef1c610d34469ca09
diff --git a/graphqlclient/client.py b/graphqlclient/client.py index <HASH>..<HASH> 100644 --- a/graphqlclient/client.py +++ b/graphqlclient/client.py @@ -19,7 +19,7 @@ class GraphQLClient: 'Content-Type': 'application/json'} if self.token is not None: - headers['Authorization'] = 'Bearer {}'.format(self.token) + headers['Authorization'] = '{}'.format(self.token) req = urllib.request.Request(self.endpoint, json.dumps(data).encode('utf-8'), headers)
fix: Remove Bearer from Authorization header User should be able to compose their own authorization header. For example AWS API Gateway using Cognito User Pool can not check Authorization header token which has Bearer
prisma_python-graphql-client
train
py
d832ce829c79536d54b70a03cb4b72390db73221
diff --git a/lib/inject-css.js b/lib/inject-css.js index <HASH>..<HASH> 100644 --- a/lib/inject-css.js +++ b/lib/inject-css.js @@ -17,7 +17,7 @@ function fixupCSSUrls(address, css) { return css.replace(cssUrlMatcher, function(match, p1) { var quote = p1.charAt(0); if (quote === '\'' || quote === '"') { - p1 = p1.substr(1, p1.length - 2); + p1 = p1.slice(1, -1); } var absolutePath = absoluteModuleId(address, p1); if (absolutePath === p1) {
chore: substr is deprecated
dumberjs_dumber
train
js
82e3953ca42907cc6234a4e96557a0e8c7187a62
diff --git a/www/src/pages/index.js b/www/src/pages/index.js index <HASH>..<HASH> 100644 --- a/www/src/pages/index.js +++ b/www/src/pages/index.js @@ -84,7 +84,7 @@ const ButtonToolbar = styled('div')` margin: -1rem; & > * { - width: 100%; + width: calc(100% - 2rem); max-width: 300px; margin: 1rem; }
docs: fix homepage appearance in mobile view (#<I>) * Fixed homepage appearance in mobile view * minor change * Used calc function for width * Changed width
react-bootstrap_react-bootstrap
train
js
4dae43eb4ffb67cd17ffc65ce49098d32abef87f
diff --git a/packages/vaex-core/vaex/webserver.py b/packages/vaex-core/vaex/webserver.py index <HASH>..<HASH> 100644 --- a/packages/vaex-core/vaex/webserver.py +++ b/packages/vaex-core/vaex/webserver.py @@ -453,6 +453,10 @@ def process(webserver, user_id, path, fraction=None, progress=None, **arguments) return ({"result": result}) elif method_name in ["evaluate"]: result = task_invoke(dataset, method_name, **arguments) + # evaluating a string results in dtype = object, but that is difficult + # to (de)serialize, better would be to serialize the arrow arrays + if dataset.dtype(arguments['expression']) == vaex.column.str_type: + result = result.astype(vaex.column.str_type) return result else: logger.error("unknown method: %r", method_name)
fix(server): support serialize string as numpy string array
vaexio_vaex
train
py
b769a44ee5ac7820b7428911259a783b904713f9
diff --git a/packages/craco/lib/paths.js b/packages/craco/lib/paths.js index <HASH>..<HASH> 100644 --- a/packages/craco/lib/paths.js +++ b/packages/craco/lib/paths.js @@ -28,14 +28,11 @@ if (args.config.isProvided) { const explorer = cosmiconfigSync(moduleName, { searchPlaces: [ "package.json", - `.${moduleName}rc`, - `.${moduleName}rc.json`, - `.${moduleName}rc.yaml`, - `.${moduleName}rc.yml`, + `${moduleName}.config.ts`, + `${moduleName}.config.js`, `.${moduleName}rc.ts`, `.${moduleName}rc.js`, - `${moduleName}.config.ts`, - `${moduleName}.config.js` + `.${moduleName}rc` ], loaders: { ".ts": tsLoader
fix: re-order the config file loading priority
sharegate_craco
train
js
e2dae808348170b6cb75bdb3e904fcb1c4a121f5
diff --git a/packages/webpack-preset-accurapp/index.js b/packages/webpack-preset-accurapp/index.js index <HASH>..<HASH> 100644 --- a/packages/webpack-preset-accurapp/index.js +++ b/packages/webpack-preset-accurapp/index.js @@ -238,7 +238,8 @@ function buildWebpackConfig(config = []) { publicPath: '/', watchContentBase: true, quiet: true, - clientLogLevel: 'none', + clientLogLevel: 'silent', + noInfo: true, watchOptions: { ignored: process.env.WATCH_NODE_MODULES === 'true' ? undefined : /node_modules/, },
chore: 🗳 Update webpack's clientLogLevel
accurat_accurapp
train
js
0073f1d966d6616a7eed1473c7d3eca935f108f9
diff --git a/test/instrumentation/span-compression.test.js b/test/instrumentation/span-compression.test.js index <HASH>..<HASH> 100644 --- a/test/instrumentation/span-compression.test.js +++ b/test/instrumentation/span-compression.test.js @@ -73,7 +73,7 @@ tape.test('integration/end-to-end span compression tests', function (suite) { t.equals(span.name, 'Calls to foo') t.equals(span.composite.compression_strategy, constants.STRATEGY_SAME_KIND) t.equals(span.composite.count, 3) - t.true(span.composite.sum > 30) + t.true(span.composite.sum > 30, `span.composite.sum > 30: ${span.composite.sum}`) t.equals(span.duration, (finalSpan._endTimestamp - firstSpan.timestamp) / 1000) t.end() })
test: add some context to test assert to help with debugging it (#<I>)
elastic_apm-agent-nodejs
train
js
09e99e91e02a19277ae40256881e10579408e49a
diff --git a/packages/drawer/src/react/index.js b/packages/drawer/src/react/index.js index <HASH>..<HASH> 100644 --- a/packages/drawer/src/react/index.js +++ b/packages/drawer/src/react/index.js @@ -125,6 +125,8 @@ class Drawer extends React.Component { render() { const { isOpen, context: { themeName } } = this + const ariaLabel = isOpen ? 'Collapse' : 'Expand' + return ( <div> <DrawerBase isOpen={isOpen} onClick={this.handleClick}> @@ -135,7 +137,7 @@ class Drawer extends React.Component { </DrawerPanelContent> <ToggleButtonContainer> <ToggleButton onClick={this.toggle} themeName={themeName}> - <Rotatable isRotated={isOpen}> + <Rotatable isRotated={isOpen} aria-label={ariaLabel}> <Icon id={Icon.ids.caretDown} /> </Rotatable> </ToggleButton>
fix(drawer): Add aria-label for expand/collapse
pluralsight_design-system
train
js
0858280db156f924ef126c3aaeae6973b8d44067
diff --git a/lib/clientsidescripts.js b/lib/clientsidescripts.js index <HASH>..<HASH> 100644 --- a/lib/clientsidescripts.js +++ b/lib/clientsidescripts.js @@ -489,7 +489,7 @@ functions.findByCssContainingText = function(cssSelector, searchText, using) { var matches = []; for (var i = 0; i < elements.length; ++i) { var element = elements[i]; - var elementText = element.innerText || element.textContent; + var elementText = element.textContent || element.innerText; if (elementText.indexOf(searchText) > -1) { matches.push(element); }
fix(locators): by.cssContainingText now operates on pre-transformed text Previously, the implementation depended on the browser. Now, it will always operate on the text before text-transform is applied. Closes #<I>
angular_protractor
train
js
84fcbcdb5b5be4446804c9526607f6722adaa263
diff --git a/lems/parser/LEMS.py b/lems/parser/LEMS.py index <HASH>..<HASH> 100644 --- a/lems/parser/LEMS.py +++ b/lems/parser/LEMS.py @@ -407,7 +407,7 @@ class LEMSFileParser(LEMSBase): self.raise_error("Child '{0}' must specify a type.", name) description = node.lattrib.get('description', '') - self.current_component_type.add_children(Children(name, type_, description)) + self.current_component_type.add_children(Children(name, type_, description, multiple=False)) def parse_child_instance(self, node): """
fix: explicitly set multiple to False for Child elements
LEMS_pylems
train
py
bdddabde62fe61535f16eeaa29ccdaff579f54cc
diff --git a/lib/components/form/location-field.js b/lib/components/form/location-field.js index <HASH>..<HASH> 100644 --- a/lib/components/form/location-field.js +++ b/lib/components/form/location-field.js @@ -71,6 +71,7 @@ class LocationField extends Component { apiKey: MAPZEN_KEY, boundary, focusPoint, + sources: null, text, url: baseUrl ? `${baseUrl}/autocomplete` : null }).then((result) => { @@ -88,6 +89,7 @@ class LocationField extends Component { boundary, focusPoint, text, + sources: null, url: baseUrl ? `${baseUrl}/search` : null, format: false // keep as returned GeoJSON }).then((result) => {
feat(form): Add sources=null to Pelias geocode queries
opentripplanner_otp-react-redux
train
js
05796a7dff250cb6a8a998c8bd6008b44494bc04
diff --git a/js/src/figure.js b/js/src/figure.js index <HASH>..<HASH> 100644 --- a/js/src/figure.js +++ b/js/src/figure.js @@ -545,6 +545,9 @@ var FigureView = widgets.DOMWidgetView.extend( { this.hover = false } }, + setStyle: function() { + // ignore original style setting, our style != a style widget + }, _mouse_down: function(e) { console.log('mouse down', e) window.last_event = e
fix: override setStyle, since we don't use that
maartenbreddels_ipyvolume
train
js
9f53d394279066f29a2d391b6964cba11c4a3e1e
diff --git a/ui/text_selection.js b/ui/text_selection.js index <HASH>..<HASH> 100644 --- a/ui/text_selection.js +++ b/ui/text_selection.js @@ -66,6 +66,7 @@ shaka.ui.TextSelection = class extends shaka.ui.SettingsMenu { this.eventManager.listen(this.player, 'texttrackvisibility', () => { this.onCaptionStateChange_(); + this.updateTextLanguages_(); }); this.eventManager.listen(this.player, 'textchanged', () => {
fix(UI): Fix text UI not updating when text is disabled (#<I>) Closes #<I>
google_shaka-player
train
js
ef7087adb653dc30a61488ec9087cc2f6d619bd0
diff --git a/superset-frontend/src/dashboard/reducers/dashboardState.js b/superset-frontend/src/dashboard/reducers/dashboardState.js index <HASH>..<HASH> 100644 --- a/superset-frontend/src/dashboard/reducers/dashboardState.js +++ b/superset-frontend/src/dashboard/reducers/dashboardState.js @@ -124,13 +124,16 @@ export default function dashboardStateReducer(state = {}, action) { }; }, [SET_DIRECT_PATH]() { - return { + const newState = { ...state, - // change of direct path (tabs) will reset current mounted tab - mountedTab: null, directPathToChild: action.path, directPathLastUpdated: Date.now(), }; + // change of direct path (tabs) will reset current mounted tab + // cannot just set mountedTab to null, + // as that is used when transitioning between tabs. + delete newState.mountedTab; + return newState; }, [SET_MOUNTED_TAB]() { // set current mounted tab after tab is really mounted to DOM
fix(dashboard): properly unset mountedTab in reducer (#<I>)
apache_incubator-superset
train
js
e2b5225e9052086d731a78192e0cdd3fac4734ba
diff --git a/samples/app/app-with-nested-object-list-view.js b/samples/app/app-with-nested-object-list-view.js index <HASH>..<HASH> 100644 --- a/samples/app/app-with-nested-object-list-view.js +++ b/samples/app/app-with-nested-object-list-view.js @@ -3,15 +3,15 @@ const Vue = require('./nativescript-vue') new Vue({ template: ` <page> - <list-view :items="items"> - <template scope="item"> + <list-view for="item in items"> + <v-template > <flexbox-layout class="line"> - <label :text="item.$index" ></label> + <label :text="$index" ></label> <label :text="item.text" ></label> <label :text="item.user.name" ></label> <label :text="item.user.meta.age" ></label> </flexbox-layout> - </template> + </v-template> </list-view> </page> `,
fix: update sample with new list-view syntax
nativescript-vue_nativescript-vue
train
js
3983c785b3e9410603a167d111caf12bfccc5500
diff --git a/packages/node_modules/@webex/plugin-meetings/src/reachability/index.js b/packages/node_modules/@webex/plugin-meetings/src/reachability/index.js index <HASH>..<HASH> 100755 --- a/packages/node_modules/@webex/plugin-meetings/src/reachability/index.js +++ b/packages/node_modules/@webex/plugin-meetings/src/reachability/index.js @@ -400,10 +400,17 @@ export default class Reachability extends StatelessWebexPlugin { setLatencyAndClose(peerConnection, elapsed) { const REACHABLE = 'reachable'; const UNREACHABLE = 'unreachable'; + const {CLOSED} = CONNECTION_STATE; const {key} = peerConnection; const resultKey = elapsed === null ? UNREACHABLE : REACHABLE; const intialState = {[REACHABLE]: 0, [UNREACHABLE]: 0}; + if (peerConnection.connectionState === CLOSED) { + LoggerProxy.logger.info(`Reachability:index#setLatencyAndClose --> Attempting to set latency of ${elapsed} on closed peerConnection.`); + + return; + } + this.clusterLatencyResults[key] = this.clusterLatencyResults[key] || intialState; this.clusterLatencyResults[key][resultKey] += 1;
fix(plugin-meetings): check peerConnection state before closing Fixes a bug in GDM Reachability where we call .close() on a connection that has already been closed. This check prevents that.
webex_spark-js-sdk
train
js
90f057e0cd2bd0a50f2daed799aa902bdb31eab1
diff --git a/test/test_package.py b/test/test_package.py index <HASH>..<HASH> 100644 --- a/test/test_package.py +++ b/test/test_package.py @@ -67,6 +67,22 @@ def test_install_requirements(): assert path.isdir(path.join(site_packages, '_pytest')) +def test_install_no_requirements(): + temp_workspace = path.join(TESTING_TEMP_DIR, + package.TEMP_WORKSPACE_NAME) + + pkg = package.Package(TESTING_TEMP_DIR) + pkg.requirements([]) + pkg.install_dependencies() + + site_packages = path.join(temp_workspace, + 'venv/lib/python2.7/site-packages') + if sys.platform == 'win32' or sys.platform == 'cygwin': + site_packages = path.join(temp_workspace, "venv\\lib\\site-packages") + + assert path.isdir(path.join(site_packages, '_pytest')) + + def test_default_virtualenv(): temp_workspace = path.join(TESTING_TEMP_DIR, package.TEMP_WORKSPACE_NAME)
test(package): fix typeerror with blank reqs
rackerlabs_lambda-uploader
train
py
b37cc3d6c1f7d9f2b94dc912b4698b0143c5d4ee
diff --git a/src/components/IntlTelInputApp.js b/src/components/IntlTelInputApp.js index <HASH>..<HASH> 100644 --- a/src/components/IntlTelInputApp.js +++ b/src/components/IntlTelInputApp.js @@ -257,13 +257,13 @@ class IntlTelInputApp extends Component { let selectedIndex = 0; if (countryCode && countryCode !== 'auto') { - for (let i = 0, max = this.countries.length; i < max; i++) { - if (this.countries[i].iso2 === countryCode) { - selectedIndex = i; - } - } + selectedIndex = this.preferredCountries.findIndex((country) => country.iso2 === countryCode); - selectedIndex += this.preferredCountries.length; + if (selectedIndex === -1) { + selectedIndex = this.countries.findIndex((country) => country.iso2 === countryCode); + if (selectedIndex === -1) selectedIndex = 0; + selectedIndex += this.preferredCountries.length; + } } if (this.state.showDropdown) {
fix: highlight country from prefered list
patw0929_react-intl-tel-input
train
js
4c69e31e4fb6e1e2b90713e5b214375e02acfa12
diff --git a/services/datalad/datalad_service/handlers/snapshots.py b/services/datalad/datalad_service/handlers/snapshots.py index <HASH>..<HASH> 100644 --- a/services/datalad/datalad_service/handlers/snapshots.py +++ b/services/datalad/datalad_service/handlers/snapshots.py @@ -54,7 +54,7 @@ class SnapshotResource(object): if not skip_publishing: # Publish after response - gevent.spawn(publish_snapshot, self.store, + gevent.spawn(publish_snapshot, ds_path, dataset, req.cookies, snapshot) except SnapshotExistsException as err: resp.media = {'error': repr(err)}
fix(publish): Fix type error on initial publish_snapshot
OpenNeuroOrg_openneuro
train
py
ff9f5077ff3c4e22e725c67b3f78f470c0d1a31e
diff --git a/client/deis.py b/client/deis.py index <HASH>..<HASH> 100755 --- a/client/deis.py +++ b/client/deis.py @@ -205,8 +205,8 @@ class Settings(dict): with open(self._path, 'w') as f: f.write(data) except IOError: - self._logger.error("Could not write to settings file at '~/.deis/client.json'. \ -Do you have the right file permissions?") + logging.getLogger(__name__).error("Could not write to settings file at \ +'~/.deis/client.json' Do you have the right file permissions?") sys.exit(1) return data
fix(client): _logger doesn't exist for settings
deis_deis
train
py
db7ece68dcbd0dc6d2e70f4fe683629161d3d861
diff --git a/src/components/Module/index.js b/src/components/Module/index.js index <HASH>..<HASH> 100644 --- a/src/components/Module/index.js +++ b/src/components/Module/index.js @@ -1,2 +1 @@ export * from './Module'; -export default from './Module';
fix(Module): fix wrong re-export in Module/index.js (#<I>)
carbon-design-system_carbon-components-react
train
js
369a6613d46f212a20df6e5551dd3d4f7b1d17ae
diff --git a/test/config/downloader.js b/test/config/downloader.js index <HASH>..<HASH> 100644 --- a/test/config/downloader.js +++ b/test/config/downloader.js @@ -51,6 +51,14 @@ module.exports = { 'firmata': false }, + gh_master_branch_fw: { + 'name': 'test_firmware5', + 'deviceID': 0x01, + 'creatorID': 0x00, + 'repo': 'git+https://github.com/test/test-package', + 'firmata': false + }, + manifest: { 'backpack': { 'bins': '/firmware/bin/backpack/',
feat: added a new test firmware for gh master branch usage
nodebots_nodebots-interchange
train
js
ff98bcda9b09f973b134dbc54b4a298770337bf2
diff --git a/lib/instrumentation/modules/elasticsearch.js b/lib/instrumentation/modules/elasticsearch.js index <HASH>..<HASH> 100644 --- a/lib/instrumentation/modules/elasticsearch.js +++ b/lib/instrumentation/modules/elasticsearch.js @@ -40,11 +40,14 @@ module.exports = function (elasticsearch, agent, version, enabled) { } return original.apply(this, args) } else { - var p = original.apply(this, arguments) - p.then(function () { - span.end() - }) - return p + return original.apply(this, arguments) + .then(function (originalP) { + span.end() + return originalP + }, function (err) { + span.end() + throw err + }) } } else { agent.logger.debug('could not instrument elasticsearch request %o', { id: id })
fix: handle promise rejection in case elasticsearch client throws (#<I>) Fixes: #<I>
elastic_apm-agent-nodejs
train
js
1cb8456bec9cfeab2faaae35dcd93f5882f033a6
diff --git a/src/cli/cms/editor/handlebars/folders.js b/src/cli/cms/editor/handlebars/folders.js index <HASH>..<HASH> 100755 --- a/src/cli/cms/editor/handlebars/folders.js +++ b/src/cli/cms/editor/handlebars/folders.js @@ -3,7 +3,7 @@ import recursiveFolder from './recursiveFolder' export default function folders(obj, index, link, translate) { var res - if (obj.length > 0) { + if (obj && obj.length > 0) { if(link != null && link !== 'null') { var links = link.replace(/^\//, '').split(path.sep) links.pop()
fix: adding a test on object's availability
abecms_abecms
train
js
636a141a4ab3c4c9a490aea6956b32fec2324e08
diff --git a/packages/netlify-cms-backend-github/src/AuthenticationPage.js b/packages/netlify-cms-backend-github/src/AuthenticationPage.js index <HASH>..<HASH> 100644 --- a/packages/netlify-cms-backend-github/src/AuthenticationPage.js +++ b/packages/netlify-cms-backend-github/src/AuthenticationPage.js @@ -17,7 +17,7 @@ export default class GitHubAuthenticationPage extends React.Component { siteId: PropTypes.string, authEndpoint: PropTypes.string, config: ImmutablePropTypes.map, - clearHash: PropTypes.function, + clearHash: PropTypes.func, }; state = {}; diff --git a/packages/netlify-cms-backend-gitlab/src/AuthenticationPage.js b/packages/netlify-cms-backend-gitlab/src/AuthenticationPage.js index <HASH>..<HASH> 100644 --- a/packages/netlify-cms-backend-gitlab/src/AuthenticationPage.js +++ b/packages/netlify-cms-backend-gitlab/src/AuthenticationPage.js @@ -17,7 +17,7 @@ export default class GitLabAuthenticationPage extends React.Component { siteId: PropTypes.string, authEndpoint: PropTypes.string, config: ImmutablePropTypes.map, - clearHash: PropTypes.function, + clearHash: PropTypes.func, }; state = {};
chore: fix `function` prop-type (#<I>)
netlify_netlify-cms
train
js,js
ef9102d4fc14d40101c8cc935511a77b49f3b17b
diff --git a/aws/hosted_zones.go b/aws/hosted_zones.go index <HASH>..<HASH> 100644 --- a/aws/hosted_zones.go +++ b/aws/hosted_zones.go @@ -10,6 +10,7 @@ var hostedZoneIDsMap = map[string]string{ "us-west-1": "Z2F56UZL2M1ACD", "eu-west-1": "Z1BKCTXD74EZPE", "eu-west-2": "Z3GKZC51ZF0DB4", + "eu-west-3": "Z3R1K369G5AVDG", "eu-central-1": "Z21DNDUVLTQW6Q", "ap-south-1": "Z11RGJOFQNVJUP", "ap-southeast-1": "Z3O0J2DXBE1FTB",
feat(eu-west-3): update hosted zones region map
terraform-providers_terraform-provider-aws
train
go
ee0c6fb388376d639823388e3b93fa3beea23402
diff --git a/lib/platform/git/storage.js b/lib/platform/git/storage.js index <HASH>..<HASH> 100644 --- a/lib/platform/git/storage.js +++ b/lib/platform/git/storage.js @@ -35,6 +35,7 @@ class Storage { await git.raw(['reset', '--hard']); await git.checkout(branchName); await git.raw(['reset', '--hard', 'origin/' + branchName]); + await git.clean('-fd'); } // istanbul ignore next @@ -151,6 +152,7 @@ class Storage { async function createBranch(branchName, sha) { await git.reset('hard'); + await git.clean('-fd'); await git.checkout(['-B', branchName, sha]); await git.push(['origin', branchName, '--force']); }
fix(gitFs): clean branches
renovatebot_renovate
train
js
fa3eee8fd9ca08d7842970c41aec1a8ebcf22f35
diff --git a/src/client/actions/GuildDelete.js b/src/client/actions/GuildDelete.js index <HASH>..<HASH> 100644 --- a/src/client/actions/GuildDelete.js +++ b/src/client/actions/GuildDelete.js @@ -28,6 +28,9 @@ class GuildDeleteAction extends Action { }; } + for (const channel of guild.channels.values()) this.client.channels.remove(channel.id); + if (guild.voiceConnection) guild.voiceConnection.disconnect(); + // Delete guild client.guilds.remove(guild.id); client.emit(Events.GUILD_DELETE, guild);
fix(GuildDelete): disconnect voice and cleanup GuildChannels (#<I>)
discordjs_discord.js
train
js
3e93fd5c16fa4579165749c4733e2aef566e7f5b
diff --git a/src/utils/dev.js b/src/utils/dev.js index <HASH>..<HASH> 100644 --- a/src/utils/dev.js +++ b/src/utils/dev.js @@ -8,7 +8,7 @@ const isEmpty = require('lodash/isEmpty') const { supportsBackgroundFunctions } = require('../lib/account') -const { exit: failAndExit, log, warn } = require('./command-helpers') +const { error: failAndExit, log, warn } = require('./command-helpers') const { loadDotEnvFiles } = require('./dot-env') const { NETLIFYDEVLOG } = require('./logo')
fix(dev): fixes an issue where errors in the `dev` command where not shown (#<I>) This caused the CLI to exit silently without any further information for the user about the problem. Fixes #<I>
netlify_cli
train
js
106b651b544fcf4fffc8743a307571f74108f52b
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -203,6 +203,7 @@ class IpfsRepo { } module.exports = IpfsRepo +module.exports.repoVersion = repoVersion function ignoringIf (cond, cb) { return (err) => {
feat: export the current repo version. (#<I>)
ipfs_js-ipfs-repo
train
js
436a3ef38643b43b88b306510ab5fb1b9e2e0ea2
diff --git a/src/Models/Corporation/CorporationMemberTracking.php b/src/Models/Corporation/CorporationMemberTracking.php index <HASH>..<HASH> 100644 --- a/src/Models/Corporation/CorporationMemberTracking.php +++ b/src/Models/Corporation/CorporationMemberTracking.php @@ -187,7 +187,7 @@ class CorporationMemberTracking extends Model /** * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function type() + public function ship() { return $this->belongsTo(InvType::class, 'ship_type_id', 'typeID');
refactor: rename type to ship to be more logic
eveseat_eveapi
train
php
b3d74d63a45f6bb65bfc9c3d9d774ba9d5c93c88
diff --git a/packages/d3fc-sample/src/bucket.js b/packages/d3fc-sample/src/bucket.js index <HASH>..<HASH> 100644 --- a/packages/d3fc-sample/src/bucket.js +++ b/packages/d3fc-sample/src/bucket.js @@ -4,8 +4,10 @@ export default function() { var bucketSize = 10; - var bucket = (data) => range(0, Math.ceil(data.length / bucketSize)) - .map((i) => data.slice(i * bucketSize, (i + 1) * bucketSize)); + var bucket = (data) => bucketSize <= 1 + ? data.map((d) => [d]) + : range(0, Math.ceil(data.length / bucketSize)) + .map((i) => data.slice(i * bucketSize, (i + 1) * bucketSize)); bucket.bucketSize = function(x) { if (!arguments.length) {
fix: bucket utility now returns the same number of buckets as the data length if the bucket size is less than 1
d3fc_d3fc
train
js
c49b6270205660f28ee1bed8b6a0e9636cb4eb0c
diff --git a/src/webpack.js b/src/webpack.js index <HASH>..<HASH> 100644 --- a/src/webpack.js +++ b/src/webpack.js @@ -27,7 +27,10 @@ function svgrLoader(source) { '@babel/preset-react', ['@babel/preset-env', { modules: false }], ], - plugins: ['@babel/plugin-transform-react-constant-elements'], + plugins: [ + '@babel/plugin-transform-react-constant-elements', + '@babel/plugin-proposal-object-rest-spread', + ], }, (err, result) => { if (err) reject(err)
fix(loader): add missing babel-plugin (#<I>)
smooth-code_svgr
train
js
7063927503b75f88622b2d3ab49f111942aaefaf
diff --git a/src/foremast/configs/prepare_configs.py b/src/foremast/configs/prepare_configs.py index <HASH>..<HASH> 100644 --- a/src/foremast/configs/prepare_configs.py +++ b/src/foremast/configs/prepare_configs.py @@ -58,6 +58,7 @@ def process_git_configs(git_short=''): LOG.info('Pipeline configuration not available, using defaults.') app_configs['pipeline'] = {'env': ['stage', 'prod']} + # FIXME: Check response of .getbranch() is not False before trying to access as dict config_commit = file_lookup.server.getbranch(file_lookup.project_id, 'master')['commit']['id'] LOG.info('Commit ID used: %s', config_commit) app_configs['pipeline']['config_commit'] = config_commit
chore: FIXME to handle pyapi-gitlab return False
foremast_foremast
train
py
4033a17a5d3898ae763118ae8b862cf2bfa2265c
diff --git a/optlang/expression_parsing.py b/optlang/expression_parsing.py index <HASH>..<HASH> 100644 --- a/optlang/expression_parsing.py +++ b/optlang/expression_parsing.py @@ -83,7 +83,7 @@ def _parse_linear_expression(expression, expanded=False, **kwargs): if not (var.is_Symbol): if var == 1: constant = var - offset = coefficients[var] + offset = float(coefficients[var]) elif expanded: raise ValueError("Expression {} seems to be invalid".format(expression)) else: @@ -117,7 +117,7 @@ def _parse_quadratic_expression(expression, expanded=False): try: for term in terms: if term.is_Number: - offset += term + offset += float(term) continue if term.is_Pow: term = 1.0 * term
fix: convert obj offsets to floats Prevent objective values from being sympy types
biosustain_optlang
train
py
9f53c6c5bc3ce4e4fad02e1f062c6ad6f184d23e
diff --git a/superset/databases/commands/test_connection.py b/superset/databases/commands/test_connection.py index <HASH>..<HASH> 100644 --- a/superset/databases/commands/test_connection.py +++ b/superset/databases/commands/test_connection.py @@ -115,6 +115,12 @@ class TestConnectionDatabaseCommand(BaseCommand): if not engine.dialect.do_ping(conn): raise DBAPIError(None, None, None) + # Log succesful connection test with engine + event_logger.log_with_context( + action="test_connection_success", + engine=database.db_engine_spec.__name__, + ) + except (NoSuchModuleError, ModuleNotFoundError) as ex: event_logger.log_with_context( action=f"test_connection_error.{ex.__class__.__name__}",
chore: add success log whenever a connection is working (#<I>)
apache_incubator-superset
train
py
e7330e65a92b60dd405eb36e1f424e0553a1ae87
diff --git a/tornado/test/twisted_test.py b/tornado/test/twisted_test.py index <HASH>..<HASH> 100644 --- a/tornado/test/twisted_test.py +++ b/tornado/test/twisted_test.py @@ -51,7 +51,10 @@ skipIfNoTwisted = unittest.skipUnless(have_twisted, "twisted module not present" def save_signal_handlers(): saved = {} - for sig in [signal.SIGINT, signal.SIGTERM, signal.SIGCHLD]: + signals = [signal.SIGINT, signal.SIGTERM] + if hasattr(signal, "SIGCHLD"): + signals.append(signal.SIGCHLD) + for sig in signals: saved[sig] = signal.getsignal(sig) if "twisted" in repr(saved): # This indicates we're not cleaning up after ourselves properly.
test: Add hasattr check for SIGCHLD This name is not present on all platforms
tornadoweb_tornado
train
py
866b6f51df64cabcf46425e4f7e7f9533e348315
diff --git a/addon/services/loading-opacity-tracker.js b/addon/services/loading-opacity-tracker.js index <HASH>..<HASH> 100644 --- a/addon/services/loading-opacity-tracker.js +++ b/addon/services/loading-opacity-tracker.js @@ -12,7 +12,7 @@ export default class LoadingOpacityTrackerService extends Service { has(key) { return this.#opacities.has(key); } - clear(key) { - delete this.#opacities.clear(key); + clear() { + this.#opacities.clear(); } }
chore: remove superfluous complexity in clear() `delete` does not work on return values from functions. `Map.prototype.clear()` does not take an argument. (Perhaps `Map.prototype.delete()` was intended instead?)
ilios_common
train
js
eb13bcf79d266d88e7e8ad679545ae3f23dd2a66
diff --git a/lib/util/http-mgr.js b/lib/util/http-mgr.js index <HASH>..<HASH> 100644 --- a/lib/util/http-mgr.js +++ b/lib/util/http-mgr.js @@ -6,6 +6,7 @@ var logger = require('./logger'); var cache = {}; var listeners = []; +var newUrls; var TIMEOUT = 10000; var INTERVAL = 1000 * 60 * 3; var MAX_RULES_LEN = 1024 * 64; @@ -17,9 +18,15 @@ function triggerChange() { return; } throttleTimer = setTimeout(function() { + newUrls = {}; listeners.forEach(function(l) { l(); }); + Object.keys(newUrls).forEach(function(url) { + newUrls[url] = cache[url]; + }); + cache = newUrls; + newUrls = null; }, 30000); } @@ -79,6 +86,7 @@ function request(options, callback) { }); client.on('error', callbackHandler); client.end(); + return client; } exports.request = request; @@ -122,5 +130,8 @@ exports.add = function(url) { cache[url] = data = {body: ''}; updateBody(url, true); } + if (newUrls) { + newUrls[url] = 1; + } return data.body; };
feat: support for setting remote rules link in the rules.txt of the plugin
avwo_whistle
train
js
ce1e7da857f59c7c310b6e300bd950c8557a4f12
diff --git a/doc/src/js/examples/extend-editor.js b/doc/src/js/examples/extend-editor.js index <HASH>..<HASH> 100644 --- a/doc/src/js/examples/extend-editor.js +++ b/doc/src/js/examples/extend-editor.js @@ -300,9 +300,11 @@ export class TransformBoxRenderer { render(context, viewMatrix, projectionMatrix) { const {camera, scene, renderer} = this; + camera.matrix.fromArray(viewMatrix).invert(); camera.updateMatrixWorld(true); camera.projectionMatrix.fromArray(projectionMatrix); + camera.projectionMatrixInverse.fromArray(projectionMatrix).invert(); renderer.resetState(); renderer.render(scene, camera); @@ -319,7 +321,6 @@ export class TransformBoxRenderer { const [viewportX, viewportY] = canvasToViewport(pixelPoint, canvas); pointer.set(viewportX, viewportY); - camera.projectionMatrixInverse.copy(camera.projectionMatrix).invert(); raycaster.setFromCamera(pointer, camera); const intersections = raycaster.intersectObject(box.mesh);
fix: correct raycasting for editor Compute projection matrix inverse to ensure that raycasting is performed correctly for editor objects.
mapillary_mapillary-js
train
js
ae81a0f4be897ef118017a8f3015d4232d1fb0df
diff --git a/packages/vaex-core/setup.py b/packages/vaex-core/setup.py index <HASH>..<HASH> 100644 --- a/packages/vaex-core/setup.py +++ b/packages/vaex-core/setup.py @@ -20,7 +20,7 @@ url = 'https://www.github.com/maartenbreddels/vaex' # TODO: can we do without requests and progressbar2? # TODO: after python2 supports frops, future and futures can also be dropped # TODO: would be nice to have astropy only as dep in vaex-astro -install_requires_core = ["numpy>=1.11", "astropy>=2", "aplus", "tabulate>=0.8.3", +install_requires_core = ["numpy>=1.16", "astropy>=2", "aplus", "tabulate>=0.8.3", "future>=0.15.2", "pyyaml", "progressbar2", "psutil>=1.2.1", "requests", "six", "cloudpickle", "pandas", "dask[array]", "nest-asyncio>=1.3.3"] if sys.version_info[0] == 2:
chore: pin numpy to appearently compatible binary with wheels
vaexio_vaex
train
py
dc83819262cd786b947754df4e6d712d21b36dde
diff --git a/src/cobra/manipulation/delete.py b/src/cobra/manipulation/delete.py index <HASH>..<HASH> 100644 --- a/src/cobra/manipulation/delete.py +++ b/src/cobra/manipulation/delete.py @@ -4,8 +4,6 @@ from __future__ import absolute_import from ast import And, NodeTransformer -from six import iteritems, string_types - from cobra.core.gene import ast2str, eval_gpr, parse_gpr @@ -111,7 +109,7 @@ def find_gene_knockout_reactions( """ potential_reactions = set() for gene in gene_list: - if isinstance(gene, string_types): + if isinstance(gene, str): gene = cobra_model.genes.get_by_id(gene) potential_reactions.update(gene._reaction) gene_set = {str(i) for i in gene_list} @@ -223,7 +221,7 @@ def remove_genes(cobra_model, gene_list, remove_reactions=True): remover = _GeneRemover(gene_id_set) ast_rules = get_compiled_gene_reaction_rules(cobra_model) target_reactions = [] - for reaction, rule in iteritems(ast_rules): + for reaction, rule in ast_rules.items(): if reaction.gene_reaction_rule is None or len(reaction.gene_reaction_rule) == 0: continue # reactions to remove
refactor: remove six usage in delete.py
opencobra_cobrapy
train
py
081351ec1d228bad6777a6ac3e07fc978e3f013f
diff --git a/src/func/alias.js b/src/func/alias.js index <HASH>..<HASH> 100644 --- a/src/func/alias.js +++ b/src/func/alias.js @@ -49,6 +49,10 @@ export async function updateAliasSet( const oldSetItems: Array<Alias> = oldSet ? oldSet.related('aliases').toJSON() : []; + if (_.isEmpty(oldSetItems) && _.isEmpty(newSetItems)) { + return oldSet; + } + const addedItems = getAddedItems(oldSetItems, newSetItems, comparisonFunc); const removedItems = @@ -68,7 +72,7 @@ export async function updateAliasSet( if (isSetUnmodified) { // No action - set has not changed - return Promise.resolve(oldSet); + return oldSet; } const newSet = await createNewSetWithItems(
fix(func): handle case where old and new alias sets are empty
bookbrainz_bookbrainz-data-js
train
js
3e426c93017dfee06fa8af7efbbc602910e4354f
diff --git a/src/jquery.draggable.js b/src/jquery.draggable.js index <HASH>..<HASH> 100644 --- a/src/jquery.draggable.js +++ b/src/jquery.draggable.js @@ -76,13 +76,13 @@ var fn = Draggable.prototype; fn.init = function() { - this.calculate_positions(); + this.calculate_dimensions(); this.$container.css('position', 'relative'); this.disabled = false; this.events(); $(window).bind('resize.gridster-draggable', - throttle($.proxy(this.calculate_positions, this), 200)); + throttle($.proxy(this.calculate_dimensions, this), 200)); }; fn.events = function() { @@ -208,12 +208,13 @@ }; - fn.calculate_positions = function(e) { fn.manage_scroll = function(data) { this.scroll_in('x', data); this.scroll_in('y', data); }; + + fn.calculate_dimensions = function(e) { this.window_height = $window.height(); this.window_width = $window.width(); };
chore: rename calculate_positions to calculate_dimensions
ducksboard_gridster.js
train
js
0d3af8b3d78d8ee6884d733e69f853b3010c3816
diff --git a/ddl/ddl_worker_test.go b/ddl/ddl_worker_test.go index <HASH>..<HASH> 100644 --- a/ddl/ddl_worker_test.go +++ b/ddl/ddl_worker_test.go @@ -267,7 +267,6 @@ func TestParallelDDL(t *testing.T) { // Table 3 order. require.Less(t, seqIDs[6], seqIDs[7]) require.Less(t, seqIDs[7], seqIDs[9]) - require.Less(t, seqIDs[9], seqIDs[10]) } func TestJobNeedGC(t *testing.T) {
test: fix unstable test `TestParallelDDL` (#<I>) close pingcap/tidb#<I>
pingcap_tidb
train
go
900a1321ffefdbefa0ee40e8bb8e1d2434360027
diff --git a/test/scenario_test/bgp_router_test.py b/test/scenario_test/bgp_router_test.py index <HASH>..<HASH> 100644 --- a/test/scenario_test/bgp_router_test.py +++ b/test/scenario_test/bgp_router_test.py @@ -431,7 +431,6 @@ class GoBGPTestBase(unittest.TestCase): self.quaggas = {'g2': g2, 'g3': g3} g2.local('gobgp global rib add 50.0.0.0/24') - g3.local('gobgp global rib add 50.0.0.0/24 med 10') g1.add_peer(g2) g2.add_peer(g1) @@ -442,6 +441,8 @@ class GoBGPTestBase(unittest.TestCase): self.test_02_check_gobgp_global_rib() + g3.local('gobgp global rib add 50.0.0.0/24 med 10') + paths = g1.get_adj_rib_out(g2, '50.0.0.0/24') self.assertTrue(len(paths) == 0) paths = g1.get_adj_rib_out(g3, '50.0.0.0/24')
test: fix bug of bgp_router_test.py Since g3's route (MED <I>) is weaker than g2's, g3's route should not be advertised to g2 from g1. But when g3's route arrives on g1 before g2's, g1 advertises g3's route. This commit ensures g3's route come after g2's route
osrg_gobgp
train
py
f59cbe5390c01744e1b601ab47299ce493406a5c
diff --git a/synth.py b/synth.py index <HASH>..<HASH> 100644 --- a/synth.py +++ b/synth.py @@ -22,6 +22,7 @@ java.common_templates(excludes=[ 'README.md', '.github/ISSUE_TEMPLATE/bug_report.md', '.kokoro/presubmit/integration.cfg', + '.kokoro/nightly/integration.cfg', '.kokoro/presubmit/java7.cfg', '.kokoro/continuous/java7.cfg', '.kokoro/nightly/java7.cfg',
chore: skip nightly IT cfg for generation (#<I>)
googleapis_cloud-bigtable-client
train
py
380ba2565b59831ca21175d86ae483c76702270f
diff --git a/packages/icon/src/react/index.js b/packages/icon/src/react/index.js index <HASH>..<HASH> 100644 --- a/packages/icon/src/react/index.js +++ b/packages/icon/src/react/index.js @@ -5,17 +5,18 @@ import React from 'react' import icons from './icons' -const ids = Object.keys(icons).reduce((acc, id) => { +export const ids = Object.keys(icons).reduce((acc, id) => { acc[id] = `${id}` return acc }, {}) -const sizes = { +export const sizes = { small: 'small', medium: 'medium', large: 'large' } -const colors = Object.keys(core.colors) + +export const colors = Object.keys(core.colors) .filter(c => !/gradient/.test(c)) .reduce((acc, c) => { acc[c] = c
feat(icon): export statics separately
pluralsight_design-system
train
js
a6bc78e607b889eaa643520409bc6df0e61d5691
diff --git a/packages/@vue/cli-service/lib/commands/serve.js b/packages/@vue/cli-service/lib/commands/serve.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-service/lib/commands/serve.js +++ b/packages/@vue/cli-service/lib/commands/serve.js @@ -2,8 +2,7 @@ const { info, error, hasYarn, - openBrowser, - clearConsole + openBrowser } = require('@vue/cli-shared-utils') const defaults = { @@ -25,7 +24,6 @@ module.exports = (api, options) => { '--https': `use https (default: ${defaults.https})` } }, args => { - clearConsole() info('Starting development server...') api.setMode(args.mode || defaults.mode)
chore: do not clear screen when serving so that warnings can be seen
vuejs_vue-cli
train
js
358c75b362f0603a0364eced893bad773021233c
diff --git a/lib/plugins/index.js b/lib/plugins/index.js index <HASH>..<HASH> 100644 --- a/lib/plugins/index.js +++ b/lib/plugins/index.js @@ -455,9 +455,15 @@ function getRulesFromPlugins(type, req, res, callback) { requestRules(_options, function(err, body, values, raw) { body = (body || '') + (!isResRules && plugin._rules ? '\n' + plugin._rules : ''); if (body || values) { + if (values && plugin._values) { + var vals = extend({}, plugin._values); + values = extend(vals, values); + } else { + values = values || plugin._values; + } results[i] = { text: body, - values: values ? extend(values, plugin._values) : plugin._values, + values: values, root: plugin.path }; }
feat: Support set the internal values of the plugin
avwo_whistle
train
js
d1b7d08517a5f9766e644014062be1db2088a76b
diff --git a/algolia/search/requests_indexing.go b/algolia/search/requests_indexing.go index <HASH>..<HASH> 100644 --- a/algolia/search/requests_indexing.go +++ b/algolia/search/requests_indexing.go @@ -42,3 +42,8 @@ type getObjectsReq struct { type batchReq struct { Requests []BatchOperation `json:"requests,omitempty"` } + +type PartialUpdateOperation struct { + Operation string `json:"_operation"` + Value interface{} `json:"value"` +}
feat(search): expose built-in operations for partial updates with PartialUpdateOperation
algolia_algoliasearch-client-go
train
go
de409f9e59b988d2210c3c18e3bf32c3cb328b3d
diff --git a/lib/tool.js b/lib/tool.js index <HASH>..<HASH> 100644 --- a/lib/tool.js +++ b/lib/tool.js @@ -19,7 +19,7 @@ class WebpackTool { }, config); this.ready = false; this.startTime = Date.now(); - this.cli = utils.getCLI(); + this.cli = utils.getCLI(this.config.cli); } /* istanbul ignore next */ diff --git a/lib/utils.js b/lib/utils.js index <HASH>..<HASH> 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -96,7 +96,10 @@ utils.getPort = (port) => { }); }; -utils.getCLI = () => { +utils.getCLI = (cli) => { + if (cli && cli.name && cli.cmd) { + return cli; + } return global.EASY_CLI || { name: 'easywebpack-cli', cmd: 'easy' }; }; diff --git a/package.json b/package.json index <HASH>..<HASH> 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-tool", - "version": "4.4.8", + "version": "4.4.9", "description": "webpack build and webpack build result web view", "keywords": [ "webpack",
fix: customize cli when process mode
easy-team_webpack-tool
train
js,js,json
bae3aaab8f6b3ec60521d5fd2303a9c4bb052b1b
diff --git a/packages/webpack-cli/lib/bootstrap.js b/packages/webpack-cli/lib/bootstrap.js index <HASH>..<HASH> 100644 --- a/packages/webpack-cli/lib/bootstrap.js +++ b/packages/webpack-cli/lib/bootstrap.js @@ -64,7 +64,7 @@ const runCLI = async (cliArgs) => { parsedArgsOpts.entry = entry; } - await cli.run(parsedArgsOpts, flags); + await cli.run(parsedArgsOpts); } catch (error) { logger.error(error); process.exit(2);
chore: fix args to run method (#<I>)
webpack_webpack-cli
train
js
0b3170f717bd4c54777b9c0de49fa3db0b43ca79
diff --git a/packages/bonde-styleguide/src/content/Title/Title.js b/packages/bonde-styleguide/src/content/Title/Title.js index <HASH>..<HASH> 100644 --- a/packages/bonde-styleguide/src/content/Title/Title.js +++ b/packages/bonde-styleguide/src/content/Title/Title.js @@ -46,9 +46,9 @@ H3.displayName = 'Title.H3' const H4 = createTitle('h4', { displayName: 'Title.H4', fontSize: 18, - fontWeight: 'normal', + fontWeight: 800, lineHeight: 1.39, - color: '#424242' + color: '#000' }) H4.displayName = 'Title.H4'
fix(styleguide): become Title.H3 bold
nossas_bonde-client
train
js
7ee9f2f1888fe93bd197c205fff63b90ad54b6aa
diff --git a/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js b/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js index <HASH>..<HASH> 100644 --- a/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js +++ b/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js @@ -570,7 +570,7 @@ class EditorToolbar extends React.Component { <ToolbarContainer> <ToolbarSectionBackLink onClick={() => { - if (history.length > 0) { + if (history.length > 2) { history.goBack(); } else { history.push(`/collections/${collection.get('name')}`);
fix(editor): proper length check for history when going back in editor (#<I>)
netlify_netlify-cms
train
js
b5f06d6ac8065a9af48ff327ad43d0e7ea2a11a2
diff --git a/test/lib/SSML.test.js b/test/lib/SSML.test.js index <HASH>..<HASH> 100644 --- a/test/lib/SSML.test.js +++ b/test/lib/SSML.test.js @@ -33,6 +33,18 @@ describe('bin/lib/SSML', () => { expect(ssml.output()).to.eq(expected); }); + it('add text that only outputs on fallback', () => { + const expected = '<speak>This is the only output.</speak>'; + + sample.forEach((sentence) => { + ssml.add(sentence, { fallback: true }); + }); + + ssml.add('This is the only output.'); + + expect(ssml.output()).to.eq(expected); + }); + it('apply inner repeatable of nested add', () => { const ssmlAdd = new SSML();
test(SSML): Add missing SSML coverage
ImAdamTM_actions-ai-app
train
js
171c89a96d56b50dc6166cabdcdd8978f1f0e737
diff --git a/lib/https/index.js b/lib/https/index.js index <HASH>..<HASH> 100644 --- a/lib/https/index.js +++ b/lib/https/index.js @@ -104,6 +104,12 @@ function handleWebsocket(socket, clientIp, callback) { util.handlePluginRules(socket, rulesMgr); if (filter.rule) { plugin = null; + } else { + var newRules = rulesMgr.resolveRules(fullUrl); + if (newRules.rule) { + _rules.rule = newRules.rule; + plugin = pluginMgr.getPluginByRuleUrl(util.rule.getUrl(newRules.rule)); + } } } connect();
feat: handle websocket plugin rules
avwo_whistle
train
js
962849576b03e4a6c4eb42ffe65b7f7ac8929845
diff --git a/lib/application_kronos.js b/lib/application_kronos.js index <HASH>..<HASH> 100644 --- a/lib/application_kronos.js +++ b/lib/application_kronos.js @@ -26,14 +26,13 @@ class ApplicationKronos extends Koa { * instead of a fixed one. */ callback() { - const self = this; if (!this.listeners('error').length) this.on('error', this.onerror); return (req, res) => { res.statusCode = 404; const ctx = this.createContext(req, res); onFinished(res, ctx.onerror); - self.generatorChain(ctx).then(() => respond(ctx)).catch(ctx.onerror); + this.generatorChain(ctx).then(() => respond(ctx)).catch(ctx.onerror); }; } @@ -78,7 +77,6 @@ class ApplicationKronos extends Koa { _updateAppCallback() { this.generatorChain = compose(this.middleware); } - } /**
refactor: use this if possible
Kronos-Integration_kronos-koa
train
js
ffeca24412b5586d9b0d4d4e25ef4d05918d5484
diff --git a/test/cases/wasm/imports-multiple/module.js b/test/cases/wasm/imports-multiple/module.js index <HASH>..<HASH> 100644 --- a/test/cases/wasm/imports-multiple/module.js +++ b/test/cases/wasm/imports-multiple/module.js @@ -1,6 +1,6 @@ import { getResult } from "./wasm.wasm"; -export var result = getResult(); +export var result = getResult(1); export function getNumber() { return 20;
feat(wasm): pass arg in test
webpack_webpack
train
js
13e99ffff126d2bacbbbddddd76e421f9433632e
diff --git a/packages/resolve-scripts/src/server/index.js b/packages/resolve-scripts/src/server/index.js index <HASH>..<HASH> 100644 --- a/packages/resolve-scripts/src/server/index.js +++ b/packages/resolve-scripts/src/server/index.js @@ -22,7 +22,8 @@ const appDirectory = fs.realpathSync(process.cwd()); const useYarn = fs.existsSync(path.resolve(appDirectory, 'yarn.lock')); const io = socketIO(server, { - path: `${rootDirectory || ''}/socket` + path: `${rootDirectory || ''}/socket`, + serveClient: false }); io.on('connection', connectionHandler);
fix(resolve-scripts): use server bundling without node_modules for socket.io
reimagined_resolve
train
js
f952a7e4859c6bdef9bc8fd13e84274122a6b3d7
diff --git a/lib/components/map/vehicle-rental-overlay.js b/lib/components/map/vehicle-rental-overlay.js index <HASH>..<HASH> 100644 --- a/lib/components/map/vehicle-rental-overlay.js +++ b/lib/components/map/vehicle-rental-overlay.js @@ -32,7 +32,9 @@ class VehicleRentalOverlay extends MapLayer { } componentDidMount () { - if (this.props.visible) this._startRefreshing() + const {companies, mapSymbols, name, visible} = this.props + if (visible) this._startRefreshing() + if (!mapSymbols) console.warn(`No map symbols provided for layer ${name}`, companies) } componentWillUnmount () { @@ -214,8 +216,7 @@ class VehicleRentalOverlay extends MapLayer { } render () { - const { mapSymbols, stations, companies } = this.props - if (!mapSymbols) console.warn(`No map symbols provided for layer ${this.props.name}`, companies) + const { stations, companies } = this.props let filteredStations = stations if (companies) { filteredStations = stations.filter(
refactor(vehicle-overlay): move noisy warning to componentDidMount
opentripplanner_otp-react-redux
train
js
916f7e923aed50e44d3a981f8b684021fd85da40
diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py index <HASH>..<HASH> 100644 --- a/superset/connectors/sqla/models.py +++ b/superset/connectors/sqla/models.py @@ -45,7 +45,6 @@ from sqlalchemy import ( Table, Text, ) -from sqlalchemy.exc import CompileError from sqlalchemy.orm import backref, Query, relationship, RelationshipProperty, Session from sqlalchemy.schema import UniqueConstraint from sqlalchemy.sql import column, ColumnElement, literal_column, table, text @@ -666,7 +665,9 @@ class SqlaTable( # pylint: disable=too-many-public-methods,too-many-instance-at col["type"] = db_engine_spec.column_datatype_to_string( col["type"], db_dialect ) - except CompileError: + # Broad exception catch, because there are multiple possible exceptions + # from different drivers that fall outside CompileError + except Exception: # pylint: disable=broad-except col["type"] = "UNKNOWN" return cols
fix(dataset): fetch metadata on dataset creation may raise broad exceptions (#<I>) * fix(dataset): fetch metadata on dataset creation may raise broad driver exceptions
apache_incubator-superset
train
py
0797293acdd5060627349502fed3a5cc3064cae4
diff --git a/packages/cerebral-forms/src/field.test.js b/packages/cerebral-forms/src/field.test.js index <HASH>..<HASH> 100644 --- a/packages/cerebral-forms/src/field.test.js +++ b/packages/cerebral-forms/src/field.test.js @@ -93,6 +93,9 @@ describe('field', () => { controller.getSignal('fieldChanged')({field: 'form.password', value: 'abcdefghijklmnopqrstuvxyz'}) assert.equal(controller.getState('form.password.isValid'), false) assert.equal(controller.getState('form.repeatPassword.isValid'), false) + controller.getSignal('fieldChanged')({field: 'form.repeatPassword', value: 'notthesame'}) + assert.equal(controller.getState('form.password.isValid'), true) + assert.equal(controller.getState('form.repeatPassword.isValid'), false) controller.getSignal('fieldChanged')({field: 'form.repeatPassword', value: 'abcdefghijklmnopqrstuvxyz'}) assert.equal(controller.getState('form.password.isValid'), true) assert.equal(controller.getState('form.repeatPassword.isValid'), true)
test(forms): improve dependsOn tests
cerebral_cerebral
train
js
84e20970a0ea4f42b7952aac57e33e64b36395f2
diff --git a/aws/resource_aws_cloudwatch_query_definition.go b/aws/resource_aws_cloudwatch_query_definition.go index <HASH>..<HASH> 100644 --- a/aws/resource_aws_cloudwatch_query_definition.go +++ b/aws/resource_aws_cloudwatch_query_definition.go @@ -93,6 +93,9 @@ func resourceAwsCloudWatchQueryDefinitionRead(c context.Context, d *schema.Resou if err := d.Set("query", *qd.QueryString); err != nil { return diag.FromErr(err) } + if err := d.Set("query_definition_id", *qd.QueryDefinitionId); err != nil { + return diag.FromErr(err) + } var logGroups []string for _, lg := range qd.LogGroupNames {
refactor(aws_cloudwatch_query_definition): set query_definition_id in read
terraform-providers_terraform-provider-aws
train
go
0e8e2f6e6bbaf44a8fb67a24b5d7b970bc6c4928
diff --git a/views/js/qtiCreator/widgets/static/helpers/itemScrollingMethods.js b/views/js/qtiCreator/widgets/static/helpers/itemScrollingMethods.js index <HASH>..<HASH> 100644 --- a/views/js/qtiCreator/widgets/static/helpers/itemScrollingMethods.js +++ b/views/js/qtiCreator/widgets/static/helpers/itemScrollingMethods.js @@ -74,7 +74,7 @@ define(['i18n', 'jquery', 'util/typeCaster'], function (__, $, typeCaster) { const $form = widget.$form; let $wrapper = wrapType === 'inner' - ? widget.$container.children('[data-html-editable]').first(`.${wrapperTextCls}`) + ? widget.$container.children('[data-html-editable]').children(`.${wrapperTextCls}`) : widget.$container.parent(`.${wrapperIncludeCls}`); if (!$wrapper.length) {
fix: wrong selector for wrapper
oat-sa_extension-tao-itemqti
train
js
99c6ba97edb30aef228798520bc2d91613dbacfb
diff --git a/test/integration/boostrap.spec.js b/test/integration/boostrap.spec.js index <HASH>..<HASH> 100644 --- a/test/integration/boostrap.spec.js +++ b/test/integration/boostrap.spec.js @@ -1,34 +1,10 @@ -'use strict'; - - -process.env.NODE_ENV = 'test'; - - -/* dependencies */ -const mongoose = require('mongoose'); -const MONGODB_URI = 'mongodb://localhost/majifix-service'; - - -/* clean and restore database */ -const wipe = done => { - if (mongoose.connection && mongoose.connection.dropDatabase) { - mongoose.connection.dropDatabase(done); - } else { - done(); - } -}; - +import { connect, clear, drop } from '@lykmapipo/mongoose-test-helpers'; /* setup database */ -before(done => { - const options = { useNewUrlParser: true }; - mongoose.connect(MONGODB_URI, options, done); -}); - +before(done => connect(done)); /* clear database */ -before(wipe); +before(done => clear(done)); - -/* clear database */ -after(wipe); +/* drop database */ +after(done => drop(done));
chore(integration): implement to es6 and fix prettier errors
CodeTanzania_majifix-service
train
js
f6328faa932e2367400fb3a691e02168de925d43
diff --git a/routes/session.js b/routes/session.js index <HASH>..<HASH> 100644 --- a/routes/session.js +++ b/routes/session.js @@ -190,7 +190,7 @@ function sessionRoutes (server, options, next) { }) .then(function (session) { - if (!session) { + if (!request.query.include) { return reply().code(204) } reply(serialise(session)).code(200)
fix(session): return with <I> if `?include` not set
hoodiehq_hoodie-account-server
train
js
67ec743f32350936c200191b548af5d6d1c7d479
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -125,7 +125,7 @@ function initializeEntityPopup(searchOptions) { if (! document.getElementById('cwrc-entity-lookup') ) { $(document.body).append($.parseHTML( `<div id="cwrc-entity-lookup" class="modal fade"> - <div class="modal-dialog modal-lg"> + <div class="modal-dialog modal-lg ui-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
fix: fix search box focus issue <I>
cwrc_CWRC-PublicEntityDialogs
train
js
e40f51fb064f809f91306e9ea9c874118d0dec50
diff --git a/edxval/pacts/views.py b/edxval/pacts/views.py index <HASH>..<HASH> 100644 --- a/edxval/pacts/views.py +++ b/edxval/pacts/views.py @@ -31,8 +31,8 @@ def provider_state(request): } request_body = json.loads(request.body) state = request_body.get('state') + clear_database() if state in state_setup_mapping: print('Setting up provider state for state value: {}'.format(state)) - clear_database() state_setup_mapping[state]() return JsonResponse({'result': state})
refactor: move clear database call out of if condition
edx_edx-val
train
py
873a3a16ccf0a1973ff788c054d7049a41968563
diff --git a/website/siteConfig.js b/website/siteConfig.js index <HASH>..<HASH> 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -2,6 +2,10 @@ // site configuration options. const siteConfig = { + algolia: { + apiKey: "7c4587628ca223f7abcd82db137ad7b4", + indexName: "fuse_box", + }, baseUrl: "/", colors: { primaryColor: "#223351",
docs(website): Add search powered by Algolia
fuse-box_fuse-box
train
js
a345a26e5f7510fdd3abd172ce418b5c1bde7e11
diff --git a/src/Model.php b/src/Model.php index <HASH>..<HASH> 100644 --- a/src/Model.php +++ b/src/Model.php @@ -494,8 +494,9 @@ abstract class Model extends PhalconModel $realValue = next($value); } $bindKey = str_replace(['.'], '_', $key); + $column = isset($value['column']) ? $value['column'] : $key; $params['conditions'] .= ($params['conditions'] == "" ? "" : " AND ") . - " {$key} {$operator} :{$bindKey}: "; + " {$column} {$operator} :{$bindKey}: "; $params['bind'][$bindKey] = $realValue; } } else {
feat(model): process multiple conditions on same column
phwoolcon_phwoolcon
train
php
f614d16bac9146094edeb1dda94f3eb3910699bf
diff --git a/tests/Rules/RelationExistenceRuleTest.php b/tests/Rules/RelationExistenceRuleTest.php index <HASH>..<HASH> 100644 --- a/tests/Rules/RelationExistenceRuleTest.php +++ b/tests/Rules/RelationExistenceRuleTest.php @@ -174,10 +174,6 @@ class RelationExistenceRuleTest extends RuleTestCase ], [ 'Relation \'foo\' is not found in App\User model.', - 48, - ], - [ - 'Relation \'foo\' is not found in App\User model.', 49, ], [ @@ -188,6 +184,11 @@ class RelationExistenceRuleTest extends RuleTestCase 'Relation \'foo\' is not found in App\User model.', 51, ], + + [ + 'Relation \'foo\' is not found in App\User model.', + 52, + ], ]); }
fix: reorder expectations after stlye fix
nunomaduro_larastan
train
php
ee82683b42754b804006bf8b366ba95f1dbd6f66
diff --git a/swarm-replica/src/Replica.js b/swarm-replica/src/Replica.js index <HASH>..<HASH> 100644 --- a/swarm-replica/src/Replica.js +++ b/swarm-replica/src/Replica.js @@ -373,13 +373,11 @@ Replica.prototype.done = function (request) { var key_prefix = this.prefix + request.typeid; save_queue.forEach(function(rec){ rec.key = key_prefix + rec.key; - }); - save_queue.forEach(function(rec){ - rec.key = key_prefix + rec.key; if (!rec.value) { rec.value = ' '; } }); + Replica.trace && console.log('SAVE', save_queue); this.db.batch(save_queue, send_ops); } else { @@ -470,6 +468,7 @@ Replica.prototype.loadMeta = function (activeEntry) { console.error('data load failed', key, err); self.close(); } else { + Replica.trace && console.log('META', key, value); activeEntry.setMeta(new Entry.State(value)); } });
fix(replica): looks like a merge bug records were saved under doubled prefixes
gritzko_swarm
train
js
2f046596ddd196fe568f023dccd28f6dea7937d7
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -1,5 +1,5 @@ -import test from 'ava'; import path from 'path'; +import test from 'ava'; import {transform, transformFileAsync} from '@babel/core';
chore: Address import/order finding from xo
cfware_babel-plugin-template-html-minifier
train
js
a6788be39c74018b2ba94604688529028391b6ea
diff --git a/packages/node_modules/@webex/plugin-meetings/src/common/logs/logger-proxy.js b/packages/node_modules/@webex/plugin-meetings/src/common/logs/logger-proxy.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/plugin-meetings/src/common/logs/logger-proxy.js +++ b/packages/node_modules/@webex/plugin-meetings/src/common/logs/logger-proxy.js @@ -2,6 +2,7 @@ import LoggerConfig from './logger-config'; const LoggerProxy = { logger: { + info: () => { console.error('LoggerProxy->info#NO LOGGER DEFINED'); }, log: () => { console.error('LoggerProxy->log#NO LOGGER DEFINED'); }, error: () => { console.error('LoggerProxy->error#NO LOGGER DEFINED'); }, warn: () => { console.error('LoggerProxy->warn#NO LOGGER DEFINED'); }, @@ -13,6 +14,7 @@ const LoggerProxy = { LoggerProxy.set = (logger) => { if (!LoggerConfig.enable) { LoggerProxy.logger = { + info: () => {}, log: () => {}, error: () => {}, warn: () => {},
fix(meetings): add info to the logger
webex_spark-js-sdk
train
js
d82886047748b49a74943c8a8931deb2fe902654
diff --git a/packages/webpack/mixin.core.js b/packages/webpack/mixin.core.js index <HASH>..<HASH> 100644 --- a/packages/webpack/mixin.core.js +++ b/packages/webpack/mixin.core.js @@ -156,11 +156,11 @@ class WebpackMixin extends Mixin { Promise.resolve(argv.clean && this.clean()) .then(this.build) .then(this.logStats) - .then(this.runServer) + .then(this.runServer.bind(this, 'serve')) .catch(this.logError); } else { this.clean() - .then(this.runDevServer) + .then(this.runServer.bind(this, 'develop')) .catch(this.logError); } }, @@ -213,7 +213,7 @@ class WebpackMixin extends Mixin { }, handler: () => this.clean() - .then(this.runDevServer) + .then(this.runServer.bind(this, 'develop')) .catch(this.logError), }); }
refactor(webpack): update to untool/express' new hooks
untool_untool
train
js
f2424cfac1375433113e8daf7e75ebc84eda2d69
diff --git a/src/chart/RadarChart.js b/src/chart/RadarChart.js index <HASH>..<HASH> 100644 --- a/src/chart/RadarChart.js +++ b/src/chart/RadarChart.js @@ -103,7 +103,7 @@ class RadarChart extends Component { const currentMax = Math.max.apply(null, values); const currentMin = Math.min.apply(null, values); - return [Math.min(prev[0], currentMin), Math.max(prev[0], currentMax)]; + return [Math.min(prev[0], currentMin), Math.max(prev[1], currentMax)]; }, [Infinity, -Infinity]); const finalDomain = [domain && domain[0], domain && domain[1]];
fix(RadarChart): fix the bug of calculate extene in RadarChart
recharts_recharts
train
js
75c0ffaa68ac350b2a62df8ed5b6203024352c4e
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 @@ -217,3 +217,16 @@ class TestDataCloudLocalCli(TestDvc): self.assertTrue(os.path.isfile(cache_dir)) self.main(['status']) + + +class TestDataCloudErrorCLI(TestDvc): + def main_fail(self, args): + ret = main(args) + self.assertNotEqual(ret, 0) + + def test_error(self): + f = 'non-existing-file' + self.main_fail(['status', f]) + self.main_fail(['push', f]) + self.main_fail(['pull', f]) + self.main_fail(['fetch', f])
test: test CLI failures for push/pull/fetch/status
iterative_dvc
train
py