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
1f0c57515ab721592aa7a0bbafee0b20ad23a242
diff --git a/examples/rax-kitchen-sink/.storybook/config.js b/examples/rax-kitchen-sink/.storybook/config.js index <HASH>..<HASH> 100644 --- a/examples/rax-kitchen-sink/.storybook/config.js +++ b/examples/rax-kitchen-sink/.storybook/config.js @@ -7,7 +7,6 @@ addParameters({ goFullScreen: false, showAddonsPanel: true, showSearchBox: false, - sortStoriesByKind: false, hierarchySeparator: /\./, hierarchyRootSeparator: /\|/, enableShortcuts: true, diff --git a/lib/cli/generators/RAX/template/.storybook/config.js b/lib/cli/generators/RAX/template/.storybook/config.js index <HASH>..<HASH> 100644 --- a/lib/cli/generators/RAX/template/.storybook/config.js +++ b/lib/cli/generators/RAX/template/.storybook/config.js @@ -8,7 +8,6 @@ addParameters({ showAddonsPanel: true, showSearchBox: false, addonPanelInRight: true, - sortStoriesByKind: false, hierarchySeparator: /\./, hierarchyRootSeparator: /\|/, enableShortcuts: true,
Remove outdated sortStoriesByKind
storybooks_storybook
train
js,js
22a5014996d78c673c2c8250055ebcfe0c08c7b5
diff --git a/tests/unit/components/LMap.spec.js b/tests/unit/components/LMap.spec.js index <HASH>..<HASH> 100644 --- a/tests/unit/components/LMap.spec.js +++ b/tests/unit/components/LMap.spec.js @@ -210,7 +210,7 @@ describe('component: LMap.vue', () => { const wrapper = getMapWrapper({ center: { lat: 80, lng: 170 }, zoom: 10, - noBlockingAnimations: true, + noBlockingAnimations: false, }); // Move the map several times in a short timeperiod
Set props twice with no-blocking false in quarantined test
KoRiGaN_Vue2Leaflet
train
js
f3aaadf0727887e52083569befed3ff96bc13985
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,4 @@ from setuptools import setup, find_packages -from codecs import open -from os import path - -here = path.abspath(path.dirname(__file__)) - -with open(path.join(here, 'README.rst'), encoding='utf-8') as f: - long_description = f.read() setup( name='pyfmg', @@ -17,6 +10,5 @@ setup( author_email='[email protected]', description='Represents the base components of the Fortinet FortiManager JSON-RPC interface', include_package_data=True, - long_description=long_description, install_requires=['requests'] )
update to fix errors returned from pip install with python<I>+
p4r4n0y1ng_pyfmg
train
py
b64bdca305b2f0224fc504f300d3c582e8592a3a
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 @@ -19,7 +19,7 @@ require 'shoulda/matchers' Dir[Rails.root.join("spec/support/**/*.rb")].sort.each { |f| require f } Capybara.javascript_driver = :cuprite Capybara.register_driver(:cuprite) do |app| - Capybara::Cuprite::Driver.new(app, window_size: [1200, 800]) + Capybara::Cuprite::Driver.new(app, window_size: [1200, 800], timeout: 15) end Capybara.server = :webrick
Increase Cuprite timeout from 5 to <I> seconds We've been seeing Ferrum::TimeoutError in GitHub Actions runs, so let's increase the Curpite timeout which will hopefully take care of fixing that issue when the runner is overloaded.
igrigorik_vimgolf
train
rb
b49130beb16e0f26caa4235496e3cd6d2c183d45
diff --git a/test/CliMenuTest.php b/test/CliMenuTest.php index <HASH>..<HASH> 100644 --- a/test/CliMenuTest.php +++ b/test/CliMenuTest.php @@ -511,14 +511,10 @@ class CliMenuTest extends TestCase $first = true; $this->terminal->expects($this->any()) ->method('read') - ->willReturn( + ->will( $this->returnCallback( - function() use ($first) { - if ($first) { - $first = false; - return 'c'; - } - return 'x'; + function() use (&$first) { + return $first ? 'c' : 'x'; } ) ); @@ -539,6 +535,7 @@ class CliMenuTest extends TestCase $menu->open(); static::assertStringEqualsFile($this->getTestFile(), $this->output->fetch()); + $first = false; $menu->open(); static::assertStringEqualsFile($this->getTestFile(), $this->output->fetch()); }
I'm sure it'll work out at some point
php-school_cli-menu
train
php
0bbdfda3b55304e55fecd67cd0f1d7691e2fbbf5
diff --git a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/binary/ONetworkProtocolBinary.java b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/binary/ONetworkProtocolBinary.java index <HASH>..<HASH> 100755 --- a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/binary/ONetworkProtocolBinary.java +++ b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/binary/ONetworkProtocolBinary.java @@ -975,8 +975,23 @@ public class ONetworkProtocolBinary extends OBinaryNetworkProtocolAbstract { channel.writeShort((short) OGlobalConfiguration.values().length); for (OGlobalConfiguration cfg : OGlobalConfiguration.values()) { - channel.writeString(cfg.getKey()); - channel.writeString(cfg.getValueAsString() != null ? cfg.getValueAsString() : ""); + + String key; + try { + key = cfg.getKey(); + } catch (Exception e) { + key = "?"; + } + + String value; + try { + value = cfg.getValueAsString() != null ? cfg.getValueAsString() : ""; + } catch (Exception e) { + value = ""; + } + + channel.writeString(key); + channel.writeString(value); } } finally { endResponse();
Fixed issue #<I> Since I've not a test case I've added more checks about Nullity. Hope it's enough!
orientechnologies_orientdb
train
java
fc17f141e03bcba245ecaf331e722eff3d46e8b2
diff --git a/src/Slack/EmojiIcon.php b/src/Slack/EmojiIcon.php index <HASH>..<HASH> 100644 --- a/src/Slack/EmojiIcon.php +++ b/src/Slack/EmojiIcon.php @@ -43,7 +43,14 @@ class EmojiIcon implements IconInterface $emojiValidationRegex = '_^:[\w-+]+:$_iuS'; if (!preg_match($emojiValidationRegex, $emoji)) { - throw new InvalidEmojiException(sprintf('The emoji: "%s" is not a valid emoji.', $emoji), 400); + throw new InvalidEmojiException( + sprintf( + 'The emoji: "%s" is not a valid emoji. + An emoji should always be a string starting and ending with ":".', + $emoji + ), + 400 + ); } $this->emoji = $emoji;
Explain better in the InvalidEmojiExeption what the format should be
pageon_SlackWebhookMonolog
train
php
b2c90e1cca1975fe5f3b714bfed0baa592ba6efc
diff --git a/classy_mail/models.py b/classy_mail/models.py index <HASH>..<HASH> 100644 --- a/classy_mail/models.py +++ b/classy_mail/models.py @@ -3,8 +3,6 @@ logger = logging.getLogger("classy_mail") from django.contrib.auth import get_user_model from django.db import models -User = get_user_model() - class EmailTemplate(models.Model): name = models.CharField(max_length=64, unique=True) description = models.CharField(max_length=512) @@ -17,7 +15,7 @@ class EmailTemplate(models.Model): class CampaignAddressee(models.Model): - user = models.ForeignKey(User, blank=True, null=True) + user = models.ForeignKey(get_user_model(), blank=True, null=True) email_address = models.EmailField(unique=True) first_name = models.CharField(max_length=128, null=True, blank=True) last_name = models.CharField(max_length=128, null=True, blank=True) diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from distutils.core import setup setup( name='django-classy-mail', - version='0.1.2', + version='0.1.3', author='Alex Lovell-Troy', author_email='[email protected]', description='Class-Based Email for Django built with Mixins',
Fixing for compatibility with <I>
alexlovelltroy_django-classy-mail
train
py,py
691bb9893dc9259d38f876a55c5178c97dd2a9a3
diff --git a/freemius/includes/class-freemius.php b/freemius/includes/class-freemius.php index <HASH>..<HASH> 100644 --- a/freemius/includes/class-freemius.php +++ b/freemius/includes/class-freemius.php @@ -1926,6 +1926,8 @@ if ( is_object( $fs ) ) { $fs->_uninstall_plugin_event(); + + $fs->do_action('after_uninstall'); } } @@ -3067,13 +3069,13 @@ if ( is_string( $message ) ) { $params['message'] = $message; } - + if ( $this->is_addon() ) { $params['addon_id'] = $this->get_id(); return $this->get_parent_instance()->_get_admin_page_url( 'contact', $params ); } else { - return $this->_get_admin_page_url( 'contact', $params ); - } + return $this->_get_admin_page_url( 'contact', $params ); + } } /* Logger
[uninstall] Added after_uninstall hook.
Freemius_wordpress-sdk
train
php
232f5d4cc6c327b7c613892e79cc8d091a6b9aab
diff --git a/components/auth/window-flow.js b/components/auth/window-flow.js index <HASH>..<HASH> 100644 --- a/components/auth/window-flow.js +++ b/components/auth/window-flow.js @@ -1,6 +1,9 @@ +import sniffer from '../global/sniffer'; + import AuthResponseParser from './response-parser'; const NAVBAR_HEIGHT = 50; +const isEdge = sniffer.browser.name === 'edge'; export default class WindowFlow { constructor(requestBuilder, storage) { @@ -21,11 +24,19 @@ export default class WindowFlow { const top = (window.screen.height - height - NAVBAR_HEIGHT) / screenHalves; const left = (window.screen.width - width) / screenHalves; - return window.open( - url, + const loginWindow = window.open( + isEdge ? null : url, 'HubLoginWindow', `height=${height}, width=${width}, left=${left}, top=${top}` ); + + if (isEdge) { + setTimeout(() => { + loginWindow.location = url; + }, 0); + } + + return loginWindow; } /**
RG-<I> first open window and then set URL: hack for Edge
JetBrains_ring-ui
train
js
2d4d35509fe026676638b4239911062398d52a55
diff --git a/lib/emit.js b/lib/emit.js index <HASH>..<HASH> 100644 --- a/lib/emit.js +++ b/lib/emit.js @@ -987,17 +987,18 @@ Ep.explodeExpression = function(path, ignoreResult) { // Side effects already emitted above. } else if (tempVar || (hasLeapingChildren && - (self.isVolatileContextProperty(result) || - meta.hasSideEffects(result)))) { + !n.Literal.check(result))) { // If tempVar was provided, then the result will always be assigned // to it, even if the result does not otherwise need to be assigned // to a temporary variable. When no tempVar is provided, we have // the flexibility to decide whether a temporary variable is really - // necessary. In general, temporary assignment is required only - // when some other child contains a leap and the child in question - // is a context property like $ctx.sent that might get overwritten - // or an expression with side effects that need to occur in proper - // sequence relative to the leap. + // necessary. Unfortunately, in general, a temporary variable is + // required whenever any child contains a yield expression, since it + // is difficult to prove (at all, let alone efficiently) whether + // this result would evaluate to the same value before and after the + // yield (see #206). One narrow case where we can prove it doesn't + // matter (and thus we do not need a temporary variable) is when the + // result in question is a Literal value. result = self.emitAssign( tempVar || self.makeTempVar(), result
Fix #<I> by assigning more sibling subexpression results to temp vars.
facebook_regenerator
train
js
643bd3bf2a3698e15f67bde41cd0fcd49a403253
diff --git a/src/main/java/org/vesalainen/parser/util/CharInput.java b/src/main/java/org/vesalainen/parser/util/CharInput.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/vesalainen/parser/util/CharInput.java +++ b/src/main/java/org/vesalainen/parser/util/CharInput.java @@ -21,7 +21,6 @@ import java.io.IOException; import java.io.Writer; import java.nio.CharBuffer; import java.util.Arrays; -import java.util.Deque; import java.util.EnumSet; import org.vesalainen.parser.ParserFeature; @@ -151,6 +150,10 @@ public abstract class CharInput<I> extends Input<I, CharBuffer> @Override public String getString(int start, int length) { + if (length == 0) + { + return ""; + } if (array != null) { int ps = start % size;
Fixed bug that returned illegal string when input length == 0
tvesalainen_lpg
train
java
e0d181e037438ee8ff457c421f6ca4706ac7a725
diff --git a/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/ConstructionNodeImpl.java b/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/ConstructionNodeImpl.java index <HASH>..<HASH> 100644 --- a/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/ConstructionNodeImpl.java +++ b/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/ConstructionNodeImpl.java @@ -391,7 +391,8 @@ public class ConstructionNodeImpl extends ExtendedProjectionNodeImpl implements ConstructionSubstitutionNormalization normalization = substitutionNormalizer.normalizeSubstitution( substitution.simplifyValues(shrunkChild.getVariableNullability()), projectedVariables); - IQTree newChild = normalization.updateChild(shrunkChild); + IQTree newChild = normalization.updateChild(shrunkChild) + .normalizeForOptimization(variableGenerator); return normalization.generateTopConstructionNode() .map(c -> (IQTree) iqFactory.createUnaryIQTree(c, newChild, currentIQProperties.declareNormalizedForOptimization()))
Make sure the new child is normalized.
ontop_ontop
train
java
60572d43436351323eab49d416bc69ebdd12c6f0
diff --git a/src/Legacy/Storage.php b/src/Legacy/Storage.php index <HASH>..<HASH> 100644 --- a/src/Legacy/Storage.php +++ b/src/Legacy/Storage.php @@ -1977,7 +1977,7 @@ class Storage */ protected function isMultiOrderQuery($order) { - return ( strpos($order, ',') !== FALSE ? TRUE : FALSE ); + return ( strpos($order, ',') !== false ? true : false ); } /** diff --git a/src/Storage/Query/Handler/OrderHandler.php b/src/Storage/Query/Handler/OrderHandler.php index <HASH>..<HASH> 100644 --- a/src/Storage/Query/Handler/OrderHandler.php +++ b/src/Storage/Query/Handler/OrderHandler.php @@ -52,6 +52,6 @@ class OrderHandler */ protected function isMultiOrderQuery($order) { - return ( strpos($order, ',') !== FALSE ? TRUE : FALSE ); + return ( strpos($order, ',') !== false ? true : false ); } }
PSR-2 Compliance, changed TRUE and FALSE to lowercase true and false...
bolt_bolt
train
php,php
635d2d99118837d85c367c86371a3b279028d23e
diff --git a/lib/ipc-helpers.js b/lib/ipc-helpers.js index <HASH>..<HASH> 100644 --- a/lib/ipc-helpers.js +++ b/lib/ipc-helpers.js @@ -48,7 +48,7 @@ exports.listenForEvents = () => { ipcRenderer.sendSync = function (channel, ...args) { trackEvent(channel, args, true) const returnValue = originalSendSync.apply(ipc, arguments) - trackEvent(channel, returnValue) + trackEvent(channel, [returnValue]) return returnValue } })
Treat return value as array of args
electron_devtron
train
js
e5508284f5167a3cc92cbd93d1a6236b0cbadd78
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ tests_require = open(os.path.join(os.path.dirname(__file__), 'test_requirements. setup( name='mocket', - version='1.3.1', + version='1.3.2', author='Andrea de Marco, Giorgio Salluzzo', author_email='[email protected], [email protected]', url='https://github.com/mocketize/python-mocket',
Upgrade to <I> version.
mindflayer_python-mocket
train
py
0a9cc0edf8a97ef2a86d73e486c59e1f91a8b1fa
diff --git a/gwpy/data/array2d.py b/gwpy/data/array2d.py index <HASH>..<HASH> 100644 --- a/gwpy/data/array2d.py +++ b/gwpy/data/array2d.py @@ -12,6 +12,7 @@ __author__ = "Duncan Macleod <[email protected]>" from .array import Array from .series import Series +from ..segments import Segment class Array2D(Array): @@ -88,7 +89,7 @@ class Array2D(Array): def span_x(self): """Extent of this `Array2D` """ - return (self.x0, self.x0 + self.shape[0] * self.dx) + return Segment(self.x0, self.x0 + self.shape[0] * self.dx) @property def y0(self): @@ -128,7 +129,7 @@ class Array2D(Array): def span_y(self): """Extent of this `Array2D` """ - return (self.y0, self.y0 + self.shape[0] * self.dy) + return Segment(self.y0, self.y0 + self.shape[1] * self.dy) @property def xindex(self):
Array2D: now return span_x, span_y as Segment (cherry picked from commit <I>b<I>a2a1c7effd7a8cdb<I>e<I>a<I>baac8e<I>e)
gwpy_gwpy
train
py
369307fe2d06c8ef0956e24cecc98e955bd9518c
diff --git a/pgcontents/utils/ipycompat.py b/pgcontents/utils/ipycompat.py index <HASH>..<HASH> 100644 --- a/pgcontents/utils/ipycompat.py +++ b/pgcontents/utils/ipycompat.py @@ -3,12 +3,12 @@ Utilities for managing IPython 3/4 compat. """ import IPython -SUPPORTED_VERSIONS = {3, 4} +SUPPORTED_VERSIONS = {3, 4, 5} IPY_MAJOR = IPython.version_info[0] if IPY_MAJOR not in SUPPORTED_VERSIONS: raise ImportError("IPython version %d is not supported." % IPY_MAJOR) + IPY3 = (IPY_MAJOR == 3) -IPY4 = (IPY_MAJOR == 4) if IPY3: from IPython.config import Config
MAINT: Allow IPython 5.
quantopian_pgcontents
train
py
e307bb3bebc18c3927474fa5bf8f84bb64ac6239
diff --git a/mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/MongoDBDialect.java b/mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/MongoDBDialect.java index <HASH>..<HASH> 100644 --- a/mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/MongoDBDialect.java +++ b/mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/MongoDBDialect.java @@ -836,6 +836,8 @@ public class MongoDBDialect extends BaseGridDialect implements QueryableGridDial case MAP_REDUCE: return doMapReduce( queryDescriptor, collection ); case INSERT: + case INSERTONE: + case INSERTMANY: case REMOVE: case DELETEMANY: case DELETEONE:
OGM-<I> Throw exception is MongoDB insert* operation is not run via execute update query
hibernate_hibernate-ogm
train
java
59490aad16ec0d13bcc1b7b6828f1be52608b36d
diff --git a/userena/utils.py b/userena/utils.py index <HASH>..<HASH> 100644 --- a/userena/utils.py +++ b/userena/utils.py @@ -72,8 +72,8 @@ def signin_redirect(redirect=None, user=None): :return: String containing the URI to redirect to. """ - if redirect: return redirect - elif user: + if redirect is not None: return redirect + elif user is not None: return userena_settings.USERENA_SIGNIN_REDIRECT_URL % \ {'username': user.username} else: return settings.LOGIN_REDIRECT_URL diff --git a/userena/views.py b/userena/views.py index <HASH>..<HASH> 100644 --- a/userena/views.py +++ b/userena/views.py @@ -284,7 +284,8 @@ def signin(request, auth_form=AuthenticationForm, # Whereto now? redirect_to = redirect_signin_function( - request.REQUEST.get(redirect_field_name), user) + request.REQUEST.get(redirect_field_name), + user) return redirect(redirect_to) else: return redirect(reverse('userena_disabled',
Changed ``if foo:`` to ``if foo is ...``
bread-and-pepper_django-userena
train
py,py
9dbf37af2b03c5b18c9940e1e849c4d282b6766d
diff --git a/src/Keboola/GenericExtractor/Subscriber/UrlSignature.php b/src/Keboola/GenericExtractor/Subscriber/UrlSignature.php index <HASH>..<HASH> 100755 --- a/src/Keboola/GenericExtractor/Subscriber/UrlSignature.php +++ b/src/Keboola/GenericExtractor/Subscriber/UrlSignature.php @@ -19,6 +19,10 @@ class UrlSignature extends AbstractSignature implements SubscriberInterface protected function addSignature(RequestInterface $request) { $authQuery = call_user_func($this->generator, $this->getRequestAndQuery($request)); - $rQuery = $request->getQuery()->merge($authQuery); + foreach($authQuery as $key => $value) { + if(!$request->getQuery()->hasKey($key)) { + $request->getQuery()->set($key, $value); + } + } } }
fix: Query auth now doesn't overwrite params from request
keboola_generic-extractor
train
php
2f16f96b40a72fc55603bb54884bf280f4addee4
diff --git a/pages/subscribers.js b/pages/subscribers.js index <HASH>..<HASH> 100644 --- a/pages/subscribers.js +++ b/pages/subscribers.js @@ -3,6 +3,7 @@ import commonApp from '@shopgate/pwa-common/subscriptions/app'; import commonUser from '@shopgate/pwa-common/subscriptions/user'; import commonHistory from '@shopgate/pwa-common/subscriptions/history'; import commonMenu from '@shopgate/pwa-common/subscriptions/menu'; +import commonRouter from '@shopgate/pwa-common/subscriptions/router'; // PWA Common Commerce import commerceCart from '@shopgate/pwa-common-commerce/cart/subscriptions'; import commerceCategory from '@shopgate/pwa-common-commerce/category/subscriptions'; @@ -46,6 +47,7 @@ const subscriptions = [ commonHistory, commonUser, commonMenu, + commonRouter, // Common Commerce subscribers. commerceCart, commerceCategory,
PWA-<I> Added router subscription to subscribers
shopgate_pwa
train
js
ffff1c4b815e592ba2ad2c32b94db2ce4c595ffd
diff --git a/dist/ngsails.io.js b/dist/ngsails.io.js index <HASH>..<HASH> 100644 --- a/dist/ngsails.io.js +++ b/dist/ngsails.io.js @@ -1254,7 +1254,13 @@ function createSailsBackend($browser, $window, $injector, $q, $timeout){ url = url || $browser.url(); - $window.io.socket[method.toLowerCase()](url,fromJson(post),socketResponse); + $window.io.socket._request({ + method: method.toLowerCase(), + url: url, + data: fromJson(post), + headers: headers, + cb: socketResponse + }); }
add headers to outgoing socket requests
balderdashy_angularSails
train
js
3f687a9ce462d1fe74983775bff60329a0ac5db1
diff --git a/lib/phusion_passenger/abstract_installer.rb b/lib/phusion_passenger/abstract_installer.rb index <HASH>..<HASH> 100644 --- a/lib/phusion_passenger/abstract_installer.rb +++ b/lib/phusion_passenger/abstract_installer.rb @@ -226,7 +226,7 @@ private if PlatformInfo.find_command("wget") return sh("wget", "-O", output, url) else - return sh("curl", url, "-L", "-o", output) + return sh("curl", url, "-f", "-L", "-o", output) end end end
When using Curl to download things, correctly detect <I> errors.
phusion_passenger
train
rb
fc506edc1083e3dc08b7fb5a47c74ad4cdc3a7ee
diff --git a/tests/test_tcod.py b/tests/test_tcod.py index <HASH>..<HASH> 100644 --- a/tests/test_tcod.py +++ b/tests/test_tcod.py @@ -1,5 +1,7 @@ #!/usr/bin/env python +import sys + import copy import pickle @@ -17,8 +19,12 @@ def test_line_error(): tcod.line(*LINE_ARGS, py_callback=raise_Exception) -def test_clipboard(): +def test_clipboard_set(): tcod.clipboard_set('') + [email protected](sys.platform == 'darwin', + reason="Known crash on Mac OS/X") +def test_clipboard_get(): tcod.clipboard_get()
Skip tests on a broken Mac function
libtcod_python-tcod
train
py
3ffb66a3b090bc7dea1401c679271c5d63a950c8
diff --git a/tests/ModelTest.php b/tests/ModelTest.php index <HASH>..<HASH> 100644 --- a/tests/ModelTest.php +++ b/tests/ModelTest.php @@ -9,8 +9,6 @@ class ModelTest extends TestCase { public function testModelUsesCascadingDeletesTrait() { - $user = new ExtendedUser(); - - $this->assertContains(CascadesDeletes::class, class_uses_recursive($user)); + $this->assertContains(CascadesDeletes::class, class_uses_recursive(ExtendedUser::class)); } }
Updated model test to use class name to work with previous Laravel versions.
shiftonelabs_laravel-cascade-deletes
train
php
0437f582f1e720698fb509ddea1113075ff036bf
diff --git a/cluster.go b/cluster.go index <HASH>..<HASH> 100644 --- a/cluster.go +++ b/cluster.go @@ -11,7 +11,7 @@ type Cluster struct { connectionTimeout time.Duration } -func OpenCluster(connSpecStr string) (*Cluster, error) { +func Connect(connSpecStr string) (*Cluster, error) { spec := parseConnSpec(connSpecStr) if spec.Scheme == "" { spec.Scheme = "http"
Rename OpenCluster to Connect.
couchbase_gocb
train
go
05af3cc2421032a89ad3fcb5cb644832fc08a703
diff --git a/src/Builder.php b/src/Builder.php index <HASH>..<HASH> 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -159,9 +159,10 @@ class Builder public function buildConfig($name, array $configs, $defines = []) { if (!$this->isSpecialConfig($name)) { - array_push($configs, $this->addition, [ + array_push($configs, $this->addition); + /*array_push($configs, $this->addition, [ 'params' => $this->vars['params'], - ]); + ]);*/ } $this->vars[$name] = call_user_func_array([Helper::className(), 'mergeConfig'], $configs); if ($name === 'params') { diff --git a/src/Plugin.php b/src/Plugin.php index <HASH>..<HASH> 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -115,7 +115,11 @@ class Plugin implements PluginInterface, EventSubscriberInterface $this->showDepsTree(); $builder = new Builder($this->files); - $builder->setAddition(['aliases' => $this->aliases]); + $builder->setAddition([ + 'application' => [ + 'aliases' => $this->aliases, + ], + ]); $builder->setIo($this->io); $builder->saveFiles(); $builder->writeConfig('aliases', $this->aliases);
trying yii <I> version
hiqdev_composer-config-plugin
train
php,php
12fda9c9e192613656033199b48572280e414634
diff --git a/maryjane.py b/maryjane.py index <HASH>..<HASH> 100644 --- a/maryjane.py +++ b/maryjane.py @@ -185,7 +185,6 @@ class Project(object): path, regex = self.prepare_path_for_watch(path) filter_key = self.get_watch_filter_key() - print('#######', filter_key) handlers = self.watch_handlers.setdefault(filter_key, []) path = abspath(path)
BUGFIX: in watch lists
pylover_maryjane
train
py
9136caf669902cb35374194c16ac4b3cbf30c100
diff --git a/config/environments/development.rb b/config/environments/development.rb index <HASH>..<HASH> 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -29,4 +29,6 @@ TrustyCms::Application.configure do # Expands the lines which load the assets config.assets.debug = true + config.assets.check_precompiled_asset = false + end
Add check_precompiled_asset false to ensure dev servers run immediately.
pgharts_trusty-cms
train
rb
b66d0a901ad1f1e36a664934d5c4659d31b2ec64
diff --git a/lib/xcflushd/runner.rb b/lib/xcflushd/runner.rb index <HASH>..<HASH> 100644 --- a/lib/xcflushd/runner.rb +++ b/lib/xcflushd/runner.rb @@ -22,6 +22,14 @@ module Xcflushd flusher = Flusher.new( reporter, authorizer, storage, opts[:auth_valid_minutes], error_handler) + Thread.new do + redis_pub = Redis.new( + host: opts[:redis_host], port: opts[:redis_port], driver: :hiredis) + redis_sub = Redis.new( + host: opts[:redis_host], port: opts[:redis_port], driver: :hiredis) + PriorityAuthRenewer.new(authorizer, storage, redis_pub, redis_sub, auth_valid_min) + end + flush_periodically(flusher, opts[:reporting_freq_minutes], logger) end
runner: start priority auth renewer in its own thread
3scale_xcflushd
train
rb
457cd8ae8031ca6f6a740d6cfe59de6b46ba4f97
diff --git a/src/Phlexible/Bundle/SiterootBundle/Twig/Extension/SiterootExtension.php b/src/Phlexible/Bundle/SiterootBundle/Twig/Extension/SiterootExtension.php index <HASH>..<HASH> 100644 --- a/src/Phlexible/Bundle/SiterootBundle/Twig/Extension/SiterootExtension.php +++ b/src/Phlexible/Bundle/SiterootBundle/Twig/Extension/SiterootExtension.php @@ -62,13 +62,13 @@ class SiterootExtension extends \Twig_Extension } /** - * @param TreeNodeInterface $treeNode * @param string $name * @param string $language + * @param TreeNodeInterface $treeNode * * @return string */ - public function pageTitle(TreeNodeInterface $treeNode = null, $name = 'default', $language = null) + public function pageTitle($name = 'default', $language = null, TreeNodeInterface $treeNode = null) { $request = $this->requestStack->getMasterRequest();
twig function param order changed
phlexible_phlexible
train
php
117faa872aad96f1acafefd866c7e34ad9bcfc7e
diff --git a/ObjJAcornCompiler.js b/ObjJAcornCompiler.js index <HASH>..<HASH> 100644 --- a/ObjJAcornCompiler.js +++ b/ObjJAcornCompiler.js @@ -3295,6 +3295,10 @@ ClassStatement: function(node, st, c) { c(node.id, st, "IdentifierName"); } var className = node.id.name; + + if (compiler.getTypeDef(className)) + throw compiler.error_message(className + " is already declared as type", node.id); + if (!compiler.getClassDef(className)) { compiler.classDefs[className] = new ClassDef(false, className); }
Commit from the Cappuccino project: Add check to ensure a @class declaration is not already defined as a type <URL>
mrcarlberg_objj-transpiler
train
js
9e04ca1d7786fa24fac0fce8ecb3064e4aa91bd6
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ def main(): packages=[MODULE_NAME], package_data={'': ['static/*']}, install_requires=[ - 'schema-markdown >= 0.9.6' + 'schema-markdown >= 0.9.7' ] ) diff --git a/src/chisel/__init__.py b/src/chisel/__init__.py index <HASH>..<HASH> 100644 --- a/src/chisel/__init__.py +++ b/src/chisel/__init__.py @@ -6,7 +6,7 @@ Chisel is a light-weight Python WSGI application framework with tools for buildi well-tested, schema-validated JSON web APIs. """ -__version__ = '0.9.115' +__version__ = '0.9.116' from .action import \ Action, \
chisel <I>
craigahobbs_chisel
train
py,py
ae4b4d7ce495d6612fc6718aaff03a74834be762
diff --git a/plexapi/media.py b/plexapi/media.py index <HASH>..<HASH> 100644 --- a/plexapi/media.py +++ b/plexapi/media.py @@ -174,7 +174,7 @@ class MediaPart(PlexObject): return [stream for stream in self.streams if isinstance(stream, SubtitleStream)] def lyricStreams(self): - """ Returns a list of :class:`~plexapi.media.SubtitleStream` objects in this MediaPart. """ + """ Returns a list of :class:`~plexapi.media.LyricStream` objects in this MediaPart. """ return [stream for stream in self.streams if isinstance(stream, LyricStream)] def setDefaultAudioStream(self, stream):
Fix typo in lyric streams doc string
pkkid_python-plexapi
train
py
46be7361eedcc57188b75bec1595a001e6ae7e13
diff --git a/blog/external.php b/blog/external.php index <HASH>..<HASH> 100644 --- a/blog/external.php +++ b/blog/external.php @@ -38,6 +38,8 @@ $user = $USER; // TODO redirect if $CFG->useexternalblogs is off, $CFG->maxexternalblogsperuser == 0, or if user doesn't have caps to manage external blogs $id = optional_param('id', null, PARAM_INT); +$PAGE->set_url('/blog/external.php', array('id' => $id)); + $returnurl = urldecode(optional_param('returnurl', $PAGE->url->out(), PARAM_RAW)); $action = (empty($id)) ? 'add' : 'edit';
Temporary fix with set_url to remove annoying notices
moodle_moodle
train
php
c7bd8db91447de7e188ac311d0a2cb29e6c5ff53
diff --git a/nose/test_orbit.py b/nose/test_orbit.py index <HASH>..<HASH> 100644 --- a/nose/test_orbit.py +++ b/nose/test_orbit.py @@ -579,7 +579,6 @@ def test_liouville_planar(): rmpots.append('TwoPowerSphericalPotential') rmpots.append('TwoPowerTriaxialPotential') rmpots.append('TriaxialHernquistPotential') - rmpots.append('TriaxialNFWPotential') rmpots.append('TriaxialJaffePotential') for p in rmpots: pots.remove(p) @@ -587,6 +586,7 @@ def test_liouville_planar(): tol= {} tol['default']= -8. tol['KeplerPotential']= -7. #more difficult + tol['TriaxialNFWPotential']= -4. #more difficult firstTest= True for p in pots: #Setup instance of potential
Add test of phase-space conservation for TriaxialNFW
jobovy_galpy
train
py
be78db1563f8a07c171d6ef666ea7f661374fecd
diff --git a/src/js/ripple/transaction.js b/src/js/ripple/transaction.js index <HASH>..<HASH> 100644 --- a/src/js/ripple/transaction.js +++ b/src/js/ripple/transaction.js @@ -588,8 +588,9 @@ Transaction.prototype.offer_cancel = function (src, sequence) { // Options: // .set_flags() -// --> expiration : Date or Number -Transaction.prototype.offer_create = function (src, taker_pays, taker_gets, expiration) { +// --> expiration : if not undefined, Date or Number +// --> cancel_sequence : if not undefined, Sequence +Transaction.prototype.offer_create = function (src, taker_pays, taker_gets, expiration, cancel_sequence) { this._secret = this._account_secret(src); this.tx_json.TransactionType = 'OfferCreate'; this.tx_json.Account = UInt160.json_rewrite(src); @@ -605,6 +606,9 @@ Transaction.prototype.offer_create = function (src, taker_pays, taker_gets, expi ? expiration.getTime() : Number(expiration); + if (cancel_sequence) + this.tx_json.OfferSequence = Number(cancel_sequence); + return this; };
Add optional cancel support to offer_create.
ChainSQL_chainsql-lib
train
js
c1c66d2d0ab552bffc019fb6d35971707010d234
diff --git a/.make-compat-package.js b/.make-compat-package.js index <HASH>..<HASH> 100644 --- a/.make-compat-package.js +++ b/.make-compat-package.js @@ -18,6 +18,7 @@ const ROOT = 'dist-compat/'; const CJS_ROOT = ROOT + 'cjs/compat/'; const ESM5_ROOT = ROOT + 'esm5/compat/'; const ESM2015_ROOT = ROOT + 'esm2015/compat/'; +const GLOBAL_ROOT = ROOT + 'global/'; const TYPE_ROOT = ROOT + 'typings/compat/'; const PKG_ROOT = ROOT + 'package/'; const CJS_PKG = PKG_ROOT + ''; @@ -43,5 +44,7 @@ copySources(ESM5_ROOT, ESM5_PKG, true); cleanSourceMapRoot(ESM5_PKG, SRC_ROOT_PKG); copySources(ESM2015_ROOT, ESM2015_PKG, true); cleanSourceMapRoot(ESM2015_PKG, SRC_ROOT_PKG); +copySources(GLOBAL_ROOT, UMD_PKG, true); +cleanSourceMapRoot(UMD_PKG, SRC_ROOT_PKG); fs.copySync('compat/package.json', PKG_ROOT + '/package.json');
chore(build): Copy compat bundle output into package (#<I>) Previously the bundles were left behind in `dist-compat` but never copied into `dist-compat/package` prior to publish. This ensures the bundles are part of the compat release.
ReactiveX_rxjs
train
js
6148725162233418e008f978ed734f3dee274619
diff --git a/test/urlmaker-test.js b/test/urlmaker-test.js index <HASH>..<HASH> 100644 --- a/test/urlmaker-test.js +++ b/test/urlmaker-test.js @@ -74,7 +74,7 @@ vows.describe("urlmaker module interface").addBatch({ "its parts are correct": function(url) { var parts = parseURL(url); assert.equal(parts.hostname, "example.com"); - assert.isUndefined(parts.port); + assert.isNull(parts.port); assert.equal(parts.host, "example.com"); // NOT example.com:80 assert.equal(parts.path, "/login"); }
Change port from undefined to null
pump-io_pump.io
train
js
a7e774c8e4cd8dfcfc2e48572f599b0c2c9d0c4b
diff --git a/fastlane-plugin-souyuz/lib/fastlane/plugin/souyuz/actions/souyuz_action.rb b/fastlane-plugin-souyuz/lib/fastlane/plugin/souyuz/actions/souyuz_action.rb index <HASH>..<HASH> 100644 --- a/fastlane-plugin-souyuz/lib/fastlane/plugin/souyuz/actions/souyuz_action.rb +++ b/fastlane-plugin-souyuz/lib/fastlane/plugin/souyuz/actions/souyuz_action.rb @@ -28,8 +28,11 @@ module Fastlane absolute_ipa_path elsif ::Souyuz.project.android? - if (!values[:keystore_password]) - ::Souyuz.config[:keystore_password] = ask("Password (for #{values[:keystore_alias]}): ") { |q| q.echo = "*" } + # check if keystore vars are set but password is missing + if (values[:keystore_path] && values[:keystore_alias]) + if (!values[:keystore_password]) + ::Souyuz.config[:keystore_password] = ask("Password (for #{values[:keystore_alias]}): ") { |q| q.echo = "*" } + end end absolute_apk_path = File.expand_path(::Souyuz::Manager.new.work(values))
Check if keystore vars are set but password is missing
voydz_souyuz
train
rb
6b87f9221e01c2aa3d40db229588c971a041750d
diff --git a/lib/anemone/http.rb b/lib/anemone/http.rb index <HASH>..<HASH> 100644 --- a/lib/anemone/http.rb +++ b/lib/anemone/http.rb @@ -160,7 +160,7 @@ module Anemone end def refresh_connection(url) - http = Net::HTTP::Proxy(proxy_host, proxy_port) + http = Net::HTTP.new(url.host, url.port, proxy_host, proxy_port) http.read_timeout = read_timeout if !!read_timeout @@ -168,7 +168,8 @@ module Anemone http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE end - @connections[url.host][url.port] = http.start(url.host, url.port) + + @connections[url.host][url.port] = http.start end def verbose?
fix http refresh_connection to work with ssl again
chriskite_anemone
train
rb
555b5f4179937f473c0a2fcfc37f83cedbba3b09
diff --git a/src/Jit/Interceptor.php b/src/Jit/Interceptor.php index <HASH>..<HASH> 100644 --- a/src/Jit/Interceptor.php +++ b/src/Jit/Interceptor.php @@ -408,15 +408,16 @@ class Interceptor { * @return boolean Returns `true` if loaded, null otherwise. * @throws JitException */ - public function loadFile($file) + public function loadFile($filepath) { + $file = realpath($filepath); + if ($file === false) { + throw new JitException("Error, the file `'{$filepath}'` doesn't exist."); + } if ($cached = $this->cached($file)) { require $cached; return true; } - if (!file_exists($file)) { - throw new JitException("Error, the file `'{$file}'` doesn't exist."); - } $code = file_get_contents($file); $timestamp = filemtime($file);
Fixes an issue related to a BC-break introduced by a composer optimization. <URL>
kahlan_kahlan
train
php
a2e80e98bec2022c5f6cc9271e2775cf02b2c5c9
diff --git a/test/main.js b/test/main.js index <HASH>..<HASH> 100644 --- a/test/main.js +++ b/test/main.js @@ -465,7 +465,7 @@ test('Should be able to bind multiple models in bindings hash', function (t) { model2: new Person({name: 'larry'}) }); t.equal(view.el.firstChild.textContent, 'henrik'); - t.equal(view.el.children[1].className, 'larry'); + t.equal(view.el.children[1].className.trim(), 'larry'); t.end(); });
minor test tweak to fix text in IE
AmpersandJS_ampersand-view
train
js
108efa61a8930ddb6ffa86bc4662858abd2dbfeb
diff --git a/src/Label/ReadModels/JSON/OfferLabelProjector.php b/src/Label/ReadModels/JSON/OfferLabelProjector.php index <HASH>..<HASH> 100644 --- a/src/Label/ReadModels/JSON/OfferLabelProjector.php +++ b/src/Label/ReadModels/JSON/OfferLabelProjector.php @@ -26,23 +26,16 @@ class OfferLabelProjector private $offerRepository; /** - * @var LabelRepository - */ - private $labelRepository; - - /** * OfferLabelProjector constructor. * @param DocumentRepositoryInterface $offerRepository * @param ReadRepositoryInterface $relationRepository */ public function __construct( DocumentRepositoryInterface $offerRepository, - ReadRepositoryInterface $relationRepository, - LabelRepository $labelRepository + ReadRepositoryInterface $relationRepository ) { $this->offerRepository = $offerRepository; $this->relationRepository = $relationRepository; - $this->labelRepository = $labelRepository; } public function handleMadeVisible(MadeVisible $madeVisible)
III-<I>: Drop label repo from projector
cultuurnet_udb3-php
train
php
57e089c1204098616201dfc7d0ceb0b4410e9a73
diff --git a/src/utils.js b/src/utils.js index <HASH>..<HASH> 100644 --- a/src/utils.js +++ b/src/utils.js @@ -148,12 +148,13 @@ export class AbortError extends Error { } } -export class _AggregateError extends Error { +export class CustomAggregateError extends Error { constructor(errors, message) { + super(message); this.errors = errors; this.message = message; this.name = 'AggregateError'; } } -export const AggregateError = (typeof AggregateError === 'undefined') ? _AggregateError : AggregateError; \ No newline at end of file +export const AggregateError = CustomAggregateError;
Using custom Aggregate Error class to fix usage in node
geotiffjs_geotiff.js
train
js
616ce0b9bfafc970001544b90b2995d700c0503c
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( version=polls.__version__, description='A simple polls app for django', long_description=read('README.md'), - license=read('LICENSE'), + license='MIT License', author='noxan', author_email='[email protected]', url='https://github.com/byteweaver/django-polls',
update setup.py license field to MIT License
byteweaver_django-polls
train
py
a5ab38c7bb99e135e29f5727e3e75a1e562d8216
diff --git a/activesupport/lib/active_support/testing/declarative.rb b/activesupport/lib/active_support/testing/declarative.rb index <HASH>..<HASH> 100644 --- a/activesupport/lib/active_support/testing/declarative.rb +++ b/activesupport/lib/active_support/testing/declarative.rb @@ -1,30 +1,6 @@ module ActiveSupport module Testing module Declarative - - def self.extended(klass) #:nodoc: - klass.class_eval do - - unless method_defined?(:describe) - def self.describe(text) - if block_given? - super - else - message = "`describe` without a block is deprecated, please switch to: `def self.name; #{text.inspect}; end`\n" - ActiveSupport::Deprecation.warn message - - class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 - def self.name - "#{text}" - end - RUBY_EVAL - end - end - end - - end - end - unless defined?(Spec) # Helper to define a test method using a String. Under the hood, it replaces # spaces with underscores and defines the test method.
remove deprecated code. Rely on `describe` provided by minitest
rails_rails
train
rb
6099f45a4624c3a834fe0afaac89baa9fd45d7e8
diff --git a/src/Moxl/Xec/Payload/Presence.php b/src/Moxl/Xec/Payload/Presence.php index <HASH>..<HASH> 100755 --- a/src/Moxl/Xec/Payload/Presence.php +++ b/src/Moxl/Xec/Payload/Presence.php @@ -40,20 +40,23 @@ class Presence extends Payload } else { $p = new \modl\Presence(); $p->setPresence($stanza); - $pd = new \modl\PresenceDAO(); - $pd->set($p); - if($p->muc) { - $this->method('muc'); - $this->pack($p); - } else { - $cd = new \Modl\ContactDAO(); - $c = $cd->getRosterItem($p->jid, true); + if($p->value != 5) { + $pd = new \modl\PresenceDAO(); + $pd->set($p); - $this->pack($c); - } + if($p->muc) { + $this->method('muc'); + $this->pack($p); + } else { + $cd = new \Modl\ContactDAO(); + $c = $cd->getRosterItem($p->jid, true); + + $this->pack($c); + } - $this->deliver(); + $this->deliver(); + } } } }
- Dont save the "offline" presences
movim_moxl
train
php
c6649f2ec2452c0cfd412311bfc47c3cf9fc2c71
diff --git a/lib/geo_calc/geo_point.rb b/lib/geo_calc/geo_point.rb index <HASH>..<HASH> 100644 --- a/lib/geo_calc/geo_point.rb +++ b/lib/geo_calc/geo_point.rb @@ -55,6 +55,7 @@ class GeoPoint alias_method :#{sym}=, :lon= } end + alias_method :to_lat, :lat (Symbol.lat_symbols - [:lat]).each do |sym| class_eval %{ @@ -62,6 +63,7 @@ class GeoPoint alias_method :#{sym}=, :lat= } end + alias_method :to_lng, :lng def [] key case key diff --git a/spec/geo_calc/geo_point_spec.rb b/spec/geo_calc/geo_point_spec.rb index <HASH>..<HASH> 100644 --- a/spec/geo_calc/geo_point_spec.rb +++ b/spec/geo_calc/geo_point_spec.rb @@ -174,6 +174,12 @@ describe GeoPoint do @p1.latitude.should == 50 end end + + describe '#to_lat (alias)' do + it 'should return latitude' do + @p1.to_lat.should == 50 + end + end end describe '#lat=' do
methods #to_lat and #to_lng added to GeoPoint
kristianmandrup_geo_calc
train
rb,rb
ef1db7e2fc53e456c55c8a26a85ec9099b887f20
diff --git a/lib/xcodeproj/constants.rb b/lib/xcodeproj/constants.rb index <HASH>..<HASH> 100644 --- a/lib/xcodeproj/constants.rb +++ b/lib/xcodeproj/constants.rb @@ -149,6 +149,7 @@ module Xcodeproj :bundle => 'bundle', :octest_bundle => 'octest', :unit_test_bundle => 'xctest', + :ui_test_bundle => 'xctest', :app_extension => 'appex', :watch2_extension => 'appex', :watch2_app => 'app',
Adds ui_test_bundle extension This is needed to put the right extension in xcake
CocoaPods_Xcodeproj
train
rb
ed676d0961dccd854e9206eebb80a3ed53ae5317
diff --git a/tests/unit/CollectionResolverTest.php b/tests/unit/CollectionResolverTest.php index <HASH>..<HASH> 100644 --- a/tests/unit/CollectionResolverTest.php +++ b/tests/unit/CollectionResolverTest.php @@ -179,6 +179,25 @@ class CollectionResolverTest extends TestCase /** * @covers ::__construct * @covers ::resolve + * + * @expectedException \InvalidArgumentException + * + * @uses \phpDocumentor\Reflection\Types\Context + * @uses \phpDocumentor\Reflection\Types\Compound + * @uses \phpDocumentor\Reflection\Types\Collection + * @uses \phpDocumentor\Reflection\Types\String_ + */ + public function testResolvingArrayCollectionWithKeyAndTooManyWhitespace() + { + $fixture = new TypeResolver(); + + /** @var Collection $resolvedType */ + $resolvedType = $fixture->resolve('array<string, object|array>', new Context('')); + } + + /** + * @covers ::__construct + * @covers ::resolve * * @uses \phpDocumentor\Reflection\Types\Context * @uses \phpDocumentor\Reflection\Types\Compound
Added test to prevent extra whitespaces
phpDocumentor_TypeResolver
train
php
386dbd89654a1d519eb4a573bc0608685a0cdf2e
diff --git a/manip/manip-kit.js b/manip/manip-kit.js index <HASH>..<HASH> 100644 --- a/manip/manip-kit.js +++ b/manip/manip-kit.js @@ -60,7 +60,7 @@ class Kit { // saving functions async saveMap(mapgns, gn, u) { if (this.broken) return null; - let gn1 = await this.ctx.save.to(gn, u, this.glyph); + let gn1 = await this.ctx.save.to(gn, u, this.glyph.clone()); if (this.addMap) this.addMap(mapgns, gn1); return gn1; }
when saving glyphs it should be detached from the kit context
caryll_Megaminx
train
js
7a1818e999815c181a93ddf6a11bbc4e70cc39af
diff --git a/benchmarks/calc_signal_benchmark.py b/benchmarks/calc_signal_benchmark.py index <HASH>..<HASH> 100644 --- a/benchmarks/calc_signal_benchmark.py +++ b/benchmarks/calc_signal_benchmark.py @@ -50,7 +50,7 @@ np.set_printoptions(linewidth=200) # _NREP = 4 # @DV _LRES = [-1,-3,0] -_LLOS = [1,5,1] +_LLOS = [1,4,0] _LT = [1,3,0] _NREP = 3 #
[Issue<I>] smaller test
ToFuProject_tofu
train
py
34b985af5485b75a2ee7590bb9451df0bba165c4
diff --git a/src/BooBoo.php b/src/BooBoo.php index <HASH>..<HASH> 100644 --- a/src/BooBoo.php +++ b/src/BooBoo.php @@ -148,7 +148,7 @@ class BooBoo extends \Exception { } public static function addVars(array $vars) { - return array_merge(self::$vars, $vars); + self::$vars = array_merge(self::$vars, $vars); } public static function resetVars() { @@ -177,13 +177,13 @@ class BooBoo extends \Exception { if($booboo->fullTrace()) { $log .= "\nStack trace:\n{$exception->getTraceAsString()}"; } - else { + /*else { $trace = $exception->getTrace(); $origin = empty($trace[0]['file']) ? '' : "{$trace[0]['file']}({$trace[0]['line']}): "; $log .= "\nOriginated at: {$origin}{$trace[0]['class']}{$trace[0]['type']}{$trace[0]['function']}()"; - } + }*/ return $log; }
simplified log message and fixed incorrect merge of vars
marcoazn89_booboo
train
php
f823be526d0c2ae05378a6148ec3f3400923b4e4
diff --git a/jetserver/src/test/java/org/menacheri/jetserver/JetlangEventDispatcherTest.java b/jetserver/src/test/java/org/menacheri/jetserver/JetlangEventDispatcherTest.java index <HASH>..<HASH> 100644 --- a/jetserver/src/test/java/org/menacheri/jetserver/JetlangEventDispatcherTest.java +++ b/jetserver/src/test/java/org/menacheri/jetserver/JetlangEventDispatcherTest.java @@ -160,9 +160,6 @@ public class JetlangEventDispatcherTest { // start test gameRoom.disconnectSession(playerSession); - JetlangEventDispatcher playerDispatcher = (JetlangEventDispatcher) playerSession - .getEventDispatcher(); - assertNoListeners(playerDispatcher); JetlangEventDispatcher gameDispatcher = (JetlangEventDispatcher) gameRoomSession .getEventDispatcher(); assertNoListeners(gameDispatcher);
Issue #<I> fix for broken test
menacher_java-game-server
train
java
f06261ac2fdb67a0a912e0ca0bd58dcc7582dddf
diff --git a/lib/forked-actor-parent.js b/lib/forked-actor-parent.js index <HASH>..<HASH> 100644 --- a/lib/forked-actor-parent.js +++ b/lib/forked-actor-parent.js @@ -173,11 +173,12 @@ class ForkedActorParent extends ForkedActor { this.workerProcess.once('exit', () => { delete this.workerProcess; - this._setState('crashed'); // Actor respawn support. if (this.additionalOptions.onCrash == 'respawn' && this.getState() != 'destroying' && this.getState() != 'destroyed') { + this._setState('crashed'); + this.log.warn('Actor ' + this + ' has crashed, respawning...'); this._createForkedWorker()
(saymon) hot-configuration-change: Fixed respawn after intentional destroy.
untu_comedy
train
js
7341f34357f9a1a7214590def5a1624cae32b610
diff --git a/src/main/java/com/gargoylesoftware/css/dom/CSSValueImpl.java b/src/main/java/com/gargoylesoftware/css/dom/CSSValueImpl.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/gargoylesoftware/css/dom/CSSValueImpl.java +++ b/src/main/java/com/gargoylesoftware/css/dom/CSSValueImpl.java @@ -35,10 +35,6 @@ import com.gargoylesoftware.css.util.LangUtils; * <code>CSSPrimitiveValue</code> or a <code>CSSValueList</code> so that * the type can successfully change when using <code>setCssText</code>. * - * TODO: - * Float unit conversions, - * A means of checking valid primitive types for properties - * * @author Ronald Brill */ public class CSSValueImpl extends AbstractLocatable implements Serializable {
get rid of all the w3c dependencies
HtmlUnit_htmlunit-cssparser
train
java
c25e946fb6c23925d7b9ca49f552cfaef441d461
diff --git a/src/artist.py b/src/artist.py index <HASH>..<HASH> 100644 --- a/src/artist.py +++ b/src/artist.py @@ -6,7 +6,7 @@ class Artist(Entity): wraps the artist entity type as described at http://developer.musicmetric.com/timeseries.html all timeseries are attributes of the form self.<type>_<source>, which sets a dict if there's data """ - summary_attrs = ("name", "id", "description", "musicbrainz", "previous_rank", "rank") + summary_attrs = ("name", "id", "description", "previous_rank", "rank") def __init__(self, artistUUID, **kwargs): """ creates an artist instance. UUID required(or equivelant 3rd party id with prefix,
musicbrainz IDs are not returned reliably with the existing call structure
musicmetric_mmpy
train
py
381f5fd062f875669012de068154ef2d15c2cca0
diff --git a/src/main/java/gwt/material/design/client/ui/MaterialDatePicker.java b/src/main/java/gwt/material/design/client/ui/MaterialDatePicker.java index <HASH>..<HASH> 100644 --- a/src/main/java/gwt/material/design/client/ui/MaterialDatePicker.java +++ b/src/main/java/gwt/material/design/client/ui/MaterialDatePicker.java @@ -38,7 +38,7 @@ public class MaterialDatePicker extends FocusPanel{ * Called as soon as a click occurs on the calendar widget. !EXPERIMENTAL! * @param currDate which is currently selected. */ - void onCalendarClick(Date currDate); + void onCalendarClose(Date currDate); } private HTMLPanel panel; @@ -125,7 +125,7 @@ public class MaterialDatePicker extends FocusPanel{ void notifyDelegate() { if(delegate != null) { - delegate.onCalendarClick(getDate()); + delegate.onCalendarClose(getDate()); } }
Renamed delegate method for materialdatepicker from "onCalendarClick" to "onCalendarClose"
GwtMaterialDesign_gwt-material
train
java
452f72839808e804075d18926d1e158fbbc03fe8
diff --git a/parslepy/funcs.py b/parslepy/funcs.py index <HASH>..<HASH> 100644 --- a/parslepy/funcs.py +++ b/parslepy/funcs.py @@ -85,20 +85,22 @@ HTML_BLOCK_ELEMENTS = [ 'video', ] NEWLINE_TEXT_TAGS = ['br', 'hr'] -def format_htmltags_to_newline(tree): +def format_htmlblock_tags(tree, replacement="\n"): return format_alter_htmltags(tree, text_tags=NEWLINE_TEXT_TAGS, tail_tags=HTML_BLOCK_ELEMENTS, - replacement="\n") + replacement=replacement) def elements2text(nodes, with_tail=True): return [extract_text(e, with_tail=with_tail) for e in nodes] -def elements2textnl(nodes, with_tail=True): - return [extract_text(format_htmltags_to_newline(e), - with_tail=with_tail, keep_nl=True) +def elements2textnl(nodes, with_tail=True, replacement="\n"): + return [extract_text( + format_htmlblock_tags(e, replacement=replacement), + with_tail=with_tail, + keep_nl=True) for e in nodes]
Adapt elements2textnl to accept replacement string
redapple_parslepy
train
py
9c5c1d4a7c10f72e05cbed919280b0fa54ab8e40
diff --git a/rest_email_auth/serializers.py b/rest_email_auth/serializers.py index <HASH>..<HASH> 100644 --- a/rest_email_auth/serializers.py +++ b/rest_email_auth/serializers.py @@ -283,9 +283,9 @@ class PasswordResetSerializer(serializers.Serializer): """ Reset the user's password if the provided information is valid. """ - token = models.PasswordResetToken.objects.get( - key=self.validated_data["key"] - ) + token = models.PasswordResetToken.objects.select_related( + "email__user" + ).get(key=self.validated_data["key"]) token.email.user.set_password(self.validated_data["password"]) token.email.user.save()
Fixes #<I>: use select_related in PasswordResetSerializer
cdriehuys_django-rest-email-auth
train
py
2373f226bba89a818378231d42f9adebe2fdfb57
diff --git a/ding0/examples/example_analyze_single_grid_district.py b/ding0/examples/example_analyze_single_grid_district.py index <HASH>..<HASH> 100644 --- a/ding0/examples/example_analyze_single_grid_district.py +++ b/ding0/examples/example_analyze_single_grid_district.py @@ -24,6 +24,7 @@ __url__ = "https://github.com/openego/ding0/blob/master/LICENSE" __author__ = "nesnoj, gplssm" from ding0.tools import results +from pandas import option_context from matplotlib import pyplot as plt base_path = '' @@ -61,7 +62,8 @@ def example_stats(filename, plotpath=''): # print all the calculated stats # this isn't a particularly beautiful format but it is # information rich - print(stats.T) + with option_context('display.max_rows', None, 'display.max_columns', None): + print(stats.T) if __name__ == '__main__':
Fix to ensure the pandas df prints all rows and all columns completely instead of only a sample
openego_ding0
train
py
f1dcfba3d6d75b7fee005687f7d8c21852db1c39
diff --git a/src/Transaction/SepaTransaction.php b/src/Transaction/SepaTransaction.php index <HASH>..<HASH> 100644 --- a/src/Transaction/SepaTransaction.php +++ b/src/Transaction/SepaTransaction.php @@ -113,7 +113,7 @@ class SepaTransaction extends Transaction public function retrievePaymentMethodName($operation = null, $parentTransactionType = null) { - if (Operation::CREDIT === $operation || Operation::CREDIT == $parentTransactionType || + if (Operation::CREDIT === $operation || parent::TYPE_CREDIT == $parentTransactionType || parent::TYPE_PENDING_CREDIT == $parentTransactionType) { return self::CREDIT_TRANSFER; }
#<I>: Correct correlation logic
wirecard_paymentSDK-php
train
php
2d7a5a9d71b91a4f60d949fce908d3765f6de1e9
diff --git a/alot/db/attachment.py b/alot/db/attachment.py index <HASH>..<HASH> 100644 --- a/alot/db/attachment.py +++ b/alot/db/attachment.py @@ -66,14 +66,14 @@ class Attachment(object): if os.path.isdir(path): if filename: basename = os.path.basename(filename) - FILE = open(os.path.join(path, basename), "w") + file_ = open(os.path.join(path, basename), "w") else: - FILE = tempfile.NamedTemporaryFile(delete=False, dir=path) + file_ = tempfile.NamedTemporaryFile(delete=False, dir=path) else: - FILE = open(path, "w") # this throws IOErrors for invalid path - self.write(FILE) - FILE.close() - return FILE.name + file_ = open(path, "w") # this throws IOErrors for invalid path + self.write(file_) + file_.close() + return file_.name def write(self, fhandle): """writes content to a given filehandle"""
db/attachment: replace all caps name with PEP8 like name Using file_ instead of FILE still avoids shadowing the builtin, but also doesn't stand out so much.
pazz_alot
train
py
0d838d54cbf8f9176de8fc57962b33c0f6396181
diff --git a/test/rules/no-setup-in-describe.js b/test/rules/no-setup-in-describe.js index <HASH>..<HASH> 100644 --- a/test/rules/no-setup-in-describe.js +++ b/test/rules/no-setup-in-describe.js @@ -132,6 +132,28 @@ ruleTester.run('no-setup-in-describe', rule, { column: 28 } ] }, { + code: 'describe("", function () { this.a(); });', + errors: [ { + message: 'Unexpected function call in describe block.', + line: 1, + column: 28 + }, { + message: memberExpressionError, + line: 1, + column: 28 + } ] + }, { + code: 'describe("", function () { this["retries"](); });', + errors: [ { + message: 'Unexpected function call in describe block.', + line: 1, + column: 28 + }, { + message: memberExpressionError, + line: 1, + column: 28 + } ] + }, { code: 'foo("", function () { a.b; });', settings: { mocha: {
Test no-setup-in-describe on disallowed and computed member expressions
lo1tuma_eslint-plugin-mocha
train
js
6974971bf15d4d88696892fb1b2645fbb1b9569a
diff --git a/core/src/main/java/io/undertow/server/protocol/http2/Http2ReceiveListener.java b/core/src/main/java/io/undertow/server/protocol/http2/Http2ReceiveListener.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/io/undertow/server/protocol/http2/Http2ReceiveListener.java +++ b/core/src/main/java/io/undertow/server/protocol/http2/Http2ReceiveListener.java @@ -139,7 +139,7 @@ public class Http2ReceiveListener implements ChannelListener<Http2Channel> { connection.setExchange(exchange); dataChannel.setMaxStreamSize(maxEntitySize); exchange.setRequestScheme(exchange.getRequestHeaders().getFirst(SCHEME)); - exchange.setProtocol(Protocols.HTTP_1_1); + exchange.setProtocol(Protocols.HTTP_2_0); exchange.setRequestMethod(Methods.fromString(exchange.getRequestHeaders().getFirst(METHOD))); exchange.getRequestHeaders().put(Headers.HOST, exchange.getRequestHeaders().getFirst(AUTHORITY));
protocol name for http2 should be HTTP/2
undertow-io_undertow
train
java
aa5905ad1eec93a3b351819850e039dba0b77b20
diff --git a/test/messages.js b/test/messages.js index <HASH>..<HASH> 100644 --- a/test/messages.js +++ b/test/messages.js @@ -263,4 +263,27 @@ tape('properly close if destroy called with a open request', function (t) { b.destroy(true) -}) \ No newline at end of file +}) + +tape('destroy sends not more than one message', function (t) { + var a = ps({ + close: function (err) { + t.end() + } + }) + + var msgs = 0 + a.read = function (msg, end) { + if (end) return t.ok(end) + msgs++ + if (msgs > 1) t.fail(msgs) + else t.ok(msg) + } + + var s1 = a.stream() + var s2 = a.stream() + s1.read = function () {} + s2.read = function () {} + + a.destroy(true) +})
Add test: don't send a message per substream on destroy
ssbc_packet-stream
train
js
4ed4a1919a080b90d7c1f765249a91c7f1a9db66
diff --git a/qbit/vertx/src/test/java/io/advantageous/qbit/vertx/http/SupportingGetAndPostForSameServicesUnderSameURI.java b/qbit/vertx/src/test/java/io/advantageous/qbit/vertx/http/SupportingGetAndPostForSameServicesUnderSameURI.java index <HASH>..<HASH> 100644 --- a/qbit/vertx/src/test/java/io/advantageous/qbit/vertx/http/SupportingGetAndPostForSameServicesUnderSameURI.java +++ b/qbit/vertx/src/test/java/io/advantageous/qbit/vertx/http/SupportingGetAndPostForSameServicesUnderSameURI.java @@ -62,7 +62,7 @@ public class SupportingGetAndPostForSameServicesUnderSameURI extends TimedTestin @Test public void testWebSocket() throws Exception { - Sys.sleep(200); + Sys.sleep(1000); clientProxy.ping(s -> { puts(s); @@ -71,6 +71,9 @@ public class SupportingGetAndPostForSameServicesUnderSameURI extends TimedTestin ServiceProxyUtils.flushServiceProxy(clientProxy); + + Sys.sleep(1000); + waitForTrigger(20, o -> this.pongValue.get() != null);
runs local but not in travis
advantageous_qbit
train
java
6c69dec3aba2caf8d6e6547907f12421cde0f502
diff --git a/src/form/Form.php b/src/form/Form.php index <HASH>..<HASH> 100644 --- a/src/form/Form.php +++ b/src/form/Form.php @@ -58,6 +58,7 @@ class Form implements FormInterface { foreach ($this->getFieldBearer()->getVisibleFields() as $name => $field) { if (!$field->isValid()) { $this->_isValid = False; + $this->addError("Please correct the indicated errors and resubmit the form."); break; } }
Add form error when fields have error.
AthensFramework_Core
train
php
437b72bc376a9699dc46196aeec536640ea110a0
diff --git a/lib/player.js b/lib/player.js index <HASH>..<HASH> 100644 --- a/lib/player.js +++ b/lib/player.js @@ -2832,7 +2832,10 @@ shaka.Player.prototype.onChooseStreams_ = function(period) { // Create empty object first and initialize the fields through // [] to allow field names to be expressions. - // TODO: This feedback system for language matches could be cleaned up. + // + // TODO: This feedback system for language matches could be cleaned up. See + // https://github.com/google/shaka-player/issues/1497#issuecomment-406699596 + // for more information. let languageMatches = {}; languageMatches[ContentType.AUDIO] = false; languageMatches[ContentType.TEXT] = false;
Add Context To TODO in Player Added git hub issue number to a TODO in player so that the full context of the TODO is documented. Issue #<I> Change-Id: I1e<I>dd<I>ace<I>d<I>bfcc0b<I>cb<I>fde0
google_shaka-player
train
js
41d635a975b1909210c2ec9c8172d30781a03ec4
diff --git a/ember-cli-build.js b/ember-cli-build.js index <HASH>..<HASH> 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -40,8 +40,11 @@ function buildTSOptions(compilerOptions) { function buildBabelOptions(options) { var externalHelpers = options.shouldExternalizeHelpers || false; + var stripRuntimeChecks = options.stripRuntimeChecks || false; + return { externalHelpers: externalHelpers, + stripRuntimeChecks: stripRuntimeChecks, sourceMaps: 'inline' }; }
Allow consumer to strip runtime checks. When running in glimmer itself, the runtime checks will still be present but when compiling for Ember as part of its build they will be stripped.
glimmerjs_glimmer-vm
train
js
b0490efb38b849d4e1c4455cce722c16ad50f39b
diff --git a/client/fingerprint/cpu.go b/client/fingerprint/cpu.go index <HASH>..<HASH> 100644 --- a/client/fingerprint/cpu.go +++ b/client/fingerprint/cpu.go @@ -50,7 +50,7 @@ func (f *CPUFingerprint) Fingerprint(cfg *config.Config, node *structs.Node) (bo f.logger.Println("[WARN] fingerprint.cpu: Unable to obtain the CPU Mhz") } else { node.Attributes["cpu.frequency"] = fmt.Sprintf("%.6f", mhz) - f.logger.Printf("[DEBUG] fingerprint.cpu: frequency: %02.1fMHz", mhz) + f.logger.Printf("[DEBUG] fingerprint.cpu: frequency: %02.1f MHz", mhz) } var numCores int
In the debug log, split the unit from the measurement awk(1) friendly is UNIX(tm) friendly.
hashicorp_nomad
train
go
7589dee0031df3303bab39e58c295ad421d054d2
diff --git a/rethinkORM/rethinkModel.py b/rethinkORM/rethinkModel.py index <HASH>..<HASH> 100644 --- a/rethinkORM/rethinkModel.py +++ b/rethinkORM/rethinkModel.py @@ -88,7 +88,8 @@ arguments while searching for Documents.""") def _makeNew(self, kwargs): # We assume this is a new object, and that we'll insert it for key in kwargs: - if key not in ["conn", "connection"] or key[0] != "_": + if key not in object.__getattribute__(self, "_protectedItems") \ + or key[0] != "_": self._data[key] = kwargs[key] def _grabData(self, key): @@ -248,7 +249,9 @@ name exists in data""") insert or update. """ if not self._new: - reply = r.table(self.table) \ + data = self._data.copy() + ID = data.pop(self.primaryKey) + reply = r.table(self.table).get(ID) \ .update(self._data, durability=self.durability, non_atomic=self.non_atomic) \
fix bug with updating a record when _data contains the primary key should fix failing tests also remove check from _makeNew for conn and connection thanks to pull request #2
JoshAshby_pyRethinkORM
train
py
65106b824f474e8c6360d14aa1d5d485c6069c2a
diff --git a/lib/genevalidator.rb b/lib/genevalidator.rb index <HASH>..<HASH> 100644 --- a/lib/genevalidator.rb +++ b/lib/genevalidator.rb @@ -45,7 +45,7 @@ module GeneValidator @config[:aux] = File.expand_path(relative_aux_path) @config[:json_hash] = {} @config[:run_no] = 0 - @config[:output_max] = 5000 # max no. of queries in the output file + @config[:output_max] = 2500 # max no. of queries in the output file @overview = {}
change the max queries in a output file to <I>
wurmlab_genevalidator
train
rb
317d413c9050fcf6cd7413dc8389210e676def45
diff --git a/core/src/main/java/io/undertow/server/handlers/error/FileErrorPageHandler.java b/core/src/main/java/io/undertow/server/handlers/error/FileErrorPageHandler.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/io/undertow/server/handlers/error/FileErrorPageHandler.java +++ b/core/src/main/java/io/undertow/server/handlers/error/FileErrorPageHandler.java @@ -101,7 +101,7 @@ public class FileErrorPageHandler implements HttpHandler { exchange.endExchange(); return; } - + exchange.getResponseHeaders().put(Headers.CONTENT_LENGTH, file.length()); final StreamSinkChannel response = exchange.getResponseChannel(); exchange.addExchangeCompleteListener(new ExchangeCompletionListener() { @Override @@ -110,7 +110,6 @@ public class FileErrorPageHandler implements HttpHandler { nextListener.proceed(); } }); - exchange.getResponseHeaders().put(Headers.CONTENT_LENGTH, file.length()); try { log.tracef("Serving file %s (blocking)", fileChannel);
Fix bug in file error page handler
undertow-io_undertow
train
java
e5997dda837b018628d5e3c940dcd40dc8cf652c
diff --git a/tomodachi/helpers/logging.py b/tomodachi/helpers/logging.py index <HASH>..<HASH> 100644 --- a/tomodachi/helpers/logging.py +++ b/tomodachi/helpers/logging.py @@ -3,6 +3,10 @@ from logging.handlers import WatchedFileHandler from typing import Optional, Union, Any +class CustomServiceLogHandler(WatchedFileHandler): + pass + + def log_setup(service: Any, name: Optional[str] = None, level: Optional[Union[str, int]] = None, formatter: Optional[Union[logging.Formatter, str, bool]] = True, filename: Optional[str] = None) -> logging.Logger: if not name: name = 'log.{}'.format(service.name) @@ -15,9 +19,9 @@ def log_setup(service: Any, name: Optional[str] = None, level: Optional[Union[st if level and type(level) is str: level = getattr(logging, str(level)) - if not [x for x in logger.handlers if isinstance(x, WatchedFileHandler) and (level is None or level == x.level)]: + if not [x for x in logger.handlers if isinstance(x, CustomServiceLogHandler) and (level is None or level == x.level)]: try: - wfh = WatchedFileHandler(filename=filename) + wfh = CustomServiceLogHandler(filename=filename) except FileNotFoundError as e: logging.getLogger('logging').warning('Unable to use file for logging - invalid path ("{}")'.format(filename)) raise e
Use custom class extending WatchedFileHandler
kalaspuff_tomodachi
train
py
50a95e46dd843b8e8a80dedf681f25e9fc3e70c8
diff --git a/core/Version.php b/core/Version.php index <HASH>..<HASH> 100644 --- a/core/Version.php +++ b/core/Version.php @@ -21,5 +21,5 @@ final class Version * The current Piwik version. * @var string */ - const VERSION = '2.7.0'; + const VERSION = '2.8.0-b1'; }
<I>-b1 with User Id algorithm update
matomo-org_matomo
train
php
ff1b26b2fa42ebf07c5ee726e656b04d5e8baf2a
diff --git a/ffn/core.py b/ffn/core.py index <HASH>..<HASH> 100644 --- a/ffn/core.py +++ b/ffn/core.py @@ -40,6 +40,11 @@ class PerformanceStats(object): ['mtd', '3m', '6m', 'ytd', '1y', '3y', '5y', '10y', 'incep']) self.lookback_returns.name = self.name + st = self._stats() + self.stats = pd.Series( + [getattr(self, x[0]) for x in st if x[0] is not None], + [x[0] for x in st if x[0] is not None]) + def _calculate(self, obj): # default values self.daily_mean = np.nan @@ -486,6 +491,9 @@ class GroupStats(dict): {x.lookback_returns.name: x.lookback_returns for x in self.values()}) + self.stats = pd.DataFrame( + {x.name: x.stats for x in self.values()}) + def _calculate(self, data): self.prices = data for c in data.columns:
Added stats property to Perf and Group stats
pmorissette_ffn
train
py
9e5513c7034ba3db7405d865e1dcc3daeb6b8d93
diff --git a/sawyer_test.go b/sawyer_test.go index <HASH>..<HASH> 100644 --- a/sawyer_test.go +++ b/sawyer_test.go @@ -2,6 +2,7 @@ package sawyer import ( "github.com/bmizerany/assert" + "github.com/lostisland/go-sawyer/hypermedia" "net/url" "testing" ) @@ -112,3 +113,19 @@ func TestResolveClientRelativeReference(t *testing.T) { assert.Equal(t, "http://github.enterprise.com/api/v3/users", u) } + +func TestResolveClientRelativeHyperlink(t *testing.T) { + client, err := NewFromString("http://github.enterprise.com/api/v3/", nil) + if err != nil { + t.Fatal(err.Error()) + } + link := hypermedia.Hyperlink("repos/{repo}") + expanded, err := link.Expand(hypermedia.M{"repo": "foo"}) + + u, err := client.ResolveReferenceString(expanded.String()) + if err != nil { + t.Fatal(err.Error()) + } + + assert.Equal(t, "http://github.enterprise.com/api/v3/repos/foo", u) +}
Make sure that hypermedia expanded links are composed properly.
lostisland_go-sawyer
train
go
0714f0552a3fa7de32bfdeb72b2db0dc2937f694
diff --git a/examples/angular-demo/app/js/directives/heatMap.js b/examples/angular-demo/app/js/directives/heatMap.js index <HASH>..<HASH> 100644 --- a/examples/angular-demo/app/js/directives/heatMap.js +++ b/examples/angular-demo/app/js/directives/heatMap.js @@ -83,8 +83,6 @@ angular.module('heatMapDirective', []).directive('heatMap', ['ConnectionService' $scope.map.register("moveend", this, onMapEvent); $scope.map.register("zoom", this, onMapEvent); $scope.map.register("zoomend", this, onMapEvent); - $scope.map.register("mouseover", this, onMapEvent); - $scope.map.register("mouseout", this, onMapEvent); // Setup our messenger. $scope.messenger = new neon.eventing.Messenger(); @@ -222,7 +220,11 @@ angular.module('heatMapDirective', []).directive('heatMap', ['ConnectionService' }; var onMapEvent = function (message) { - XDATA.activityLogger.logUserActivity('HeatMap - user interacted with map', message.type, + var type = message.type; + type = type.replace("move", "pan"); + type = type.replace("start", "_start"); + type = type.replace("end", "_end"); + XDATA.activityLogger.logUserActivity('HeatMap - user interacted with map', type, XDATA.activityLogger.WF_EXPLORE); };
Updating log messages to newer recommendations by logging team.
NextCenturyCorporation_neon
train
js
74f9a1dc3240ef6af60204dab46a4507be7c9109
diff --git a/src/Libraries/Blocks/Form.php b/src/Libraries/Blocks/Form.php index <HASH>..<HASH> 100644 --- a/src/Libraries/Blocks/Form.php +++ b/src/Libraries/Blocks/Form.php @@ -62,8 +62,10 @@ class Form extends _Base $form_data = new \stdClass; $form_data->email_from = ''; $form_data->email_to = ''; - $form_data->template = ''; + $form_data->template = 0; $form_data->page_to = ''; + } else { + $form_data->template = $form_data->template == $block->name ? 0 : $form_data->template; } $form_data->captcha_hide = ''; if (!isset($form_data->captcha)) {
hide form template option unless used previously
Web-Feet_coasterframework
train
php
5afed7c849389e787fdba501c0da732c17235347
diff --git a/mapchete/io/raster.py b/mapchete/io/raster.py index <HASH>..<HASH> 100644 --- a/mapchete/io/raster.py +++ b/mapchete/io/raster.py @@ -547,7 +547,7 @@ def resample_from_array( ------- resampled array : array """ - if nodataval is not None: + if nodataval is not None: # pragma: no cover warnings.warn("'nodataval' is deprecated, please use 'nodata'") nodata = nodata or nodataval # TODO rename function
exclude nodataval warning from test coverage
ungarj_mapchete
train
py
8b89f8dfbc51fe39573f7b34df738e19c7e4ef57
diff --git a/rkt/run.go b/rkt/run.go index <HASH>..<HASH> 100644 --- a/rkt/run.go +++ b/rkt/run.go @@ -88,11 +88,6 @@ func init() { } func runRun(args []string) (exit int) { - if flagInteractive && len(args) > 1 { - stderr("run: interactive option only supports one image") - return 1 - } - if len(flagPorts) > 0 && !flagPrivateNet { stderr("--port flag requires --private-net") return 1 @@ -114,6 +109,11 @@ func runRun(args []string) (exit int) { return 1 } + if flagInteractive && rktApps.Count() > 1 { + stderr("run: interactive option only supports one image") + return 1 + } + if rktApps.Count() < 1 { stderr("run: must provide at least one image") return 1
rkt: bug fix: -interactive doesnt work with args rkt complains with "run: interactive option only supports one image" when trying to execute an image in interactive mode with arguments
rkt_rkt
train
go
de4a865fb8003cf83a367238c25f929ff01d0854
diff --git a/security/PasswordEncryptor.php b/security/PasswordEncryptor.php index <HASH>..<HASH> 100644 --- a/security/PasswordEncryptor.php +++ b/security/PasswordEncryptor.php @@ -134,12 +134,11 @@ class PasswordEncryptor_Blowfish extends PasswordEncryptor { protected static $cost = 10; function encrypt($password, $salt = null, $member = null) { - // We use $2y$ here instead of $2a$ - in PHP < 5.3.7, passwords - // with non-ascii characters will use a flawed version of the blowfish - // algorithm when specified with $2a$. $2y$ specifies non-flawed version - // in all cases. - // See https://bugs.php.net/bug.php?id=55477&edit=1 - $method_and_salt = '$2y$' . $salt; + // Although $2a$ has flaws in PHP < 5.3.7 with certain non-unicode passwords, + // $2y$ doesn't exist at all. We use $2a$ across the board. Note that this will + // mean that a password generated on PHP < 5.3.7 will fail if PHP gets upgraded to >= 5.3.7 + // See http://open.silverstripe.org/ticket/7276 and https://bugs.php.net/bug.php?id=55477 + $method_and_salt = '$2a$' . $salt; $encrypted_password = crypt($password, $method_and_salt); // We *never* want to generate blank passwords. If something // goes wrong, throw an exception.
BUGFIX: Fixed blowfish encryption for PHP < <I> (#<I>)
silverstripe_silverstripe-framework
train
php
a1500bfe0a1e12e5691edd9bca91726cba635016
diff --git a/andes/core/documenter.py b/andes/core/documenter.py index <HASH>..<HASH> 100644 --- a/andes/core/documenter.py +++ b/andes/core/documenter.py @@ -388,7 +388,6 @@ class Documenter: if export == 'rest': out += model_header + f'{self.class_name}\n' + model_header - out += f'\nIn Group {self.parent.group}_\n\n' else: out += model_header + f'Model <{self.class_name}> in Group <{self.parent.group}>\n' + model_header
Remove "In Group" from rst docs.
cuihantao_andes
train
py
ce24faa52c3e374cfb3a31a6c1ae13a468252e33
diff --git a/bin/simulate.py b/bin/simulate.py index <HASH>..<HASH> 100755 --- a/bin/simulate.py +++ b/bin/simulate.py @@ -21,7 +21,7 @@ from gnomon import Configuration from gnomon import EventAction from gnomon import GeneratorAction from gnomon import TrackingAction -from gnomon.DetectorConstruction import VlenfDetectorConstruction +from gnomon.DetectorConstruction import MagIronSamplingCaloDetectorConstruction from gnomon.Configuration import RUNTIME_CONFIG as rc from gnomon import Logging @@ -69,7 +69,7 @@ if __name__ == "__main__": log.info('Using seed %d', seed) HepRandom.setTheSeed(seed) - detector = VlenfDetectorConstruction(field_polarity=config['polarity']) + detector = MagIronSamplingCaloDetectorConstruction(field_polarity=config['polarity']) gRunManager.SetUserInitialization(detector) physics_list = G4.G4physicslists.QGSP_BERT()
BUG: MagIronSamplingCaloDetectorConstruction was miscalled in simulate.py
nuSTORM_gnomon
train
py
e5fdda9df945ea423f283dd604c81d42dd7d895a
diff --git a/core-bundle/src/Resources/contao/controllers/BackendInstall.php b/core-bundle/src/Resources/contao/controllers/BackendInstall.php index <HASH>..<HASH> 100644 --- a/core-bundle/src/Resources/contao/controllers/BackendInstall.php +++ b/core-bundle/src/Resources/contao/controllers/BackendInstall.php @@ -351,7 +351,7 @@ class BackendInstall extends \Backend else { list($strPassword, $strSalt) = explode(':', \Config::get('installPassword')); - $blnAuthenticated = ($strSalt == '') ? ($strPassword == sha1(\Input::postUnsafeRaw('password'))) : ($strPassword == sha1($strSalt . \Input::postUnsafeRaw('password'))); + $blnAuthenticated = ($strSalt == '') ? ($strPassword === sha1(\Input::postUnsafeRaw('password'))) : ($strPassword === sha1($strSalt . \Input::postUnsafeRaw('password'))); if ($blnAuthenticated) {
[Core] Re-apply the password comparison fix to the install tool
contao_contao
train
php
169d0f087b1d551567e2a0211749ada67b15a319
diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/custom/persistence/CustomMeasureTesting.java b/server/sonar-server/src/test/java/org/sonar/server/measure/custom/persistence/CustomMeasureTesting.java index <HASH>..<HASH> 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/measure/custom/persistence/CustomMeasureTesting.java +++ b/server/sonar-server/src/test/java/org/sonar/server/measure/custom/persistence/CustomMeasureTesting.java @@ -38,7 +38,7 @@ public class CustomMeasureTesting { .setValue(RandomUtils.nextDouble()) .setMetricId(RandomUtils.nextInt()) .setComponentId(RandomUtils.nextInt()) - .setComponentUuid(RandomStringUtils.random(50)) + .setComponentUuid(RandomStringUtils.randomAlphanumeric(50)) .setCreatedAt(System2.INSTANCE.now()) .setUpdatedAt(System2.INSTANCE.now()); }
fix CustomMeasureTesting to generate alpha numeric characters only
SonarSource_sonarqube
train
java
8d56e216543cd49778d56be6e87f583f18ca3e14
diff --git a/cli.js b/cli.js index <HASH>..<HASH> 100644 --- a/cli.js +++ b/cli.js @@ -135,9 +135,10 @@ var cli = function(options) { // Run files through StyleDocco parser var htmlFiles = files.map(function(file) { + var css = fs.readFileSync(file, 'utf-8'); return { path: file, - html: render(file, styledocco.sync(file)) + html: render(file, styledocco(css)) }; }); diff --git a/styledocco.js b/styledocco.js index <HASH>..<HASH> 100644 --- a/styledocco.js +++ b/styledocco.js @@ -132,10 +132,8 @@ var makeSections = exports.makeSections = function(blocks) { }); }; -var parser = function(css) { +module.exports = function(css) { return makeSections(separate(css)); }; - -module.exports = parser; module.exports.makeSections = makeSections; module.exports.separate = separate;
The StyleDocco parser no longer reads the file, do that in cli.js
jacobrask_styledocco
train
js,js
8dd507e01e320855969b3ab0eeffd145b3ba896e
diff --git a/src/main/java/water/PersistIce.java b/src/main/java/water/PersistIce.java index <HASH>..<HASH> 100644 --- a/src/main/java/water/PersistIce.java +++ b/src/main/java/water/PersistIce.java @@ -142,7 +142,6 @@ public abstract class PersistIce { } i++; // Skip the trailing '%' } - // a normal key - ASCII with special characters encoded after % sign for( ; i < key.length(); ++i ) { byte b = (byte)key.charAt(i); @@ -158,10 +157,9 @@ public abstract class PersistIce { default: System.err.println("Invalid format of filename " + s + " at index " + i); } } - kb[j++] = b; if( j>=kb.length ) kb = Arrays.copyOf(kb,j*2); + kb[j++] = b; } - // now in kb we have the key name return Key.make(Arrays.copyOf(kb,j)); }
PersistIce bug fix. Key shorter than 3 characters would throw AIOB exception. Just swapped the lines which modify/grow the underlying array.
h2oai_h2o-2
train
java
37faf87b2fd629186b13d0b6411bcfe91905f979
diff --git a/tests/test_baselens.py b/tests/test_baselens.py index <HASH>..<HASH> 100644 --- a/tests/test_baselens.py +++ b/tests/test_baselens.py @@ -124,11 +124,12 @@ def test_type_custom_class_immutable(): lens(C(9)).a.set(7) -# Tests to make sure types that are not supported by lenses return the -# right kinds of errors -def test_type_unsupported_no_setter(): +def test_type_unsupported_no_setitem(): with pytest.raises(TypeError): lens(object())[0].set(None) + + +def test_type_unsupported_no_setattr(): with pytest.raises(AttributeError): lens(object()).attr.set(None)
split tests for unsupported setitem and setattr
ingolemo_python-lenses
train
py
b3dc1067a031369ac1d97359ab63684a0e12eb22
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ setup( "Development Status :: 4 - Beta", "Environment :: Console", "Topic :: Utilities", - "License :: OSI Approved :: GNU General Public License (GPLv3)", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python", ], )
fixed license string to be compatible with pypi
mailund_statusbar
train
py
b0437d17c8729e9b9ff4ee4f87d305b84616c17c
diff --git a/spec/factories/medication.rb b/spec/factories/medication.rb index <HASH>..<HASH> 100644 --- a/spec/factories/medication.rb +++ b/spec/factories/medication.rb @@ -1,7 +1,7 @@ FactoryGirl.define do factory :medication, class: "Renalware::Medication" do |medication| patient - association :medicatable, factory: :drug + drug treatable_id nil treatable_type nil dose "20mg"
Updated medication factory - removed polymorphic 'medicatable' with 'drug'.
airslie_renalware-core
train
rb
b36ba1916938ace698bedd72222f1d4c366081cc
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- #!/usr/bin/env python from setuptools import setup, find_packages from io import open
setup.py: utf-8 source code encoding
fonttools_ufoLib2
train
py
44c1509848a907fd0453be1cba250f27d42e3cbe
diff --git a/lib/opal/nodes/definitions.rb b/lib/opal/nodes/definitions.rb index <HASH>..<HASH> 100644 --- a/lib/opal/nodes/definitions.rb +++ b/lib/opal/nodes/definitions.rb @@ -31,6 +31,8 @@ module Opal push '$alias_gvar(', new_name_str, ', ', old_name_str, ')' when :dsym, :sym # This is a method alias: alias a b helper :alias + compiler.record_method_call old_name.children.last if old_name.type == :sym + push "$alias(#{scope.self}, ", expr(new_name), ', ', expr(old_name), ')' else # Nothing else is available, but just in case, drop an error error "Opal doesn't know yet how to alias with #{new_name.type}"
Consider alias use as method calls on the "old name"
opal_opal
train
rb
8ec8569068bcbbabc29025d84f482e753b441cea
diff --git a/lib/qu/payload.rb b/lib/qu/payload.rb index <HASH>..<HASH> 100644 --- a/lib/qu/payload.rb +++ b/lib/qu/payload.rb @@ -51,8 +51,12 @@ module Qu end end - def to_s - "#{id}:#{klass}:#{args.inspect}" + # Internal: Pushes payload to backend. + def push + instrument("push.#{InstrumentationNamespace}") do |payload| + payload[:payload] = self + job.run_hook(:push) { Qu.backend.push(self) } + end end def attributes @@ -63,12 +67,8 @@ module Qu } end - # Internal: Pushes payload to backend. - def push - instrument("push.#{InstrumentationNamespace}") do |payload| - payload[:payload] = self - job.run_hook(:push) { Qu.backend.push(self) } - end + def to_s + "#{id}:#{klass}:#{args.inspect}" end private
Reorder payload methods a bit.
bkeepers_qu
train
rb
b88f0a21d653129328ef07e6b2916d4f7b1c4d70
diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index <HASH>..<HASH> 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -29,10 +29,10 @@ module Jekyll Jekyll.sites << self - Jekyll::Hooks.trigger :site, :after_init, self - reset setup + + Jekyll::Hooks.trigger :site, :after_init, self end # Public: Set the site's configuration. This handles side-effects caused by
hooks: move after_init hook call at the end of Site.initialize
jekyll_jekyll
train
rb
a909c977c79265631fb5620cc730ef2129b70d10
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ requirements = [ ] deps_links = [ - 'git+ssh://[email protected]/francbartoli/[email protected]#egg=marshmallow-oneofschema-1.0.6' + 'git+https://github.com/francbartoli/[email protected]#egg=marshmallow-oneofschema-1.0.6' ] setup_requirements = [
Revert link to git+https
francbartoli_marmee
train
py
a4905f549aa41a21a4cf1a1c00c5ca736c043bda
diff --git a/geomdl/multi.py b/geomdl/multi.py index <HASH>..<HASH> 100644 --- a/geomdl/multi.py +++ b/geomdl/multi.py @@ -951,7 +951,7 @@ def select_color(cpcolor, evalcolor, idx=0): return color -def process_tessellate(elem, **kwargs): +def process_tessellate(elem, update_delta, delta, **kwargs): """ Tessellates surfaces. .. note:: Helper function required for ``multiprocessing``
Forgot to commit the updated function along with the prev commit
orbingol_NURBS-Python
train
py