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
8c586dd671e553a03ad053bdb4759b9ee5127db9
diff --git a/intervaltree/intervaltree.py b/intervaltree/intervaltree.py index <HASH>..<HASH> 100644 --- a/intervaltree/intervaltree.py +++ b/intervaltree/intervaltree.py @@ -401,7 +401,11 @@ class IntervalTree(collections.MutableSet): Returns a new tree, comprising all intervals in self but not in other. """ - return IntervalTree(iv for iv in self if iv not in other) + ivs = set() + for iv in self: + if iv not in other: + ivs.add(iv) + return IntervalTree(ivs) def difference_update(self, other): """ @@ -422,7 +426,12 @@ class IntervalTree(collections.MutableSet): Returns a new tree of all intervals common to both self and other. """ - return IntervalTree(iv for iv in self if iv in other) + ivs = set() + longer, b = + for iv in other: + if iv in self: + ivs.add(iv) + return IntervalTree(ivs) def intersection_update(self, other): """
rm: set comprehensions in set operations, use for-loop instead
chaimleib_intervaltree
train
py
339631607bb924909ad2b9242d7d878299958cfe
diff --git a/packages/Photos/src/site/components/com_photos/templates/stories/photo_comment.php b/packages/Photos/src/site/components/com_photos/templates/stories/photo_comment.php index <HASH>..<HASH> 100644 --- a/packages/Photos/src/site/components/com_photos/templates/stories/photo_comment.php +++ b/packages/Photos/src/site/components/com_photos/templates/stories/photo_comment.php @@ -13,7 +13,7 @@ </a> </h4> <?php endif; ?> - <?php $caption = htmlspecialchars($photo->title, ENT_QUOTES); ?> + <?php $caption = htmlspecialchars($object->title, ENT_QUOTES); ?> <a data-rel="story-<?= $story->id ?>" data-trigger="MediaViewer" href="<?= @route($object->getPortraitURL('original')) ?>" title="<?= $caption ?>"> <img class="entity-portrait-medium" src="<?= $object->getPortraitURL('medium') ?>" /> </a>
Fixed a bug: $photo changed to $object
anahitasocial_anahita
train
php
77ae8fda3fb57d5f81ae72b48191f46fac964b0a
diff --git a/a10_neutron_lbaas/tests/unit/plumbing/test_portbinding_vlan.py b/a10_neutron_lbaas/tests/unit/plumbing/test_portbinding_vlan.py index <HASH>..<HASH> 100644 --- a/a10_neutron_lbaas/tests/unit/plumbing/test_portbinding_vlan.py +++ b/a10_neutron_lbaas/tests/unit/plumbing/test_portbinding_vlan.py @@ -21,7 +21,7 @@ from a10_neutron_lbaas.plumbing import portbinding_vlan from neutron.db.models.segment import NetworkSegment from neutron.db.models_v2 import Port -from neutron.plugins.ml2.db import PortBindingLevel +from neutron.plugins.ml2.models import PortBindingLevel _SUBNET_ID = "mysubnet" _PORT_ID = "portid"
Actually fixed the import error this time, like I ran tests and all
a10networks_a10-neutron-lbaas
train
py
707623cb16c560167c7938dd06455a25870c99b3
diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php @@ -109,7 +109,7 @@ class Controller extends ContainerAware throw new \LogicException('You can not use the addFlash method if sessions are disabled.'); } - $this->get('session')->getFlashBag()->add($type, $message); + $this->container->get('session')->getFlashBag()->add($type, $message); } /** @@ -127,7 +127,7 @@ class Controller extends ContainerAware throw new \LogicException('The SecurityBundle is not registered in your application.'); } - return $this->get('security.context')->isGranted($attributes, $object); + return $this->container->get('security.context')->isGranted($attributes, $object); } /**
Update the Controller to be consistent We are always using $this->container->get() and now we're using the short-cut sometimes to access to a service. It could be nice to stay with $this->container->get(), so for those who copy and paste the Controller to create a ControllerUtils, they wont have to change it (in fact neither ControllerUtils::get() nor ControllerUtils::has() exists). See: <URL>
symfony_symfony
train
php
0c6e44515410c371cbb4f4d3589f8554e7f217ab
diff --git a/util.py b/util.py index <HASH>..<HASH> 100644 --- a/util.py +++ b/util.py @@ -369,6 +369,7 @@ byte_compile(files, optimize=%s, force=%s, elif optimize == 2: cmd.insert(1, "-OO") spawn(cmd, verbose=verbose, dry_run=dry_run) + os.remove(script_name) # "Direct" byte-compilation: use the py_compile module to compile # right here, right now. Note that the script generated in indirect
Remove the temporary byte-compilation script when we're done with it.
pypa_setuptools
train
py
7740ed7df4c34618ff7f2046fdaa9bbe43a881bc
diff --git a/test/rain/git_tools_test.rb b/test/rain/git_tools_test.rb index <HASH>..<HASH> 100644 --- a/test/rain/git_tools_test.rb +++ b/test/rain/git_tools_test.rb @@ -31,9 +31,6 @@ class Rain::GitToolsTest < ActiveSupport::TestCase should "return false when there are uncommitted changes" do assert %x(echo "test" >> LICENSE.md), "LICENSE.md was not edited" refute no_changes_pending?, "LICENSE.md is still clean" - end - - should "return true when the directory is clean" do assert %x(git checkout HEAD LICENSE.md), "LICENSE.md not reset to HEAD state" assert no_changes_pending?, "LICENSE.md is still dirty. Make sure you commit everything else!" end
Remove ability for these tests to go out of order
eLocal_rain
train
rb
02d5e886f62b505f6db65c6e739703041370ae5c
diff --git a/src/Nchan.php b/src/Nchan.php index <HASH>..<HASH> 100644 --- a/src/Nchan.php +++ b/src/Nchan.php @@ -55,16 +55,4 @@ final class Nchan { return new Status($this->baseUrl->append($path), $this->client); } - - /** - * Create the api for the given group name. - * - * @param string $name - * - * @throws \Exception - */ - public function group(string $name): void - { - throw new \Exception('Not implemented yet'); - } } \ No newline at end of file
Remove Nchan::group() because it's for version <I>
marein_php-nchan-client
train
php
6a729f8ccd1eabc155e54526061876de5e38d42b
diff --git a/hbmqtt/test_client.py b/hbmqtt/test_client.py index <HASH>..<HASH> 100644 --- a/hbmqtt/test_client.py +++ b/hbmqtt/test_client.py @@ -20,4 +20,4 @@ def test_coro(): if __name__ == '__main__': logging.basicConfig(level=logging.DEBUG) - asyncio.get_event_loop().run_until_complete(test_coro()) \ No newline at end of file +# asyncio.get_event_loop().run_until_complete(test_coro()) \ No newline at end of file
disable (temporarly) testing
beerfactory_hbmqtt
train
py
c40b160f0f68546c1db0055f5ced49d286f74c7c
diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php index <HASH>..<HASH> 100644 --- a/plugins/Login/Controller.php +++ b/plugins/Login/Controller.php @@ -441,8 +441,9 @@ class Controller extends \Piwik\Plugin\ControllerAdmin try { $passwordHash = $this->passwordResetter->checkValidConfirmPasswordToken($login, $resetToken); } catch (Exception $ex) { - Log::debug($ex); + $this->bruteForceDetection->addFailedAttempt(IP::getIpFromHeader()); + Log::debug($ex); $errorMessage = $ex->getMessage(); }
Use brute force detection for reset password action (#<I>)
matomo-org_matomo
train
php
cced0dca577ad013e358a8918356e8ca40e1c5c4
diff --git a/kie-api/src/main/java/org/kie/api/pmml/PMMLRequestData.java b/kie-api/src/main/java/org/kie/api/pmml/PMMLRequestData.java index <HASH>..<HASH> 100644 --- a/kie-api/src/main/java/org/kie/api/pmml/PMMLRequestData.java +++ b/kie-api/src/main/java/org/kie/api/pmml/PMMLRequestData.java @@ -81,6 +81,7 @@ public class PMMLRequestData { } public synchronized boolean addRequestParam(ParameterInfo parameter) { + this.requestParams.removeIf(pi -> parameter.getName().equals(pi.getName())); return this.requestParams.add(parameter); }
RHPAM-<I> Guided Score card rules not executed via test scenario (#<I>) Adding a paramater now replaces a parameter with the same name.
kiegroup_drools
train
java
d3a303b73ff318e3c4b40debcffe06d7874aa978
diff --git a/decidim-core/lib/decidim/core.rb b/decidim-core/lib/decidim/core.rb index <HASH>..<HASH> 100644 --- a/decidim-core/lib/decidim/core.rb +++ b/decidim-core/lib/decidim/core.rb @@ -86,7 +86,7 @@ module Decidim # Exposes a configuration option: The application name String. config_accessor :available_locales do - %w(en ca es eu fi fr nl) + %w(en ca es eu it fi fr nl) end # Exposes a configuration option: an object to configure geocoder
Adding italian language to default locale (#<I>)
decidim_decidim
train
rb
0bc88fe267b9d1eef1c6b678ff0875eb531268dd
diff --git a/lib/faalis/version.rb b/lib/faalis/version.rb index <HASH>..<HASH> 100755 --- a/lib/faalis/version.rb +++ b/lib/faalis/version.rb @@ -18,5 +18,5 @@ # ----------------------------------------------------------------------------- module Faalis - VERSION = '2.0.0.rc3' + VERSION = '2.0.0.rc4' end
version <I>.rc4
Yellowen_Faalis
train
rb
cfca5ccc1465757e93e6f1a644c639eb7131ab78
diff --git a/skew/backends/redis_backend.py b/skew/backends/redis_backend.py index <HASH>..<HASH> 100644 --- a/skew/backends/redis_backend.py +++ b/skew/backends/redis_backend.py @@ -48,7 +48,7 @@ class RedisBlockingQueue(RedisQueue): def read(self): try: - return self.conn.brpop(self.queue_name) + return self.conn.brpop(self.queue_name)[1] except ConnectionError: # unfortunately, there is no way to differentiate a socket timing # out and a host being unreachable
Fixing a bug in the redis blocking queue
coleifer_huey
train
py
a23cb88be1e3860c1a66873c51ef4d53d7fd310a
diff --git a/Classes/Neos/Neos/Ui/Aspects/AugmentationAspect.php b/Classes/Neos/Neos/Ui/Aspects/AugmentationAspect.php index <HASH>..<HASH> 100644 --- a/Classes/Neos/Neos/Ui/Aspects/AugmentationAspect.php +++ b/Classes/Neos/Neos/Ui/Aspects/AugmentationAspect.php @@ -118,7 +118,7 @@ class AugmentationAspect /** @var NodeInterface $node */ $node = $joinPoint->getMethodArgument('node'); $content = $joinPoint->getMethodArgument('content'); - $fusionPath = $joinPoint->getMethodArgument('typoScriptPath'); + $fusionPath = $joinPoint->getMethodArgument('fusionPath'); if (!$this->needsMetadata($node, false)) { return $content;
TASK: Adapt aspect to changed argument name in Neos
neos_neos-ui
train
php
e36a2ea1b046097c5cdbe6fb59bdfef4c343ecb1
diff --git a/system/src/Grav/Framework/Flex/Storage/FolderStorage.php b/system/src/Grav/Framework/Flex/Storage/FolderStorage.php index <HASH>..<HASH> 100644 --- a/system/src/Grav/Framework/Flex/Storage/FolderStorage.php +++ b/system/src/Grav/Framework/Flex/Storage/FolderStorage.php @@ -360,7 +360,9 @@ class FolderStorage extends AbstractFilesystemStorage { try { $data = $file->content(); - $file->delete(); + if ($file->exists()) { + $file->delete(); + } /** @var UniformResourceLocator $locator */ $locator = Grav::instance()['locator'];
FlexFolderStorage: fixed error on deleting file
getgrav_grav
train
php
858f5dcc2cf19d42393c360721e5c3a7dc547c43
diff --git a/mode/clojure/clojure.js b/mode/clojure/clojure.js index <HASH>..<HASH> 100644 --- a/mode/clojure/clojure.js +++ b/mode/clojure/clojure.js @@ -166,7 +166,7 @@ CodeMirror.defineMode("clojure", function (options) { var qualifiedSymbol = /^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/; function base(stream, state) { - if (stream.eatSpace()) return ["space", null]; + if (stream.eatSpace() || stream.eat(",")) return ["space", null]; if (stream.match(numberLiteral)) return [null, "number"]; if (stream.match(characterLiteral)) return [null, "string-2"]; if (stream.eat(/^"/)) return (state.tokenize = inString)(stream, state);
[clojure mode] Treat commas as whitespace Closes #<I>
codemirror_CodeMirror
train
js
7a6bd76bcaa0475bcc6083102339588bb378f64a
diff --git a/core/renderMiddleware.js b/core/renderMiddleware.js index <HASH>..<HASH> 100644 --- a/core/renderMiddleware.js +++ b/core/renderMiddleware.js @@ -639,11 +639,19 @@ function endResponse(req, res, context, start, page) { function logRequestStats(req, res, context, start){ var allRequests = TritonAgent.cache().getAllRequests() , notLoaded = TritonAgent.cache().getLateRequests() + , sock = req.socket + , stash = context.getServerStash() + + stash.bytesR = sock.bytesRead - (sock._preR||(sock._preR=0)); + stash.bytesW = sock.bytesWritten - (sock._preW||(sock._preW=0)); + + sock._preR += stash.bytesR; + sock._preW += stash.bytesW; logger.gauge("countDataRequests", allRequests.length); logger.gauge("countLateArrivals", notLoaded.length, {hi: 1}); - logger.gauge("bytesRead", req.socket.bytesRead, {hi: 1<<12}); - logger.gauge("bytesWritten", req.socket.bytesWritten, {hi: 1<<18}); + logger.gauge("bytesRead", stash.bytesR, {hi: 1<<12}); + logger.gauge("bytesWritten", stash.bytesW, {hi: 1<<18}); var time = new Date - start;
RED-<I> Better I/O accounting with keepalive
redfin_react-server
train
js
b5af4d66fd303579250214082d7ed3e7f4f5ab79
diff --git a/c7n/resources/account.py b/c7n/resources/account.py index <HASH>..<HASH> 100644 --- a/c7n/resources/account.py +++ b/c7n/resources/account.py @@ -600,6 +600,7 @@ class RequestLimitIncrease(BaseAction): 'VPC': 'amazon-virtual-private-cloud', 'IAM': 'aws-identity-and-access-management', 'CloudFormation': 'aws-cloudformation', + 'Kinesis': 'amazon-kinesis', } def process(self, resources):
aws - service-limit-increase add kinesis to service code mapping (#<I>)
cloud-custodian_cloud-custodian
train
py
0fb687abe607bb7a7f42550f1a395ae4e27c10ae
diff --git a/.eslintrc.js b/.eslintrc.js index <HASH>..<HASH> 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,6 +10,7 @@ module.exports = { }], 'no-param-reassign': ['error', { props: false, - }] + }], + 'prefer-destructuring': 'off', } };
lint: prefer-destructuring: off
phenomejs_phenome
train
js
e519ca5c961d2cdaaecb3bf20edaa5a3fe5f96cc
diff --git a/lib/airbrake-ruby/tdigest.rb b/lib/airbrake-ruby/tdigest.rb index <HASH>..<HASH> 100644 --- a/lib/airbrake-ruby/tdigest.rb +++ b/lib/airbrake-ruby/tdigest.rb @@ -247,7 +247,7 @@ module Airbrake end def to_a - @centroids.map { |_, c| c } + @centroids.each_value.to_a end # rubocop:disable Metrics/PerceivedComplexity, Metrics/MethodLength
tdigest: refactor #to_a to use more idiomatic Ruby
airbrake_airbrake-ruby
train
rb
acf5df7ad7f6c323d2ff5b755a8017f85e320392
diff --git a/src/main/java/com/hackoeur/jglm/Mat4.java b/src/main/java/com/hackoeur/jglm/Mat4.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/hackoeur/jglm/Mat4.java +++ b/src/main/java/com/hackoeur/jglm/Mat4.java @@ -24,7 +24,10 @@ import com.hackoeur.jglm.support.Precision; * * @author James Royalty */ -public class Mat4 extends AbstractMat { +public final class Mat4 extends AbstractMat { + public static final Mat4 MAT4_ZERO = new Mat4(); + public static final Mat4 MAT4_IDENTITY = new Mat4(1.0f); + /* ::-------------------------------------------------------------------------:: * COLUMN MAJOR LAYOUT: The first index indicates the COLUMN NUMBER. * The second is the ROW NUMBER.
Added constants for IDENTITY and ZERO. Made class final.
jroyalty_jglm
train
java
c83eb6baffc68127a029f58dc787f58a0199b546
diff --git a/test/nexttext.js b/test/nexttext.js index <HASH>..<HASH> 100644 --- a/test/nexttext.js +++ b/test/nexttext.js @@ -1,9 +1,6 @@ -var _ = require('lodash'); -var async = require('async'); var chai = require('chai'); var expect = chai.expect; var lacona; -var sinon = require('sinon'); chai.use(require('sinon-chai')); @@ -29,7 +26,7 @@ describe('nextText', function () { ] }, completion: {} - } + }; lacona.nextText(inputOption, function (err, nextText) { expect(err).to.not.exist; @@ -38,4 +35,3 @@ describe('nextText', function () { }); }); }); -
lint test/nexttest.js succeeds
laconalabs_elliptical
train
js
c3beca72e24cf441fe0927740a47c5df50d7f953
diff --git a/cmd/prometheus/main_test.go b/cmd/prometheus/main_test.go index <HASH>..<HASH> 100644 --- a/cmd/prometheus/main_test.go +++ b/cmd/prometheus/main_test.go @@ -226,6 +226,7 @@ func TestWALSegmentSizeBounds(t *testing.T) { t.Errorf("prometheus should be still running: %v", err) case <-time.After(5 * time.Second): prom.Process.Kill() + <-done } continue } @@ -268,6 +269,7 @@ func TestMaxBlockChunkSegmentSizeBounds(t *testing.T) { t.Errorf("prometheus should be still running: %v", err) case <-time.After(5 * time.Second): prom.Process.Kill() + <-done } continue } @@ -438,6 +440,7 @@ func TestModeSpecificFlags(t *testing.T) { t.Errorf("prometheus should be still running: %v", err) case <-time.After(5 * time.Second): prom.Process.Kill() + <-done } return }
cmd/prometheus: wait for Prometheus to shutdown in tests So temporary data directory can be successfully removed, as on Windows, directory cannot be in used while removal.
prometheus_prometheus
train
go
efd75d6ef7e1c69546e058f04a418e50026b5aa1
diff --git a/packages/functionals/botpress-qna/src/views/index.js b/packages/functionals/botpress-qna/src/views/index.js index <HASH>..<HASH> 100755 --- a/packages/functionals/botpress-qna/src/views/index.js +++ b/packages/functionals/botpress-qna/src/views/index.js @@ -203,7 +203,7 @@ export default class QnaAdmin extends Component { const nodeOptions = !redirectFlow ? [] - : find(flows, { name: redirectFlow }).nodes.map(({ name }) => ({ label: name, value: name })) + : get(find(flows, { name: redirectFlow }), 'nodes', []).map(({ name }) => ({ label: name, value: name })) return ( <div className={style.paddedRow}>
fix(qna): on flow deletion or rename, QNA still works
botpress_botpress
train
js
9001eaf6832e1cb887fd894a76813bc6250b0763
diff --git a/lib/cms9/engine.rb b/lib/cms9/engine.rb index <HASH>..<HASH> 100644 --- a/lib/cms9/engine.rb +++ b/lib/cms9/engine.rb @@ -1,6 +1,14 @@ module Cms9 class Engine < ::Rails::Engine isolate_namespace Cms9 + require 'sass-rails' + require 'uglifier' + require 'coffee-rails' + require 'jquery-rails' + require 'jbuilder' + require 'bootstrap' + require 'wysiwyg-rails' + initializer :append_migrations do |app| unless app.root.to_s.match(root.to_s) config.paths["db/migrate"].expanded.each do |expand_path| diff --git a/lib/cms9/version.rb b/lib/cms9/version.rb index <HASH>..<HASH> 100644 --- a/lib/cms9/version.rb +++ b/lib/cms9/version.rb @@ -1,3 +1,3 @@ module Cms9 - VERSION = '0.1.8' + VERSION = '0.1.9' end
- fix engine.rb 8th
klikaba_cms9
train
rb,rb
90f99689121487328f022fd09841b62378423afe
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index <HASH>..<HASH> 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -162,6 +162,9 @@ module ActiveRecord v.nil? || Array === v || Hash === v } + # We can't cache Post.find_by(author: david) ...yet + return super unless hash.keys.all? { |k| columns_hash.has_key?(k.to_s) } + key = hash.keys klass = self diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index <HASH>..<HASH> 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -1073,6 +1073,11 @@ class FinderTest < ActiveRecord::TestCase assert_equal nil, Post.find_by("1 = 0") end + test "find_by with associations" do + assert_equal authors(:david), Post.find_by(author: authors(:david)).author + assert_equal authors(:mary) , Post.find_by(author: authors(:mary) ).author + end + test "find_by doesn't have implicit ordering" do assert_sql(/^((?!ORDER).)*$/) { Post.find_by(id: posts(:eager_other).id) } end
Fix find_by with associations not working with adequate record For now, we will just skip the cache when a non-column key is used in the hash. If the future, we can probably move some of the logic in PredicateBuilder.expand up the chain to make caching possible for association queries. Closes #<I> Fixes #<I>
rails_rails
train
rb,rb
b785aab7ec7ed9bc4df9a38baccaa8d30ac10b57
diff --git a/src/Models/History.php b/src/Models/History.php index <HASH>..<HASH> 100644 --- a/src/Models/History.php +++ b/src/Models/History.php @@ -1,8 +1,8 @@ <?php namespace TypiCMS\Modules\History\Models; +use Laracasts\Presenter\PresentableTrait; use TypiCMS\Models\Base; -use TypiCMS\Presenters\PresentableTrait; class History extends Base { @@ -72,7 +72,7 @@ class History extends Base /** * Get title (overwrite Base model method) - * + * * @return string|null */ public function getHrefAttribute() diff --git a/src/Presenters/ModulePresenter.php b/src/Presenters/ModulePresenter.php index <HASH>..<HASH> 100644 --- a/src/Presenters/ModulePresenter.php +++ b/src/Presenters/ModulePresenter.php @@ -1,7 +1,7 @@ <?php namespace TypiCMS\Modules\History\Presenters; -use TypiCMS\Presenters\Presenter; +use Laracasts\Presenter\Presenter; class ModulePresenter extends Presenter {
use of laracasts/presenter
TypiCMS_History
train
php,php
82f6ac5af14da1a4d1ca28122ddb7c14f75c7054
diff --git a/packages/ember-routing/lib/system/route.js b/packages/ember-routing/lib/system/route.js index <HASH>..<HASH> 100644 --- a/packages/ember-routing/lib/system/route.js +++ b/packages/ember-routing/lib/system/route.js @@ -410,6 +410,8 @@ function normalizeOptions(route, name, template, options) { options.name = name; options.template = template; + Ember.assert("An outlet ("+options.outlet+") was specified but this view will render at the root level.", options.outlet === 'main' || options.into); + var controller = options.controller, namedController; if (options.controller) {
Assert when rendering to root with an outletName
emberjs_ember.js
train
js
fb5fd61ad048ea09a767f6952e91e9c193374315
diff --git a/scripts/parse_proto.py b/scripts/parse_proto.py index <HASH>..<HASH> 100755 --- a/scripts/parse_proto.py +++ b/scripts/parse_proto.py @@ -44,6 +44,7 @@ class ProtoMetadata: java_api_version = 2 java_alt_api_package = '' outer_class = '' + optimize_for = 'SPEED' def __init__(self): self.messages = [] @@ -72,6 +73,10 @@ def MatchOptions(line, data): if match: data.multiple_files = True if match.group(1).lower() == 'true' else False + match = re.match(r'option\s+optimize_for\s*=\s*(\S+)\s*;', line) + if match: + data.optimize_for = match.group(1) + def MatchTypes(line, data): # messages and enums
Parse and handle the "optimize_for" proto option.
google_j2objc
train
py
8dc58d3823c6cfb40f91742fe505f5ed9a05e3c7
diff --git a/query.go b/query.go index <HASH>..<HASH> 100644 --- a/query.go +++ b/query.go @@ -3,8 +3,8 @@ package notifications import ( "encoding/json" - peer "gx/ipfs/QmQGwpJy9P4yXZySmqkZEXCmbBpJUb8xntCv8Ca4taZwDC/go-libp2p-peer" - pstore "gx/ipfs/QmXHUpFsnpCmanRnacqYkFoLoFfEq5yS2nUgGkAjJ1Nj9j/go-libp2p-peerstore" + pstore "gx/ipfs/QmQdnfvZQuhdT93LNc5bos52wAmdr3G2p6G8teLJMEN32P/go-libp2p-peerstore" + peer "gx/ipfs/QmRBqJF7hb8ZSpRcMwUt8hNhydWcxGEhtk81HKq6oUwKvs/go-libp2p-peer" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" )
Update go-log in whole dependency tree (#<I>) * Update golog in go-ipfs License: MIT
libp2p_go-libp2p-routing
train
go
594f5093a9ab60b831cc047f33ec8cb1c8dad640
diff --git a/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go b/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go index <HASH>..<HASH> 100644 --- a/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go +++ b/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go @@ -682,7 +682,7 @@ func (b *BootstrapChannelBuilder) buildAddons() *channelsapi.Addons { versions := map[string]string{ "k8s-1.7": "2.6.12-kops.1", "k8s-1.7-v3": "3.8.0-kops.2", - "k8s-1.12": "3.9.3-kops.2", + "k8s-1.12": "3.9.5-kops.1", "k8s-1.16": "3.12.0-kops.1", } @@ -749,7 +749,7 @@ func (b *BootstrapChannelBuilder) buildAddons() *channelsapi.Addons { key := "networking.projectcalico.org.canal" versions := map[string]string{ "k8s-1.9": "3.2.3-kops.1", - "k8s-1.12": "3.7.4-kops.1", + "k8s-1.12": "3.7.5-kops.1", "k8s-1.15": "3.12.0-kops.1", } {
Bump Calico and Canal version tags for older k8s
kubernetes_kops
train
go
c625d9e770c85e043f6772e4c64bef6ec325c350
diff --git a/Tests/Transport/CurlTransportTest.php b/Tests/Transport/CurlTransportTest.php index <HASH>..<HASH> 100644 --- a/Tests/Transport/CurlTransportTest.php +++ b/Tests/Transport/CurlTransportTest.php @@ -25,7 +25,7 @@ class CurlTransportTest extends \PHPUnit_Framework_TestCase $this->object = new CurlTransport(); $this->server = array('protocol' => 'http', 'host' => 'test.com', 'cancellation_path' => 'test.cgi'); - $this->globals = array('site' => '052', 'rank' => '032', 'login' => '12345679', 'hmac' => 'sha512'); + $this->globals = array('site' => '052', 'rank' => '032', 'login' => '12345679', 'hmac' => array('key' => '123123133', 'algorithm' => 'sha512')); } /**
Fixed breaking CurlTransport unit test
lexik_LexikPayboxBundle
train
php
1b6e3df456b9458a4aeee25030d5cad739bac6dc
diff --git a/test/commit-message.js b/test/commit-message.js index <HASH>..<HASH> 100644 --- a/test/commit-message.js +++ b/test/commit-message.js @@ -174,6 +174,7 @@ var nonImperativeCases = [ 'Implementing new feature', 'Implements new feature', 'Merged changes into master branch', + // 'Manually merged changes into master', // this will fail currently 'Sending the old record to the gateway', 'Included new library' ];
Add non-imperative failing test (commented out)
clns_node-commit-msg
train
js
86aebe5262112e851a78ec112fdfabdfc220abf2
diff --git a/dream.js b/dream.js index <HASH>..<HASH> 100644 --- a/dream.js +++ b/dream.js @@ -90,8 +90,8 @@ function Dream() { return dreamInstance; }; - self.input = function input(input) { - self._dreamHelper.input = input; + self.input = function input(value) { + self._dreamHelper.input = value; return (self); }; @@ -187,7 +187,7 @@ function Dream() { }; - self.schema = function schema(schema) { + self.schema = function schema(value) { var validatedSchema; var newSchema; var args = []; @@ -200,7 +200,7 @@ function Dream() { schema: typeof (args[0]) === 'object' ? args.shift() : {} }; } else { - newSchema = schema; + newSchema = value; } validatedSchema = validateAndReturnSchema(newSchema);
- Fixed errors preventing PhantomJS to start properly
adleroliveira_dreamjs
train
js
16af168f46b6b7fa6171eb0783bbf6f6a1cae7dd
diff --git a/csp.py b/csp.py index <HASH>..<HASH> 100644 --- a/csp.py +++ b/csp.py @@ -300,7 +300,7 @@ usa = MapColoringCSP(list('RGBY'), TX: AR LA; MN: WI IA; IA: WI IL MO; MO: IL KY TN AR; AR: MS TN LA; LA: MS; WI: MI IL; IL: IN; IN: KY; MS: TN AL; AL: TN GA FL; MI: OH; OH: PA WV KY; KY: WV VA TN; TN: VA NC GA; GA: NC SC FL; - PA: NY NJ DE MD WV; WV: MD VA; VA: MD DC NC; NC: SC; NY: VT MA CA NJ; + PA: NY NJ DE MD WV; WV: MD VA; VA: MD DC NC; NC: SC; NY: VT MA CT NJ; NJ: DE; DE: MD; MD: DC; VT: NH MA; MA: NH RI CT; CT: RI; ME: NH; HI: ; AK: """) #______________________________________________________________________________
Changed NY's neighbor to be CT, not CA
hobson_aima
train
py
b50c552b29a709fcc37922d42250ed159108a7b7
diff --git a/lib/API.php b/lib/API.php index <HASH>..<HASH> 100644 --- a/lib/API.php +++ b/lib/API.php @@ -22,7 +22,7 @@ class API { private $API_VERSION = '1'; private $API_HEADER_KEY = 'X-SWU-API-KEY'; private $API_HEADER_CLIENT = 'X-SWU-API-CLIENT'; - private $API_CLIENT_VERSION = "2.6.1"; + private $API_CLIENT_VERSION = "2.7.1"; private $API_CLIENT_STUB = "php-%s"; private $DEBUG = false;
Can get logs specified by before/after timestamp
sendwithus_sendwithus_php
train
php
0f7b54e935578d9345de561a72ef953a322f8e07
diff --git a/aaf2/ama.py b/aaf2/ama.py index <HASH>..<HASH> 100644 --- a/aaf2/ama.py +++ b/aaf2/ama.py @@ -171,6 +171,8 @@ def guess_edit_rate(metadata): codec_type = st['codec_type'] if codec_type == 'video': return AAFRational(st['avg_frame_rate']) + elif codec_type == 'audio': + return AAFRational(f"{st['sample_rate']}/1") def guess_length(metadata, edit_rate): for st in metadata['streams']:
guess_edit_rate() now also implemented for audio types This should allow create_ama_link() to work with audio files.
markreidvfx_pyaaf2
train
py
5bea0c9c04f602c9a35729e903cd682a16329b9b
diff --git a/view/frontend/web/js/view/payment/method-renderer/applepay.js b/view/frontend/web/js/view/payment/method-renderer/applepay.js index <HASH>..<HASH> 100755 --- a/view/frontend/web/js/view/payment/method-renderer/applepay.js +++ b/view/frontend/web/js/view/payment/method-renderer/applepay.js @@ -174,16 +174,15 @@ define( $(self.button_target).click(function(evt) { // Prepare the parameters var runningTotal = self.getQuoteValue(); - var billingAddress = self.getBillingAddress(); + var billingAddress = self.getBillingAddress(); var shippingAddress = self.getShippingAddress(); // Build the payment request var paymentRequest = { currencyCode: CheckoutCom.getPaymentConfig()['quote_currency'], countryCode: billingAddress.countryId, - requiredShippingContactFields: ['postalAddress'], - //requiredShippingContactFields: ['postalAddress','email', 'name', 'phone'], - requiredBillingContactFields: ['postalAddress'], + requiredShippingContactFields: ['postalAddress','name'], + requiredBillingContactFields: ['postalAddress','name'], lineItems: [], billingContact: { givenName: billingAddress.firstname,
Apple Pay shopper fileds Added the name field to billing contact and shipping contact requirements.
checkout_checkout-magento2-plugin
train
js
ab78c449b7cbbd9dea2940243fcb31423591cf0b
diff --git a/peerconn.go b/peerconn.go index <HASH>..<HASH> 100644 --- a/peerconn.go +++ b/peerconn.go @@ -1107,7 +1107,9 @@ func (c *PeerConn) mainReadLoop() (err error) { c.peerChoking = true // We can now reset our interest. I think we do this after setting the flag in case the // peerImpl updates synchronously (webseeds?). - c.updateRequests("choked") + if !c.actualRequestState.Requests.IsEmpty() { + c.updateRequests("choked") + } c.updateExpectingChunks() case pp.Unchoke: if !c.peerChoking { @@ -1133,7 +1135,9 @@ func (c *PeerConn) mainReadLoop() (err error) { c.fastEnabled()) torrent.Add("requestsPreservedThroughChoking", int64(preservedCount)) } - c.updateRequests("unchoked") + if !c.t._pendingPieces.IsEmpty() { + c.updateRequests("unchoked") + } c.updateExpectingChunks() case pp.Interested: c.peerInterested = true
Reduce idle request updates due to choke and unchoke messages
anacrolix_torrent
train
go
ee5dff96e38add4debc3de9811769fa26b704ef7
diff --git a/iris.go b/iris.go index <HASH>..<HASH> 100644 --- a/iris.go +++ b/iris.go @@ -64,7 +64,6 @@ import ( "sync" "time" - "github.com/gavv/httpexpect" "github.com/kataras/go-errors" "github.com/kataras/go-fs" "github.com/kataras/go-serializer" @@ -196,9 +195,6 @@ type ( Plugins PluginContainer Websocket *WebsocketServer SSH *SSHServer - - // this is setted once when .Tester(t) is called - testFramework *httpexpect.Expect } )
For <I> - Remove unused testFramework from the previous commit Read HISTORY.md for changes: <URL>
kataras_iris
train
go
f5e8b7f8992591922e92bb5f23aaffa7fdd964db
diff --git a/ingredients_http/errors/validation.py b/ingredients_http/errors/validation.py index <HASH>..<HASH> 100644 --- a/ingredients_http/errors/validation.py +++ b/ingredients_http/errors/validation.py @@ -21,8 +21,11 @@ def json_errors_to_json(validation_errors, root=None): }) elif isinstance(value, FrozenDict): for k in value.keys(): - for field in value[k].keys(): - json_errors.extend(json_errors_to_json({str(k): value[k][field]}, root=root + "/" + key)) + if isinstance(value[k], dict): + for field in value[k].keys(): + json_errors.extend(json_errors_to_json({str(k): value[k][field]}, root=root + "/" + key)) + else: + json_errors.extend(json_errors_to_json({str(k): value[k]}, root=root+"/"+key)) else: for error in value: json_errors.append({
Fix validation error with nested documents
rmb938_ingredients.http
train
py
2a663dff9d8494dac525392b2a40f308c1f9ab7a
diff --git a/flask_sqlalchemy_booster/queryable_mixin.py b/flask_sqlalchemy_booster/queryable_mixin.py index <HASH>..<HASH> 100644 --- a/flask_sqlalchemy_booster/queryable_mixin.py +++ b/flask_sqlalchemy_booster/queryable_mixin.py @@ -13,6 +13,14 @@ class QueryableMixin(object): _no_overwrite_ = [] + + def update_without_commit(self, **kwargs): + kwargs = self._preprocess_params(kwargs) + for key, value in kwargs.iteritems(): + if key not in self._no_overwrite_: + setattr(self, key, value) + return self + def update(self, **kwargs): """Updates an instance. @@ -678,7 +686,8 @@ class QueryableMixin(object): Args: **kwargs: instance parameters """ - return cls.first(**kwargs) or cls.build(**kwargs) + keys = kwargs.pop('keys') if 'keys' in kwargs else [] + return cls.first(**subdict(kwargs, keys)) or cls.build(**kwargs) @classmethod def find_or_new(cls, **kwargs):
adding update without commit and also adding keys argument to find_or_build
SuryaSankar_flask-sqlalchemy-booster
train
py
468135e68bb72e715f076a9e417b26e4053ff69a
diff --git a/connector/setup.py b/connector/setup.py index <HASH>..<HASH> 100755 --- a/connector/setup.py +++ b/connector/setup.py @@ -182,7 +182,7 @@ setup( 'paramiko >= 1.15.1', 'lxml >= 3.3.0', 'ncclient >= 0.6.6', - 'grpcio <= 1.36.1', + 'grpcio <= 1.28.1', 'cisco-gnmi >= 1.0.13, < 2.0.0', ],
revert grpcio to <I>
CiscoTestAutomation_yang
train
py
a9a31d6f158764b795c61e7db3cd052045afde48
diff --git a/credentials/backends.py b/credentials/backends.py index <HASH>..<HASH> 100644 --- a/credentials/backends.py +++ b/credentials/backends.py @@ -1,6 +1,11 @@ import os import json +try: + import configparser +except ImportError: + import ConfigParser as configparser + class EnvBackend(object): @@ -21,3 +26,20 @@ class JsonFileBackend(object): return doc.get(key, None) except (IOError, ValueError): return None + + +class ConfigFileBackend(object): + + def __init__(self, path, section='credentials'): + self._path = path + self._section = section + + def load(self, key): + try: + config = configparser.ConfigParser() + config.read(self._path) + + return config.get(self._section, key) + + except Exception: + return None
Add config file based backend.
OniOni_credentials
train
py
4777b9f0bdb18f5a7b4ce8b3518c3f008e85f48c
diff --git a/builtin/logical/pki/path_issue_sign.go b/builtin/logical/pki/path_issue_sign.go index <HASH>..<HASH> 100644 --- a/builtin/logical/pki/path_issue_sign.go +++ b/builtin/logical/pki/path_issue_sign.go @@ -188,7 +188,7 @@ func (b *backend) pathSignVerbatim(ctx context.Context, req *logical.Request, da func (b *backend) pathIssueSignCert(ctx context.Context, req *logical.Request, data *framework.FieldData, role *roleEntry, useCSR, useCSRValues bool) (*logical.Response, error) { // If storing the certificate and on a performance standby, forward this request on to the primary - if !role.NoStore && b.System().ReplicationState().HasState(consts.ReplicationPerformanceStandby) { + if !role.NoStore && b.System().ReplicationState().HasState(consts.ReplicationPerformanceStandby|consts.ReplicationPerformanceSecondary) { return nil, logical.ErrReadOnly }
Forward cert signing requests to the primary on perf secondaries as well as perf standbys (#<I>)
hashicorp_vault
train
go
71dc26ab16b3518ca5caaacefd11f6031c5f0a29
diff --git a/commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/log/DefaultEventLogger.java b/commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/log/DefaultEventLogger.java index <HASH>..<HASH> 100644 --- a/commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/log/DefaultEventLogger.java +++ b/commons/components/commons-mule/src/main/java/org/soitoolkit/commons/mule/log/DefaultEventLogger.java @@ -111,11 +111,11 @@ public class DefaultEventLogger implements EventLogger, MuleContextAware { // Used to transform payloads that are jaxb-objects into a xml-string private JaxbObjectToXmlTransformer jaxbToXml = null; - { + static { try { // Let's give it a try, fail silently... HOST = InetAddress.getLocalHost(); - HOST_NAME = HOST.getCanonicalHostName(); + HOST_NAME = HOST.getHostName(); HOST_IP = HOST.getHostAddress(); PROCESS_ID = ManagementFactory.getRuntimeMXBean().getName(); } catch (Throwable ex) {
Fixes issue <I> performance problem in DefaultEventLogger
soi-toolkit_soi-toolkit-mule
train
java
d584d0c2b31dac43d3dca2c3ea183e44b7dc18d4
diff --git a/itests/standalone/basic/src/test/java/org/wildfly/camel/test/optaplanner/OptaPlannerIntegrationTest.java b/itests/standalone/basic/src/test/java/org/wildfly/camel/test/optaplanner/OptaPlannerIntegrationTest.java index <HASH>..<HASH> 100644 --- a/itests/standalone/basic/src/test/java/org/wildfly/camel/test/optaplanner/OptaPlannerIntegrationTest.java +++ b/itests/standalone/basic/src/test/java/org/wildfly/camel/test/optaplanner/OptaPlannerIntegrationTest.java @@ -26,6 +26,7 @@ import org.jboss.gravia.resource.ManifestBuilder; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.Assert; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.optaplanner.examples.cloudbalancing.domain.CloudBalance; @@ -34,6 +35,7 @@ import org.wildfly.extension.camel.CamelAware; @CamelAware @RunWith(Arquillian.class) +@Ignore("[#2150] Kie assumes that the TCCL can load its services") public class OptaPlannerIntegrationTest { @Deployment
[Ignore #<I>] Kie assumes that the TCCL can load its services
wildfly-extras_wildfly-camel
train
java
567b9fb133d66929335c0b80738d669a3c953f64
diff --git a/autograd/grads.py b/autograd/grads.py index <HASH>..<HASH> 100644 --- a/autograd/grads.py +++ b/autograd/grads.py @@ -98,7 +98,7 @@ np.mean = P(np.mean, make_grad_np_mean) def make_grad_chooser(ans, x, axis=None, keepdims=None): """Builds gradient of functions that choose a single item, such as min or max.""" repeater, _ = repeat_to_match_shape(x, axis, keepdims) - argmax_locations = x == repeater(ans) # TODO: Properly handle identical entries. + argmax_locations = x == repeater(ans) return [lambda g: repeater(g) * argmax_locations] np.max = P(np.max, make_grad_chooser) np.min = P(np.min, make_grad_chooser)
Realized that min and max already handle exact equality in the way we'd expect them to, but that the gradient isn't well-defined in that case anyways.
HIPS_autograd
train
py
147822b9ca8597e64f5cfa23a278986bb88d16ee
diff --git a/lib/cf/version.rb b/lib/cf/version.rb index <HASH>..<HASH> 100644 --- a/lib/cf/version.rb +++ b/lib/cf/version.rb @@ -1,3 +1,3 @@ module CF - VERSION = "5.2.1.rc6".freeze + VERSION = "5.2.1.rc7".freeze end
Bumping to version <I>.rc7.
cloudfoundry-attic_cf
train
rb
01e567e10ce0eac8f1a63fa6f5bc666ad24dcf8a
diff --git a/core/selection.js b/core/selection.js index <HASH>..<HASH> 100644 --- a/core/selection.js +++ b/core/selection.js @@ -167,8 +167,8 @@ class Selection { return index + blot.index(node, offset); } }); - let start = Math.min(...indexes), end = Math.max(...indexes); - end = Math.min(end, this.scroll.length() - 1); + let end = Math.min(Math.max(...indexes), this.scroll.length() - 1); + let start = Math.min(end, ...indexes); return new Range(start, end-start); }
fix range having negative length when scroll.length() == 0
quilljs_quill
train
js
f52836154d4540e712bb866d06c7762c0aa151cf
diff --git a/src/main/java/com/imsweb/naaccrxml/sas/SasCsvToXml.java b/src/main/java/com/imsweb/naaccrxml/sas/SasCsvToXml.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/imsweb/naaccrxml/sas/SasCsvToXml.java +++ b/src/main/java/com/imsweb/naaccrxml/sas/SasCsvToXml.java @@ -149,7 +149,7 @@ public class SasCsvToXml { } public void convert(String fields, List<SasFieldInfo> availableFields) throws IOException { - SasUtils.logInfo("Starting converting CSV to XML..."); + SasUtils.logInfo("Starting converting CSV to XML" + (!_groupTumors ? " (tumor grouping disabled) " : "") + "..."); int numXmlFields = -1, numCsvFields = -1; List<String> unusedCsvField = null; try {
Trying to figure out why option is not working
imsweb_naaccr-xml
train
java
d7244fc1e085c24dda5505dfa10c390a2f19b508
diff --git a/_pydev_runfiles/pydev_runfiles_pytest2.py b/_pydev_runfiles/pydev_runfiles_pytest2.py index <HASH>..<HASH> 100644 --- a/_pydev_runfiles/pydev_runfiles_pytest2.py +++ b/_pydev_runfiles/pydev_runfiles_pytest2.py @@ -164,10 +164,16 @@ except ImportError: def _get_error_contents_from_report(report): if report.longrepr is not None: - tw = TerminalWriter(stringio=True) + try: + tw = TerminalWriter(stringio=True) + stringio = tw.stringio + except TypeError: + import io + stringio = io.StringIO() + tw = TerminalWriter(file=stringio) tw.hasmarkup = False report.toterminal(tw) - exc = tw.stringio.getvalue() + exc = stringio.getvalue() s = exc.strip() if s: return s
Fix to support latest pytest
fabioz_PyDev.Debugger
train
py
bcfdf2c64c0dfabdd25cdad9d3598138a0fea6d7
diff --git a/platform/android/build/android_tools.rb b/platform/android/build/android_tools.rb index <HASH>..<HASH> 100644 --- a/platform/android/build/android_tools.rb +++ b/platform/android/build/android_tools.rb @@ -345,7 +345,7 @@ def load_app_and_run(device_flag, apkfile, pkgname) while count < 20 theoutput = "" begin - status = Timeout::timeout(30) do + status = Timeout::timeout(300) do puts "CMD: #{cmd}" IO.popen(argv) do |pipe| child = pipe.pid
platform/android/build/android_tools.rb: install timeout is increased to <I>s (framework_spec on Win<I> Virtual Box)
rhomobile_rhodes
train
rb
2098f6ddbb2605ff724c3fbcc1de379574356ed8
diff --git a/lib/filelib.php b/lib/filelib.php index <HASH>..<HASH> 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -475,14 +475,6 @@ function put_records_csv($file, $records, $table = NULL) { } -if (!function_exists('file_get_contents')) { - function file_get_contents($file) { - $file = file($file); - return !$file ? false : implode('', $file); - } -} - - /** * Recursively delete the file or folder with path $location. That is, * if it is a file delete it. If it is a folder, delete all its content
MDL-<I> obsoleted file_get_contents() emulation removed from filelib
moodle_moodle
train
php
37b428ebb5d10b0c38acbe41374d046024698221
diff --git a/.jsdoc.js b/.jsdoc.js index <HASH>..<HASH> 100644 --- a/.jsdoc.js +++ b/.jsdoc.js @@ -31,7 +31,8 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'build/src' + 'build/src', + 'protos' ], includePattern: '\\.js$' }, @@ -42,7 +43,7 @@ module.exports = { systemName: '@google-cloud/bigquery-data-transfer', theme: 'lumen', default: { - "outputSourceFiles": false + outputSourceFiles: false } }, markdown: {
chore: update .jsdoc.js by add protos and remove double quotes (#<I>)
googleapis_nodejs-bigquery-data-transfer
train
js
5fc93e2fc44df2efa6926e2b1064471b8bc222b2
diff --git a/components/http.php b/components/http.php index <HASH>..<HASH> 100644 --- a/components/http.php +++ b/components/http.php @@ -12,6 +12,7 @@ class QM_Component_HTTP extends QM_Component { add_action( 'http_api_debug', array( $this, 'http_debug' ), 99, 5 ); add_filter( 'http_request_args', array( $this, 'http_request' ), 99, 2 ); add_filter( 'http_response', array( $this, 'http_response' ), 99, 3 ); + add_filter( 'pre_http_request', array( $this, 'http_response' ), 99, 3 ); add_filter( 'query_monitor_menus', array( $this, 'admin_menu' ), 60 ); }
Catch the return value of the `pre_http_request` filter so we can log any `WP_Error`s returned here by plugins
johnbillion_query-monitor
train
php
c057ccd386621073911905a8e8b632d8cfc1d589
diff --git a/src/Message/Response/AbstractRabobankResponse.php b/src/Message/Response/AbstractRabobankResponse.php index <HASH>..<HASH> 100644 --- a/src/Message/Response/AbstractRabobankResponse.php +++ b/src/Message/Response/AbstractRabobankResponse.php @@ -43,9 +43,10 @@ class AbstractRabobankResponse extends AbstractResponse if (!isset($this->data['signature'])) { return; } - - $signatureData = $this->data; - unset($signatureData['signature']); + + $signatureData = [ + 'redirectUrl' => $this->data['redirectUrl'] ?? '', + ]; $signature = $this->request->gateway->generateSignature($this->flattenData($signatureData));
Update AbstractRabobankResponse.php Changed the building of the signatureData array. Since only the redirectURl is needed to validate the purchase response url we should make sure its the only thing in the array.
thephpleague_omnipay-rabobank
train
php
d72dccfbe13d5e0da6bd0c67be1de96d0535a17a
diff --git a/lib/config/presets.js b/lib/config/presets.js index <HASH>..<HASH> 100644 --- a/lib/config/presets.js +++ b/lib/config/presets.js @@ -20,7 +20,7 @@ async function resolveConfigPresets( ); let config = {}; // First, merge all the preset configs from left to right - if (inputConfig.extends) { + if (inputConfig.extends && inputConfig.extends.length) { logger.debug('Found presets'); for (const preset of inputConfig.extends) { // istanbul ignore if @@ -44,7 +44,8 @@ async function resolveConfigPresets( logger.trace({ config }, `Post-merge resolve config`); for (const key of Object.keys(config)) { const val = config[key]; - if (isObject(val) && key !== 'logger') { + const ignoredKeys = ['api', 'content', 'logger']; + if (isObject(val) && ignoredKeys.indexOf(key) === -1) { // Resolve nested objects logger.trace(`Resolving object "${key}"`); config[key] = await resolveConfigPresets(val, logger, existingPresets);
fix: do not resolve packageFile content (#<I>)
renovatebot_renovate
train
js
af92b31a62db1408b175bd668fa28851a6f25a3a
diff --git a/jaraco/__init__.py b/jaraco/__init__.py index <HASH>..<HASH> 100644 --- a/jaraco/__init__.py +++ b/jaraco/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore diff --git a/jaraco/util/exceptions.py b/jaraco/util/exceptions.py index <HASH>..<HASH> 100644 --- a/jaraco/util/exceptions.py +++ b/jaraco/util/exceptions.py @@ -1,6 +1,6 @@ from __future__ import unicode_literals -from jaraco import context +from jaraco import context # type: ignore def throws_exception(callable, *exceptions):
🧎‍♀️ Genuflect to the types.
jaraco_jaraco.util
train
py,py
39d38d20e394a6d7f9028f97da047e663c0147cd
diff --git a/Sniffs/Commenting/FunctionCommentSniff.php b/Sniffs/Commenting/FunctionCommentSniff.php index <HASH>..<HASH> 100644 --- a/Sniffs/Commenting/FunctionCommentSniff.php +++ b/Sniffs/Commenting/FunctionCommentSniff.php @@ -221,8 +221,11 @@ class ONGR_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_Sni // Check for a comment description. $short = $comment->getShortComment(); if (trim($short) === '') { - $error = 'Missing short description in function doc comment'; - $phpcsFile->addError($error, $commentStart, 'MissingShort'); + if (preg_match('/^(set|get|has|add|is)[A-Z]/', $this->_methodName) !== 1) { + $error = 'Missing short description in function doc comment'; + $phpcsFile->addError($error, $commentStart, 'MissingShort'); + } + return; }
Allow getters / setters without short doc
ongr-archive_ongr-strict-standard
train
php
798de515fe4e9e2ff4aa5425d9591164c7223139
diff --git a/src/main/java/com/github/davidcarboni/cryptolite/GenerateRandom.java b/src/main/java/com/github/davidcarboni/cryptolite/GenerateRandom.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/github/davidcarboni/cryptolite/GenerateRandom.java +++ b/src/main/java/com/github/davidcarboni/cryptolite/GenerateRandom.java @@ -31,8 +31,7 @@ public class GenerateRandom { public static final String ALGORITHM = "SHA1PRNG"; // Work out the right number of bytes for random tokens: - private static final int bitsInAByte = 8; - private static final int tokenLengthBytes = TOKEN_BITS / bitsInAByte; + private static final int tokenLengthBytes = TOKEN_BITS / 8; // Characters for pasword generation: private static final String passwordCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
Because the number of bits in a byte isn't going to change and because it's clear enough with a magic number.
davidcarboni_cryptolite-java
train
java
3e8657fcabf90d03528cc8900ff838dadd1a4b7f
diff --git a/app/models/devise_token_auth/concerns/user.rb b/app/models/devise_token_auth/concerns/user.rb index <HASH>..<HASH> 100644 --- a/app/models/devise_token_auth/concerns/user.rb +++ b/app/models/devise_token_auth/concerns/user.rb @@ -99,11 +99,7 @@ module DeviseTokenAuth::Concerns::User end def database_exists? - ActiveRecord::Base.connection - rescue ActiveRecord::NoDatabaseError - false - else - true + ActiveRecord::Base.connection_pool.with_connection { |con| con.active? } rescue false end end
Better implementation to test if connection to db is active
lynndylanhurley_devise_token_auth
train
rb
4b11d8d735086e9b915c1c8cbee72f81f7d1a0e7
diff --git a/eZ/Publish/Core/REST/Server/index.php b/eZ/Publish/Core/REST/Server/index.php index <HASH>..<HASH> 100644 --- a/eZ/Publish/Core/REST/Server/index.php +++ b/eZ/Publish/Core/REST/Server/index.php @@ -249,6 +249,8 @@ $valueObjectVisitors = array( '\\eZ\\Publish\\Core\\REST\\Server\\Values\\PolicyList' => new Output\ValueObjectVisitor\PolicyList( $urlHandler ), '\\eZ\\Publish\\API\\Repository\\Values\\User\\Limitation' => new Output\ValueObjectVisitor\Limitation( $urlHandler ), '\\eZ\\Publish\\Core\\REST\\Server\\Values\\RoleAssignmentList' => new Output\ValueObjectVisitor\RoleAssignmentList( $urlHandler ), + '\\eZ\\Publish\\API\\Repository\\Values\\User\\UserRoleAssignment' => new Output\ValueObjectVisitor\UserRoleAssignment( $urlHandler ), + '\\eZ\\Publish\\API\\Repository\\Values\\User\\UserGroupRoleAssignment' => new Output\ValueObjectVisitor\UserGroupRoleAssignment( $urlHandler ), // Location
REST: Add User(Group)RoleAssignment visitors
ezsystems_ezpublish-kernel
train
php
3080f6dee16e81df50064c08c35af7f966e68a0d
diff --git a/Swat/SwatPercentageEntry.php b/Swat/SwatPercentageEntry.php index <HASH>..<HASH> 100644 --- a/Swat/SwatPercentageEntry.php +++ b/Swat/SwatPercentageEntry.php @@ -39,7 +39,7 @@ class SwatPercentageEntry extends SwatFloatEntry { parent::process(); - if (($this->value >= 0) and ($this->value <= 100)) + if (($this->value >= 0) && ($this->value <= 100)) $this->value = $this->value / 100; else { $message = Swat::_('Please use a number between 0 and 100'); @@ -60,7 +60,7 @@ class SwatPercentageEntry extends SwatFloatEntry */ protected function getDisplayValue() { - if (is_float($this->value) and ($this->value >= 0) and ($this->value <= 100)) + if (is_float($this->value) && ($this->value >= 0) && ($this->value <= 100)) return ($this->value * 100).'%'; }
Use '&&' as the logical AND operator. svn commit r<I>
silverorange_swat
train
php
33c8afc96e60b1d2f59fb2bda6139c8115326e4d
diff --git a/python_modules/dagster/dagster/core/host_representation/repository_location.py b/python_modules/dagster/dagster/core/host_representation/repository_location.py index <HASH>..<HASH> 100644 --- a/python_modules/dagster/dagster/core/host_representation/repository_location.py +++ b/python_modules/dagster/dagster/core/host_representation/repository_location.py @@ -317,7 +317,9 @@ class PythonEnvRepositoryLocation(RepositoryLocation): recon_repo = ReconstructableRepository(pointer) execution_plan = create_execution_plan( - pipeline=recon_repo.get_reconstructable_pipeline(external_pipeline.name), + pipeline=recon_repo.get_reconstructable_pipeline( + external_pipeline.name + ).subset_for_execution_from_existing_pipeline(external_pipeline.solids_to_execute), run_config=run_config, mode=pipeline_run.mode, step_keys_to_execute=step_keys_to_execute,
[celery-k8s] fix solid subset part 2 Summary: just like D<I> Test Plan: eyes Reviewers: yuhan Reviewed By: yuhan Differential Revision: <URL>
dagster-io_dagster
train
py
3d65bb7b8051e28d41eaf6c5a7b804a53cfab672
diff --git a/lib/stripe_mock/request_handlers/payment_methods.rb b/lib/stripe_mock/request_handlers/payment_methods.rb index <HASH>..<HASH> 100644 --- a/lib/stripe_mock/request_handlers/payment_methods.rb +++ b/lib/stripe_mock/request_handlers/payment_methods.rb @@ -1,7 +1,6 @@ module StripeMock module RequestHandlers module PaymentMethods - ALLOWED_PARAMS = [:customer, :type] def PaymentMethods.included(klass) @@ -52,26 +51,6 @@ module StripeMock Data.mock_list_object(clone.values, params) end - - # - # params: {:customer=>"test_cus_3"} - # - def attach_payment_method(route, method_url, params, headers) - route =~ method_url - id = $1 - payment_methods[id].merge!(params) - payment_methods[id].clone - end - - def detach_payment_method(route, method_url, params, headers) - - end - - def get_payment_method(route, method_url, params, headers) - route =~ method_url - id = $1 - assert_existence(:payment_method, $1, payment_methods[id]) - end # post /v1/payment_methods/:id/attach def attach_payment_method(route, method_url, params, headers)
Remove empty and duplicated methods from payment methods #<I>
rebelidealist_stripe-ruby-mock
train
rb
59bc997d8e8fec7e872638896b6d2fa52f9538ad
diff --git a/src/remoteStorage.js b/src/remoteStorage.js index <HASH>..<HASH> 100644 --- a/src/remoteStorage.js +++ b/src/remoteStorage.js @@ -91,11 +91,11 @@ define([ // // // to use that code from an app, you need to add: // - // remoteStorage.claimAccess('beers', 'rw'); + // remoteStorage.claimAccess('beers', 'rw').then(function() { + // remoteStorage.displayWidget() // - // remoteStorage.displayWidget(/* see documentation */) - // - // remoteStorage.beers.addBeer('<replace-with-favourite-beer-kind>'); + // remoteStorage.beers.addBeer('<replace-with-favourite-beer-kind>'); + // }); // // (end code) //
remoteStorage doc: updated claimAccess/displayWidget example code to chain promises as well
remotestorage_remotestorage.js
train
js
91754ae31f631bb8bf4e9717799730be07a6331b
diff --git a/setuptools/tests/test_msvc9compiler.py b/setuptools/tests/test_msvc9compiler.py index <HASH>..<HASH> 100644 --- a/setuptools/tests/test_msvc9compiler.py +++ b/setuptools/tests/test_msvc9compiler.py @@ -1,8 +1,5 @@ -"""msvc9compiler monkey patch test - -This test ensures that importing setuptools is sufficient to replace -the standard find_vcvarsall function with our patched version that -finds the Visual C++ for Python package. +""" +Tests for msvc9compiler. """ import os @@ -57,6 +54,11 @@ def mock_reg(hkcu=None, hklm=None): class TestModulePatch: + """ + Ensure that importing setuptools is sufficient to replace + the standard find_vcvarsall function with a version that + recognizes the "Visual C++ for Python" package. + """ key_32 = r'software\microsoft\devdiv\vcforpython\9.0\installdir' key_64 = r'software\wow6432node\microsoft\devdiv\vcforpython\9.0\installdir'
Move docstring to test class.
pypa_setuptools
train
py
55de1d635db1d2c5e35033b258f546b83ffc153e
diff --git a/src/csv_export_util.js b/src/csv_export_util.js index <HASH>..<HASH> 100644 --- a/src/csv_export_util.js +++ b/src/csv_export_util.js @@ -29,7 +29,7 @@ function toString(data, keys, separator, excludeCSVHeader) { for (let i = firstRow; i <= rowCount; i++) { dataString += headCells.map(x => { if ((x.row + (x.rowSpan - 1)) === i) { - return x.header; + return `"${x.header}"`; } if (x.row === i && x.rowSpan > 1) { return '';
Add quotation marks to header cells on CSV export
AllenFang_react-bootstrap-table
train
js
0654d53643f7e2be68098708e0ee8de23e7ed886
diff --git a/src/ServiceManager.php b/src/ServiceManager.php index <HASH>..<HASH> 100644 --- a/src/ServiceManager.php +++ b/src/ServiceManager.php @@ -678,10 +678,7 @@ class ServiceManager implements ServiceLocatorInterface } } - throw new ServiceNotFoundException(sprintf( - 'Unable to resolve service "%s" to a factory; are you certain you provided it during configuration?', - $name - )); + throw ServiceNotFoundException::fromUnknownService($name); } /**
Changed exception creation to named constructor.
mxc-commons_mxc-servicemanager
train
php
547f4027cea832082754e4eb47224fe3413be29a
diff --git a/TYPO3.Eel/Classes/TYPO3/Eel/FlowQuery/Operations/Object/FilterOperation.php b/TYPO3.Eel/Classes/TYPO3/Eel/FlowQuery/Operations/Object/FilterOperation.php index <HASH>..<HASH> 100644 --- a/TYPO3.Eel/Classes/TYPO3/Eel/FlowQuery/Operations/Object/FilterOperation.php +++ b/TYPO3.Eel/Classes/TYPO3/Eel/FlowQuery/Operations/Object/FilterOperation.php @@ -25,7 +25,7 @@ use TYPO3\Flow\Annotations as Flow; * = * Strict equality of value and operand * != - * Strict no equality of value and operand + * Strict inequality of value and operand * $= * Value ends with operand (string-based) * ^=
[TASK] Adjust doc comment for FlowQuery filter operation Change-Id: I<I>a<I>dbe<I>df<I>d<I>a5a<I>b<I>e1 Releases: master Reviewed-on: <URL>
neos_flow-development-collection
train
php
a00ff0d192f123aba17af701f524b6523d486bd5
diff --git a/tests/Probability/Distribution/Continuous/StudentTTest.php b/tests/Probability/Distribution/Continuous/StudentTTest.php index <HASH>..<HASH> 100644 --- a/tests/Probability/Distribution/Continuous/StudentTTest.php +++ b/tests/Probability/Distribution/Continuous/StudentTTest.php @@ -74,12 +74,16 @@ class StudentTTest extends \PHPUnit_Framework_TestCase public function dataProviderForMean() { return [ - [1, null], [2, 0], [3, 0], ]; } + public function testMeanNAN() + { + $this->assertNan(StudentT::mean(1)); + } + /** * @dataProvider dataProviderForInverse */
update mean of StudentT to NAN if v<1 was null
markrogoyski_math-php
train
php
4598edc800c9fddfd55d647a997ee2a43ca4b5f7
diff --git a/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java b/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java index <HASH>..<HASH> 100644 --- a/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java +++ b/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java @@ -58,7 +58,7 @@ public class UserResource { private static final Logger LOGGER = LoggerFactory.getLogger(UserResource.class); private static final Pattern USERNAME_PATTERN = Pattern.compile("^.{5,}$"); - private static final Pattern PASSWORD_PATTERN = Pattern.compile("^[a-zA-Z0-9_-]{5,}$"); + private static final Pattern PASSWORD_PATTERN = Pattern.compile("^[^\\x00-\\x1F]{5,}$"); private static final Pattern EMAIL_PATTERN = Pattern.compile("^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"); private UserService userService;
Allow unicode characters in passwords.
Wadpam_guja
train
java
90d0f46c8b835758653f28e2695dd8410e3f1e60
diff --git a/app_generators/ruby_app/ruby_app_generator.rb b/app_generators/ruby_app/ruby_app_generator.rb index <HASH>..<HASH> 100644 --- a/app_generators/ruby_app/ruby_app_generator.rb +++ b/app_generators/ruby_app/ruby_app_generator.rb @@ -56,7 +56,7 @@ class RubyAppGenerator < RubiGen::Base opts.separator 'Options:' opts.on("-r", "--ruby=path", String, "Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path).", - "Default: #{DEFAULT_SHEBANG}") { |options[:shebang]| } + "Default: #{DEFAULT_SHEBANG}") { |v| options[:shebang] = v } end diff --git a/lib/rubigen/lookup.rb b/lib/rubigen/lookup.rb index <HASH>..<HASH> 100644 --- a/lib/rubigen/lookup.rb +++ b/lib/rubigen/lookup.rb @@ -168,7 +168,7 @@ module RubiGen private # Lookup and cache every generator from the source list. def cache - @cache ||= sources.inject([]) { |cache, source| cache + source.map } + @cache ||= sources.inject([]) { |cache, source| cache + source.to_a } end # Clear the cache whenever the source list changes.
fixed some ruby <I> breakages
drnic_rubigen
train
rb,rb
0cdfba198a3f1dda85618118ebd980a9ce3a1af9
diff --git a/app/utils/pouch-views.js b/app/utils/pouch-views.js index <HASH>..<HASH> 100644 --- a/app/utils/pouch-views.js +++ b/app/utils/pouch-views.js @@ -333,7 +333,8 @@ var designDocs = [{ patientListingKey + '}' ), - version: 2 + sort: patientListingSearch, + version: 3 }, { name: 'photo_by_patient', function: generateView('photo',
Added back patientListingSearch It was accidentally removed in the merge.
HospitalRun_hospitalrun-frontend
train
js
c570a585f421ad344a191bd8ce6bfd4e4e82eb4e
diff --git a/rw/plugins/mail_local.py b/rw/plugins/mail_local.py index <HASH>..<HASH> 100644 --- a/rw/plugins/mail_local.py +++ b/rw/plugins/mail_local.py @@ -73,7 +73,6 @@ class Handler(RequestHandler): html = unicode(mail_part.get_payload(decode=True), str(charset), "ignore") self.finish(html) - @post('/delete') def delete(self): mid = int(self.get_argument('mid')) @@ -83,6 +82,14 @@ class Handler(RequestHandler): cPickle.dump(data, open(DB_PATH, 'w')) self.redirect('/_p/rw.mail_local/') + @get('/json/count') + def count_json(self): + count = 0 + if os.path.exists(DB_PATH): + mails = cPickle.load(open(DB_PATH)) + count = len(mails) + self.finish({'count': count}) + class HandlerPlug(rplug.rw.www): name = 'rw.mail_local'
Added function to return unread messages as json.
FlorianLudwig_rueckenwind
train
py
ce712a0945f2b6b9ac4ee6e1e7c00062bdf89201
diff --git a/lib/KurentoClient.js b/lib/KurentoClient.js index <HASH>..<HASH> 100644 --- a/lib/KurentoClient.js +++ b/lib/KurentoClient.js @@ -177,6 +177,8 @@ function noop(error, result) { * Timeout while a response is being stored * @property {external:Number} [duplicates_timeout=20000] * Timeout to ignore duplicated responses + * @property {Object} [socket] + * Websocket connection options */ /** @@ -906,7 +908,7 @@ function KurentoClient(ws_uri, options, callback) { onConnected(); } }) - .connect(ws_uri); + .connect(ws_uri, options.socket); Object.defineProperty(this, '_re', { get: function () {
Forward WebSocket connection options to reconnect-ws when constructing KurentoClient instance.
Kurento_kurento-client-js
train
js
0b00c57c65f8e09c490b5657d69591fd52f698a1
diff --git a/src/com/googlecode/jmxtrans/util/JmxUtils.java b/src/com/googlecode/jmxtrans/util/JmxUtils.java index <HASH>..<HASH> 100644 --- a/src/com/googlecode/jmxtrans/util/JmxUtils.java +++ b/src/com/googlecode/jmxtrans/util/JmxUtils.java @@ -294,7 +294,7 @@ public class JmxUtils { private static void getResult(List<Result> resList, MBeanInfo info, ObjectInstance oi, Attribute attribute, Query query) { Object value = attribute.getValue(); if (value != null) { - if (value instanceof CompositeDataSupport) { + if (value instanceof CompositeData) { getResult(resList, info, oi, attribute.getName(), (CompositeData) value, query); } else if (value instanceof CompositeData[]) { for (CompositeData cd : (CompositeData[]) value) {
Compare to interface not impl for CompositeData checking for CompositeDataSupport is more specific than it needs to be. (The next line casts the value to "CompositeData") - this change will allow certain Gc fields to be parsed properly that implement CompositeData but do not extend CompositeDataSupport
jmxtrans_jmxtrans
train
java
fc11722e644870b7d6b3e608aebddf3d21197104
diff --git a/PhpAmqpLib/Connection/AMQPSSLConnection.php b/PhpAmqpLib/Connection/AMQPSSLConnection.php index <HASH>..<HASH> 100644 --- a/PhpAmqpLib/Connection/AMQPSSLConnection.php +++ b/PhpAmqpLib/Connection/AMQPSSLConnection.php @@ -40,6 +40,7 @@ class AMQPSSLConnection extends AMQPStreamConnection isset($options['keepalive']) ? $options['keepalive'] : false, isset($options['heartbeat']) ? $options['heartbeat'] : 0, isset($options['channel_rpc_timeout']) ? $options['channel_rpc_timeout'] : 0.0, + $ssl_protocol ); }
Return SSL protocol param in SSL connection
php-amqplib_php-amqplib
train
php
1fff85f82871bb37608d4d1a25a3390f6f69a732
diff --git a/server/src/main/java/org/openqa/selenium/server/SeleniumServer.java b/server/src/main/java/org/openqa/selenium/server/SeleniumServer.java index <HASH>..<HASH> 100644 --- a/server/src/main/java/org/openqa/selenium/server/SeleniumServer.java +++ b/server/src/main/java/org/openqa/selenium/server/SeleniumServer.java @@ -362,7 +362,7 @@ public class SeleniumServer { if ("".equals(userInput)) continue; if (!userInput.startsWith("cmd=") && !userInput.startsWith("commandResult=")) { - System.err.println("ERROR - Invalid command: " + userInput); + System.err.println("ERROR - Invalid command: \"" + userInput + "\""); continue; }
Show invalid user input with quotes so that it will be easier to see leading spaces r<I>
SeleniumHQ_selenium
train
java
d4a3637e17d52e45e2434c58871154c307877e37
diff --git a/src/SAML2/AuthnRequestFactory.php b/src/SAML2/AuthnRequestFactory.php index <HASH>..<HASH> 100644 --- a/src/SAML2/AuthnRequestFactory.php +++ b/src/SAML2/AuthnRequestFactory.php @@ -38,7 +38,8 @@ class AuthnRequestFactory */ public static function createFromHttpRequest(Request $httpRequest) { - $samlRequest = gzinflate(base64_decode(urldecode($httpRequest->get(AuthnRequest::PARAMETER_REQUEST)))); + // the GET parameter is already urldecoded by Symfony, so we should not do it again. + $samlRequest = gzinflate(base64_decode($httpRequest->get(AuthnRequest::PARAMETER_REQUEST))); $document = new DOMDocument(); $document->loadXML($samlRequest);
Fix SAMLRequest parsing
OpenConext_Stepup-saml-bundle
train
php
99db08550ae8ec06e85fefe780f48183776ddc21
diff --git a/heimdall/take_screenshot.py b/heimdall/take_screenshot.py index <HASH>..<HASH> 100644 --- a/heimdall/take_screenshot.py +++ b/heimdall/take_screenshot.py @@ -1,4 +1,4 @@ -from heimdall import screenshot +from heimdall.heimdall import screenshot if __name__ == '__main__':
update take_screenshot.py Update needed in order for heimdall to work with Python3
DistilledLtd_heimdall
train
py
f6959138360a8183e898dfe10cbbb054e7935362
diff --git a/packages/components/bolt-carousel/__tests__/carousel.js b/packages/components/bolt-carousel/__tests__/carousel.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-carousel/__tests__/carousel.js +++ b/packages/components/bolt-carousel/__tests__/carousel.js @@ -19,7 +19,7 @@ const vrtDefaultConfig = { }, }; -const timeout = 120000; +const timeout = 180000; const viewportSizes = [ {
fix: increase max timeout in Carousel component Jest tests to reduce errors thrown
bolt-design-system_bolt
train
js
e707168cf268369327127a43c56663f28c7ccb87
diff --git a/spyder/utils/introspection/manager.py b/spyder/utils/introspection/manager.py index <HASH>..<HASH> 100644 --- a/spyder/utils/introspection/manager.py +++ b/spyder/utils/introspection/manager.py @@ -33,7 +33,7 @@ dependencies.add('rope', _("Editor's code completion, go-to-definition and help"), required_version=ROPE_REQVER) -JEDI_REQVER = '>=0.8.1' +JEDI_REQVER = '=0.9.0' dependencies.add('jedi', _("Editor's code completion, go-to-definition and help"), required_version=JEDI_REQVER)
Introspection: Change Jedi required version to <I>
spyder-ide_spyder
train
py
62fbc542088b690e0e2dd107401e85c2b15cd03f
diff --git a/pycdlib/pycdlib.py b/pycdlib/pycdlib.py index <HASH>..<HASH> 100644 --- a/pycdlib/pycdlib.py +++ b/pycdlib/pycdlib.py @@ -1421,7 +1421,7 @@ class PyCdlib(object): if self.enhanced_vd is not None: self.enhanced_vd.root_directory_record().new_extent_loc = self.pvd.root_directory_record().new_extent_loc - self.needs_reshuffling = False + self._needs_reshuffle = False def _add_child_to_dr(self, child, logical_block_size): '''
Make sure to clear the proper _needs_reshuffle flag.
clalancette_pycdlib
train
py
7882ca52346b9ba0bb7f0f01bcdb9dae5f500673
diff --git a/test/integration/test_buildtasks_api.py b/test/integration/test_buildtasks_api.py index <HASH>..<HASH> 100644 --- a/test/integration/test_buildtasks_api.py +++ b/test/integration/test_buildtasks_api.py @@ -1,8 +1,11 @@ __author__ = 'thauser' +import pytest + from test import testutils from pnc_cli import utils from pnc_cli.swagger_client.apis import BuildtasksApi + tasks_api = BuildtasksApi(utils.get_api_client()) @@ -18,6 +21,7 @@ def test_build_task_completed_invalid_param(): testutils.assert_raises_typeerror(tasks_api, 'build_task_completed', task_id=1, build_status='NEW') [email protected](reason='unsure of how to test this correctly.') def test_build_task_completed(): response = tasks_api.build_task_completed(task_id=1, build_status='NEW') assert response
xfail the buildtasks api tests for now.
project-ncl_pnc-cli
train
py
ff01764f95534ac5f5ddf497d7faa063200ea02d
diff --git a/src/app/panels/timepicker/module.js b/src/app/panels/timepicker/module.js index <HASH>..<HASH> 100644 --- a/src/app/panels/timepicker/module.js +++ b/src/app/panels/timepicker/module.js @@ -77,8 +77,8 @@ function (angular, app, _, moment, kbn) { $scope.temptime = cloneTime($scope.time); // Date picker needs the date to be at the start of the day - $scope.temptime.from.date.setHours(0,0,0,0); - $scope.temptime.to.date.setHours(0,0,0,0); + $scope.temptime.from.date.setHours(1,0,0,0); + $scope.temptime.to.date.setHours(1,0,0,0); $q.when(customTimeModal).then(function(modalEl) { modalEl.modal('show');
Fixes #<I>, custom datetime picker is one day off
grafana_grafana
train
js
be1abdc8605a5bec71167dc19ece23b1f5dd3e40
diff --git a/src/Log.php b/src/Log.php index <HASH>..<HASH> 100644 --- a/src/Log.php +++ b/src/Log.php @@ -1,8 +1,6 @@ <?php namespace Phwoolcon; -use Exception; -use Phwoolcon\Exception\Http\NotFoundException; use Phalcon\Di; use Phalcon\Logger; use Phalcon\Logger\Adapter\File; @@ -27,7 +25,10 @@ class Log extends Logger static::log(static::ERROR, $message, $context); } - public static function exception(Exception $e) + /** + * @param \Throwable $e + */ + public static function exception($e) { $message = get_class($e); $e instanceof HttpException or $message .= "\n" . $e->__toString();
fix: php7 compatibility in log::exception()
phwoolcon_phwoolcon
train
php
e9c8f2c6ab390c706680c6077d344cecffb71397
diff --git a/conllu/models.py b/conllu/models.py index <HASH>..<HASH> 100644 --- a/conllu/models.py +++ b/conllu/models.py @@ -113,7 +113,7 @@ class TokenList(T.List[Token]): token = self._dict_to_token_and_set_defaults(token) super(TokenList, self).append(token) - def insert(self, i: int, token: T.Union[dict, Token]) -> None: + def insert(self, i: 'SupportsIndex', token: T.Union[dict, Token]) -> None: token = self._dict_to_token_and_set_defaults(token) super(TokenList, self).insert(i, token)
Fix mypy error by making insert annotation more general.
EmilStenstrom_conllu
train
py
8af38a1a4a0c381b2b1fe44d29d5441452381104
diff --git a/fedmsg_meta_fedora_infrastructure/tests/pagure.py b/fedmsg_meta_fedora_infrastructure/tests/pagure.py index <HASH>..<HASH> 100644 --- a/fedmsg_meta_fedora_infrastructure/tests/pagure.py +++ b/fedmsg_meta_fedora_infrastructure/tests/pagure.py @@ -2092,7 +2092,7 @@ class TestIssueDrop(Base): } -class TestIssueCommentEditLegacy(Base): +class TestIssueCommentEdit(Base): """ These messages are published when someone edits a comment on a ticket on `pagure <https://pagure.io>`_. """
Rename TestIssueCommentEditLegacy to TestIssueCommentEdit Since these tests are still actual and valid and thus not legacy
fedora-infra_fedmsg_meta_fedora_infrastructure
train
py
e40d68678e471d6be97b8083c68d7c2df516bb32
diff --git a/jsonrpc2/all_test.go b/jsonrpc2/all_test.go index <HASH>..<HASH> 100644 --- a/jsonrpc2/all_test.go +++ b/jsonrpc2/all_test.go @@ -270,7 +270,11 @@ func TestBadHTTP2Server(t *testing.T) { if err != nil { t.Fatalf("[%#q] Write(), err = %v", c, err) } - resp, err := http.ReadResponse(bufio.NewReader(conn), nil) + req, err := http.NewRequest("POST", ts.URL, strings.NewReader(c)) + if err != nil { + t.Errorf("[%#q] NewRequest(), err = %v", c, err) + } + resp, err := http.ReadResponse(bufio.NewReader(conn), req) if err != nil { t.Fatalf("[%#q] ReadResponse(), err = %v", c, err) }
fix tests for go-<I>
powerman_rpc-codec
train
go
ad45180fcdea4bf679cceead3f17676469962733
diff --git a/yotta/test/test_versions.py b/yotta/test/test_versions.py index <HASH>..<HASH> 100644 --- a/yotta/test/test_versions.py +++ b/yotta/test/test_versions.py @@ -18,9 +18,9 @@ class VersionTestCase(unittest.TestCase): ['0.1.2-alpha', '0.1.2', '1.3.4'], ), '>=0.1.0,!=0.1.3-rc1,<0.1.4': ( - ['0.1.1', 'v0.1.0+b4', '0.1.2', '0.1.3-rc2'], - ['0.0.1', '0.1.4', '0.1.4-alpha', '0.1.3-rc1+4', - '0.1.0-alpha', 'v0.2.2', '0.2.2', '0.1.4-rc1'], + # 0.1.0-alpha satisfies >=0.1.0, but is lower precedence than 0.1.0 + ['0.1.0-alpha', '0.1.1', 'v0.1.0+b4', '0.1.2', '0.1.3-rc2'], + ['0.0.1', '0.1.4', '0.1.4-alpha', '0.1.3-rc1+4', 'v0.2.2', '0.2.2', '0.1.4-rc1'] ), '^1.2.3':( ['1.2.3', '1.5.1'],
prerelease versions are (and should be) matched by >= version
ARMmbed_yotta
train
py
89bfa25165ce50728368500bfcf76c791e6c0138
diff --git a/codebird.js b/codebird.js index <HASH>..<HASH> 100644 --- a/codebird.js +++ b/codebird.js @@ -1219,7 +1219,7 @@ var Codebird = function () { var xml = null; if (typeof window === "object" && window - && typeof window.XMLHttpRequest === "function" + && typeof window.XMLHttpRequest !== "undefined" ) { xml = new window.XMLHttpRequest(); } else if (typeof require === "function"
Change window.XMLHttpRequest typeof check to look for not-undefined, instead of function. Now detects XHR on Safari properly.
jublo_codebird-js
train
js
cb87f06c60117b74fe7902182520178d2a71c770
diff --git a/Test/Integration/Collection/CollectHooksTest.php b/Test/Integration/Collection/CollectHooksTest.php index <HASH>..<HASH> 100644 --- a/Test/Integration/Collection/CollectHooksTest.php +++ b/Test/Integration/Collection/CollectHooksTest.php @@ -52,7 +52,7 @@ class CollectHooksTest extends CollectionTestBase { $body = $hook_entity_base_field_info_data['body']; $this->assertNotEmpty($body); - $this->assertContains( + $this->assertStringContainsStringIgnoringCase( "\$fields['mymodule_text'] = \Drupal\Core\Field\BaseFieldDefinition::create('string')", $body, 'The short class name in hook body code is replaced with the fully-qualified version.'
Updated for deprecated assertion usage.
drupal-code-builder_drupal-code-builder
train
php
37be46978428aac89e3261b901c2638000da84d2
diff --git a/zinnia/management/commands/wp2zinnia.py b/zinnia/management/commands/wp2zinnia.py index <HASH>..<HASH> 100644 --- a/zinnia/management/commands/wp2zinnia.py +++ b/zinnia/management/commands/wp2zinnia.py @@ -136,16 +136,20 @@ class Command(LabelCommand): while 42: user_text = "1. Select your user, by typing " \ "one of theses usernames:\n"\ - "[%s]\n"\ + "[%s] or 'back'\n"\ "Please select a choice: " % ', '.join(usernames) user_selected = raw_input(user_text) if user_selected in usernames: break + if user_selected.strip() == 'back': + return self.migrate_author(author_name) return users.get(username=user_selected) else: - create_text = "2. Please type the email of the '%s' user: " % \ - author_name + create_text = "2. Please type the email of " \ + "the '%s' user or 'back': " % author_name author_mail = raw_input(create_text) + if author_mail.strip() == 'back': + return self.migrate_author(author_name) try: return User.objects.create_user(author_name, author_mail) except IntegrityError:
can go back when migrating wp authors
Fantomas42_django-blog-zinnia
train
py
83cfb72508a4d3a8b8338269a72702b6f345b16a
diff --git a/pyradigm/base.py b/pyradigm/base.py index <HASH>..<HASH> 100644 --- a/pyradigm/base.py +++ b/pyradigm/base.py @@ -37,8 +37,9 @@ class BaseDataset(ABC): Parameters ----------- - target_type : type + target_type : type, callable Data type of the target for the child class. + Must be callable that takes in a datatype and converts to its own type. allow_nan_inf : bool or str Flag to indicate whether raise an error if NaN or Infinity values are @@ -47,9 +48,20 @@ class BaseDataset(ABC): 'Inf' to specify which value to allow depending on your needs. """ - self._target_type = target_type - self._allow_nan_inf = allow_nan_inf - self._encode_nonnumeric = encode_nonnumeric + if not callable(target_type): + raise TypeError('target type must be callable, to allow for conversion!') + else: + self._target_type = target_type + + if not isinstance(allow_nan_inf, (bool, str)): + raise TypeError('allow_nan_inf flag can only be bool or str') + else: + self._allow_nan_inf = allow_nan_inf + + if not isinstance(encode_nonnumeric, bool): + raise TypeError('encode_nonnumeric flag can only be bool') + else: + self._encode_nonnumeric = encode_nonnumeric @property
enforcing init expectations from child classes
raamana_pyradigm
train
py
2002f5e369169327151f7fef6d96661fa08d10b4
diff --git a/panoramix/views.py b/panoramix/views.py index <HASH>..<HASH> 100644 --- a/panoramix/views.py +++ b/panoramix/views.py @@ -352,15 +352,16 @@ class Panoramix(BaseView): datasource, form_data=request.args) if request.args.get("json") == "true": + status = 200 if config.get("DEBUG"): payload = obj.get_json() - try: - payload = obj.get_json() - status=200 - except Exception as e: - logging.exception(e) - payload = str(e) - status=500 + else: + try: + payload = obj.get_json() + except Exception as e: + logging.exception(e) + payload = str(e) + status = 500 return Response( payload, status=status,
Fix debug mode calls get_json twice
apache_incubator-superset
train
py
ca61ea7ab96f22b4479fc307c2240e5e348753c6
diff --git a/src/Codeception/Util/FileSystem.php b/src/Codeception/Util/FileSystem.php index <HASH>..<HASH> 100644 --- a/src/Codeception/Util/FileSystem.php +++ b/src/Codeception/Util/FileSystem.php @@ -44,13 +44,7 @@ class FileSystem } if (!is_dir($dir) || is_link($dir)) { - return unlink($dir); - } - - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { - $dir = str_replace('/', '\\', $dir); - exec('rd /s /q "'.$dir.'"'); - return true; + return @unlink($dir); } foreach (scandir($dir) as $item) { @@ -66,7 +60,7 @@ class FileSystem } } - return rmdir($dir); + return @rmdir($dir); } /**
reverted back changes in filesystem cleanup
Codeception_base
train
php
0dd91e802ef4eae2a86381cedc524673c82f3746
diff --git a/py3status/modules/systemd.py b/py3status/modules/systemd.py index <HASH>..<HASH> 100644 --- a/py3status/modules/systemd.py +++ b/py3status/modules/systemd.py @@ -14,6 +14,7 @@ Configuration parameters: 'inactive' the output is suppressed if the unit is inactive (default 'off') unit: specify the systemd unit to use (default 'dbus.service') + user: specify if this is a user service (default False) Format of status string placeholders: {unit} unit name, eg sshd.service @@ -51,7 +52,7 @@ not-found {'color': '#FFFF00', 'full_text': 'sshd.service: not-found'} """ -from pydbus import SystemBus +from pydbus import SessionBus, SystemBus class Py3status: @@ -64,9 +65,13 @@ class Py3status: hide_extension = False hide_if_default = "off" unit = "dbus.service" + user = False def post_config_hook(self): - bus = SystemBus() + if self.user: + bus = SessionBus() + else: + bus = SystemBus() systemd = bus.get("org.freedesktop.systemd1") self.systemd_unit = bus.get(".systemd1", systemd.LoadUnit(self.unit))
systemd: support user systemd units (#<I>)
ultrabug_py3status
train
py
addb0fcc5305a11b4e68f8ea8090fb7d01fb176f
diff --git a/runtime/src/main/java/com/tns/Runtime.java b/runtime/src/main/java/com/tns/Runtime.java index <HASH>..<HASH> 100644 --- a/runtime/src/main/java/com/tns/Runtime.java +++ b/runtime/src/main/java/com/tns/Runtime.java @@ -452,14 +452,16 @@ public class Runtime { throw new RuntimeException("Fail to initialize Require class", ex); } - if (debugger != null) { + // TODO: Pete: this.runtimeId == 0 is a temporary patching of jsDebugger not attaching on app start + // TODO: Pete: Debugger should not be created when a worker is created + if (debugger != null && this.runtimeId == 0) { jsDebugger = new JsDebugger(debugger, threadScheduler); } initNativeScript(getRuntimeId(), Module.getApplicationFilesPath(), logger.isEnabled(), appName, v8Config, callingJsDir, jsDebugger); - if (jsDebugger != null) { - // jsDebugger.start(); + if (jsDebugger != null && this.runtimeId == 0) { + jsDebugger.start(); } clearStartupData(getRuntimeId()); // It's safe to delete the data after the V8 debugger is initialized
Fix js debugger not attaching on app start
NativeScript_android-runtime
train
java