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
2cdbb84215066e70c9d537d59c8ea6f216923538
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,8 @@ def read_file(filename): setup( + setup_requires=['setuptools>=17.1'], + name='pwnypack', packages=['pwny', 'pwnypack'], version=__version__,
Require at least setuptools <I>. This specific version is the minimum requirement because it supports the “<“ operator in environment markers.
edibledinos_pwnypack
train
py
a75658d7b08334f783fb37394d1277b2c786c98b
diff --git a/src/java/com/threerings/jme/JmeApp.java b/src/java/com/threerings/jme/JmeApp.java index <HASH>..<HASH> 100644 --- a/src/java/com/threerings/jme/JmeApp.java +++ b/src/java/com/threerings/jme/JmeApp.java @@ -193,7 +193,7 @@ public class JmeApp } // enter the main rendering and event processing loop - while (!_finished && !_display.isClosing()) { + while (!_finished) { try { // render the current frame long frameStart = processFrame(); @@ -223,6 +223,9 @@ public class JmeApp stop(); } } + if (_display.isClosing()) { + stop(); + } } try { @@ -310,7 +313,7 @@ public class JmeApp // enable all of the "quick compares," which means that states will // be refreshed only when necessary Arrays.fill(RenderState.QUICK_COMPARE, true); - + // set up the camera _camera.setFrustumPerspective(45.0f, width/(float)height, 1, 10000); Vector3f loc = new Vector3f(0.0f, 0.0f, 25.0f); @@ -366,7 +369,7 @@ public class JmeApp // make everything opaque by default _geom.setRenderQueueMode(Renderer.QUEUE_OPAQUE); - + // set up a zbuffer ZBufferState zbuf = _display.getRenderer().createZBufferState(); zbuf.setEnabled(true);
Small change to make it possible to intercept window closing actions (in case we want to do something other than close the application at that time). git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@<I> ed5b<I>cb-e<I>-<I>-a<I>-f6a<I>f<I>b<I>
threerings_nenya
train
java
34f33538d8e9d7d4b285a167e023cbe959b17eca
diff --git a/projects.go b/projects.go index <HASH>..<HASH> 100644 --- a/projects.go +++ b/projects.go @@ -35,11 +35,11 @@ type ProjectInput struct { SubmitType string `json:"submit_type,omitempty"` Branches []string `json:"branches,omitempty"` Owners []string `json:"owners,omitempty"` - UseContributorAgreements string `json:"use_contributor_agreements"` - UseSignedOffBy string `json:"use_signed_off_by"` - CreateNewChangeForAllNotInTarget string `json:"create_new_change_for_all_not_in_target"` - UseContentMerge string `json:"use_content_merge"` - RequireChangeID string `json:"require_change_id"` + UseContributorAgreements string `json:"use_contributor_agreements,omitempty"` + UseSignedOffBy string `json:"use_signed_off_by,omitempty"` + CreateNewChangeForAllNotInTarget string `json:"create_new_change_for_all_not_in_target,omitempty"` + UseContentMerge string `json:"use_content_merge,omitempty"` + RequireChangeID string `json:"require_change_id,omitempty"` MaxObjectSizeLimit string `json:"max_object_size_limit,omitempty"` PluginConfigValues map[string]map[string]string `json:"plugin_config_values,omitempty"` }
fix: omit optional empty fields in ProjectInput (#<I>) This will stop a mostly-default ProjectInput from generating a number of empty fields in the JSON payload that confuse gerrit, e.g. { "use_signed_off_by": "" } The issue shows up when calling CreateProject. This is a fix for issue #<I>.
andygrunwald_go-gerrit
train
go
6253cab3f1ecba05151cf12e5974127c5137c540
diff --git a/src/Sulu/Bundle/AdminBundle/DependencyInjection/Compiler/SuluVersionPass.php b/src/Sulu/Bundle/AdminBundle/DependencyInjection/Compiler/SuluVersionPass.php index <HASH>..<HASH> 100644 --- a/src/Sulu/Bundle/AdminBundle/DependencyInjection/Compiler/SuluVersionPass.php +++ b/src/Sulu/Bundle/AdminBundle/DependencyInjection/Compiler/SuluVersionPass.php @@ -27,7 +27,7 @@ class SuluVersionPass implements CompilerPassInterface { $container->setParameter( 'sulu.version', - $this->getVersionFromComposerJson(realpath($container->getParameter('kernel.root_dir') . '/../..')) + $this->getVersionFromComposerJson(realpath($container->getParameter('kernel.root_dir') . '/..')) ); }
updated SuluVersionPass composer dir
sulu_sulu
train
php
199686f0c2d88ea235845cb27c198b7c19e55d29
diff --git a/structr-ui/src/main/resources/structr/js/widgets.js b/structr-ui/src/main/resources/structr/js/widgets.js index <HASH>..<HASH> 100644 --- a/structr-ui/src/main/resources/structr/js/widgets.js +++ b/structr-ui/src/main/resources/structr/js/widgets.js @@ -77,7 +77,7 @@ var _Widgets = { }); }); - _wPager.pager.append('<input type="text" class="filter" data-attribute="name" placeholder="Filter..." />'); + _wPager.pager.append('Filter: <input type="text" class="filter" data-attribute="name" />'); _wPager.activateFilterElements(); _Widgets.remoteWidgetsEl = $('#remoteWidgets', widgetsSlideout);
Cosmetic: Changed the ui for the local widget filter to look like most other filters
structr_structr
train
js
dc4514303e76680746b9512ec6eb381e6e8f461b
diff --git a/modules/orionode/test/endpoints/test-workspace.js b/modules/orionode/test/endpoints/test-workspace.js index <HASH>..<HASH> 100644 --- a/modules/orionode/test/endpoints/test-workspace.js +++ b/modules/orionode/test/endpoints/test-workspace.js @@ -338,12 +338,13 @@ describe("Workspace endpoint", function() { .end(done); }); }); - it("testCreateProjectNonDefaultLocation", function(done) { + it.skip("testCreateProjectNonDefaultLocation", function(done) { + // Node server currently does not provide the ability to create folder outside default workspace.ss withDefaultWorkspace(function(ws) { request() .post(ws.Location) - .set('Slug', 'testCreateProjectNonDefaultLocation') - .set('ContentLocation', MEATASTORE) + .set('Slug', 'testCrseateProjectNonDefaultLocation') + .send({"ContentLocation": MEATASTORE}) .expect(403) .end(done); });
[Mocha] Skip one imported mocha test, not supported in node server
eclipse_orion.client
train
js
2193a607e0d1e65b4d97b7fba901ce76477f0067
diff --git a/tests/VersionParserTest.php b/tests/VersionParserTest.php index <HASH>..<HASH> 100644 --- a/tests/VersionParserTest.php +++ b/tests/VersionParserTest.php @@ -707,6 +707,11 @@ class VersionParserTest extends TestCase 'operator abuse' => array('>2.0,,<=3.0'), 'operator abuse/2' => array('>2.0 ,, <=3.0'), 'operator abuse/3' => array('>2.0 ||| <=3.0'), + 'leading operator' => array(',^1@dev || ^4@dev'), + 'leading operator/2' => array(',^1@dev'), + 'leading operator/3' => array('|| ^1@dev'), + 'trailing operator' => array('^1@dev ||'), + 'trailing operator/2' => array('^1@dev ,'), ); }
Clarify that ,/&& prefix and suffix are invalid
composer_semver
train
php
ea3fa8629ac730308e3f1472012ea04c63728751
diff --git a/tests/ChiefTest.php b/tests/ChiefTest.php index <HASH>..<HASH> 100644 --- a/tests/ChiefTest.php +++ b/tests/ChiefTest.php @@ -31,7 +31,11 @@ class ChiefTest extends ChiefTestCase public function testExecuteFiresHandlerAttachedByString() { - // @todo + $chief = new Chief(); + $chief->pushHandler('Chief\ChiefTestCommandStub', 'Chief\ChiefTestCommandHandlerStub'); + $command = new ChiefTestCommandStub; + $chief->execute($command); + $this->assertEquals($command->handled, true); } }
Added failing test for executing a handler by its class name
adamnicholson_Chief
train
php
8a87279e42a807cf51eb6258a900942e46f29388
diff --git a/instabot/bot/bot_get.py b/instabot/bot/bot_get.py index <HASH>..<HASH> 100644 --- a/instabot/bot/bot_get.py +++ b/instabot/bot/bot_get.py @@ -205,7 +205,7 @@ def search_users(self, query): def get_comment(self): if self.comments: return random.choice(self.comments).strip() - return "wow" + return "Wow!" def get_media_id_from_link(self, link):
Change default comment from 'wow' to 'Wow!'
instagrambot_instabot
train
py
2203b2703167cd5febde0523b96559108a9f6eba
diff --git a/spec/unit/perform_allocation_spec.rb b/spec/unit/perform_allocation_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/perform_allocation_spec.rb +++ b/spec/unit/perform_allocation_spec.rb @@ -4,14 +4,14 @@ RSpec.describe "#perform_allocation" do context "expect { ... }.to perform_allocation(...)" do it "passes if the block performs allocations" do expect { - ["foo", "bar", "baz"].sort[1] - }.to perform_allocation(6) + _a = [Object.new] + }.to perform_allocation(2) end it "fails if the block doesn't perform allocation(...)" do expect { expect { - ["foo", "bar", "baz"].sort[1] + _a = [Object.new] }.to perform_allocation(1) }.to raise_error(/expected block to perform allocation of \d object, but allocated \d objects/) end @@ -97,8 +97,8 @@ RSpec.describe "#perform_allocation" do expect { expect { ["foo", "bar", "baz"].sort[1] - }.to_not perform_allocation(120).bytes - }.to raise_error("expected block not to perform allocation of 120 bytes, but allocated 120 bytes") + }.to_not perform_allocation(200).bytes + }.to raise_error(/expected block not to perform allocation of \d{3} bytes, but allocated \d{3} bytes/) end end
Change to ensure tests work on old rubies
piotrmurach_rspec-benchmark
train
rb
b6aa95d2ab765a72ecceeb9a0b344a463ec3259e
diff --git a/tests/unit/modules/ps_test.py b/tests/unit/modules/ps_test.py index <HASH>..<HASH> 100644 --- a/tests/unit/modules/ps_test.py +++ b/tests/unit/modules/ps_test.py @@ -61,10 +61,10 @@ class PsTestCase(TestCase): def test_get_pid_list(self): self.assertListEqual(STUB_PID_LIST, ps.get_pid_list()) - @patch('psutil.Process.send_signal') + @patch('psutil.Process') def test_kill_pid(self, send_signal_mock): ps.kill_pid(0, signal=999) - self.assertEqual(send_signal_mock.call_args, call(999)) + self.assertEqual(send_signal_mock.call_args, call(0)) @patch('psutil.Process.send_signal') @patch('psutil.process_iter', new=MagicMock(return_value=[MOCK_PROC]))
Fix psutil on Arch.
saltstack_salt
train
py
21ceeba57617a3f9d3886f6c68f26d6b82ed4450
diff --git a/src/lib/detection.js b/src/lib/detection.js index <HASH>..<HASH> 100644 --- a/src/lib/detection.js +++ b/src/lib/detection.js @@ -9,18 +9,15 @@ const _shouldActivityUpdate = ({ log, thresholds }) => stores => ({ type, pageX, if(!FILTER_TYPES.includes(type)) return true const { getState } = stores.selectFirst('lib') - const { lastActive } = getState() - if(lastEvent.type === type) { - const { x, y } = lastEvent - if(!x || !y) - return true - + const { lastActive, lastEvent } = getState() + if(lastEvent.type !== type) + return true - } + const { x, y } = lastEvent + if(pageX && pageY && !x || !y) + return true - if (typeof pageX === 'undefined' || typeof pageY === 'undefined') - return false - if(Math.abs(pageX - x) < thresholds.mouse && Math.abs(pageY - y) < thresholds.mouse) + if(pageX && pageY && Math.abs(pageX - x) < thresholds.mouse && Math.abs(pageY - y) < thresholds.mouse) return false // SKIP UPDATE IF ITS UNDER THE THRESHOLD MS FROM THE LAST UPDATE
fixed issue with ie<I>
noderaider_redux-idle-monitor
train
js
28bc253beb0fc574e81af3425042b678b291a474
diff --git a/aws/resource_aws_lb.go b/aws/resource_aws_lb.go index <HASH>..<HASH> 100644 --- a/aws/resource_aws_lb.go +++ b/aws/resource_aws_lb.go @@ -96,6 +96,7 @@ func resourceAwsLb() *schema.Resource { "subnet_mapping": { Type: schema.TypeSet, Optional: true, + Computed: true, ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{
resource/aws_lb: Mark subnet_mapping attribute Computed: true
terraform-providers_terraform-provider-aws
train
go
4277d0b7c4d69721142b17fe0eb932688b126dea
diff --git a/src/Passport.php b/src/Passport.php index <HASH>..<HASH> 100644 --- a/src/Passport.php +++ b/src/Passport.php @@ -389,6 +389,10 @@ class Passport $user->withAccessToken($token); + if (isset($user->wasRecentlyCreated) && $user->wasRecentlyCreated) { + $user->wasRecentlyCreated = false; + } + app('auth')->guard($guard)->setUser($user); app('auth')->shouldUse($guard);
Change wasRecentlyCreated to false The core framework fixed this same bug with the core actingAs method but it seems it was missed for Passport! Check this PR for more details: <URL>
laravel_passport
train
php
7e580d7992b2b6c5e54ce7405515dfaab76f746f
diff --git a/azurerm/internal/services/desktopvirtualization/tests/virtual_desktop_host_pool_resource_test.go b/azurerm/internal/services/desktopvirtualization/tests/virtual_desktop_host_pool_resource_test.go index <HASH>..<HASH> 100644 --- a/azurerm/internal/services/desktopvirtualization/tests/virtual_desktop_host_pool_resource_test.go +++ b/azurerm/internal/services/desktopvirtualization/tests/virtual_desktop_host_pool_resource_test.go @@ -121,7 +121,7 @@ provider "azurerm" { } resource "azurerm_resource_group" "test" { - name = "acctestRG-%d" + name = "acctestRG-vdesktop-%d" location = "%s" }
Update azurerm/internal/services/desktopvirtualization/tests/virtual_desktop_host_pool_resource_test.go
terraform-providers_terraform-provider-azurerm
train
go
15b7bb1cdbbccc361402e31d559ff6acaab2f570
diff --git a/build.py b/build.py index <HASH>..<HASH> 100755 --- a/build.py +++ b/build.py @@ -410,8 +410,10 @@ virtual('plovr', PLOVR_JAR) @target(PLOVR_JAR, clean=False) def plovr_jar(t): + t.info('downloading %r', t.name) t.download('https://plovr.googlecode.com/files/' + os.path.basename(PLOVR_JAR), md5=PLOVR_JAR_MD5) + t.info('downloaded %r', t.name) @target('gh-pages', 'host-examples', 'doc', phony=True)
Add logging messages to indicate when a download is in progress
openlayers_openlayers
train
py
f34f3392c34baabd0b4d8418d09c03716f1e842d
diff --git a/billing/tests/paylane_tests.py b/billing/tests/paylane_tests.py index <HASH>..<HASH> 100644 --- a/billing/tests/paylane_tests.py +++ b/billing/tests/paylane_tests.py @@ -106,11 +106,6 @@ class PaylaneTestCase(TestCase): self.assertTrue('transaction' in bill1['response']) self.assertTrue('authorization' in bill1['response']) - bill2 = self.merchant.bill_recurring(12.0, bill1['response']['authorization'], 'OK recurring') - self.assertEqual(bill2['status'], 'SUCCESS', unicode(bill2['response'])) - self.assertTrue('transaction' in bill2['response']) - self.assertTrue('authorization' in bill2['response']) - def testRecurringBillingFailWithChargeback(self): credit_card = Visa(first_name='Celso', last_name='Pinto', month=10, year=2020, number='4111111111111111', verification_value=435) options = {}
fix duplicate test case fixes: <PaylaneTransaction: Transaction for ....>, 'error': Error Code: <I> (Multiple same transactions lock triggered. Wait 7 s and try again.). Acquirer Error:
agiliq_merchant
train
py
845dc7cc343603acb31623c990639890bfbc0e3d
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,6 @@ setup( name = 'surfdist', packages = ['surfdist'], install_requires = ['numpy', - 'mayavi', 'gdist', 'nibabel', 'scipy'],
Update setup.py removing mayavi from requirements
NeuroanatomyAndConnectivity_surfdist
train
py
c790343e6bb74a753b23c2e342ff4bdb4aed6c30
diff --git a/server.go b/server.go index <HASH>..<HASH> 100644 --- a/server.go +++ b/server.go @@ -221,6 +221,14 @@ func NewFromConfig(conf Config) (*Server, error) { ret.EventWorker = NewEventWorker(ret.Statsd) + // Set up a span sink that extracts metrics from SSF spans and + // reports them via the metric workers: + metricSink, err := NewMetricExtractionSink(ret.Workers, ret.indicatorSpanTimerName) + if err != nil { + return ret, err + } + ret.spanSinks = append(ret.spanSinks, metricSink) + for _, addrStr := range conf.StatsdListenAddresses { addr, err := protocol.ResolveAddr(addrStr) if err != nil {
Set up the metric extraction sink in server creation This ties all the changes together: Now metrics from SSF spans flow directly (via go channels) into the metric worker, without having to traverse any network at all!
stripe_veneur
train
go
cf79e2ae509e24a3c06b3c9b0fd137b3a7197989
diff --git a/lib/fog/rackspace/models/block_storage/snapshot.rb b/lib/fog/rackspace/models/block_storage/snapshot.rb index <HASH>..<HASH> 100644 --- a/lib/fog/rackspace/models/block_storage/snapshot.rb +++ b/lib/fog/rackspace/models/block_storage/snapshot.rb @@ -42,6 +42,10 @@ module Fog # @return [String] region of the snapshot attribute :availability_zone + # @!attribute [r] force + # @return [Boolean] `force` creation flag + attribute :force + # Returns true if the snapshot is in a ready state # @return [Boolean] returns true if snapshot is in a ready state def ready? @@ -59,7 +63,7 @@ module Fog # @note A snapshot object cannot be updated # @note All writes to the volume should be flushed before creating the snapshot, either by un-mounting any file systems on the volume or by detaching the volume. # @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/POST_createSnapshot__v1__tenant_id__snapshots.html - def save(force = false) + def save requires :volume_id raise IdentifierTaken.new('Resaving may cause a duplicate snapshot to be created') if persisted? data = service.create_snapshot(volume_id, {
Send :force flag in Snapshot payload
fog_fog
train
rb
357262e718bc045591c5894713ee95577ec50609
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -29,6 +29,9 @@ RSpec::Matchers.define :include_output do |expected| end RSpec.configure do |config| + # Set to false to allow Kernel#puts + suppress_stdout = true + config.include GitFame::Startup config.mock_with :rspec config.order = "random" @@ -39,7 +42,6 @@ RSpec.configure do |config| mocks.syntax = :should end config.fail_fast = false - config.before(:all) do ENV["TZ"] = "GMT-2" warn "-----------" @@ -47,9 +49,12 @@ RSpec.configure do |config| warn "\t#{`git --version`.strip}" warn "\t#{`grep --version`.strip}" warn "-----------" + warn "NOTE: Messages to STDOUT has been suppressed. See spec/spec_helper.rb" + warn "-----------" Dir.chdir(repository) { system "git checkout 7ab01bc5a720 > /dev/null 2>&1" } end - # Remove this line to allow Kernel#puts - # config.before { allow($stdout).to receive(:puts) } + if suppress_stdout + config.before do; $stdout.stub(:puts); end + end end \ No newline at end of file
Add message about STDOUT being suppressed during testing
oleander_git-fame-rb
train
rb
15a641a99ca4a7d583d592ab883f637c0a445623
diff --git a/dev/SapphireTest.php b/dev/SapphireTest.php index <HASH>..<HASH> 100644 --- a/dev/SapphireTest.php +++ b/dev/SapphireTest.php @@ -224,6 +224,9 @@ class SapphireTest extends PHPUnit_Framework_TestCase { // Preserve memory settings $this->originalMemoryLimit = ini_get('memory_limit'); + + // Clear requirements + Requirements::clear(); } /**
BUGFIX Clear requirements after running a unit test
silverstripe_silverstripe-framework
train
php
d9949b50ee27977c5434b34575dcf4f3667edb1b
diff --git a/napalm/junos/junos.py b/napalm/junos/junos.py index <HASH>..<HASH> 100644 --- a/napalm/junos/junos.py +++ b/napalm/junos/junos.py @@ -306,10 +306,10 @@ class JunOSDriver(NetworkDriver): if message: commit_args["comment"] = message self.device.cu.commit(ignore_warning=self.ignore_warning, **commit_args) - # FIX: might have to fix the session locking wrt commit confirm + if not self.lock_disable and not self.session_config_lock: self._unlock() - # FIX: look into this also + if self.config_private: self.device.rpc.close_configuration()
Removing a couple of comments
napalm-automation_napalm
train
py
218605e92652c26828eacaeff84c35e302db58e2
diff --git a/test/Offer/Events/AbstractLabelEventTest.php b/test/Offer/Events/AbstractLabelEventTest.php index <HASH>..<HASH> 100644 --- a/test/Offer/Events/AbstractLabelEventTest.php +++ b/test/Offer/Events/AbstractLabelEventTest.php @@ -1,14 +1,7 @@ <?php -/** - * Created by PhpStorm. - * User: nicolas - * Date: 19/01/16 - * Time: 14:22 - */ namespace CultuurNet\UDB3\Offer\Events; - use CultuurNet\UDB3\Label; class AbstractLabelEventTest extends \PHPUnit_Framework_TestCase
III-<I>: Fix coding standards
cultuurnet_udb3-php
train
php
9268cf1e83a16d8f7da243000efe74a968e5ccb8
diff --git a/runway/commands/env.py b/runway/commands/env.py index <HASH>..<HASH> 100644 --- a/runway/commands/env.py +++ b/runway/commands/env.py @@ -481,7 +481,7 @@ class Env(Base): '(or "all"): ') if selected_index == 'all': deployments_to_run.append(selected_deploy) - elif selected_index == '': + elif selected_index == '' or not selected_index.isdigit() or not 0 < int(selected_index) <= len(selected_deploy): LOGGER.error('Please select a valid number (or "all")') sys.exit(1) else:
don't print a stack trace on invalid input
onicagroup_runway
train
py
cc2a15b4778f35a7723cb4d6d1cb22300026a3cf
diff --git a/src/effector/sample.js b/src/effector/sample.js index <HASH>..<HASH> 100644 --- a/src/effector/sample.js +++ b/src/effector/sample.js @@ -13,7 +13,8 @@ function sampleStore(source: Store<any>, sampler: Event<any> | Store<any>) { const unit = storeFabric({ currentState: source.defaultState, - name: source.shortName, + //TODO: add location + config: {name: source.shortName}, parent: source.domainName, })
Use storeFabric config in sample
zerobias_effector
train
js
f7c13fe710c30ab3578a1abd9e0c00e3a6342dbc
diff --git a/example/drone_delivery/drone_delivery.py b/example/drone_delivery/drone_delivery.py index <HASH>..<HASH> 100644 --- a/example/drone_delivery/drone_delivery.py +++ b/example/drone_delivery/drone_delivery.py @@ -9,7 +9,7 @@ import cherrypy from cherrypy.process import wspbus, plugins from jinja2 import Environment, FileSystemLoader -ROOT_FOLDER = '/home/user/Droneapi' +ROOT_FOLDER = '/home/user/Droneapi/' class Drone(object): def __init__(self, home_coords): @@ -81,7 +81,7 @@ class Templates: template = self.environment.get_template( file_name + '.html') return template.render(options=self.options) -class Webserver(object): +class DroneDelivery(object): def __init__(self): home_coords = [32.5738, -117.0068] self.templates = Templates(home_coords) @@ -122,4 +122,4 @@ conf = { } } -cherrypy.quickstart(Webserver(), '/', conf) +cherrypy.quickstart(DroneDelivery(), '/', conf)
fix root path and changed name of main class
dronekit_dronekit-python
train
py
da8b1b7c1e4ea3ce64bec3eaaa489dbf3d16dd1c
diff --git a/src/Codeception/Module/Symfony2.php b/src/Codeception/Module/Symfony2.php index <HASH>..<HASH> 100644 --- a/src/Codeception/Module/Symfony2.php +++ b/src/Codeception/Module/Symfony2.php @@ -171,6 +171,13 @@ class Symfony2 extends Framework implements DoctrineProvider /** * Opens web page using route name and parameters. * + * ``` php + * <?php + * $I->amOnRoute('posts.create'); + * $I->amOnRoute('posts.show', array('id' => 34)); + * ?> + * ``` + * * @param $routeName * @param array $params */ @@ -188,9 +195,17 @@ class Symfony2 extends Framework implements DoctrineProvider $url = $router->generate($routeName, $params); $this->amOnPage($url); } + /** * Checks that current url matches route. * + * ``` php + * <?php + * $I->seeCurrentRouteIs('posts.index'); + * $I->seeCurrentRouteIs('posts.show', array('id' => 8)); + * ?> + * ``` + * * @param $routeName * @param array $params */
Added some examples on issue #<I>
Codeception_base
train
php
92babb3488f863e035ccc446a827ef35bd7f0668
diff --git a/buffalo/cmd/task.go b/buffalo/cmd/task.go index <HASH>..<HASH> 100644 --- a/buffalo/cmd/task.go +++ b/buffalo/cmd/task.go @@ -30,11 +30,7 @@ var taskCommand = &cobra.Command{ RunE: func(c *cobra.Command, args []string) error { _, err := exec.LookPath("grift") if err != nil { - return errors.New(`we could not find "grift" in your path -You must first install "grift" in order to use the Buffalo console: - -$ go get github.com/markbates/grift -`) + return errors.New("we could not find \"grift\" in your path.\n You must first install \"grift\" in order to use the Buffalo console:\n\n $ go get github.com/markbates/grift") } _, err = os.Stat("grifts")
[cleaning] fixing one last issue with codeclimate
gobuffalo_buffalo
train
go
b47454f6b75f024a48f3533ae401b28c2b8f6001
diff --git a/user/editadvanced_form.php b/user/editadvanced_form.php index <HASH>..<HASH> 100644 --- a/user/editadvanced_form.php +++ b/user/editadvanced_form.php @@ -259,7 +259,7 @@ class user_editadvanced_form extends moodleform { } } - if (!$user or $user->email !== $usernew->email) { + if (!$user or (isset($usernew->email) && $user->email !== $usernew->email)) { if (!validate_email($usernew->email)) { $err['email'] = get_string('invalidemail'); } else if (empty($CFG->allowaccountssameemail)
MDL-<I> user: Check if user email is set on validation Add a check if the user's email is set before performing validation on the user's email address. This is to prevent the warning messages to be shown in the case of a pending email change which causes the user's email field to be not included in the Edit profile form.
moodle_moodle
train
php
622e04601ce1f8ae074b45b39214480deb6b1d19
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -323,7 +323,7 @@ class Cache { // set new caching entry let storeRequest = {} storeRequest[requestKeyHeaders] = JSON.stringify(_response_headers) - storeRequest[requestKeyBody] = _response_body + storeRequest[requestKeyBody] = JSON.stringify(_response_body) that.store.setMultiple(requestKey, storeRequest) }
Fix Redis nested objects issue
mkozjak_koa-cache-lite
train
js
e252ed75cafa78eee234ee1b2be65be1e6544714
diff --git a/plugins/Installer/src/Controller/StartupController.php b/plugins/Installer/src/Controller/StartupController.php index <HASH>..<HASH> 100644 --- a/plugins/Installer/src/Controller/StartupController.php +++ b/plugins/Installer/src/Controller/StartupController.php @@ -252,7 +252,7 @@ class StartupController extends Controller { if (!empty($this->request->data)) { $requestData = $this->request->data; - if (in_array($requestData['driver'], ['Mysql', ])) { + if (in_array($requestData['driver'], ['Mysql', 'Postgres', 'Sqlite', 'Sqlserver'])) { if (function_exists('ini_set')) { ini_set('max_execution_time', 300); } elseif (function_exists('set_time_limit')) {
allow other db drivers during installation
quickapps_cms
train
php
555d7bc1c8639cc743a04743f0b8896095963b77
diff --git a/build/builder.js b/build/builder.js index <HASH>..<HASH> 100644 --- a/build/builder.js +++ b/build/builder.js @@ -8,7 +8,7 @@ exports.build = function(components, selectedGroups, options) { var version = RemoteStorage.version; delete global.RemoteStorage; - output += "/** remotestorage.js " + version.toString() + " remotestorage.io, MIT-licensed **/\n" + output += "/** " + version.toString() + " remotestorage.io, MIT-licensed **/\n" console.error("Building version " + version.toString());
builder: don't put duplicate 'remotestorage.js' string in version header
remotestorage_remotestorage.js
train
js
f23b015af0f607d254eec80c1a8ecd6ecd78a0c1
diff --git a/lib/active_scaffold/bridges/date_picker/bridge.rb b/lib/active_scaffold/bridges/date_picker/bridge.rb index <HASH>..<HASH> 100644 --- a/lib/active_scaffold/bridges/date_picker/bridge.rb +++ b/lib/active_scaffold/bridges/date_picker/bridge.rb @@ -5,8 +5,6 @@ ActiveScaffold::Bridges.bridge "DatePicker" do destination = File.join(Rails.root, "public/javascripts/active_scaffold/default/") if ActiveScaffold.js_framework == :jquery - date_options = I18n.t 'date' - Rails.logger.info(date_options.inspect) require File.join(directory, "lib/datepicker_bridge.rb") FileUtils.cp(source, destination) else
revert change of last commit (wrong file committed)
activescaffold_active_scaffold
train
rb
a8ec173d4fb5a435cd82169af9952e05c855da2b
diff --git a/err.go b/err.go index <HASH>..<HASH> 100644 --- a/err.go +++ b/err.go @@ -14,6 +14,10 @@ func (e ConnError) Error() string { return e.Op + ": " + e.Err.Error() } +func (e ConnError) Unwrap() error { + return e.Err +} + // Error messages returned by the server. var ( ErrBadFormat = errors.New("bad command format") diff --git a/name.go b/name.go index <HASH>..<HASH> 100644 --- a/name.go +++ b/name.go @@ -18,6 +18,10 @@ func (e NameError) Error() string { return e.Err.Error() + ": " + e.Name } +func (e NameError) Unwrap() error { + return e.Err +} + // Name format errors. The Err field of NameError contains one of these. var ( ErrEmpty = errors.New("name is empty")
implement Unwrap methods on error types (#<I>)
beanstalkd_go-beanstalk
train
go,go
3bdf05ca7969a989b5ade32048655d883cb39b29
diff --git a/Lib/fontbakery/profiles/universal.py b/Lib/fontbakery/profiles/universal.py index <HASH>..<HASH> 100644 --- a/Lib/fontbakery/profiles/universal.py +++ b/Lib/fontbakery/profiles/universal.py @@ -143,7 +143,7 @@ def com_google_fonts_check_family_win_ascent_and_descent(ttFont, vmetrics): yield FAIL,\ Message("ascent", f"OS/2.usWinAscent value" - f" {ttFont['OS/2'].usWinDescent} is too large." + f" {ttFont['OS/2'].usWinAscent} is too large." f" It should be less than double the yMax." f" Current yMax value is {vmetrics['ymax']}") # OS/2 usWinDescent:
Fix bug in a FAIL message from "com.google.fonts/check/family/win_ascent_and_descent"
googlefonts_fontbakery
train
py
ccc8d003c7939cf98a826888ab502de41eace6c6
diff --git a/lib/thermite/util.rb b/lib/thermite/util.rb index <HASH>..<HASH> 100644 --- a/lib/thermite/util.rb +++ b/lib/thermite/util.rb @@ -23,6 +23,9 @@ module Thermite # Utility methods # module Util + # + # Logs a debug message to the specified `config.debug_filename`, if set. + # def debug(msg) # Should probably replace with a Logger if config.debug_filename
Add missing docs for debug
malept_thermite
train
rb
9392986ee167ca84af2f3047d1ff7ab47c1732e6
diff --git a/lib/stream/batch.rb b/lib/stream/batch.rb index <HASH>..<HASH> 100644 --- a/lib/stream/batch.rb +++ b/lib/stream/batch.rb @@ -16,8 +16,12 @@ module Stream # ] # @client.follow_many(follows) # - def follow_many(follows) - make_signed_request(:post, "/follow_many/", {}, follows) + def follow_many(follows, activity_copy_limit=nil) + query_params = {} + unless activity_copy_limit.nil? + query_params['activity_copy_limit'] = activity_copy_limit + end + make_signed_request(:post, "/follow_many/", query_params, follows) end #
add support for activity_copy_limit on follow_many
GetStream_stream-ruby
train
rb
8e06ca4136db99aa2d8f0c4108106ac6b8d0e26e
diff --git a/lib/celluloid/actor.rb b/lib/celluloid/actor.rb index <HASH>..<HASH> 100644 --- a/lib/celluloid/actor.rb +++ b/lib/celluloid/actor.rb @@ -80,7 +80,7 @@ module Celluloid actors = [] Celluloid.internal_pool.each do |t| next unless t.role == :actor - actors << t.actor.proxy if t.actor && t.actor.respond_to?(:proxy) + actors << t.actor.behavior_proxy if t.actor && t.actor.respond_to?(:behavior_proxy) end actors end
Return the behavior proxy from Actor.all
celluloid_celluloid
train
rb
e14b54bb8c98a79d70234d2714d39a7294da97fb
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -150,7 +150,7 @@ function Customize (config, parentConfig, engines) { return { config: preprocessor(engineConf), - watched: watched(engineConf) + watched: watched(engineConf).filter(_.isString) } }).then(function (config) { debug('Merging preprocessed config', config)
Only allow strings in list of watched files
bootprint_customize
train
js
d5490d13d5eae78edb1bf7153cfb04ab76a24d5e
diff --git a/client-runtime/src/main/java/com/microsoft/rest/serializer/FlatteningSerializer.java b/client-runtime/src/main/java/com/microsoft/rest/serializer/FlatteningSerializer.java index <HASH>..<HASH> 100644 --- a/client-runtime/src/main/java/com/microsoft/rest/serializer/FlatteningSerializer.java +++ b/client-runtime/src/main/java/com/microsoft/rest/serializer/FlatteningSerializer.java @@ -7,6 +7,7 @@ package com.microsoft.rest.serializer; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty.Access; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.BeanDescription; import com.fasterxml.jackson.databind.JsonMappingException; @@ -135,6 +136,9 @@ public class FlatteningSerializer extends StdSerializer<Object> implements Resol String wireName = f.getName(); ObjectNode pointer = res; JsonProperty property = f.getAnnotation(JsonProperty.class); + if (property != null && Access.WRITE_ONLY.equals(property.access())) { + continue; + } if (property != null && !property.value().isEmpty()) { wireName = f.getAnnotation(JsonProperty.class).value(); }
Fix WRITE_ONLY properties in flattening serializer (#<I>)
Azure_autorest-clientruntime-for-java
train
java
2cf7f1ea9e204d8747c22d130d9db9b787bf1e15
diff --git a/lib/tgios/extended_ui_view_controller.rb b/lib/tgios/extended_ui_view_controller.rb index <HASH>..<HASH> 100644 --- a/lib/tgios/extended_ui_view_controller.rb +++ b/lib/tgios/extended_ui_view_controller.rb @@ -34,6 +34,13 @@ module Tgios super end + def dismissViewControllerAnimated(flag, completion:completion) + super(flag, ->{ + self.prepareForRelease() + completion.call unless completion.nil? + }) + end + def dealloc ap "#{self.class.name} dealloc" super
no need to call prepareForRelease before dismissViewControllerAnimated
apriltg_tgios
train
rb
6a90eb6c382231570fc41ee74932faa321cf55b6
diff --git a/src/components/StructuredList/StructuredList-story.js b/src/components/StructuredList/StructuredList-story.js index <HASH>..<HASH> 100644 --- a/src/components/StructuredList/StructuredList-story.js +++ b/src/components/StructuredList/StructuredList-story.js @@ -97,8 +97,8 @@ storiesOf('StructuredList', module) <StructuredListWrapper selection border> <StructuredListHead> <StructuredListRow head> - <StructuredListCell head>ColumnA</StructuredListCell>, - <StructuredListCell head>ColumnB</StructuredListCell>, + <StructuredListCell head>ColumnA</StructuredListCell> + <StructuredListCell head>ColumnB</StructuredListCell> <StructuredListCell head>ColumnC</StructuredListCell> <StructuredListCell head>{''}</StructuredListCell> </StructuredListRow>
fix(structured-list): remove stray commas in story (#<I>)
carbon-design-system_carbon-components-react
train
js
9bbea94af62a50f19bad9f935fe4535a5965b77f
diff --git a/trump/indexing.py b/trump/indexing.py index <HASH>..<HASH> 100644 --- a/trump/indexing.py +++ b/trump/indexing.py @@ -127,6 +127,8 @@ class DatetimeIndexImp(IndexImplementer): sqlatyp = DateTime def __init__(self, dfors, case, kwargs): + + self.data = dfors if case == 'asis': @@ -144,6 +146,10 @@ class DatetimeIndexImp(IndexImplementer): elif case == 'asfreq': if isinstance(self.data.index, pdDatetimeIndex): self.data = self.data.asfreq(**kwargs) + elif isinstance(self.data.index[0], (str, unicode)): + newind = pd.DatetimeIndex(self.data.index) + self.data.index = newind + self.data = self.data.asfreq(**kwargs) else: self.default(**kwargs) elif case == 'guess':
Handle string based datetimes more explicitly
Equitable_trump
train
py
30713232e540a06737b4570c44bf4069b34c1486
diff --git a/Bundle/WidgetBundle/Renderer/WidgetRenderer.php b/Bundle/WidgetBundle/Renderer/WidgetRenderer.php index <HASH>..<HASH> 100644 --- a/Bundle/WidgetBundle/Renderer/WidgetRenderer.php +++ b/Bundle/WidgetBundle/Renderer/WidgetRenderer.php @@ -86,6 +86,12 @@ class WidgetRenderer //the content of the widget $parameters = $this->container->get('victoire_widget.widget_content_resolver')->getWidgetContent($widget); + /* + * In some cases, for example, WidgetRender in BusinessEntity mode with magic variables {{entity.id}} transformed + * into the real business entity id, then if in the rendered action, we need to flush, it would persist the + * modified widget which really uncomfortable ;) + */ + $this->container->get('doctrine.orm.entity_manager')->refresh($widget); //the template displayed is in the widget bundle (with the potential theme) $showView = 'show'.ucfirst($widget->getTheme());
:bug: refresh widget to avoid to flush modified widget
Victoire_victoire
train
php
c5f2c2d1d1e2d1fad2763e0baf3db387e438d804
diff --git a/src/aurelia-form.js b/src/aurelia-form.js index <HASH>..<HASH> 100644 --- a/src/aurelia-form.js +++ b/src/aurelia-form.js @@ -41,7 +41,7 @@ export function configure(aurelia, config) { config.elements = config.elements || {}; defaultElements.forEach(element => { - config.elements[element] = `form-${element}` + config.elements[element] = config.elements[element] || `form-${element}` }); }
fix(project): no override if already registered
SpoonX_aurelia-form
train
js
74a28b905d10a73fb792b9118a94b642631dcd2c
diff --git a/main.go b/main.go index <HASH>..<HASH> 100644 --- a/main.go +++ b/main.go @@ -32,7 +32,7 @@ func hookHandler(w http.ResponseWriter, r *http.Request) { log.Println("Couldn't parse post request:", err) } if command.Text == "" || command.Token != os.Getenv(fmt.Sprintf("%s_OUT_TOKEN", strings.ToUpper(command.TeamDomain))) { - log.Printf("[DEBUG] Ignoring request from unidentified source: %s - %s", command.Token, r.Host) + log.Printf("[DEBUG] Ignoring request from unidentified source: %s - %s - %s", command.Token, r.Host, command.TeamDomain) w.WriteHeader(http.StatusBadRequest) return }
Also output TeamDomain for better debugging.
trinchan_slackbot
train
go
b677bfd1acc6907a43d6bb95f1fa196a95c59772
diff --git a/main.js b/main.js index <HASH>..<HASH> 100755 --- a/main.js +++ b/main.js @@ -172,12 +172,18 @@ Object.defineProperties(Target.prototype,{ return !(this[resolver][event] && this[resolver][event].yielded.accepted); }}, - failed: {value: function(event){ + hasFailed: {value: function(event){ while(this[syn].hasOwnProperty(event)) event = this[syn][event]; return !!(this[resolver][event] && this[resolver][event].yielded.rejected); }}, + hasNotFailed: {value: function(event){ + while(this[syn].hasOwnProperty(event)) event = this[syn][event]; + + return !(this[resolver][event] && this[resolver][event].yielded.rejected); + }}, + on: {value: function(){ var event = arguments[0], listener = arguments[1],
Replaced 'failed' with 'hasFailed'
manvalls_y-emitter
train
js
0183cd1c9dcd866014a6e188872385f6df410434
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -51,7 +51,7 @@ Request.prototype.promise = function() { }); }) .cancellable() - ['catch'](Promise.CancellationError, function(err) { + .caught(Promise.CancellationError, function(err) { req.abort(); throw err; });
Bluebird provides .caught() for this
KyleAMathews_superagent-bluebird-promise
train
js
c5450f860891154b5f98cf7d46db19d1568eef8e
diff --git a/src/Copyrightcompliance.php b/src/Copyrightcompliance.php index <HASH>..<HASH> 100644 --- a/src/Copyrightcompliance.php +++ b/src/Copyrightcompliance.php @@ -35,13 +35,13 @@ class Copyrightcompliance extends Parser foreach ($this->parsedMail->getAttachments() as $attachment) { // Only use the Copyrightcompliance formatted reports, skip all others if (preg_match(config("{$this->configBase}.parser.report_file"), $attachment->getFilename()) && - $attachment->contentType == 'application/xml' + $attachment->getContentType() == 'application/xml' ) { $foundAcnsFile = true; $xmlReport = $attachment->getContent(); - $this->saveIncidents($xmlReport); + $this->saveIncident($xmlReport); } }
cannot access protected property and fuction name fixes - fix to cannot access protected property Attachment::$contentType - typo in function name $this->saveIncidents() should be $this->saveIncident()
AbuseIO_parser-copyrightcompliance
train
php
c387173b9a88e568b17dc385ba99e412a0943908
diff --git a/src/sentry_plugins/jira/plugin.py b/src/sentry_plugins/jira/plugin.py index <HASH>..<HASH> 100644 --- a/src/sentry_plugins/jira/plugin.py +++ b/src/sentry_plugins/jira/plugin.py @@ -115,7 +115,7 @@ class JiraPlugin(CorePluginMixin, IssuePlugin2): # be configured to use a custom property instead of a default. if schema.get('custom'): if schema['custom'] == JIRA_CUSTOM_FIELD_TYPES['textarea']: - fieldtype = 'select' + fieldtype = 'textarea' fkwargs['type'] = fieldtype return fkwargs
textareas should not be selects (#<I>)
getsentry_sentry-plugins
train
py
9e8a40beac2511543bbedfba0996a3b986e78890
diff --git a/components/graph/git-node.js b/components/graph/git-node.js index <HASH>..<HASH> 100644 --- a/components/graph/git-node.js +++ b/components/graph/git-node.js @@ -136,7 +136,13 @@ GitNodeViewModel.prototype.setData = function(args) { this.authorDateFromNow(this.authorDate().fromNow()); this.authorName(args.authorName); this.authorEmail(args.authorEmail); - this.totalLineDiffs(args.fileLineDiffs.shift()); + + var totalLineDiffs = args.fileLineDiffs.shift(); + if (!totalLineDiffs) { + this.totalLineDiffs([0, 0, 'total']); + } else { + this.totalLineDiffs(totalLineDiffs); + } this.fileLineDiffs(args.fileLineDiffs); } GitNodeViewModel.prototype.updateLastAuthorDateFromNow = function(deltaT) {
handling a case where fileLineDiff is missing
FredrikNoren_ungit
train
js
7eec73261d0e61214d6437afb32010592ee060bc
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -3,11 +3,11 @@ from setuptools import setup setup(name='python-ipmi', - version='0.1.10', + version='0.1.11', description='Python IPMI implementation', author='Jarrod Johnson', author_email='jbjohnso@us.ibm.com', url='http://xcat.sf.net/', install_requires=['pycrypto'], - packages=['ipmi'], + packages=['ipmi','ipmi.private'], )
fix setup to include the private parts of the project
openstack_pyghmi
train
py
b2e3bc9e3086a6aab702408712a6811c22ae8f8c
diff --git a/lib/ApiClient.php b/lib/ApiClient.php index <HASH>..<HASH> 100644 --- a/lib/ApiClient.php +++ b/lib/ApiClient.php @@ -446,7 +446,7 @@ final class ApiClient { if ($response->getStatusCode() >= 200 && $response->getStatusCode() <= 299) { // return raw body if response is a file if ($responseType === '\SplFileObject' || $responseType === 'string') { - return [$response->getBody(), $response->getStatusCode(), $response->getHeaders()]; + return new ApiResponse($response->getStatusCode(), $response->getHeaders(), $response->getBody()); } $data = json_decode($response->getBody()); @@ -515,4 +515,4 @@ final class ApiClient { return base64_encode(hash_hmac("sha512", $securedData, $decodedSecret, true)); } -} \ No newline at end of file +}
Fix ApiClient for requests returning a single string.
wallee-payment_php-sdk
train
php
9ed09690f3fd84afc4a0eed771810439a678aa76
diff --git a/bigquery/client.py b/bigquery/client.py index <HASH>..<HASH> 100644 --- a/bigquery/client.py +++ b/bigquery/client.py @@ -875,6 +875,11 @@ class BigQueryClient(object): query: required BigQuery query string. dataset: optional string id of the dataset table: optional string id of the table + external_udf_uris: optional list of external UDF URIs + (if given, + URIs must be Google Cloud Storage + and have .js extensions + ) allow_large_results: optional boolean use_query_cache: optional boolean priority: optional string
docstring for external_udf_uris in client.write_to_table
tylertreat_BigQuery-Python
train
py
0bc1dfe18ed48cd505530da0909f1c73e15a3ade
diff --git a/classes/Gems/Mail/MailElements.php b/classes/Gems/Mail/MailElements.php index <HASH>..<HASH> 100644 --- a/classes/Gems/Mail/MailElements.php +++ b/classes/Gems/Mail/MailElements.php @@ -254,7 +254,7 @@ class Gems_Mail_MailElements extends \Gems_Registry_TargetAbstract { if ($target) { $query .= ' AND gems__comm_templates.gct_target = ?'; } - $query .= ' GROUP BY gems__comm_templates.gct_id_template'; + $query .= ' GROUP BY gems__comm_templates.gct_id_template ORDER BY gems__comm_templates.gct_name'; if ($target) { $options['multiOptions'] = $this->db->fetchPairs($query, $target);
Fixed #<I>: e-mail now!: Template selection not ordered by name
GemsTracker_gemstracker-library
train
php
96f97c2426de9cbc91eb97881653077fc0514869
diff --git a/vendor/Sensei/Sensei/Doc/Renderer/Pdf.php b/vendor/Sensei/Sensei/Doc/Renderer/Pdf.php index <HASH>..<HASH> 100644 --- a/vendor/Sensei/Sensei/Doc/Renderer/Pdf.php +++ b/vendor/Sensei/Sensei/Doc/Renderer/Pdf.php @@ -52,7 +52,7 @@ class Sensei_Doc_Renderer_Pdf extends Sensei_Doc_Renderer { exec($this->_options['pdflatex_path'], $output); - if ( ! isset($output[0]) || ! preg_match('/^This is pdfTeXk/', $output[0])) { + if ( ! isset($output[0]) || ! preg_match('/^This is pdfe?TeXk?/', $output[0])) { $message = 'pdfLaTeX does not seem to be installed, or pdflatex_path' . ' option does not point to pdfLaTeX executable.'; throw new Sensei_Doc_Renderer_Exception($message);
fixed the method that checks for pdflatex
doctrine_annotations
train
php
22aef6295554b17d3cf84dad2a97677ab32d95fd
diff --git a/src/Middleware/Authenticate.php b/src/Middleware/Authenticate.php index <HASH>..<HASH> 100644 --- a/src/Middleware/Authenticate.php +++ b/src/Middleware/Authenticate.php @@ -34,7 +34,7 @@ class Authenticate extends BaseMiddleware try { $this->auth->parseToken()->authenticate(); } catch (JWTException $e) { - throw new UnauthorizedHttpException('jwt-auth', $e->getMessage()); + throw new UnauthorizedHttpException('jwt-auth', $e->getMessage(), $e, $e->getCode()); } return $next($request);
Pass previous exception to UnauthorizedHttpException
tymondesigns_jwt-auth
train
php
45569a1fdf121fb74cec654795cb7bb1cf491fe4
diff --git a/app/addons/databases/actions.js b/app/addons/databases/actions.js index <HASH>..<HASH> 100644 --- a/app/addons/databases/actions.js +++ b/app/addons/databases/actions.js @@ -176,16 +176,9 @@ export default { databaseName = databaseName.trim(); - if (Stores.databasesStore.doesDatabaseExist(databaseName)) { - var url = FauxtonAPI.urls('allDocs', 'app', app.utils.safeURLName(databaseName), ''); - // use the next cpu tick to allow react-select to unmount prorperly - return setTimeout(() => { FauxtonAPI.navigate(url); }); - } - - FauxtonAPI.addNotification({ - msg: 'Database does not exist.', - type: 'error' - }); + const url = FauxtonAPI.urls('allDocs', 'app', app.utils.safeURLName(databaseName), ''); + // use the next cpu tick to allow react-select to unmount prorperly + return setTimeout(() => { FauxtonAPI.navigate(url); }); }, fetchAllDbsWithKey: (id, callback) => {
Don't check for existing db for jump to db
apache_couchdb-fauxton
train
js
092dd1c7e2c7bfc6517ca5d451ff833e99b9a6be
diff --git a/archivant/test/class_template.py b/archivant/test/class_template.py index <HASH>..<HASH> 100644 --- a/archivant/test/class_template.py +++ b/archivant/test/class_template.py @@ -27,8 +27,8 @@ class TestArchivant(): self.arc = Archivant(conf) def tearDown(self): - self.arc._db.es.delete_by_query(index=self.TEST_ES_INDEX, - body={'query': {'match_all': {}}}) + self.arc._db.delete_all() + self.refresh_index() rmtree(self.tmpDir) self.tmpDir = None self.arc = None diff --git a/libreantdb/test/__init__.py b/libreantdb/test/__init__.py index <HASH>..<HASH> 100644 --- a/libreantdb/test/__init__.py +++ b/libreantdb/test/__init__.py @@ -17,8 +17,7 @@ def tearDownPackage(): def cleanall(): if db.es.indices.exists(db.index_name): - db.es.delete_by_query(index=db.index_name, - body={'query': {'match_all': {}}}) + db.delete_all() else: db.setup_db() db.es.indices.refresh(index=db.index_name)
remove deprecated delete_by_query() delete_by_query has been deprecated in elasticsearch <I> and it's not available at all in <I>
insomnia-lab_libreant
train
py,py
8747eb3133984978bd1a269ceeba8cad2240462e
diff --git a/bin/bootstrap.php b/bin/bootstrap.php index <HASH>..<HASH> 100644 --- a/bin/bootstrap.php +++ b/bin/bootstrap.php @@ -17,7 +17,7 @@ define('DB_DELIMITER', 'SΜ'); define('SMPROXY_VERSION', IN_PHAR ? '@phar-version@' : absorb_version_from_git()); // Set global error handler -set_error_handler('_error_handler', E_ALL | E_STRICT); +// set_error_handler('_error_handler', E_ALL | E_STRICT); // Check requirements - PHP if (version_compare(PHP_VERSION, '7.0', '<')) {
Comment set_error_handler, rewrite error handling lately
louislivi_SMProxy
train
php
739d1225fbcea149bb2db0a6f1d3ff9888189710
diff --git a/templates/app/mixins/save-model-mixin.js b/templates/app/mixins/save-model-mixin.js index <HASH>..<HASH> 100644 --- a/templates/app/mixins/save-model-mixin.js +++ b/templates/app/mixins/save-model-mixin.js @@ -11,7 +11,7 @@ export default Ember.Mixin.create({ actions: { save() { this.currentModel.save().then(() => { - this.transitionTo(`${this.routeName.split('.').slice(0, -1)}`); + this.transitionTo(this.routeName.split('.').slice(0, -1).join('.')); }, () => { console.log('Failed to save the model'); });
Joined route names by '.' to make them valid
terminalvelocity_sails-generate-seeds-frontend
train
js
f2625250112df2cba47d777d08ea8aed6a3a29f4
diff --git a/tests/unit/test_process.py b/tests/unit/test_process.py index <HASH>..<HASH> 100644 --- a/tests/unit/test_process.py +++ b/tests/unit/test_process.py @@ -15,10 +15,10 @@ class TestProcess(object): def test_stderr(self): h = vanilla.Hub() child = h.process.execv(['/usr/bin/env', 'grep', '-g']) - assert child.stderr.recv() == "grep: invalid option -- 'g'\n" + assert child.stderr.recv() def test_stderrtoout(self): h = vanilla.Hub() child = h.process.execv( ['/usr/bin/env', 'grep', '-g'], stderrtoout=True) - assert child.stdout.recv() == "grep: invalid option -- 'g'\n" + assert child.stdout.recv()
don't assume output from grep
cablehead_vanilla
train
py
35fca9dfa8b7c3a6d35825b6c8fdcc925a398dcb
diff --git a/src/smoothscroll.js b/src/smoothscroll.js index <HASH>..<HASH> 100644 --- a/src/smoothscroll.js +++ b/src/smoothscroll.js @@ -157,7 +157,7 @@ function polyfill() { */ function findScrollableParent(el) { while (el !== d.body && isScrollable(el) === false) { - el = el.parentNode; + el = el.parentNode || el.host; } return el;
fix smoothscroll not working with shadow DOM (#<I>) * fix smoothscroll not working with shadow DOM Adding the el.host will allow this plugin to work with shadow DOM. Before that, el.parentNode on a shadow-root returned null and failed. * Update smoothscroll.js * Update smoothscroll.js
iamdustan_smoothscroll
train
js
d6d9eab58e75ca0b1edeeb53079a4fd90edf4ada
diff --git a/lib/genealogy/query_methods.rb b/lib/genealogy/query_methods.rb index <HASH>..<HASH> 100644 --- a/lib/genealogy/query_methods.rb +++ b/lib/genealogy/query_methods.rb @@ -221,6 +221,21 @@ module Genealogy def aunts(options={}) uncles_and_aunts(sex: 'female', lineage: options[:lineage], half: options[:half]) end + def paternal_uncles(options = {}) + uncles(sex: 'male', lineage: 'paternal', half: options[:half]) + end + + def maternal_uncles(options = {}) + uncles(sex: 'male', lineage: 'maternal', half: options[:half]) + end + + def paternal_aunts(options = {}) + aunts(lineage: 'paternal', half: options[:half]) + end + + def maternal_aunts(options = {}) + aunts(sex: 'female', lineage: 'maternal', half: options[:half]) + end def nieces_and_nephews(options = {}, sibling_options = {}) case options[:sex]
added methods with set lineage options for uncles and aunts
masciugo_genealogy
train
rb
63715dacb444f18b6b371c44f0dfacd63a372b9f
diff --git a/src/Metable.php b/src/Metable.php index <HASH>..<HASH> 100644 --- a/src/Metable.php +++ b/src/Metable.php @@ -78,6 +78,17 @@ trait Metable } /** + * Add meta, or update if it already exists. + * @param string $key + * @param mixed $value + * @return object|bool + */ + public function addOrUpdateMeta($key, $value) + { + return $this->hasMeta($key) ? $this->updateMeta($key, $value) : $this->addMeta($key, $value); + } + + /** * Delete meta. * * @param string $key
Added addOrUpdateMeta method
appstract_laravel-meta
train
php
fd265d1d286dfdd90141509e32cdc58a603935ee
diff --git a/blocks/diff/diff.js b/blocks/diff/diff.js index <HASH>..<HASH> 100644 --- a/blocks/diff/diff.js +++ b/blocks/diff/diff.js @@ -212,7 +212,7 @@ define([ DiffTool.prototype.setContent = function(original, modified, diff, opt_refresh) { var overriddenMode = DiffTool.getModeByContent_(original, modified); - if (overriddenMode) { + if (overriddenMode && !this.hasMode(overriddenMode)) { this.deactivateMode(); this.setMode(overriddenMode); }
Improve setContent method by not reloading editor if mode was not changed. Former-commit-id: <I>da<I>b<I>acc2e<I>fe<I>e1e4ba<I>be
JetBrains_ring-ui
train
js
9ae31d09bd7878371f946f7e82232dc56b8d0b04
diff --git a/lib/xcode-download/xcode-versions.rb b/lib/xcode-download/xcode-versions.rb index <HASH>..<HASH> 100644 --- a/lib/xcode-download/xcode-versions.rb +++ b/lib/xcode-download/xcode-versions.rb @@ -1,7 +1,18 @@ module XcodeDownload GUI = { + '4.6' => 'https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6/xcode460417218a.dmg', + '4.6.1' => 'https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6.1/xcode4610419628a.dmg', '4.6.2' => 'https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6.2/xcode4620419895a.dmg' } + # Assuming Mountain Lion for now + CLI = { + '4.6.2' => 'https://developer.apple.com/downloads/download.action?path=Developer_Tools/command_line_tools_os_x_mountain_lion_for_xcode__april_2013/xcode462_cltools_10_86938259a.dmg' + } + +# Lion => { +# '4.6.2' => 'https://developer.apple.com/downloads/download.action?path=Developer_Tools/command_line_tools_os_x_lion_for_xcode__april_2013/xcode462_cltools_10_76938260a.dmg' +# } + end
Add old version of GUI and latest CLI package for ML (different packages for Lion)
phatblat_xcode-installer
train
rb
21f607b29775e86d758e766d54b48ec3916fd7d8
diff --git a/CHANGELOG.md b/CHANGELOG.md index <HASH>..<HASH> 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +1.12.2 +====== + +2018-02-26 + +* fixed lap times being recorded incorrectly while paused + + 1.12.1 ====== diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: setup( name="termdown", - version="1.12.1", + version="1.12.2", description="Countdown timer for your terminal", author="Torsten Rehn", author_email="torsten@rehn.email", diff --git a/termdown.py b/termdown.py index <HASH>..<HASH> 100755 --- a/termdown.py +++ b/termdown.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -VERSION = "1.12.1" +VERSION = "1.12.2" import curses from datetime import datetime, timedelta
release <I> :shipit:
trehn_termdown
train
md,py,py
4f0cfbd7522f1f0cf06e9fdd2d80edab9c57f6d9
diff --git a/command/node_eligibility.go b/command/node_eligibility.go index <HASH>..<HASH> 100644 --- a/command/node_eligibility.go +++ b/command/node_eligibility.go @@ -69,7 +69,7 @@ func (c *NodeEligibilityCommand) AutocompleteArgs() complete.Predictor { }) } -func (c *NodeEligibilityCommand) Name() string { return "node-eligibility" } +func (c *NodeEligibilityCommand) Name() string { return "node eligibility" } func (c *NodeEligibilityCommand) Run(args []string) int { var enable, disable, self bool
Fix cmd.Name() for NodeEligibilityCommand
hashicorp_nomad
train
go
362cf23e510eb2bbe0804f812295c7a168dcb3c7
diff --git a/orator/migrations/migrator.py b/orator/migrations/migrator.py index <HASH>..<HASH> 100644 --- a/orator/migrations/migrator.py +++ b/orator/migrations/migrator.py @@ -198,6 +198,7 @@ class Migrator(object): :type method: str """ self._note('') + names = [] for query in self._get_queries(migration, method): name = migration.__class__.__name__ bindings = None @@ -214,7 +215,11 @@ class Migrator(object): if bindings: query = (query, bindings) - self._note('[<info>%s</info>] %s' % (name, query)) + if name not in names: + self._note('[<info>{}</info>]'.format(name)) + names.append(name) + + self._note(query) def _get_queries(self, migration, method): """
Improves migrate command output when pretending
sdispater_orator
train
py
b9dc5baa0ef22bf201f235de877e643dd72d3dc7
diff --git a/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java b/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java index <HASH>..<HASH> 100644 --- a/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java +++ b/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java @@ -119,10 +119,24 @@ public class LottieAnimationView extends AppCompatImageView { } } + @Override public void setImageResource(int resId) { + super.setImageResource(resId); + recycleBitmaps(); + } + + @Override public void setImageDrawable(Drawable drawable) { + if (drawable != lottieDrawable) { + recycleBitmaps(); + } + super.setImageDrawable(drawable); + } + @Override public void invalidateDrawable(Drawable dr) { - // We always want to invalidate the root drawable to it redraws the whole drawable. - // Eventually it would be great to be able to invalidate just the changed region. - super.invalidateDrawable(lottieDrawable); + if (getDrawable() == lottieDrawable) { + // We always want to invalidate the root drawable to it redraws the whole drawable. + // Eventually it would be great to be able to invalidate just the changed region. + super.invalidateDrawable(lottieDrawable); + } } @Override protected Parcelable onSaveInstanceState() {
Check for lottieDrawable in some ImageView methods Fixes #<I>
airbnb_lottie-android
train
java
afc3d798841f0acfb7c48ce4179f1aa062c606d8
diff --git a/src/test/java/org/mapdb/BTreeMapParTest.java b/src/test/java/org/mapdb/BTreeMapParTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/org/mapdb/BTreeMapParTest.java +++ b/src/test/java/org/mapdb/BTreeMapParTest.java @@ -40,7 +40,7 @@ public class BTreeMapParTest { } s.shutdown(); - s.awaitTermination(10, TimeUnit.SECONDS); + s.awaitTermination(1000, TimeUnit.SECONDS); System.out.printf(" Threads %d, time %,d\n",threadNum,System.currentTimeMillis()-t);
BTreeMap: increase timeout on one test
jankotek_mapdb
train
java
7ee4f158f8ad444437f0afde9071ed01515eac84
diff --git a/src/Pair.php b/src/Pair.php index <HASH>..<HASH> 100644 --- a/src/Pair.php +++ b/src/Pair.php @@ -40,7 +40,7 @@ final class Pair implements \JsonSerializable * * @return mixed|null */ - public function __get($name) + public function __unset($name) { if ($name === 'key' || $name === 'value') { $this->$name = null;
Fix the magic method name for unset()
php-ds_polyfill
train
php
5e1d270e92389902b209658d112eac0d585b7d6c
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -96,6 +96,8 @@ Reference documentation """ return before + middle + after +dependencies = ["numpy>=1.13.1", "awkward>=0.8.0", "uproot-methods>=0.4.0", "cachetools"] + setup(name = "uproot", version = get_version(), packages = find_packages(exclude = ["tests"]), @@ -110,9 +112,9 @@ setup(name = "uproot", download_url = "https://github.com/scikit-hep/uproot/releases", license = "BSD 3-clause", test_suite = "tests", - install_requires = ["numpy>=1.13.1", "awkward>=0.8.0", "uproot-methods>=0.4.0", "cachetools"], + install_requires = dependencies, setup_requires = ["pytest-runner"], - tests_require = ["pytest>=3.9", "pkgconfig", "lz4", 'backports.lzma;python_version<"3.3"', "mock", "requests"], + tests_require = dependencies + ["pytest>=3.9", "pkgconfig", "lz4", 'backports.lzma;python_version<"3.3"', "mock", "requests"], classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers",
explicitly put install_requires into tests_require
scikit-hep_uproot
train
py
a588b241310b8ef1cac427ee243d26c6a25199ee
diff --git a/test/Num.js b/test/Num.js index <HASH>..<HASH> 100644 --- a/test/Num.js +++ b/test/Num.js @@ -11,6 +11,7 @@ const ln10 = Math.LN10; const pow = Math.pow; const sqrt = Math.sqrt; const abs = Math.abs; +const exp = Math.exp; const ceil = Math.ceil; const floor = Math.floor; const round = Math.round; @@ -315,10 +316,10 @@ describe('it should test Num#', () => { const wrap4 = new Num(n4); const wrap5 = new Num(n5); const wrap6 = new Num(n6); - const diff1 = abs(wrap1.exp - pow(e, n1)); - const diff2 = abs(wrap2.exp - pow(e, n2)); - const diff3 = abs(wrap3.exp - pow(e, n3)); - const diff4 = abs(wrap4.exp - pow(e, n4)); + const diff1 = abs(wrap1.exp - exp(n1)); + const diff2 = abs(wrap2.exp - exp(n2)); + const diff3 = abs(wrap3.exp - exp(n3)); + const diff4 = abs(wrap4.exp - exp(n4)); strictEqual(diff1 <= eps, true, `exp(1): ${ diff1 } <= ${ eps }`); strictEqual(diff2 <= eps, true, `exp(-5): ${ diff2 } <= ${ eps }`);
Num: improve #exp tests.
dwaynejs_dwayne
train
js
f413a703ba5bcf4b369932ae805615c4a34d34cb
diff --git a/ci/ci_build.rb b/ci/ci_build.rb index <HASH>..<HASH> 100755 --- a/ci/ci_build.rb +++ b/ci/ci_build.rb @@ -28,14 +28,14 @@ cd "#{root_dir}/activerecord" do puts puts "[CruiseControl] Building ActiveRecord with MySQL" puts - build_results[:activerecord_mysql] = system 'rake test_mysql' + build_results[:activerecord_mysql] = system 'rake mysql:rebuild_databases && rake test_mysql' end cd "#{root_dir}/activerecord" do puts puts "[CruiseControl] Building ActiveRecord with PostgreSQL" puts - build_results[:activerecord_postgresql8] = system 'rake test_postgresql' + build_results[:activerecord_postgresql8] = system 'rake postgresql:rebuild_databases && rake test_postgresql' end cd "#{root_dir}/activerecord" do
make mysql and postgresql rebuild databases on every CI build, to prevent breakages such as collation and character set changing
rails_rails
train
rb
c89dc93d4f6aac5398f2ea704b44cb4c6ae2bc9e
diff --git a/classes/PodsAdmin.php b/classes/PodsAdmin.php index <HASH>..<HASH> 100644 --- a/classes/PodsAdmin.php +++ b/classes/PodsAdmin.php @@ -1632,7 +1632,7 @@ class PodsAdmin { } if ( 'settings' === $config['currentPod']['type'] ) { - $config['currentPod']['storageType']['name'] = 'options'; + $config['currentPod']['storageType']['name'] = 'option'; } $config['currentPod']['storageType']['label'] = ucwords( $config['currentPod']['storageType']['name'] );
Update to ‘option’ for the storage type
pods-framework_pods
train
php
17574c0e35749b431aff4f7bb26677bafd5e3598
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ def check_setuptools(): check_setuptools() setup(name='instana', - version='1.2.2', + version='1.3.0', download_url='https://github.com/instana/python-sensor', url='https://www.instana.com/', license='MIT',
Bump packages version to <I>
instana_python-sensor
train
py
5602b94dcbb5b73478b2f09900b4659598dea34c
diff --git a/src/models/room.js b/src/models/room.js index <HASH>..<HASH> 100644 --- a/src/models/room.js +++ b/src/models/room.js @@ -1356,7 +1356,10 @@ Room.prototype._revertRedactionLocalEcho = function(redactionEvent) { // re-render after undoing redaction this.emit("Room.redactionCancelled", redactionEvent, this); // reapply relation now redaction failed - if (redactedEvent.isRelation()) { + if ( + redactedEvent.isRelation() && + redactedEvent.status !== EventStatus.CANCELLED + ) { this._aggregateNonLiveRelation(redactedEvent); } }
make sure where not re-adding cancelled events when undoing local red.
matrix-org_matrix-js-sdk
train
js
cfa8f8c21542b6d83068169e8f27696017ba19c1
diff --git a/builder/googlecompute/step_create_instance.go b/builder/googlecompute/step_create_instance.go index <HASH>..<HASH> 100644 --- a/builder/googlecompute/step_create_instance.go +++ b/builder/googlecompute/step_create_instance.go @@ -67,7 +67,7 @@ func getImage(c *Config, d Driver) (*Image, error) { if c.SourceImageProjectId == "" { return d.GetImage(name, fromFamily) } else { - return d.GetImageFromProject(c.SourceImageProjectId, c.SourceImage, fromFamily) + return d.GetImageFromProject(c.SourceImageProjectId, name, fromFamily) } }
fix bug of creating image from custom image_family
hashicorp_packer
train
go
2d127a8ef0e335725796679d7d35b19d66d2b6f0
diff --git a/prow/pod-utils/clone/clone.go b/prow/pod-utils/clone/clone.go index <HASH>..<HASH> 100644 --- a/prow/pod-utils/clone/clone.go +++ b/prow/pod-utils/clone/clone.go @@ -55,6 +55,13 @@ func Run(refs kube.Refs, dir, gitUserName, gitUserEmail string) Record { } else { target = "FETCH_HEAD" } + // we need to be "on" the target branch after the sync + // so we need to set the branch to point to the base ref, + // but we cannot update a branch we are on, so in case we + // are on the branch we are syncing, we check out the SHA + // first and reset the branch second, then check out the + // branch we just reset to be in the correct final state + commands = append(commands, shellCloneCommand(cloneDir, "git", "checkout", target)) commands = append(commands, shellCloneCommand(cloneDir, "git", "branch", "--force", refs.BaseRef, target)) commands = append(commands, shellCloneCommand(cloneDir, "git", "checkout", refs.BaseRef))
clonerefs: handle the case where we're on the target ref When we already have a cloned repository before we do a sync and we are already on the target base ref before the sync, `git branch --force` will fail. We therefore can check out the target SHA and reset the branch while we're not on it, then checkout the branch again to not remain in detached `HEAD` state after the sync.
kubernetes_test-infra
train
go
916b8587a6d7f5fe71504f9f0d3568f3fad33f15
diff --git a/class.krumo.php b/class.krumo.php index <HASH>..<HASH> 100644 --- a/class.krumo.php +++ b/class.krumo.php @@ -1087,7 +1087,7 @@ class Krumo // keys $keys = array_keys($data); - $limit = (int) static::_config('display', 'truncate_count', 0); + $limit = (int) static::_config('display', 'truncate_array_length', 0); $truncated = 0; // iterate @@ -1454,8 +1454,8 @@ class Krumo $_ = $data; // Get the truncate length from the config, or default to 100 - $truncate_length = static::_config('display', 'truncate_length', 100); - $display_cr = static::_config('display', 'carriage_returns', true); + $truncate_length = static::_config('display', 'truncate_string_length', 100); + $display_cr = static::_config('display', 'show_carriage_returns', true); $strlen = strlen($data); if (function_exists('mb_strlen')) {
Differentiate truncating strings and arrays
mmucklo_krumo
train
php
4f0114e6e8e9d7fe2f7008ba207f40ae79a18dbe
diff --git a/ants/viz/plot.py b/ants/viz/plot.py index <HASH>..<HASH> 100644 --- a/ants/viz/plot.py +++ b/ants/viz/plot.py @@ -2058,7 +2058,7 @@ def plot( blend=False, alpha=1, cmap="Greys_r", - overlay_cmap="jet", + overlay_cmap="turbo", overlay_alpha=0.9, cbar=False, cbar_length=0.8,
Prefer turbo to jet Turbo is a perceptually uniform version of jet, <URL>
ANTsX_ANTsPy
train
py
5aa6fefa776f3e6075c5e72eeffbf94116705805
diff --git a/Generator/ConfigSchema.php b/Generator/ConfigSchema.php index <HASH>..<HASH> 100644 --- a/Generator/ConfigSchema.php +++ b/Generator/ConfigSchema.php @@ -13,6 +13,8 @@ class ConfigSchema extends YMLFile { public static function componentDataDefinition() { $definition = parent::componentDataDefinition(); + $definition['filename']['default'] = "config/schema/%module.schema.yml"; + // Set this value as a default, so that different components that request // config don't have to repeat this value. $definition['line_break_between_blocks']['default'] = TRUE; diff --git a/Generator/Routing.php b/Generator/Routing.php index <HASH>..<HASH> 100644 --- a/Generator/Routing.php +++ b/Generator/Routing.php @@ -12,6 +12,17 @@ namespace DrupalCodeBuilder\Generator; class Routing extends YMLFile { /** + * {@inheritdoc} + */ + public static function componentDataDefinition() { + $definition = parent::componentDataDefinition(); + + $definition['filename']['default'] = "%module.routing.yml"; + + return $definition; + } + + /** * Constructor method; sets the component data. * * @param $component_name
Added default value for filename property to config schema and routing Yaml file generators.
drupal-code-builder_drupal-code-builder
train
php,php
678aee340bb2ac74695fdb6118757bc61b4a6f7c
diff --git a/openstack_dashboard/dashboards/project/stacks/tabs.py b/openstack_dashboard/dashboards/project/stacks/tabs.py index <HASH>..<HASH> 100644 --- a/openstack_dashboard/dashboards/project/stacks/tabs.py +++ b/openstack_dashboard/dashboards/project/stacks/tabs.py @@ -40,7 +40,7 @@ class StackTopologyTab(tabs.Tab): (("orchestration", "stacks:template"), ("orchestration", "stacks:lookup"), ("orchestration", "stacks:show"), - ("orchestration", "resources:index"),), + ("orchestration", "resource:index"),), request) def get_context_data(self, request):
Correct error in policy action name It is "resource" not "resources". Change-Id: I<I>cd5be<I>ebe<I>ebc6a<I>f<I>f1ce Closes-Bug: <I>
openstack_horizon
train
py
bac74d0f83f02037cfcc689fa9a2568fe19d97d5
diff --git a/cherrypy/test/webtest.py b/cherrypy/test/webtest.py index <HASH>..<HASH> 100644 --- a/cherrypy/test/webtest.py +++ b/cherrypy/test/webtest.py @@ -283,7 +283,8 @@ class WebCase(TestCase): elif i == "X": self.exit() cherrypy.py3print(p, end=' ') - + # ARGH + sys.stdout.flush() def exit(self): sys.exit()
trunk - adding a flush that is needed in python3. Might be superfluous here.
cherrypy_cheroot
train
py
02cd22bc2cba2d1a590141df05b5f33f2860caf6
diff --git a/lab_members/models.py b/lab_members/models.py index <HASH>..<HASH> 100644 --- a/lab_members/models.py +++ b/lab_members/models.py @@ -250,7 +250,6 @@ class Records(models.Model): advisors = models.ManyToManyField(Advisor, blank=True, - null=True, help_text=u"Please select advisor's name (or multiple co-advisors).<br>", related_name='%(app_label)s_%(class)s_co_advisors', )
Remove null keyword from ManyToManyField
mfcovington_django-lab-members
train
py
7a76c65b452460b4cb959a7f95186745afdcd6f3
diff --git a/packages/Grid/src/index.js b/packages/Grid/src/index.js index <HASH>..<HASH> 100644 --- a/packages/Grid/src/index.js +++ b/packages/Grid/src/index.js @@ -32,7 +32,7 @@ export const Col = styled.div` margin-left: ${props => props.offset || 0}; margin-right: ${props => props.pull || 0}; - @media only screen and (min-width: 600px) { + @media only screen and (min-width: 480px) { flex-basis: ${props => 100 / 12 * (props.md || props.sm || 0)}%; margin-left: ${props => props.offset_md || 0}; margin-right: ${props => props.pull_md || 0};
:lipstick: Changed "small" breakpoint
slupjs_slup
train
js
866896100301ce2738d333df2020b47304a31cb2
diff --git a/cookiecutter/cli.py b/cookiecutter/cli.py index <HASH>..<HASH> 100644 --- a/cookiecutter/cli.py +++ b/cookiecutter/cli.py @@ -17,6 +17,7 @@ from cookiecutter.exceptions import ( FailedHookException, UndefinedVariableInTemplate, UnknownExtension, + InvalidZipRepository, RepositoryNotFound, RepositoryCloneFailed ) @@ -122,6 +123,7 @@ def main( InvalidModeException, FailedHookException, UnknownExtension, + InvalidZipRepository, RepositoryNotFound, RepositoryCloneFailed) as e: click.echo(e)
Catch invalid zip files at the CLI level.
audreyr_cookiecutter
train
py
bd8fce7fc8e59b0e92e109584c80c8d3557cce1d
diff --git a/lib/fluent/supervisor.rb b/lib/fluent/supervisor.rb index <HASH>..<HASH> 100644 --- a/lib/fluent/supervisor.rb +++ b/lib/fluent/supervisor.rb @@ -444,7 +444,6 @@ module Fluent def initialize(opt) @daemonize = opt[:daemonize] - @supervise = opt[:supervise] @standalone_worker= opt[:standalone_worker] @config_path = opt[:config_path] @inline_config = opt[:inline_config]
no need to assign to ivar supervise is used in lib/command/fluentd.rb
fluent_fluentd
train
rb
e1b4dc84b4c4c515691f56aea65b6cd78a79439c
diff --git a/lib/merge-reports/report-builder.js b/lib/merge-reports/report-builder.js index <HASH>..<HASH> 100644 --- a/lib/merge-reports/report-builder.js +++ b/lib/merge-reports/report-builder.js @@ -45,15 +45,6 @@ module.exports = class ReportBuilder { .value(); } - async _copyToReportDir(files, {from, to}) { - await Promise.map(files, async (dataName) => { - const srcDataPath = path.resolve(from, dataName); - const destDataPath = path.resolve(to, dataName); - - await fs.move(srcDataPath, destDataPath); - }); - } - async _saveDataFile(data) { const formattedData = serverUtils.prepareCommonJSData(data); const destDataPath = path.resolve(this.destPath, 'data.js');
chore(merge-reports): remove unused code
gemini-testing_html-reporter
train
js
82aa7b52cc215b40f30d8eaf13ea06f8d566042e
diff --git a/lxd/cluster/gateway.go b/lxd/cluster/gateway.go index <HASH>..<HASH> 100644 --- a/lxd/cluster/gateway.go +++ b/lxd/cluster/gateway.go @@ -681,7 +681,7 @@ func (g *Gateway) currentRaftNodes() ([]db.RaftNode, error) { if !isLeader { return nil, errNotLeader } - servers, err := g.server.Cluster() + servers, err := g.server.Cluster(context.Background()) if err != nil { return nil, err }
Pass a context to server.Cluster()
lxc_lxd
train
go
6760dea8f935729e09be786db80854c38dadffcb
diff --git a/resources/lang/es-ES/forms.php b/resources/lang/es-ES/forms.php index <HASH>..<HASH> 100644 --- a/resources/lang/es-ES/forms.php +++ b/resources/lang/es-ES/forms.php @@ -155,7 +155,7 @@ return [ 'days-of-incidents' => '¿Cuántos días de incidentes mostrar?', 'time_before_refresh' => 'Tasa de actualización de la página de estado (en segundos).', 'banner' => 'Imagen del banner', - 'banner-help' => 'Se recomienda subir una imagen no más grande de 930px de ancho .', + 'banner-help' => "Se recomienda subir una imagen no más grande de 930px de ancho .", 'subscribers' => '¿Permitir a la gente inscribirse mediante noficiacion por correo electronico?', 'suppress_notifications_in_maintenance' => 'Suppress notifications when incident occurs during maintenance period?', 'skip_subscriber_verification' => '¿Omitir verificación de usuarios? (Advertencia, podrías ser spammeado)',
New translations forms.php (Spanish)
CachetHQ_Cachet
train
php
ef4efdf3956529e04e48a00e96f026299e98e4cf
diff --git a/languagetool-language-modules/ru/src/main/java/org/languagetool/rules/ru/RussianDashRule.java b/languagetool-language-modules/ru/src/main/java/org/languagetool/rules/ru/RussianDashRule.java index <HASH>..<HASH> 100644 --- a/languagetool-language-modules/ru/src/main/java/org/languagetool/rules/ru/RussianDashRule.java +++ b/languagetool-language-modules/ru/src/main/java/org/languagetool/rules/ru/RussianDashRule.java @@ -32,7 +32,7 @@ public class RussianDashRule extends AbstractDashRule { public RussianDashRule() { super(trie); - setDefaultTempOff(); // Slows down start up. See GitHub issue #1016. + // setDefaultTempOff(); // Slows down start up. See GitHub issue #1016. } @Override
[ru] activate rule (#<I>)
languagetool-org_languagetool
train
java
7b6042884b93bd615dc3b0a18ea116ab1be9ebad
diff --git a/lib/terraform_dsl/stack_module.rb b/lib/terraform_dsl/stack_module.rb index <HASH>..<HASH> 100644 --- a/lib/terraform_dsl/stack_module.rb +++ b/lib/terraform_dsl/stack_module.rb @@ -18,14 +18,15 @@ module Terraform end def flatten_variable_arrays(variables) - variables.map do |k, v| + vars = variables.map do |k, v| if v.is_a?(Hash) && v.key?(:default) && v[:default].is_a?(Array) v[:default] = v[:default].join(',') elsif v.is_a?(Array) v = v.join(',') end [k, v] - end.to_h + end + Hash[vars] end end @@ -44,7 +45,7 @@ module Terraform end def build(**kwargs) - vars = kwargs.map { |k, v| [k, { default: v }] }.to_h + vars = Hash[kwargs.map { |k, v| [k, { default: v }] }] @stack_elements[:variable].merge!(vars) b = @block instance_eval(&b)
Fix some Hash issues, probably related to Ruby version differences.
dalehamel_cloudshaper
train
rb
8b34999b92031bfcbcd54ea6aa7519129014cb47
diff --git a/umi_tools/extract.py b/umi_tools/extract.py index <HASH>..<HASH> 100644 --- a/umi_tools/extract.py +++ b/umi_tools/extract.py @@ -82,9 +82,8 @@ Command line options -------------------- ''' - import sys - +from itertools import izip import umi_tools.Utilities as U @@ -318,7 +317,7 @@ def main(argv=None): read2s = fastqIterate(U.openFile(options.read2_in)) read2_out = U.openFile(options.read2_out, "w") - for read1, read2 in zip(read1s, read2s): + for read1, read2 in izip(read1s, read2s): new_1, new_2 = processor(read1, read2) options.stdout.write(str(new_1) + "\n") read2_out.write(str(new_2) + "\n")
Use iterator to reduce memory usage in paired end processessing
CGATOxford_UMI-tools
train
py
515b92449a99a0bdab44b17c5140df6bf1156d44
diff --git a/lib/slather/project.rb b/lib/slather/project.rb index <HASH>..<HASH> 100755 --- a/lib/slather/project.rb +++ b/lib/slather/project.rb @@ -130,8 +130,19 @@ module Slather end) end - files = profdata_llvm_cov_output(binary_path, pathnames_per_binary).split("\n\n") - + max_size = %x(getconf ARG_MAX).to_i + total_size = pathnames_per_binary.join.size + # There is an unknown overhead to the total size, so add one here to split into more chunks + chunks = (total_size / max_size.to_f).ceil + 1 + chunk_size = (pathnames_per_binary.count / chunks).floor + + files = [] + p "Max char size: #{max_size}, total char size: #{total_size}, Array chunks: #{chunks}, Array chunk size: #{chunk_size}" + pathnames_per_binary.each_slice(chunk_size).to_a.each do |chunk| + p "Actual chunk char size: #{chunk.join.size}" + files.concat(profdata_llvm_cov_output(binary_path, chunk).split("\n\n")) + end + coverage_files.concat(files.map do |source| coverage_file = coverage_file_class.new(self, source, line_numbers_first) # If a single source file is used, the resulting output does not contain the file name.
Update project.rb Chunked the call to llvm-cov show into multiple pieces to prevent a E2BIG error
SlatherOrg_slather
train
rb
23468506027c3b78da135d0a7ee25c40f8178d19
diff --git a/etrago/tools/io.py b/etrago/tools/io.py index <HASH>..<HASH> 100644 --- a/etrago/tools/io.py +++ b/etrago/tools/io.py @@ -299,6 +299,11 @@ class NetworkScenario(ScenarioBase): df = self.fetch_by_relname(comp) + # Drop columns with only NaN values + df = df.drop(df.isnull().all()[df.isnull().all()].index, axis=1) + if pypsa_comp == 'Generator': + df.sign=1 + network.import_components_from_dataframe(df, pypsa_comp) network = self.series_fetch_by_relname(network, comp, pypsa_comp)
Insert only timeseries columns with data
openego_eTraGo
train
py
02ab51d67c2c2f648ac203790f7b2610bf1da1ad
diff --git a/config/image-optimizer.php b/config/image-optimizer.php index <HASH>..<HASH> 100644 --- a/config/image-optimizer.php +++ b/config/image-optimizer.php @@ -45,7 +45,7 @@ return [ /* * If set to `true` all output of the optimizer binaries will be appended to the default log. - * You can also set this on an class that implements `Psr\Log\LoggerInterface`. + * You can also set this to a class that implements `Psr\Log\LoggerInterface`. */ 'log_optimizer_activity' => false, ];
Update image-optimizer.php
spatie_laravel-image-optimizer
train
php