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
44020034cb40878f91fa38eb9aa5ae8159826cdd
diff --git a/lib/workers/pr/pr-body.js b/lib/workers/pr/pr-body.js index <HASH>..<HASH> 100644 --- a/lib/workers/pr/pr-body.js +++ b/lib/workers/pr/pr-body.js @@ -69,13 +69,12 @@ async function getPrBody(config) { .compile(value)(upgrade) .replace(/^``$/, ''); } catch (err) /* istanbul ignore next */ { - logger.info({ header, value, err }, 'Handlebars compilation error'); + logger.warn({ header, value, err }, 'Handlebars compilation error'); } } return res; }); const tableColumns = getNonEmptyColumns(tableDefinitions, tableValues); - logger.info({ tableDefinitions, tableValues, tableColumns }); let prBody = ''; // istanbul ignore if if (config.prBanner && !config.isGroup) {
refactor: better pr body log levels
renovatebot_renovate
train
js
768ca1f9a720bfe33a3528ea911cf965be85e47d
diff --git a/tests/test_brann_bronzebeard.py b/tests/test_brann_bronzebeard.py index <HASH>..<HASH> 100644 --- a/tests/test_brann_bronzebeard.py +++ b/tests/test_brann_bronzebeard.py @@ -36,13 +36,6 @@ def test_brann_novice_engineer(): assert len(game.player1.hand) == 2 -def test_brann_youthful_brewmaster(): - game, brann = _prepare_game() - brewmaster = game.player1.give("EX1_049") - brewmaster.play(target=brann) - assert brann in game.player1.hand - - def test_brann_recombobulator(): game, brann = _prepare_game() recombobulator = game.player1.give("GVG_108") @@ -56,3 +49,10 @@ def test_brann_recombobulator(): morphed1 = game.player1.field[2] assert morphed1.cost == 0 + + +def test_brann_youthful_brewmaster(): + game, brann = _prepare_game() + brewmaster = game.player1.give("EX1_049") + brewmaster.play(target=brann) + assert brann in game.player1.hand
Fix alphabetical ordering of Brann tests
jleclanche_fireplace
train
py
55f2e758806da221a2f705c2535958df9e5dc869
diff --git a/src/adapter.js b/src/adapter.js index <HASH>..<HASH> 100644 --- a/src/adapter.js +++ b/src/adapter.js @@ -1,17 +1,23 @@ var createStartFn = function(tc, env) { var numResults = 0; + var res = []; + var startTime = new Date().getTime(); var parse_stream = tapParser(function(results) { tc.info({ total: numResults }); + for (var i = 0, len = res.length; i < len; i++) { + tc.result(res[i]); + } tc.complete({ coverage: window.__coverage__ }); }).on('assert', function(assertion) { numResults++; - tc.result({ + res.push({ description: assertion.name, success: assertion.ok, log: [], - suite: [] + suite: [], + time: new Date().getTime() - startTime }); });
Add some timing and test count to karma output.
bySabi_karma-tap
train
js
feeb62f94f9ebd0a6153b3787652b122dfc4af46
diff --git a/lib/instana/version.rb b/lib/instana/version.rb index <HASH>..<HASH> 100644 --- a/lib/instana/version.rb +++ b/lib/instana/version.rb @@ -1,4 +1,4 @@ module Instana - VERSION = "1.4.10" + VERSION = "1.4.11" VERSION_FULL = "instana-#{VERSION}" end
Bump gem version to <I>
instana_ruby-sensor
train
rb
ee6cbbeb406c108a7d1cfd4b462ee5d20885354d
diff --git a/src/web/org/codehaus/groovy/grails/web/mapping/DefaultUrlMappingData.java b/src/web/org/codehaus/groovy/grails/web/mapping/DefaultUrlMappingData.java index <HASH>..<HASH> 100644 --- a/src/web/org/codehaus/groovy/grails/web/mapping/DefaultUrlMappingData.java +++ b/src/web/org/codehaus/groovy/grails/web/mapping/DefaultUrlMappingData.java @@ -41,8 +41,8 @@ public class DefaultUrlMappingData implements UrlMappingData { if(StringUtils.isBlank(urlPattern)) throw new IllegalArgumentException("Argument [urlPattern] cannot be null or blank"); if(!urlPattern.startsWith(SLASH)) throw new IllegalArgumentException("Argument [urlPattern] is not a valid URL. It must start with '/' !"); - this.urlPattern = urlPattern.substring(1); // remove starting / - this.tokens = this.urlPattern.split(SLASH); + this.urlPattern = urlPattern; // remove starting / + this.tokens = this.urlPattern.substring(1).split(SLASH); List urls = new ArrayList(); parseUrls(urls);
Implemented the UrlMappingEvaluator which parses Groovy scripts into the UrlMapping data model. Then implemented the infrastructure code such as the UrlMappingHolder and factory bean which a new UrlMappingsFilter uses to match URIs and forward (using an include) to the given URI. Custom URL mapping almost working :-) git-svn-id: <URL>
grails_grails-core
train
java
71378263a1474de2d759c571aff7db96d810cfac
diff --git a/artifactory.py b/artifactory.py index <HASH>..<HASH> 100755 --- a/artifactory.py +++ b/artifactory.py @@ -1708,16 +1708,13 @@ class ArtifactoryPath(pathlib.Path, PureArtifactoryPath): promote_url = "{}/api/docker/{}/v2/promote".format( self.drive.rstrip("/"), source_repo ) - promote_data = json.dumps( - { - "targetRepo": target_repo, - "dockerRepository": docker_repo, - "tag": tag, - "copy": copy, - } - ) - headers = {"Content-Type": "application/json"} - r = self.session.post(promote_url, data=promote_data, headers=headers) + promote_data = { + "targetRepo": target_repo, + "dockerRepository": docker_repo, + "tag": tag, + "copy": copy, + } + r = self.session.post(promote_url, json=promote_data) if ( r.status_code == 400 and "Unsupported docker" in r.text
use requests lib with dict data
devopshq_artifactory
train
py
6b73492b78c1163c8e32398e26adabab5d5b411a
diff --git a/motor/__init__.py b/motor/__init__.py index <HASH>..<HASH> 100644 --- a/motor/__init__.py +++ b/motor/__init__.py @@ -20,7 +20,7 @@ import pymongo from motor.motor_py3_compat import text_type -version_tuple = (0, 7) +version_tuple = (1, 0, 'dev0') def get_version_string(): diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -147,7 +147,7 @@ if sys.version_info[0] >= 3: packages.append('motor.frameworks.asyncio') setup(name='motor', - version='0.7', + version='1.0-dev0', packages=packages, description=description, long_description=long_description,
post-release bump: <I>dev0
mongodb_motor
train
py,py
24dac684f34791d834a55c44f383dbaf12cdadd6
diff --git a/dedupe/api.py b/dedupe/api.py index <HASH>..<HASH> 100644 --- a/dedupe/api.py +++ b/dedupe/api.py @@ -525,6 +525,13 @@ class ActiveMatching(Matching) : def readTraining(self, training_source) : # pragma : no cover + ''' + Read training from previously saved training data file + + Arguments: + + training_source -- the path of the training data file + ''' logging.info('reading training from file')
docstrings for readTraining
dedupeio_dedupe
train
py
ed775af9c59c33ffb18107dbc83ce4fe207f3160
diff --git a/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java b/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java index <HASH>..<HASH> 100644 --- a/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java +++ b/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java @@ -668,7 +668,7 @@ public abstract class ProcessEngineConfigurationImpl extends ProcessEngineConfig protected boolean enableExpressionsInStoredQueries = true; /** - * If true, enables protection against XML eXternal Entity (XXE) Processing attacks. + * If false, disables XML eXternal Entity (XXE) Processing. This provides protection against XXE Processing attacks. */ protected boolean enableXxeProcessing = false;
chore(javadoc): update javadoc for new XXE Processing property Related to CAM-<I>
camunda_camunda-bpm-platform
train
java
defdc72bbdb69ffd915c2679e7a6028c31a116f9
diff --git a/src/DataFormatter.php b/src/DataFormatter.php index <HASH>..<HASH> 100644 --- a/src/DataFormatter.php +++ b/src/DataFormatter.php @@ -301,7 +301,9 @@ abstract class DataFormatter if (is_array($this->customFields)) { foreach ($this->customFields as $fieldName) { // @todo Possible security risk by making methods accessible - implement field-level security - if ($obj->hasField($fieldName) || $obj->hasMethod("get{$fieldName}")) { + if (($obj->hasField($fieldName) && !is_object($obj->getField($fieldName))) + || $obj->hasMethod("get{$fieldName}") + ) { $dbFields[$fieldName] = $fieldName; } }
FIX getFieldsForObj does not return relation classes in hasField() check
silverstripe_silverstripe-restfulserver
train
php
7da22c86fbc89a1022e11affee7a7e487de32a1a
diff --git a/app/index.js b/app/index.js index <HASH>..<HASH> 100644 --- a/app/index.js +++ b/app/index.js @@ -13,7 +13,7 @@ module.exports = yeoman.Base.extend({ yeoman.Base.apply(this, arguments); - // preapre options + // prepare options this.option('test-framework', { desc: 'Test framework to be invoked', type: String,
Fix typo (#<I>)
yeoman_generator-chrome-extension
train
js
03f8c3247b1b0958ff6de2d00cd2cb433be43ffa
diff --git a/ActiveRecord.php b/ActiveRecord.php index <HASH>..<HASH> 100644 --- a/ActiveRecord.php +++ b/ActiveRecord.php @@ -59,23 +59,20 @@ class ActiveRecord extends BaseActiveRecord * You may also define default conditions that should apply to all queries unless overridden: * * ```php - * public static function createQuery($config = []) + * public static function createQuery() * { - * return parent::createQuery($config)->where(['deleted' => false]); + * return parent::createQuery()->where(['deleted' => false]); * } * ``` * * Note that all queries should use [[Query::andWhere()]] and [[Query::orWhere()]] to keep the * default condition. Using [[Query::where()]] will override the default condition. * - * @param array $config the configuration passed to the ActiveQuery class. * @return ActiveQuery the newly created [[ActiveQuery]] instance. */ - public static function createQuery($config = []) + public static function createQuery() { - $config['modelClass'] = get_called_class(); - - return new ActiveQuery($config); + return new ActiveQuery(get_called_class()); } /**
Fixes #<I>: Changed the signature of ActiveQuery constructors and `ActiveRecord::createQuery()` to simplify customizing ActiveQuery classes
yiisoft_yii2-redis
train
php
13bde430b8e6875899c9c69655b47677b8d16a48
diff --git a/spec/mongoid/clients/options_spec.rb b/spec/mongoid/clients/options_spec.rb index <HASH>..<HASH> 100644 --- a/spec/mongoid/clients/options_spec.rb +++ b/spec/mongoid/clients/options_spec.rb @@ -47,10 +47,6 @@ describe Mongoid::Clients::Options do it 'uses that collection' do expect(klass.collection.name).to eq(options[:collection]) end - - it 'does not create a new cluster' do - expect(klass.mongo_client.cluster).to be(cluster) - end end end
MONGOID-<I> Remove test for driver fix
mongodb_mongoid
train
rb
ad37ffa886a11a2e37a8ec75d16bc6fd2a51f4be
diff --git a/lib/libhoney/transmission.rb b/lib/libhoney/transmission.rb index <HASH>..<HASH> 100644 --- a/lib/libhoney/transmission.rb +++ b/lib/libhoney/transmission.rb @@ -3,16 +3,16 @@ require 'libhoney/response' module Libhoney # @api private class TransmissionClient - def initialize(max_batch_size: 0, - send_frequency: 0, - max_concurrent_batches: 0, - pending_work_capacity: 0, - responses: 0, - block_on_send: 0, - block_on_responses: 0, + def initialize(max_batch_size: 50, + send_frequency: 100, + max_concurrent_batches: 10, + pending_work_capacity: 1000, + responses: nil, + block_on_send: false, + block_on_responses: false, user_agent_addition: nil) - @responses = responses + @responses = responses || SizedQueue.new(pending_work_capacity * 2) @block_on_send = block_on_send @block_on_responses = block_on_responses @max_batch_size = max_batch_size
Add working defaults to TransmissionClient
honeycombio_libhoney-rb
train
rb
e6627d60fecd47f38d4a2200ecf97aef654fac12
diff --git a/src/Audit.php b/src/Audit.php index <HASH>..<HASH> 100644 --- a/src/Audit.php +++ b/src/Audit.php @@ -169,7 +169,7 @@ abstract class Audit implements AuditInterface */ private function evaluateTwigSyntax(string $expression) { - $code = '{{ '.$expression.'|json_encode()|raw }}'; + $code = '{{ ('.$expression.')|json_encode()|raw }}'; $twig = $this->container->get('Twig\Environment'); $template = $twig->createTemplate($code); $output = $twig->render($template, $this->getContexts());
Fixed issues when ternary operators are used in twig syntax.
drutiny_drutiny
train
php
57f106d2be445ab7d360c3a63a489697d1da2b39
diff --git a/parser_test.go b/parser_test.go index <HASH>..<HASH> 100644 --- a/parser_test.go +++ b/parser_test.go @@ -621,6 +621,7 @@ func TestParser_ParseStatement(t *testing.T) { {s: `DELETE FROM myseries WHERE`, err: `found EOF, expected identifier, string, number, bool at line 1, char 28`}, {s: `DROP SERIES`, err: `found EOF, expected number at line 1, char 13`}, {s: `DROP SERIES FROM`, err: `found EOF, expected identifier at line 1, char 18`}, + {s: `DROP SERIES FROM src WHERE`, err: `found EOF, expected identifier, string, number, bool at line 1, char 28`}, {s: `SHOW CONTINUOUS`, err: `found EOF, expected QUERIES at line 1, char 17`}, {s: `SHOW RETENTION`, err: `found EOF, expected POLICIES at line 1, char 16`}, {s: `SHOW RETENTION POLICIES`, err: `found EOF, expected identifier at line 1, char 25`},
one more err test condition for drop series
influxdata_influxql
train
go
85b4d13b7854573aae3dde776ea03ca869e7a5ac
diff --git a/docson.js b/docson.js index <HASH>..<HASH> 100644 --- a/docson.js +++ b/docson.js @@ -433,7 +433,8 @@ define(["lib/jquery", "lib/handlebars", "lib/highlight", "lib/jsonpointer", "lib }); }; - var resolveRefsReentrant = function(schema){ + var resolveRefsReentrant = function(schema, relPath){ + if (relPath === undefined) {relPath = baseUrl} traverse(schema).forEach(function(item) { // Fix Swagger weird generation for array. if(item && item.$ref == "array") { @@ -492,7 +493,8 @@ define(["lib/jquery", "lib/handlebars", "lib/highlight", "lib/jsonpointer", "lib if(content) { refs[item] = content; renderBox(); - resolveRefsReentrant(content); + var splitSegment = segments[0].split('/') + resolveRefsReentrant(content, relPath+splitSegment.slice(0, splitSegment.length-1).join('/')+"/"); } }); }
if it's local to this server need throw relative path
lbovet_docson
train
js
0b47d85a08a85073a95a36503090f08478d76db2
diff --git a/src/frontend/org/voltdb/SystemProcedureCatalog.java b/src/frontend/org/voltdb/SystemProcedureCatalog.java index <HASH>..<HASH> 100644 --- a/src/frontend/org/voltdb/SystemProcedureCatalog.java +++ b/src/frontend/org/voltdb/SystemProcedureCatalog.java @@ -86,6 +86,10 @@ public class SystemProcedureCatalog { this.durable = durable; } + public boolean isDurable() { + return durable; + } + public boolean getEverysite() { return everySite; }
ENG-<I>: hide IsDurable behind method.
VoltDB_voltdb
train
java
eb59a002ecc8dca64b5b433308118914efed74b0
diff --git a/opal/browser/css/rule/style.rb b/opal/browser/css/rule/style.rb index <HASH>..<HASH> 100644 --- a/opal/browser/css/rule/style.rb +++ b/opal/browser/css/rule/style.rb @@ -2,6 +2,14 @@ module Browser; module CSS; class Rule class Style < Rule alias_native :selector, :selectorText + alias_native :id, :selectorText + + # FIXME: when ^ is fixed remove these + def selector + `#@native.selectorText` + end + alias id selector + # FIXME: ^ def declaration Declaration.new(`#@native.style`)
css/rule/style: temporary fix for #selector and #id
opal_opal-browser
train
rb
5344648376703387a62b90e20309c1ebd02a349e
diff --git a/metrics/sinks/stackdriver/stackdriver_test.go b/metrics/sinks/stackdriver/stackdriver_test.go index <HASH>..<HASH> 100644 --- a/metrics/sinks/stackdriver/stackdriver_test.go +++ b/metrics/sinks/stackdriver/stackdriver_test.go @@ -291,9 +291,9 @@ func testTranslateAcceleratorMetric(t *testing.T, sourceName string, stackdriver as.Equal(stackdriverName, ts.Metric.Type) as.Equal(1, len(ts.Points)) as.Equal(value, *ts.Points[0].Value.Int64Value) - as.Equal(make, ts.Metric.Labels[core.LabelAcceleratorMake.Key]) - as.Equal(model, ts.Metric.Labels[core.LabelAcceleratorModel.Key]) - as.Equal(acceleratorID, ts.Metric.Labels[core.LabelAcceleratorID.Key]) + as.Equal(make, ts.Metric.Labels["make"]) + as.Equal(model, ts.Metric.Labels["model"]) + as.Equal(acceleratorID, ts.Metric.Labels["accelerator_id"]) } func TestTranslateAcceleratorMetrics(t *testing.T) {
Protect against someone changing LabelAccelerator... values. Stackdriver expects the labels to be `make`, `model` and `accelerator_id`. Currently the tests would keep on passing if someone changed the values of `LabelAcceleratorMake`, `LabelAcceleratorModel` or `LabelAcceleratorID`. This makes sure that the tests would fail in that case.
kubernetes-retired_heapster
train
go
10be334e066c50d4c7472f002b330175f34b6f00
diff --git a/can-simple-observable.js b/can-simple-observable.js index <HASH>..<HASH> 100644 --- a/can-simple-observable.js +++ b/can-simple-observable.js @@ -75,7 +75,7 @@ var simpleObservableProto = { //!steal-remove-start if (process.env.NODE_ENV !== 'production') { - simpleObservableProto[canSymbol.for("can.getName")] = function() { + simpleObservableProto["can.getName"] = function() { var value = this.value; if (typeof value !== 'object' || value === null) { value = JSON.stringify(value);
fix can-symbol use after review
canjs_can-simple-observable
train
js
8a5e5132d45f98f3a36f9cb7f582867c732d62bf
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -116,8 +116,8 @@ azure_data_lake = [ ] cassandra = ['cassandra-driver>=3.13.0'] celery = [ - 'celery>=4.1.1', - 'flower>=0.7.3' + 'celery>=4.1.1, <4.2.0', + 'flower>=0.7.3, <1.0' ] cgroups = [ 'cgroupspy>=0.1.4',
[AIRFLOW-<I>][AIRFLOW-<I>] Guard against next major release of Celery, Flower Closes #<I> from tedmiston/celery-flower-guard
apache_airflow
train
py
315edd10366412326bbf13e289a3901ac1a1c471
diff --git a/test/Base/PluginTestCaseWithDoctrine.php b/test/Base/PluginTestCaseWithDoctrine.php index <HASH>..<HASH> 100644 --- a/test/Base/PluginTestCaseWithDoctrine.php +++ b/test/Base/PluginTestCaseWithDoctrine.php @@ -23,8 +23,6 @@ class PluginTestCaseWithDoctrine { $country = $this->getDefaultCountry(); $language = $this->getDefaultLanguage(); - - } public function getDefaultCountry()
make doctrine json storage plugins more testable -more fixes
reliv_Rcm
train
php
9752332888641b64dc2e5f5378aae9e1f812726c
diff --git a/assess_autoload_credentials.py b/assess_autoload_credentials.py index <HASH>..<HASH> 100755 --- a/assess_autoload_credentials.py +++ b/assess_autoload_credentials.py @@ -107,12 +107,14 @@ def ensure_autoload_credentials_overwrite_existing(juju_bin, cloud_details_fn): """ user = 'testing_user' with temp_dir() as tmp_dir: + tmp_juju_home = tempfile.mkdtemp(dir=tmp_dir) + tmp_scratch_dir = tempfile.mkdtemp(dir=tmp_dir) client = EnvJujuClient.by_version( - JujuData('local', juju_home=tmp_dir), juju_bin, False + JujuData('local', juju_home=tmp_juju_home), juju_bin, False ) first_pass_cloud_details = cloud_details_fn( - user, tmp_dir, client + user, tmp_scratch_dir, client ) # Inject well known username. first_pass_cloud_details.env_var_changes.update({'USER': user}) @@ -123,7 +125,7 @@ def ensure_autoload_credentials_overwrite_existing(juju_bin, cloud_details_fn): # Now run again with a second lot of details. overwrite_cloud_details = cloud_details_fn( - user, tmp_dir, client + user, tmp_scratch_dir, client ) # Inject well known username. overwrite_cloud_details.env_var_changes.update({'USER': user})
Update overwrite test to use separate tmp dirs.
juju_juju
train
py
fc2ed11c32b534a9ce5e2188debd29dd718812ee
diff --git a/library/src/main/java/com/skocken/efficientadapter/lib/adapter/SimpleAdapter.java b/library/src/main/java/com/skocken/efficientadapter/lib/adapter/SimpleAdapter.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/com/skocken/efficientadapter/lib/adapter/SimpleAdapter.java +++ b/library/src/main/java/com/skocken/efficientadapter/lib/adapter/SimpleAdapter.java @@ -41,7 +41,7 @@ public class SimpleAdapter<T> extends AbsViewHolderAdapter<T> { } @Override - protected Class<? extends AbsViewHolder<? extends T>> getViewHolderClass(int position) { + protected Class<? extends AbsViewHolder<? extends T>> getViewHolderClass(int viewType) { return mViewHolderClass; }
[simple_adapter] Fixed parameter name It’s not about the position, but about the view type into getViewHolderClass()
StanKocken_EfficientAdapter
train
java
ef8924a2ededaa0da6702b5bf6c24cf3b2fe95d6
diff --git a/lib/moneta/adapters/couch.rb b/lib/moneta/adapters/couch.rb index <HASH>..<HASH> 100644 --- a/lib/moneta/adapters/couch.rb +++ b/lib/moneta/adapters/couch.rb @@ -138,7 +138,7 @@ module Moneta def clear(options = {}) loop do docs = all_docs(limit: 10_000) - break if docs['rows'].empty? + break if !docs || docs['rows'].empty? deletions = docs['rows'].map do |row| { _id: row['id'], _rev: row['value']['rev'], _deleted: true } end
Fix spec setting a null store in couchdb
moneta-rb_moneta
train
rb
837444f025f6f3c717554749729d773a8e55ce13
diff --git a/bcbio/variation/varscan.py b/bcbio/variation/varscan.py index <HASH>..<HASH> 100644 --- a/bcbio/variation/varscan.py +++ b/bcbio/variation/varscan.py @@ -25,7 +25,8 @@ import vcf def run_varscan(align_bams, items, ref_file, assoc_files, region=None, out_file=None): - if is_paired_analysis(align_bams, items): + paired = get_paired_bams(align_bams, items) + if paired and paired.normal_bam and paired.tumor_bam: call_file = samtools.shared_variantcall(_varscan_paired, "varscan", align_bams, ref_file, items, assoc_files, region, out_file)
Push tumor-only samples to VarScan germline caling VarScan currently complains on tumor-only inputs, as it doesn't have a tumor only mode. This shifts these over to germline single sample calling so we at least have output. Fixes #<I>
bcbio_bcbio-nextgen
train
py
184e06f40e1873d3d0694e60ebdac7df19903c39
diff --git a/xdot.py b/xdot.py index <HASH>..<HASH> 100755 --- a/xdot.py +++ b/xdot.py @@ -1610,11 +1610,16 @@ class DotWidget(gtk.DrawingArea): self.y += self.POS_INCREMENT/self.zoom_ratio self.queue_draw() return True - if event.keyval == gtk.keysyms.Page_Up: + if event.keyval in (gtk.keysyms.Page_Up, + gtk.keysyms.plus, + gtk.keysyms.equal, + gtk.keysyms.KP_Add): self.zoom_image(self.zoom_ratio * self.ZOOM_INCREMENT) self.queue_draw() return True - if event.keyval == gtk.keysyms.Page_Down: + if event.keyval in (gtk.keysyms.Page_Down, + gtk.keysyms.minus, + gtk.keysyms.KP_Subtract): self.zoom_image(self.zoom_ratio / self.ZOOM_INCREMENT) self.queue_draw() return True
Accept +/- to zoom in and out (mgedmin, issue <I>)
jrfonseca_xdot.py
train
py
1f17a47f4e22ebd4ca91f12ba81d56e11fb9f06d
diff --git a/pkg/kubelet/dockertools/docker_manager_unsupported.go b/pkg/kubelet/dockertools/docker_manager_unsupported.go index <HASH>..<HASH> 100644 --- a/pkg/kubelet/dockertools/docker_manager_unsupported.go +++ b/pkg/kubelet/dockertools/docker_manager_unsupported.go @@ -22,6 +22,7 @@ import ( "k8s.io/kubernetes/pkg/api/v1" dockertypes "github.com/docker/engine-api/types" + dockercontainer "github.com/docker/engine-api/types/container" ) // These two functions are OS specific (for now at least)
dockertools: fix build on OSX
kubernetes_kubernetes
train
go
d798dc77941cadfcf9ad6af2d58c9dca169c1046
diff --git a/lib/puppet/application/agent.rb b/lib/puppet/application/agent.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/application/agent.rb +++ b/lib/puppet/application/agent.rb @@ -259,7 +259,7 @@ configuration options can also be generated by running puppet agent with * --test: Enable the most common options used for testing. These are 'onetime', 'verbose', 'ignorecache', 'no-daemonize', 'no-usecacheonfailure', - 'detailed-exit-codes', 'no-splay', and 'show_diff'. + 'detailed-exitcodes', 'no-splay', and 'show_diff'. * --verbose: Turn on verbose reporting.
Update lib/puppet/application/agent.rb Fix docs to refer to actual option.
puppetlabs_puppet
train
rb
abfcaa7692c1c1bf63dbf0cdb091cf1ccda2e6ef
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ setup( 'cc_core.commons.connectors', 'cc_core.agent', 'cc_core.agent.cwl', - 'cc_core.agent.cwl_io', + 'cc_core.agent.red', 'cc_core.agent.connected' ], entry_points={
fixed package renaming error in setup.py
curious-containers_cc-core
train
py
4d5116bfed479a81b6ac6ae4e8f1a1fba56e4657
diff --git a/resampy/version.py b/resampy/version.py index <HASH>..<HASH> 100644 --- a/resampy/version.py +++ b/resampy/version.py @@ -3,4 +3,4 @@ """Version info""" short_version = '0.1' -version = '0.1.0rc0' +version = '0.1.0rc1'
upping version to rc1
bmcfee_resampy
train
py
144c9682fbadb63081bc092712b0d63af96ba840
diff --git a/commands/fweather.py b/commands/fweather.py index <HASH>..<HASH> 100755 --- a/commands/fweather.py +++ b/commands/fweather.py @@ -10,6 +10,6 @@ def cmd(e, c, msg): temp, remark, flavor = soup.findAll('p') c.privmsg(CHANNEL, str(temp.contents[0].contents[0]) + ' F? ' + str(remark.contents[0])) except ValueError: - c.privmsg(CHANNEL, 'No results for location ' + msg + '.') + c.privmsg(CHANNEL, 'NO FUCKING RESULTS.') except socket.timeout: - c.privmsg(CHANNEL, 'Connection timed out.') + c.privmsg(CHANNEL, 'CONNECTION TIMED THE FUCK OUT.')
Added spirit to !fweather
tjcsl_cslbot
train
py
164b40d15b69562f1b1890288afee8e4a5da58fe
diff --git a/src/index.spec.js b/src/index.spec.js index <HASH>..<HASH> 100644 --- a/src/index.spec.js +++ b/src/index.spec.js @@ -984,18 +984,17 @@ describe('#Datatable', () => { ]; const dataTable = new DataTable(data1, schema1); let dt2 = dataTable.select(fields => fields.profit.value < 150); - // let dt3 = dataTable.groupBy(['sales'], { - // profit: null - // }); + let dt3 = dataTable.groupBy(['sales'], { + profit: null + }); let dt4 = dataTable.select(fields => fields.profit.value < 150, {}, true, dt2); - // let dt5 = dataTable.groupBy(['Year'], { - // }, true, dt3); + let dt5 = dataTable.groupBy(['Year'], { + }, true, dt3); it('datatable select instance should not change', () => { expect(dt2).to.equal(dt4); }); - // debugger; - // it('datatable groupby instance should not change', () => { - // expect(dt3).to.equal(dt5); - // }); + it('datatable groupby instance should not change it namespace', () => { + expect(dt3.getNameSpace().name).to.equal(dt5.getNameSpace().name); + }); }); });
FSB-<I>: Achieved <I>% coverage for datatable
chartshq_datamodel
train
js
170bcbf475a29cec82e32dff4c90354ce5c5c171
diff --git a/src/main/java/jcifs/Configuration.java b/src/main/java/jcifs/Configuration.java index <HASH>..<HASH> 100644 --- a/src/main/java/jcifs/Configuration.java +++ b/src/main/java/jcifs/Configuration.java @@ -165,7 +165,7 @@ public interface Configuration { /** - * + * Property <tt>jcifs.smb.client.sessionTimeout</tt> (int, default 35000) * * * @return timeout for SMB sessions, in milliseconds
Add missing docs for session timeout.
AgNO3_jcifs-ng
train
java
957c6d5302c8de09acc46b40f11eb32730ce754d
diff --git a/tests/includes/properties/class-papi-property-test.php b/tests/includes/properties/class-papi-property-test.php index <HASH>..<HASH> 100644 --- a/tests/includes/properties/class-papi-property-test.php +++ b/tests/includes/properties/class-papi-property-test.php @@ -154,7 +154,8 @@ class Papi_Property_Test extends WP_UnitTestCase { public function test_get_slug() { $property = Papi_Property::create(); - $this->assertNotEmpty( $property->get_slug() ); + // this will not be empty since a property without a slug will get a generated uniq id. + $this->assertRegExp( '/papi\_\w+/', $property->get_slug() ); $property->set_options( [ 'type' => 'string',
Changed to regex assert instead of check if it's not empty
wp-papi_papi
train
php
54fa2ac7538310d9c25eeda86fa487522e74874b
diff --git a/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php b/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php +++ b/src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php @@ -67,7 +67,7 @@ trait AuthorizesRequests * * @param string $ability * @param array $arguments - * @return void + * @return \Symfony\Component\HttpKernel\Exception\HttpException */ protected function createGateUnauthorizedException($ability, $arguments) {
Update AuthorizesRequests.php
laravel_framework
train
php
ee6d4b2fb01045c71fab66c28b38c63a329df462
diff --git a/app/lib/actions/katello/host/register.rb b/app/lib/actions/katello/host/register.rb index <HASH>..<HASH> 100644 --- a/app/lib/actions/katello/host/register.rb +++ b/app/lib/actions/katello/host/register.rb @@ -67,7 +67,8 @@ module Actions if smart_proxy smart_proxy.content_host = system.content_host - smart_proxy.organizations << system.organization unless smart_proxy.organizations.include?(system.organization) + org = system.content_facet.lifecycle_environment.organization + smart_proxy.organizations << org unless smart_proxy.organizations.include?(org) smart_proxy.save! end end
Fixes #<I> - unable to register with sub-man after puppet registration (#<I>) The previous commit for this did not fix the issue properly.
Katello_katello
train
rb
4cc20fe591b113aeaf37fdda238d43fa6e4ce86f
diff --git a/libraries/lithium/util/Set.php b/libraries/lithium/util/Set.php index <HASH>..<HASH> 100644 --- a/libraries/lithium/util/Set.php +++ b/libraries/lithium/util/Set.php @@ -364,22 +364,22 @@ class Set { public static function merge($arr1, $arr2 = null) { $args = func_get_args(); - if (!isset($r)) { - $r = (array) current($args); + if (!isset($result)) { + $result = (array) current($args); } while (($arg = next($args)) !== false) { - foreach ((array) $arg as $key => $val) { - if (is_array($val) && isset($r[$key]) && is_array($r[$key])) { - $r[$key] = static::merge($r[$key], $val); + foreach ((array) $arg as $key => $val) { + if (is_array($val) && isset($result[$key]) && is_array($result[$key])) { + $result[$key] = static::merge($result[$key], $val); } elseif (is_int($key)) { - $r[] = $val; + $result[] = $val; } else { - $r[$key] = $val; + $result[$key] = $val; } } } - return $r; + return $result; } /**
Renaming variables for clarity in `util\Set::merge()`.
UnionOfRAD_framework
train
php
669baeff07fd20e4f1c2b50d4030dcadcaa9c9ea
diff --git a/src/main/java/nl/glasoperator/fitnesse/vodafone/VodafoneBrowserTest.java b/src/main/java/nl/glasoperator/fitnesse/vodafone/VodafoneBrowserTest.java index <HASH>..<HASH> 100644 --- a/src/main/java/nl/glasoperator/fitnesse/vodafone/VodafoneBrowserTest.java +++ b/src/main/java/nl/glasoperator/fitnesse/vodafone/VodafoneBrowserTest.java @@ -63,7 +63,7 @@ public class VodafoneBrowserTest extends BrowserTest { } public String errorsOnOthersThan(String label) { - String result = ""; + String result = null; By otherErrorXPath = getSeleniumHelper() .byXpath("//label[text() != '%s']/following-sibling::div/p[@class='help-block' and normalize-space(text()) != '']", label); @@ -82,7 +82,7 @@ public class VodafoneBrowserTest extends BrowserTest { } public String errorStyleOnOthersThan(String label) { - String result = ""; + String result = null; By otherErrorXPath = getSeleniumHelper() .byXpath("//div[contains(@class, 'error') and label[text() != '%s']]/label", label);
Slim scripts can have an expected value for null, but not for blank, so let's use a null value instead of "" as return when there are no others
fhoeben_hsac-fitnesse-fixtures
train
java
d4c15e10eaf8fb6fc6fe3acef770b275e287134e
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ setup(name='tftpy', 'Environment :: Console', 'Environment :: No Input/Output (Daemon)', 'Intended Audience :: Developers', - 'License :: OSI-Approved Open Source :: MIT License', + 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Topic :: Internet', ]
Fixing the license in the setup.py
msoulier_tftpy
train
py
76c41bca5772503d4392531b4e094144e0e3a6d9
diff --git a/pycoin/coins/bitcoin/SolutionChecker.py b/pycoin/coins/bitcoin/SolutionChecker.py index <HASH>..<HASH> 100644 --- a/pycoin/coins/bitcoin/SolutionChecker.py +++ b/pycoin/coins/bitcoin/SolutionChecker.py @@ -378,7 +378,7 @@ class BitcoinSolutionChecker(SolutionChecker): tx_context = TxContext() tx_context.lock_time = self.tx.lock_time tx_context.version = self.tx.version - tx_context.puzzle_script = self.tx.unspents[tx_in_idx].script + tx_context.puzzle_script = b'' if self.tx.missing_unspent(tx_in_idx) else self.tx.unspents[tx_in_idx].script tx_context.solution_script = tx_in.script tx_context.witness_solution_stack = tx_in.witness tx_context.sequence = tx_in.sequence
Deal with missing unspents case.
richardkiss_pycoin
train
py
cae4f6151df8c9a8802bd176a8978ce47d789c14
diff --git a/jwt/options.go b/jwt/options.go index <HASH>..<HASH> 100644 --- a/jwt/options.go +++ b/jwt/options.go @@ -222,6 +222,10 @@ func WithFormKey(v string) ParseRequestOption { // // This is sometimes important when a JWT consumer does not understand that // the "aud" claim can actually take the form of an array of strings. +// +// The default value is `false`, which means that "aud" claims are always +// rendered as a arrays of strings. This setting has a global effect, +// and will change the behavior for all JWT serialization. func WithFlattenAudience(v bool) GlobalOption { return &globalOption{option.New(identFlattenAudience{}, v)} }
be more explicit about the effects being global
lestrrat-go_jwx
train
go
d9bc38ee6ec30e659509c767059384021226031a
diff --git a/tests/HttpKernel/PackageBuilderTestKernel.php b/tests/HttpKernel/PackageBuilderTestKernel.php index <HASH>..<HASH> 100644 --- a/tests/HttpKernel/PackageBuilderTestKernel.php +++ b/tests/HttpKernel/PackageBuilderTestKernel.php @@ -12,6 +12,6 @@ final class PackageBuilderTestKernel extends AbstractSymplifyKernel public function createFromConfigs(array $configFiles): ContainerInterface { $configFiles[] = __DIR__ . '/../config/test_config.php'; - return $this->create($configFiles, [], []); + return $this->create($configFiles); } }
[SymplifyKernel] Allow empty compiler passes and extensions (#<I>)
Symplify_PackageBuilder
train
php
4bb425bf55471994e1e42c4be3b6e1f0d2f5d4f3
diff --git a/tests/Kwc/Trl/ImageEnlarge/Test.php b/tests/Kwc/Trl/ImageEnlarge/Test.php index <HASH>..<HASH> 100644 --- a/tests/Kwc/Trl/ImageEnlarge/Test.php +++ b/tests/Kwc/Trl/ImageEnlarge/Test.php @@ -20,6 +20,8 @@ class Kwc_Trl_ImageEnlarge_Test extends Kwc_TestAbstract { parent::setUp('Kwc_Trl_ImageEnlarge_Root'); + $this->markTestIncomplete("properly fixed in 3.3"); + //master image Kwf_Model_Abstract::getInstance('Kwc_Trl_ImageEnlarge_ImageEnlarge_TestModel') ->getProxyModel()->setData(array(
disable test, it's fixed in <I>
koala-framework_koala-framework
train
php
95e3e3e3dc599cd3a3c26fa17f1196bffd867656
diff --git a/lib/Voice/AudioEncoder.js b/lib/Voice/AudioEncoder.js index <HASH>..<HASH> 100644 --- a/lib/Voice/AudioEncoder.js +++ b/lib/Voice/AudioEncoder.js @@ -161,6 +161,12 @@ var AudioEncoder = (function () { resolve(data); }); + this.volume.once("end", function () { + killProcess(); + + reject("end"); + }); + this.volume.on("end", function () { killProcess(); diff --git a/src/Voice/AudioEncoder.js b/src/Voice/AudioEncoder.js index <HASH>..<HASH> 100644 --- a/src/Voice/AudioEncoder.js +++ b/src/Voice/AudioEncoder.js @@ -150,6 +150,12 @@ export default class AudioEncoder { resolve(data); }); + this.volume.once("end", () => { + killProcess(); + + reject("end"); + }); + this.volume.on("end", () => { killProcess();
Another FFMPEG fix attempt (#<I>) * Fix my very silly mistake * Another FFMPEG issue fix attempt * Add a missing semicolon Yes, I really did make a commit just for this. :)
discordjs_discord.js
train
js,js
fb5d0e1ffc79606eefddae550b9b1044f4ccc63b
diff --git a/components/tabs/Tabs.js b/components/tabs/Tabs.js index <HASH>..<HASH> 100644 --- a/components/tabs/Tabs.js +++ b/components/tabs/Tabs.js @@ -64,6 +64,7 @@ const factory = (Tab, TabContent, FontIcon) => { componentWillUnmount() { window.removeEventListener('resize', this.handleResize); clearTimeout(this.resizeTimeout); + if (this.updatePointerAnimationFrame) cancelAnimationFrame(this.updatePointerAnimationFrame); } handleHeaderClick = (idx) => { @@ -82,7 +83,7 @@ const factory = (Tab, TabContent, FontIcon) => { updatePointer = (idx) => { if (this.navigationNode && this.navigationNode.children[idx]) { - requestAnimationFrame(() => { + this.updatePointerAnimationFrame = requestAnimationFrame(() => { const nav = this.navigationNode.getBoundingClientRect(); const label = this.navigationNode.children[idx].getBoundingClientRect(); const scrollLeft = this.navigationNode.scrollLeft;
requestAnimationFrame will only trigger if the browser window is visible. If the browser tab is put to the background, requestAnimationFrame will trigger when the tab returned to the foreground. When the Tabs Component is removed from the DOM when in the background, the requestAnimationFrame must be canceled to prevent attempting to use a unmounted Component. (#<I>)
react-toolbox_react-toolbox
train
js
8f59c3560555052b43d379d40dc44f7921510393
diff --git a/tests/unittest/pywbem/test_indicationlistener.py b/tests/unittest/pywbem/test_indicationlistener.py index <HASH>..<HASH> 100755 --- a/tests/unittest/pywbem/test_indicationlistener.py +++ b/tests/unittest/pywbem/test_indicationlistener.py @@ -454,7 +454,7 @@ def test_WBEMListener_port_in_use(): # Don't use this port in other tests, to be on the safe side # as far as port reuse is concerned. - http_port = '59999' + http_port = '50001' exp_exc_type = ListenerPortError @@ -493,7 +493,7 @@ def test_WBEMListener_context_mgr(): # Don't use this port in other tests, to be on the safe side # as far as port reuse is concerned. - http_port = '59998' + http_port = '50002' # The code to be tested (is the context manager) with WBEMListener(host, http_port) as listener1:
Changed test listener ports to <I>/2
pywbem_pywbem
train
py
7af59f8de706cc39d96cecc32531c6b0ab0ecc59
diff --git a/src/speech_rules/semantic_tree_rules.js b/src/speech_rules/semantic_tree_rules.js index <HASH>..<HASH> 100644 --- a/src/speech_rules/semantic_tree_rules.js +++ b/src/speech_rules/semantic_tree_rules.js @@ -469,7 +469,7 @@ sre.SemanticTreeRules.initSemanticRules_ = function() { defineRule( 'root', 'default.default', '[t] "root of order"; [n] children/*[1];' + - '[t] "over"; [n] children/*[1] (rate:0.35); [p] (pause:400)', + '[t] "over"; [n] children/*[2] (rate:0.35); [p] (pause:400)', 'self::root'); defineRule(
Fixes bug in semantics rules.
zorkow_speech-rule-engine
train
js
1dfdd2bce0dacf9221f6b22151c1bc6aa8f08b80
diff --git a/rapidoid-app/src/test/java/org/rapidoid/app/example/SearchScreen.java b/rapidoid-app/src/test/java/org/rapidoid/app/example/SearchScreen.java index <HASH>..<HASH> 100644 --- a/rapidoid-app/src/test/java/org/rapidoid/app/example/SearchScreen.java +++ b/rapidoid-app/src/test/java/org/rapidoid/app/example/SearchScreen.java @@ -27,7 +27,7 @@ import org.rapidoid.http.HttpExchange; public class SearchScreen { public Object content(HttpExchange x) { - return h1("Search Results for: ", b(x.param("q"))); + return h1("Search results for ", b(x.param("q")), ":"); } }
Minor content header improvements in the search screen.
rapidoid_rapidoid
train
java
3e4187568bc363ab9d3fb37bea0afcbe09cf598e
diff --git a/middleman-core/lib/middleman-core/extensions/minify_css.rb b/middleman-core/lib/middleman-core/extensions/minify_css.rb index <HASH>..<HASH> 100644 --- a/middleman-core/lib/middleman-core/extensions/minify_css.rb +++ b/middleman-core/lib/middleman-core/extensions/minify_css.rb @@ -1,3 +1,4 @@ +require 'active_support/core_ext/object/try' require 'memoist' require 'middleman-core/contracts' diff --git a/middleman-core/lib/middleman-core/extensions/minify_javascript.rb b/middleman-core/lib/middleman-core/extensions/minify_javascript.rb index <HASH>..<HASH> 100644 --- a/middleman-core/lib/middleman-core/extensions/minify_javascript.rb +++ b/middleman-core/lib/middleman-core/extensions/minify_javascript.rb @@ -1,3 +1,4 @@ +require 'active_support/core_ext/object/try' require 'middleman-core/contracts' require 'memoist'
require the `try` core extension (#<I>)
middleman_middleman
train
rb,rb
ef5ca1af5dc14c21d1df3af384542024fc99705f
diff --git a/lxd/network/network_load.go b/lxd/network/network_load.go index <HASH>..<HASH> 100644 --- a/lxd/network/network_load.go +++ b/lxd/network/network_load.go @@ -23,9 +23,9 @@ func LoadByType(driverType string) (Type, error) { return n, nil } -// LoadByName loads an instantiated network from the database by name. -func LoadByName(s *state.State, project string, name string) (Network, error) { - id, netInfo, err := s.Cluster.GetNetworkInAnyState(project, name) +// LoadByName loads an instantiated network from the database by project and name. +func LoadByName(s *state.State, projectName string, name string) (Network, error) { + id, netInfo, err := s.Cluster.GetNetworkInAnyState(projectName, name) if err != nil { return nil, err } @@ -36,7 +36,7 @@ func LoadByName(s *state.State, project string, name string) (Network, error) { } n := driverFunc() - n.init(s, id, project, name, netInfo.Type, netInfo.Description, netInfo.Config, netInfo.Status) + n.init(s, id, projectName, name, netInfo.Type, netInfo.Description, netInfo.Config, netInfo.Status) return n, nil }
lxd/network/network/load: Renames project arg to projectName for clarity Improves comments.
lxc_lxd
train
go
df45a9ad31e356352fa530dd9403f8abfa210f32
diff --git a/product/selectors/product.js b/product/selectors/product.js index <HASH>..<HASH> 100644 --- a/product/selectors/product.js +++ b/product/selectors/product.js @@ -401,3 +401,20 @@ export const getProductMetadata = createSelector( getProductById, product => product.productData.metadata || null ); + +/** + * Indicates whether a product is a base product or not + * @param {Object} state The current application state. + * @param {string} productId A product id. + * @return {boolean|null} + */ +export const getIsBaseProduct = createSelector( + getProductById, + (product) => { + if (!product.productData || product.isFetching) { + return null; + } + + return !product.productData.baseProductId; + } +);
CON-<I>: Users can add products to cart from favorite list - create selector to find out whether a product is a base product or not
shopgate_pwa
train
js
feb56298dd6a47f996439ae0ad9a5941a88e91df
diff --git a/etcdserver/v3_server.go b/etcdserver/v3_server.go index <HASH>..<HASH> 100644 --- a/etcdserver/v3_server.go +++ b/etcdserver/v3_server.go @@ -441,9 +441,10 @@ func (s *EtcdServer) Authenticate(ctx context.Context, r *pb.AuthenticateRequest return nil, err } + // internalReq doesn't need to have Password because the above s.AuthStore().CheckPassword() already did it. + // In addition, it will let a WAL entry not record password as a plain text. internalReq := &pb.InternalAuthenticateRequest{ Name: r.Name, - Password: r.Password, SimpleToken: st, }
etcdserver: don't let InternalAuthenticateRequest have password (#<I>)
etcd-io_etcd
train
go
38d0df05e05e509c3754f34457fbb243ff20b15f
diff --git a/build/changelog.py b/build/changelog.py index <HASH>..<HASH> 100755 --- a/build/changelog.py +++ b/build/changelog.py @@ -102,7 +102,7 @@ def get_github_id(commit_message, commit_id, token): def mention_author(commit_message, commit_id, token): username = get_github_id(commit_message, commit_id, token) if username not in org_members_usernames: - return "authored by @[{author}](https://github.com/{author})".format(author=username) + return "authored by @{author}".format(author=username) return "" def get_issue_reporter(issue_id, token): @@ -110,7 +110,7 @@ def get_issue_reporter(issue_id, token): issue_data = fetch(url, token) username = issue_data.get("user", "").get("login", "") if username not in org_members_usernames: - return "reported by @[{reporter}](https://github.com/{reporter})".format(reporter=username) + return "reported by @{reporter}".format(reporter=username) return "" def fixes_issue_id(commit_message):
cicd: Update release notes mentions (#<I>) Since Github will automatically link to user profiles mentioned by their username, _and_ create a "Contributors" section for the release notes with user avatars, it seems good to follow that convention.
open-policy-agent_opa
train
py
e41d7a2f2ed6cfa328fc4339661bb13b835c54a6
diff --git a/lib/rom/support/class_macros.rb b/lib/rom/support/class_macros.rb index <HASH>..<HASH> 100644 --- a/lib/rom/support/class_macros.rb +++ b/lib/rom/support/class_macros.rb @@ -7,8 +7,6 @@ module ROM args.each do |name| mod.module_eval <<-RUBY, __FILE__, __LINE__ + 1 - @@macros = [#{args.map(&:inspect).join(', ')}] - def #{name}(value = Undefined) if value == Undefined @#{name} @@ -16,21 +14,25 @@ module ROM @#{name} = value end end + RUBY + end - def inherited(klass) - super - macros.each do |name| - klass.public_send(name, public_send(name)) - end - end + mod.module_eval <<-RUBY, __FILE__, __LINE__ + 1 + @@macros = #{args.inspect} - def macros - @@macros || [] + def inherited(klass) + super + macros.each do |name| + klass.public_send(name, public_send(name)) end - RUBY + end - extend(mod) - end + def macros + @@macros + end + RUBY + + extend(mod) end end end
Fix code generation of ClassMacros Before this commit ClassMacros defined one `inherited` hook once per macro. This commit separates the definition of accessors and other definitions.
rom-rb_rom
train
rb
c4c228ebeea472e7586632aca49904fa4c607274
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index <HASH>..<HASH> 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -11,7 +11,6 @@ require "rspec/rails" require 'rspec/active_model/mocks' require "capybara/rails" require 'factory_bot' -require 'alchemy/test_support/controller_requests' require 'alchemy/test_support/integration_helpers' require 'alchemy/devise/test_support/factories' @@ -29,7 +28,6 @@ RSpec.configure do |config| config.infer_spec_type_from_file_location! config.use_transactional_fixtures = true config.include Devise::TestHelpers, :type => :controller - config.include Alchemy::TestSupport::ControllerRequests, :type => :controller config.include Alchemy::Engine.routes.url_helpers config.include FactoryBot::Syntax::Methods config.include ActiveJob::TestHelper
Remove alchemy controller requests test helper This helper does not exist in latest Alchemy version any more and is not used anyway
AlchemyCMS_alchemy-devise
train
rb
fd6ca1a33b53df6574241cd8882cafca90cfb9ae
diff --git a/tests/mocha-reporter.js b/tests/mocha-reporter.js index <HASH>..<HASH> 100644 --- a/tests/mocha-reporter.js +++ b/tests/mocha-reporter.js @@ -75,7 +75,9 @@ module.exports = class ServerlessSpec extends Spec { try { removeSync(tmpDirCommonPath); } catch (error) { - if (error.code !== 'ENOENT') throw error; + if (error.code !== 'ENOENT' || (error.code !== 'EPERM' || process.platform !== 'win32')) { + throw error; + } } if (process.version[1] < 8) return; // Async leaks detector is not reliable in Node.js v6
Do not crash if tmp dir delete fails on win
serverless_serverless
train
js
c6cb327ea254940db80ad131dda22027d93ac99a
diff --git a/anyvcs/common.py b/anyvcs/common.py index <HASH>..<HASH> 100644 --- a/anyvcs/common.py +++ b/anyvcs/common.py @@ -301,7 +301,18 @@ class VCSRepo(object): @abstractmethod def canonical_rev(self, rev): - """Get the canonical revision identifier""" + """ Get the canonical revision identifier + + :param rev: The revision to canonicalize. + :returns: The canonicalized revision + + The canonical revision is the revision which is natively supported by + the underlying VCS type. In some cases, anyvcs may annotate a revision + identifier to also encode branch information which is not safe to use + directly with the VCS itself (e.g. as created by :meth:`compose_rev`). + This method is a means of converting back to canonical form. + + """ raise NotImplementedError @abstractmethod
fill out docstring of canonical_rev() This is to clear up the difference between compose_rev() and canonical_rev().
ScottDuckworth_python-anyvcs
train
py
747ef8264be3ac3f4d47cea4c9dfe7ffbc6d2f40
diff --git a/src/components/button/button.js b/src/components/button/button.js index <HASH>..<HASH> 100644 --- a/src/components/button/button.js +++ b/src/components/button/button.js @@ -76,9 +76,13 @@ function MdButtonDirective($mdButtonInkRipple, $mdTheming, $mdAria, $timeout) { } function getTemplate(element, attr) { - return isAnchor(attr) ? - '<a class="md-button" ng-transclude></a>' : - '<button class="md-button" ng-transclude></button>'; + if (isAnchor(attr)) { + return '<a class="md-button" ng-transclude></a>'; + } else { + //If buttons don't have type="button", they will submit forms automatically. + var btnType = (typeof attr.type === 'undefined') ? 'button' : attr.type; + return '<button class="md-button" type="' + btnType + '" ng-transclude></button>'; + } } function postLink(scope, element, attr) {
update(button): add default type to buttons to prevent autosubmission of forms BREAKING CHANGE: Buttons with undefined `type` will have type="button" assigned, so forms may not submit as previously expected. Before: ```html <button class="md-button" ng-transclude> ``` will become ```html <button type="button" class="md-button" ng-transclude> ``` Fixes #<I>. Closes #<I>.
angular_material
train
js
bd242236090b4b16c3fdd634e1674041c890d73e
diff --git a/lib/moped/socket.rb b/lib/moped/socket.rb index <HASH>..<HASH> 100644 --- a/lib/moped/socket.rb +++ b/lib/moped/socket.rb @@ -1,3 +1,5 @@ +require "timeout" + module Moped # @api private @@ -38,23 +40,11 @@ module Moped def connect return true if connection - socket = ::Socket.new ::Socket::AF_INET, ::Socket::SOCK_STREAM, 0 - sockaddr = ::Socket.pack_sockaddr_in(port, host) - - begin - socket.connect_nonblock sockaddr - rescue IO::WaitWritable, Errno::EINPROGRESS - begin - IO.select nil, [socket], nil, 0.5 - socket.connect_nonblock sockaddr - rescue Errno::EISCONN # we're connected - rescue - socket.close rescue nil # jruby raises EBADF - return false - end + Timeout::timeout 0.5 do + @connection = TCPSocket.new(host, port) end - - @connection = socket + rescue Errno::ECONNREFUSED, Timeout::Error + return false end # @return [true, false] whether this socket connection is alive
Use Timeout instead of connect_nonblock Since we're running on jruby and <I>, we don't need to worry about broken Timeout implementations.
mongoid_moped
train
rb
99240e3c3c65d15b04fc768989bc489b37a09bc9
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( author_email='[email protected]', url='https://github.com/bastibe/PySoundFile', keywords=['audio', 'libsndfile'], - py_modules=['pysoundio'], + py_modules=['pysoundfile'], license='BSD 3-Clause License', requires=['numpy', 'cffi (>=0.6)'],
Fixed copy-and-paste bug in setup.py I missed one entry of pysoundio in the pysoundfile setup.py
bastibe_SoundFile
train
py
df5d7ddd84f4d8b5e6ba3b57bb74317f6ff56d03
diff --git a/cumulusci/tasks/robotframework/debugger/ui.py b/cumulusci/tasks/robotframework/debugger/ui.py index <HASH>..<HASH> 100644 --- a/cumulusci/tasks/robotframework/debugger/ui.py +++ b/cumulusci/tasks/robotframework/debugger/ui.py @@ -1,7 +1,6 @@ from __future__ import print_function import cmd import textwrap -import os import sys import re import pdb @@ -27,12 +26,8 @@ class DebuggerCli(cmd.Cmd, object): self.listener = listener self.builtin = BuiltIn() - if os.getenv("EMACS", False): - # Running a shell inside of emacs sets this environment - # variable. Handy, because when running in a shell inside emacs - # we need to turn off raw input - self.use_rawinput = False + # some simple aliases. self.do_c = self.do_continue self.do_l = self.do_locate_elements self.do_s = self.do_step
Removed special handling of emacs; it's not needed and wasn't working. This was code copied from an ancient project of mine from a few years ago.
SFDO-Tooling_CumulusCI
train
py
3daf9ce3cb7a927933bf913c5ed0e90bcbe64412
diff --git a/snap7/__init__.py b/snap7/__init__.py index <HASH>..<HASH> 100644 --- a/snap7/__init__.py +++ b/snap7/__init__.py @@ -6,5 +6,6 @@ import snap7.client as client import snap7.error as error import snap7.types as types import snap7.common as common +import snap7.s7util as s7util __version__ = '0.2'
added missing s7util to package
gijzelaerr_python-snap7
train
py
5b3989a37395ee327138f36ea96b481c0d62ac5c
diff --git a/src/Api/Request.php b/src/Api/Request.php index <HASH>..<HASH> 100644 --- a/src/Api/Request.php +++ b/src/Api/Request.php @@ -305,17 +305,7 @@ class Request */ protected function getContentTypeHeader() { - if ($this->filePathToUpload) { - $delimiter = '-------------' . uniqid(); - $this->buildFilePostData($delimiter); - - return [ - 'Content-Type: multipart/form-data; boundary=' . $delimiter, - 'Content-Length: ' . strlen($this->postFileData) - ]; - } - - return ['Content-Type: application/x-www-form-urlencoded; charset=UTF-8;']; + return $this->filePathToUpload ? $this->makeHeadersForUpload() : ['Content-Type: application/x-www-form-urlencoded; charset=UTF-8;']; } /** @@ -334,4 +324,15 @@ class Request return $this; } + + protected function makeHeadersForUpload() + { + $delimiter = '-------------' . uniqid(); + $this->buildFilePostData($delimiter); + + return [ + 'Content-Type: multipart/form-data; boundary=' . $delimiter, + 'Content-Length: ' . strlen($this->postFileData) + ]; + } }
upd: Request refactoring
seregazhuk_php-pinterest-bot
train
php
c81ac91b851819023a8b5459f21492b316a610e8
diff --git a/tests/FormTest.php b/tests/FormTest.php index <HASH>..<HASH> 100644 --- a/tests/FormTest.php +++ b/tests/FormTest.php @@ -45,7 +45,7 @@ EOT public function testReferenceByName() { $this->expectOutputString(<<<EOT -<input type="text" name="mytextfield"> +<input type="text" name="mytextfield" id="mytextfield"> EOT ); $form = new Form; @@ -75,5 +75,18 @@ EOT $form[] = new Formulaic\File; echo $form; } + + public function testNamedFormInherits() + { + $this->expectOutputString(<<<EOT +<form method="get" name="test" id="test"> +<div><input type="text" name="bla" id="test-bla"></div> +</form> +EOT + ); + $form = new NamedForm; + $form[] = new Formulaic\Text('bla'); + echo $form; + } }
text inheritance, and fix test with named field that now gets an id too
monolyth-php_formulaic
train
php
56d78d857b3cfb378fdc7d66b3ccf72efe6d8f3a
diff --git a/endnote.php b/endnote.php index <HASH>..<HASH> 100644 --- a/endnote.php +++ b/endnote.php @@ -27,6 +27,7 @@ class PHPEndNote { * * notes - String (optional) * * isbn - String (optional) * * label - String (optional) + * * caption - String (optional) * * @var array */ @@ -101,6 +102,7 @@ class PHPEndNote { 'abstract' => 'abstract', 'isbn' => 'isbn', 'label' => 'label', + 'caption' => 'caption', ) as $enkey => $ourkey) $out .= "<$enkey><style face=\"normal\" font=\"default\" size=\"100%\">" . (isset($ref[$ourkey]) && $ref[$ourkey] ? $ref[$ourkey] : '') . "</style></$enkey>"; @@ -174,6 +176,8 @@ class PHPEndNote { 'isbn' => 'isbn', 'notes' => 'notes', 'research-notes' => 'notes', + 'label' => 'label', + 'caption' => 'caption', ) as $enkey => $ourkey) { if (! $find = $record->xpath("$enkey/style/text()") ) continue;
Added support for 'caption' property BUGFIX: 'label' not imported (was exported ok though)
hash-bang_RefLib
train
php
dca192e0b3e4e7d9981a9466ce4a14211a5fb735
diff --git a/src/Ractive/config/custom/css/css.js b/src/Ractive/config/custom/css/css.js index <HASH>..<HASH> 100755 --- a/src/Ractive/config/custom/css/css.js +++ b/src/Ractive/config/custom/css/css.js @@ -90,7 +90,9 @@ export function initCSS(options, target, proto) { css = evalCSS(target, css); } - const def = (target._cssDef = { transform: !options.noCssTransform }); + const def = { transform: !options.noCssTransform }; + + defineProperty(target, '_cssDef', { configurable: true, value: def }); defineProperty(target, 'css', { get() { diff --git a/src/Ractive/static/styles.js b/src/Ractive/static/styles.js index <HASH>..<HASH> 100644 --- a/src/Ractive/static/styles.js +++ b/src/Ractive/static/styles.js @@ -15,7 +15,7 @@ export function addStyle(id, css) { if (!this._cssDef) { Object.defineProperty(this, '_cssDef', { - configurable: false, + configurable: true, writable: false, value: { transform: false,
make Ractive._cssDef configurable for components
ractivejs_ractive
train
js,js
d86007f1a9751c18b306a6b932a0932f239818ca
diff --git a/lib/zertico/version.rb b/lib/zertico/version.rb index <HASH>..<HASH> 100644 --- a/lib/zertico/version.rb +++ b/lib/zertico/version.rb @@ -1,3 +1,3 @@ module Zertico - VERSION = '0.3.1' + VERSION = '0.4.0' end \ No newline at end of file
Bumping version to <I>
zertico_zertico
train
rb
a982b118dbd3c2246e157e9ab13765953b514ff0
diff --git a/xchange-examples/src/main/java/org/knowm/xchange/examples/btcturk/trade/BTCTrukTradeDemo.java b/xchange-examples/src/main/java/org/knowm/xchange/examples/btcturk/trade/BTCTrukTradeDemo.java index <HASH>..<HASH> 100644 --- a/xchange-examples/src/main/java/org/knowm/xchange/examples/btcturk/trade/BTCTrukTradeDemo.java +++ b/xchange-examples/src/main/java/org/knowm/xchange/examples/btcturk/trade/BTCTrukTradeDemo.java @@ -18,7 +18,7 @@ import org.knowm.xchange.service.marketdata.MarketDataService; /** @author mertguner */ public class BTCTrukTradeDemo { - public static void main(String[] args) { + public static void main(String[] args) throws IOException { // Use the factory to get BTCTurk exchange API using default settings Exchange exchange = BTCTurkDemoUtils.createExchange();
Update BTCTrukTradeDemo.java
knowm_XChange
train
java
5bacd5731d39eecd4dd44a63e89fe2f3366d692a
diff --git a/src/sap.m/src/sap/m/MessageView.js b/src/sap.m/src/sap/m/MessageView.js index <HASH>..<HASH> 100644 --- a/src/sap.m/src/sap/m/MessageView.js +++ b/src/sap.m/src/sap/m/MessageView.js @@ -42,7 +42,7 @@ sap.ui.define([ * A {@link sap.m.MessageView} is used to display a summarized list of different types of messages (errors, warnings, success and information). * It provides a handy and systemized way to navigate and explore details for every message. * It is meant to be embedded into container controls. - * If the MessageView contains only one item, its details page will be displayed initially. + * If the MessageView contains only one item, which has either description, markupDescription or longTextUrl, its details page will be displayed initially. * <br><br> * <strong>Notes:</strong> * <ul> @@ -274,7 +274,7 @@ sap.ui.define([ this._oListHeader.insertContent(headerButton, 2); } - if (aItems.length === 1) { + if (aItems.length === 1 && this._oLists.all.getItems()[0].getType() === ListType.Navigation) { this._fnHandleForwardNavigation(this._oLists.all.getItems()[0], "show");
[FIX] sap.m.MessageView: No initial navigation when there is only one item without description Change-Id: Ic<I>b<I>ac<I>eb<I>d7fee<I>bdabaeb BCP: <I>
SAP_openui5
train
js
1ead43c88cfacc0d30e186cc3782d31b4e9f5764
diff --git a/cmd/geth/js.go b/cmd/geth/js.go index <HASH>..<HASH> 100644 --- a/cmd/geth/js.go +++ b/cmd/geth/js.go @@ -245,7 +245,7 @@ func (self *jsre) batch(statement string) { func (self *jsre) welcome() { self.re.Run(` (function () { - console.log('instance: ' + web3.version.client); + console.log('instance: ' + web3.version.node); console.log(' datadir: ' + admin.datadir); console.log("coinbase: " + eth.coinbase); var ts = 1000 * eth.getBlock(eth.blockNumber).timestamp;
console: fix instance name printed incorrect on start
ethereum_go-ethereum
train
go
d92a8c15315310aa3f726d9bb646d9cc3f921d24
diff --git a/packages/container/lib/container.js b/packages/container/lib/container.js index <HASH>..<HASH> 100644 --- a/packages/container/lib/container.js +++ b/packages/container/lib/container.js @@ -568,7 +568,7 @@ function destroyDestroyables(container) { let key = keys[i]; let value = cache[key]; - if (container.registry.getOption(key, 'instantiate') !== false && value.destroy) { + if (shouldInstantiate(container, key) && value.destroy) { value.destroy(); } }
reusing `shouldInstantiate`
emberjs_ember.js
train
js
64f573cca512d90e70663d0ac6ddfa7512a7372a
diff --git a/src/dawguk/GarminConnect.php b/src/dawguk/GarminConnect.php index <HASH>..<HASH> 100755 --- a/src/dawguk/GarminConnect.php +++ b/src/dawguk/GarminConnect.php @@ -317,7 +317,7 @@ class GarminConnect public function getWeightData($from = '2019-01-01', $until = '2099-12-31') { $intDateFrom = (strtotime($strFrom) + 86400) * 1000; - $date_until = strtotime($until) * 1000; + $intDateUntil = strtotime($strUntil) * 1000; $arrParams = array( 'from' => $date_from,
Update src/dawguk/GarminConnect.php
dawguk_php-garmin-connect
train
php
a6e8e49a1d44a2a92ebed790871bf962a7bdcc0f
diff --git a/templates/response_parser_template.php b/templates/response_parser_template.php index <HASH>..<HASH> 100644 --- a/templates/response_parser_template.php +++ b/templates/response_parser_template.php @@ -171,7 +171,7 @@ class PHPFHIRResponseParser // Ignore properties prefixed with an underscore // Parsing the document fails with these properties - if (false !== strpos(\$k, '_')) { + if (0 === strpos(\$k, '_')) { continue; } elseif (!isset(\$properties[\$k])) { \$this->_triggerPropertyNotFoundError(\$fhirElementName, \$k);
only match prefixes with an underscore
dcarbone_php-fhir
train
php
bba96f59f81f9aa5203ea59a73f42c37becce73f
diff --git a/extensions-core/datasketches/src/main/java/io/druid/query/aggregation/datasketches/theta/SynchronizedUnion.java b/extensions-core/datasketches/src/main/java/io/druid/query/aggregation/datasketches/theta/SynchronizedUnion.java index <HASH>..<HASH> 100644 --- a/extensions-core/datasketches/src/main/java/io/druid/query/aggregation/datasketches/theta/SynchronizedUnion.java +++ b/extensions-core/datasketches/src/main/java/io/druid/query/aggregation/datasketches/theta/SynchronizedUnion.java @@ -79,7 +79,7 @@ public class SynchronizedUnion implements Union } @Override - public void update(char[] chars) + public synchronized void update(char[] chars) { delegate.update(chars); } @@ -115,7 +115,7 @@ public class SynchronizedUnion implements Union } @Override - public boolean isSameResource(Memory mem) + public synchronized boolean isSameResource(Memory mem) { return delegate.isSameResource(mem); }
added missing synchronized keyword (#<I>) * added missing synchronized keyword * added missing synchronized keyword
apache_incubator-druid
train
java
da8bfa04a5f7c89373a8c64d99d699ae547c72e6
diff --git a/generators/server/index.js b/generators/server/index.js index <HASH>..<HASH> 100644 --- a/generators/server/index.js +++ b/generators/server/index.js @@ -429,6 +429,10 @@ module.exports = class JHipsterServerGenerator extends BaseBlueprintGenerator { dockerAwaitScripts.push( 'echo "Waiting for jhipster-registry to start" && wait-on http-get://localhost:8761/management/health && echo "jhipster-registry started"' ); + } else if (dockerConfig === 'keycloak') { + dockerAwaitScripts.push( + 'echo "Waiting for keycloak to start" && wait-on http-get://localhost:9080/auth/realms/jhipster -t 30000 && echo "keycloak started" || echo "keycloak not running, make sure oauth2 server is running"' + ); } scriptsStorage.set(`docker:${dockerConfig}:up`, `docker-compose -f ${dockerFile} up -d`);
Wait for keycloak to start.
jhipster_generator-jhipster
train
js
d79910783358d09afe462fe480990d0b125d6733
diff --git a/myfitnesspal/note.py b/myfitnesspal/note.py index <HASH>..<HASH> 100644 --- a/myfitnesspal/note.py +++ b/myfitnesspal/note.py @@ -1,7 +1,9 @@ import datetime +from six import text_type -class Note(unicode): + +class Note(text_type): def __new__(cls, note_data): self = super(Note, cls).__new__(cls, note_data['body']) self._note_data = note_data
[#<I>] Fix Python3x support for returned notes.
coddingtonbear_python-myfitnesspal
train
py
201dc9eef2f2723118b48728c6955556f97e9743
diff --git a/tinymongo/tinymongo.py b/tinymongo/tinymongo.py index <HASH>..<HASH> 100644 --- a/tinymongo/tinymongo.py +++ b/tinymongo/tinymongo.py @@ -115,7 +115,7 @@ class TinyMongoCollection(object): def count(self): if self.table is None:self.buildTable() - return self.table.count(self.lastcond) + return len(self.table) class TinyMongoCursor(object):
Count command should get all documents. If we use lastcond, the user does not know why. The pymongo specs at <URL>
schapman1974_tinymongo
train
py
2db4f51d8f6f292053ce24da32e5fdf78a99085a
diff --git a/src/main/java/org/zalando/fahrschein/NakadiClient.java b/src/main/java/org/zalando/fahrschein/NakadiClient.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/zalando/fahrschein/NakadiClient.java +++ b/src/main/java/org/zalando/fahrschein/NakadiClient.java @@ -50,12 +50,12 @@ public class NakadiClient { public NakadiClient(URI baseUri, ClientHttpRequestFactory clientHttpRequestFactory, BackoffStrategy backoffStrategy, ObjectMapper objectMapper, CursorManager cursorManager, MetricsCollector metricsCollector) { this.baseUri = baseUri; this.clientHttpRequestFactory = clientHttpRequestFactory; - this.objectMapper = setupBasicObjectMapper(); + this.objectMapper = createObjectMapper(); this.cursorManager = cursorManager; this.nakadiReaderFactory = new NakadiReaderFactory(clientHttpRequestFactory, backoffStrategy, cursorManager, objectMapper, metricsCollector); } - private ObjectMapper setupBasicObjectMapper() { + private ObjectMapper createObjectMapper() { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE); objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
Renamed the setup method of the object mapper in the nakadi client
zalando-nakadi_fahrschein
train
java
0052b205d0357fcb0a736810cdd6fca68dc17e91
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js index <HASH>..<HASH> 100644 --- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js +++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js @@ -848,7 +848,7 @@ define("orion/editor/textView", [ //$NON-NLS-0$ /** @private */ getLineStart: function (lineIndex) { if (!this.view._wrapMode || lineIndex === 0) { - return this.view._model.getLineStart(lineIndex); + return this.view._model.getLineStart(this.lineIndex); } var rects = this.getClientRects(); return this.getOffset(rects[lineIndex].left + 1, rects[lineIndex].top + 1);
Bug <I> - Home key jumps to start of file with word wrap on
eclipse_orion.client
train
js
48efa98cbc6c93707690d224faabab985f673aa6
diff --git a/src/core/nativefontwatchrunner.js b/src/core/nativefontwatchrunner.js index <HASH>..<HASH> 100644 --- a/src/core/nativefontwatchrunner.js +++ b/src/core/nativefontwatchrunner.js @@ -22,14 +22,16 @@ goog.scope(function () { var NativeFontWatchRunner = webfont.NativeFontWatchRunner; NativeFontWatchRunner.prototype.start = function () { - var doc = this.domHelper_.getLoadWindow(); + var doc = this.domHelper_.getLoadWindow().document, + that = this; if (doc['fonts']['check'](this.font_.toCssString(), this.fontTestString_)) { this.activeCallback_(this.font_); } else { doc['fonts']['load'](this.font_.toCssString(), this.fontTestString_)['then']( - goog.bind(this.activeCallback_, this, this.font_), - goog.bind(this.inactiveCallback_, this, this.font_)); + function () { that.activeCallback_(that.font_); }, + function () { that.inactiveCallback_(that.font_); } + ); } }; });
Fix reference to loadWindow.document and make sure the reject callback is not called with an error.
typekit_webfontloader
train
js
2a6719e3f466653f25073d75a11d6df841d9d4ae
diff --git a/src/env.js b/src/env.js index <HASH>..<HASH> 100644 --- a/src/env.js +++ b/src/env.js @@ -68,18 +68,10 @@ class PokemonEnv { seed: this.seed ? Array(4).fill(this.seed) : null, send: (type, data) => this._receiveBattleUpdate(type, data), }; - const p1Options = { - name: this.p1.name, - team: this.p1.team, - }; - const p2Options = { - name: this.p2.name, - team: this.p2.team, - }; this.battle = new Battle(battleOptions); - this.battle.setPlayer('p1', p1Options); - this.battle.setPlayer('p2', p2Options); + this.battle.setPlayer('p1', this.p1Spec); + this.battle.setPlayer('p2', this.p2Spec); this.battle.sendUpdates(); return this._getObservations();
Use specified teams for players (bug fix)
pokeml_pokemon-env
train
js
af7775a7bbbd23c461c5b72777586344a4d796b8
diff --git a/jest.setup.js b/jest.setup.js index <HASH>..<HASH> 100644 --- a/jest.setup.js +++ b/jest.setup.js @@ -20,7 +20,7 @@ function toHaveFocus(element) { return [ matcherHint(`${this.isNot ? ".not" : ""}.toHaveFocus`, "element", ""), "", - "Expected", + "Expected:", ` ${printExpected(element)}`, "Received:", ` ${printReceived(element.ownerDocument.getElementById(activeId))}`,
chore: Update jest.setup.js
reakit_reakit
train
js
cdac4131706384a2d617d54e1b67aa670c9a14e0
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup_args = dict( - name='w', + name='wallace-platform', packages=['wallace'], version="0.11.1", description='Wallace, a platform for experimental cultural evolution',
Rename PyPi dist. to wallace-platform
berkeley-cocosci_Wallace
train
py
489f62d32b10344b64559f5ef3c223d549233f4e
diff --git a/spec/core/answer_spec.rb b/spec/core/answer_spec.rb index <HASH>..<HASH> 100644 --- a/spec/core/answer_spec.rb +++ b/spec/core/answer_spec.rb @@ -310,10 +310,10 @@ describe OSCRuby::Answer do expect(known_working_answer.publishOnDate).to eq(nil) expect(known_working_answer.question).to eq(nil) expect(known_working_answer.summary).to eq("QT Series: (VIDEO) Scan 'N View Setup") - expect(known_working_answer.updatedByAccount).to eq(47) expect(known_working_answer.uRL).to eq(nil) # not a very reliable metrics..... + # expect(known_working_answer.updatedByAccount).to eq(47) # expect(known_working_answer.updatedTime).to eq("2016-12-13T09:55:45Z") # expect(known_working_answer.adminLastAccessTime).to eq("2016-11-23T22:54:26Z") # expect(known_working_answer.lastAccessTime).to eq("2016-12-10T07:27:37Z")
I regret writing some of the tests the way I did... will need to figure something out
rajangdavis_osvc_ruby
train
rb
f143ee80a1f4aedd739ae4956ad0e5387afcdd2b
diff --git a/src/Connection/Connector.php b/src/Connection/Connector.php index <HASH>..<HASH> 100644 --- a/src/Connection/Connector.php +++ b/src/Connection/Connector.php @@ -54,7 +54,7 @@ class Connector implements ConnectorInterface $defaults = [ 'accounts' => 'https://marketplace.commerceguys.com/api/platform/', 'client_id' => 'platformsh-client-php', - 'client_secret' => null, + 'client_secret' => '', 'debug' => false, 'verify' => true, 'user_agent' => "Platform.sh-Client-PHP/$version (+$url)",
Set the client_secret to '' to help with oauth2_server implementation
platformsh_platformsh-client-php
train
php
fc814c6756158298bd869781cc752e23da026864
diff --git a/safe/impact_functions/earthquake/earthquake_building/impact_function.py b/safe/impact_functions/earthquake/earthquake_building/impact_function.py index <HASH>..<HASH> 100644 --- a/safe/impact_functions/earthquake/earthquake_building/impact_function.py +++ b/safe/impact_functions/earthquake/earthquake_building/impact_function.py @@ -127,7 +127,7 @@ class EarthquakeBuildingFunction( interpolate_size = len(interpolate_result) - hazard_classes = [tr('High'), tr('Medium'), tr('Low')] + hazard_classes = [tr('Low'), tr('Medium'), tr('High')] self.init_report_var(hazard_classes) removed = [] @@ -199,6 +199,8 @@ class EarthquakeBuildingFunction( self.affected_buildings[category][usage][ tr('Contents value ($M)')] += contents_value / 1000000.0 + self.reorder_dictionaries() + # remove un-categorized element removed.reverse() geometry = interpolate_result.get_geometry()
reordering columns in earthquake building
inasafe_inasafe
train
py
578795ad7992e31c402c2439ce91174096b81eda
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -1,9 +1,10 @@ var tape = require('tape') +var ConnectionPool = require('any-db-pool') var test = module.exports = tape.bind(null) test.withAdapter = function (description, callback) { - tape(description, function (t) { + test(description, function (t) { var config = require('./config') callback(config, t) }) @@ -21,7 +22,7 @@ test.withConnection = maybeOpts(function (description, opts, callback) { }) test.withTransaction = maybeOpts(function (description, opts, callback) { - tape(description, function (t) { + test(description, function (t) { var config = require('./config') config.adapter.createConnection(config.url, function (err, conn) { if (err) throw err @@ -39,7 +40,7 @@ test.withTransaction = maybeOpts(function (description, opts, callback) { }) test.withPool = maybeOpts(function (description, opts, callback) { - tape(description, function (t) { + test(description, function (t) { var config = require('./config') var pool = new ConnectionPool(config.adapter, config.url, { max: 2,
fix missing reference to ConnectionPool
grncdr_node-any-db
train
js
fb45a2c12c085db163de1ebfb98ae2c0a605d4e4
diff --git a/assemblerflow/generator/__init__.py b/assemblerflow/generator/__init__.py index <HASH>..<HASH> 100644 --- a/assemblerflow/generator/__init__.py +++ b/assemblerflow/generator/__init__.py @@ -0,0 +1,3 @@ +""" +Placeholder for Process creation docs +""" \ No newline at end of file
Added placeholder for processes docs
assemblerflow_flowcraft
train
py
1cd00a83e424d09058cfb8c71015771465ca4e4c
diff --git a/sentry/client/base.py b/sentry/client/base.py index <HASH>..<HASH> 100644 --- a/sentry/client/base.py +++ b/sentry/client/base.py @@ -1,3 +1,5 @@ +from __future__ import absolute_import + import base64 try: import cPickle as pickle diff --git a/sentry/client/models.py b/sentry/client/models.py index <HASH>..<HASH> 100644 --- a/sentry/client/models.py +++ b/sentry/client/models.py @@ -1,3 +1,5 @@ +from __future__ import absolute_import + import sys import logging import warnings diff --git a/sentry/models.py b/sentry/models.py index <HASH>..<HASH> 100644 --- a/sentry/models.py +++ b/sentry/models.py @@ -1,3 +1,5 @@ +from __future__ import absolute_import + import base64 try: import cPickle as pickle
Use absolute_import to prevent lazy pyc conflicts
elastic_apm-agent-python
train
py,py,py
94e500911d9d0529e9f8f0708226468e605bcbdd
diff --git a/src/Form/ViewSorter.php b/src/Form/ViewSorter.php index <HASH>..<HASH> 100644 --- a/src/Form/ViewSorter.php +++ b/src/Form/ViewSorter.php @@ -46,13 +46,13 @@ class ViewSorter public function choice(FormView $choice) { $collator = $this->collator; - if ($choice->vars['expanded']) { + if ($choice->vars['compound']) { usort($choice->children, function (FormView $a, FormView $b) use ($collator) { - return $collator->compare($a->vars['label'], $b->vars['label']); + return $collator->compare($a->vars['label']?:$a->vars['value'], $b->vars['label']?:$b->vars['value']); }); } else { usort($choice->vars['choices'], function (ChoiceView $a, ChoiceView $b) use ($collator) { - return $collator->compare($a->label, $b->label); + return $collator->compare($a->label?:$a->value, $b->label?:$b->value); }); } }
use value for sort if label is empty
anime-db_catalog-bundle
train
php
f13de340e5b46e6f1a9e7783e7d9b330282fdb2c
diff --git a/lib/command/index.js b/lib/command/index.js index <HASH>..<HASH> 100644 --- a/lib/command/index.js +++ b/lib/command/index.js @@ -1,4 +1,3 @@ module.exports = { - __depends__: [ require('../core') ], commandStack: [ 'type', require('./CommandStack') ] -}; \ No newline at end of file +};
chore(command): remove dependency to core to promote reusability This makes the command module a reusable component that can be used outside the scope of diagram-js. BREAKING CHANGE: - You now need to provide a `eventBus` component yourself if you want to use the commandStack
bpmn-io_diagram-js
train
js
ccfa1c26f5928703a6aa2a502c5609d020a4b26d
diff --git a/tests/behat/features/bootstrap/FeatureContext.php b/tests/behat/features/bootstrap/FeatureContext.php index <HASH>..<HASH> 100755 --- a/tests/behat/features/bootstrap/FeatureContext.php +++ b/tests/behat/features/bootstrap/FeatureContext.php @@ -660,6 +660,7 @@ class FeatureContext extends RawMinkContext implements Context public function getGroupIdFromTitle($group_title) { $query = \Drupal::entityQuery('group') + ->accessCheck(FALSE) ->condition('label', $group_title); $group_ids = $query->execute();
Set accessCheck to FALSE Since the function getGroupIdFromTitle() retrieves only gid by group title, there is no necessary use to check access for the current user.
goalgorilla_open_social
train
php
eccd62c6d4dd70c5d84fc30c59ab6112e03ea6c0
diff --git a/lib/Entity.js b/lib/Entity.js index <HASH>..<HASH> 100644 --- a/lib/Entity.js +++ b/lib/Entity.js @@ -53,6 +53,7 @@ module.exports.Entity = class Entity { this.instance.genEntity = this.genEntity.bind(this.instance, nxs); this.instance.getFile = this.getFile.bind(this.instance, nxs); this.instance.dispatch = this.dispatch; + this.instance.exit = this.exit.bind(this.instance, nxs); this.instance.log = log; } @@ -72,7 +73,7 @@ module.exports.Entity = class Entity { return this.instance.Par.Apex; } - exit(nxs, code) { + exit(nxs, code = 0) { nxs.exit(code); }
should fix exit adding issue to add a test for exit's existence
IntrospectiveSystems_xGraph
train
js
eb512784792397631d87229eeba17586f2e65b4a
diff --git a/src/Phim/Color.php b/src/Phim/Color.php index <HASH>..<HASH> 100644 --- a/src/Phim/Color.php +++ b/src/Phim/Color.php @@ -1694,20 +1694,20 @@ class Color return sqrt(($dl ** 2) + ($dc ** 2) + ($dh ** 2) + $rt * $dc * $dh); } - private static function cieLabToHue($a, $b) + private static function cieLabToHue(float $a, float $b) { - + $bias = 0; - if ($a >= 0 && $b === 0) + if ($a >= 0 && $b === 0.0) return 0; - if ($a < 0 && $b === 0) + if ($a < 0 && $b === 0.0) return 180; - if ($a === 0 && $b >= 0) + if ($a === 0.0 && $b >= 0) return 90; - if ($a === 0 && $b < 0) + if ($a === 0.0 && $b < 0) return 270; if ($a > 0 && $b > 0)
Update Color.php (#<I>) cieLabToHue function performing strict check against int 0 however floats provided meaning that it doesn't match the catching if's to prevent divide by zero errors.
Talesoft_phim
train
php
338dbe17904b969ab9626b03ee2998efc78af4d0
diff --git a/src/Options.php b/src/Options.php index <HASH>..<HASH> 100644 --- a/src/Options.php +++ b/src/Options.php @@ -147,7 +147,7 @@ class Options{ * * @var int */ - protected $mysqli_timeout = 1; + protected $mysqli_timeout = 3; /** * MySQL connection character set @@ -189,7 +189,7 @@ class Options{ * * @var int */ - protected $mssql_timeout = 1; + protected $mssql_timeout = 3; /** * MS SQL Server connection character set
increased timeouts to circumvent problems on slower machines
chillerlan_php-database
train
php
80ba93d9bbde70f7286f9f1847ca9a120352000c
diff --git a/manifest.php b/manifest.php index <HASH>..<HASH> 100755 --- a/manifest.php +++ b/manifest.php @@ -29,7 +29,7 @@ return array( 'label' => 'QTI test model', 'description' => 'TAO QTI test implementation', 'license' => 'GPL-2.0', - 'version' => '12.0.0', + 'version' => '12.1.0', 'author' => 'Open Assessment Technologies', 'requires' => array( 'taoTests' => '>=6.4.0', diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php index <HASH>..<HASH> 100644 --- a/scripts/update/Updater.php +++ b/scripts/update/Updater.php @@ -1565,5 +1565,7 @@ class Updater extends \common_ext_ExtensionUpdater { $this->setVersion('12.0.0'); } + $this->skip('12.0.0', '12.1.0'); + } }
Bump to version <I>
oat-sa_extension-tao-testqti
train
php,php
7a03686c9c3739a714f8320e8135f0b93b09e1b6
diff --git a/lib/candevice.js b/lib/candevice.js index <HASH>..<HASH> 100644 --- a/lib/candevice.js +++ b/lib/candevice.js @@ -40,7 +40,7 @@ class CanDevice extends EventEmitter { constructor (canbus, options) { super() - addressClaim["Unique Number"] = Math.floor(Math.random() * Math.floor(2097151)); + addressClaim["Unique Number"] = options.uniqueNumber || Math.floor(Math.random() * Math.floor(2097151)) this.canbus = canbus this.options = _.isUndefined(options) ? {} : options
feature: allow the unique number for a CanDevice to be proivded in options (#<I>)
canboat_canboatjs
train
js
bb1ddb94ad39cf1f8d82d8a1c4db4cff51b83b5e
diff --git a/test/backward_compatibility/test_utils.py b/test/backward_compatibility/test_utils.py index <HASH>..<HASH> 100644 --- a/test/backward_compatibility/test_utils.py +++ b/test/backward_compatibility/test_utils.py @@ -92,7 +92,7 @@ class TestHadoopUtils(unittest.TestCase): stdout=sp.PIPE, stderr=sp.PIPE) out, _ = cmd.communicate() self.assertTrue( - out.splitlines()[0].strip().lower().startswith("hadoop") + out.splitlines()[0].strip().lower().startswith(b"hadoop") ) def test_get_hadoop_version(self):
Fixed a str vs bytes mixup
crs4_pydoop
train
py