hash
stringlengths
40
40
diff
stringlengths
131
26.7k
message
stringlengths
7
694
project
stringlengths
5
67
split
stringclasses
1 value
diff_languages
stringlengths
2
24
6ae2c4b43797445c7f74bc235a9666d7a4711069
diff --git a/demo/demo.js b/demo/demo.js index <HASH>..<HASH> 100644 --- a/demo/demo.js +++ b/demo/demo.js @@ -13,8 +13,6 @@ function init(){ domi5 = new OriDomi(demo5, { hPanels: 10, vPanels: 1 }), foldMe = document.querySelector('.fold-me > p'), foldDomi = new OriDomi(foldMe, { vPanels: 1, hPanels: 4, perspective: 200, speed: 500 }); - //menu = document.getElementsByClassName('menu')[0], - //menuDomi = new OriDomi(menu, { vPanels: 1, hPanels: 4, perspective: 200, speed: 500, touchEnabled: false, shadingIntensity: 7 }); foldMe.addEventListener('mouseover', function(){ foldDomi.accordion(-40, 1); @@ -23,15 +21,6 @@ function init(){ foldMe.addEventListener('mouseout', function(){ foldDomi.reset(); }, false); - /* - menu.addEventListener('mouseover', function(){ - menuDomi.accordion(-10, 1); - }, false); - - menu.addEventListener('mouseout', function(){ - menuDomi.reset(); - }, false); - */ setTimeout(function(){ domi1.reveal(40, 1);
removed menu oridomi from demo js
dmotz_oriDomi
train
js
9afe8224fd26dff67deec0bc21d62f915fe71567
diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java index <HASH>..<HASH> 100755 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java @@ -1750,6 +1750,7 @@ public class Cql2ElmVisitor extends cqlBaseVisitor { switch (ctx.getChild(1).getText()) { case "all" : returnClause.setDistinct(false); break; case "distinct" : returnClause.setDistinct(true); break; + default : break; } } for (cqlParser.ExpressionContext expression : ctx.expression()) {
Fixed a code warning that was failing the build.
cqframework_clinical_quality_language
train
java
1373bb272b553d5ceb0e70607d8b9e417c046a46
diff --git a/tests/Convert/Converters/ConverterTestHelper.php b/tests/Convert/Converters/ConverterTestHelper.php index <HASH>..<HASH> 100644 --- a/tests/Convert/Converters/ConverterTestHelper.php +++ b/tests/Convert/Converters/ConverterTestHelper.php @@ -186,6 +186,7 @@ class ConverterTestHelper ); try { $converter->checkOperationality(); + echo "\n" . $converterClassName . ' is operational.' . "\n"; } catch (\Exception $e) { echo "\n" . 'NOTICE: ' . $converterClassName . ' is not operational: ' . $e->getMessage() . "\n"; }
Let us know which converters are working too, during test
rosell-dk_webp-convert
train
php
d6e1cb7cbfe4b604d074814f00f654f5c545a71a
diff --git a/daemon/volumes.go b/daemon/volumes.go index <HASH>..<HASH> 100644 --- a/daemon/volumes.go +++ b/daemon/volumes.go @@ -281,6 +281,7 @@ func (daemon *Daemon) backportMountSpec(container *container.Container) { from, _, err := volume.ParseVolumesFrom(fromSpec) if err != nil { logrus.WithError(err).WithField("id", container.ID).Error("Error reading volumes-from spec during mount spec backport") + continue } fromC, err := daemon.GetContainer(from) if err != nil {
Add continue on error in mountspec backport
moby_moby
train
go
06ac752dc35dffc83f68acb5dfeb849e52577aa2
diff --git a/src/frontend/org/voltcore/network/ReverseDNSCache.java b/src/frontend/org/voltcore/network/ReverseDNSCache.java index <HASH>..<HASH> 100644 --- a/src/frontend/org/voltcore/network/ReverseDNSCache.java +++ b/src/frontend/org/voltcore/network/ReverseDNSCache.java @@ -40,8 +40,8 @@ public class ReverseDNSCache { public static final long DEFAULT_MAX_SUCCESS = 1000 * 10; public static final long DEFAULT_MAX_FAILURE = 1000 * 10; - public static final long DEFAULT_SUCCESS_TIMEOUT = 300L; //10 minutes - public static final long DEFAULT_FAILURE_TIMEOUT = 3600; //1 hr + public static final long DEFAULT_SUCCESS_TIMEOUT = 600L; //10 minutes + public static final long DEFAULT_FAILURE_TIMEOUT = 3600L; //1 hr public static final TimeUnit DEFAULT_TIMEOUT_UNIT = TimeUnit.SECONDS; private static final Function<InetAddress, String> DNS_RESOLVER = new Function<InetAddress, String>() {
For ENG-<I>, fix timeout and comment based on Ning's feedback
VoltDB_voltdb
train
java
106f319f6d9f886afff5e1bdbbe083223a4c841c
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -60,13 +60,6 @@ module Puppet this directory can be removed without causing harm (although it might result in spurious service restarts)." }, - :statefile => { :default => "$statedir/state.yaml", - :mode => 0660, - :desc => "Where puppetd and puppetmasterd store state associated - with the running configuration. In the case of puppetmasterd, - this file reflects the state discovered through interacting - with clients." - }, :ssldir => { :default => "$confdir/ssl", :mode => 0771, @@ -363,6 +356,13 @@ module Puppet :mode => 0660, :desc => "Where puppetd caches the local configuration. An extension indicating the cache format is added automatically."}, + :statefile => { :default => "$statedir/state.yaml", + :mode => 0660, + :desc => "Where puppetd and puppetmasterd store state associated + with the running configuration. In the case of puppetmasterd, + this file reflects the state discovered through interacting + with clients." + }, :classfile => { :default => "$statedir/classes.txt", :owner => "root", :mode => 0644,
Changing the statefile to only being managed by clients, not by puppetmasterd.
puppetlabs_puppet
train
rb
ac0f0c69eda8559b320b9a3af3b47d6dea448fa7
diff --git a/filters/ErrorToExceptionFilter.php b/filters/ErrorToExceptionFilter.php index <HASH>..<HASH> 100644 --- a/filters/ErrorToExceptionFilter.php +++ b/filters/ErrorToExceptionFilter.php @@ -5,13 +5,13 @@ namespace filsh\yii2\oauth2server\filters; use Yii; use yii\base\Controller; -class ErrorToExceptionFilter extends yii\base\Behavior +class ErrorToExceptionFilter extends \yii\base\Behavior { public function events() { return [Controller::EVENT_AFTER_ACTION => 'afterAction']; } - + /** * @param ActionEvent $event * @return boolean @@ -20,7 +20,7 @@ class ErrorToExceptionFilter extends yii\base\Behavior public function afterAction($event) { $response = Yii::$app->getModule('oauth2')->getServer()->getResponse(); - + $isValid = true; if($response !== null) { $isValid = $response->isInformational() || $response->isSuccessful() || $response->isRedirection(); @@ -35,4 +35,4 @@ class ErrorToExceptionFilter extends yii\base\Behavior throw new \yii\web\HttpException($status, $message); } } -} \ No newline at end of file +}
Fixed full class name from which ErrorToExceptionFilter extends
tecnocen-com_yii2-oauth2-server
train
php
3041420ab9b4d7b70583b4e8b10d16612d00bb2a
diff --git a/src/core/lombok/javac/handlers/HandleNonNull.java b/src/core/lombok/javac/handlers/HandleNonNull.java index <HASH>..<HASH> 100644 --- a/src/core/lombok/javac/handlers/HandleNonNull.java +++ b/src/core/lombok/javac/handlers/HandleNonNull.java @@ -141,6 +141,7 @@ public class HandleNonNull extends JavacAnnotationHandler<NonNull> { List<JCStatement> newList = tail.prepend(nullCheck); for (JCStatement stat : head) newList = newList.prepend(stat); declaration.body.stats = newList; + annotationNode.getAst().setChanged(); } public boolean isNullCheck(JCStatement stat) {
[fixes #<I>] A source file with just parameter @NonNull would not trigger delombok due to lack of ast.setChanged flagging
rzwitserloot_lombok
train
java
cfd2fed494dc707e03ade086009ebfdd27578477
diff --git a/packages/netlify-cms-core/src/components/App/App.js b/packages/netlify-cms-core/src/components/App/App.js index <HASH>..<HASH> 100644 --- a/packages/netlify-cms-core/src/components/App/App.js +++ b/packages/netlify-cms-core/src/components/App/App.js @@ -217,11 +217,11 @@ class App extends React.Component { render={props => <Collection {...props} isSearchResults />} /> <RouteInCollection - path="/edit/:collectionName/:entryName" + path="/edit/:name/:entryName" collections={collections} render={({ match }) => { - const { collectionName, entryName } = match.params; - return <Redirect to={`/collections/${collectionName}/entries/${entryName}`} />; + const { name, entryName } = match.params; + return <Redirect to={`/collections/${name}/entries/${entryName}`} />; }} /> <Route component={NotFoundPage} />
fix(core): use correct name for edit route param (#<I>)
netlify_netlify-cms
train
js
a27555504d23ed45f03a74498bb8b032b1c0d9f3
diff --git a/lib/visitor/evaluator.js b/lib/visitor/evaluator.js index <HASH>..<HASH> 100644 --- a/lib/visitor/evaluator.js +++ b/lib/visitor/evaluator.js @@ -202,21 +202,6 @@ Evaluator.prototype.visitPage = function(page){ }; /** - * Visit noops. - */ - -Evaluator.prototype.visitString = -Evaluator.prototype.visitUnit = -Evaluator.prototype.visitRGBA = -Evaluator.prototype.visitHSLA = -Evaluator.prototype.visitNull = -Evaluator.prototype.visitComment = -Evaluator.prototype.visitBoolean = -Evaluator.prototype.visitLiteral = function(string){ - return string; -}; - -/** * Visit Keyframes. */ diff --git a/lib/visitor/index.js b/lib/visitor/index.js index <HASH>..<HASH> 100644 --- a/lib/visitor/index.js +++ b/lib/visitor/index.js @@ -25,7 +25,7 @@ var Visitor = module.exports = function Visitor(root) { Visitor.prototype.visit = function(node, fn){ var method = 'visit' + node.constructor.name; - if (!this[method]) throw new Error('un-implemented ' + method); - return this[method](node); + if (this[method]) return this[method](node); + return node; };
revert noop visitor methods
stylus_stylus
train
js,js
4f6c7abca0700a7dd7b4295bd50e253c441384ba
diff --git a/lib/milia/control.rb b/lib/milia/control.rb index <HASH>..<HASH> 100644 --- a/lib/milia/control.rb +++ b/lib/milia/control.rb @@ -171,10 +171,10 @@ module Milia # My signup form has fields for user's email, # organization's name (tenant model), coupon code, # ------------------------------------------------------------------------------ - def prep_signup_view(tenant=nil, user=nil, coupon='') + def prep_signup_view(tenant=nil, user=nil, coupon={coupon:''}) @user = klass_option_obj( User, user ) @tenant = klass_option_obj( Tenant, tenant ) - @coupon = coupon if ::Milia.use_coupon + @coupon = coupon # if ::Milia.use_coupon end # ------------------------------------------------------------------------------
reg ctlr logging - 5
jekuno_milia
train
rb
2d2fce5040abcfbe46da45611e5896b0b8959d4d
diff --git a/trionyx/trionyx/middleware.py b/trionyx/trionyx/middleware.py index <HASH>..<HASH> 100644 --- a/trionyx/trionyx/middleware.py +++ b/trionyx/trionyx/middleware.py @@ -57,10 +57,26 @@ class GlobalRequestMiddleware: def __call__(self, request): """Store request in local data""" LOCAL_DATA.request = request + + def streaming_content_wrapper(content): + try: + for chunk in content: + yield chunk + finally: + del LOCAL_DATA.request + try: - return self.get_response(request) - finally: + response = self.get_response(request) + except Exception as e: del LOCAL_DATA.request + raise e + + if response.streaming: + response.streaming_content = streaming_content_wrapper(response.streaming_content) + else: + del LOCAL_DATA.request + + return response class LastLoginMiddleware:
[BUGFIX] get_current_request not working in streaming response
krukas_Trionyx
train
py
8f0eeabca71e8f2f930f9d734264701dbcf69be7
diff --git a/src/Boot.php b/src/Boot.php index <HASH>..<HASH> 100755 --- a/src/Boot.php +++ b/src/Boot.php @@ -146,7 +146,10 @@ if (empty($_SESSION['__session_name_validated'])) { // Http auth for PHP-CGI mode if (isset($_SERVER['HTTP_AUTHORIZATION']) && !isset($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'])) { - list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); + $tmp = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); + if (isset($tmp[1])) { + list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); + } } // Ini with required keys
HTTP auth for PHP-CGI fix for servers without it
devp-eu_tmcms-core
train
php
e2914b6e45f80e5eb52575bed33c5915b05755e7
diff --git a/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java b/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java index <HASH>..<HASH> 100644 --- a/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java +++ b/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java @@ -126,7 +126,8 @@ public class TypeAnnotationPosition { // Tree position. public int pos = -1; - // For typecasts, type tests, new (and locals, as start_pc). + // For type casts, type tests, new, locals (as start_pc), + // and method and constructor reference type arguments. public boolean isValidOffset = false; public int offset = -1;
Clarify and expand a comment.
wmdietl_jsr308-langtools
train
java
152c14419698efd306eac7707493a15ff4ec4a69
diff --git a/auto_ml/utils.py b/auto_ml/utils.py index <HASH>..<HASH> 100644 --- a/auto_ml/utils.py +++ b/auto_ml/utils.py @@ -25,27 +25,23 @@ class SplitOutput(BaseEstimator, TransformerMixin): return self -def instantiate_model(model_name='RandomForestClassifier'): - print(model_name) - - model_map = { - 'LogisticRegression': LogisticRegression(), - 'RandomForestClassifier': RandomForestClassifier() - } - - return model_map[model_name] - - class FinalModelATC(BaseEstimator, TransformerMixin): - def __init__(self, model_name, X_train=None, y_train=None, perform_grid_search_on_model=False): + def __init__(self, model_name, X_train=None, y_train=None, perform_grid_search_on_model=False, model_map=None): self.model_name = model_name self.X_train = X_train self.y_train = y_train self.perform_grid_search_on_model = perform_grid_search_on_model + if model_map is not None: + self.model_map = model_map + else: + self.set_model_map() + + + def set_model_map(self): self.model_map = { 'LogisticRegression': LogisticRegression(), 'RandomForestClassifier': RandomForestClassifier()
removes old code and modularizes model_map to make it more readable
ClimbsRocks_auto_ml
train
py
7e7b1d3c27212b2ebd6f521c08f4e26603dc14e6
diff --git a/js/values/WordCombination.js b/js/values/WordCombination.js index <HASH>..<HASH> 100644 --- a/js/values/WordCombination.js +++ b/js/values/WordCombination.js @@ -27,10 +27,10 @@ function WordCombination( words, occurrences ) { } WordCombination.lengthBonus = { - 2: 2, - 3: 4, - 4: 6, - 5: 8, + 2: 3, + 3: 6, + 4: 9, + 5: 12, }; /**
Increase length bonus to 3 to improve results
Yoast_YoastSEO.js
train
js
20e408e666dba27371ab542e02bce3cfdb86af06
diff --git a/app/models/renalware/letters/pdf_letter_cache.rb b/app/models/renalware/letters/pdf_letter_cache.rb index <HASH>..<HASH> 100644 --- a/app/models/renalware/letters/pdf_letter_cache.rb +++ b/app/models/renalware/letters/pdf_letter_cache.rb @@ -40,7 +40,7 @@ module Renalware delegate :clear, to: :store def fetch(letter, **options) - store.fetch(cache_key_for(letter, **options)) { yield } + store.fetch(cache_key_for(letter, **options), expires_in: 4.weeks) { yield } end # Note the letter must be a LetterPresenter which has a #to_html method
Expire letters in the PDF cache after 4 weeks
airslie_renalware-core
train
rb
b54a2b470b714533768b3efc138524be4b130d45
diff --git a/dev_setup.py b/dev_setup.py index <HASH>..<HASH> 100644 --- a/dev_setup.py +++ b/dev_setup.py @@ -11,10 +11,13 @@ DESCRIPTION updates to PmagPy, it may be better to use the pip or binary installs of this software instructions here: (https://earthref.org/PmagPy/cookbook/#pip_install). - Also note for Windows users the windows_install function of this file + Note for Windows users: the windows_install function of this file requires administrative access so you will need to run in a command prompt with elevated privileges. See: (http://www.thewindowsclub.com/how-to-run-command-prompt-as-an-administrator) + Note for OSX users: you must use bash as your shell (not csh, zsh, etc.). + To switch to bash, select Terminal --> Preferences --> General, + and choose "default login shell". Last, this script MUST BE RUN FROM THE PMAGPY DIRECTORY. SYNTAX
for dev_setup.py add note about using bash instead of other shells
PmagPy_PmagPy
train
py
fc02f8a2dc10f5c63db97b81db3aad1e8b67980d
diff --git a/python-package/xgboost/sklearn.py b/python-package/xgboost/sklearn.py index <HASH>..<HASH> 100644 --- a/python-package/xgboost/sklearn.py +++ b/python-package/xgboost/sklearn.py @@ -222,7 +222,7 @@ class XGBModel(XGBModelBase): evals_result = {} if eval_set is not None: - evals = list(DMatrix(x[0], label=x[1],missing=self.missing) for x in eval_set) + evals = list(DMatrix(x[0], label=x[1], missing=self.missing) for x in eval_set) evals = list(zip(evals, ["validation_{}".format(i) for i in range(len(evals))])) else:
cosmetic change cosmetic change of putting space after comma compared to previous edit.
dmlc_xgboost
train
py
aebd0fbc0db32af4f456e2cdff8844e2dae0d43c
diff --git a/nbdiff/diff.py b/nbdiff/diff.py index <HASH>..<HASH> 100644 --- a/nbdiff/diff.py +++ b/nbdiff/diff.py @@ -33,6 +33,8 @@ def diff(before, after, check_modified=False): diff_items : A list of dictionaries containing diff information. """ grid = create_grid(before, after) + if len(grid) < 1: + return [] nrows = len(grid[0]) ncols = len(grid) dps = diff_points(grid) diff --git a/tests/test_diff.py b/tests/test_diff.py index <HASH>..<HASH> 100644 --- a/tests/test_diff.py +++ b/tests/test_diff.py @@ -35,6 +35,11 @@ def test_create_grid(): assert len([True for col in grid if len(col) == 0]) == 0 +def test_empty_diff(): + result = diff([], []) + assert len(result) == 0 + + def test_diff_points(): A = [u'x = [1,3,3]\n', u'z = {1, 2, 3} \n', u'\n', u'z'] B = [u'x = [1,3,4]\n', u'z = {1, 2, 3} \n', u'\n', u'm']
Fix #<I> - fix diff on empty lists
tarmstrong_nbdiff
train
py,py
88ae4fcf85e1e1ccc8798bc78c3d20a4b694f527
diff --git a/holoviews/element/chart.py b/holoviews/element/chart.py index <HASH>..<HASH> 100644 --- a/holoviews/element/chart.py +++ b/holoviews/element/chart.py @@ -39,7 +39,7 @@ class Chart(Element2D): settings.update(params) super(Chart, self).__init__(data, **settings) - if not data.shape[1] == len(self.dimensions()): + if data.ndim > 1 and not data.shape[1] == len(self.dimensions()): raise ValueError("Data has to match number of key and value dimensions")
Added support for single dimensional Charts
pyviz_holoviews
train
py
97143c145320b2b6982f9b4c3928c9116cd4a9cc
diff --git a/ceph_deploy/install.py b/ceph_deploy/install.py index <HASH>..<HASH> 100644 --- a/ceph_deploy/install.py +++ b/ceph_deploy/install.py @@ -168,6 +168,8 @@ def custom_repo(distro, args, cd_conf, rlogger): def uninstall(args): + LOG.info('note that some dependencies *will not* be removed because they can cause issues with qemu-kvm') + LOG.info('like: librbd1 and librados2') LOG.debug( 'Uninstalling on cluster %s hosts %s', args.cluster, @@ -186,6 +188,9 @@ def uninstall(args): def purge(args): + LOG.info('note that some dependencies *will not* be removed because they can cause issues with qemu-kvm') + LOG.info('like: librbd1 and librados2') + LOG.debug( 'Purging from cluster %s hosts %s', args.cluster,
when purging/uninstalling mention note about librados and librbd
ceph_ceph-deploy
train
py
f8439ce520508456fe2114898bf79ff0769c13cc
diff --git a/passpie/history.py b/passpie/history.py index <HASH>..<HASH> 100644 --- a/passpie/history.py +++ b/passpie/history.py @@ -66,6 +66,8 @@ class Repository(object): @ensure_git() def commit(self, message, add=True): + process.call(["git", "config", "--local", "user.name", "Passpie"], cwd=self.path) + process.call(["git", "config", "--local", "user.email", "passpie@localhost"], cwd=self.path) if add: self.add(all=True) cmd = ['git', 'commit', '-m', message]
Fix setting author to git config before commit
marcwebbie_passpie
train
py
92c164b2b4e7cac0fa6ccf287310e0222dd08830
diff --git a/src/response/payload/ImagePayload.php b/src/response/payload/ImagePayload.php index <HASH>..<HASH> 100644 --- a/src/response/payload/ImagePayload.php +++ b/src/response/payload/ImagePayload.php @@ -91,7 +91,7 @@ final class ImagePayload extends Payload implements PayloadInterface } unset($temp); - } else { + } elseif (!is_image($image)) { // Image may be GdImage. if (File::errorCheck($image, $error)) { throw new PayloadException($error->getMessage(), null, $error->getCode()); }
response.payload.ImagePayload: fix GdImage issue.
froq_froq-http
train
php
e5c919cb01ecd15d3838a38d9136cb750942a69a
diff --git a/main.js b/main.js index <HASH>..<HASH> 100644 --- a/main.js +++ b/main.js @@ -1774,7 +1774,7 @@ require('es6-promise').polyfill(); proto.editGroupInfo = function editGroupInfo(groupId, newInfo, callback){ callback = typeof callback === "function" ? callback : function () { }; - apiconnector.basicRequest('POST', '/group/update',{ group_id:groupId, info:newInfo }, false, function(err,respObj){ + apiconnector.basicRequest('POST', '/group/update',{ groupId:groupId, info:newInfo }, false, function(err,respObj){ if(err){ Log.m(this.session.debug, 'Monkey - error updating group: '+err); return callback(err);
Change snake case to camel case on group update
Criptext_Monkey-SDK-JS
train
js
13466a7a1e37ba507f518345389d2fa8cac240e8
diff --git a/src/nls/zh-cn/strings.js b/src/nls/zh-cn/strings.js index <HASH>..<HASH> 100644 --- a/src/nls/zh-cn/strings.js +++ b/src/nls/zh-cn/strings.js @@ -373,7 +373,7 @@ define({ "JSLINT_ERROR_INFORMATION" : "1个JSLint错误", "JSLINT_ERRORS_INFORMATION" : "{0}个JSLint错误", "JSLINT_NO_ERRORS" : "未发现JSLint错误 - 骚年加油!", - "JSLINT_DISABLED" : "JSLint已被禁用或者无法工作在此文件." + "JSLINT_DISABLED" : "JSLint已被禁用或者无法工作在此文件.", // extensions/default/QuickView "CMD_ENABLE_QUICK_VIEW" : "鼠标悬停时启用快速查看",
add a comma at the end of line <I>.
adobe_brackets
train
js
5d73d0c4cec13afa425feddc3ac998f043253f28
diff --git a/sdk/src/main/java/com/wonderpush/sdk/inappmessaging/display/InAppMessagingDisplay.java b/sdk/src/main/java/com/wonderpush/sdk/inappmessaging/display/InAppMessagingDisplay.java index <HASH>..<HASH> 100644 --- a/sdk/src/main/java/com/wonderpush/sdk/inappmessaging/display/InAppMessagingDisplay.java +++ b/sdk/src/main/java/com/wonderpush/sdk/inappmessaging/display/InAppMessagingDisplay.java @@ -373,6 +373,7 @@ public class InAppMessagingDisplay extends InAppMessagingDisplayImpl { new View.OnClickListener() { @Override public void onClick(View v) { + if (inAppMessage == null) return; if (callbacks != null) { callbacks.messageClicked(actions); }
Fix NPE when clicking an in-app message during its exit animation
wonderpush_wonderpush-android-sdk
train
java
f0f8264e4bb7ea5150e32671099f15b6d233191f
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -14,9 +14,9 @@ describe('full_process', function () { }); describe('Scorer Identity Tests', function () { - for (var scorer of scorers) { - var tmpscorer = scorer; - describe('Scorer: ' + scorer.name, function () { + for (var scorer in scorers) { + var tmpscorer = scorers[scorer]; + describe('Scorer: ' + tmpscorer.name, function () { it('should return 0 if either string is empty', function () { assert.equal(0, tmpscorer("", "striiing"));
use 'in' style test loop to pass <I>
nol13_fuzzball.js
train
js
3a49b76e66eac29271be58b962d339c081dbfc31
diff --git a/lib/serverspec/setup.rb b/lib/serverspec/setup.rb index <HASH>..<HASH> 100644 --- a/lib/serverspec/setup.rb +++ b/lib/serverspec/setup.rb @@ -189,7 +189,7 @@ EOF list_of_vms = [] if vagrant_list != '' vagrant_list.each_line do |line| - if match = /([a-z]+[\s]+)(created|not created|poweroff|running|saved)[\s](\(virtualbox\)|\(vmware\))/.match(line) + if match = /([a-z_-]+[\s]+)(created|not created|poweroff|running|saved)[\s](\(virtualbox\)|\(vmware\))/.match(line) list_of_vms << match[1].strip! end end
Allow to use '_' and '-' as vagrant machine name
mizzy_serverspec
train
rb
92c5e5bfc0dbc51a997b9cafee68f7714dfd125a
diff --git a/lib/rails_best_practices/core/check.rb b/lib/rails_best_practices/core/check.rb index <HASH>..<HASH> 100644 --- a/lib/rails_best_practices/core/check.rb +++ b/lib/rails_best_practices/core/check.rb @@ -354,7 +354,7 @@ module RailsBestPractices end def internal_except_methods - raise NoMethodError.new 'no method internal_except_methods' + raise NoMethodError, 'no method internal_except_methods' end end end
Auto corrected by following Style/RaiseArgs
flyerhzm_rails_best_practices
train
rb
1136082d834f6912fcbb70b5b2a4c3a46c77c592
diff --git a/pywbem/cim_operations.py b/pywbem/cim_operations.py index <HASH>..<HASH> 100644 --- a/pywbem/cim_operations.py +++ b/pywbem/cim_operations.py @@ -1116,6 +1116,11 @@ class WBEMConnection(object): # pylint: disable=too-many-instance-attributes CIM-XML data of the last response received from the WBEM server on this connection, formatted as prettified XML. + Setting this property requires XML parsing of the received CIM-XML + response. If the XML parsing fails, this property will be `None`, but + the :attr:`~pywbem.WBEMConnection.last_raw_reply` property will already + have been set and should be used, instead. + Prior to receiving the very first response on this connection object, and when debug saving of requests and responses is disabled (see :attr:`~pywbem.WBEMConnection.debug`), this property is `None`.
Improved description of WBEMConnection.last_reply Details: - The last_reply property is set only if SAX parsing of the response succeeds. If that fails (i.e. ParseError with XML parsing indicated as a reason), the last_reply property is None. This change improves the description of the last_reply property to explain this and to hint at using the last_raw_reply property instead in such a case.
pywbem_pywbem
train
py
04fc84b687fc03c9e2e5758a58365e9999c48517
diff --git a/lib/spinach/config.rb b/lib/spinach/config.rb index <HASH>..<HASH> 100644 --- a/lib/spinach/config.rb +++ b/lib/spinach/config.rb @@ -41,7 +41,7 @@ module Spinach # output to the standard output # def default_reporter - @default_reporter || Spinach::Reporter::Stdout + @default_reporter || Spinach::Reporter::Stdout.new end # Allows you to read the config object using a hash-like syntax. diff --git a/lib/spinach/runner.rb b/lib/spinach/runner.rb index <HASH>..<HASH> 100644 --- a/lib/spinach/runner.rb +++ b/lib/spinach/runner.rb @@ -17,7 +17,7 @@ module Spinach @support_path = options.delete(:support_path ) || Spinach.config.support_path - @reporter = Spinach::config.default_reporter.new + @reporter = Spinach::config.default_reporter end # The default reporter associated to this run
Use an instance of the reporter, not the class This will allow us to have statistics on all reports, for example.
codegram_spinach
train
rb,rb
d12dc09e2ad4badd831bb9c3f89f1feeb4802a2d
diff --git a/engine/src/main/java/org/camunda/bpm/engine/impl/util/xml/Parse.java b/engine/src/main/java/org/camunda/bpm/engine/impl/util/xml/Parse.java index <HASH>..<HASH> 100644 --- a/engine/src/main/java/org/camunda/bpm/engine/impl/util/xml/Parse.java +++ b/engine/src/main/java/org/camunda/bpm/engine/impl/util/xml/Parse.java @@ -143,7 +143,7 @@ public class Parse extends DefaultHandler { SAXParser saxParser = parser.getSaxParser(); try { - saxParser.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "file,http,https"); + saxParser.setProperty("http://javax.xml.XMLConstants/property/accessExternalSchema", "file,http,https,jar,wsjar"); } catch (Exception e) { // ignore unavailable option }
fix(engine): correct external schema access in parser * use compatible reference (some JDKs do not contain the XMLConstants constant) * allow "jar" and "wsjar" references in schema as well related to CAM-<I>
camunda_camunda-bpm-platform
train
java
4539d90db5697a5c7eabaf92b28487db72939e28
diff --git a/test/geocoder_test.rb b/test/geocoder_test.rb index <HASH>..<HASH> 100644 --- a/test/geocoder_test.rb +++ b/test/geocoder_test.rb @@ -21,6 +21,8 @@ class GeocoderTest < Test::Unit::TestCase def test_distance_between assert_equal 69, Geocoder::Calculations.distance_between(0,0, 0,1).round + la_to_ny = Geocoder::Calculations.distance_between(34.05,-118.25, 40.72,-74).round + assert (la_to_ny - 2444).abs < 10 end def test_compass_points
Add non-trivial distance_between test.
alexreisner_geocoder
train
rb
4f956a36d5b68abaef6c092835427642168cac9b
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100755 --- a/lib/index.js +++ b/lib/index.js @@ -77,7 +77,7 @@ exports.register = function (server, options, next) { server.route({ method: 'GET', - path: '/docs/swaggerui/images/throbber.gif', + path: settings.endpoint + '/swaggerui/images/throbber.gif', config: { auth: settings.auth, },
Fixed endpoint for throbber.gif image
reptilbud_hapi-swagger
train
js
fa6be1eafc85be54dc296faf595de23579b6e2ec
diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/Partitioner.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/Partitioner.java index <HASH>..<HASH> 100644 --- a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/Partitioner.java +++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/Partitioner.java @@ -74,13 +74,11 @@ public abstract class Partitioner extends JSONBuilder { */ public OnToken(int partitions) { this.partitions = partitions; - this.paths=paths; } /** - * * @param paths the paths where to save partitions - * + * @return this with the specified path directories */ public OnToken paths(String[] paths) { this.paths = paths; @@ -120,7 +118,6 @@ public abstract class Partitioner extends JSONBuilder { * * @param partitions the number of index partitions per node * @param column the partition key column - */ public OnColumn(int partitions, String column) { this.partitions = partitions; @@ -128,9 +125,8 @@ public abstract class Partitioner extends JSONBuilder { } /** - * * @param paths the paths where to save partitions - * + * @return this with the specified path directories */ public OnColumn paths(String[] paths) { this.paths = paths;
fixed two javadoc warnings in builder
Stratio_cassandra-lucene-index
train
java
40f16f6804cb1d36e132de32d8bd8c1ad83a38ab
diff --git a/py/selenium/webdriver/remote/webelement.py b/py/selenium/webdriver/remote/webelement.py index <HASH>..<HASH> 100755 --- a/py/selenium/webdriver/remote/webelement.py +++ b/py/selenium/webdriver/remote/webelement.py @@ -363,7 +363,7 @@ class WebElement(object): @property def parent(self): - """Parent element.""" + """Internal reference to the WebDriver instance this element was found from.""" return self._parent @property
clarifying doc string for 'parent' property. Fixes Issue #<I>
SeleniumHQ_selenium
train
py
3ed1903d69b1b3105819b51f47805098d7d2af93
diff --git a/shakedown/dcos/package.py b/shakedown/dcos/package.py index <HASH>..<HASH> 100644 --- a/shakedown/dcos/package.py +++ b/shakedown/dcos/package.py @@ -308,9 +308,9 @@ def uninstall_package_and_data( print('\n{}uninstall/delete done after pkg({}) + data({}) = total({})\n'.format( shakedown.cli.helpers.fchr('>>'), - pretty_duration(data_start start), - pretty_duration(finish data_start), - pretty_duration(finish start))) + pretty_duration(data_start - start), + pretty_duration(finish - data_start), + pretty_duration(finish - start)))
repairing a failed attempt a search and replace
dcos_shakedown
train
py
3a4eed00c93f1afa72e44389de670b2612f480dd
diff --git a/katcp/sensortree.py b/katcp/sensortree.py index <HASH>..<HASH> 100644 --- a/katcp/sensortree.py +++ b/katcp/sensortree.py @@ -50,7 +50,7 @@ class GenericSensorTree(object): sensor : :class:`katcp.Sensor` The sensor whose value has changed. """ - parents = self._child_to_parents[sensor] + parents = list(self._child_to_parents[sensor]) for parent in parents: self.recalculate(parent, (sensor,))
Handle addition of new sensors to the sensor tree during a sensor update without crashing (missing part from last commit). git-svn-id: <URL>
ska-sa_katcp-python
train
py
5eae85d3f77d0173dc4b20be5bf317134f27aa31
diff --git a/Form/Type/DataType.php b/Form/Type/DataType.php index <HASH>..<HASH> 100644 --- a/Form/Type/DataType.php +++ b/Form/Type/DataType.php @@ -212,6 +212,9 @@ class DataType extends AbstractType DataInterface $data = null, array $options = [] ) { + if ($attribute->getOption('hidden')) { + return; + } if ($attribute->isMultiple() && $attribute->isCollection()) { $this->addMultipleAttribute($form, $attribute, $family, $data, $options); } else {
Adding "hidden" option in attributes
VincentChalnot_SidusEAVModelBundle
train
php
95bacfad626056501f85156899e25ae3306b2c5c
diff --git a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/linking/impl/AbstractCleaningLinker.java b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/linking/impl/AbstractCleaningLinker.java index <HASH>..<HASH> 100644 --- a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/linking/impl/AbstractCleaningLinker.java +++ b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/linking/impl/AbstractCleaningLinker.java @@ -84,10 +84,12 @@ public abstract class AbstractCleaningLinker extends AbstractLinker { */ protected boolean shouldCheckParentNode(INode node) { if (node.getGrammarElement() instanceof AbstractElement) { - AbstractElement grammarElement = (AbstractElement) node.getGrammarElement(); - Assignment assignment = GrammarUtil.containingAssignment(grammarElement); - if (assignment == null && node.getParent() != null && !node.getParent().hasDirectSemanticElement()) { - return true; + if (node.getParent() != null && !node.getParent().hasDirectSemanticElement()) { + AbstractElement grammarElement = (AbstractElement) node.getGrammarElement(); + Assignment assignment = GrammarUtil.containingAssignment(grammarElement); + if (assignment == null) { + return true; + } } } return false;
[organizeImports] Fix: ValueConverterException on organize imports This fixes a regression due to the application of value converters on organize imports see <URL>
eclipse_xtext-core
train
java
9221cd3ee015ac08e1bd2c481e824b0a5c30be7d
diff --git a/Middleware/AuthenticateWithBearerAuth.php b/Middleware/AuthenticateWithBearerAuth.php index <HASH>..<HASH> 100644 --- a/Middleware/AuthenticateWithBearerAuth.php +++ b/Middleware/AuthenticateWithBearerAuth.php @@ -24,6 +24,8 @@ class AuthenticateWithBearerAuth ) { return $continue; } + + $this->response('Unauthorized', 401); } /** @@ -108,7 +110,7 @@ class AuthenticateWithBearerAuth * * @return void */ - protected function response($message, $code) : rest + protected function response($message, $code) { return Rest::response()->json([ 'status' => $message,
Feat: return <I> if user is not authorized
modulusphp_http
train
php
a7903ff37172d9fe48ba73fdcd1896b82c442a04
diff --git a/src/Torann/Currency/Middleware/CurrencyMiddleware.php b/src/Torann/Currency/Middleware/CurrencyMiddleware.php index <HASH>..<HASH> 100644 --- a/src/Torann/Currency/Middleware/CurrencyMiddleware.php +++ b/src/Torann/Currency/Middleware/CurrencyMiddleware.php @@ -92,6 +92,6 @@ class CurrencyMiddleware // Save it for later too! $request->getSession()->put(['currency' => $currency]); - $request->getSession()->reflash(); + $request->getSession()->keep('currency'); } } \ No newline at end of file
Use `keep` when setting currency
Torann_laravel-currency
train
php
426f899d1daa714bc982d585f61f2853ac45aa3b
diff --git a/ga4gh/datarepo.py b/ga4gh/datarepo.py index <HASH>..<HASH> 100644 --- a/ga4gh/datarepo.py +++ b/ga4gh/datarepo.py @@ -608,7 +608,6 @@ class SqlDataRepository(AbstractDataRepository): referenceSet.getSourceUri(), referenceSet.getDataUrl())) except sqlite3.IntegrityError: raise exceptions.DuplicateNameException(referenceSet.getLocalId()) - self._dbConnection.commit() for reference in referenceSet.getReferences(): self.insertReference(reference)
Remove unintended db.commit
ga4gh_ga4gh-server
train
py
b74bbde028d6cc56353f9c5fcb1459b2b8d414ee
diff --git a/salt/utils/http.py b/salt/utils/http.py index <HASH>..<HASH> 100644 --- a/salt/utils/http.py +++ b/salt/utils/http.py @@ -15,6 +15,7 @@ import pprint import socket import urllib import inspect +import yaml import ssl try: @@ -561,10 +562,12 @@ def query(url, decode_type = 'xml' elif 'json' in content_type: decode_type = 'json' + elif 'yaml' in content_type: + decode_type = 'yaml' else: decode_type = 'plain' - valid_decodes = ('json', 'xml', 'plain') + valid_decodes = ('json', 'xml', 'yaml', 'plain') if decode_type not in valid_decodes: ret['error'] = ( 'Invalid decode_type specified. ' @@ -582,6 +585,8 @@ def query(url, items = ET.fromstring(result_text) for item in items: ret['dict'].append(xml.to_dict(item)) + elif decode_type == 'yaml': + ret['dict'] = yaml.load(result_text) else: text = True
Added support for yaml decode_type
saltstack_salt
train
py
6b90b489f0b23d6e1fd13fe603d7ce9851dc42d9
diff --git a/pypeerassets/transactions.py b/pypeerassets/transactions.py index <HASH>..<HASH> 100644 --- a/pypeerassets/transactions.py +++ b/pypeerassets/transactions.py @@ -186,7 +186,4 @@ def unpack_txn_buffer(buffer, network="ppc"): def unpack_raw_transaction(rawtx: bytes) -> dict: '''unpacks raw transactions, returns dictionary''' - if not isinstance(rawtx, bytes): - raise ValueError('Binary input required') - return unpack_txn_buffer(Tx_buffer(rawtx))
transactions: unpack_raw_transaction; remove redundant type check.
PeerAssets_pypeerassets
train
py
47ce6daa72a365b738492947665675816d7cd335
diff --git a/src/Data/Collection.php b/src/Data/Collection.php index <HASH>..<HASH> 100644 --- a/src/Data/Collection.php +++ b/src/Data/Collection.php @@ -517,7 +517,7 @@ class Collection implements Serializable, ArrayAccess, Iterator */ protected function _moveToOriginalCollection($index) { - if (array_key_exists($index, $this->_originalCollection) + if (!array_key_exists($index, $this->_originalCollection) && !in_array($index, $this->_newKeys) ) { $this->_originalCollection[$index] = $this->_COLLECTION[$index];
create Collection class (issue #4) This version introduces multiple enhancements: fixed move collection element to original collection Details of additions/deletions below: -------------------------------------------------------------- Modified: Data/Collection.php -- Updated -- _moveToOriginalCollection added negation for array_key_exists
bluetree-service_container
train
php
0d5de40d45c6a71291b3e5a631d154f4861916a2
diff --git a/session.go b/session.go index <HASH>..<HASH> 100644 --- a/session.go +++ b/session.go @@ -809,7 +809,9 @@ func (s *session) handleSinglePacket(p *receivedPacket, hdr *wire.Header) bool / } // drop 0-RTT packets, if we are a client if s.perspective == protocol.PerspectiveClient && hdr.Type == protocol.PacketType0RTT { - s.tracer.DroppedPacket(logging.PacketType0RTT, p.Size(), logging.PacketDropKeyUnavailable) + if s.tracer != nil { + s.tracer.DroppedPacket(logging.PacketType0RTT, p.Size(), logging.PacketDropKeyUnavailable) + } return false }
only trace dropped 0-RTT packets when a tracer is set
lucas-clemente_quic-go
train
go
5ab97d6900390b7772d231f5fb7f19a355ee36ee
diff --git a/src/qinfer/abstract_model.py b/src/qinfer/abstract_model.py index <HASH>..<HASH> 100644 --- a/src/qinfer/abstract_model.py +++ b/src/qinfer/abstract_model.py @@ -207,7 +207,7 @@ class Model(Simulatable): probabilities = self.likelihood(np.arange(self.n_outcomes(expparams)), modelparams, expparams) cdf = np.cumsum(probabilities,axis=0) - randnum = np.random.random((1, repeat, 1)) + randnum = np.random.random((1, modelparams.shape[0], repeat)) outcomes = np.argmax(cdf > randnum, axis=0) return outcomes[0] if repeat==1 else outcomes
I lied last time... now it's fixed
QInfer_python-qinfer
train
py
d90f666b345febb21adb8c86f5531200d108df11
diff --git a/src/components/seek_time/seek_time.js b/src/components/seek_time/seek_time.js index <HASH>..<HASH> 100644 --- a/src/components/seek_time/seek_time.js +++ b/src/components/seek_time/seek_time.js @@ -32,15 +32,19 @@ export default class SeekTime extends UIObject { } addEventListeners() { - this.listenTo(this.mediaControl, Events.MEDIACONTROL_MOUSEMOVE_SEEKBAR, (event) => { - this.hoveringOverSeekBar = true - this.calculateHoverPosition(event) - this.update() - }) - this.listenTo(this.mediaControl, Events.MEDIACONTROL_MOUSELEAVE_SEEKBAR, (event) => { - this.hoveringOverSeekBar = false - this.update() - }) + this.listenTo(this.mediaControl, Events.MEDIACONTROL_MOUSEMOVE_SEEKBAR, this.showTime) + this.listenTo(this.mediaControl, Events.MEDIACONTROL_MOUSELEAVE_SEEKBAR, this.hideTime) + } + + showTime(event) { + this.hoveringOverSeekBar = true + this.calculateHoverPosition(event) + this.update() + } + + hideTime() { + this.hoveringOverSeekBar = false + this.update() } calculateHoverPosition(event) {
seek time: move anonymous event listeners to object methods
clappr_clappr
train
js
bdebf03e3b8e1f7de44184c93f1e6098c396d2bd
diff --git a/test/regex-shorthand.js b/test/regex-shorthand.js index <HASH>..<HASH> 100644 --- a/test/regex-shorthand.js +++ b/test/regex-shorthand.js @@ -32,7 +32,8 @@ ruleTester.run('regex-shorthand', rule, { `const foo = new RegExp(/\\d/ig)`, `const foo = new RegExp(/\\d/, 'ig')`, `const foo = new RegExp(/\\d*?/)`, - `const foo = new RegExp(/[a-z]/, 'i')` + `const foo = new RegExp(/[a-z]/, 'i')`, + `const foo = new RegExp(/^[^*]*[*]?$/)` ], invalid: [ {
Add another test for `regex-shorthand` rule
sindresorhus_eslint-plugin-unicorn
train
js
3fc4da2b1cf8bd6f38aea06dfd3bf4c280ef35a1
diff --git a/ceph_deploy/mgr.py b/ceph_deploy/mgr.py index <HASH>..<HASH> 100644 --- a/ceph_deploy/mgr.py +++ b/ceph_deploy/mgr.py @@ -32,7 +32,7 @@ def create_mgr(distro, name, cluster, init): name=name ) - conn.remote_module.safe_mkdir(path) + conn.remote_module.safe_makedirs(path) bootstrap_keyring = '/var/lib/ceph/bootstrap-mgr/{cluster}.keyring'.format( cluster=cluster
[RM-<I>] Use recursive dir creation
ceph_ceph-deploy
train
py
2c3ff286113b6bbd4d848e4a15ac3a64a3f8d576
diff --git a/django_braintree/views.py b/django_braintree/views.py index <HASH>..<HASH> 100644 --- a/django_braintree/views.py +++ b/django_braintree/views.py @@ -1,3 +1,5 @@ +import logging + from django.contrib.auth.decorators import login_required from django.shortcuts import render from django.contrib import messages @@ -36,8 +38,11 @@ def payments_billing(request, template='django_braintree/payments_billing.html') return JsonResponse(success=False, data={'form': form_errors_serialize(form)}) else: if UserVault.objects.is_in_vault(request.user): - response = Customer.find(UserVault.objects.get_user_vault_instance_or_none(request.user).vault_id) - d['current_cc_info'] = response.credit_cards[0] + try: + response = Customer.find(UserVault.objects.get_user_vault_instance_or_none(request.user).vault_id) + d['current_cc_info'] = response.credit_cards[0] + except Exception, e: + logging.log('Unable to get vault information for user from braintree. %s' % e) d['cc_form'] = UserCCDetailsForm(request.user) return render(request, template, d)
try/except in the view also in case customer.get() throws exception
Tivix_django-braintree
train
py
40450c65322ff2f00a4c6dcc3fc1aeab2b982fcb
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -35,4 +35,5 @@ gulp.task('build', function() { // Rerun the task when a file changes gulp.task('watch', function () { gulp.watch('test/ouibounce.styl', ['build']); + gulp.watch('source/ouibounce.js', ['build']); });
Fix gulp script to watch src file change
carlsednaoui_ouibounce
train
js
550ed3ecfc03c4c8a782589f22061f93426f5d4d
diff --git a/lib/resque/worker.rb b/lib/resque/worker.rb index <HASH>..<HASH> 100644 --- a/lib/resque/worker.rb +++ b/lib/resque/worker.rb @@ -81,7 +81,7 @@ module Resque $0 = procline log! procline process(job, &block) - @cant_fork ? next : exit! + exit! unless @cant_fork end @child = nil
only exit if we can't fork
resque_resque
train
rb
3850534a253e7b3e0a2b9e4fe19d77cc4b7c04c9
diff --git a/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/websocket/SpeechToTextWebSocketListener.java b/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/websocket/SpeechToTextWebSocketListener.java index <HASH>..<HASH> 100755 --- a/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/websocket/SpeechToTextWebSocketListener.java +++ b/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/websocket/SpeechToTextWebSocketListener.java @@ -55,7 +55,7 @@ public final class SpeechToTextWebSocketListener extends WebSocketListener { private static final String RESULTS = "results"; private static final String SPEAKER_LABELS = "speaker_labels"; private static final String CUSTOMIZATION_ID = "customization_id"; - private static final String LANGUAGE_CUSTOMIZATION_ID = "customization_id"; + private static final String LANGUAGE_CUSTOMIZATION_ID = "language_customization_id"; private static final String ACOUSTIC_CUSTOMIZATION_ID = "acoustic_customization_id"; private static final String CUSTOMIZATION_WEIGHT = "customization_weight"; private static final String VERSION = "base_model_version";
fix(Speech to Text): Fix value of language customization ID property in WebSocket listener
watson-developer-cloud_java-sdk
train
java
4155a905f86d65787177b8de55e563da80426059
diff --git a/spec/model_extensions_spec.rb b/spec/model_extensions_spec.rb index <HASH>..<HASH> 100644 --- a/spec/model_extensions_spec.rb +++ b/spec/model_extensions_spec.rb @@ -215,4 +215,10 @@ describe ActsAsTenant do it { @sub_task = SubTask.create(:name => 'foo').valid?.should == true } end + describe "It should be possible to create and save an AaT-enabled child without it having a parent" do + @account = Account.create!(:name => 'baz') + ActsAsTenant.current_tenant = @account + @task = Task.new(:name => 'bar') + lambda { @task.save }.should_not raise_exception + end end
Added test for a orphan AAT-model
ErwinM_acts_as_tenant
train
rb
de1c0140e824a47aa81f7f633c74833855cfd9f6
diff --git a/tests/I18n/bootstrap.php b/tests/I18n/bootstrap.php index <HASH>..<HASH> 100644 --- a/tests/I18n/bootstrap.php +++ b/tests/I18n/bootstrap.php @@ -3,5 +3,6 @@ require __DIR__.'/kohana.php'; // Load some required classes -require DOCROOT.'Testcase'.EXT; -require DOCROOT.'Plural/Testcase'.EXT; \ No newline at end of file +require_once DOCROOT.'helpers'.EXT; +require_once DOCROOT.'Testcase'.EXT; +require_once DOCROOT.'Plural/Testcase'.EXT; \ No newline at end of file diff --git a/tests/I18n/kohana.php b/tests/I18n/kohana.php index <HASH>..<HASH> 100644 --- a/tests/I18n/kohana.php +++ b/tests/I18n/kohana.php @@ -29,7 +29,4 @@ Kohana::$config->attach(new Kohana_Config_File); Kohana::modules(array( 'plurals' => MODPATH.'plurals', 'unittest' => MODPATH.'unittest', -)); - -// Load some required classes -require_once DOCROOT.'helpers'.EXT; \ No newline at end of file +)); \ No newline at end of file
Moved some 'requires' around
czukowski_I18n_Plural
train
php,php
5e9580f53f18d3d15b27649628ef5d8b56726aeb
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -181,6 +181,10 @@ class mochaPlugin { const inited = this.serverless.service; myModule.config = (inited.custom || {})['serverless-mocha-plugin'] || {}; // Verify that the service runtime matches with the current runtime + let runtime = inited.provider.runtime; + // Fix the real version for node10 + runtime = runtime.replace('\.x', ''); + let nodeVersion; if (typeof process.versions === 'object') { nodeVersion = process.versions.node; @@ -188,9 +192,9 @@ class mochaPlugin { nodeVersion = process.versions; } nodeVersion = nodeVersion.replace(/\.[^.]*$/, ''); - if (`nodejs${nodeVersion}` !== inited.provider.runtime) { + if (! `nodejs${nodeVersion}`.startsWith(runtime)) { let errorMsg = `Tests being run with nodejs${nodeVersion}, `; - errorMsg = `${errorMsg} service is using ${inited.provider.runtime}.`; + errorMsg = `${errorMsg} service is using ${runtime}.`; errorMsg = `${errorMsg} Tests may not be reliable.`; this.serverless.cli.log(errorMsg);
Fix runtime detection for node<I>
nordcloud_serverless-mocha-plugin
train
js
df5c558c8ca22a70a32fb7764ffdd5b8020a0960
diff --git a/image/internal/util.go b/image/internal/util.go index <HASH>..<HASH> 100644 --- a/image/internal/util.go +++ b/image/internal/util.go @@ -2,6 +2,7 @@ package internal import ( "image" + "image/color" "image/draw" "runtime" "sync" @@ -21,7 +22,7 @@ func NewDrawable(p image.Image) draw.Image { // NewDrawableSize returns a new draw.Image with the same type as p and the given bounds. // If p is not a draw.Image, another type is used. func NewDrawableSize(p image.Image, r image.Rectangle) draw.Image { - switch p.(type) { + switch p := p.(type) { case *image.RGBA: return image.NewRGBA(r) case *image.RGBA64: @@ -38,6 +39,10 @@ func NewDrawableSize(p image.Image, r image.Rectangle) draw.Image { return image.NewGray(r) case *image.Gray16: return image.NewGray16(r) + case *image.Paletted: + pl := make(color.Palette, len(p.Palette)) + copy(pl, p.Palette) + return image.NewPaletted(r, pl) case *image.CMYK: return image.NewCMYK(r) default:
image/internal.NewDrawableSize(): add support for Paletted image
pierrre_imageserver
train
go
aecdf64bb47845e1f66f353dca83c0fd94963298
diff --git a/python/bigdl/dllib/optim/optimizer.py b/python/bigdl/dllib/optim/optimizer.py index <HASH>..<HASH> 100644 --- a/python/bigdl/dllib/optim/optimizer.py +++ b/python/bigdl/dllib/optim/optimizer.py @@ -630,6 +630,13 @@ class BaseOptimizer(JavaValue): print("Loading input ...") self.value.prepareInput() + def set_end_when(self, end_when): + """ + When to stop, passed in a [[Trigger]] + """ + self.value.setEndWhen(end_when.value) + return self + class Optimizer(BaseOptimizer):
Fix optimizer state messed up when calling optimize() multiple times in DistriOptimizer (#<I>) * support continue training * meet code review * add unit tests * fix set model
intel-analytics_BigDL
train
py
0efd6338b22c4ceb341bbdb0a9a6d11cf5393075
diff --git a/test/Role/ReadModel/Constraints/Doctrine/UserConstraintWriteRepositoryTest.php b/test/Role/ReadModel/Constraints/Doctrine/UserConstraintWriteRepositoryTest.php index <HASH>..<HASH> 100644 --- a/test/Role/ReadModel/Constraints/Doctrine/UserConstraintWriteRepositoryTest.php +++ b/test/Role/ReadModel/Constraints/Doctrine/UserConstraintWriteRepositoryTest.php @@ -23,7 +23,7 @@ class UserConstraintWriteRepositoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->roleConstraintTableName = new StringLiteral('role_constraints'); + $this->roleConstraintTableName = new StringLiteral('role_constraint'); $schemaConfigurator = new SchemaConfigurator($this->roleConstraintTableName); $schemaConfigurator->configure($this->getConnection()->getSchemaManager());
III-<I> Consistent naming for role constraint table.
cultuurnet_udb3-php
train
php
e3340a5fd168aca7140403a6e973ce712acb2229
diff --git a/src/Properties/ModelPropertyExtension.php b/src/Properties/ModelPropertyExtension.php index <HASH>..<HASH> 100644 --- a/src/Properties/ModelPropertyExtension.php +++ b/src/Properties/ModelPropertyExtension.php @@ -195,15 +195,16 @@ final class ModelPropertyExtension implements PropertiesClassReflectionExtension $readableType = $writableType = $column->readableType.($column->nullable ? '|null' : ''); break; + case 'boolean': case 'bool': switch ((string) config('database.default')) { case 'sqlite': case 'mysql': - $writableType = '0|1|bool'; + $writableType = '0|1|boolean'; $readableType = '0|1'; break; default: - $readableType = $writableType = 'bool'; + $readableType = $writableType = 'boolean'; break; } break;
Fix incorrect boolean type cast
nunomaduro_larastan
train
php
732cb2e98e06dec215716381270e8a24464b1981
diff --git a/autopep8.py b/autopep8.py index <HASH>..<HASH> 100644 --- a/autopep8.py +++ b/autopep8.py @@ -245,10 +245,15 @@ class FixPEP8(object): def fix_e303(self, result): delete_linenum = int(result['info'].split("(")[1].split(")")[0]) - 2 delete_linenum = max(1, delete_linenum) - for cnt in range(delete_linenum): - line = result['line'] - 2 - cnt + cnt = 0 + line = result['line'] - 2 + while cnt < delete_linenum: + if line < 0: + break if not self.source[line].strip(): self.source[line] = '' + cnt += 1 + line -= 1 def fix_e401(self, result): line_index = result['line'] - 1 diff --git a/test_target.py b/test_target.py index <HASH>..<HASH> 100644 --- a/test_target.py +++ b/test_target.py @@ -58,7 +58,7 @@ def func11(): - +# comment after too empty lines def func2(): pass def func22():
Get fix_e<I>() working with comments
hhatto_autopep8
train
py,py
4d61da5dfd87f7c8e1c47dece532eb31a1eea43e
diff --git a/salt/utils/mine.py b/salt/utils/mine.py index <HASH>..<HASH> 100644 --- a/salt/utils/mine.py +++ b/salt/utils/mine.py @@ -42,7 +42,13 @@ def minion_side_acl_denied( True if an ACL has been defined and does not grant access. ''' minion_acl_entry = minion_acl_cache.get(mine_minion, {}).get(mine_function, []) - return minion_acl_entry and req_minion not in minion_acl_entry + ret = minion_acl_entry and req_minion not in minion_acl_entry + if ret: + log.debug('Salt mine request from %s for function %s on minion %s denied.', + req_minion, + mine_function, + mine_minion) + return ret def wrap_acl_structure(
Added logging of denied mine requests.
saltstack_salt
train
py
31a79c701da4c7c81ae68e3218bf71eb805ee36d
diff --git a/indra/sources/medscan/processor.py b/indra/sources/medscan/processor.py index <HASH>..<HASH> 100644 --- a/indra/sources/medscan/processor.py +++ b/indra/sources/medscan/processor.py @@ -512,6 +512,10 @@ class MedscanProcessor(object): self._pmids_handled.add(pmid_num) self._sentences_handled = set() + # Solution for memory leak found here: + # https://stackoverflow.com/questions/12160418/why-is-lxml-etree-iterparse-eating-up-all-my-memory?lq=1 + elem.clear() + self.files_processed += 1 self.__f.close() return
Fix "memory leak" from the lxml iterator.
sorgerlab_indra
train
py
ec209110f4c8646f5bdb2c6bab363320a2ffd964
diff --git a/salt/utils/__init__.py b/salt/utils/__init__.py index <HASH>..<HASH> 100644 --- a/salt/utils/__init__.py +++ b/salt/utils/__init__.py @@ -1532,7 +1532,20 @@ def is_windows(): ''' Simple function to return if a host is Windows or not ''' - return sys.platform.startswith('win') + import __main__ as main + # This is a hack. If a proxy minion is started by other + # means, e.g. a custom script that creates the minion objects + # then this will fail. + is_proxy = False + try: + if 'salt-proxy' in main.__file__: + is_proxy = True + except AttributeError: + pass + if is_proxy: + return False + else: + return sys.platform.startswith('win') def sanitize_win_path_string(winpath): @@ -1553,12 +1566,12 @@ def sanitize_win_path_string(winpath): def is_proxy(): ''' Return True if this minion is a proxy minion. - Leverages the fact that is_linux() returns False - for proxies. + Leverages the fact that is_linux() and is_windows + both return False for proxies. TODO: Need to extend this for proxies that might run on - other Unices or Windows. + other Unices ''' - return not is_linux() + return not (is_linux() or is_windows()) @real_memoize
Don't report proxy on windows.
saltstack_salt
train
py
f7bded078d81ecf89a98f423516190dbf78616fc
diff --git a/doc/conf.py b/doc/conf.py index <HASH>..<HASH> 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -117,7 +117,7 @@ copyright = '2013 SaltStack, Inc.' version = salt.version.__version__ #release = '.'.join(map(str, salt.version.__version_info__)) -release = '2014.1.0' +release = '0.17.5' language = 'en' locale_dirs = [
Wait until actual announced release to change doc version
saltstack_salt
train
py
a1bbc8330c4f0449cc5610b25cbb19371cc105c2
diff --git a/src/Repository/Repository.php b/src/Repository/Repository.php index <HASH>..<HASH> 100644 --- a/src/Repository/Repository.php +++ b/src/Repository/Repository.php @@ -382,13 +382,17 @@ abstract class Repository implements IRepository $ids = []; $entities = $this->identityMap->getAll(); foreach ($entities as $entity) { - if (!$allowOverwrite && $entity->isModified()) { + if (!$entity->isPersisted()) { + continue; + } elseif (!$allowOverwrite && $entity->isModified()) { throw new InvalidStateException('Cannot refresh modified entity, flush changes first or set $allowOverwrite flag to true.'); } $this->identityMap->markForRefresh($entity); $ids[] = $entity->getPersistedId(); } - $this->findById($ids)->fetchAll(); + if (count($ids)) { + $this->findById($ids)->fetchAll(); + } foreach ($entities as $entity) { if (!$this->identityMap->isMarkedForRefresh($entity)) { continue;
repository: do not refresh unpersisted entities, do not query without ids [closes #<I>]
nextras_orm
train
php
3e87c04b836e7a8b6606e498200eea68fc897d4b
diff --git a/web/api/v1/api.go b/web/api/v1/api.go index <HASH>..<HASH> 100644 --- a/web/api/v1/api.go +++ b/web/api/v1/api.go @@ -166,6 +166,7 @@ func NewAPI( enableAdmin: enableAdmin, rulesRetriever: rr, remoteReadLimit: remoteReadLimit, + logger: logger, } }
Logger is nil for API. Fixes #<I> (#<I>)
prometheus_prometheus
train
go
90f7f8620c30123123932d2b44d466231a33deae
diff --git a/test/integration.js b/test/integration.js index <HASH>..<HASH> 100644 --- a/test/integration.js +++ b/test/integration.js @@ -294,6 +294,9 @@ test('deploy a node microservice', async t => { })); t.is(code, 0, formatOutput({ stdout, stderr })); + // Give 2 seconds for the proxy purge to propagate + await sleep(2000); + response = await fetch(href); t.is(response.status, 404); });
Sleep 2 seconds after the `now rm` integration test (#<I>) Sometimes it fails with a stale <I> status code. This should make it less flaky.
zeit_now-cli
train
js
5eb6f6c4abdf903956ae12c3be83bc3fa6ac44bd
diff --git a/browscap/Browscap.php b/browscap/Browscap.php index <HASH>..<HASH> 100644 --- a/browscap/Browscap.php +++ b/browscap/Browscap.php @@ -680,11 +680,11 @@ class Browscap * Browscap.ini parsing class exception * * @package Browscap - * @author Jonathan Stoppani <st.jonathan@gmail.com> - * @copyright Copyright (c) 2006-2008 Jonathan Stoppani - * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License - * @link http://garetjax.info/projects/browscap/ - */ + * @author Jonathan Stoppani <jonathan@stoppani.name> + * @copyright Copyright (c) 2006-2012 Jonathan Stoppani + * @version 0.7 + * @license http://www.opensource.org/licenses/MIT MIT License + * @link https://github.com/GaretJax/phpbrowscap/*/ class Browscap_Exception extends Exception {}
Updated docblock for the exception class. All docblocks now contain coherent information regarding website, copyright, license and author.
GaretJax_phpbrowscap
train
php
0957f59ea780b1a655b020ead1fe0ffcff4461df
diff --git a/cumulusci/tasks/bulkdata/load.py b/cumulusci/tasks/bulkdata/load.py index <HASH>..<HASH> 100644 --- a/cumulusci/tasks/bulkdata/load.py +++ b/cumulusci/tasks/bulkdata/load.py @@ -546,7 +546,9 @@ class LoadData(SqlAlchemyMixin, BaseSalesforceApiTask): ) def _filter_out_person_account_records(self, query, model): - return query.filter(model.__table__.columns.get("IsPersonAccount") == "false") + return query.filter( + func.lower(model.__table__.columns.get("IsPersonAccount")) == "false" + ) def _generate_contact_id_map_for_person_accounts( self, contact_mapping, account_id_lookup, conn
Fix handling of Boolean in Person Account loads
SFDO-Tooling_CumulusCI
train
py
b1dac0d2a04630ec47b3490269a48eafcbb46d58
diff --git a/bread/__init__.py b/bread/__init__.py index <HASH>..<HASH> 100644 --- a/bread/__init__.py +++ b/bread/__init__.py @@ -1,5 +1,5 @@ __title__ = 'bread' -__version__ = '2.1.0' +__version__ = '2.1.1' __author__ = 'Alex Rasmussen' __license__ = 'MIT' __copyright__ = 'Copyright 2015 Alex Rasmussen' diff --git a/docs/source/conf.py b/docs/source/conf.py index <HASH>..<HASH> 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2013, Alex Rasmussen' # built documents. # # The short X.Y version. -version = '2.1.0' +version = '2.1.1' # The full version, including alpha/beta/rc tags. -release = '2.1.0' +release = '2.1.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup(name='bread', - version='2.1.0', + version='2.1.1', description='Binary format parsing made easier', url='https://github.com/alexras/bread', author='Alex Rasmussen',
Bumping version to <I>
alexras_bread
train
py,py,py
94c33967148f0fe3e1d150122333bf57aef18ac1
diff --git a/Resources/public/js/controllers/portfolioController.js b/Resources/public/js/controllers/portfolioController.js index <HASH>..<HASH> 100644 --- a/Resources/public/js/controllers/portfolioController.js +++ b/Resources/public/js/controllers/portfolioController.js @@ -8,7 +8,7 @@ portfolioApp $scope.widgets = widgetsManager.widgets; }); - $scope.widgetTypes = widgetsConfig.getTypes(true); + $scope.widgetTypes = widgetsConfig.getTypes(true); $scope.assetPath = assetPath; $scope.displayComment = true; $scope.comment = "";
[PortfolioBundle] CS fix
claroline_Distribution
train
js
ac969630035296f3a97c5612f3c24c455b3bb3a0
diff --git a/clientv3/watch.go b/clientv3/watch.go index <HASH>..<HASH> 100644 --- a/clientv3/watch.go +++ b/clientv3/watch.go @@ -164,8 +164,12 @@ type watcherStream struct { } func NewWatcher(c *Client) Watcher { + return NewWatchFromWatchClient(pb.NewWatchClient(c.conn)) +} + +func NewWatchFromWatchClient(wc pb.WatchClient) Watcher { return &watcher{ - remote: pb.NewWatchClient(c.conn), + remote: wc, streams: make(map[string]*watchGrpcStream), } }
clientv3: support creating a Watch from a WatchClient
etcd-io_etcd
train
go
a7b5a9e3b398e0a9b921b5ec06d3052fd9704590
diff --git a/test/dataretriever.js b/test/dataretriever.js index <HASH>..<HASH> 100644 --- a/test/dataretriever.js +++ b/test/dataretriever.js @@ -156,6 +156,18 @@ experiment('RBAC internal modular information retrieval', () => { }); }); + test('should not allow using get with context and without callback', (done) => { + + expect(dataRetriever.get.bind(null, 'get-with-context-without-callback:x', {})).to.throw(Error); + done() + }); + + test('should not allow using get without context and without callback', (done) => { + + expect(dataRetriever.get.bind(null, 'get-with-context-without-callback:x', {})).to.throw(Error); + done() + }); + test('should return err in callback when an error is thrown (sync)', (done) => { const retriever = (source, key, context) => {
Created tests to try different combination of missing callback parameter on get
franciscogouveia_rbac-core
train
js
9a20cb7d4af6662e6c4e4e6b534bf32432d53458
diff --git a/tests/src/Registry/RegistryTest.php b/tests/src/Registry/RegistryTest.php index <HASH>..<HASH> 100644 --- a/tests/src/Registry/RegistryTest.php +++ b/tests/src/Registry/RegistryTest.php @@ -63,6 +63,8 @@ class RegistryTest extends Bluz\Tests\TestCase */ public function testSetGet() { + $this->assertNull($this->registry->foo); + $this->registry->foo = 'baz'; $this->assertEquals('baz', $this->registry->foo);
Added tests for Bluz\Registry package
bluzphp_framework
train
php
20bb4e0e3db586089d25434728392b963902befb
diff --git a/Event.php b/Event.php index <HASH>..<HASH> 100644 --- a/Event.php +++ b/Event.php @@ -38,7 +38,7 @@ class Event { if (!is_array($json)) { - $json = json_decode($json); + $json = json_decode($json, true); } $this->json = $json;
Fatal error: Cannot use object of type stdClass as array
Zoddo_gitlab-webhook
train
php
28382a8f8d4cb06103e72be59aec6a1ed1bec65e
diff --git a/lib/flapjack/gateways/pagerduty.rb b/lib/flapjack/gateways/pagerduty.rb index <HASH>..<HASH> 100644 --- a/lib/flapjack/gateways/pagerduty.rb +++ b/lib/flapjack/gateways/pagerduty.rb @@ -37,7 +37,7 @@ module Flapjack def start @logger.info("starting") - while not test_pagerduty_connection do + while not test_pagerduty_connection and not @should_quit do @logger.error("Can't connect to the pagerduty API, retrying after 10 seconds") EM::Synchrony.sleep(10) end
don't block quit if pagerduty has never connected
flapjack_flapjack
train
rb
829b28c300a3b84c47d01b7d678bcbc8324be6a7
diff --git a/src/components/MegadraftEditor.js b/src/components/MegadraftEditor.js index <HASH>..<HASH> 100644 --- a/src/components/MegadraftEditor.js +++ b/src/components/MegadraftEditor.js @@ -67,7 +67,6 @@ export default class MegadraftEditor extends Component { }; this.onChange = this.onChange.bind(this); - this.onTab = this.onTab.bind(this); this.mediaBlockRenderer = this.mediaBlockRenderer.bind(this); @@ -158,12 +157,6 @@ export default class MegadraftEditor extends Component { return getDefaultKeyBinding(e); } - onTab(event) { - if (this.props.onTab) { - this.props.onTab(event); - } - } - handleKeyCommand(command) { // external key bindings if (this.keyBindings.length) { @@ -558,7 +551,6 @@ export default class MegadraftEditor extends Component { readOnly={this.state.readOnly} blockRendererFn={this.mediaBlockRenderer} blockStyleFn={this.props.blockStyleFn || this.blockStyleFn} - onTab={this.onTab} handleKeyCommand={this.handleKeyCommand} handleReturn={this.props.handleReturn || this.handleReturn} keyBindingFn={this.externalKeyBindings}
refactor: remove deprecated method (#<I>)
globocom_megadraft
train
js
34f39012626da1e4d5685c36dee55ee9e7e0a3b6
diff --git a/hawtio-maven-indexer/src/main/java/io/hawt/maven/indexer/MavenIndexerFacade.java b/hawtio-maven-indexer/src/main/java/io/hawt/maven/indexer/MavenIndexerFacade.java index <HASH>..<HASH> 100644 --- a/hawtio-maven-indexer/src/main/java/io/hawt/maven/indexer/MavenIndexerFacade.java +++ b/hawtio-maven-indexer/src/main/java/io/hawt/maven/indexer/MavenIndexerFacade.java @@ -73,8 +73,7 @@ public class MavenIndexerFacade extends MBeanSupport implements MavenIndexerFaca private boolean updateIndexOnStartup = true; private int maximumIndexersPerMachine = 1000; private String[] repositories = { - // TODO seems there is no maven index any more here :( - // "http://repo.fusesource.com/nexus/content/repositories/releases@id=fusesource.release.repo", + "http://repository.jboss.org/nexus/content/repositories/ea@id=ea.jboss..release.repo", "http://repo1.maven.org/maven2@central" }; private String cacheDirName;
added back the Fuse EA repo
hawtio_hawtio
train
java
b8fa04a0db8bd889843a378a7b6dc0a61c7d3685
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ except ImportError: setup( name='threadloop', - version='0.3.0', + version='0.3.1.dev0', author='Grayson Koonce', author_email='breerly@gmail.com', description='Tornado IOLoop Backed Concurrent Futures',
Bump to <I>.dev0
breerly_threadloop
train
py
bb4a844db02c2aa666c0b039850a48aa78bf1f46
diff --git a/go/pools/id_pool.go b/go/pools/id_pool.go index <HASH>..<HASH> 100644 --- a/go/pools/id_pool.go +++ b/go/pools/id_pool.go @@ -25,7 +25,7 @@ import ( // contains any duplicates. The IDs start at 1 and increase without bound, but // will never be larger than the peak number of concurrent uses. // -// IDPool's Get() and Set() methods can be used concurrently. +// IDPool's Get() and Put() methods can be used concurrently. type IDPool struct { sync.Mutex
doc: fix comment for IDPool
vitessio_vitess
train
go
ecee7982d0b5f3c22b0b88d801f4e632ac382b56
diff --git a/js/language/de-DE.js b/js/language/de-DE.js index <HASH>..<HASH> 100644 --- a/js/language/de-DE.js +++ b/js/language/de-DE.js @@ -60,13 +60,18 @@ window.calendar_languages['de-DE'] = { holidays: { '01-01': 'Neujahr', + '06-01': 'Heilige Drei Könige', + 'easter-3': 'Gründonnerstag', 'easter-2': 'Karfreitag', + 'easter': 'Ostersonntag', 'easter+1': 'Ostermontag', - '01-05': 'Erster Mai', + '01-05': 'Tag der Arbeit', 'easter+39': 'Himmelfahrt', 'easter+49': 'Pfingstsonntag', 'easter+50': 'Pfingstmontag', + '15-08': 'Mariä Himmelfahrt', '03-10': 'Tag der Deutschen Einheit', + '01-11': 'Allerheiligen', '25-12': 'Erster Weihnachtsfeiertag', '26-12': 'Zweiter Weihnachtsfeiertag', }
Updated german holidays (copy some from de-AT)
Serhioromano_bootstrap-calendar
train
js
faf7652ada57a43a6f951aac55e355d4d4c351fd
diff --git a/epab/utils/_pipenv.py b/epab/utils/_pipenv.py index <HASH>..<HASH> 100644 --- a/epab/utils/_pipenv.py +++ b/epab/utils/_pipenv.py @@ -56,4 +56,4 @@ def write_reqs(ctx, auto_commit: bool): files_to_add = ['Pipfile', 'Pipfile.lock', 'requirements.txt', 'requirements-dev.txt'] repo_commit( - ctx, 'chg: dev: update requirements [auto] [skip ci]', files_to_add=files_to_add) + ctx, 'chg: dev: update requirements [auto]', files_to_add=files_to_add)
chg: reqs update should not skip ci
etcher-be_epab
train
py
4a1bf167f4da17be6eec8e3c7d4a3ba51ce9d88a
diff --git a/src/setup.py b/src/setup.py index <HASH>..<HASH> 100644 --- a/src/setup.py +++ b/src/setup.py @@ -38,7 +38,7 @@ setup(name='supy', 'f90nml', 'matplotlib', 'seaborn', - 'supy_driver>=2018b15' # a separate f2py-based driver + 'supy_driver>=2018b16' # a separate f2py-based driver ], include_package_data=True, test_suite='nose.collector', diff --git a/src/supy/version.py b/src/supy/version.py index <HASH>..<HASH> 100644 --- a/src/supy/version.py +++ b/src/supy/version.py @@ -2,7 +2,7 @@ ver_milestone = 2018 ver_major = 12 -ver_minor = 15 +ver_minor = 21 ver_remark = '' __version__ = '{ver_milestone}.{ver_major}.{ver_minor}{ver_remark}'.format( ver_milestone=ver_milestone,
loosened python requirement to <I>
sunt05_SuPy
train
py,py
c67de585ab20de734dbc871d56573f138a77bbbc
diff --git a/lib/runcible/version.rb b/lib/runcible/version.rb index <HASH>..<HASH> 100644 --- a/lib/runcible/version.rb +++ b/lib/runcible/version.rb @@ -1,3 +1,3 @@ module Runcible - VERSION = '1.2.0' + VERSION = '1.3.0' end
Bumped the version for docker tag changes
Katello_runcible
train
rb
677ecbfec8d2fa4a42f7bf3bf438b59d2b297575
diff --git a/github-updater.php b/github-updater.php index <HASH>..<HASH> 100644 --- a/github-updater.php +++ b/github-updater.php @@ -12,7 +12,7 @@ Plugin Name: GitHub Updater Plugin URI: https://github.com/afragen/github-updater Description: A plugin to automatically update GitHub, Bitbucket or GitLab hosted plugins and themes. It also allows for remote installation of plugins or themes into WordPress. -Version: 5.2.0.7 +Version: 5.3.0 Author: Andy Fragen License: GNU General Public License v2 License URI: http://www.gnu.org/licenses/gpl-2.0.html
I'm very thankful for all the people putting their trust in my code.
afragen_github-updater
train
php
9b644f6c2e179bd0c02aa7f8bb69e2458eed1d46
diff --git a/chui/chocolatechip.js b/chui/chocolatechip.js index <HASH>..<HASH> 100644 --- a/chui/chocolatechip.js +++ b/chui/chocolatechip.js @@ -53,12 +53,12 @@ Version 1.3.6 return O; } else { Object.keys(P).forEach(function(p) { - var enumberale = iterable || false; + var enumerable = iterable || false; if (P.hasOwnProperty(p)) { Object.defineProperty(O, p, { value: P[p], writable: true, - enumerable: enumberale, + enumerable: enumerable, configurable: true }); }
Corrected type of enumerable.
chocolatechip-ui_chocolatechipui
train
js
e548363f0eb0e83ad4a558aa9322296459a673e1
diff --git a/src/js/form.js b/src/js/form.js index <HASH>..<HASH> 100644 --- a/src/js/form.js +++ b/src/js/form.js @@ -121,7 +121,7 @@ ch.form = function(conf) { // Doc: http://wiki.ml.com/display/ux/Mensajes+de+error if (childrenError[0].element.tagName === "DIV") { $(childrenError[0].element).find("input:first").focus(); - } else { + } else if (childrenError[0].element.type !== "hidden") { childrenError[0].element.focus(); } } else {
#<I> Watchers: When first error is from an input hidden, it's doing focus()
mercadolibre_chico
train
js
0632c3249764001f46ad7e20472032d52ade3c6a
diff --git a/src/instance/methods.js b/src/instance/methods.js index <HASH>..<HASH> 100644 --- a/src/instance/methods.js +++ b/src/instance/methods.js @@ -39,14 +39,6 @@ Moon.prototype.get = function(key) { } /** -* Calls a method -* @param {String} method -*/ -Moon.prototype.method = function(method) { - this.$methods[method](); -} - -/** * Destroys Moon Instance */ Moon.prototype.destroy = function() {
remove method function to call a method
kbrsh_moon
train
js
ade65302208188976e5342de921612ebb94f47ee
diff --git a/Tests/Auth/OpenID/Server.php b/Tests/Auth/OpenID/Server.php index <HASH>..<HASH> 100644 --- a/Tests/Auth/OpenID/Server.php +++ b/Tests/Auth/OpenID/Server.php @@ -74,4 +74,19 @@ class Tests_Auth_OpenID_Server extends PHPUnit_TestCase { $this->assertEquals(Auth_OpenID_DO_ABOUT, $status); } + + function test_postError() + { + $args = array( + 'openid.mode' => 'pandadance', + 'openid.identity' => $this->id_url, + ); + + list($status, $info) = $this->server->getOpenIDResponse( + $this->noauth, 'POST', $args); + + $this->assertEquals(Auth_OpenID_REMOTE_ERROR, $status); + $resultArgs = Auth_OpenID_KVForm::kvToArray($info); + $this->assertTrue(array_key_exists('error', $resultArgs)); + } }
[project @ Added bad mode for post server test]
openid_php-openid
train
php
4bf3b1ef27581420428143a952c2a6619f686a6f
diff --git a/android/CouchbaseLite/src/androidTest/java/com/couchbase/lite/DatabaseTest.java b/android/CouchbaseLite/src/androidTest/java/com/couchbase/lite/DatabaseTest.java index <HASH>..<HASH> 100644 --- a/android/CouchbaseLite/src/androidTest/java/com/couchbase/lite/DatabaseTest.java +++ b/android/CouchbaseLite/src/androidTest/java/com/couchbase/lite/DatabaseTest.java @@ -1487,12 +1487,12 @@ public class DatabaseTest extends BaseTest { @Override public void run() { // just create 100 documents - for (int i = 0; i < 1000; i++) { + for (int i = 0; i < 100; i++) { Document doc = new Document(); // each doc has 10 items doc.setInt("index", i); - for (int j = 0; j < 9; j++) + for (int j = 0; j < 10; j++) doc.setInt("item_" + j, j); try {
to avoid `Excessive JNI global references` error with Android Emulator API <I>/<I>
couchbase_couchbase-lite-android
train
java
abc3558cd0f98e726f629716752d4a74cd30c122
diff --git a/modin/pandas/series.py b/modin/pandas/series.py index <HASH>..<HASH> 100644 --- a/modin/pandas/series.py +++ b/modin/pandas/series.py @@ -323,6 +323,9 @@ class Series(BasePandasDataset): self._create_or_update_from_compiler( self._query_compiler.setitem(1, key, value), inplace=True ) + # Propagate changes back to parent so that column in dataframe had the same contents + if self._parent is not None: + self._parent[self.name] = self def __sub__(self, right): return self.sub(right) diff --git a/modin/pandas/test/test_dataframe.py b/modin/pandas/test/test_dataframe.py index <HASH>..<HASH> 100644 --- a/modin/pandas/test/test_dataframe.py +++ b/modin/pandas/test/test_dataframe.py @@ -5111,6 +5111,11 @@ class TestDataFrameIndexing: df_equals(modin_df, pandas_df) + modin_df[modin_df.columns[0]][modin_df.index[0]] = 12345 + pandas_df[pandas_df.columns[0]][pandas_df.index[0]] = 12345 + + df_equals(modin_df, pandas_df) + def test_setitem_on_empty_df(self): columns = ["id", "max_speed", "health"] modin_df = pd.DataFrame(columns=columns)
Changes in column are propagated to dataframe if column belongs to one Fixed bug #<I>.
modin-project_modin
train
py,py
7e29430ca11e5ab405616b00defa6c9a858e1c97
diff --git a/airflow/gcp/hooks/dataflow.py b/airflow/gcp/hooks/dataflow.py index <HASH>..<HASH> 100644 --- a/airflow/gcp/hooks/dataflow.py +++ b/airflow/gcp/hooks/dataflow.py @@ -259,7 +259,7 @@ class _DataflowJobsController(LoggingMixin): if not self._jobs: self._refresh_jobs() if not self._jobs: - raise ValueError("Could nit read _jobs") + raise ValueError("Could not read _jobs") return self._jobs
[AIRFLOW-XXXX] Fix typo in error for when getting data flow jobs (#<I>)
apache_airflow
train
py
98ec236885e945a9a1423f37599a76d603faff54
diff --git a/src/PhpGitHooks/Module/Git/Service/PreCommitTool.php b/src/PhpGitHooks/Module/Git/Service/PreCommitTool.php index <HASH>..<HASH> 100644 --- a/src/PhpGitHooks/Module/Git/Service/PreCommitTool.php +++ b/src/PhpGitHooks/Module/Git/Service/PreCommitTool.php @@ -154,15 +154,15 @@ class PreCommitTool $configurationData->getErrorMessage() ) ); - } - if (true === $configurationData->isPhpunitStrictCoverage()) { - $this->commandBus->handle( - new StrictCoverageCommand( - $configurationData->getMinimum(), - $configurationData->getErrorMessage() - ) - ); + if (true === $configurationData->isPhpunitStrictCoverage()) { + $this->commandBus->handle( + new StrictCoverageCommand( + $configurationData->getMinimum(), + $configurationData->getErrorMessage() + ) + ); + } } } }
Execute strict coverage command if phpunit is enabled
bruli_php-git-hooks
train
php
5f352498cc2a1060dede98e50ed1a64380510c53
diff --git a/simple_history/tests/tests/test_admin.py b/simple_history/tests/tests/test_admin.py index <HASH>..<HASH> 100644 --- a/simple_history/tests/tests/test_admin.py +++ b/simple_history/tests/tests/test_admin.py @@ -185,6 +185,19 @@ class AdminSiteTest(WebTest): self.assertEqual(historical_poll.history_user, self.user, "Middleware should make the request available to " "retrieve history_user.") + + def test_middleware_anonymous_user(self): + overridden_settings = { + 'MIDDLEWARE_CLASSES': + settings.MIDDLEWARE_CLASSES + + ['simple_history.middleware.HistoryRequestMiddleware'], + } + with override_settings(**overridden_settings): + poll = Poll.objects.create(question="why?", pub_date=today) + historical_poll = poll.history.all()[0] + self.assertEqual(historical_poll.history_user, None, + "Middleware request user should be able to " + "be anonymous.") def test_other_admin(self): """Test non-default admin instances.
Update test_admin.py Added test for allowing Anonymous user when using HistoryRequestMiddleware.
treyhunner_django-simple-history
train
py
48ef8223b70c7f27d1c6a3375059125378825d2f
diff --git a/src/pyclts/models.py b/src/pyclts/models.py index <HASH>..<HASH> 100644 --- a/src/pyclts/models.py +++ b/src/pyclts/models.py @@ -20,7 +20,22 @@ __all__ = [ 'Diphthong', 'Cluster', 'UnknownSound'] -EXCLUDE_FEATURES = ['apical', 'laminal', 'ejective'] +EXCLUDE_FEATURES = [ + 'apical', + 'laminal', + 'ejective', + 'with_falling_tone', + 'with_extra_low_tone', + 'with_extra-high_tone', + 'with_falling_tone', + 'with_low_tone', + 'with_global_fall', + 'with_global_rise', + 'with_high_tone', + 'with_mid_tone', + 'with_rising_tone', + 'with_upstep' +] def is_valid_sound(sound, ts):
Implemented change by @lingulist in <URL>
cldf_clts
train
py
2b6c822a236ad04532871aaf36fa92e191589df6
diff --git a/tests/Unit/Drivers/TextDriverTest.php b/tests/Unit/Drivers/TextDriverTest.php index <HASH>..<HASH> 100644 --- a/tests/Unit/Drivers/TextDriverTest.php +++ b/tests/Unit/Drivers/TextDriverTest.php @@ -29,7 +29,7 @@ EOF)); } /** @test */ - public function it_can_serialize_when_given_windows_line_endings() + public function it_can_serialize_when_given_OS_dependant_line_endings() { $driver = new TextDriver();
adjust test name ..also hope this retriggers tests and fixes github
spatie_phpunit-snapshot-assertions
train
php