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
3d56d04ba5c751d1ee0c9d56594115028c3fcec8
diff --git a/scripts/wee-routes.js b/scripts/wee-routes.js index <HASH>..<HASH> 100644 --- a/scripts/wee-routes.js +++ b/scripts/wee-routes.js @@ -81,14 +81,31 @@ function _parseUrl(value) { } export default { + /** + * Register routes + * + * @param {Array} routes + * @returns {Object} + */ map(routes) { _add(routes); return this; }, + + /** + * Reset all routes - mainly for testing purposes + */ reset() { _routes = []; }, + + /** + * Retrieve all routes or specific route by name/path + * + * @param {string} [value] + * @returns {Object|Array} + */ routes(value) { if (value) { let result = _getRoute(value);
Add code comments to currently defined public route methods
weepower_wee-core
train
js
81607132ea1cd45c76f1036b0e3117aa968fcbc8
diff --git a/lib/risky/secondary_indexes.rb b/lib/risky/secondary_indexes.rb index <HASH>..<HASH> 100644 --- a/lib/risky/secondary_indexes.rb +++ b/lib/risky/secondary_indexes.rb @@ -69,6 +69,8 @@ module Risky::SecondaryIndexes end def paginate_keys_by_index(index2i, value, opts = {}) + opts.reject! { |k, v| v.nil? } + index = "#{index2i}_#{indexes2i[index2i.to_s][:type]}" bucket.get_index(index, value, opts) end
Don't send nil options to riak-client
aphyr_risky
train
rb
d99576bd4e2c517a53623da4037ec9f6b226bb57
diff --git a/lib/room.js b/lib/room.js index <HASH>..<HASH> 100644 --- a/lib/room.js +++ b/lib/room.js @@ -192,9 +192,11 @@ class Room { let user; const usersArray = []; - for (let i = 0; i < ids.length; i++) { - user = this.getUser(ids[i]); - if (user != null) usersArray.push(user); + if (ids) { + for (let i = 0; i < ids.length; i++) { + user = this.getUser(ids[i]); + if (user != null) usersArray.push(user); + } } return usersArray;
Fix: Do not assume we were given a valid array for room.usersToArray Fixes #<I> (#<I>)
plugCubed_plugAPI
train
js
aed886b7237e5e1010202f770408dd8791faa04a
diff --git a/REST/TwitterClient.php b/REST/TwitterClient.php index <HASH>..<HASH> 100755 --- a/REST/TwitterClient.php +++ b/REST/TwitterClient.php @@ -100,7 +100,7 @@ class TwitterClient return $this; } catch (Exception $e) { - throw new ExternalApiException($e->getMessage(), $e->getCode()); + throw new ExternalApiException($e->getMessage(), $e->getCode(), $e); } } @@ -110,7 +110,7 @@ class TwitterClient $res = $this->client->request($method, $uri, $body); return json_decode($res->getBody(), true); } catch(Exception $e){ - throw new ExternalApiException($e->getMessage(), $e->getCode()); + throw new ExternalApiException($e->getMessage(), $e->getCode(), $e); } }
CampaignChain/campaignchain#<I> Use guzzlehttp/guzzle instead of guzzle/guzzle
CampaignChain_channel-twitter
train
php
ec06edb0161edf0a9e270d4233df3a9488aea9c7
diff --git a/Kwf/Media.php b/Kwf/Media.php index <HASH>..<HASH> 100644 --- a/Kwf/Media.php +++ b/Kwf/Media.php @@ -225,6 +225,19 @@ class Kwf_Media return Kwf_Config::getValue('mediaCacheDir').'/'.$class.'/'.$groupingFolder.'/'.$id.'/'.$type; } + private static function _deleteFolder($path) + { + foreach (array_slice(scandir($path), 2) as $fileOrFolder) { + $fileOrFolderPath = $path.'/'.$fileOrFolder; + if (is_file($fileOrFolderPath)) { + unlink($fileOrFolderPath); + } else { + self::_deleteFolder($fileOrFolderPath); + } + } + rmdir($path); + } + public static function collectGarbage($debug) { $cacheFolder = Kwf_Config::getValue('mediaCacheDir'); @@ -233,6 +246,11 @@ class Kwf_Media foreach ($mediaClasses as $mediaClass) { if (is_file($cacheFolder.'/'.$mediaClass)) continue; + if (!class_exists($mediaClass)) { + self::_deleteFolder($cacheFolder.'/'.$mediaClass); + continue; + } + if (!is_instance_of($mediaClass, 'Kwf_Media_Output_ClearCacheInterface')) continue; $classFolder = $cacheFolder.'/'.$mediaClass;
Delete mediaCache-folders for removed components This is also required as is_instance_of throws exception if class is not existing.
koala-framework_koala-framework
train
php
26904902a9290dd1a379970b1fefe50e76358ff9
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -191,7 +191,7 @@ if 'bdist_wheel' in sys.argv and '--plat-name' not in sys.argv: sys.argv.append(name.replace('.', '_').replace('-', '_')) setup( - name="pyvex", version='9.0.gitrolling', description="A Python interface to libVEX and VEX IR", + name="pyvex", version='9.1.gitrolling', description="A Python interface to libVEX and VEX IR", python_requires='>=3.6', url='https://github.com/angr/pyvex', packages=packages, @@ -199,7 +199,7 @@ setup( install_requires=[ 'pycparser', 'cffi>=1.0.3', - 'archinfo==9.0.gitrolling', + 'archinfo==9.1.gitrolling', 'bitstring', 'future', ],
Bump minor version to <I>
angr_pyvex
train
py
e4b0f65581e13dab0ce57edecb5927f07cabf8e9
diff --git a/src/Jaeger/Tracer.php b/src/Jaeger/Tracer.php index <HASH>..<HASH> 100644 --- a/src/Jaeger/Tracer.php +++ b/src/Jaeger/Tracer.php @@ -133,7 +133,7 @@ class Tracer implements OTTracer $hostname = $this->getHostName(); $this->ipAddress = $this->getHostByName($hostname); - if (empty($hostname) != false) { + if (!empty($hostname)) { $this->tags[JAEGER_HOSTNAME_TAG_KEY] = $hostname; } }
Fix condition in tracer to set the hostname
jonahgeorge_jaeger-client-php
train
php
862db73bf2d0e2fc657101a639d480462d90026d
diff --git a/config/application.rb b/config/application.rb index <HASH>..<HASH> 100644 --- a/config/application.rb +++ b/config/application.rb @@ -26,6 +26,29 @@ module Peoplefinder ActionView::Base.default_form_builder = GovukElementsFormBuilder::FormBuilder + # Use AES-256-GCM authenticated encryption for encrypted cookies. + # Also, embed cookie expiry in signed or encrypted cookies for increased security. + # + # This option is not backwards compatible with earlier Rails versions. + # It's best enabled when your entire app is migrated and stable on 5.2. + # + # Existing cookies will be converted on read then written with the new scheme. + config.action_dispatch.use_authenticated_cookie_encryption = true + + # Use AES-256-GCM authenticated encryption as default cipher for encrypting messages + # instead of AES-256-CBC, when use_authenticated_message_encryption is set to true. + config.active_support.use_authenticated_message_encryption = true + + # Add default protection from forgery to ActionController::Base instead of in + # ApplicationController. + config.action_controller.default_protect_from_forgery = true + + # Use SHA-1 instead of MD5 to generate non-sensitive digests, such as the ETag header. + config.active_support.use_sha1_digests = true + + # Make `form_with` generate id attributes for any generated HTML tags. + config.action_view.form_with_generates_ids = true + # app title appears in the header bar config.app_title = 'People Finder'
Added missing config value from previous upgrade back to application.rb
ministryofjustice_peoplefinder
train
rb
96ec88da07cac38f1b2ac5e2d84f4e949c3122b9
diff --git a/py/ec2_cmd.py b/py/ec2_cmd.py index <HASH>..<HASH> 100755 --- a/py/ec2_cmd.py +++ b/py/ec2_cmd.py @@ -170,6 +170,8 @@ def wait_for_ssh(ips, port=22, skipAlive=True, requiredsuccess=3): def dump_hosts_config(ec2_config, reservation, filename=DEFAULT_HOSTS_FILENAME): + if not filename: filename=DEFAULT_HOSTS_FILENAME + cfg = {} cfg['aws_credentials'] = find_file(ec2_config['aws_credentials']) cfg['username'] = ec2_config['username']
Missing None check in ec2 command
h2oai_h2o-2
train
py
a7531e0246ae6ff536f9a32591ade4c357a3e32f
diff --git a/core/client/src/main/java/alluxio/hadoop/AbstractFileSystem.java b/core/client/src/main/java/alluxio/hadoop/AbstractFileSystem.java index <HASH>..<HASH> 100644 --- a/core/client/src/main/java/alluxio/hadoop/AbstractFileSystem.java +++ b/core/client/src/main/java/alluxio/hadoop/AbstractFileSystem.java @@ -456,12 +456,10 @@ abstract class AbstractFileSystem extends org.apache.hadoop.fs.FileSystem { List<URIStatus> statuses; try { statuses = sFileSystem.listStatus(uri); + } catch (FileDoesNotExistException fnte) { + throw new FileNotFoundException(HadoopUtils.getPathWithoutScheme(path)); } catch (AlluxioException e) { - if (e instanceof FileDoesNotExistException) { - throw new FileNotFoundException(HadoopUtils.getPathWithoutScheme(path)); - } else { - throw new IOException(e); - } + throw new IOException(e); } FileStatus[] ret = new FileStatus[statuses.size()];
Instead of doing instanceof, could we catch (FileDoesNotExistException ...) and then catch (AlluxioException ...)
Alluxio_alluxio
train
java
9b00de127cbdda1799ed0d0767516beadc9e237e
diff --git a/sprockets/mixins/http/__init__.py b/sprockets/mixins/http/__init__.py index <HASH>..<HASH> 100644 --- a/sprockets/mixins/http/__init__.py +++ b/sprockets/mixins/http/__init__.py @@ -6,6 +6,7 @@ requests. """ import asyncio +import functools import logging import os import socket @@ -89,6 +90,7 @@ class HTTPResponse: return len(self) @property + @functools.lru_cache(1) def body(self): """Returns the HTTP response body, deserialized if possible.
Include lru_cache
sprockets_sprockets.mixins.http
train
py
95bcd5f2cfb25c8c02529899edf55d98e0dc8f71
diff --git a/src/org/mozilla/javascript/Interpreter.java b/src/org/mozilla/javascript/Interpreter.java index <HASH>..<HASH> 100644 --- a/src/org/mozilla/javascript/Interpreter.java +++ b/src/org/mozilla/javascript/Interpreter.java @@ -1703,6 +1703,8 @@ public class Interpreter { debuggerFrame.onEnter(cx, scope, thisObj, args); } + cx.interpreterSourceFile = idata.itsSourceFile; + Object result = undefined; // If javaException != null on exit, it will be throw instead of // normal return
Initialize cx.interpreterSourceFile with script o r function source name before starting bytecode execution so this information for the first script throw/runtime exception
mozilla_rhino
train
java
f336097b6a75ac819d934dbc0db0f6901c4ad464
diff --git a/randombytes.js b/randombytes.js index <HASH>..<HASH> 100644 --- a/randombytes.js +++ b/randombytes.js @@ -1,9 +1,9 @@ var assert = require('nanoassert') var randombytes = (function () { var QUOTA = 65536 // limit for QuotaExceededException - var crypto = typeof window !== 'undefined' ? (window.crypto || window.msCrypto) : null + var crypto = typeof global !== 'undefined' ? crypto = (global.crypto || global.msCrypto) : null - function windowBytes (out, n) { + function browserBytes (out, n) { for (var i = 0; i < n; i += QUOTA) { crypto.getRandomValues(out.subarray(i, i + Math.min(n - i, QUOTA))) } @@ -18,7 +18,7 @@ var randombytes = (function () { } if (crypto && crypto.getRandomValues) { - return windowBytes + return browserBytes } else if (typeof require !== 'undefined') { // Node.js. crypto = require('cry' + 'pto');
Fix bug with undefined window in web workers Fixes #8
sodium-friends_sodium-javascript
train
js
7bf2cd59cdce6f6d3432a503ad28b7ec27aad99d
diff --git a/src/ConfigHelper.js b/src/ConfigHelper.js index <HASH>..<HASH> 100644 --- a/src/ConfigHelper.js +++ b/src/ConfigHelper.js @@ -101,6 +101,7 @@ let NATIVE_THREAD_PROPS_WHITELIST = { writingDirection: true, /* text color */ color: true, + tintColor: true, }; function configureProps() {
Add tint color to native props (#<I>) Add tint color to native props white list
kmagiera_react-native-reanimated
train
js
7aea424ec086e8c6cf9fe19e18aba560f994e7e8
diff --git a/src/middlewares/next-i18next-middleware.js b/src/middlewares/next-i18next-middleware.js index <HASH>..<HASH> 100644 --- a/src/middlewares/next-i18next-middleware.js +++ b/src/middlewares/next-i18next-middleware.js @@ -13,25 +13,25 @@ export default function (nexti18next) { const ignoreRoute = route(ignoreRegex) const isI18nRoute = url => ignoreRoute(url) !== false - let middleware = [] + const middleware = [] if (!config.serverLanguageDetection) { - middleware = middleware.concat([(req, res, next) => { + middleware.push((req, res, next) => { if (isI18nRoute(req.url)) { req.lng = config.defaultLanguage } next() - }]) + }) } - middleware = middleware.concat([i18nextMiddleware.handle(i18n, { ignoreRoutes })]) + middleware.push(i18nextMiddleware.handle(i18n, { ignoreRoutes })) if (localeSubpaths) { - middleware = middleware.concat([ + middleware.push( forceTrailingSlash(allLanguages, ignoreRegex), lngPathDetector(ignoreRegex), handleLanguageSubpath(allLanguages), - ]) + ) } return middleware
Use push instead of concat in middleware
isaachinman_next-i18next
train
js
ea7afabbdc461777313538b87b467ea6b7921048
diff --git a/core/src/test/java/com/linecorp/armeria/common/stream/AbstractStreamMessageTest.java b/core/src/test/java/com/linecorp/armeria/common/stream/AbstractStreamMessageTest.java index <HASH>..<HASH> 100644 --- a/core/src/test/java/com/linecorp/armeria/common/stream/AbstractStreamMessageTest.java +++ b/core/src/test/java/com/linecorp/armeria/common/stream/AbstractStreamMessageTest.java @@ -362,7 +362,7 @@ public abstract class AbstractStreamMessageTest { }, true); await().untilAsserted(() -> assertThat(stream.isOpen()).isFalse()); - assertThat(data.refCnt()).isZero(); + await().untilAsserted(() -> assertThat(data.refCnt()).isZero()); } @Test @@ -396,7 +396,7 @@ public abstract class AbstractStreamMessageTest { }, true); await().untilAsserted(() -> assertThat(stream.isOpen()).isFalse()); - assertThat(data.refCnt()).isZero(); + await().untilAsserted(() -> assertThat(data.refCnt()).isZero()); } private void assertSuccess() {
Wait for refcnt assertions. (#<I>)
line_armeria
train
java
e3a60dfac846d35ff3492f489901c1cc306094e7
diff --git a/ratings/ratings_tests/tests.py b/ratings/ratings_tests/tests.py index <HASH>..<HASH> 100644 --- a/ratings/ratings_tests/tests.py +++ b/ratings/ratings_tests/tests.py @@ -97,6 +97,10 @@ class RatingsTestCase(TestCase): self.assertEqual(self.item1.ratings.count(), 1) self.assertEqual(self.item1.ratings.all()[0], rating2) + # trying to remove multiple times is fine + self.item1.ratings.unrate(self.john) + self.assertEqual(self.item1.ratings.count(), 1) + # make sure the item2's rating is still intact self.assertEqual(self.item2.ratings.count(), 1)
Adding a test to ensure that multiple calls to unrate() are safe
django-de_django-simple-ratings
train
py
32dba7424f2b986f65ddd192b6a28821dc12cd6c
diff --git a/src/main/webapp/js/Plugins/view.js b/src/main/webapp/js/Plugins/view.js index <HASH>..<HASH> 100644 --- a/src/main/webapp/js/Plugins/view.js +++ b/src/main/webapp/js/Plugins/view.js @@ -53,8 +53,8 @@ ORYX.Plugins.View = { //Standard Values this.zoomLevel = 1.0; this.maxFitToScreenLevel=1.5; - this.minZoomLevel = 0.1; - this.maxZoomLevel = 2.5; + this.minZoomLevel = 0.4; + this.maxZoomLevel = 2.0; this.diff=5; //difference between canvas and view port, s.th. like toolbar?? //Read properties @@ -1493,7 +1493,7 @@ ORYX.Plugins.View = { _checkSize:function(){ var canvasParent=this.facade.getCanvas().getHTMLContainer().parentNode; var minForCanvas= Math.min((canvasParent.parentNode.getWidth()/canvasParent.getWidth()),(canvasParent.parentNode.getHeight()/canvasParent.getHeight())); - return 1.05 > minForCanvas; + return 0.7 > minForCanvas; }, /**
JBPM-<I>: cannot connect two node when you zoomed out.
kiegroup_jbpm-designer
train
js
ba5bf639c91dc53df2e17cb665d75078f0c607a2
diff --git a/typedload/__init__.py b/typedload/__init__.py index <HASH>..<HASH> 100644 --- a/typedload/__init__.py +++ b/typedload/__init__.py @@ -16,6 +16,23 @@ # # author Salvo "LtWorf" Tomaselli <tiposchi@tiscali.it> + +from typing import Any + + __all__ = [ 'dataloader', + 'load', ] + + +def load(value: Any, type_: type) -> Any: + """ + Quick function call to load data into a type. + + It is useful to avoid creating the Loader object, + in case only the default parameters are used. + """ + from . import dataloader + loader = dataloader.Loader() + return loader.load(value, type_)
Add load function to __init__ To allow a quicker usage, without creating the object.
ltworf_typedload
train
py
71fe966828b151b262e700c152bcd3cead509154
diff --git a/aiohttp/server.py b/aiohttp/server.py index <HASH>..<HASH> 100644 --- a/aiohttp/server.py +++ b/aiohttp/server.py @@ -239,9 +239,10 @@ class ServerHttpProtocol(aiohttp.StreamProtocol): isinstance(handler, asyncio.Future)): yield from handler - except (asyncio.CancelledError, - errors.ClientDisconnectedError): - self.log_debug('Ignored premature client disconnection.') + except (asyncio.CancelledError, errors.ClientDisconnectedError): + if self.debug: + self.log_exception( + 'Ignored premature client disconnection.') break except errors.HttpProcessingError as exc: if self.transport is not None: @@ -275,6 +276,7 @@ class ServerHttpProtocol(aiohttp.StreamProtocol): self.transport.close() break else: + # connection is closed break def handle_error(self, status=500,
log disconnection traceback in debug mode
aio-libs_aiohttp
train
py
cf52ab5c11ce383a32b8108fd8293c413c009586
diff --git a/src/search/FindReplace.js b/src/search/FindReplace.js index <HASH>..<HASH> 100644 --- a/src/search/FindReplace.js +++ b/src/search/FindReplace.js @@ -193,8 +193,8 @@ define(function (require, exports, module) { var queryDialog = Strings.CMD_FIND + ": <input type='text' style='width: 10em'/>" + "<div class='navigator'>" + - "<button id='find-prev' class='btn no-focus' title='" + Strings.BUTTON_PREV_HINT + "'>" + Strings.BUTTON_PREV + "</button>" + - "<button id='find-next' class='btn no-focus' title='" + Strings.BUTTON_NEXT_HINT + "'>" + Strings.BUTTON_NEXT + "</button>" + + "<button id='find-prev' class='btn no-focus' tabindex='-1' title='" + Strings.BUTTON_PREV_HINT + "'>" + Strings.BUTTON_PREV + "</button>" + + "<button id='find-next' class='btn no-focus' tabindex='-1' title='" + Strings.BUTTON_NEXT_HINT + "'>" + Strings.BUTTON_NEXT + "</button>" + "</div>" + "<div class='message'>" + "<span id='find-counter'></span> " +
disallow tabbing to prev and next buttons
adobe_brackets
train
js
0a791e18bca760e3a767de36227b2f817b4e64b4
diff --git a/firefox/src/java/org/openqa/selenium/firefox/FirefoxProfile.java b/firefox/src/java/org/openqa/selenium/firefox/FirefoxProfile.java index <HASH>..<HASH> 100644 --- a/firefox/src/java/org/openqa/selenium/firefox/FirefoxProfile.java +++ b/firefox/src/java/org/openqa/selenium/firefox/FirefoxProfile.java @@ -290,6 +290,7 @@ public class FirefoxProfile { prefs.put("extensions.update.enabled", "false"); prefs.put("extensions.update.notifyUser", "false"); prefs.put("network.manage-offline-status", "false"); + prefs.put("network.http.max-connections-per-server", "10"); prefs.put("security.fileuri.origin_policy", "3"); prefs.put("security.fileuri.strict_origin_policy", "false"); prefs.put("security.warn_entering_secure", "false");
SimonStewart: Defaulting the max number of connections to use, as this is sometimes not set. This value has been plucked out of thin air, and may not match reality particularly well r<I>
SeleniumHQ_selenium
train
java
51d130906eb49adf4448ec3538a4f580059749f7
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ if __name__ == '__main__': url=package_about['__url__'], packages=find_packages(), # dependencies - install_requires=['typing'], + install_requires=['typing', 'pyyaml'], # metadata for package search license='MIT', # https://pypi.python.org/pypi?%3Aaction=list_classifiers
added YAML parser requirement
MatterMiners_cobald
train
py
e60d8d81cc2901c747d9198d231b448d502d87ed
diff --git a/lib/xml/mapping_extensions/node_base.rb b/lib/xml/mapping_extensions/node_base.rb index <HASH>..<HASH> 100644 --- a/lib/xml/mapping_extensions/node_base.rb +++ b/lib/xml/mapping_extensions/node_base.rb @@ -37,9 +37,9 @@ module XML end # Override this method to convert XML text to an object value - # @param _xml_text [String] The XML string to parse + # @param xml_text [String] The XML string to parse # @return [Object] The object value - def to_value(_xml_text) + def to_value(xml_text) # rubocop:disable Lint/UnusedMethodArgument fail NoMethodError, "#{self.class} should override #to_value to convert an XML string to an object value" end
Don't use underscores for abstract method parameters just to keep RuboCop happy
dmolesUC3_xml-mapping_extensions
train
rb
65f5c7f91dc60b01158140fcb6236344ac2e0f88
diff --git a/docs/logging_snippets.py b/docs/logging_snippets.py index <HASH>..<HASH> 100644 --- a/docs/logging_snippets.py +++ b/docs/logging_snippets.py @@ -365,5 +365,6 @@ def main(): for item in to_delete: _backoff_not_found(item.delete) + if __name__ == '__main__': main()
Putting 2 empty lines after function definiton in logging snippets.
googleapis_google-cloud-python
train
py
4c4dc453efd8bb6d57e8f794c9a724a4de926ef6
diff --git a/physical/physical_test.go b/physical/physical_test.go index <HASH>..<HASH> 100644 --- a/physical/physical_test.go +++ b/physical/physical_test.go @@ -125,6 +125,14 @@ func testBackend(t *testing.T, b Backend) { t.Fatalf("err: %v", err) } + // Get should return the child + out, err = b.Get("foo/bar") + if err != nil { + t.Fatalf("err: %v", err) + } + if out == nil { + t.Fatalf("missing child") + } } func testBackend_ListPrefix(t *testing.T, b Backend) {
physical: ensure backend does NOT do recursive delete
hashicorp_vault
train
go
61e04f22d94f47af0bac408578ff39d07584392f
diff --git a/FlowCytometryTools/GUI/fc_widget.py b/FlowCytometryTools/GUI/fc_widget.py index <HASH>..<HASH> 100644 --- a/FlowCytometryTools/GUI/fc_widget.py +++ b/FlowCytometryTools/GUI/fc_widget.py @@ -601,7 +601,7 @@ class FCGateManager(EventGenerator): info = {'options': self.get_available_channels()} for key in ['pageX', 'pageY']: - if event.mouseevent.guiEvent is not None: + if event.mouseevent.guiEvent and hasattr(event.mouseevent.guiEvent, key): info[key] = event.mouseevent.guiEvent[key] else: info[key] = 1 # put at top left part
FIX different guiEvent in wx backend
eyurtsev_FlowCytometryTools
train
py
da92737a726520a52c720bf25f208f7b603e65b9
diff --git a/mss/windows.py b/mss/windows.py index <HASH>..<HASH> 100644 --- a/mss/windows.py +++ b/mss/windows.py @@ -214,16 +214,12 @@ class MSS(MSSMixin): # All monitors sm_xvirtualscreen, sm_yvirtualscreen = 76, 77 sm_cxvirtualscreen, sm_cyvirtualscreen = 78, 79 - left = self.user32.GetSystemMetrics(sm_xvirtualscreen) - right = self.user32.GetSystemMetrics(sm_cxvirtualscreen) - top = self.user32.GetSystemMetrics(sm_yvirtualscreen) - bottom = self.user32.GetSystemMetrics(sm_cyvirtualscreen) self._monitors.append( { - "left": int(left), - "top": int(top), - "width": int(right - left), - "height": int(bottom - top), + "left": int(self.user32.GetSystemMetrics(sm_xvirtualscreen)), + "top": int(self.user32.GetSystemMetrics(sm_yvirtualscreen)), + "width": int(self.user32.GetSystemMetrics(sm_cxvirtualscreen)), + "height": int(self.user32.GetSystemMetrics(sm_cyvirtualscreen)), } )
Windows: Fix the screen bounding AiO rectangle Original patch by Chris Wheeler (@grintor).
BoboTiG_python-mss
train
py
71a77879ff9b4c8069d7cceb2a81b3d0a32a616f
diff --git a/lib/cuke_slicer/version.rb b/lib/cuke_slicer/version.rb index <HASH>..<HASH> 100644 --- a/lib/cuke_slicer/version.rb +++ b/lib/cuke_slicer/version.rb @@ -1,4 +1,4 @@ module CukeSlicer # The current version for the gem. - VERSION = "2.1.0" + VERSION = "2.2.0" end
Bump gem version Updating gem version to '<I>' for the upcoming release.
grange-insurance_cuke_slicer
train
rb
61c787cea204609acfa2049fb7a86e5e38444bff
diff --git a/lib/defaults.php b/lib/defaults.php index <HASH>..<HASH> 100644 --- a/lib/defaults.php +++ b/lib/defaults.php @@ -34,6 +34,7 @@ 'editorspelling' => 0, 'editorfontlist' => 'Trebuchet:Trebuchet MS,Verdana,Arial,Helvetica,sans-serif;Arial:arial,helvetica,sans-serif;Courier New:courier new,courier,monospace;Georgia:georgia,times new roman,times,serif;Tahoma:tahoma,arial,helvetica,sans-serif;Times New Roman:times new roman,times,serif;Verdana:verdana,arial,helvetica,sans-serif;Impact:impact;Wingdings:wingdings', 'editorhidebuttons' => '', + 'filterall' => false, 'filteruploadedfiles' => true, 'forcelogin' => false, 'forceloginforprofiles' => false, @@ -80,7 +81,7 @@ 'textfilters' => 'mod/glossary/dynalink.php', 'themelist' => '', 'timezone' => 99, - 'theme' => 'standard', + 'theme' => 'standardwhite', 'unzip' => '', 'zip' => '' );
Default theme is standardwhite, and added filterall
moodle_moodle
train
php
9466ccb2a80ebd56051364c45f9ba3e52cb9685c
diff --git a/source/application/models/oxmanufacturerlist.php b/source/application/models/oxmanufacturerlist.php index <HASH>..<HASH> 100644 --- a/source/application/models/oxmanufacturerlist.php +++ b/source/application/models/oxmanufacturerlist.php @@ -123,7 +123,7 @@ class oxManufacturerList extends oxList foreach ($this as $sVndId => $oManufacturer) { // storing active manufacturer object - if ($sVndId == $sActCat) { + if ($sVndId === $sActCat) { $this->setClickManufacturer($oManufacturer); }
<I> Compare vendor and category id's more strictly in manufacturer tree building Related with bug: <URL>
OXID-eSales_oxideshop_ce
train
php
38c9557db9c4cd8147a6d0eb86c93020a251fa9d
diff --git a/model/QtiItemCompiler.php b/model/QtiItemCompiler.php index <HASH>..<HASH> 100755 --- a/model/QtiItemCompiler.php +++ b/model/QtiItemCompiler.php @@ -205,7 +205,7 @@ class QtiItemCompiler extends taoItems_models_classes_ItemCompiler ); } catch (\tao_models_classes_FileNotFoundException $e) { return new common_report_Report( - common_report_Report::TYPE_ERROR, __('Unable to retrieve asset "%s"', $e->getFile()) + common_report_Report::TYPE_ERROR, __('Unable to retrieve asset "%s"', $e->getFilePath()) ); } }
display the correct path of the file not found
oat-sa_extension-tao-itemqti
train
php
80285bda96b667e6301e9905d74baa2257687394
diff --git a/src/Entities/Traits/AccessTokenTrait.php b/src/Entities/Traits/AccessTokenTrait.php index <HASH>..<HASH> 100644 --- a/src/Entities/Traits/AccessTokenTrait.php +++ b/src/Entities/Traits/AccessTokenTrait.php @@ -46,7 +46,7 @@ trait AccessTokenTrait $this->jwtConfiguration = Configuration::forAsymmetricSigner( new Sha256(), InMemory::plainText($this->privateKey->getKeyContents(), $this->privateKey->getPassPhrase() ?? ''), - InMemory::plainText('') + InMemory::plainText('empty', 'empty') ); }
Fix compatibility with lcobucci/jwt ^<I>
thephpleague_oauth2-server
train
php
ecc328acabd2ef32a62b25f459508f1092089f89
diff --git a/xbbg/__init__.py b/xbbg/__init__.py index <HASH>..<HASH> 100644 --- a/xbbg/__init__.py +++ b/xbbg/__init__.py @@ -1,3 +1,3 @@ """Bloomberg data toolkit for humans""" -__version__ = '0.1.24' +__version__ = '0.1.25'
version <I>: fixed overrides in cache files
alpha-xone_xbbg
train
py
f233e13d9d1fb6310fb78c317b74c117ad4d3266
diff --git a/provision/juju/elb_test.go b/provision/juju/elb_test.go index <HASH>..<HASH> 100644 --- a/provision/juju/elb_test.go +++ b/provision/juju/elb_test.go @@ -42,6 +42,7 @@ func (s *ELBSuite) SetUpSuite(c *C) { } func (s *ELBSuite) TearDownSuite(c *C) { + config.Unset("juju:use-elb") db.Session.Close() s.server.Quit() }
provision/juju: unset juju:use-elb on ELBSuite.TearDownSuite Cleaning some mess... Related to #<I>.
tsuru_tsuru
train
go
67cd3ed3b068d22d85ac181692fe2708771d1bcb
diff --git a/src/Response/Card.php b/src/Response/Card.php index <HASH>..<HASH> 100644 --- a/src/Response/Card.php +++ b/src/Response/Card.php @@ -7,11 +7,11 @@ use Illuminate\Contracts\Support\Arrayable; class Card implements Arrayable { const DEFAULT_CARD_TYPE = 'Simple'; + const LINK_ACCOUNT_CARD_TYPE = 'LinkAccount'; - private $validCardTypes = ['Simple']; + private $validCardTypes = ['Simple','LinkAccount']; //The type of card - //todo: as of now only Simple is valid but this is likely to change //@see https://developer.amazon.com/public/solutions/devices/echo/alexa-app-kit/docs/alexa-appkit-app-interface-reference private $type = 'Simple';
Add new LinkAccount card type as option The link card type is used for letting Amazon know to display the authentication url in a card
develpr_alexa-app
train
php
6b6b6edc66b64ea3557e4af1076b6330b116201f
diff --git a/great_expectations/dataset/pandas_dataset.py b/great_expectations/dataset/pandas_dataset.py index <HASH>..<HASH> 100644 --- a/great_expectations/dataset/pandas_dataset.py +++ b/great_expectations/dataset/pandas_dataset.py @@ -789,6 +789,8 @@ class PandasDataSet(MetaPandasDataSet, pd.DataFrame): @MetaPandasDataSet.column_map_expectation def expect_column_values_to_match_strftime_format(self, series, strftime_format): + raise NotImplementedError + #def matches_format(val): # return None
statement and block errors. It runs now.
great-expectations_great_expectations
train
py
55c5d1cab725ea7d0d2b9f35e4c7c92738bd147d
diff --git a/dev/SapphireTest.php b/dev/SapphireTest.php index <HASH>..<HASH> 100755 --- a/dev/SapphireTest.php +++ b/dev/SapphireTest.php @@ -615,7 +615,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase { // Some DataObjectsDecorators keep a static cache of information that needs to // be reset whenever the database is cleaned out - foreach(ClassInfo::subclassesFor('DataObjectDecorator') as $class) { + foreach(array_merge(ClassInfo::subclassesFor('DataObjectDecorator'), ClassInfo::subclassesFor('DataObject')) as $class) { $toCall = array($class, 'on_db_reset'); if(is_callable($toCall)) call_user_func($toCall); }
API CHANGE: Allow on_db_reset() methods on DataObjects as well as DataObjectDecortators (from r<I>) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@<I> <I>b<I>ca-7a2a-<I>-9d3b-<I>d<I>a<I>a9
silverstripe_silverstripe-framework
train
php
45c333e14c79fca0c27fcad75abfe73e550d3e26
diff --git a/src/Plugin.php b/src/Plugin.php index <HASH>..<HASH> 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -94,6 +94,16 @@ class Plugin implements PluginInterface, EventSubscriberInterface $this->output = $io; } + public function deactivate(Composer $composer, IOInterface $io) + { + /* noop */ + } + + public function uninstall(Composer $composer, IOInterface $io) + { + /* noop */ + } + /** * Provide composer event listeners. *
feat: Implement new Plugin method deactivate and uninstall Currently, these methods do not do anything though.
yawik_composer-plugin
train
php
d9bb450325eb8d7765e95b36afb5a2cf7f2727fb
diff --git a/client/client.go b/client/client.go index <HASH>..<HASH> 100644 --- a/client/client.go +++ b/client/client.go @@ -2153,9 +2153,19 @@ DISCOLOOP: // emitStats collects host resource usage stats periodically func (c *Client) emitStats() { + // Determining NodeClass to be emitted + var emittedNodeClass string + if emittedNodeClass = c.Node().NodeClass; emittedNodeClass == "" { + emittedNodeClass = "none" + } + // Assign labels directly before emitting stats so the information expected // is ready - c.baseLabels = []metrics.Label{{Name: "node_id", Value: c.NodeID()}, {Name: "datacenter", Value: c.Datacenter()}} + c.baseLabels = []metrics.Label{ + {Name: "node_id", Value: c.NodeID()}, + {Name: "datacenter", Value: c.Datacenter()}, + {Name: "node_class", Value: emittedNodeClass}, + } // Start collecting host stats right away and then keep collecting every // collection interval
Added node class to tagged metrics
hashicorp_nomad
train
go
7905964d38811ba485f05f09827c0cd657442b74
diff --git a/src/Extension/AuthorizationExtension.php b/src/Extension/AuthorizationExtension.php index <HASH>..<HASH> 100644 --- a/src/Extension/AuthorizationExtension.php +++ b/src/Extension/AuthorizationExtension.php @@ -9,7 +9,7 @@ declare(strict_types = 1); namespace Dot\Twig\Extension; -use Mezzio\Authorization\AuthorizationInterface; +use Dot\Authorization\AuthorizationInterface; use Psr\Http\Message\ServerRequestInterface; use Twig\Extension\AbstractExtension; use Twig\TwigFunction;
Update AuthorizationExtension.php Remove Mezzio AuthorizationInterface and changed it with Dot AuthorizationInterface
dotkernel_dot-twigrenderer
train
php
0cc94d26e8f3929c04ef8f1241a6e474e19b1a20
diff --git a/Model/GoogleAddress.php b/Model/GoogleAddress.php index <HASH>..<HASH> 100644 --- a/Model/GoogleAddress.php +++ b/Model/GoogleAddress.php @@ -44,7 +44,7 @@ final class GoogleAddress extends Address * * @return GoogleAddress */ - public function withLocationType($locationType) + public function withLocationType(string $locationType = null) { $new = clone $this; $new->locationType = $locationType; @@ -63,7 +63,7 @@ final class GoogleAddress extends Address /** * @return array */ - public function getResultType() + public function getResultType(): array { return $this->resultType; } @@ -92,7 +92,7 @@ final class GoogleAddress extends Address /** * @param null|string $formattedAddress */ - public function withFormattedAddress($formattedAddress) + public function withFormattedAddress(string $formattedAddress = null) { $new = clone $this; $new->formattedAddress = $formattedAddress; @@ -111,7 +111,7 @@ final class GoogleAddress extends Address /** * @param null|string $subpremise */ - public function withSubpremise($subpremise) + public function withSubpremise(string $subpremise = null) { $new = clone $this; $new->subpremise = $subpremise;
Added type hints (#<I>)
geocoder-php_google-maps-provider
train
php
c092236a1668a937fbecc42fd9028190b117a817
diff --git a/mozilla/util/connect/connector.js b/mozilla/util/connect/connector.js index <HASH>..<HASH> 100644 --- a/mozilla/util/connect/connector.js +++ b/mozilla/util/connect/connector.js @@ -24,21 +24,19 @@ define(function(require, exports, module) { */ exports.connect = function(prefix, host, port) { var builtinCommands = Components.utils.import('resource:///modules/devtools/BuiltinCommands.jsm', {}); - - if (exports.defaultPort != builtinCommands.DEFAULT_DEBUG_PORT) { - console.error('Warning contradictory default debug ports'); - } - - var connection = new builtinCommands.Connection(prefix, host, port); - return connection.connect().then(function() { - return connection; - }); + return builtinCommands.connect(prefix, host, port); }; /** * What port should we use by default? */ -exports.defaultPort = 4242; +Object.defineProperty(exports, 'defaultPort', { + get: function() { + var Services = Components.utils.import("resource://gre/modules/Services.jsm", {}); + return Services.prefs.getIntPref("devtools.debugger.chrome-debugging-port"); + }, + enumerable: true +}); });
remotegcli-<I>: Connect to BuiltinCommands.jsm better * Read defaultPort from preferences properly * Move connect function into BuiltinCommands.jsm
joewalker_gcli
train
js
af45884a005e9a791814148eae81c10375884803
diff --git a/copycat-core/src/main/java/net/kuujo/copycat/log/impl/MemoryLog.java b/copycat-core/src/main/java/net/kuujo/copycat/log/impl/MemoryLog.java index <HASH>..<HASH> 100644 --- a/copycat-core/src/main/java/net/kuujo/copycat/log/impl/MemoryLog.java +++ b/copycat-core/src/main/java/net/kuujo/copycat/log/impl/MemoryLog.java @@ -141,7 +141,10 @@ public class MemoryLog extends AbstractLog implements Compactable { public <T extends Entry> List<T> getEntries(long from, long to) { List<T> entries = new ArrayList<>(); for (long i = from; i <= to; i++) { - entries.add(getEntry(i)); + T entry = getEntry(i); + if (entry != null) { + entries.add(entry); + } } return entries; }
Ignore empty indices when reading multiple entries from the memory log.
atomix_atomix
train
java
1953037595f0d1154deae9df62b7cc29b99af18d
diff --git a/core/Piwik.php b/core/Piwik.php index <HASH>..<HASH> 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -2483,7 +2483,7 @@ class Piwik . $period->getId() . '/' . $period->getDateStart()->toString('Y-m-d') . ',' . $period->getDateEnd()->toString('Y-m-d'); - return $lockName .'/'. md5($lockName . $config->superuser['salt']); + return $lockName .'/'. md5($lockName . Piwik_Common::getSalt()); } /**
fixes #<I> - salt was added in <I>; Zend_Config masked its absence git-svn-id: <URL>
matomo-org_matomo
train
php
cfc02935252362f211a9b1dc8fe4ebb8c50fe1eb
diff --git a/modules/orionode/lib/xfer.js b/modules/orionode/lib/xfer.js index <HASH>..<HASH> 100644 --- a/modules/orionode/lib/xfer.js +++ b/modules/orionode/lib/xfer.js @@ -58,8 +58,12 @@ module.exports.router = function(options) { module.exports.getXferFrom = getXferFrom; module.exports.postImportXferTo = postImportXferTo; -function getOptions(req) { - return req.get("X-Xfer-Options").split(","); +function getOptions(req, res) { + var opts = req.get("X-Xfer-Options"); + if(typeof opts !== 'string') { + return writeError(500, res, "Transfer options have not been set in the original request"); + } + return opts.split(","); } function reportTransferFailure(res, err) { @@ -83,7 +87,7 @@ function postImportXfer(req, res) { } function postImportXferTo(req, res, file) { - var xferOptions = getOptions(req); + var xferOptions = getOptions(req, res); if (xferOptions.indexOf("sftp") !== -1) { return writeError(500, res, "Not implemented yet."); }
Bug <I> - Omitting X-Xfer-Options should not throw exception (#<I>)
eclipse_orion.client
train
js
418d40731f97754c31622d7d0c3167139373e055
diff --git a/includes/class-freemius.php b/includes/class-freemius.php index <HASH>..<HASH> 100755 --- a/includes/class-freemius.php +++ b/includes/class-freemius.php @@ -713,16 +713,19 @@ return; } + $has_unset_marketing_optin = false; + foreach ( $user_plugins as $key => $user_plugin ) { - if ( - true == $user_plugin->is_marketing_allowed || - ( $was_notice_shown_before && ! is_null( $user_plugin->is_marketing_allowed ) ) - ) { + if ( true == $user_plugin->is_marketing_allowed ) { unset( $plugin_ids_map[ $user_plugin->plugin_id ] ); } + + if ( ! $has_unset_marketing_optin && is_null( $user_plugin->is_marketing_allowed ) ) { + $has_unset_marketing_optin = true; + } } - if ( empty( $plugin_ids_map ) ) { + if ( empty( $plugin_ids_map ) || ( $was_notice_shown_before && ! $has_unset_marketing_optin ) ) { return; }
[eu] [gdpr] [opt-in] [admin-notice] If the notice was already shown before, show it again only if there's at least one `is_marketing_allowed` value that is still `null`.
Freemius_wordpress-sdk
train
php
b2abde5aa81d29f137f442e2c59d649a5a7fe22a
diff --git a/src/InfoViz/Native/ParallelCoordinates/index.js b/src/InfoViz/Native/ParallelCoordinates/index.js index <HASH>..<HASH> 100644 --- a/src/InfoViz/Native/ParallelCoordinates/index.js +++ b/src/InfoViz/Native/ParallelCoordinates/index.js @@ -436,8 +436,8 @@ function parallelCoordinate(publicAPI, model) { let yRightMax = 0; // Ensure proper range for X - const deltaOne = (axisOne.range[1] - axisOne.range[0]) / histogram.numberOfBins; - const deltaTwo = (axisTwo.range[1] - axisTwo.range[0]) / histogram.numberOfBins; + const deltaOne = (axisOne.range[1] - axisOne.range[0]) / (histogram.numberOfBins || model.numberOfBins); + const deltaTwo = (axisTwo.range[1] - axisTwo.range[0]) / (histogram.numberOfBins || model.numberOfBins); for (let i = 0; i < histogram.bins.length; ++i) { bin = histogram.bins[i];
fix(ParallelCoordinates): Try to guard against using undefined value when computing deltas
Kitware_paraviewweb
train
js
0674eb4f4c146150b450d9077a6681c01d4a1a6b
diff --git a/lib/ronin/network/http.rb b/lib/ronin/network/http.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/network/http.rb +++ b/lib/ronin/network/http.rb @@ -94,7 +94,12 @@ module Ronin new_options[:user] = url.user if url.user new_options[:password] = url.password if url.password - new_options[:path] = url.path + unless url.path.empty? + new_options[:path] = url.path + else + new_options[:path] = '/' + end + new_options[:path] << "?#{url.query}" if url.query else new_options[:port] ||= ::Net::HTTP.default_port
Make sure to default the :path option to '/', even when using URLs.
ronin-ruby_ronin
train
rb
2171def67278f82d019f52cc1797f5e621a605be
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ classifiers = [ setup( name = "PyProxyFS", - version = "0.2", + version = "0.5", description = "Simple filesystem abstraction", long_description = """A proxy filesystem interface with a native filesystem implementation and a very simple test in-memory filesystem.""", diff --git a/src/pyproxyfs/__init__.py b/src/pyproxyfs/__init__.py index <HASH>..<HASH> 100644 --- a/src/pyproxyfs/__init__.py +++ b/src/pyproxyfs/__init__.py @@ -99,6 +99,17 @@ class TestFS(Filesystem): pass def read(self): return obj + def readline(self, size=-1): + if not getattr(self, "lineno", False): + setattr(self, "lineno", 0) + lines = obj.split("\n") + if self.lineno == len(lines): + return "\n" + if self.lineno > len(lines): + raise IOError() + line = lines[self.lineno] + self.lineno = self.lineno + 1 + return "%s\n" % line return grd() def rename(self, old, new):
support readline for the test fs "file" object
nicferrier_pyproxyfs
train
py,py
af03f3ff2b35854f9ff7c593a99eb1995c89e91b
diff --git a/programs/di_vgp.py b/programs/di_vgp.py index <HASH>..<HASH> 100755 --- a/programs/di_vgp.py +++ b/programs/di_vgp.py @@ -84,7 +84,7 @@ def main(): else: # single line of data if len(data)==4: data=[data[0],data[1],0,data[2],data[3]] - output = pmag.dia_vgp(data) + output = pmag.dia_vgp(*data) if out=='': # spit to standard output print('%7.1f %7.1f'%(output[0],output[1])) else: # write to file
for di_vgp, pass in arguments to pmag.dia_vgp as single values if only one line in data file, #<I>
PmagPy_PmagPy
train
py
13ac554c315eb0e87f18951713c5134547669b16
diff --git a/lifx.js b/lifx.js index <HASH>..<HASH> 100644 --- a/lifx.js +++ b/lifx.js @@ -98,10 +98,10 @@ Lifx.prototype._setupPacketListener = function() { // Got a notification of a light's status. Check if it's a new light, and handle it accordingly. var bulb = self.bulbs[pkt.preamble.bulbAddress.toString('hex')]; if (bulb) { - bulb.status = pkt.payload; + bulb.state = pkt.payload; } else { - bulb = {addr:pkt.preamble.bulbAddress, name:pkt.payload.bulbLabel, status: pkt.payload}; + bulb = {addr:pkt.preamble.bulbAddress, name:pkt.payload.bulbLabel, state: pkt.payload}; self.bulbs[bulb.addr.toString('hex')] = bulb; self.emit('bulb', bulb); }
changed bulb "status" to "state"
magicmonkey_lifxjs
train
js
570c7b2242bbf8243dc17062bf0f1678b53f9ae4
diff --git a/models/Client.js b/models/Client.js index <HASH>..<HASH> 100644 --- a/models/Client.js +++ b/models/Client.js @@ -742,7 +742,11 @@ var Client = Modinha.define('clients', { /** * scopes - * List of scopes required to access this client + * List of user-authorized scopes required to display this client at the + * applications endpoint. + * + * In the future, this value may be used to restrict users from signing into + * clients they have no permissions for. */ scopes: {
docs(Client): clarify purpose of client `scopes` property
anvilresearch_connect
train
js
1f74280518fe463d7dc6faff63a119d8694cc4c2
diff --git a/topydo/ui/TodoListWidget.py b/topydo/ui/TodoListWidget.py index <HASH>..<HASH> 100644 --- a/topydo/ui/TodoListWidget.py +++ b/topydo/ui/TodoListWidget.py @@ -122,6 +122,8 @@ class TodoListWidget(urwid.LineBox): self._complete_selected_item() elif p_key == 'p': self.keystate = 'p' + elif p_key == 'd': + self._remove_selected_item() elif p_key == 'j': self.listbox.keypress(p_size, 'down') elif p_key == 'k': @@ -168,3 +170,17 @@ class TodoListWidget(urwid.LineBox): except AttributeError: # No todo item selected pass + + def _remove_selected_item(self): + """ + Removes the highlighted todo item. + """ + try: + todo = self.listbox.focus.todo + self.view.todolist.number(todo) + + urwid.emit_signal(self, 'execute_command', "del {}".format( + str(self.view.todolist.number(todo)))) + except AttributeError: + # No todo item selected + pass
Remove the highlighted todo by pressing 'd'
bram85_topydo
train
py
3000f12453548fd4bb6093a638380273c3ef503e
diff --git a/sirmordred/task_collection.py b/sirmordred/task_collection.py index <HASH>..<HASH> 100644 --- a/sirmordred/task_collection.py +++ b/sirmordred/task_collection.py @@ -230,6 +230,8 @@ class TaskRawDataArthurCollection(Task): # The same repo could appear in git and github data sources # Two tasks in arthur can not have the same tag tag = repo + "_" + self.backend_section + if self.backend_section in ["mediawiki"]: + tag = repo.split()[0] return tag
[collection] Add support for mediawiki tag Mediawiki supports two params now within the repo string, this change add support to extract the right one as tag.
chaoss_grimoirelab-sirmordred
train
py
fafec2d0ca9fcb04d54d1d5529656d8ce9011c98
diff --git a/closure/goog/net/browserchannel.js b/closure/goog/net/browserchannel.js index <HASH>..<HASH> 100644 --- a/closure/goog/net/browserchannel.js +++ b/closure/goog/net/browserchannel.js @@ -868,8 +868,9 @@ goog.net.BrowserChannel.prototype.disconnect = function() { this, this.channelDebug_, this.sid_, rid, undefined /* opt_retryId */, this.onlineHandler_); request.sendUsingImgTag(uri); - this.onClose_(); } + + this.onClose_(); };
Recover the browser channel If it's stuck on connecting state. And make this behavior behind the BROWSER_CHANNEL_STUCK_RECOVERY experiment. R=mpd,dobrev,rrhett DELTA=<I> (<I> added, 0 deleted, 2 changed) Revision created by MOE tool push_codebase. MOE_MIGRATION=<I> git-svn-id: <URL>
google_closure-library
train
js
1bc1fe75793fb8193721c48fe66d606129de7bc5
diff --git a/src/Model/Variable.php b/src/Model/Variable.php index <HASH>..<HASH> 100644 --- a/src/Model/Variable.php +++ b/src/Model/Variable.php @@ -8,6 +8,7 @@ namespace Platformsh\Client\Model; * @property-read string $id * @property-read string $environment * @property-read string $name + * @property-read bool $is_enabled * @property-read bool $is_json * @property-read string $created_at * @property-read string $updated_at
Variables have is_enabled property This is not deployed just yet
platformsh_platformsh-client-php
train
php
507245cd5a1f4eaa647c8b7dba5cec4d3e596b08
diff --git a/Kwf/ComposerExtraAssets/Plugin.php b/Kwf/ComposerExtraAssets/Plugin.php index <HASH>..<HASH> 100644 --- a/Kwf/ComposerExtraAssets/Plugin.php +++ b/Kwf/ComposerExtraAssets/Plugin.php @@ -124,13 +124,13 @@ class Plugin implements PluginInterface, EventSubscriberInterface $cmd = "$bowerBin --allow-root install"; passthru($cmd, $retVar); if ($retVar) { - $this->io->write("<error>bower install failed</error>"); + throw new \RuntimeException('bower install failed'); } $cmd = "$bowerBin --allow-root prune"; passthru($cmd, $retVar); if ($retVar) { - $this->io->write("<error>bower prune failed</error>"); + throw new \RuntimeException('bower prune failed'); } } } @@ -179,13 +179,13 @@ class Plugin implements PluginInterface, EventSubscriberInterface $cmd = "npm install"; passthru($cmd, $retVar); if ($retVar) { - $this->io->write("<error>npm install failed</error>"); + throw new \RuntimeException('npm install failed'); } $cmd = "npm prune"; passthru($cmd, $retVar); if ($retVar) { - $this->io->write("<error>npm prune failed</error>"); + throw new \RuntimeException('npm prune failed'); } unlink('package.json');
When bower/npm fails throw exception Don't silently ignore errors so composer update/install can report the correct error code and no half-installed situations can happen
koala-framework_composer-extra-assets
train
php
769b395173c574b55d8f48cc232ac40a6a6ebf28
diff --git a/azure-mgmt-batchai/azure/mgmt/batchai/version.py b/azure-mgmt-batchai/azure/mgmt/batchai/version.py index <HASH>..<HASH> 100644 --- a/azure-mgmt-batchai/azure/mgmt/batchai/version.py +++ b/azure-mgmt-batchai/azure/mgmt/batchai/version.py @@ -5,5 +5,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.2.0" +VERSION = "0.1.0"
BatchAI. Restoring the version number
Azure_azure-sdk-for-python
train
py
c74ae107f1ee0688150b5f2dd4a348ea52c67d6b
diff --git a/lib/browser/chrome-extension.js b/lib/browser/chrome-extension.js index <HASH>..<HASH> 100644 --- a/lib/browser/chrome-extension.js +++ b/lib/browser/chrome-extension.js @@ -427,7 +427,7 @@ app.once('ready', function () { } } } catch (error) { - if (process.env.ELECTRON_ENABLE_LOGGING) { + if (process.env.ELECTRON_ENABLE_LOGGING && error.code !== 'ENOENT') { console.error('Failed to load browser extensions from directory:', loadedDevToolsExtensionsPath) console.error(error) }
fix: do not print an error for an expected condition (#<I>) (#<I>)
electron_electron
train
js
42579aeeb82d1944f2c917c96aa2bfcf621a224e
diff --git a/mod/forum/lib.php b/mod/forum/lib.php index <HASH>..<HASH> 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -7404,7 +7404,7 @@ class forum_portfolio_caller extends portfolio_module_caller_base { $output .= $formattedtext; - if (array_key_exists($post->id, $this->keyedfiles) && is_array($this->keyedfiles[$post->id])) { + if (is_array($this->keyedfiles) && array_key_exists($post->id, $this->keyedfiles) && is_array($this->keyedfiles[$post->id])) { $output .= '<div class="attachments">'; $output .= '<br /><b>' . get_string('attachments', 'forum') . '</b>:<br /><br />'; $format = $this->get('exporter')->get('format');
MDL-<I>: mod/forum portfolio implementation: fixed warning.
moodle_moodle
train
php
5d0e83c5b344376fe2f2155213302523cf03e0fd
diff --git a/src/main/java/com/apruve/PaymentRequest.java b/src/main/java/com/apruve/PaymentRequest.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/apruve/PaymentRequest.java +++ b/src/main/java/com/apruve/PaymentRequest.java @@ -251,7 +251,7 @@ public class PaymentRequest implements Serializable { JSONObject json = JSONObject.fromObject(line); PaymentRequest paymentRequest = new PaymentRequest(); paymentRequest.setAmountCents(json.get("amount_cents") != null ? new Integer(json.getString("amount_cents")) : null); - paymentRequest.setCurrency(json.getString("currency")); + paymentRequest.setCurrency(json.get("currency") != null ? json.getString("currency") : null); paymentRequest.setId(json.getString("id")); paymentRequest.setRecurring(json.get("recurring") != null ? new Boolean(json.getString("recurring")) : null); paymentRequest.setShippingCents(json.get("shipping_cents") != null ? new Integer(json.getString("shipping_cents")) : null);
Fixed json stack on missing currency.
apruve_apruve-java
train
java
786d886efeeb39804ee459d53765ff099d172ea8
diff --git a/mod/glossary/view.php b/mod/glossary/view.php index <HASH>..<HASH> 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -3,6 +3,7 @@ /// This page prints a particular instance of glossary require_once("../../config.php"); require_once("lib.php"); +require_once($CFG->libdir . '/completionlib.php'); require_once("$CFG->libdir/rsslib.php"); $id = optional_param('id', 0, PARAM_INT); // Course Module ID
"NOBUG, added lib/completionlib.php"
moodle_moodle
train
php
0461efb95a3d59bb0ebefef4fcf1be282dbd0068
diff --git a/tests/test_config.py b/tests/test_config.py index <HASH>..<HASH> 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -266,7 +266,7 @@ class TestConfig(TmpDirTestCase): f.write(' - !!python/object/apply:sys.exit [66]\n') pat = "could not determine a constructor for the tag.*python/object/apply" - with self.assertRaisesRegexp(scuba.config.ConfigError, pat) as ctx: + with self.assertRaisesRegex(scuba.config.ConfigError, pat) as ctx: scuba.config.load_config('.scuba.yml') def test_load_config_safe(self):
Replace assertRaisesRegexp with assertRaisesRegex The former is a deprecated alias.
JonathonReinhart_scuba
train
py
f413cea2cb178bb37d0975049ea7dddf63e0d2e6
diff --git a/lib/Less/Environment.php b/lib/Less/Environment.php index <HASH>..<HASH> 100755 --- a/lib/Less/Environment.php +++ b/lib/Less/Environment.php @@ -431,7 +431,10 @@ class Less_Environment{ } public static function escape ($str){ - return new Less_Tree_Anonymous(urlencode($str->value)); + + $revert = array('%21'=>'!', '%2A'=>'*', '%27'=>"'",'%3F'=>'?','%26'=>'&','%2C'=>',','%2F'=>'/','%40'=>'@','%2B'=>'+','%24'=>'$'); + + return new Less_Tree_Anonymous(strtr(rawurlencode($str->value), $revert)); }
escape() to match less.js
oyejorge_less.php
train
php
4e9db59b9b7544e2215a70f3cb7344722838cd96
diff --git a/tests/framework/base/ActionFilterTest.php b/tests/framework/base/ActionFilterTest.php index <HASH>..<HASH> 100644 --- a/tests/framework/base/ActionFilterTest.php +++ b/tests/framework/base/ActionFilterTest.php @@ -238,7 +238,7 @@ class Filter3 extends ActionFilter class MockUser extends User { - public function init() + public function init(): void { // do not call parent to avoid the need to mock configuration } diff --git a/tests/framework/helpers/JsonTest.php b/tests/framework/helpers/JsonTest.php index <HASH>..<HASH> 100644 --- a/tests/framework/helpers/JsonTest.php +++ b/tests/framework/helpers/JsonTest.php @@ -11,7 +11,7 @@ use yii\base\DynamicModel; use yii\helpers\BaseJson; use yii\helpers\Json; use yii\web\JsExpression; -use yii\web\tests\Post; +use yii\web\tests\stubs\Post; use yii\tests\TestCase; /**
Fixing tests after changes in `yii-web` package
yiisoft_yii-core
train
php,php
de8a70bee776290e26b54e5f278e1d2c32256f72
diff --git a/pvl/_collections.py b/pvl/_collections.py index <HASH>..<HASH> 100644 --- a/pvl/_collections.py +++ b/pvl/_collections.py @@ -97,6 +97,9 @@ class OrderedMultiDict(dict, MutableMapping): def __iter__(self): return iter(self.__items) + def __len__(self): + return len(self.__items) + get = MutableMapping.get update = MutableMapping.update pop = MutableMapping.pop
Return length of items instead of unique keys.
planetarypy_pvl
train
py
1a1f5835606f62b759454d04a5038ddf4e5e3b2a
diff --git a/openxc/tools/control.py b/openxc/tools/control.py index <HASH>..<HASH> 100644 --- a/openxc/tools/control.py +++ b/openxc/tools/control.py @@ -96,6 +96,7 @@ def main(): controller_class, controller_kwargs = select_device(arguments) controller = controller_class(**controller_kwargs) + controller.start() if arguments.command == "version": version(controller) @@ -121,3 +122,7 @@ def main(): sys.exit("%s requires a signal name, message ID or filename" % arguments.command) else: print("Unrecognized command \"%s\"" % arguments.command) + + # TODO need a better way to wait for log messages after writing + import time + time.sleep(1)
Wait after sending control commands for log messages.
openxc_openxc-python
train
py
dd56fa190695a969673f6f663cd5fe78b7c22787
diff --git a/daemon/graphdriver/driver.go b/daemon/graphdriver/driver.go index <HASH>..<HASH> 100644 --- a/daemon/graphdriver/driver.go +++ b/daemon/graphdriver/driver.go @@ -26,6 +26,7 @@ const ( FsMagicSmbFs = FsMagic(0x0000517B) FsMagicJffs2Fs = FsMagic(0x000072b6) FsMagicZfs = FsMagic(0x2fc12fc1) + FsMagicXfs = FsMagic(0x58465342) FsMagicUnsupported = FsMagic(0x00000000) ) @@ -60,6 +61,7 @@ var ( FsMagicSmbFs: "smb", FsMagicJffs2Fs: "jffs2", FsMagicZfs: "zfs", + FsMagicXfs: "xfs", FsMagicUnsupported: "unsupported", } )
Add xfs fs magic to graphdriver/driver.go
moby_moby
train
go
eeed8b07b0ba87e7bf098fd7d7095eb3f76cf4c9
diff --git a/lib/superstore-sync.js b/lib/superstore-sync.js index <HASH>..<HASH> 100644 --- a/lib/superstore-sync.js +++ b/lib/superstore-sync.js @@ -31,17 +31,20 @@ exports.get = function(key) { }; exports.set = function(key, value) { - try { - localStorage[key] = JSON.stringify(value); - } catch(err) { + if (persist) { + try { + localStorage[key] = JSON.stringify(value); + } catch(err) { - // Known iOS Private Browsing Bug - fall back to non-persistent storage - if (err.code === 22) { - persist = false; - } else { - throw err; + // Known iOS Private Browsing Bug - fall back to non-persistent storage + if (err.code === 22) { + persist = false; + } else { + throw err; + } } } + store[key] = value; keys[key] = true; };
Only use localStorage if `persist` is truthy Aids debugging when in iOS private browsing mode and catching exceptions, and fasterer.
matthew-andrews_superstore
train
js
02c9fc68846e91e0071e8a4cadf9b549e7219bda
diff --git a/flask_jwt_extended/__init__.py b/flask_jwt_extended/__init__.py index <HASH>..<HASH> 100644 --- a/flask_jwt_extended/__init__.py +++ b/flask_jwt_extended/__init__.py @@ -11,4 +11,4 @@ from .utils import ( unset_jwt_cookies, unset_refresh_cookies ) -__version__ = '3.8.2' +__version__ = '3.9.1'
Bump to <I>. Skips <I>, as I already git tagged it, but forgot to actually bump the version number. Whoops.
vimalloc_flask-jwt-extended
train
py
6dad15d3a666c1719b7963ce979cb3911915bb8a
diff --git a/components/ProcessControlTrait.php b/components/ProcessControlTrait.php index <HASH>..<HASH> 100644 --- a/components/ProcessControlTrait.php +++ b/components/ProcessControlTrait.php @@ -48,6 +48,6 @@ trait ProcessControlTrait if(!$this->control){ $this->createControl(); } - return new Pidfile($this->control, $appName, $path); + return new Pidfile($this->control, strtolower($appName), $path); } } \ No newline at end of file
fix Pid file name to lowercase
mithun12000_yii2-process
train
php
195cdd523effd590b2b15b3ad4f7a193ff23426d
diff --git a/src/Entity/User.php b/src/Entity/User.php index <HASH>..<HASH> 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -34,7 +34,7 @@ class User throw new \OutOfRangeException(sprintf( '%s does not contain a property by the name of "%s"', __CLASS__, - $name + $property )); } diff --git a/test/src/Entity/UserTest.php b/test/src/Entity/UserTest.php index <HASH>..<HASH> 100644 --- a/test/src/Entity/UserTest.php +++ b/test/src/Entity/UserTest.php @@ -45,8 +45,6 @@ class UserTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException PHPUnit_Framework_Error_Notice - * Acutal exception expected below but magic testing on phpunit give above * @expectedException \OutOfRangeException */ public function testInvalidMagicSet()
User: use `$property` variable instead of (undefined) `$name`, fixes possible notice
thephpleague_oauth2-client
train
php,php
31f859e909fa00177b517817f5aceaba11fe9059
diff --git a/lib/model/folder_sendrecv.go b/lib/model/folder_sendrecv.go index <HASH>..<HASH> 100644 --- a/lib/model/folder_sendrecv.go +++ b/lib/model/folder_sendrecv.go @@ -307,7 +307,7 @@ func (f *sendReceiveFolder) pullerIteration(scanChan chan<- string) (int, error) f.queue.Reset() - return changed, nil + return changed, err } func (f *sendReceiveFolder) processNeeded(snap *db.Snapshot, dbUpdateChan chan<- dbUpdateJob, copyChan chan<- copyBlocksState, scanChan chan<- string) (int, map[string]protocol.FileInfo, []protocol.FileInfo, error) {
lib/model: Return correct error in puller-iteration (ref #<I>) (#<I>)
syncthing_syncthing
train
go
f4c336287cd0707455364f9868d826eab86144a0
diff --git a/packages/ember-testing/tests/acceptance_test.js b/packages/ember-testing/tests/acceptance_test.js index <HASH>..<HASH> 100644 --- a/packages/ember-testing/tests/acceptance_test.js +++ b/packages/ember-testing/tests/acceptance_test.js @@ -88,6 +88,7 @@ if (!jQueryDisabled) { } afterEach() { console.error = originalConsoleError;// eslint-disable-line no-console + super.afterEach(); } teardown() {
[CLEANUP beta] Fix tests by adding missing call to super.afterEach
emberjs_ember.js
train
js
8e7aadc5353b5631326890fd46712114a99ae259
diff --git a/src/DataSource/ArrayDataSource.php b/src/DataSource/ArrayDataSource.php index <HASH>..<HASH> 100644 --- a/src/DataSource/ArrayDataSource.php +++ b/src/DataSource/ArrayDataSource.php @@ -30,6 +30,11 @@ class ArrayDataSource implements IDataSource */ protected $data = []; + /** + * @var int + */ + protected $count = 0; + /** * @param array $data_source @@ -37,6 +42,7 @@ class ArrayDataSource implements IDataSource public function __construct(array $data_source) { $this->data = $data_source; + $this->count = sizeof($data_source); } @@ -51,7 +57,7 @@ class ArrayDataSource implements IDataSource */ public function getCount() { - return sizeof($this->data); + return $this->count; }
fixed array source (#<I>)
contributte_datagrid
train
php
804c1dd7fe3ff387b066c36eec81e0a885c946e9
diff --git a/src/GitHub_Updater/Settings.php b/src/GitHub_Updater/Settings.php index <HASH>..<HASH> 100644 --- a/src/GitHub_Updater/Settings.php +++ b/src/GitHub_Updater/Settings.php @@ -491,7 +491,7 @@ class Settings extends Base { public static function sanitize( $input ) { $new_input = array(); foreach ( (array) $input as $id => $value ) { - $new_input[ $id ] = sanitize_text_field( $input[ $id ] ); + $new_input[ sanitize_file_name( $id ) ] = sanitize_text_field( $input[ $id ] ); } return $new_input;
sanitize using `sanitize_file_name` to avoid strtolower in `sanitize_key`
afragen_github-updater
train
php
08836c5a8210aec9117fb0620197c87f958e6215
diff --git a/satsearch/scene.py b/satsearch/scene.py index <HASH>..<HASH> 100644 --- a/satsearch/scene.py +++ b/satsearch/scene.py @@ -70,7 +70,11 @@ class Scene(object): else: keys = [key] # loop through keys and get files - return {k: self.download_file(links[k], path=path, nosubdirs=nosubdirs) for k in keys} + filenames = {} + for k in keys: + if k in links: + filenames[k] = self.download_file(links[k], path=path, nosubdirs=nosubdirs) + return filenames def download_file(self, url, path=None, nosubdirs=None): """ Download a file """
do not throw error if key does not exist
sat-utils_sat-search
train
py
ddd381f96c1a53748a117bfb31f9a4f65ced12a9
diff --git a/src/parsita/parsers.py b/src/parsita/parsers.py index <HASH>..<HASH> 100644 --- a/src/parsita/parsers.py +++ b/src/parsita/parsers.py @@ -12,7 +12,7 @@ class Parser(Generic[Input, Output]): Inheritors of this class must: 1. Implement the ``consume`` method - 2. Implement the ``__str__`` method + 2. Implement the ``__repr__`` method 3. Call super().__init__() in their constructor to get the parse method from the context.
Update docs of Parser concerning __repr__ Fixes #<I>.
drhagen_parsita
train
py
82da46ed2208a29a75d804f8605acc3a76d998c3
diff --git a/pysatCDF/cdf.py b/pysatCDF/cdf.py index <HASH>..<HASH> 100644 --- a/pysatCDF/cdf.py +++ b/pysatCDF/cdf.py @@ -56,8 +56,9 @@ class CDF(object): # load all variable attribute data (zVariables) self._read_all_z_attribute_data() else: - raise ValueError('File does not exist') - + raise IOError(fortran_cdf.statushandler(status)) + #raise ValueError('File does not exist') + # def inquire(self): name = copy.deepcopy(self.fname) @@ -308,7 +309,7 @@ class CDF(object): var_attrs_info[name] = nug - self.gloabl_attrs_info = global_attrs_info + self.global_attrs_info = global_attrs_info self.var_attrs_info = var_attrs_info else: raise IOError(fortran_cdf.statushandler(status))
Fixed attribute typo; cleaned up error reporting in open
rstoneback_pysatCDF
train
py
078800eeadcab3fb7d24574be809f6e541b63319
diff --git a/templates/element/customThemeStyleSheet.php b/templates/element/customThemeStyleSheet.php index <HASH>..<HASH> 100644 --- a/templates/element/customThemeStyleSheet.php +++ b/templates/element/customThemeStyleSheet.php @@ -147,8 +147,8 @@ use Cake\Core\Configure; :not(.fa-plus-circle) { color: <?php echo Configure::read('app.customThemeMainColor'); ?> ! important; } - body.self_services #responsive-header a.btn, - body.self_services #responsive-header i.ok { + body.self_services #responsive-header a.btn:not(.btn-flash-message), + body.self_services #responsive-header a.btn:not(.btn-flash-message) i.ok { color: #fff ! important; } body:not(.admin) .sb-right h3 {
mobile readable button after self service order
foodcoopshop_foodcoopshop
train
php
1b37f02fc9069e92ce4e932ecf647642e819ce63
diff --git a/lib/devise_cas_authenticatable/routes.rb b/lib/devise_cas_authenticatable/routes.rb index <HASH>..<HASH> 100644 --- a/lib/devise_cas_authenticatable/routes.rb +++ b/lib/devise_cas_authenticatable/routes.rb @@ -13,7 +13,7 @@ if ActionController::Routing.name =~ /ActionDispatch/ get :new, :path => mapping.path_names[:sign_in], :as => "new" get :unregistered post :create, :path => mapping.path_names[:sign_in] - match :destroy, :path => mapping.path_names[:sign_out], :as => "destroy" + match :destroy, :path => mapping.path_names[:sign_out], :as => "destroy", :via => [:get, :post] end end end
match needs to have verbs for Rails <I>
nbudin_devise_cas_authenticatable
train
rb
5710928c07b0df0e3cfc262cd13d8b5b431ef9ae
diff --git a/datawrap/tableloader.py b/datawrap/tableloader.py index <HASH>..<HASH> 100644 --- a/datawrap/tableloader.py +++ b/datawrap/tableloader.py @@ -120,6 +120,12 @@ class SheetYielder(object): def _build_row(self, i): return self.row_builder(self.sheet, i) + def __str__(self): + return self.__repr__() + + def __repr__(self): + return "SheetYielder({})".format(list(self).__repr__()) + def get_data_xls(file_name, file_contents=None, on_demand=False): ''' Loads the old excel format files. New format files will automatically
Added sheet yielder str and repr for easier printing
OpenGov_python_data_wrap
train
py
0fad5119540404ffe11fb322f143b3f96e413c48
diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index <HASH>..<HASH> 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -480,7 +480,7 @@ class ModelsCommand extends Command 'morphedByMany' => '\Illuminate\Database\Eloquent\Relations\MorphToMany' ) as $relation => $impl) { $search = '$this->' . $relation . '('; - if (stripos($code, $search) || stripos($impl, $type) !== false) { + if (stripos($code, $search) || stripos($impl, (string)$type) !== false) { //Resolve the relation's model to a Relation object. $methodReflection = new \ReflectionMethod($model, $method); if ($methodReflection->getNumberOfParameters()) {
Fix Bug PHP <I> & L<I> (#<I>) add cast (string) to disable bug ($type can be null)
barryvdh_laravel-ide-helper
train
php
4a830d05b65e5479f0c525cc72c2c0999ea586e4
diff --git a/lib/function_inheritance.js b/lib/function_inheritance.js index <HASH>..<HASH> 100644 --- a/lib/function_inheritance.js +++ b/lib/function_inheritance.js @@ -419,7 +419,8 @@ module.exports = function BlastInheritance(Blast, Collection) { } else { config = { value: getter, - enumerable: enumerable + enumerable: enumerable, + writable: true }; }
fix: setProperty values are now writable Simple setProperty values (not getters) are now writable, and can be changed in an instance.
skerit_protoblast
train
js
585d831959bed9ba2a4f4e4395245acbbe58f60f
diff --git a/moar/thumbnailer.py b/moar/thumbnailer.py index <HASH>..<HASH> 100644 --- a/moar/thumbnailer.py +++ b/moar/thumbnailer.py @@ -140,7 +140,8 @@ class Thumbnailer(object): thumb._engine = self.engine return thumb - fullpath = pjoin(self.base_path, path) + fullpath = self.get_source_path(path) + im = self.engine.open_image(fullpath) if im is None: return Thumb('', None) @@ -224,6 +225,13 @@ class Thumbnailer(object): seed = ' '.join([str(path), str(geometry), str(filters), str(options)]) return sha1(seed).hexdigest() + def get_source_path(self, path): + """Returns the absolute path of the source image. + Overwrite this to load the image from a place that isn't the filesystem + into a temporal file. + """ + return pjoin(self.base_path, path) + def process_image(self, im, geometry, filters, options): eng = self.engine if options.get('orientation'):
Separate getting the source fullpath in a new method so it can be easily overwrited
jpscaletti_moar
train
py
510f99caca46e31e29b28579577abe0ab2b4bdda
diff --git a/tests/transaction_commands_test.py b/tests/transaction_commands_test.py index <HASH>..<HASH> 100644 --- a/tests/transaction_commands_test.py +++ b/tests/transaction_commands_test.py @@ -158,3 +158,17 @@ class TransactionCommandsTest(RedisTest): res = yield from self.redis.unwatch() self.assertTrue(res) + + @run_until_complete + def test_encoding(self): + res = yield from self.redis.set('key', 'value') + self.assertTrue(res) + + tr = self.redis.multi_exec() + fut1 = tr.get('key') + fut2 = tr.get('key', encoding='utf-8') + yield from tr.execute() + res = yield from fut1 + self.assertEqual(res, b'value') + res = yield from fut2 + self.assertEqual(res, 'value')
added failing multi/exec encoding test
aio-libs_aioredis
train
py
45940c28a7cfea294c66e4fefc9525ae65aa4d2a
diff --git a/lib/cucumber/formatter/duration_extractor.rb b/lib/cucumber/formatter/duration_extractor.rb index <HASH>..<HASH> 100644 --- a/lib/cucumber/formatter/duration_extractor.rb +++ b/lib/cucumber/formatter/duration_extractor.rb @@ -24,6 +24,8 @@ module Cucumber def duration(duration, *) duration.tap { |dur| @result_duration = dur.nanoseconds / 10**9.0 } end + + def embed(*) end end end end diff --git a/lib/cucumber/formatter/junit.rb b/lib/cucumber/formatter/junit.rb index <HASH>..<HASH> 100644 --- a/lib/cucumber/formatter/junit.rb +++ b/lib/cucumber/formatter/junit.rb @@ -238,6 +238,8 @@ module Cucumber def duration(duration, *) duration.tap { |dur| @test_case_duration = dur.nanoseconds / 10**9.0 } end + + def embed(*) end end end end
Add embed() function to Result visitors
cucumber_cucumber-ruby
train
rb,rb
5ff985d0b5cfbefe623ad6a95a3f7427f62ae4a6
diff --git a/lib/cliver/dependency.rb b/lib/cliver/dependency.rb index <HASH>..<HASH> 100644 --- a/lib/cliver/dependency.rb +++ b/lib/cliver/dependency.rb @@ -67,7 +67,7 @@ module Cliver # @raise [ArgumentError] if incompatibility found def check_compatibility! case - when @executables.any? {|exe| exe[?/] && !exe.start_with?(?/) } + when @executables.any? {|exe| exe[%r(\A[^/].*/)] } raise ArgumentError, "Relative-path executable requirements are not supported." end end
<I>.x compatibility
yaauie_cliver
train
rb
a009096bef42f596401817d41dca22c916a3a038
diff --git a/anndata/readwrite/read.py b/anndata/readwrite/read.py index <HASH>..<HASH> 100644 --- a/anndata/readwrite/read.py +++ b/anndata/readwrite/read.py @@ -144,7 +144,7 @@ def read_loom(filename: PathLike, sparse: bool = True, cleanup: bool = False, X_ cleanup Whether to collapse all obs/var fields that only store one unique value into `.uns['loom-cleanup']`. X_name - Loompy key where the data matrix is stored. + Loompy key with which the data matrix `.X` is initialized. obs_names Loompy key where the observation/cell names are stored. var_names
clarified read_loom docstring
theislab_anndata
train
py
9fad2a0d2867a470785834676af5d522a33f2de9
diff --git a/app/helpers/effective_bootstrap_helper.rb b/app/helpers/effective_bootstrap_helper.rb index <HASH>..<HASH> 100644 --- a/app/helpers/effective_bootstrap_helper.rb +++ b/app/helpers/effective_bootstrap_helper.rb @@ -218,7 +218,7 @@ module EffectiveBootstrapHelper end end.join.html_safe + content_tag(:li, class: ['page-item', ('disabled' if page >= last)].compact.join(' ')) do - link_to(url + params.merge('page' => page + 1).to_query, class: 'page-link', 'aria-label': 'Next', title: 'Next') do + link_to((page >= last ? '#' : url + params.merge('page' => page + 1).to_query), class: 'page-link', 'aria-label': 'Next', title: 'Next') do content_tag(:span, '&raquo;'.html_safe, 'aria-hidden': true) + content_tag(:span, 'Next', class: 'sr-only') end end
don't set a page url on the next button when on last page
code-and-effect_effective_bootstrap
train
rb
b6c219f9072b49397016837d4e36ee753c6323e6
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -35,10 +35,10 @@ test_requires = [ install_requires = [ - 'django>=1.5,<2.0', + 'django>=1.8,<2.0', 'babel>=1.3', - 'django-babel>=0.3.9', - 'markey>=0.8', + 'django-babel>=0.5.1', + 'markey>=0.8,<0.9', ]
Remove support for Django < <I>, upgrade to django-babel <I>.x and markey <I>
EnTeQuAk_django-babel-underscore
train
py
a6a9410f409a3fa3e1074e03d65c7b1c948767fe
diff --git a/msm/skill_entry.py b/msm/skill_entry.py index <HASH>..<HASH> 100644 --- a/msm/skill_entry.py +++ b/msm/skill_entry.py @@ -236,9 +236,10 @@ class SkillEntry(object): def _find_sha_branch(self): git = Git(self.path) - sha_branch = git.branch( + sha_branches = git.branch( contains=self.sha, all=True - ).split('\n')[0] + ).split('\n') + sha_branch = [b for b in sha_branches if ' -> ' not in b][0] sha_branch = sha_branch.strip('* \n').replace('remotes/', '') for remote in git.remote().split('\n'): sha_branch = sha_branch.replace(remote + '/', '')
Remove pointers for things like HEAD Updating to a reference on master would error out since the first branch found containing the SHA was 'HEAD -> master'
MycroftAI_mycroft-skills-manager
train
py
59849987abb0e80876f6d88ae7483a3a746871ee
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -131,10 +131,8 @@ var itemTasks = items.reduce((tasks, item) => { var jsTo = './build/dist/' + packageName.replace(/-/g, '.') + '.js'; var jsPackageTo = './build/npm/' + packageName + '/' + packageName.replace(/-/g, '.') + '.js'; item.name = upperName.replace(/-/g, ' '); - var makeRollupTask = (to, format) => rollupTask(name, tsFrom, to, item.globals || {}, format); - //gulp.task('Rollup' + name, () => makeRollupTask(jsTo, 'iife')); gulp.task('Build' + name, () => buildTask(name, tsFrom, jsTo, item.globals || {}, 'iife', item)); - gulp.task('Package' + name, () => makeRollupTask(jsPackageTo, 'cjs')); + gulp.task('Package' + name, () => rollupTask(name, tsFrom, jsPackageTo, item.globals || {}, 'cjs')); tasks.buildTasks.push('Build' + name); tasks.packageTasks.push('Package' + name); return tasks;
Called rollup directly from package task
grahammendick_navigation
train
js
39116c09169bcde50a9e4d62bf90c15e3df4dc02
diff --git a/core/src/main/java/org/testcontainers/images/builder/ImageFromDockerfile.java b/core/src/main/java/org/testcontainers/images/builder/ImageFromDockerfile.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/testcontainers/images/builder/ImageFromDockerfile.java +++ b/core/src/main/java/org/testcontainers/images/builder/ImageFromDockerfile.java @@ -54,7 +54,7 @@ public class ImageFromDockerfile extends LazyFuture<String> implements private Set<String> dependencyImageNames = Collections.emptySet(); public ImageFromDockerfile() { - this("testcontainers/" + Base58.randomString(16).toLowerCase()); + this("localhost/testcontainers/" + Base58.randomString(16).toLowerCase()); } public ImageFromDockerfile(String dockerImageName) {
Fix handling of locally built images when used with `hub.image.name.prefix` (#<I>)
testcontainers_testcontainers-java
train
java
73b24905e65c34304ec7c3158fcd789ea3bf51ea
diff --git a/.gitignore b/.gitignore index <HASH>..<HASH> 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ build /.pydevproject *.ipynb /*.html +tests/* +/testing.py +/.coverage \ No newline at end of file diff --git a/cdflib/cdfread.py b/cdflib/cdfread.py index <HASH>..<HASH> 100644 --- a/cdflib/cdfread.py +++ b/cdflib/cdfread.py @@ -618,7 +618,7 @@ class CDF(object): return vdr_info else: if (vdr_info['max_records'] < 0): - print('No data is written for this variable') + #print('No data is written for this variable') return None return self._read_vardata(vdr_info, epoch=epoch, starttime=starttime, endtime=endtime, startrec=startrec, endrec=endrec, record_range_only=record_range_only, diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ def readme(): return f.read() setup(name='cdflib', - version='0.3.4', + version='0.3.5', description='A python CDF reader toolkit', url='http://github.com/MAVENSDC/cdflib', author='MAVEN SDC',
Getting rid of a print statement
MAVENSDC_cdflib
train
gitignore,py,py
188b6d5d4bd8978f1fcaba63f93061ae83fccc10
diff --git a/core/src/main/java/com/graphhopper/storage/GraphHopperStorage.java b/core/src/main/java/com/graphhopper/storage/GraphHopperStorage.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/com/graphhopper/storage/GraphHopperStorage.java +++ b/core/src/main/java/com/graphhopper/storage/GraphHopperStorage.java @@ -1383,12 +1383,6 @@ public class GraphHopperStorage implements GraphStorage // check encoding for compatiblity acceptStr = properties.get("graph.flagEncoders"); - // remove when 0.4 released - acceptStr = acceptStr.replace("car:com.graphhopper.routing.util.CarFlagEncoder", "car|speedFactor=5.0|speedBits=5|turnCosts=false"); - acceptStr = acceptStr.replace("foot:com.graphhopper.routing.util.FootFlagEncoder", "foot|speedFactor=1.0|speedBits=4|turnCosts=false"); - acceptStr = acceptStr.replace("bike:com.graphhopper.routing.util.BikeFlagEncoder", "bike|speedFactor=2.0|speedBits=4|turnCosts=false"); - acceptStr = acceptStr.replace("bike2:com.graphhopper.routing.util.Bike2WeightFlagEncoder", "bike2|speedFactor=2.0|speedBits=4|turnCosts=false"); - } else throw new IllegalStateException("cannot load properties. corrupt file or directory? " + dir);
minor removal of deprecated stuff
graphhopper_graphhopper
train
java
ea3c6f6cb700b029c4d4fc1cd94b0b7b9d261db8
diff --git a/modules/rpc/thrift.go b/modules/rpc/thrift.go index <HASH>..<HASH> 100644 --- a/modules/rpc/thrift.go +++ b/modules/rpc/thrift.go @@ -38,6 +38,10 @@ type CreateThriftServiceFunc func(svc service.Host) ([]transport.Procedure, erro // ThriftModule creates a Thrift Module from a service func func ThriftModule(hookup CreateThriftServiceFunc, options ...modules.Option) service.ModuleCreateFunc { return func(mi service.ModuleCreateInfo) ([]service.Module, error) { + if mi.Name == "" { + mi.Name = "rpc" + } + mod, err := newYARPCThriftModule(mi, hookup, options...) if err != nil { return nil, errors.Wrap(err, "unable to instantiate Thrift module")
Default rpc name (#<I>) Right now we'll default to a submodule name(yarpc), which is confusing.
uber-go_fx
train
go
7ae0c17b91d64f84fa760f2cea1b859bbed29a97
diff --git a/adler32/adler32.go b/adler32/adler32.go index <HASH>..<HASH> 100644 --- a/adler32/adler32.go +++ b/adler32/adler32.go @@ -90,7 +90,7 @@ func (d *digest) Sum(b []byte) []byte { func (d *digest) Roll(b byte) error { if len(d.window) == 0 { return errors.New( - "The window must be initialized with Write() first.") + "the rolling window must be initialized with Write() first") } // extract the oldest and the newest byte, update the circular buffer. newest := uint32(b)
Applying fix suggested by go lint
chmduquesne_rollinghash
train
go
bd115aad1771f59a15d454d20241a37d48842d45
diff --git a/DrdPlus/Races/EnumTypes/RaceType.php b/DrdPlus/Races/EnumTypes/RaceType.php index <HASH>..<HASH> 100644 --- a/DrdPlus/Races/EnumTypes/RaceType.php +++ b/DrdPlus/Races/EnumTypes/RaceType.php @@ -1,10 +1,10 @@ <?php namespace DrdPlus\Races\EnumTypes; -use Doctrineum\Scalar\EnumType; +use Doctrineum\Scalar\ScalarEnumType; use DrdPlus\Races\Race; -class RaceType extends EnumType +class RaceType extends ScalarEnumType { const RACE = 'race'; diff --git a/DrdPlus/Races/Race.php b/DrdPlus/Races/Race.php index <HASH>..<HASH> 100644 --- a/DrdPlus/Races/Race.php +++ b/DrdPlus/Races/Race.php @@ -1,14 +1,14 @@ <?php namespace DrdPlus\Races; -use Doctrineum\Scalar\Enum; +use Doctrineum\Scalar\ScalarEnum; use Drd\Genders\Gender; use DrdPlus\Codes\PropertyCodes; use DrdPlus\Tables\Races\RacesTable; use DrdPlus\Tables\Tables; use Granam\Scalar\Tools\ValueDescriber; -abstract class Race extends Enum +abstract class Race extends ScalarEnum { public function __construct($value)
Necessary changed due to library update
drdplusinfo_drdplus-races
train
php,php