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 |
|---|---|---|---|---|---|
43be2a28d6591e87a95e24f0e30c9f1b79e429da
|
diff --git a/src/cmd/cmd.js b/src/cmd/cmd.js
index <HASH>..<HASH> 100644
--- a/src/cmd/cmd.js
+++ b/src/cmd/cmd.js
@@ -201,7 +201,7 @@ class Cmd {
.description(__('run a fast ethereum rpc simulator'))
.option('--testrpc', __('use ganache-cli (former "testrpc") as the rpc simulator [%s]', 'default'))
.option('-p, --port [port]', __('port to run the rpc simulator (default: %s)', '8545'))
- .option('-h, --host [host]', __('host to run the rpc simulator (default: %s)', 'localhost'))
+ .option('--host [host]', __('host to run the rpc simulator (default: %s)', 'localhost'))
.option('-a, --accounts [numAccounts]', __('number of accounts (default: %s)', '10'))
.option('-e, --defaultBalanceEther [balance]', __('Amount of ether to assign each test account (default: %s)', '100'))
.option('-l, --gasLimit [gasLimit]', __('custom gas limit (default: %s)', '8000000'))
|
fix(cmd): removes -h as an option for host for the simulator
|
embark-framework_embark
|
train
|
js
|
d72e55e78920f810bf223040458acd2c84a5e976
|
diff --git a/lib/workers/repository/process/lookup/index.js b/lib/workers/repository/process/lookup/index.js
index <HASH>..<HASH> 100644
--- a/lib/workers/repository/process/lookup/index.js
+++ b/lib/workers/repository/process/lookup/index.js
@@ -172,6 +172,14 @@ async function lookupUpdates(config) {
if (!config.lockedVersion) {
continue; // eslint-disable-line no-continue
}
+ // istanbul ignore if
+ if (rangeStrategy === 'bump') {
+ logger.trace(
+ { depName, currentValue, lockedVersion, toVersion },
+ 'Skipping bump because newValue is the same'
+ );
+ continue; // eslint-disable-line no-continue
+ }
update.updateType = 'lockfileUpdate';
update.fromVersion = lockedVersion;
update.displayFrom = lockedVersion;
|
fix: no bump if the value is unchanged
Closes #<I>
|
renovatebot_renovate
|
train
|
js
|
1dd0981c76f021f09f898f21ceaf8693f006f317
|
diff --git a/allauth/socialaccount/providers/facebook/views.py b/allauth/socialaccount/providers/facebook/views.py
index <HASH>..<HASH> 100644
--- a/allauth/socialaccount/providers/facebook/views.py
+++ b/allauth/socialaccount/providers/facebook/views.py
@@ -59,7 +59,7 @@ class FacebookOAuth2Adapter(OAuth2Adapter):
GRAPH_API_VERSION))
settings = app_settings.PROVIDERS.get(provider_id, {})
-
+ scope_delimiter = ','
authorize_url = settings.get('AUTHORIZE_URL', provider_default_auth_url)
access_token_url = GRAPH_API_URL + '/oauth/access_token'
expires_in_key = 'expires_in'
|
fix(facebook): Using comma delimeter to address social login failure with scopes
|
pennersr_django-allauth
|
train
|
py
|
65e4910618c6d6425f8dacf7cabaea6b5b450d92
|
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
@@ -48,7 +48,7 @@ if (typeof window !== 'undefined') {
window.addEventListener('storage', async (event) => {
if (event.key === 'nextauth.message') {
const message = JSON.parse(event.newValue)
- if (message.event && message.event === 'session' && message.data) {
+ if (message?.event === 'session' && message.data) {
// Ignore storage events fired from the same window that created them
if (__NEXTAUTH._clientId === message.clientId) {
return
|
fix: Add a null check to the window 'storage' event listener (#<I>)
* Add a null check to the window 'storage' event listener
While testing in Cypress it's possible to receive a null value on Storage Events when 'clear' is called and will cause errors as seen in #<I>.
* Update index.js
typo
* Update src/client/index.js
|
iaincollins_next-auth
|
train
|
js
|
c6e3ee6413493b142dde7fce9c9584fd5ac5b570
|
diff --git a/src/utils/ics.js b/src/utils/ics.js
index <HASH>..<HASH> 100644
--- a/src/utils/ics.js
+++ b/src/utils/ics.js
@@ -102,11 +102,11 @@ export const getRrule = (recurrence) => {
*/
export const download = (title, data) => {
const fileName = getFileName(title)
- const blob = getBlob(data)
if (window.hasOwnProperty('safari')) {
safariFileSave(data, fileName)
} else {
+ const blob = getBlob(data)
FileSaver.saveAs(blob, fileName)
}
-}
\ No newline at end of file
+}
|
fix: don't create blob until we need to (#<I>)
|
jshor_angular-addtocalendar
|
train
|
js
|
04880cb2f3623fb6703727221682f6b2da5bf9a3
|
diff --git a/test/dsl_test.go b/test/dsl_test.go
index <HASH>..<HASH> 100644
--- a/test/dsl_test.go
+++ b/test/dsl_test.go
@@ -330,7 +330,7 @@ func read(name string, contents string) fileOp {
return err
}
if res != contents {
- return fmt.Errorf("Read (name=%s) contents=%s differ from expected=%s", name, res, contents)
+ return fmt.Errorf("Read (name=%s) got=%d, expected=%d bytes: contents=%s differ from expected=%s", name, len(res), len(contents), res, contents)
}
return nil
}, Defaults}
|
test: Be more verbose on read errors
|
keybase_client
|
train
|
go
|
df7384b9816f254867a34482079497dd691eff31
|
diff --git a/test/functional/cursor_tests.js b/test/functional/cursor_tests.js
index <HASH>..<HASH> 100644
--- a/test/functional/cursor_tests.js
+++ b/test/functional/cursor_tests.js
@@ -4542,15 +4542,18 @@ describe('Cursor', function() {
const ReadPreference = this.configuration.require.ReadPreference;
const client = configuration.newClient(
{ w: 1, readPreference: ReadPreference.SECONDARY },
- { poolSize: 1, auto_reconnect: false }
+ { poolSize: 1, auto_reconnect: false, connectWithNoPrimary: true }
);
client.connect(function(err, client) {
+ expect(err).to.not.exist;
+
const db = client.db(configuration.db);
let collection, cursor, spy;
const close = e => cursor.close(() => client.close(() => done(e)));
Promise.resolve()
+ .then(() => new Promise(resolve => setTimeout(() => resolve(), 500)))
.then(() => db.createCollection('test_count_readPreference'))
.then(() => (collection = db.collection('test_count_readPreference')))
.then(() => collection.find())
|
test(cursor): ensure test for secondary allows secondary-only conn
|
mongodb_node-mongodb-native
|
train
|
js
|
448ae304dd4fe4f914fd694a1a458210eecf55cc
|
diff --git a/cwltool/process.py b/cwltool/process.py
index <HASH>..<HASH> 100644
--- a/cwltool/process.py
+++ b/cwltool/process.py
@@ -299,7 +299,8 @@ def relocateOutputs(outputObj, # type: Union[Dict[Text, Any],List[Di
if src == dst:
return
- if action == "move":
+ _action = action
+ if _action == "move":
# do not move anything if we are trying to move an entity from
# outside of the source directories
if any(os.path.commonprefix([path, src]) == path for path in source_directories):
@@ -310,8 +311,11 @@ def relocateOutputs(outputObj, # type: Union[Dict[Text, Any],List[Di
_relocate(dir_entry.path, fs_access.join(dst, dir_entry.name))
else:
shutil.move(src, dst)
+ else:
+ # we still need the files at the destination, so let's copy them
+ _action = "copy"
- elif action == "copy":
+ if _action == "copy":
_logger.debug("Copying %s to %s", src, dst)
if fs_access.isdir(src):
if os.path.isdir(dst):
|
fix: copy files if we couldn't move them
|
common-workflow-language_cwltool
|
train
|
py
|
673e820718acdcf466c5555fa2d75874622da243
|
diff --git a/semver.js b/semver.js
index <HASH>..<HASH> 100644
--- a/semver.js
+++ b/semver.js
@@ -934,13 +934,19 @@ Range.prototype.intersects = function (range, options) {
}
return this.set.some(function (thisComparators) {
- return range.set.some(function (rangeComparators) {
- return isSatisfiable(thisComparators, options) && thisComparators.every(function (thisComparator) {
- return isSatisfiable(rangeComparators, options) && rangeComparators.every(function (rangeComparator) {
- return thisComparator.intersects(rangeComparator, options)
- })
+ return (
+ isSatisfiable(thisComparators, options) &&
+ range.set.some(function (rangeComparators) {
+ return (
+ isSatisfiable(rangeComparators, options) &&
+ thisComparators.every(function (thisComparator) {
+ return rangeComparators.every(function (rangeComparator) {
+ return thisComparator.intersects(rangeComparator, options)
+ })
+ })
+ )
})
- })
+ )
})
}
|
fix: Improve performance of isSatisfiable function
|
npm_node-semver
|
train
|
js
|
504f07c8a341f512b3267a446c89870f50f52ba5
|
diff --git a/httprunner/utils.py b/httprunner/utils.py
index <HASH>..<HASH> 100644
--- a/httprunner/utils.py
+++ b/httprunner/utils.py
@@ -198,7 +198,7 @@ def ensure_file_path_valid(file_path: Text) -> Text:
raw_file_relative_name = raw_file_name
path_names = []
- for name in raw_file_relative_name.split(os.sep):
+ for name in raw_file_relative_name.rstrip(os.sep).split(os.sep):
if name[0] in string.digits:
# ensure file name not startswith digit
diff --git a/tests/utils_test.py b/tests/utils_test.py
index <HASH>..<HASH> 100644
--- a/tests/utils_test.py
+++ b/tests/utils_test.py
@@ -126,3 +126,7 @@ class TestUtils(unittest.TestCase):
ensure_file_path_valid("1/2B/3.yml"),
os.path.join(os.getcwd(), "T1/T2B/T3.yml"),
)
+ self.assertEqual(
+ ensure_file_path_valid("examples/postman-echo/request.methods/"),
+ os.path.join(os.getcwd(), "examples/postman_echo/request_methods"),
+ )
|
fix: ensure_file_path_valid for folder path
|
HttpRunner_HttpRunner
|
train
|
py,py
|
7c36de78c5560b6dd697967452f69ba0a8bc6ea6
|
diff --git a/scripts/bundle-copy.js b/scripts/bundle-copy.js
index <HASH>..<HASH> 100644
--- a/scripts/bundle-copy.js
+++ b/scripts/bundle-copy.js
@@ -8,7 +8,13 @@ const pick = require('lodash.pick');
const pkg = require('../package.json');
// 1. Copy meta files, materials folder (e.g. images) and ALL proxy-exports into `dist`
-const metaFiles = ['README.md', 'LICENSE', 'materials', 'proxy-exports/*'];
+const metaFiles = [
+ 'README.md',
+ 'CHANGELOG.md',
+ 'LICENSE',
+ 'materials',
+ 'proxy-exports/*',
+];
metaFiles.forEach(f => shelljs.cp('-R', f, path.join(__dirname, '../dist/')));
// 2. Copy ALL css module files from materials into `dist`
shelljs.exec(
|
chore: copy CHANGELOG to dist folder
|
commercetools_ui-kit
|
train
|
js
|
13616f82c6884a5452c473d40dadaa1f1cdafa5e
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ try:
except FileNotFoundError:
README = ""
-VERSION = '0.0.9'
+VERSION = '0.0.10'
setup(
name='chuda',
|
chore(version): bump to <I>
|
Varkal_chuda
|
train
|
py
|
6ab7f0867c75d963688765adc7a90834976ace88
|
diff --git a/tasks/build.js b/tasks/build.js
index <HASH>..<HASH> 100644
--- a/tasks/build.js
+++ b/tasks/build.js
@@ -31,8 +31,8 @@ module.exports = function(gulp, config) {
= Clean dest folder =
=========================================*/
- gulp.task('clean', function(cb) {
- del(['dist/**'], cb);
+ gulp.task('clean', function() {
+ return del(['dist/**']);
});
/*==========================================
@@ -41,6 +41,7 @@ module.exports = function(gulp, config) {
gulp.task('connect', function() {
connect.server({
+ root: process.cwd(),
host: '0.0.0.0',
port: 3000,
livereload: true
|
chore: use promise version of del
|
mcasimir_mobile-angular-ui
|
train
|
js
|
ec5b35e677c9c89bd6347bba5bf3f63ea063f723
|
diff --git a/value.go b/value.go
index <HASH>..<HASH> 100644
--- a/value.go
+++ b/value.go
@@ -640,6 +640,11 @@ func (vlog *valueLog) Close() error {
err = terr
}
}
+ if vlog.discardStats != nil {
+ if terr := vlog.discardStats.Close(-1); terr != nil && err == nil {
+ err = terr
+ }
+ }
return err
}
|
fix(discard): close the discard stats file on db close #<I>
In windows, an unclosed file cannot be removed. This causes the failure of os.RemoveAll().
|
dgraph-io_badger
|
train
|
go
|
964be63fd3784b1faa4f3104d6818e29876acc64
|
diff --git a/internal/service/ssoadmin/managed_policy_attachment.go b/internal/service/ssoadmin/managed_policy_attachment.go
index <HASH>..<HASH> 100644
--- a/internal/service/ssoadmin/managed_policy_attachment.go
+++ b/internal/service/ssoadmin/managed_policy_attachment.go
@@ -137,6 +137,11 @@ func resourceManagedPolicyAttachmentDelete(d *schema.ResourceData, meta interfac
return fmt.Errorf("error detaching Managed Policy (%s) from SSO Permission Set (%s): %w", managedPolicyArn, permissionSetArn, err)
}
+ // Provision ALL accounts after delete the managed policy
+ if err := provisionSsoAdminPermissionSet(conn, permissionSetArn, instanceArn); err != nil {
+ return err
+ }
+
return nil
}
|
fix(awssso): fix missing provisionSsoAdminPermissionSet() after delete a managed policy
|
terraform-providers_terraform-provider-aws
|
train
|
go
|
a6443a910a99d2b7fb15275e223e285eb6325942
|
diff --git a/pytify/pytifylib.py b/pytify/pytifylib.py
index <HASH>..<HASH> 100755
--- a/pytify/pytifylib.py
+++ b/pytify/pytifylib.py
@@ -39,10 +39,10 @@ class Pytifylib:
return False
- # Search for song / album / artist
- def search(self, query, type='track,artist,album'):
+ # Search for song / artist
+ def search(self, query, type='artist,track'):
try:
- response = self._spotify().search(q='+'.join(query.split()), type=type)
+ response = self._spotify().search(q='+'.join(query.split()), type=type, limit=self._limit)
except spotipy.client.SpotifyException:
print('Search went wrong? Please try again.')
|
chore: remove album and set limit (#<I>)
|
bjarneo_Pytify
|
train
|
py
|
bc5fa2f6a24254f1a50849f73346e0be3380e948
|
diff --git a/samcli/__init__.py b/samcli/__init__.py
index <HASH>..<HASH> 100644
--- a/samcli/__init__.py
+++ b/samcli/__init__.py
@@ -2,4 +2,4 @@
SAM CLI version
"""
-__version__ = "1.36.0"
+__version__ = "1.37.0"
|
chore: version bump <I>
|
awslabs_aws-sam-cli
|
train
|
py
|
175cd9c1a95d1833c6e99672400bddb46aef5751
|
diff --git a/samcli/commands/package/package_context.py b/samcli/commands/package/package_context.py
index <HASH>..<HASH> 100644
--- a/samcli/commands/package/package_context.py
+++ b/samcli/commands/package/package_context.py
@@ -80,7 +80,7 @@ class PackageContext:
def run(self):
s3_client = boto3.client(
- "s3", config=Config(signature_version="s3v4", region_name=self.region if self.region else None),
+ "s3", config=Config(signature_version="s3v4", region_name=self.region if self.region else None)
)
self.s3_uploader = S3Uploader(s3_client, self.s3_bucket, self.s3_prefix, self.kms_key_id, self.force_upload)
|
fix: linting on ubuntu (#<I>)
|
awslabs_aws-sam-cli
|
train
|
py
|
8fe223cf358a84ad623bf4a2ce115fd5d3403848
|
diff --git a/common/session/class.BasicSession.php b/common/session/class.BasicSession.php
index <HASH>..<HASH> 100644
--- a/common/session/class.BasicSession.php
+++ b/common/session/class.BasicSession.php
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Copyright (c) 2017 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
+ * Copyright (c) 2021 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
*
*/
@@ -142,6 +142,10 @@ class common_session_BasicSession implements common_session_Session, ServiceLoca
*/
public function getInterfaceLanguage()
{
+ if (PHPSession::singleton()->hasAttribute('overrideInterfaceLanguage')) {
+ return PHPSession::singleton()->getAttribute('overrideInterfaceLanguage');
+ }
+
return $this->getServiceLocator()->get(UserLanguageServiceInterface::class)->getInterfaceLanguage($this->getUser());
}
|
feat: Allow interface language to be overwritten in the BasicSession
|
oat-sa_generis
|
train
|
php
|
c7b376707397e798b1c47ce6963938335c541639
|
diff --git a/lib/superapi/api.js b/lib/superapi/api.js
index <HASH>..<HASH> 100644
--- a/lib/superapi/api.js
+++ b/lib/superapi/api.js
@@ -92,7 +92,7 @@ Api.prototype = {
url: function(id) {
var url = this.config.baseUrl;
- var resource = this.service(id);
+ var resource = this.service(id) || id;
// from time being it"s a simple map
if (resource) {
|
feat(url): support either the id or a path or url
This change opens any XHR call using the same headers, options with any URL (path or absolute URL)
other than the generated ones for defined services.
|
stephanebachelier_superapi
|
train
|
js
|
be9e249c5c9b38fa6a8bf8e0e38207731d430ae9
|
diff --git a/pypsa/plot.py b/pypsa/plot.py
index <HASH>..<HASH> 100644
--- a/pypsa/plot.py
+++ b/pypsa/plot.py
@@ -455,8 +455,6 @@ def projected_area_factor(ax, original_crs=4326):
"""
if not hasattr(ax, "projection"):
return 1
- if isinstance(ax.projection, ccrs.PlateCarree):
- return 1
x1, x2, y1, y2 = ax.get_extent()
pbounds = get_projection_from_crs(original_crs).transform_points(
ax.projection, np.array([x1, x2]), np.array([y1, y2])
|
fix: also recalculate projection from PlateCarree to itself
|
PyPSA_PyPSA
|
train
|
py
|
f1d8dd8113bd9ffc7ddbad79d88e672421f64ceb
|
diff --git a/src/aiortc/rtcpeerconnection.py b/src/aiortc/rtcpeerconnection.py
index <HASH>..<HASH> 100644
--- a/src/aiortc/rtcpeerconnection.py
+++ b/src/aiortc/rtcpeerconnection.py
@@ -847,7 +847,11 @@ class RTCPeerConnection(AsyncIOEventEmitter):
transceiver.sender.setTransport(masterTransport)
transceiver._bundled = True
transceiver._transport = masterTransport
- if self.__sctp and self.__sctp.mid in slaveMids:
+ if (
+ self.__sctp
+ and self.__sctp.mid in slaveMids
+ and not self.__sctp._bundled
+ ):
oldTransports.add(self.__sctp.transport)
self.__sctp.setTransport(masterTransport)
self.__sctp._bundled = True
|
fix: Do not close transport on 'setRemoteDescription' if media and data are bundled (#<I>)
|
aiortc_aiortc
|
train
|
py
|
8a2c58fcc18765c461cdac0ffd4fc8ce9ad9d50b
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -23,10 +23,10 @@ build_requires = [
'twine>=1.14.0',
]
test_requires = [
- 'pytest~=5.3',
+ 'pytest~=5.4.1',
'pytest-cov',
'pytest-mock',
- 'pytest-asyncio~=0.10.0',
+ 'pytest-asyncio~=0.11.0',
'aioresponses==0.6.1',
'asynctest~=0.13.0',
'codecov',
@@ -35,7 +35,7 @@ test_requires = [
ci_requires = [
] + build_requires + test_requires
dev_requires = [
- 'pytest-sugar>=0.9.1',
+ # 'pytest-sugar>=0.9.1',
] + build_requires + test_requires
docs_requires = [
'sphinx~=2.4',
|
test: Update pytest and plugins, and exclude pytest-sugar
|
lablup_backend.ai-client-py
|
train
|
py
|
2049e752ccd91265d43374a2227bc629a274fc7c
|
diff --git a/src/base/playback.js b/src/base/playback.js
index <HASH>..<HASH> 100644
--- a/src/base/playback.js
+++ b/src/base/playback.js
@@ -208,7 +208,7 @@ export default class Playback extends UIObject {
* @method destroy
*/
destroy() {
- this.$el.remove()
+ this.remove()
}
}
|
refactor(playback): use remove from ui_object instead of zepto
in addition to removing element this change removes listeners and undelegate events from playback.
This will stop triggering errors from destroyed video element that was still delegated.
|
clappr_clappr
|
train
|
js
|
11b4c1be92e7f07a96dd846f0fd595703d834591
|
diff --git a/test/test_cmd/test_linters.py b/test/test_cmd/test_linters.py
index <HASH>..<HASH> 100644
--- a/test/test_cmd/test_linters.py
+++ b/test/test_cmd/test_linters.py
@@ -32,6 +32,21 @@ def test_lint(amend):
verifyNoMoreInteractions(context)
+@pytest.mark.parametrize(
+ 'amend',
+ itertools.product([False, True]),
+)
+def test_lint_appveyor(amend):
+ CTX.appveyor = True
+ context = mock()
+ _lint._lint(context, amend)
+ verify(context).invoke(_safety.safety)
+ verify(context).invoke(_pylint.pylint)
+ verify(context).invoke(_flake8.flake8)
+ verify(context).invoke(_pep8.pep8, amend=amend)
+ verifyNoMoreInteractions(context)
+
+
def test_pep8():
with when(epab.utils).run(f'autopep8 -r --in-place --max-line-length {CONFIG.lint__line_length} .', mute=True):
_pep8._pep8()
|
fix: dev: test: coverage
|
etcher-be_epab
|
train
|
py
|
94541ae9c81c4b2b60d108fa9bd411d2fa6bf778
|
diff --git a/packages/theme-data/src/basics/colors.js b/packages/theme-data/src/basics/colors.js
index <HASH>..<HASH> 100644
--- a/packages/theme-data/src/basics/colors.js
+++ b/packages/theme-data/src/basics/colors.js
@@ -47,8 +47,8 @@ export default {
green900: { value: "#445e20", type: COLOR },
iconLightGrayColor: { value: "#808080", type: COLOR },
- iconDarkBlueColor: { value: "#d1deee", type: COLOR },
- iconDarkGrayColor: { value: "#cccccc", type: COLOR },
+ iconDarkBlueColor: { value: "#a2a6b0", type: COLOR },
+ iconDarkGrayColor: { value: "#999999", type: COLOR },
red100: { value: "#ffd9d9", type: COLOR },
red200: { value: "#f8d3d3", type: COLOR },
|
fix: use correct color for dark themed icon colors
|
Autodesk_hig
|
train
|
js
|
47d649bf2a3c8671e0c5110e74c12c1e624e603c
|
diff --git a/packages/api-generator/src/index.js b/packages/api-generator/src/index.js
index <HASH>..<HASH> 100755
--- a/packages/api-generator/src/index.js
+++ b/packages/api-generator/src/index.js
@@ -148,7 +148,26 @@ const getApi = (name, locales) => {
else return getComponentApi(name, locales)
}
-const EXCLUDES = ['VMessages', 'VLabel', 'VVirtualTable']
+const EXCLUDES = [
+ 'VCalendarCategory',
+ 'VColorPickerCanvas',
+ 'VColorPickerSwatches',
+ 'VCounter',
+ 'VData',
+ 'VDatePickerDateTable',
+ 'VDatePickerHeader',
+ 'VDatePickerMonthTable',
+ 'VDatePickerTitle',
+ 'VDatePickerYears',
+ 'VItem',
+ 'VLabel',
+ 'VMessages',
+ 'VPicker',
+ 'VTableOverflow',
+ 'VTimePickerClock',
+ 'VTimePickerTitle',
+ 'VVirtualTable',
+]
const getComponentsApi = locales => {
const components = []
|
docs(api): exclude non-public components
|
vuetifyjs_vuetify
|
train
|
js
|
965dacdb33f119a06b5ff788a393908b61ae87c0
|
diff --git a/superset/db_engine_specs/__init__.py b/superset/db_engine_specs/__init__.py
index <HASH>..<HASH> 100644
--- a/superset/db_engine_specs/__init__.py
+++ b/superset/db_engine_specs/__init__.py
@@ -121,7 +121,7 @@ def get_available_engine_specs() -> Dict[Type[BaseEngineSpec], Set[str]]:
except Exception: # pylint: disable=broad-except
logger.warning("Unable to load SQLAlchemy dialect: %s", dialect)
else:
- drivers[dialect.name].add(dialect.driver)
+ drivers[dialect.name].add(getattr(dialect, "driver", dialect.name))
engine_specs = get_engine_specs()
return {
|
fix: Fix dremio dialect not having a `driver` field (#<I>)
* Update __init__.py
* Update superset/db_engine_specs/__init__.py
|
apache_incubator-superset
|
train
|
py
|
417562476812f43c560742be6dbc35981c4a0f22
|
diff --git a/src/Common/Misc/AnnotationBuilder/index.js b/src/Common/Misc/AnnotationBuilder/index.js
index <HASH>..<HASH> 100644
--- a/src/Common/Misc/AnnotationBuilder/index.js
+++ b/src/Common/Misc/AnnotationBuilder/index.js
@@ -51,6 +51,16 @@ function update(annotationObject, changeSet) {
// ----------------------------------------------------------------------------
+function updateReadOnlyFlag(annotationToEdit, readOnlyFields) {
+ if (!annotationToEdit || !annotationToEdit.selection || !readOnlyFields) {
+ return;
+ }
+
+ annotationToEdit.readOnly = SelectionBuilder.hasField(annotationToEdit.selection, readOnlyFields);
+}
+
+// ----------------------------------------------------------------------------
+
function fork(annotationObj) {
const id = generateUUID();
generation++;
@@ -73,9 +83,10 @@ const EMPTY_ANNOTATION = annotation(SelectionBuilder.EMPTY_SELECTION, 0);
export default {
annotation,
- update,
- markModified,
+ EMPTY_ANNOTATION,
fork,
+ markModified,
setInitialGenerationNumber,
- EMPTY_ANNOTATION,
+ update,
+ updateReadOnlyFlag,
};
|
fix(AnnotationBuilder): Add helper function to update readOnly flag of an annotation
Based on a readOnly set of fields this method allow to easily tag a given annotation
|
Kitware_paraviewweb
|
train
|
js
|
3dff5058f0beae01cec0abe27e3a43c8fd7c60ce
|
diff --git a/docs/examples/greeting.js b/docs/examples/greeting.js
index <HASH>..<HASH> 100644
--- a/docs/examples/greeting.js
+++ b/docs/examples/greeting.js
@@ -19,7 +19,7 @@ client.on('ready', () => {
// Create an event listener for new guild members
client.on('guildMemberAdd', member => {
// Send the message to a designated channel on a server:
- const channel = member.guild.channels.find('name', 'member-log');
+ const channel = member.guild.channels.find(ch => ch.name === 'member-log');
// Do nothing if the channel wasn't found on this server
if (!channel) return;
// Send the message, mentioning the member
|
docs(Examples): fix usage of removed overload of Collection#find (#<I>)
|
discordjs_discord.js
|
train
|
js
|
c5a3558a8b65228e529f900a85a90f6ce6ab1624
|
diff --git a/packages/project-utils/bundling/app/config/env.js b/packages/project-utils/bundling/app/config/env.js
index <HASH>..<HASH> 100644
--- a/packages/project-utils/bundling/app/config/env.js
+++ b/packages/project-utils/bundling/app/config/env.js
@@ -48,13 +48,14 @@ function getClientEnvironment(publicUrl) {
}
);
- // Stringify all values so we can feed into Webpack DefinePlugin
- const stringified = {
- "process.env": Object.keys(raw).reduce((env, key) => {
- env[key] = JSON.stringify(raw[key]);
- return env;
- }, {})
- };
+ // Stringify all values so we can feed into Webpack DefinePlugin.
+ // Provide values one by one, not as a single process.env object,
+ // because otherwise plugin will put a big JSON object every time process.env is used in code.
+ // This way minifier also removes reduntant code on prod (like if(process.env.NODE_ENV === 'development')).
+ const stringified = {};
+ for (const key of Object.keys(raw)) {
+ stringified[`process.env.${key}`] = JSON.stringify(raw[key]);
+ }
return { raw, stringified };
}
|
fix(project-utils): improve the behavior of webpack define plugin (#<I>)
|
Webiny_webiny-js
|
train
|
js
|
6c72f6853b98a1569d6f5238b2f6c173d57a7cba
|
diff --git a/tests/fixtures/TeamCityFormatter.php b/tests/fixtures/TeamCityFormatter.php
index <HASH>..<HASH> 100644
--- a/tests/fixtures/TeamCityFormatter.php
+++ b/tests/fixtures/TeamCityFormatter.php
@@ -24,7 +24,7 @@ class TeamCityFormatter extends JsonFormatter
* @throws \RuntimeException if encoding fails and errors are not ignored
* @return string
*/
- protected function toJson($data, $ignoreErrors = false)
+ protected function toJson($data, $ignoreErrors = false): string
{
$json = $this->jsonEncode($data);
|
test(TC): fix TC formatter
|
commercetools_commercetools-php-sdk
|
train
|
php
|
910ccef6c735a02ff0e773f488969bf21c26aa7d
|
diff --git a/cmd/cmd.go b/cmd/cmd.go
index <HASH>..<HASH> 100644
--- a/cmd/cmd.go
+++ b/cmd/cmd.go
@@ -133,7 +133,11 @@ func installDefaultServices(c client.Client) error {
fmt.Println("Scheduling units...")
err := Scale(c, targets)
fmt.Println("Activating units...")
- err = Start(c, []string{"registry", "logger", "cache", "database"})
+ err = Start(c, []string{"logger", "cache", "database"})
+ if err != nil {
+ return err
+ }
+ err = Start(c, []string{"registry"})
if err != nil {
return err
}
|
fix(install): install registry after cache
|
deis_deis
|
train
|
go
|
84ac558674e73958be84312444c48d9f823f6684
|
diff --git a/test/angular-material-spec.js b/test/angular-material-spec.js
index <HASH>..<HASH> 100644
--- a/test/angular-material-spec.js
+++ b/test/angular-material-spec.js
@@ -7,27 +7,6 @@
*/
(function() {
-
- // Patch since PhantomJS does not implement click() on HTMLElement. In some
- // cases we need to execute the native click on an element. However, jQuery's
- // $.fn.click() does not dispatch to the native function on <a> elements, so we
- // can't use it in our implementations: $el[0].click() to correctly dispatch.
- // Borrowed from https://stackoverflow.com/questions/15739263/phantomjs-click-an-element
- if (!HTMLElement.prototype.click) {
- HTMLElement.prototype.click = function() {
- var ev = document.createEvent('MouseEvent');
- ev.initMouseEvent(
- 'click',
- /*bubble*/true, /*cancelable*/true,
- window, null,
- 0, 0, 0, 0, /*coordinates*/
- false, false, false, false, /*modifier keys*/
- 0/*button=left*/, null
- );
- this.dispatchEvent(ev);
- };
- }
-
var enableAnimations;
beforeAll(function () {
|
chore(tests):remove unused phantomJS workaround (#<I>)
this is no longer necessary as phantomJS is not used anymore
Relates to #<I>
|
angular_material
|
train
|
js
|
10809fc62aee6527777016430d095378ce26d4d6
|
diff --git a/packages/analytics/autotrack/index.js b/packages/analytics/autotrack/index.js
index <HASH>..<HASH> 100644
--- a/packages/analytics/autotrack/index.js
+++ b/packages/analytics/autotrack/index.js
@@ -69,10 +69,8 @@ const metrics = {
// * values on the trackers.
// */
export const init = () => {
- // // Initialize the command queue in case analytics.js hasn't loaded yet.
+ // Initialize the command queue in case analytics.js hasn't loaded yet.
window.ga = window.ga || ((...args) => (ga.q = ga.q || []).push(args));
- console.log('init analytics');
-
createTracker();
trackErrors();
trackCustomDimensions();
|
chore: clean up analytics autotrack code
|
bolt-design-system_bolt
|
train
|
js
|
1ca7c88fa28e10677cbdc4429e7e31895dce5cf5
|
diff --git a/src/components/DatePicker.js b/src/components/DatePicker.js
index <HASH>..<HASH> 100644
--- a/src/components/DatePicker.js
+++ b/src/components/DatePicker.js
@@ -932,7 +932,7 @@ export default class DatePicker extends Component {
const day = currentDate.getDate();
const month = currentDate.getMonth();
const year = currentDate.getFullYear();
- const isOtherMonth = currentDate.getMonth() !== this.state.month;
+ const isOtherMonth = month !== this.state.month;
const dateKey = convertDateToDateKey(currentDate);
let ariaCurrent = '';
@@ -982,7 +982,7 @@ export default class DatePicker extends Component {
};
}
- if (day === CURRENT_DATE && this.state.month === CURRENT_MONTH && this.state.year === CURRENT_YEAR) {
+ if (day === CURRENT_DATE && month === CURRENT_MONTH && year === CURRENT_YEAR) {
dayStyle = {
...dayStyle,
...defaultStyle.todayStyle,
|
fix(DatePicker): today styling is only applied to the currents month date
|
nikgraf_belle
|
train
|
js
|
7ac171e3629781247fe2d194157b7cd80b80fdde
|
diff --git a/lib/topologies/replset.js b/lib/topologies/replset.js
index <HASH>..<HASH> 100644
--- a/lib/topologies/replset.js
+++ b/lib/topologies/replset.js
@@ -1212,14 +1212,14 @@ function executeWriteOperation(args, options, callback) {
return callback(err);
}
- // Per SDAM, remove primary from replicaset
- self.s.replicaSetState.remove(self.s.replicaSetState.primary, { force: true });
-
if (willRetryWrite) {
const newArgs = Object.assign({}, args, { retrying: true });
return executeWriteOperation(newArgs, options, callback);
}
+ // Per SDAM, remove primary from replicaset
+ self.s.replicaSetState.remove(self.s.replicaSetState.primary, { force: true });
+
return callback(err);
};
|
fix(retryableWrites): only remove primary after retry (#<I>)
Make sure to not remove the primary on an error until after the
retry
|
mongodb-js_mongodb-core
|
train
|
js
|
af6e3bf442f18e996ea051567a82f80cb51d7b63
|
diff --git a/wandb/data_types.py b/wandb/data_types.py
index <HASH>..<HASH> 100644
--- a/wandb/data_types.py
+++ b/wandb/data_types.py
@@ -261,7 +261,7 @@ class Table(Media):
self.data = list(rows or data or [])
if dataframe is not None:
assert util.is_pandas_data_frame(dataframe), 'dataframe argument expects a `Dataframe` object'
- self.columns = dataframe.columns.to_list()
+ self.columns = list(dataframe.columns)
self.data = []
for row in range(len(dataframe)):
self.add_data(*tuple(dataframe[col].values[row] for col in self.columns))
|
feat: make Table compatible with pandas df in python2 (#<I>)
|
wandb_client
|
train
|
py
|
c986eefeba01ef46a8bb7595a8285ff24986126c
|
diff --git a/client/main.js b/client/main.js
index <HASH>..<HASH> 100644
--- a/client/main.js
+++ b/client/main.js
@@ -7,7 +7,7 @@ var KARMA_URL_ROOT = require('./constants').KARMA_URL_ROOT;
// connect socket.io
// https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO
-var socket = io.connect('http://' + location.host, {
+var socket = io.connect(location.protocol + '//' + location.host, {
'reconnection delay': 500,
'reconnection limit': 2000,
'resource': KARMA_URL_ROOT.substr(1) + 'socket.io',
|
fix(client): dynamic protocol for socket.io
Look up location.protocol for socket.io,
in order to use Karma in https-only enviournment
Closes #<I>
|
karma-runner_karma
|
train
|
js
|
235aec4e221a38e8265844ea66f7f564d7bb9b26
|
diff --git a/internal/pkg/db/redis/data.go b/internal/pkg/db/redis/data.go
index <HASH>..<HASH> 100644
--- a/internal/pkg/db/redis/data.go
+++ b/internal/pkg/db/redis/data.go
@@ -339,7 +339,7 @@ func (c *Client) EventsForDeviceLimit(id string, limit int) (events []contract.E
conn := c.Pool.Get()
defer conn.Close()
- objects, err := getObjectsByRange(conn, db.EventsCollection+":device:"+id, 0, limit-1)
+ objects, err := getObjectsByRevRange(conn, db.EventsCollection+":device:"+id, 0, limit-1)
if err != nil {
if err != redis.ErrNil {
return events, err
|
fix: Query event API w/ limit always returns first $n records (redis)
In /internal/pkg/db/redis/data.go, the func EventsForDeviceLimit should call getObjectsByRevRange to retrieve the entries for keys in the reverse sorted set order.
|
edgexfoundry_edgex-go
|
train
|
go
|
387be28dc4f4fba22a426108606e72dd95788ac0
|
diff --git a/annoying/fields.py b/annoying/fields.py
index <HASH>..<HASH> 100644
--- a/annoying/fields.py
+++ b/annoying/fields.py
@@ -137,7 +137,7 @@ class JSONField(JSONFieldBase):
if value == "":
return None
if isinstance(value, dict) or isinstance(value, list):
- return json.dumps(value, cls=DjangoJSONEncoder)
+ return json.dumps(value, cls=DjangoJSONEncoder, sort_keys=True, indent=2, separators=(',', ': '))
else:
return super(JSONField, self).get_db_prep_save(value, *args, **kwargs)
@@ -145,7 +145,7 @@ class JSONField(JSONFieldBase):
value = super(JSONField, self).value_from_object(obj)
if self.null and value is None:
return None
- return json.dumps(value)
+ return json.dumps(value, sort_keys=True, indent=2, separators=(',', ': '))
if SOUTH:
|
feat: Pretty-print JSON before saving.
|
skorokithakis_django-annoying
|
train
|
py
|
490b9136b524bd557f9089cfdcfe0fb88107afbe
|
diff --git a/bokeh/core/templates.py b/bokeh/core/templates.py
index <HASH>..<HASH> 100644
--- a/bokeh/core/templates.py
+++ b/bokeh/core/templates.py
@@ -16,12 +16,22 @@ models in various ways.
'''
from __future__ import absolute_import
-
import json
+from jinja2 import Environment, Markup, FileSystemLoader, PackageLoader
+import sys
+import os
+
+def get_env():
+ ''' Get the correct Jinja2 Environment, also for frozen scripts.
+ '''
+ if getattr(sys, 'frozen', False):
+ templates_path = os.path.join(sys._MEIPASS, '_templates')
+ return Environment(loader=FileSystemLoader(templates_path))
+ else:
+ return Environment(loader=PackageLoader('bokeh.core', '_templates'))
-from jinja2 import Environment, PackageLoader, Markup
-_env = Environment(loader=PackageLoader('bokeh.core', '_templates'))
+_env = get_env()
_env.filters['json'] = lambda obj: Markup(json.dumps(obj))
JS_RESOURCES = _env.get_template("js_resources.html")
|
fix: use FileSystemLoader and adjust path for frozen script (#<I>)
|
bokeh_bokeh
|
train
|
py
|
d5db4ad126853d4ead0c139fc84dbfa18adfb89a
|
diff --git a/src/directive/translate.js b/src/directive/translate.js
index <HASH>..<HASH> 100644
--- a/src/directive/translate.js
+++ b/src/directive/translate.js
@@ -100,10 +100,11 @@ angular.module('pascalprecht.translate')
attr.$observe('translateValues', function (interpolateParams) {
// Only watch parent scope if there is data to retreive from it
- if (interpolateParams)
+ if (interpolateParams) {
scope.$parent.$watch(function() {
scope.interpolateParams = $parse(interpolateParams)(scope.$parent);
});
+ }
});
// Ensures the text will be refreshed after the current language was changed
|
fix(translateDirective): fixes bad coding convention
|
angular-translate_angular-translate
|
train
|
js
|
78ce625e0f865f14f086c45f34dde7ca476079f6
|
diff --git a/server.go b/server.go
index <HASH>..<HASH> 100644
--- a/server.go
+++ b/server.go
@@ -500,9 +500,11 @@ func (s *server) setCurrentTerm(term uint64, leaderName string, append bool) {
if term > s.currentTerm {
// stop heartbeats before step-down
if s.state == Leader {
+ s.mutex.Unlock()
for _, peer := range s.peers {
peer.stopHeartbeat(false)
}
+ s.mutex.Lock()
}
// update the term and clear vote for
s.state = Follower
|
fix(server): release the server lock while stopping peers
Avoid a deadlock situation:
- Server is changing the term via setCurrentTerm() which also holds
the server.Lock
- Peer is in the flush() routine and attempts to takes the server.Lock
via p.server.Term() in sendAppendEntriesRequest()
The peer cannot take the lock because it is held by the server. The
server is waiting for the peer to shut down. Progress stops.
|
influxdata_influxdb
|
train
|
go
|
9cc4e2140e33f577dcf8a1112b4c98567f7f6231
|
diff --git a/components/table/row.js b/components/table/row.js
index <HASH>..<HASH> 100644
--- a/components/table/row.js
+++ b/components/table/row.js
@@ -85,7 +85,7 @@ export default class Row extends PureComponent {
id = getUID('table-row-');
- onMouseEnter = (e) => {
+ onMouseEnter = e => {
const {item, onHover} = this.props;
onHover(item, e);
};
|
fix: make lint happy [publish]
|
JetBrains_ring-ui
|
train
|
js
|
941327fe21085fa60e124815c76b22abec8b616e
|
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -34,6 +34,7 @@ const immutableExternal = {
}
module.exports = {
+ devtool: env === 'production' ? 'source-map' : false,
externals: {
react: reactExternal,
redux: reduxExternal,
|
perf: extract source maps from umd build into separate files
|
erikras_redux-form
|
train
|
js
|
4b5aca35d29cdecc1b77d1f85eaf426b420ac773
|
diff --git a/packages/create-webiny-project/index.js b/packages/create-webiny-project/index.js
index <HASH>..<HASH> 100644
--- a/packages/create-webiny-project/index.js
+++ b/packages/create-webiny-project/index.js
@@ -206,7 +206,9 @@ async function install({ root, dependencies }) {
try {
await execa(command, args);
} catch (err) {
- throw new Error("Unable to install core dependencies for create-webiny-project.", err);
+ throw new Error(
+ "Unable to install core dependencies for create-webiny-project: " + err.message
+ );
}
}
@@ -222,11 +224,11 @@ async function run({ root, appName, template, tag, log }) {
const tasks = new Listr([
{
title: `Install template package`,
- task: async ctx => {
+ task: async () => {
try {
await install({ root, dependencies });
} catch (err) {
- throw new Error("Failed to install template package", err, ctx);
+ throw new Error(`Failed to install template package: ${err.message}`);
}
}
}
|
fix(create-webiny-project): include original error message in error being thrown
|
Webiny_webiny-js
|
train
|
js
|
856c62c60b0461942ee8e9708f5a3bf264cda075
|
diff --git a/src/IO/WebSocket/WslinkImageStream/index.js b/src/IO/WebSocket/WslinkImageStream/index.js
index <HASH>..<HASH> 100644
--- a/src/IO/WebSocket/WslinkImageStream/index.js
+++ b/src/IO/WebSocket/WslinkImageStream/index.js
@@ -31,11 +31,16 @@ function wslinkImageStream(publicAPI, model) {
model.stillRatio
);
+ publicAPI.stillRender = (view = model.view_id, size = model.size) =>
+ model.client.VtkImageDelivery.stillRender({ size, view });
+
publicAPI.setMaxFrameRate = (maxFPS) =>
model.client.VtkImageDelivery.setMaxFrameRate(maxFPS);
- publicAPI.setViewSize = (width, height) =>
- model.client.VtkImageDelivery.viewSize(model.view_id, width, height);
+ publicAPI.setViewSize = (width, height) => {
+ model.size = [width, height];
+ return model.client.VtkImageDelivery.viewSize(model.view_id, width, height);
+ };
publicAPI.invalidateCache = () =>
model.client.VtkImageDelivery.invalidateCache(model.view_id);
|
fix(WslinkImageStream): Add push method
|
Kitware_paraviewweb
|
train
|
js
|
3fbe1f84b4c679ce32d8b6d6ec23c263078254cb
|
diff --git a/.storybook/config.js b/.storybook/config.js
index <HASH>..<HASH> 100644
--- a/.storybook/config.js
+++ b/.storybook/config.js
@@ -15,6 +15,7 @@ addDecorator(withInfo({
}));
addDecorator(withKnobs);
addDecorator(withOptions({
+ addonPanelInRight: true,
name: 'Times Components',
hierarchySeparator: /\//
}));
|
fix: move knobs on the right panel side (#<I>)
|
newsuk_times-components
|
train
|
js
|
be2dcc6db089489884a9a5b54f5f481bb4638b28
|
diff --git a/react/MuiCozyTheme/theme.js b/react/MuiCozyTheme/theme.js
index <HASH>..<HASH> 100644
--- a/react/MuiCozyTheme/theme.js
+++ b/react/MuiCozyTheme/theme.js
@@ -277,6 +277,7 @@ invertedTheme.overrides = {
...normalTheme.overrides,
MuiOutlinedInput: {
root: {
+ boxSizing: 'border-box',
'&$focused $notchedOutline': {
borderColor: invertedTheme.palette.text.primary,
borderWidth: '0.0625rem'
|
fix(MuiCozyTheme): Prevent overflowing OutlinedInput with adorn… (#<I>)
When an adornment is added to an OutlinedInput, a padding is added to
it. Making an OutlinedInput with fullwidth + an adorment overflowing
from its container
|
cozy_cozy-ui
|
train
|
js
|
eb3713de1f5d30aee06b7805c970856043f53913
|
diff --git a/bigquery/google/cloud/bigquery/table.py b/bigquery/google/cloud/bigquery/table.py
index <HASH>..<HASH> 100644
--- a/bigquery/google/cloud/bigquery/table.py
+++ b/bigquery/google/cloud/bigquery/table.py
@@ -70,7 +70,7 @@ _NO_PANDAS_ERROR = (
)
_NO_PYARROW_ERROR = (
"The pyarrow library is not installed, please install "
- "pandas to use the to_arrow() function."
+ "pyarrow to use the to_arrow() function."
)
_NO_TQDM_ERROR = (
"A progress bar was requested, but there was an error loading the tqdm "
|
fix(bigquery): fix typo in import error message (pandas -> pyarrow) (#<I>)
|
googleapis_google-cloud-python
|
train
|
py
|
a1e61195735417ab773c661c4c06f57b01c80ceb
|
diff --git a/test/test-server.js b/test/test-server.js
index <HASH>..<HASH> 100644
--- a/test/test-server.js
+++ b/test/test-server.js
@@ -1,13 +1,14 @@
-var EventEmitter = require('events').EventEmitter;
-var Server = require('../lib/server');
+var _ = require('lodash');
var assert = require('assert');
var async = require('async');
var debug = require('debug')('strong-pm:test');
+var EventEmitter = require('events').EventEmitter;
+var events = require('events');
var path = require('path');
+var Server = require('../lib/server');
+var shell = require('shelljs');
var tap = require('tap');
-var events = require('events');
var util = require('util');
-var shell = require('shelljs');
var BASE = path.resolve(__dirname, '.strong-pm');
process.env.STRONGLOOP_MESH_DB = 'memory://';
|
test: fix missing lodash in test-server.js
|
strongloop_strong-pm
|
train
|
js
|
c463d9f8932f36857fd539b1221868ebaee0e736
|
diff --git a/oauth2/handler.go b/oauth2/handler.go
index <HASH>..<HASH> 100644
--- a/oauth2/handler.go
+++ b/oauth2/handler.go
@@ -308,7 +308,7 @@ func (h *Handler) UserinfoHandler(w http.ResponseWriter, r *http.Request) {
delete(interim, "sid")
delete(interim, "jti")
- if aud := interim["aud"].([]string); !ok || len(aud) == 0 {
+ if aud, ok := interim["aud"].([]string); !ok || len(aud) == 0 {
interim["aud"] = []string{c.GetID()}
}
|
fix(oauth2): enforce assertion check on userinfo aud field (#<I>)
This is so the check on the `ok` variable is effectual. Prior to this patch the type assertion on the *client.Client was setting the value of `ok`. Due to the fact the type assertion on *client.Client is already checked and on a false value it exits the func, this value will *always* be true.
|
ory_hydra
|
train
|
go
|
d11dc47180e44e89095c3bf7cd2a6fc5467d4d96
|
diff --git a/test/targets/targetServer.js b/test/targets/targetServer.js
index <HASH>..<HASH> 100644
--- a/test/targets/targetServer.js
+++ b/test/targets/targetServer.js
@@ -12,6 +12,7 @@ module.exports = {
function createServer(host, port) {
const server = Hapi.server({ port: port, host: host });
+ server.listener.keepAliveTimeout = 120e3;
return server;
}
|
fix(tests): Prevent ECONNRESETs on tests that use think
|
artilleryio_artillery
|
train
|
js
|
c01683bcc61a51faeccb05d4e0f1656427cde19f
|
diff --git a/public/js/editors/libraries.js b/public/js/editors/libraries.js
index <HASH>..<HASH> 100644
--- a/public/js/editors/libraries.js
+++ b/public/js/editors/libraries.js
@@ -423,7 +423,11 @@ var libraries = [
},
{
'url': 'https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.16/vue.js',
- 'label': 'Vue.js',
+ 'label': 'Vue.js 1.0.16',
+ },
+ {
+ 'url': 'https://cdnjs.cloudflare.com/ajax/libs/vue/2.0.3/vue.js',
+ 'label': 'Vue.js 2.0.3',
},
{
'url': 'http://cdn.ractivejs.org/latest/ractive.js',
|
fix: Add Vue JS <I> library (#<I>)
|
jsbin_jsbin
|
train
|
js
|
3566904a7315977389d1515821e68186ddddd590
|
diff --git a/functional/server_tests.js b/functional/server_tests.js
index <HASH>..<HASH> 100644
--- a/functional/server_tests.js
+++ b/functional/server_tests.js
@@ -759,19 +759,12 @@ describe('Server tests', function() {
// Add event listeners
server.on('connect', function() {
var left = 5;
- var start = new Date().getTime();
-
var leftDecrement = function(err, r) {
expect(err).to.not.exist;
expect(r).to.exist;
left = left - 1;
-
if (left === 0) {
- var total = new Date().getTime() - start;
- expect(total).to.be.at.least(5 * 100);
- expect(total).to.be.at.most(1000);
-
server.destroy();
done();
}
|
test(server): don't time how long it takes to eval
|
mongodb_node-mongodb-native
|
train
|
js
|
027e0adb3187fab7cd6b4f3d1dad7262f86401eb
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,6 +1,5 @@
'use strict'
-const assert = require('assert')
const debug = require('debug')
const log = debug('libp2p:secio')
log.error = debug('libp2p:secio:error')
@@ -11,8 +10,12 @@ const Wrap = require('it-pb-rpc')
const { int32BEDecode, int32BEEncode } = require('it-length-prefixed')
async function secure (localPeer, duplex, remotePeer) { // returns duplex
- assert(localPeer, 'no local private key provided')
- assert(duplex, 'no connection for the handshake provided')
+ if (!localPeer) {
+ throw new Error('no local private key provided')
+ }
+ if (!duplex) {
+ throw new Error('no connection for the handshake provided')
+ }
const state = new State(localPeer, remotePeer)
const wrapped = Wrap(duplex, { lengthDecoder: int32BEDecode, lengthEncoder: int32BEEncode })
|
fix: remove use of assert module (#<I>)
The polyfill is big, we can simulate it by throwing an Error and it doesn't work under React Native.
|
libp2p_js-libp2p-secio
|
train
|
js
|
26c896e8d1d79760ebac67c2fbc61673c9d461f3
|
diff --git a/.jsdoc.js b/.jsdoc.js
index <HASH>..<HASH> 100644
--- a/.jsdoc.js
+++ b/.jsdoc.js
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
+// ** This file is automatically generated by gapic-generator-typescript. **
+// ** https://github.com/googleapis/gapic-generator-typescript **
+// ** All changes to this file may be overwritten. **
'use strict';
|
chore: match jsdoc with macro license (#<I>)
|
googleapis_nodejs-dialogflow
|
train
|
js
|
bf17a8cfb9ce35666bfd882b70d520d37332a45c
|
diff --git a/camel.go b/camel.go
index <HASH>..<HASH> 100644
--- a/camel.go
+++ b/camel.go
@@ -18,7 +18,7 @@ func LowerCamelCase(s string) string {
}
func camelCase(s string, upper bool) string {
- s = strings.TrimSpace(s)
+ s = strings.TrimSpace(SnakeCase(s))
buffer := make([]rune, 0, len(s))
var prev rune
diff --git a/camel_test.go b/camel_test.go
index <HASH>..<HASH> 100644
--- a/camel_test.go
+++ b/camel_test.go
@@ -14,6 +14,7 @@ func TestUpperCamelCase(t *testing.T) {
"": "",
"f": "F",
"foo": "Foo",
+ "fooBar": "FooBar",
" foo_bar\n": "FooBar",
" foo-bar\t": "FooBar",
" foo bar\r": "FooBar",
@@ -34,6 +35,7 @@ func TestLowerCamelCase(t *testing.T) {
"": "",
"F": "f",
"foo": "foo",
+ "FooBar": "fooBar",
" foo_bar\n": "fooBar",
" foo-bar\t": "fooBar",
" foo bar\r": "fooBar",
|
fix: Convert upper to lower camel case correctly.
Fixes #3.
|
stoewer_go-strcase
|
train
|
go,go
|
02720e4f22450a2120d595436c74d79f10cea30c
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -3348,9 +3348,9 @@ describe('Page', function() {
expect((await changedTarget).url()).toBe(server.EMPTY_PAGE);
});
it('should not report uninitialized pages', async({page, server, browser}) => {
- browser.on('targetchanged', () => {
- expect(false).toBe(true, 'target should not be reported as changed');
- });
+ let targetChanged = false;
+ const listener = () => targetChanged = true;
+ browser.on('targetchanged', listener);
const targetPromise = new Promise(fulfill => browser.once('targetcreated', target => fulfill(target)));
const newPagePromise = browser.newPage();
const target = await targetPromise;
@@ -3363,6 +3363,8 @@ describe('Page', function() {
expect(target2.url()).toBe('about:blank');
await evaluatePromise;
await newPage.close();
+ expect(targetChanged).toBe(false, 'target should not be reported as changed');
+ browser.removeListener('targetchanged', listener);
});
it('should not crash while redirecting if original request was missed', async({page, server, browser}) => {
let serverResponse = null;
|
test: do not leave dangling listener on shared browser object (#<I>)
This resulted in quite a few failures on travis.
|
GoogleChrome_puppeteer
|
train
|
js
|
be904a87cf28d608541dd64399ff30d0eb7be790
|
diff --git a/src/tabs/tabs.js b/src/tabs/tabs.js
index <HASH>..<HASH> 100644
--- a/src/tabs/tabs.js
+++ b/src/tabs/tabs.js
@@ -58,6 +58,25 @@ export class MdTabs {
});
}
+ refresh() {
+ this.taskQueue.queueTask(() => {
+ let hrefs = [];
+ $('li a', this.element).each(function(i, tab) {
+ $(tab).parent().addClass('tab');
+ hrefs.push($(tab).attr('href'));
+ });
+ $(hrefs).each((i, tab) => {
+ if (this.selectedTab.index != i) {
+ $(tab).hide();
+ }
+ });
+ this.taskQueue.queueTask(() => {
+ // window resize adjusts Materialize tab indicator
+ $(window).trigger('resize');
+ });
+ });
+ }
+
fixedChanged(newValue) {
if (newValue) {
this.attributeManager.addClasses('tabs-fixed-width');
|
fix(md-tabs): add refresh method to support dynamic tabs
|
aurelia-ui-toolkits_aurelia-materialize-bridge
|
train
|
js
|
5d049754d94b45bf3707e8d4a6788373625845cf
|
diff --git a/ci/prepareElmRelease.js b/ci/prepareElmRelease.js
index <HASH>..<HASH> 100644
--- a/ci/prepareElmRelease.js
+++ b/ci/prepareElmRelease.js
@@ -6,11 +6,11 @@ const execSync = require('child_process').execSync;
async function prepareElmRelease(config, context) {
function exec(command) {
context.logger.log(`Running: ${command}`);
- execSync(command);
+ execSync(command, { shell: '/bin/bash' });
}
exec(`yarn elm-package diff`);
- exec(`yarn elm-package bump`);
+ exec(`yes | yarn elm-package bump`);
}
module.exports = prepareElmRelease;
|
fix(ci): Attempt to say "yes" to `elm-package bump`
|
cultureamp_elm-css-modules-loader
|
train
|
js
|
cbec313c17cf9ebb8d7ac448defa92ec28b84ef6
|
diff --git a/lib/build_system.js b/lib/build_system.js
index <HASH>..<HASH> 100644
--- a/lib/build_system.js
+++ b/lib/build_system.js
@@ -12,6 +12,14 @@ const yargs = require('yargs');
const vorpal = require('vorpal');
const clone = require('clone');
+function mergeArray(destinationArray, sourceArray, mergeOptions) {
+ return sourceArray;
+}
+
+const mergeOptions = {
+ arrayMerge: mergeArray,
+};
+
class BuildSystem {
constructor(config) {
@@ -414,7 +422,7 @@ class BuildSystem {
}
_mergeConfigs(defaultConfig, config) {
- return merge(defaultConfig, config);
+ return merge(defaultConfig, config, mergeOptions);
}
registerPlugin(name, plugin, config, priority) {
diff --git a/lib/plugins/typescript/config.js b/lib/plugins/typescript/config.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/typescript/config.js
+++ b/lib/plugins/typescript/config.js
@@ -23,7 +23,7 @@ function getDefaultConfig(buildSystemConfig) {
config.useTypeScriptForDTS = true;
config.sort = buildSystemConfig.sort || false;
config.importsToAdd = [];
- config.compileToModules = ['es2015', 'commonjs', 'amd', 'system'];
+ config.compileToModules = buildSystemConfig.compileToModules || ['es2015', 'commonjs', 'amd', 'system'];
return config;
}
|
fix(modules): fix option to only compile to defined module types
|
5minds_gulptraum
|
train
|
js,js
|
ec20290d2b1a35385bd10fa18a714e7927d1aee3
|
diff --git a/docs/src/components/page-parts/meet-the-team/team.js b/docs/src/components/page-parts/meet-the-team/team.js
index <HASH>..<HASH> 100644
--- a/docs/src/components/page-parts/meet-the-team/team.js
+++ b/docs/src/components/page-parts/meet-the-team/team.js
@@ -69,6 +69,14 @@ export default [
avatar: 'luke_diebold.png',
github: 'ldiebold',
desc: 'Creates video tutorials, podcasts and shows for Quasar Framework.'
+ },
+
+ {
+ name: 'Niccolò Menozzi',
+ role: 'Senior designer',
+ avatar: 'niccolo_menozzi.jpg',
+ github: 'NiccoloMenozzi',
+ desc: 'UX manager, brand management, communication, business strategy.'
}
]
},
|
chore(docs): Add Niccolo to the team
|
quasarframework_quasar
|
train
|
js
|
866a2d5500ab153163c4ba8fefcee35dc85f2d4f
|
diff --git a/tests/test_pygenstub.py b/tests/test_pygenstub.py
index <HASH>..<HASH> 100644
--- a/tests/test_pygenstub.py
+++ b/tests/test_pygenstub.py
@@ -20,6 +20,20 @@ def f(%(params)s):
"""
'''
+function_template = '''
+from x import A, B
+from . import m
+
+
+%(decorator)s
+def f(%(params)s):
+ """Func
+
+ :sig: (%(ptypes)s) -> %(rtype)s
+ """
+'''
+
+
class_template = '''
from x import A
from . import m
@@ -374,6 +388,16 @@ def test_get_stub_comment_instance_variable():
)
+def test_get_stub_function_decorated_unknown():
+ code = function_template % {
+ "decorator": "@foo",
+ "params": "",
+ "ptypes": "",
+ "rtype": "None",
+ }
+ assert get_stub(code) == "def f() -> None: ...\n"
+
+
def test_get_stub_method_decorated_unknown():
code = class_template % {
"bases": "",
|
test: Add test for unknown function decorator
|
uyar_pygenstub
|
train
|
py
|
61129964c8395926f1aeda002a021fbf2743a7c8
|
diff --git a/actions/class.RdfController.php b/actions/class.RdfController.php
index <HASH>..<HASH> 100644
--- a/actions/class.RdfController.php
+++ b/actions/class.RdfController.php
@@ -742,8 +742,7 @@ abstract class tao_actions_RdfController extends tao_actions_CommonModule
}
/**
- * @requiresRight uri READ
- * @requiresRight destinationClassUri WRITE
+ * @requiresRight classUri READ
*/
public function copyClass(): void
{
|
refactor: change requiresRight for copyClass action
|
oat-sa_tao-core
|
train
|
php
|
e513ddbf4b2385fb6fda780f2bf34bec31e022a4
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -134,15 +134,8 @@ const SAUCE_LAUNCHERS = {
// },
};
-const getLaunchers = () => {
- if (USING_TRAVISCI) {
- return USING_SL ? SAUCE_LAUNCHERS : LOCAL_LAUNCHERS;
- } else {
- return ['Chrome'];
- }
-};
-
-const getBrowsers = () => Object.keys(getLaunchers());
+const getLaunchers = () => USING_SL ? SAUCE_LAUNCHERS : LOCAL_LAUNCHERS;
+const getBrowsers = () => USING_TRAVISCI ? Object.keys(getLaunchers()) : ['Chrome'];
module.exports = function(config) {
config.set({
|
chore(infrastructure): Fix local tests (#<I>)
|
material-components_material-components-web
|
train
|
js
|
64a82596af5e6cd6c17197b728956b1a6597cc59
|
diff --git a/maltego_trx/decorator_registry.py b/maltego_trx/decorator_registry.py
index <HASH>..<HASH> 100644
--- a/maltego_trx/decorator_registry.py
+++ b/maltego_trx/decorator_registry.py
@@ -1,3 +1,4 @@
+import logging
import os
from dataclasses import dataclass, field
from itertools import chain
|
feat(registry): added warning about settings for local transforms
|
paterva_maltego-trx
|
train
|
py
|
8b7429125d745c5b49f2d8e60221d9e75e0bf320
|
diff --git a/packages/circularprogress/src/react/index.js b/packages/circularprogress/src/react/index.js
index <HASH>..<HASH> 100644
--- a/packages/circularprogress/src/react/index.js
+++ b/packages/circularprogress/src/react/index.js
@@ -78,9 +78,6 @@ CircularProgress.propTypes = {
CircularProgress.defaultProps = {
size: vars.sizes.medium
}
-CircularProgress.contextTypes = {
- themeName: PropTypes.string
-}
CircularProgress.sizes = vars.sizes
export const sizes = vars.sizes
|
refactor(circularprogress): remove unneed contexttype declaration
|
pluralsight_design-system
|
train
|
js
|
d608c3a3b465759d7fc9b166a5d62f5386847ac9
|
diff --git a/packages/router5/modules/core/navigation.js b/packages/router5/modules/core/navigation.js
index <HASH>..<HASH> 100644
--- a/packages/router5/modules/core/navigation.js
+++ b/packages/router5/modules/core/navigation.js
@@ -96,7 +96,7 @@ export default function withNavigation(router) {
return
}
- const fromState = sameStates ? null : router.getState()
+ const fromState = sameStates || opts.reload ? null : router.getState()
if (opts.skipTransition) {
done(null, toState)
|
fix: fix reloading of routes
|
router5_router5
|
train
|
js
|
159ac9ffa8d7a39d4f109138117c0bb1edfcea91
|
diff --git a/packages/table/index.js b/packages/table/index.js
index <HASH>..<HASH> 100644
--- a/packages/table/index.js
+++ b/packages/table/index.js
@@ -1 +1,13 @@
-export { default } from './src/AvTable';
+import AvTable from './src/AvTable';
+import AvTableHeader from './src/AvTableHeader';
+import AvTableBody from './src/AvTableBody';
+import AvTableRow from './src/AvTableRow';
+
+export {
+ AvTable,
+ AvTableHeader,
+ AvTableBody,
+ AvTableRow
+};
+
+export default AvTable;
\ No newline at end of file
|
feat(table): update exports
|
Availity_availity-react
|
train
|
js
|
8aa29d7636cea5451a7a4f147a9f43a92aaa5b71
|
diff --git a/algorithms/arrays/josephus.py b/algorithms/arrays/josephus.py
index <HASH>..<HASH> 100644
--- a/algorithms/arrays/josephus.py
+++ b/algorithms/arrays/josephus.py
@@ -9,7 +9,6 @@ Input: consider 123456789 members sitting in a circular fashion,
Output: 369485271
"""
-
def josephus(int_list, skip):
skip = skip - 1 # list starts with 0 index
idx = 0
|
fix: removed extra blank line between sections (#<I>)
|
keon_algorithms
|
train
|
py
|
f1f2b34319fa15bc7b9715bc6bd359cb5e07916a
|
diff --git a/source/rafcon/gui/controllers/main_window.py b/source/rafcon/gui/controllers/main_window.py
index <HASH>..<HASH> 100644
--- a/source/rafcon/gui/controllers/main_window.py
+++ b/source/rafcon/gui/controllers/main_window.py
@@ -497,10 +497,14 @@ class MainWindowController(ExtendedController):
config_parameter_undocked = window_key + '_WINDOW_UNDOCKED'
undocked_window_name = window_key.lower() + '_window'
widget_name = window_key.lower()
+ undocked_window_view = getattr(self.view, undocked_window_name)
self.view['main_window'].disconnect(self.handler_ids[undocked_window_name]['state'])
getattr(self, 'on_{}_return_clicked'.format(widget_name))(None)
- self.view[widget_name].reparent(self.view[sidebar_name])
+
+ undocked_window_view['central_eventbox'].remove(self.view[widget_name])
+ self.view[sidebar_name].pack_start(self.view[widget_name], True, True, 0)
+
self.get_controller(controller_name).hide_window()
self.view['undock_{}_button'.format(widget_name)].show()
if replacement_name:
|
fix(main_window): fix redocking of bars
|
DLR-RM_RAFCON
|
train
|
py
|
9a4a988f3d3450f9b736cb35c495125a6fdf291e
|
diff --git a/biz/index.js b/biz/index.js
index <HASH>..<HASH> 100644
--- a/biz/index.js
+++ b/biz/index.js
@@ -42,9 +42,6 @@ module.exports = function(req, res, next) {
} else {
proxyUrl = null;
}
- if (!proxyUrl && !config.isLocalUIUrl(host)) {
- proxyUrl = req.headers.host;
- }
}
}
} else {
|
refactor: request local address if no set proxy url
|
avwo_whistle
|
train
|
js
|
e557fca4efa4ceaa02de6c7c75ad9abcbfd1c031
|
diff --git a/schedula/utils/drw/__init__.py b/schedula/utils/drw/__init__.py
index <HASH>..<HASH> 100644
--- a/schedula/utils/drw/__init__.py
+++ b/schedula/utils/drw/__init__.py
@@ -757,7 +757,7 @@ class SiteFolder:
i: v for i, v in gnode.items()
if i in nodes and (i is not SINK or succ[SINK] or pred[SINK])
}
- if not nodes or not (graph.edges or self.inputs or self.outputs):
+ if not nodes and not (graph.edges or self.inputs or self.outputs):
it[EMPTY] = {'index': (EMPTY,)}
if START in gnode or any(i in it for i in self.inputs):
|
fix(drw): Remove empty node if some node is available.
|
vinci1it2000_schedula
|
train
|
py
|
a71f3d9c3371ebb3406e9ec97da8fa2d9ed2b971
|
diff --git a/docs/src/app/app.js b/docs/src/app/app.js
index <HASH>..<HASH> 100644
--- a/docs/src/app/app.js
+++ b/docs/src/app/app.js
@@ -1,7 +1,7 @@
import 'main.scss';
import React from 'react';
import ReactDOM from 'react-dom';
-import { Router } from 'react-router';
+import { Router, Redirect } from 'react-router';
import Routes from './routes';
import createHistory from 'history/lib/createHashHistory';
@@ -13,6 +13,7 @@ ReactDOM.render(
history={createHistory({ queryKey: false })}
onUpdate={() => window.scrollTo(0, 0)}
>
+ <Redirect from="/" to="components" />
{Routes}
</Router>
, document.getElementById('app'));
|
fix: Automatically redirect from root to components so that you are not staring at a blank page on startup.
|
Pearson-Higher-Ed_compounds
|
train
|
js
|
333115533a6525e8188f712db41adfeb087debb0
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -53,9 +53,9 @@ copyright = '2016, Kitware, Inc.'
# flags to set them explicitly using a variable defined there.
#
# The short X.Y version.
-version = None
+version = ''
# The full version, including alpha/beta/rc tags.
-release = None
+release = ''
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
|
docs(candela): use blank strings instead of None for version/release values
Sphinx <I> chokes when these values are specified as `None`, but using
blank strings is fine too.
The strings appear in-page as a version string, but RTD places the
version at the bottom of the menu bar in any case, so we don't need to
put anything here. It would be rather difficult in any case to determine
what version string should go here for automatic builds, etc.
|
Kitware_candela
|
train
|
py
|
fe2758d3de69f1799bc8cadcdfef500cc6e5c9fd
|
diff --git a/modules/account.js b/modules/account.js
index <HASH>..<HASH> 100644
--- a/modules/account.js
+++ b/modules/account.js
@@ -220,8 +220,9 @@ SR.API.add('_ACCOUNT_REGISTER', {
onDone(err);
return;
}
- // set email
+ // set email and nicename as account
args.email = data.user.email;
+ args.account = data.user.nicename;
l_getUID(getUIDCallback);
});
} else {
@@ -328,7 +329,7 @@ SR.API.add('_ACCOUNT_LOGIN', {
reject(err);
return;
}
-
+ account = data.user.nicename;
resolve(data);
});
} else if (!!args.authMySQL) {
|
fix: get nicename as account when auth via Wordpress
|
imonology_scalra
|
train
|
js
|
da4e9c8f4cad6620138ac3e48febb9358d21650c
|
diff --git a/tests/Unit/AuditableTest.php b/tests/Unit/AuditableTest.php
index <HASH>..<HASH> 100644
--- a/tests/Unit/AuditableTest.php
+++ b/tests/Unit/AuditableTest.php
@@ -472,11 +472,11 @@ class AuditableTest extends AuditingTestCase
$model = new Article();
$model->auditExclude = [
- 'published',
+ 'published_at',
];
$this->assertArraySubset([
- 'published',
+ 'published_at',
], $model->getAuditExclude(), true);
}
@@ -704,8 +704,9 @@ class AuditableTest extends AuditingTestCase
$this->expectExceptionMessage('Incompatibility between OwenIt\Auditing\Tests\Models\Article [id:1] and OwenIt\Auditing\Models\Audit [id:3]. Missing attributes: [subject, text]');
$model = factory(Article::class)->create();
+
$incompatibleAudit = factory(Audit::class)->create([
- 'event' => 'updated',
+ 'event' => 'created',
'auditable_id' => $model->getKey(),
'auditable_type' => Article::class,
'old_values' => [],
|
fix(Tests): use correct attribute name
|
owen-it_laravel-auditing
|
train
|
php
|
a3eb4a9073516747e44eb9ee8a89ea811abb3364
|
diff --git a/lib/profile-update.js b/lib/profile-update.js
index <HASH>..<HASH> 100644
--- a/lib/profile-update.js
+++ b/lib/profile-update.js
@@ -1,5 +1,6 @@
module.exports = updateProfile
+var clone = require('lodash/clone')
var merge = require('lodash/merge')
var Promise = require('lie')
@@ -34,6 +35,8 @@ function updateProfile (state, options) {
account: state.account
})
+ state.emitter.emit('update', clone(state.account))
+
return state.account.profile
})
|
feat: emit update event on profile change
|
hoodiehq_hoodie-account-client
|
train
|
js
|
1f83fb2efa86805d24fad6e5be187f1c55f002ec
|
diff --git a/src/components/CreatePic/CreatePic.js b/src/components/CreatePic/CreatePic.js
index <HASH>..<HASH> 100644
--- a/src/components/CreatePic/CreatePic.js
+++ b/src/components/CreatePic/CreatePic.js
@@ -95,7 +95,7 @@ class CreatePic extends Component {
top: item.y,
width: item.width,
height: item.height,
- round: item.round
+ isRound: item.isRound
});
resolve();
@@ -127,12 +127,12 @@ class CreatePic extends Component {
* @param {Number} [width] 图片缩放宽度
* @param {Number} [height] 图片缩放高度
* @param {string} [composite] 图片组合蒙层类型,取值同globalCompositeOperation
- * @param {Boolean} [round] 图片是否带圆角
+ * @param {Boolean} [isRound] 图片是否带圆角
*/
- drawImage({ img, top = 0, left = 0, width = 0, height = 0, round = false }) {
+ drawImage({ img, top = 0, left = 0, width = 0, height = 0, isRound = false }) {
this.ctx.save();
- if (round) {
+ if (isRound) {
this.ctx.fill();
this.ctx.beginPath();
this.ctx.arc(left + width / 2, top + height / 2, width / 2, 0, 2 * Math.PI);
|
feat(CreatePic-support-round): 命名修改
|
qiqiboy_react-snippets
|
train
|
js
|
a1504fe198122d62459a8b7a0ee67bdba179bc9f
|
diff --git a/easytrader/__init__.py b/easytrader/__init__.py
index <HASH>..<HASH> 100644
--- a/easytrader/__init__.py
+++ b/easytrader/__init__.py
@@ -7,5 +7,5 @@ from .yjbtrader import YJBTrader
from .gftrader import GFTrader
from .joinquant_follower import JoinQuantFollower
-__version__ = '0.10.0'
+__version__ = '0.10.1'
__author__ = 'shidenggui'
diff --git a/easytrader/follower.py b/easytrader/follower.py
index <HASH>..<HASH> 100644
--- a/easytrader/follower.py
+++ b/easytrader/follower.py
@@ -142,7 +142,11 @@ class BaseFollower(object):
:param name: 策略名字
:param interval: 轮询策略的时间间隔,单位为秒"""
while True:
- transactions = self.query_strategy_transaction(strategy, **kwargs)
+ try:
+ transactions = self.query_strategy_transaction(strategy, **kwargs)
+ except Exception as e:
+ log.warning('无法获取策略 {} 调仓信息, 错误: {}, 跳过此次调仓查询'.format(name, e))
+ continue
for t in transactions:
trade_cmd = {
'strategy': strategy,
|
feat(follower): catch query transactions exception
|
shidenggui_easytrader
|
train
|
py,py
|
dd5865500da54a7fb8afa9832afad727f1845fa3
|
diff --git a/jf_agent/git/github_client.py b/jf_agent/git/github_client.py
index <HASH>..<HASH> 100644
--- a/jf_agent/git/github_client.py
+++ b/jf_agent/git/github_client.py
@@ -34,7 +34,17 @@ class GithubClient:
def get_all_users(self, org):
url = f'{self.base_url}/orgs/{org}/members'
- return (self.get_json(m['url']) for m in self.get_all_pages(url))
+ for m in self.get_all_pages(url):
+ try:
+ yield self.get_json(m['url'])
+ except requests.exceptions.HTTPError as e:
+ # non-403 and non-404 should bubble up
+ if e.response.status_code not in (403, 404):
+ raise
+
+ agent_logging.log_and_print_error_or_warning(
+ logger, logging.WARNING, msg_args=[m["url"], e.response.status_code], error_code=3061,
+ )
def get_all_repos(self, org):
url = f'{self.base_url}/orgs/{org}/repos'
|
fix: skip "broken" or hidden users
We have a user in our org whose account appears broken and
it's not just the API returning HTTP <I>, it's their GitHub
page, too! Seems safe to skip them to unblock the download.
|
Jellyfish-AI_jf_agent
|
train
|
py
|
53bf12f2bbd6a5e3710a6aefde7babe6c6067a4c
|
diff --git a/airtest/core/android/cap_methods/minicap.py b/airtest/core/android/cap_methods/minicap.py
index <HASH>..<HASH> 100644
--- a/airtest/core/android/cap_methods/minicap.py
+++ b/airtest/core/android/cap_methods/minicap.py
@@ -175,8 +175,8 @@ class Minicap(BaseCap):
display_info['physical_height'] = display_info['height']
# 强制设定宽度width为更小的数字、height为更大的数字,避免因为各手机厂商返回结果的顺序不同导致问题
# Set the width to a smaller number and the height to a larger number
- display_info['width'] = int(min(arr[0]))
- display_info['height'] = int(max(arr[0]))
+ display_info['width'] = min(list(map(int, arr[0])))
+ display_info['height'] = max(list(map(int, arr[0])))
return display_info
@on_method_ready('install_or_upgrade')
|
fix: width and height is str
(cherry picked from commit <I>abbb<I>af7e<I>b<I>c<I>ef<I>)
|
AirtestProject_Airtest
|
train
|
py
|
a8e5868f0061ec71e7dd8b315c7b8b56450f31e9
|
diff --git a/packages/app-forms/src/editor/plugins/formSettings/components/ReCaptchaSettingsDialog.js b/packages/app-forms/src/editor/plugins/formSettings/components/ReCaptchaSettingsDialog.js
index <HASH>..<HASH> 100644
--- a/packages/app-forms/src/editor/plugins/formSettings/components/ReCaptchaSettingsDialog.js
+++ b/packages/app-forms/src/editor/plugins/formSettings/components/ReCaptchaSettingsDialog.js
@@ -43,7 +43,7 @@ const ReCaptchaSettingsDialog = ({ open, onClose, reCaptchaSettings, onSubmit }:
data: { reCaptcha: { enabled: true, siteKey, secretKey } }
}
}),
- "data.settings.forms"
+ "data.forms.updateSettings"
);
setData(data => {
data.settings.reCaptcha.settings = {
|
fix: submit reCaptcha settings in form editor
|
Webiny_webiny-js
|
train
|
js
|
495636becf98660d78c4ce2fe821df5b70ce4314
|
diff --git a/spec/config_spec.rb b/spec/config_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/config_spec.rb
+++ b/spec/config_spec.rb
@@ -705,7 +705,7 @@ describe Anyway::Config, type: :config do
subject { app_config.new(config_values) }
it "not to raise ValidationError when all values are presence" do
- expect { subject }.to_not raise_error(Anyway::Config::ValidationError)
+ expect { subject }.to_not raise_error
end
shared_examples "raises ValidationError" do
@@ -769,7 +769,7 @@ describe Anyway::Config, type: :config do
let(:missed_keys) { [:redis_host] }
it "not raises ValidationError" do
- expect { subject }.to_not raise_error(Anyway::Config::ValidationError, error_msg)
+ expect { subject }.to_not raise_error
end
end
@@ -786,7 +786,7 @@ describe Anyway::Config, type: :config do
before { allow(Anyway::Settings).to receive(:current_environment).and_return(nil) }
it "not to raise ValidationError" do
- expect { subject }.to_not raise_error(Anyway::Config::ValidationError)
+ expect { subject }.to_not raise_error
end
it "has specific required keys" do
|
fix(specs): to_not raise_error
|
palkan_anyway_config
|
train
|
rb
|
332524dae73cb102c244d3b568ec880f9bc816aa
|
diff --git a/lib/plugins/aws/package/compile/events/cloudWatchLog/index.js b/lib/plugins/aws/package/compile/events/cloudWatchLog/index.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/aws/package/compile/events/cloudWatchLog/index.js
+++ b/lib/plugins/aws/package/compile/events/cloudWatchLog/index.js
@@ -60,7 +60,7 @@ class AwsCompileCloudWatchLogEvents {
throw new this.serverless.classes.Error(errorMessage);
}
- if (_.indexOf(logGroupNames, LogGroupName) !== -1) {
+ if (logGroupNames.includes(LogGroupName)) {
const errorMessage = [
`"${LogGroupName}" logGroup for cloudwatchLog event is duplicated.`,
' This property can only be set once per CloudFormation stack.',
|
refactor: Replace `_.indexOf` with `arr.includes` (#<I>)
|
serverless_serverless
|
train
|
js
|
08e393c1c3c284e8d69b2c77d046c6d1938e0dfb
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -424,6 +424,8 @@ function loadText(name, req, load) {
req(['text!' + name], load);
}
+const textExtPlugin = {load: loadText};
+
// TODO support wasm
// how to know what kind of importObject the wasm file needs?
function loadWasm(name, req, load) {
@@ -446,16 +448,19 @@ function reset() {
define('ext:json', {
load(name, req, load) {
- req(['json!' + name], load);
+ req(['text!' + name], text => load(JSON.parse(text)));
}
});
- define('ext:html', {load: loadText});
-
- define('ext:svg', {load: loadText});
+ define('ext:html', textExtPlugin);
+ define('ext:htm', textExtPlugin);
+ define('ext:md', textExtPlugin);
+ define('ext:svg', textExtPlugin);
+ define('ext:yml', textExtPlugin);
+ define('ext:yaml', textExtPlugin);
// by default, directly loading css file doesn't inject style
- define('ext:css', {load: loadText});
+ define('ext:css', textExtPlugin);
// to inject style with `import 'some.css';`
// requirejs.undef('ext:css')
// define('ext:css', {load: implement_inject_style})
|
refactor: dry ext plugins
|
dumberjs_dumber-module-loader
|
train
|
js
|
c571a6da9c01e036932db741a0b0189eda735e13
|
diff --git a/src/server/public/abecms/scripts/modules/EditorSave.js b/src/server/public/abecms/scripts/modules/EditorSave.js
index <HASH>..<HASH> 100755
--- a/src/server/public/abecms/scripts/modules/EditorSave.js
+++ b/src/server/public/abecms/scripts/modules/EditorSave.js
@@ -99,6 +99,7 @@ export default class EditorSave {
}
if(emptyObject === 0) {
delete this._json.data[obj][index]
+ if(this._json.data[obj].length == 1) delete this._json.data[obj]
}
} else {
if (input.getAttribute('data-autocomplete') === 'true' || input.getAttribute('data-multiple') === 'multiple') {
|
fix: first block each is not removed on click delete
After saving if a block each that had only one element was removed, the block still appear after page reload
|
abecms_abecms
|
train
|
js
|
151378de4e2ce2d39a0a453fb2daea8c753dd8a2
|
diff --git a/src/components/list/list.js b/src/components/list/list.js
index <HASH>..<HASH> 100644
--- a/src/components/list/list.js
+++ b/src/components/list/list.js
@@ -181,7 +181,7 @@ function mdListDirective($mdTheming) {
* <span>Alan Turing</span>
* </hljs>
*
- * When using `<md-icon>` for an avater, you have to use the `.md-avatar-icon` class.
+ * When using `<md-icon>` for an avatar, you have to use the `.md-avatar-icon` class.
* <hljs lang="html">
* <md-list-item>
* <md-icon class="md-avatar-icon" md-svg-icon="avatars:timothy"></md-icon>
|
docs(list): fix typo (#<I>)
|
angular_material
|
train
|
js
|
39c28b4297891be663a925bf79c2c0c8456d3e4b
|
diff --git a/packages/avatar/Avatar.js b/packages/avatar/Avatar.js
index <HASH>..<HASH> 100644
--- a/packages/avatar/Avatar.js
+++ b/packages/avatar/Avatar.js
@@ -28,14 +28,14 @@ Loader.defaultProps = {
};
const Avatar = ({ fallback, skeletonProps, ...props }) => {
- const [avatar, setAvatar] = useState(null);
+ const [avatar, setAvatar] = useState(fallback);
const [loading, setLoading] = useState(true);
useEffectAsync(async () => {
setLoading(true);
const resp = await avSettingsApi.getApplication('AVATAR');
- const avi = get(resp, 'data.settings[0].avatar');
+ const avi = get(resp, 'data.settings[0].avatar', fallback);
setAvatar(avi);
setLoading(false);
@@ -51,12 +51,10 @@ const Avatar = ({ fallback, skeletonProps, ...props }) => {
);
}
- const url = avatar || fallback;
-
return (
<Img
data-testid="avatar-img"
- src={url}
+ src={avatar}
alt="Avatar"
loader={
<Loader
|
refactor(avatar): refactor way default avatar is set in state
|
Availity_availity-react
|
train
|
js
|
22481eefafdf574a8a6f81ad889ae82aa3a139a9
|
diff --git a/tests/Options/FileUploadOptionsTest.php b/tests/Options/FileUploadOptionsTest.php
index <HASH>..<HASH> 100644
--- a/tests/Options/FileUploadOptionsTest.php
+++ b/tests/Options/FileUploadOptionsTest.php
@@ -1,12 +1,4 @@
-
<?php
-/**
- *
- * User: Martin Halamíček
- * Date: 16.5.12
- * Time: 11:46
- *
- */
namespace Keboola\Test\Options;
diff --git a/tests/Options/FileUploadTransferOptionsTest.php b/tests/Options/FileUploadTransferOptionsTest.php
index <HASH>..<HASH> 100644
--- a/tests/Options/FileUploadTransferOptionsTest.php
+++ b/tests/Options/FileUploadTransferOptionsTest.php
@@ -1,11 +1,4 @@
<?php
-/**
- *
- * User: Martin Halamíček
- * Date: 16.5.12
- * Time: 11:46
- *
- */
namespace Keboola\Test\Options;
|
fix(tests): remove header comments
|
keboola_storage-api-php-client
|
train
|
php,php
|
0c4eafb436f5f7f4bf59fbbc87fea902a0e28435
|
diff --git a/src/server/index.html.js b/src/server/index.html.js
index <HASH>..<HASH> 100644
--- a/src/server/index.html.js
+++ b/src/server/index.html.js
@@ -1,4 +1,5 @@
import url from 'url';
+import { version } from '../../package.json';
// assets.manager will be:
// - undefined
@@ -37,6 +38,7 @@ export default function (data) {
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="storybook-version" content="${version}">
<title>React Storybook</title>
<style>
/*
|
feat: add storybook version to output (#<I>)
This adds the storybook version to the generated storybook.
|
storybooks_storybook
|
train
|
js
|
1334214efed8c771b0f723f4d9dcf335c5ed0701
|
diff --git a/styleguide/docs/react/iconography.js b/styleguide/docs/react/iconography.js
index <HASH>..<HASH> 100644
--- a/styleguide/docs/react/iconography.js
+++ b/styleguide/docs/react/iconography.js
@@ -38,6 +38,16 @@ Icons by default will be sized based on the local font size. You can override th
<Icon src="add" style={{width: 100, height: 100}}/>
```
+Icons can be vertically aligned with either 'middle' or 'baseline'. The default is 'middle':
+
+```react_example
+<div>
+ <div>some text <Icon src="add"/> some text</div>
+ <div>some text <Icon src="add" verticalAlign="middle"/> some text</div>
+ <div>some text <Icon src="add" verticalAlign="baseline"/> some text</div>
+</div>
+```
+
Property | Type | Description
------------- | --------------| --------------------------------------------------------------------------
`src` | String | Name of the svg to load
|
feat(Iconography): Add examples of verticalAlign to iconography docs
|
pivotal-cf_pivotal-ui
|
train
|
js
|
09b6ecbc1e97820bf612156276dd39fe82d75277
|
diff --git a/src/publickey.js b/src/publickey.js
index <HASH>..<HASH> 100644
--- a/src/publickey.js
+++ b/src/publickey.js
@@ -60,7 +60,7 @@ export class PublicKey {
}
/**
- * Return the base-58 representation of the public key
+ * Return the Buffer representation of the public key
*/
toBuffer(): Buffer {
const b = this._bn.toArrayLike(Buffer);
|
docs: correct toBuffer comment
|
solana-labs_solana-web3.js
|
train
|
js
|
8d494dd86699e4bb447e06198f70ca036167d7bf
|
diff --git a/src/utils/update-config.js b/src/utils/update-config.js
index <HASH>..<HASH> 100644
--- a/src/utils/update-config.js
+++ b/src/utils/update-config.js
@@ -90,7 +90,7 @@ const addNodes = function(json, opts) {
See src/default-icons for an example
keyName: String
- probably icon or splash, what is the config.xml node name?
+ `icon` or `splash`
serializeFn: Function
Given a single node from desiredNodes, serialize to config.xml format
|
docs(update-config): Update util to document options for keyName
Removes the unsure comment after verifying against Cordova docs.
|
isleofcode_splicon
|
train
|
js
|
3c4de30625bf188cf4513d376d23f7ee7eb22860
|
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
@@ -280,7 +280,7 @@ def find_duplicate_metabolites_in_compartments(model):
"inchikey" in met.annotation]
for a, b in combinations(ann_mets, 2):
if a[1]["inchikey"] == b[1]["inchikey"]:
- duplicates.append((a[0], b[0]))
+ duplicates.append((a[0].id, b[0].id))
return duplicates
|
fix: return tuple of metabolite IDs in duplicate metabolite helper to avoid serialization errors
|
opencobra_memote
|
train
|
py
|
b2552e4f7de21f309643506ed1a32e8072eaff51
|
diff --git a/test/page.spec.js b/test/page.spec.js
index <HASH>..<HASH> 100644
--- a/test/page.spec.js
+++ b/test/page.spec.js
@@ -896,7 +896,7 @@ describe('Page', function () {
});
describe('Page.setUserAgent', function () {
- itFailsFirefox('should work', async () => {
+ it('should work', async () => {
const { page, server } = getTestState();
expect(await page.evaluate(() => navigator.userAgent)).toContain(
|
chore: restore page.setUserAgent test (#<I>)
Ref. #<I>.
|
GoogleChrome_puppeteer
|
train
|
js
|
08372cfa47972ead925dc849e4f4e8989ae8060d
|
diff --git a/src/stateDirectives.js b/src/stateDirectives.js
index <HASH>..<HASH> 100644
--- a/src/stateDirectives.js
+++ b/src/stateDirectives.js
@@ -217,7 +217,7 @@ function $StateRefDirective($state, $timeout) {
* @restrict A
*
* @description
- * The same as {@link ui.router.state.directive:ui-sref-active ui-sref-active} but will will only activate
+ * The same as {@link ui.router.state.directive:ui-sref-active ui-sref-active} but will only activate
* when the exact target state used in the `ui-sref` is active; no child states.
*
*/
|
docs: Fix extra "will" in ui-sref-active-eq
The word “will” is repeated twice.
|
ui-router_angular
|
train
|
js
|
2356c6985de10b22c54e3723e368412fea405dbb
|
diff --git a/packages/cli/bin/sketch-init.js b/packages/cli/bin/sketch-init.js
index <HASH>..<HASH> 100644
--- a/packages/cli/bin/sketch-init.js
+++ b/packages/cli/bin/sketch-init.js
@@ -6,6 +6,8 @@ const gitConfigPath = require("git-config-path");
const cli = require("../dist");
+const enableTpls = ["module", "react", "react-redux", "service", "tcp", "cli"];
+
function gitUser() {
const gitConfig = parseGitConfig.sync({ cwd: "/", path: gitConfigPath("global") });
return Object.assign({ name: "", email: "" }, gitConfig.user);
@@ -13,7 +15,7 @@ function gitUser() {
program
.option("-si, --skip-install", "skip installation")
- .option("-t, --template <name>", "all templates: module, react, react-redux, service, tcp")
+ .option("-t, --template <name>", `all templates: ${enableTpls.join(",")}`)
.parse(process.argv);
const dest = program.args[0] || ".";
@@ -23,7 +25,7 @@ const questions = [
type: "list",
name: "template",
message: "which boilerplate do you want use:",
- choices: ["module", "react", "react-redux", "service", "tcp"],
+ choices: enableTpls,
when: () => !program.template,
},
{
|
fix: add 'cli' to sketch-cli init choices
|
36node_sketch
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.