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
278e2cbc9e7138623a792e5e6aa2d02ce97e75b0
diff --git a/abstract.js b/abstract.js index <HASH>..<HASH> 100644 --- a/abstract.js +++ b/abstract.js @@ -120,8 +120,7 @@ function abstractPersistence (opts) { testInstance('store multiple retained messages in order', function (t, instance) { var totalMessages = 1000 - - t.plan(totalMessages * 2) + var done = 0 var retained = { cmd: 'publish', @@ -137,6 +136,9 @@ function abstractPersistence (opts) { instance.storeRetained(packet, function (err) { t.notOk(err, 'no error') t.equal(packet.brokerCounter, index + 1, 'packet stored in order') + if (++done === totalMessages) { + instance.destroy(t.end.bind(t)) + } }) } @@ -921,7 +923,7 @@ function abstractPersistence (opts) { t.deepEqual(queue[0], updated1) t.deepEqual(queue[1], updated2) } - t.end() + instance.destroy(t.end.bind(t)) }) }) })
Added missing instance destroy to fix tests on cached persistences (#<I>)
mcollina_aedes-persistence
train
js
53a8b23312af8600ef4570f033407c7b7ccd62ea
diff --git a/lib/ruby-lint/runner.rb b/lib/ruby-lint/runner.rb index <HASH>..<HASH> 100644 --- a/lib/ruby-lint/runner.rb +++ b/lib/ruby-lint/runner.rb @@ -112,7 +112,7 @@ module RubyLint # def report_diagnostic(diagnostic, report) report.add( - :level => :error, + :level => :warning, :message => diagnostic.message, :line => diagnostic.location.line, :column => diagnostic.location.column + 1,
Emit parser diagnostics as warnings.
YorickPeterse_ruby-lint
train
rb
141c8cfadea6268f8487fb2b8446c37b26de09e2
diff --git a/src/NewCommand.php b/src/NewCommand.php index <HASH>..<HASH> 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -30,7 +30,8 @@ class NewCommand extends \Symfony\Component\Console\Command\Command { protected function execute(InputInterface $input, OutputInterface $output) { $this->verifyApplicationDoesntExist( - $directory = getcwd().'/'.$input->getArgument('name') + $directory = getcwd().'/'.$input->getArgument('name'), + $output ); $output->writeln('<info>Crafting application...</info>'); @@ -48,7 +49,7 @@ class NewCommand extends \Symfony\Component\Console\Command\Command { * @param string $directory * @return void */ - protected function verifyApplicationDoesntExist($directory) + protected function verifyApplicationDoesntExist($directory, OutputInterface $output) { if (is_dir($directory)) {
Fix exception in verifyApplicationDoesntExist. Previously the OutputInterface was not being passed to this method which resulted in it throwing an "Undefined variable" exception.
laravel_installer
train
php
c441baf16bc0b61e6614b9b0eabe7dcbb3117a1d
diff --git a/cmd/pulsectl/flags.go b/cmd/pulsectl/flags.go index <HASH>..<HASH> 100644 --- a/cmd/pulsectl/flags.go +++ b/cmd/pulsectl/flags.go @@ -77,7 +77,7 @@ var ( Usage: "The amount of time to run the task [appends to start or creates a start time before a stop]", } flTaskSchedNoStart = cli.BoolFlag{ - Name: "--no-start", + Name: "no-start", Usage: "Do not start task on creation [normally started on creation]", }
Remove -- from no-start flag in order for it to work properly
intelsdi-x_snap
train
go
f772a645a8d83de9a8c665039e9e179e6c6ceaf1
diff --git a/pylas/point/dims.py b/pylas/point/dims.py index <HASH>..<HASH> 100644 --- a/pylas/point/dims.py +++ b/pylas/point/dims.py @@ -550,9 +550,19 @@ class ScaledArrayView: return self.scaled_array() def __array_function__(self, func, types, args, kwargs): - args = tuple( - arg.array if isinstance(arg, ScaledArrayView) else arg for arg in args - ) + converted_args = [] + for arg in args: + if isinstance(arg, (tuple, list)): + top_level_args = [] + converted_args.append(top_level_args) + else: + top_level_args = converted_args + arg = [arg] + top_level_args.extend( + a.array if isinstance(a, ScaledArrayView) else a for a in arg + ) + + args = converted_args ret = func(*args, **kwargs) if ret is not None: if isinstance(ret, np.ndarray) and ret.dtype != np.bool:
ScaledArray.__array_function__ handle args which are tuple or list
tmontaigu_pylas
train
py
564be22f796420f576cd3b08fbf6f2ffa8adb1b0
diff --git a/nomad/structs/structs_test.go b/nomad/structs/structs_test.go index <HASH>..<HASH> 100644 --- a/nomad/structs/structs_test.go +++ b/nomad/structs/structs_test.go @@ -278,6 +278,12 @@ func TestJob_SpecChanged(t *testing.T) { Original: base, New: change, }, + { + Name: "With Constraints", + Changed: false, + Original: &Job{Constraints: []*Constraint{{"A", "B", "="}}}, + New: &Job{Constraints: []*Constraint{{"A", "B", "="}}}, + }, } for _, c := range cases {
core: add spec changed test with constriants
hashicorp_nomad
train
go
7a1313192abd95ce0240f8647fa50211a1f210fe
diff --git a/lib/utils/to-id.js b/lib/utils/to-id.js index <HASH>..<HASH> 100644 --- a/lib/utils/to-id.js +++ b/lib/utils/to-id.js @@ -10,5 +10,9 @@ module.exports = docOrIdToId */ function docOrIdToId (docOrId) { - return typeof docOrId === 'object' ? docOrId._id : docOrId + if (typeof docOrId === 'object') { + return docOrId._id || docOrId.id + } + + return docOrId }
fix(sync): sync objects with .id property
hoodiehq_pouchdb-hoodie-sync
train
js
0d1c39ad2d1e8344af413041b3bb6834d1b56778
diff --git a/airflow/cli/commands/db_command.py b/airflow/cli/commands/db_command.py index <HASH>..<HASH> 100644 --- a/airflow/cli/commands/db_command.py +++ b/airflow/cli/commands/db_command.py @@ -75,7 +75,7 @@ def shell(args): f.flush() execute_interactive(["mysql", f"--defaults-extra-file={f.name}"]) elif url.get_backend_name() == 'sqlite': - execute_interactive(["sqlite3", url.database]).wait() + execute_interactive(["sqlite3", url.database]) elif url.get_backend_name() == 'postgresql': env = os.environ.copy() env['PGHOST'] = url.host or ""
Fix db shell for sqlite (#<I>) closes: #<I>
apache_airflow
train
py
952eb71724522f4127504863e6a3b3e4393135b1
diff --git a/salt/modules/cmdmod.py b/salt/modules/cmdmod.py index <HASH>..<HASH> 100644 --- a/salt/modules/cmdmod.py +++ b/salt/modules/cmdmod.py @@ -433,6 +433,20 @@ def _run( if isinstance(cmd, (list, tuple)): cmd = " ".join(map(_cmd_quote, cmd)) + # Ensure directory is correct before running command + cmd = "cd -- {dir} && {{ {cmd}; }}".format(dir=_cmd_quote(cwd), cmd=cmd) + + # Ensure environment is correct for a newly logged-in user by running + # the command under bash as a login shell + try: + user_shell = __salt__["user.info"](runas)["shell"] + if re.search("bash$", user_shell): + cmd = "{shell} -l -c {cmd}".format( + shell=user_shell, cmd=_cmd_quote(cmd) + ) + except KeyError: + pass + # Ensure the login is simulated correctly (note: su runs sh, not bash, # which causes the environment to be initialised incorrectly, which is # fixed by the previous line of code)
Adding needed code to ensure cmd tests are passing.
saltstack_salt
train
py
7fc3b4341587df664763a0779ce845784177a4ca
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -261,8 +261,6 @@ gulp.task( 'clean-vendor-assets', function() { paths.dev + '/sass/underscores', paths.dev + '/js/skip-link-focus-fix.js', paths.js + '/**/skip-link-focus-fix.js', - paths.js + '/**/popper.min.js', - paths.js + '/**/popper.js', paths.js + paths.vendor, ] ); } ); @@ -306,15 +304,6 @@ gulp.task( ) .pipe( replace( - '/js/popper.min.js', - '/js' + paths.vendor + '/popper.min.js', - { - skipBinary: true, - } - ) - ) - .pipe( - replace( '/js/skip-link-focus-fix.js', '/js' + paths.vendor + '/skip-link-focus-fix.js', { skipBinary: true }
Remove popper.js relic popper.js and popper.min.js have been removed in <I>.
understrap_understrap
train
js
77e37c4de823cf9851889c5df5898dcbf17d5855
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -327,9 +327,10 @@ exports['Basic Query by Member'] = function(t) { exports['Basic Query by Null Member'] = function(t) { - t.expect(3); + t.expect(4); geo.nearby('non-existent', 50000, function(err, replies) { + t.equal(err.message, 'ERR could not decode requested zset member'); t.equal((err === null), false); t.equal(Array.isArray(replies), false); t.equal(replies, null); diff --git a/test/testNative.js b/test/testNative.js index <HASH>..<HASH> 100644 --- a/test/testNative.js +++ b/test/testNative.js @@ -329,11 +329,10 @@ exports['Basic Query by Member'] = function(t) { exports['Basic Query by Null Member'] = function(t) { - t.expect(3); + t.expect(4); geo.nearby('non-existent', 50000, function(err, replies) { - - console.log('NATIVE non-existent', err, replies); + t.equal(err.message, 'ERR could not decode requested zset member'); t.equal((err === null), false); t.equal(Array.isArray(replies), false); t.equal(replies, null);
Updating tests for non-existent members.
arjunmehta_node-georedis
train
js,js
5bfec9c679843216979283eb13895e4eb5d4d16c
diff --git a/src/front-door/azext_front_door/_help.py b/src/front-door/azext_front_door/_help.py index <HASH>..<HASH> 100644 --- a/src/front-door/azext_front_door/_help.py +++ b/src/front-door/azext_front_door/_help.py @@ -10,7 +10,7 @@ from azext_front_door.vendored_sdks.models import MatchVariable, Operator # region FrontDoor helps['network front-door'] = """ type: group - short-summary: Manage Front Doors. + short-summary: Manage Classical Azure Front Doors. For managing Azure Front Door Standard/Premium, please refer https://docs.microsoft.com/en-us/cli/azure/afd?view=azure-cli-latest. """ helps['network front-door create'] = """
{AzureFrontDoor} Fix #<I>: Update documents (#<I>)
Azure_azure-cli-extensions
train
py
522e82b7b704d39f52252c3dab2df8767879f230
diff --git a/pre_commit/languages/python.py b/pre_commit/languages/python.py index <HASH>..<HASH> 100644 --- a/pre_commit/languages/python.py +++ b/pre_commit/languages/python.py @@ -182,8 +182,8 @@ def py_interface( version: str, additional_dependencies: Sequence[str], ) -> None: - additional_dependencies = tuple(additional_dependencies) directory = helpers.environment_dir(_dir, version) + install = ('python', '-mpip', 'install', '.', *additional_dependencies) env_dir = prefix.path(directory) with clean_path_on_failure(env_dir): @@ -193,9 +193,7 @@ def py_interface( python = os.path.realpath(sys.executable) _make_venv(env_dir, python) with in_env(prefix, version): - helpers.run_setup_cmd( - prefix, ('pip', 'install', '.') + additional_dependencies, - ) + helpers.run_setup_cmd(prefix, install) return in_env, healthy, run_hook, install_environment
Allow pip to be upgradable on windows
pre-commit_pre-commit
train
py
5bbba9bdbbe280c6307e003ffbd17ef42c402af4
diff --git a/contact_form/views.py b/contact_form/views.py index <HASH>..<HASH> 100644 --- a/contact_form/views.py +++ b/contact_form/views.py @@ -34,8 +34,9 @@ class ContactFormView(FormView): # undesirable for performance reasons. # # Manually implementing this method, and passing the form - # instance to get_context_data(), solves this issue (which - # will be fixed in Django 1.9.1 and Django 1.10). + # instance to get_context_data(), solves this issue (which was + # fixed in Django 1.9.1 and will not be present in Django + # 1.10). return self.render_to_response(self.get_context_data(form=form)) def get_form_kwargs(self):
form_invalid() bug was fixed in <I>, note that.
ubernostrum_django-contact-form
train
py
2cf41afac3a3f7a772fa70e15187718699656bff
diff --git a/src/babel/transformation/transformers/minification/inline-expressions.js b/src/babel/transformation/transformers/minification/inline-expressions.js index <HASH>..<HASH> 100644 --- a/src/babel/transformation/transformers/minification/inline-expressions.js +++ b/src/babel/transformation/transformers/minification/inline-expressions.js @@ -5,10 +5,12 @@ export var metadata = { group: "builtin-setup" }; -export function Expression(node, parent, scope) { - var res = this.evaluate(); - if (res.confident) return t.valueToNode(res.value); -} +export var Expression = { + exit(node, parent, scope) { + var res = this.evaluate(); + if (res.confident) return t.valueToNode(res.value); + } +}; export function Identifier() { // override Expression
move expression inlining to exit rather than enter in minification.inlineExpressions transformer
babel_babel
train
js
d2992235b884b97b759b91d9d6f64e408e120498
diff --git a/tests/phpunit/includes/testcase.php b/tests/phpunit/includes/testcase.php index <HASH>..<HASH> 100644 --- a/tests/phpunit/includes/testcase.php +++ b/tests/phpunit/includes/testcase.php @@ -870,7 +870,14 @@ class Pods_UnitTestCase extends \WP_UnitTestCase { self::$related_items[ 'author' ] = self::$related_items[ 'test_rel_user' ]; } + + /** + * {@inheritdoc} + */ + public static function tearDownAfterClass() { + // Force WP_UnitTestCase to not delete all data + } } Pods_UnitTestCase::_initialize_config(); -Pods_UnitTestCase::_initialize_data(); +Pods_UnitTestCase::_initialize_data(); \ No newline at end of file
Add tearDownAfterClass override method Add tearDownAfterClass override method to stop WP_UnitTestCase from deleting all data #<I>
pods-framework_pods
train
php
de38dda2b8bd8074b9a0c95b13d18e8e4a21f8fb
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -37,6 +37,10 @@ setup( 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ],
Add trove classifier to convey Python 3 support (#6) * Add trove classifier to convey Python 3 support * Add trove classifiers to match the one of django-recaptcha
springload_wagtail-django-recaptcha
train
py
abac6037349c7b724f09bfe63fc2b7639a010326
diff --git a/examples/message_create.py b/examples/message_create.py index <HASH>..<HASH> 100644 --- a/examples/message_create.py +++ b/examples/message_create.py @@ -31,7 +31,7 @@ try: print(' scheduledDatetime : %s' % msg.scheduledDatetime) print(' createdDatetime : %s' % msg.createdDatetime) print(' recipients : %s\n' % msg.recipients) - print + print() except messagebird.client.ErrorException as e: print('\nAn error occured while requesting a Message object:\n')
Update print to function in example Update print to function in `examples/message_create.py`. The `print` statement becomes the `print()` function in Python 3.
messagebird_python-rest-api
train
py
d10ae1dcb63432205af2539eef01ede1b0fd345d
diff --git a/workflow/workflow.py b/workflow/workflow.py index <HASH>..<HASH> 100644 --- a/workflow/workflow.py +++ b/workflow/workflow.py @@ -227,6 +227,7 @@ class Workflow(Printable): if not sources or len(sources) != 1: raise FactorDefinitionError("Aggregate tools require a single source node") + # TODO: Actually - it should be fine if the plates are all shared, except for the aggregation plate if not sources[0].plate_ids or len(sources[0].plate_ids) != 1: raise FactorDefinitionError("Aggregate tools require source node to live on a single plate")
beginning work on train/test splits
IRC-SPHERE_HyperStream
train
py
ceccfb4a82679c3091bebcbebdf4ac5d6b0f2507
diff --git a/lib/cldr/export/data/lists.rb b/lib/cldr/export/data/lists.rb index <HASH>..<HASH> 100644 --- a/lib/cldr/export/data/lists.rb +++ b/lib/cldr/export/data/lists.rb @@ -1,5 +1,3 @@ -require 'pry-nav' - module Cldr module Export module Data
Removing call to binding.pry
ruby-i18n_ruby-cldr
train
rb
ef144482ba24d806eb4661cc5807153e2dc872dc
diff --git a/pipenv/utils.py b/pipenv/utils.py index <HASH>..<HASH> 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -869,6 +869,16 @@ def is_installable_file(path): path = urlparse(path['file']).path if 'file' in path else path['path'] if not isinstance(path, six.string_types) or path == '*': return False + # If the string starts with a valid specifier operator, test if it is a valid + # specifier set before making a path object (to avoid breakng windows) + if any(path.startswith(spec) for spec in '!=<>'): + try: + pip.utils.packaging.specifiers.SpecifierSet(path) + # If this is not a valid specifier, just move on and try it as a path + except pip.utils.packaging.specifiers.InvalidSpecifier: + pass + else: + return False lookup_path = Path(path) return lookup_path.is_file() or (lookup_path.is_dir() and pip.utils.is_installable_dir(lookup_path.resolve().as_posix()))
Add a check to see if entries are valid specifiers - Should fix windows parsing of pipfiles - I had this fix implemented somewhere before but I think I 'cleaned' it out for some reason
pypa_pipenv
train
py
ec0633c1d5ad4262ddff27c13b608130b06737e1
diff --git a/dtool_azure/__init__.py b/dtool_azure/__init__.py index <HASH>..<HASH> 100644 --- a/dtool_azure/__init__.py +++ b/dtool_azure/__init__.py @@ -2,6 +2,6 @@ import logging -__version__ = "0.4.0" +__version__ = "0.5.0" logger = logging.getLogger(__name__) diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup url = "https://github.com/jic-dtool/dtool-azure" -version = "0.4.0" +version = "0.5.0" readme = open('README.rst').read() setup(
Update version number to <I>
jic-dtool_dtool-azure
train
py,py
5146f05b33ca4dfe00ae605a078fdebf932c6a26
diff --git a/libnetwork/drivers/remote/driver.go b/libnetwork/drivers/remote/driver.go index <HASH>..<HASH> 100644 --- a/libnetwork/drivers/remote/driver.go +++ b/libnetwork/drivers/remote/driver.go @@ -294,7 +294,7 @@ func (d *driver) Type() string { // DiscoverNew is a notification for a new discovery event, such as a new node joining a cluster func (d *driver) DiscoverNew(dType discoverapi.DiscoveryType, data interface{}) error { if dType != discoverapi.NodeDiscovery { - return fmt.Errorf("Unknown discovery type : %v", dType) + return nil } notif := &api.DiscoveryNotification{ DiscoveryType: dType, @@ -306,7 +306,7 @@ func (d *driver) DiscoverNew(dType discoverapi.DiscoveryType, data interface{}) // DiscoverDelete is a notification for a discovery delete event, such as a node leaving a cluster func (d *driver) DiscoverDelete(dType discoverapi.DiscoveryType, data interface{}) error { if dType != discoverapi.NodeDiscovery { - return fmt.Errorf("Unknown discovery type : %v", dType) + return nil } notif := &api.DiscoveryNotification{ DiscoveryType: dType,
Do not error on non discovery type messages in remote driver
moby_moby
train
go
3370e6edf5e0e7c7a8cf22e4a7a5decc24c45205
diff --git a/core/src/main/java/hudson/matrix/MatrixProject.java b/core/src/main/java/hudson/matrix/MatrixProject.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/hudson/matrix/MatrixProject.java +++ b/core/src/main/java/hudson/matrix/MatrixProject.java @@ -666,6 +666,9 @@ public class MatrixProject extends AbstractProject<MatrixProject,MatrixBuild> im } public MatrixConfiguration getItem(Combination c) { + if (configurations == null) { + return null; + } return configurations.get(c); }
[FIXED JENKINS-<I>] Hotfix for regression in matrix project loading from <I>f5.
jenkinsci_jenkins
train
java
5ddeb42b8abd7ea507326c20091ae4474d955d2e
diff --git a/src/main/java/com/github/davidcarboni/cryptolite/Random.java b/src/main/java/com/github/davidcarboni/cryptolite/Random.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/github/davidcarboni/cryptolite/Random.java +++ b/src/main/java/com/github/davidcarboni/cryptolite/Random.java @@ -105,7 +105,8 @@ public class Random { @Override public int read() throws IOException { if (count++ < length) { - return Byte.toUnsignedInt(bytes(1)[0]); + return ((int) bytes(1)[0]) & 0xff; + // For Java 8: return Byte.toUnsignedInt(bytes(1)[0]); } else { return -1; }
Tweaked to work with a Java 7 compiler.
davidcarboni_cryptolite-java
train
java
4c2bfe4fa16e2fdca974fe3abe8890313bc00500
diff --git a/tests/index.js b/tests/index.js index <HASH>..<HASH> 100644 --- a/tests/index.js +++ b/tests/index.js @@ -21,8 +21,8 @@ describe('all rule files should be exported by the plugin', () => { }); }); -describe('configurations', function() { - it('should export a \'recommended\' configuration', function() { +describe('configurations', () => { + it('should export a \'recommended\' configuration', () => { assert(plugin.configs.recommended); }); });
Fix test to pass lint.
evcohen_eslint-plugin-jsx-a11y
train
js
0e4879802107362feb475e815c21304187b60447
diff --git a/lib/doc/jsdoc-template/publish.js b/lib/doc/jsdoc-template/publish.js index <HASH>..<HASH> 100644 --- a/lib/doc/jsdoc-template/publish.js +++ b/lib/doc/jsdoc-template/publish.js @@ -20,7 +20,7 @@ var unprefix = R.pipe( var trimCode = R.pipe( R.split(/\n/), - R.map(R.trim), + R.map(R.replace(/^[ ]{5}/, '')), R.join('\n') );
docs: fix indent 5 is a magic number for the amount of indent ramda has in its examples @example R.F(); //=> false └─5─┘ publish: change \s to character group with space
ramda_ramda
train
js
322560d3be1bb8cfe27d1b66175813f6f21b46bb
diff --git a/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java b/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java index <HASH>..<HASH> 100644 --- a/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java +++ b/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java @@ -2,6 +2,7 @@ package com.scottyab.rootbeer; import android.content.Context; import android.content.pm.PackageManager; +import android.support.annotation.Nullable; import com.scottyab.rootbeer.util.QLog; @@ -202,11 +203,13 @@ public class RootBeer { } catch (IOException e) { e.printStackTrace(); } + + // If input steam is null, we can't read the file, so return null + if (inputstream == null) return null; + String propval = ""; try { - propval = new Scanner(inputstream).useDelimiter("\\A").next(); - } catch (NoSuchElementException e) { e.printStackTrace(); }
Added null check on input stream
scottyab_rootbeer
train
java
5defccb529b0f02f3612da987387bfe8ed56ef06
diff --git a/grunt.js b/grunt.js index <HASH>..<HASH> 100644 --- a/grunt.js +++ b/grunt.js @@ -60,7 +60,7 @@ module.exports = function(grunt) { tasks: 'js' }, css: { - files: ['assets/css/less/*.less', 'assets/css/less/bootstrap/*.less'], + files: ['assets/css/less/**/*.less'], tasks: 'css' } }
Use path wildcard for Less watcher
roots_sage
train
js
bba7707950ba41ed435c6b17d588fe2933a45e74
diff --git a/tests/test_experiment_server.py b/tests/test_experiment_server.py index <HASH>..<HASH> 100644 --- a/tests/test_experiment_server.py +++ b/tests/test_experiment_server.py @@ -28,6 +28,23 @@ class TestAppConfiguration(object): StandaloneServer().load() assert not webapp.application.debug + def test_gunicorn_worker_config(self, webapp, active_config): + with mock.patch('multiprocessing.cpu_count') as cpu_count: + active_config.extend({'threads': u'auto'}) + cpu_count.return_value = 2 + from dallinger.experiment_server.gunicorn import StandaloneServer + server = StandaloneServer() + assert server.options['workers'] == u'4' + cpu_count.return_value = 4 + server.load_user_config() + assert server.options['workers'] == u'7' + active_config.extend({'worker_multiplier': 1.0}) + server.load_user_config() + assert server.options['workers'] == u'5' + active_config.extend({'threads': u'2'}) + server.load_user_config() + assert server.options['workers'] == u'2' + @pytest.mark.usefixtures('experiment_dir') class TestAdvertisement(object):
Add test for worker config count.
Dallinger_Dallinger
train
py
b3cda868929738e294e66935d82a075581e3c0c1
diff --git a/lib/HttpRequest.js b/lib/HttpRequest.js index <HASH>..<HASH> 100644 --- a/lib/HttpRequest.js +++ b/lib/HttpRequest.js @@ -63,6 +63,7 @@ HttpRequest.prototype.equals = function (other) { return this === other || ( other instanceof HttpRequest && this.requestLine.equals(other.requestLine) && + Boolean(this.encrypted) === Boolean(other.encrypted) && Message.prototype.equals.call(this, other) ); }; diff --git a/test/HttpRequest.js b/test/HttpRequest.js index <HASH>..<HASH> 100644 --- a/test/HttpRequest.js +++ b/test/HttpRequest.js @@ -133,4 +133,10 @@ describe('HttpRequest', function () { httpRequest2 = new HttpRequest('GET /foo HTTP/1.1\r\nHost: bar.com\r\n\r\nquux'); expect(httpRequest1.equals(httpRequest2), 'to be false'); }); + + it('should consider instances with different encrypted flags different', function () { + var httpRequest1 = new HttpRequest({encrypted: true}), + httpRequest2 = new HttpRequest({encrypted: false}); + expect(httpRequest1.equals(httpRequest2), 'to be false'); + }); });
HttpRequest: Make the equals method aware of the encrypted flag.
papandreou_messy
train
js,js
456be0a8c5157fe21ae381bd52c17abbee8a5592
diff --git a/addon/dialog/dialog.js b/addon/dialog/dialog.js index <HASH>..<HASH> 100644 --- a/addon/dialog/dialog.js +++ b/addon/dialog/dialog.js @@ -25,6 +25,7 @@ } else { // Assuming it's a detached DOM element. dialog.appendChild(template); } + CodeMirror.addClass(wrap, 'dialog-opened'); return dialog; } @@ -47,6 +48,7 @@ } else { if (closed) return; closed = true; + CodeMirror.rmClass(dialog.parentNode, 'dialog-opened'); dialog.parentNode.removeChild(dialog); me.focus(); @@ -102,6 +104,7 @@ function close() { if (closed) return; closed = true; + CodeMirror.rmClass(dialog.parentNode, 'dialog-opened'); dialog.parentNode.removeChild(dialog); me.focus(); } @@ -141,6 +144,7 @@ if (closed) return; closed = true; clearTimeout(doneTimer); + CodeMirror.rmClass(dialog.parentNode, 'dialog-opened'); dialog.parentNode.removeChild(dialog); }
[dialog addon] Add class when dialog is open
codemirror_CodeMirror
train
js
f1cdfe6377bfd5863232a2a389b7b62963f3872c
diff --git a/lib/celluloid/supervision/container.rb b/lib/celluloid/supervision/container.rb index <HASH>..<HASH> 100644 --- a/lib/celluloid/supervision/container.rb +++ b/lib/celluloid/supervision/container.rb @@ -50,17 +50,6 @@ module Celluloid Internals::Logger.error "!!! Celluloid::Supervision::Container #{self} crashed. Restarting..." end end - - # Register one or more actors to be launched and supervised - def supervise(config, &block) - blocks << lambda do |container| - container.add(Configuration.options(config, block: block)) - end - end - end - - def supervise(config, &block) - add(Configuration.options(config, block: block)) end finalizer :finalize
move all supervise definitions into their own file
celluloid_celluloid
train
rb
81e1556863fa9a78c8cd00f571ddbbd7d6484460
diff --git a/chance.js b/chance.js index <HASH>..<HASH> 100644 --- a/chance.js +++ b/chance.js @@ -20,8 +20,12 @@ // -- Basics -- - Chance.prototype.bool = function () { - return this.random() * 100 < 50; + Chance.prototype.bool = function (options) { + options = options || {}; + // likelihood of success (true) + options.likelihood = (typeof options.likelihood !== "undefined") ? options.likelihood : 50; + + return this.random() * 100 < options.likelihood; }; // NOTE the max and min are INCLUDED in the range. So:
Added likelihood to chance.bool() On branch bool-with-likelihood Changes to be committed: modified: chance.js
chancejs_chancejs
train
js
73937c3b0784f94e385c6666cfaf9f4fc9a89f5a
diff --git a/laniakea/core/providers/gce/manager.py b/laniakea/core/providers/gce/manager.py index <HASH>..<HASH> 100644 --- a/laniakea/core/providers/gce/manager.py +++ b/laniakea/core/providers/gce/manager.py @@ -358,6 +358,28 @@ class ComputeEngineManager: return result + def terminate_nowait(self, nodes=None): + """Destroy one or many nodes, without waiting to see that the node is destroyed. + + :param nodes: Nodes to be destroyed. + :type nodes: ``list`` + """ + if not self.is_connected(): + return + + nodes = nodes or self.nodes + + try: + self.gce.ex_destroy_multiple_nodes(nodes, timeout=0, ignore_errors=False) + except Exception as error: # pylint: disable=broad-except + # directly check type since the exception should be exactly `Exception` and not a subclass + if type(error) is Exception and "timeout" in str(error).lower(): # pylint: disable=unidiomatic-typecheck + # success + logging.info('Requested destruction of %d nodes', len(nodes)) + return + raise + raise Exception("Call to ex_destroy_multiple_nodes() returned unexpectedly.") + def terminate(self, nodes=None): """Destroy one or many nodes.
[GCE] Add terminate_nowait() Request instance deletion without waiting for it to complete.
MozillaSecurity_laniakea
train
py
113f796a48537bb5de0d7e2ced0fe78a4cb33670
diff --git a/config/initializers/compass.rb b/config/initializers/compass.rb index <HASH>..<HASH> 100644 --- a/config/initializers/compass.rb +++ b/config/initializers/compass.rb @@ -1,3 +1,8 @@ +require 'fileutils' +FileUtils.mkdir_p(Rails.root.join("tmp", "stylesheets")) + +Sass::Plugin.options[:template_location] = (Rails.root + 'public' + 'stylesheets' + 'sass').to_s + require 'compass' require 'compass/app_integration/rails' Compass::AppIntegration::Rails.initialize!
alter compass initializer to load from tmp/stylesheets
radiant_radiant
train
rb
c6d291c51799c4ab9792ca2be9f6cedd6afe5ef9
diff --git a/Kwc/NewsletterCategory/Subscribe/RecipientsController.php b/Kwc/NewsletterCategory/Subscribe/RecipientsController.php index <HASH>..<HASH> 100644 --- a/Kwc/NewsletterCategory/Subscribe/RecipientsController.php +++ b/Kwc/NewsletterCategory/Subscribe/RecipientsController.php @@ -6,9 +6,16 @@ class Kwc_NewsletterCategory_Subscribe_RecipientsController extends Kwc_Newslett $this->_model = Kwf_Model_Abstract::getInstance('Kwc_NewsletterCategory_Subscribe_Model'); parent::_initColumns(); + if ($this->_getParam('newsletterComponentId')) { + $newsletterComponentId = $this->_getParam('newsletterComponentId'); + } else { + $newsletterComponentId = Kwf_Component_Data_Root::getInstance() + ->getComponentByDbId($this->_getParam('componentId'), array('ignoreVisible'=>true, 'limit'=>1)) + ->parent->dbId; + } $model = Kwf_Model_Abstract::getInstance('Kwc_NewsletterCategory_CategoriesModel'); $s = $model->select() - ->whereEquals('newsletter_component_id', $this->_getParam('newsletterComponentId')) + ->whereEquals('newsletter_component_id', $newsletterComponentId) ->order('pos'); $categories = $model->getRows($s);
newsletter fix for last commit: newsletterComponentId doesn't have to exist
koala-framework_koala-framework
train
php
04c03265357082e72685a5d14745b852e2331b5c
diff --git a/api/prometheus/v1/api_test.go b/api/prometheus/v1/api_test.go index <HASH>..<HASH> 100644 --- a/api/prometheus/v1/api_test.go +++ b/api/prometheus/v1/api_test.go @@ -613,6 +613,7 @@ func TestAPIClientDo(t *testing.T) { { response: &apiResponse{ Status: "error", + Data: json.RawMessage(`null`), ErrorType: ErrBadData, Error: "end timestamp must not be before start time", },
Add non-nil Data because Go <I> needs it
prometheus_client_golang
train
go
96687e04a66b7812f99898425cb3c79266b2bd0c
diff --git a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php @@ -515,9 +515,8 @@ class YamlDriver extends FileDriver if ( ! isset($joinColumnElement['name'])) { $joinColumnElement['name'] = $joinColumnName; } + $joinTable['joinColumns'][] = $this->joinColumnToArray($joinColumnElement); } - - $joinTable['joinColumns'][] = $this->joinColumnToArray($joinColumnElement); } if (isset($joinTableElement['inverseJoinColumns'])) { @@ -525,9 +524,8 @@ class YamlDriver extends FileDriver if ( ! isset($joinColumnElement['name'])) { $joinColumnElement['name'] = $joinColumnName; } + $joinTable['inverseJoinColumns'][] = $this->joinColumnToArray($joinColumnElement); } - - $joinTable['inverseJoinColumns'][] = $this->joinColumnToArray($joinColumnElement); } $mapping['joinTable'] = $joinTable;
[DDC-<I>] Correct Error on manyToMany with composite primary key
doctrine_orm
train
php
d3882a3c68a5978d61e611c4c498c9bb6ae1ce96
diff --git a/test/inspectorFullSpec.js b/test/inspectorFullSpec.js index <HASH>..<HASH> 100644 --- a/test/inspectorFullSpec.js +++ b/test/inspectorFullSpec.js @@ -5,7 +5,7 @@ fs = require("fs"), feature = JSON.parse(fs.readFileSync("test/fixtures/results/results-example.json",'utf8')); - describe.only("Inspector full", function() { + describe("Inspector full", function() { it("should match top level specs", function() { var expected = [ {"spec 1": "test/fixtures/spec/multiIt.feature:1"}, diff --git a/test/parserFactorySpec.js b/test/parserFactorySpec.js index <HASH>..<HASH> 100644 --- a/test/parserFactorySpec.js +++ b/test/parserFactorySpec.js @@ -3,7 +3,7 @@ var ParserFactory = require('../lib/parserFactory'), markdownParser = require('../lib/markdownParser'), assert = require('assert'); -describe.only("parserFactory", function() { +describe("parserFactory", function() { var factory; beforeEach(function() { factory = new ParserFactory();
Re-enabled all tests.
bbc_ShouldIT
train
js,js
8a94d568d10d2cf125603022dcbac73a0143cecf
diff --git a/db/migrate/20151231054310_create_viewable_block.rb b/db/migrate/20151231054310_create_viewable_block.rb index <HASH>..<HASH> 100644 --- a/db/migrate/20151231054310_create_viewable_block.rb +++ b/db/migrate/20151231054310_create_viewable_block.rb @@ -2,7 +2,6 @@ class CreateViewableBlock < ActiveRecord::Migration def change create_table :viewable_blocks do |t| t.string :uuid - t.string :title t.timestamps null: false end
removed :title column in viewable_block
o2web_rails_admin_cms
train
rb
e723110e0dda07ab2b95ad3246678ae634705a2c
diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py index <HASH>..<HASH> 100644 --- a/salt/modules/zypper.py +++ b/salt/modules/zypper.py @@ -357,10 +357,12 @@ def info_installed(*names, **kwargs): t_nfo = dict() # Translate dpkg-specific keys to a common structure for key, value in pkg_nfo.items(): - if six.PY2 and type(value) == str: + if type(value) == str: # Check, if string is encoded in a proper UTF-8 - # We only need to check this in Py2 as Py3 strings are already unicode - value_ = value.decode('UTF-8', 'ignore').encode('UTF-8', 'ignore') + if six.PY3: + value_ = value.encode('UTF-8', 'ignore').decode('UTF-8', 'ignore') + else: + value_ = value.decode('UTF-8', 'ignore').encode('UTF-8', 'ignore') if value != value_: value = kwargs.get('errors') and value_ or 'N/A (invalid UTF-8)' log.error('Package {0} has bad UTF-8 code in {1}: {2}'.format(pkg_name, key, value))
Don't completely skip UTF-8 check in Python3
saltstack_salt
train
py
df5fefd9ab3056ba56b3c60190e40f438fa8c008
diff --git a/pelix/internals/events.py b/pelix/internals/events.py index <HASH>..<HASH> 100644 --- a/pelix/internals/events.py +++ b/pelix/internals/events.py @@ -34,11 +34,6 @@ __docformat__ = "restructuredtext en" # ------------------------------------------------------------------------------ -# Pelix utility modules -from pelix.utilities import Deprecated - -# ------------------------------------------------------------------------------ - class BundleEvent(object): """ @@ -174,12 +169,3 @@ class ServiceEvent(object): :return: the kind of service event """ return self.__kind - - @Deprecated("ServiceEvent: get_type() must be replaced by get_kind()") - def get_type(self): - """ - **DEPRECATED:** Use get_kind() instead - - Retrieves the kind of service event. - """ - return self.__kind
Removed the deprecated ServiceEvent.get_type() method It was flagged as deprecated since more than a year...
tcalmant_ipopo
train
py
d479ea3a3c4ff708483b36b6beb557440bbe125e
diff --git a/clint/textui/__init__.py b/clint/textui/__init__.py index <HASH>..<HASH> 100644 --- a/clint/textui/__init__.py +++ b/clint/textui/__init__.py @@ -7,7 +7,10 @@ clint.textui This module provides the text output helper system. """ - +import sys +if sys.platform.startswith('win'): + from ..packages import colorama + colorama.init() from . import colored from . import progress
Initialise colorama for textui on Windows. Closes gh-<I>
kennethreitz_clint
train
py
8d1be16a00c0c250dd4aba4af73059b8c75fe33c
diff --git a/lib/discordrb/bot.rb b/lib/discordrb/bot.rb index <HASH>..<HASH> 100644 --- a/lib/discordrb/bot.rb +++ b/lib/discordrb/bot.rb @@ -170,12 +170,7 @@ module Discordrb return if async debug('Oh wait! Not exiting yet as run was run synchronously.') - sync - end - - # Prevents all further execution until the websocket thread stops (e. g. through a closed connection). - def sync - @ws_thread.join + @gateway.sync end # Stops the bot gracefully, disconnecting the websocket without immediately killing the thread. This means that diff --git a/lib/discordrb/gateway.rb b/lib/discordrb/gateway.rb index <HASH>..<HASH> 100644 --- a/lib/discordrb/gateway.rb +++ b/lib/discordrb/gateway.rb @@ -144,6 +144,11 @@ module Discordrb debug('Confirmation received! Exiting run.') end + # Prevents all further execution until the websocket thread stops (e. g. through a closed connection). + def sync + @ws_thread.join + end + # Whether the WebSocket connection to the gateway is currently open def open? @handshake.finished? && !@closed
Replace Bot#sync with Gateway#sync
meew0_discordrb
train
rb,rb
b513e4a82d93fd185fae65f17e2f707a807dbf51
diff --git a/tests/unit/test_resource_provider_register.py b/tests/unit/test_resource_provider_register.py index <HASH>..<HASH> 100644 --- a/tests/unit/test_resource_provider_register.py +++ b/tests/unit/test_resource_provider_register.py @@ -45,11 +45,11 @@ class Test_ResourceProviderRegister__construction: def test__after_creation__namespace_should_default_to_None(self): instance = ResourceProviderRegister() assert instance.namespace is None - + def test__after_creation_with_namespace__namespace_should_be_as_given(self): instance = ResourceProviderRegister('mynamespace') assert instance.namespace == 'mynamespace' - + def test__after_creation__resource_providers_should_be_empty(self): instance = ResourceProviderRegister() assert len(instance.resource_providers) == 0
Removes trailing whitespace in unit test Trailing whitespace was removed from the unit tests for ResourceProviderRegister
ncraike_fang
train
py
74ea2cd58dd02ca7f2772fde6c46c3bb4d5427c5
diff --git a/libraries/lithium/g11n/catalog/adapter/Code.php b/libraries/lithium/g11n/catalog/adapter/Code.php index <HASH>..<HASH> 100644 --- a/libraries/lithium/g11n/catalog/adapter/Code.php +++ b/libraries/lithium/g11n/catalog/adapter/Code.php @@ -169,9 +169,19 @@ class Code extends \lithium\g11n\catalog\Adapter { * @return array The merged data. */ protected function _merge(array $data, array $item) { - array_walk($item['ids'], function(&$value) { - $value = substr($value, 1, -1); - }); + $filter = function ($value) use (&$filter) { + if (is_array($value)) { + return array_map($filter, $value); + } + return substr($value, 1, -1); + }; + $fields = array('id', 'ids', 'translated'); + + foreach ($fields as $field) { + if (isset($item[$field])) { + $item[$field] = $filter($item[$field]); + } + } return parent::_merge($data, $item); } }
Updating `Code` adapter test with changes to item structure.
UnionOfRAD_framework
train
php
63ecba57245f359c72fd7a19694022b964c61a48
diff --git a/test/compile.js b/test/compile.js index <HASH>..<HASH> 100644 --- a/test/compile.js +++ b/test/compile.js @@ -27,7 +27,10 @@ const testFiles = readdirSync(fixtures) const compareSources = async (t, { js, re }) => { - t.is(compile(await js), format(await re)) + const result = compile(await js) + const expected = format(await re) + t.is(result, expected) + t.is(result, format(result)) } Object.entries(testFiles).forEach(([moduleName, source]) => {
Ensure result is formatted after compile
rrdelaney_ReasonablyTyped
train
js
f914391aaf500440f4244527eeae93930a991277
diff --git a/src/interactive-auth.js b/src/interactive-auth.js index <HASH>..<HASH> 100644 --- a/src/interactive-auth.js +++ b/src/interactive-auth.js @@ -318,8 +318,6 @@ InteractiveAuth.prototype = { */ _doRequest: async function(auth, background) { try { - if (Object.keys(auth).length === 0 && - auth.constructor === Object) auth = null; const result = await this._requestCallback(auth, background); this._resolveFunc(result); this._resolveFunc = null;
Revert hack to set auth = null
matrix-org_matrix-js-sdk
train
js
abda8cef832eee3064da9b8cb54b681e8009a0cd
diff --git a/plaso/__init__.py b/plaso/__init__.py index <HASH>..<HASH> 100644 --- a/plaso/__init__.py +++ b/plaso/__init__.py @@ -19,7 +19,7 @@ __version__ = '1.2.0' VERSION_DEV = True -VERSION_DATE = '20141208' +VERSION_DATE = '20141209' def GetVersion(): diff --git a/plaso/preprocessors/macosx.py b/plaso/preprocessors/macosx.py index <HASH>..<HASH> 100644 --- a/plaso/preprocessors/macosx.py +++ b/plaso/preprocessors/macosx.py @@ -232,6 +232,8 @@ class MacOSXKeyboard(PlistPreprocessPlugin): def ParseKey(self, key, key_name): """Determines the keyboard layout.""" value = super(MacOSXKeyboard, self).ParseKey(key, key_name) + if type(value) in (list, tuple): + value = value[0] _, _, keyboard_layout = value.rpartition('.') return keyboard_layout
Code review: <I>: Fix for Issue #<I> OSX Preprocessor keyboard_layout
log2timeline_plaso
train
py,py
098e82b190831214530ab0a44f241b232f119506
diff --git a/org.openbel.framework.api/src/test/java/org/openbel/framework/api/KamBuilder.java b/org.openbel.framework.api/src/test/java/org/openbel/framework/api/KamBuilder.java index <HASH>..<HASH> 100644 --- a/org.openbel.framework.api/src/test/java/org/openbel/framework/api/KamBuilder.java +++ b/org.openbel.framework.api/src/test/java/org/openbel/framework/api/KamBuilder.java @@ -27,13 +27,6 @@ public class KamBuilder { this.usingLongForm = usingLongForm; } - public KamBuilder(final KamInfo kamInfo, final boolean usingLongForm) { - this.kamInfo = kamInfo; - this.knodes = new LinkedHashMap<String, TestKamNode>(); - this.kedges = new LinkedHashMap<String, TestKamEdge>(); - this.usingLongForm = usingLongForm; - } - public KamBuilder addNodes(final String... nodes) { if (hasItems(nodes)) { for (final String n : nodes) {
Fix build; missed duplicate constructor in merge
OpenBEL_openbel-framework
train
java
a331f750cfbb1d099cc51d94ceddeca0a88387fa
diff --git a/framework/core/views/frontend/content/index.blade.php b/framework/core/views/frontend/content/index.blade.php index <HASH>..<HASH> 100644 --- a/framework/core/views/frontend/content/index.blade.php +++ b/framework/core/views/frontend/content/index.blade.php @@ -16,5 +16,7 @@ $url = app('Flarum\Http\UrlGenerator'); @endforeach </ul> - <a href="{{ $url->to('forum')->route('index') }}?page={{ $page + 1 }}">{{ $translator->trans('core.views.index.next_page_button') }} &raquo;</a> + @if (isset($document->links->next)) + <a href="{{ $url->to('forum')->route('index') }}?page={{ $page + 1 }}">{{ $translator->trans('core.views.index.next_page_button') }} &raquo;</a> + @endif </div>
Only display pagination link if necessary Otherwise, search engines start indexing pages that aren't filled yet. Refs #<I>.
flarum_core
train
php
73ab596665d500256b9d0a7ea2d52f7b5240209f
diff --git a/src/com/google/javascript/jscomp/DefaultPassConfig.java b/src/com/google/javascript/jscomp/DefaultPassConfig.java index <HASH>..<HASH> 100644 --- a/src/com/google/javascript/jscomp/DefaultPassConfig.java +++ b/src/com/google/javascript/jscomp/DefaultPassConfig.java @@ -29,6 +29,7 @@ import com.google.javascript.jscomp.ExtractPrototypeMemberDeclarations.Pattern; import com.google.javascript.jscomp.NodeTraversal.Callback; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node; + import java.io.File; import java.io.FileReader; import java.io.IOException; @@ -341,6 +342,8 @@ public class DefaultPassConfig extends PassConfig { checks.add(printNameReferenceReport); } + checks.add(createEmptyPass("afterStandardChecks")); + assertAllOneTimePasses(checks); return checks; }
Make the Other passes be hot swap checks instead of normal optimizations. R=johnlenz DELTA=<I> (<I> added, <I> deleted, <I> changed) Revision created by MOE tool push_codebase. MOE_MIGRATION=<I> git-svn-id: <URL>
google_closure-compiler
train
java
95aab51989cb067a570113e8fcb8469e416fd6dd
diff --git a/src/tagify.js b/src/tagify.js index <HASH>..<HASH> 100644 --- a/src/tagify.js +++ b/src/tagify.js @@ -299,7 +299,7 @@ Tagify.prototype = { }, /** - * if the original input had any values, add them as tags + * if the original input has any values, add them as tags */ loadOriginalValues( value ){ var lastChild, @@ -324,7 +324,7 @@ Tagify.prototype = { if( value ){ if( _s.mode == 'mix' ){ - this.parseMixTags(value.trim()) + this.parseMixTags(this.trim(value)) lastChild = this.DOM.input.lastChild;
fixes #<I> - "strim" setting has no affect on "loadOriginalValues" when in mix-mode
yairEO_tagify
train
js
e04ebaa3645d9f52cd6abcbed4da9f55b41aff8b
diff --git a/pkg/tls/certificate.go b/pkg/tls/certificate.go index <HASH>..<HASH> 100644 --- a/pkg/tls/certificate.go +++ b/pkg/tls/certificate.go @@ -22,7 +22,7 @@ var ( `VersionTLS13`: tls.VersionTLS13, } - // MaxVersion Map of allowed TLS minimum versions + // MaxVersion Map of allowed TLS maximum versions MaxVersion = map[string]uint16{ `VersionTLS10`: tls.VersionTLS10, `VersionTLS11`: tls.VersionTLS11,
Fix typo in the godoc of TLS option MaxVersion
containous_traefik
train
go
489c2d38dab7b61d230c3b2f21e2881fbec2a3cb
diff --git a/benchbuild/utils/db.py b/benchbuild/utils/db.py index <HASH>..<HASH> 100644 --- a/benchbuild/utils/db.py +++ b/benchbuild/utils/db.py @@ -96,7 +96,7 @@ def persist_project(project): name = project.name desc = project.__doc__ - domain = project.domain + domain = str(project.domain) group_name = project.group version = str(project.variant) try:
Ensure a project domain string conversion (#<I>) Ensure that a projects domain is converted to a string before storing it to the database. This is useful for projects that define their domain as a to string convertable object.
PolyJIT_benchbuild
train
py
d36aa4383d3ca78f446351ec997d82fe8c1a98b2
diff --git a/lib/acts_as_api/base.rb b/lib/acts_as_api/base.rb index <HASH>..<HASH> 100644 --- a/lib/acts_as_api/base.rb +++ b/lib/acts_as_api/base.rb @@ -34,7 +34,7 @@ module ActsAsApi # be contained in the api responses. def api_accessible(api_template, options = {}, &block) - attributes = api_accessible_attributes(api_template).try(:dup) || ApiTemplate.create(api_template) + attributes = api_accessible_attributes(api_template).try(:dup) || ApiTemplate.new(api_template) attributes.merge!(api_accessible_attributes(options[:extend])) if options[:extend]
tweaking patch to work with stock acts_as_api as base
fabrik42_acts_as_api
train
rb
fd944f05038db58adc51f84d78e9a5fd875e78a9
diff --git a/test/byteLength.js b/test/byteLength.js index <HASH>..<HASH> 100644 --- a/test/byteLength.js +++ b/test/byteLength.js @@ -78,7 +78,7 @@ describe('Bytes', function () { it('Should split on byte length, not character count', function (done) { var streams = makeStreams(1) - var multiByteChar = '\uDFFF' + var multiByteChar = "0xDFFF" var byteLength = Buffer.byteLength(multiByteChar) streams.collector.on('end', function () {
Use hex string to escape unicode. Not too sure about this one, but it seems to be related to this: <URL>
Medium_sculpt
train
js
d591fb72a2d7af6ba63196448fa0b5fb635dc478
diff --git a/calendar-bundle/src/Resources/contao/dca/tl_calendar_events.php b/calendar-bundle/src/Resources/contao/dca/tl_calendar_events.php index <HASH>..<HASH> 100644 --- a/calendar-bundle/src/Resources/contao/dca/tl_calendar_events.php +++ b/calendar-bundle/src/Resources/contao/dca/tl_calendar_events.php @@ -65,7 +65,7 @@ $GLOBALS['TL_DCA']['tl_calendar_events'] = array ( 'mode' => 4, 'fields' => array('startTime DESC'), - 'headerFields' => array('title', 'jumpTo', 'tstamp', 'protected', 'allowComments', 'makeFeed'), + 'headerFields' => array('title', 'jumpTo', 'tstamp', 'protected', 'allowComments'), 'panelLayout' => 'filter;sort,search,limit', 'child_record_callback' => array('tl_calendar_events', 'listEvents'), 'child_record_class' => 'no_padding'
[Calendar] Remove left-over references to the "makeFeed" field (see #<I>).
contao_contao
train
php
194f40bba24e85fa0a634c2f087b7b95dde4527f
diff --git a/lib/Auth/Basic.php b/lib/Auth/Basic.php index <HASH>..<HASH> 100644 --- a/lib/Auth/Basic.php +++ b/lib/Auth/Basic.php @@ -72,7 +72,7 @@ class Auth_Basic extends AbstractController { } $m=$this->add('Model') ->setSource('Array',array(is_array($user)?$user:array($this->login_field=>$user,$this->password_field=>$pass))); - $m->id_field='email'; + $m->id_field=$this->login_field; $this->setModel($m); return $this; }
fix remaining mention of 'email'.
atk4_atk4
train
php
116c17deaff0619b5693b78cc79cb3b46bad76eb
diff --git a/src/WebServCo/Framework/Cli/Runner/Statistics.php b/src/WebServCo/Framework/Cli/Runner/Statistics.php index <HASH>..<HASH> 100644 --- a/src/WebServCo/Framework/Cli/Runner/Statistics.php +++ b/src/WebServCo/Framework/Cli/Runner/Statistics.php @@ -5,6 +5,7 @@ final class Statistics { protected $duration; // <seconds>.<microseconds> protected $memoryPeakUsage; // K + protected $result; protected $timeStart; protected $timeFinish; protected $timeZone; @@ -14,8 +15,9 @@ final class Statistics $this->timeZone = date_default_timezone_get(); } - public function finish() + public function finish($result) { + $this->result = $result; $this->timeFinish = $this->createCurrentTimeObject(); $this->duration = $this->timeFinish->format("U.u") - $this->timeStart->format("U.u"); $this->memoryPeakUsage = memory_get_peak_usage(true) / 1024; @@ -31,6 +33,11 @@ final class Statistics return $this->memoryPeakUsage; } + public function getResult() + { + return $this->result; + } + public function start() { $this->timeStart = $this->createCurrentTimeObject();
Refactor Cli/Runner/Statistics
webservco_framework
train
php
20a869a204489db6b9d6d64f57dbcc45255f917b
diff --git a/yfinance/base.py b/yfinance/base.py index <HASH>..<HASH> 100644 --- a/yfinance/base.py +++ b/yfinance/base.py @@ -414,7 +414,7 @@ class TickerBase(): if isinstance(data.get('earnings'), dict): try: earnings = data['earnings']['financialsChart'] - earnings['financialCurrency'] = data['earnings']['financialCurrency'] + earnings['financialCurrency'] = 'USD' if 'financialCurrency' not in data['earnings'] else data['earnings']['financialCurrency'] self._earnings['financialCurrency'] = earnings['financialCurrency'] df = _pd.DataFrame(earnings['yearly']).set_index('date') df.columns = utils.camel2title(df.columns) @@ -486,7 +486,7 @@ class TickerBase(): data = self._earnings[freq] if as_dict: dict_data = data.to_dict() - dict_data['financialCurrency'] = self._earnings['financialCurrency'] + dict_data['financialCurrency'] = 'USD' if 'financialCurrency' not in self._earnings else self._earnings['financialCurrency'] return dict_data return data
Revert to 'USD' when there is no 'financialCurrency' does not exist Revert to 'USD' when there is no 'financialCurrency' does not exist
ranaroussi_fix-yahoo-finance
train
py
a4d75945b2cb595e96c546a0cda5e6685c71c2ad
diff --git a/backend/scrapers/employees/matchEmployees.js b/backend/scrapers/employees/matchEmployees.js index <HASH>..<HASH> 100644 --- a/backend/scrapers/employees/matchEmployees.js +++ b/backend/scrapers/employees/matchEmployees.js @@ -303,7 +303,7 @@ class CombineCCISandEmployees { const output = {}; for (const profile of person.matches) { - for (const attrName in profile) { + for (const attrName of Object.keys(profile)) { // Merge emails if (attrName === 'emails') { if (output.emails) { diff --git a/common/classModels/Section.js b/common/classModels/Section.js index <HASH>..<HASH> 100644 --- a/common/classModels/Section.js +++ b/common/classModels/Section.js @@ -136,7 +136,7 @@ class Section { } updateWithData(data) { - for (const attrName in data) { + for (const attrName of Object.keys(data)) { if ((typeof data[attrName]) === 'function') { macros.error('given fn??', data, this, this.constructor.name); continue;
Fixed two eslint bugs with package updates
ryanhugh_searchneu
train
js,js
238aa5280e516665987d1d8ed083c7d6a76d82ea
diff --git a/phypno/viz/base.py b/phypno/viz/base.py index <HASH>..<HASH> 100644 --- a/phypno/viz/base.py +++ b/phypno/viz/base.py @@ -78,7 +78,7 @@ class Colormap(ColorMap): pos = linspace(limits[0], limits[1], coolwarm.shape[0]) color = coolwarm - color = c_[color, 255 * ones((color.shape[0], 1))] + # color = c_[color, 255 * ones((color.shape[0], 1))] super().__init__(pos, color)
revert to not using alpha, apparently it messes up opengl
wonambi-python_wonambi
train
py
9d271e1be37fed874718b3d11c07b1653184d09f
diff --git a/examples/watch-live.php b/examples/watch-live.php index <HASH>..<HASH> 100644 --- a/examples/watch-live.php +++ b/examples/watch-live.php @@ -5,7 +5,11 @@ include dirname(__DIR__) . "/vendor/autoload.php"; use Amp\Process\Process; Amp\Loop::run(function () { - $process = new Process("echo 1; sleep 1; echo 2; sleep 1; echo 3; exit 42"); + // abuse ping for sleep, see https://stackoverflow.com/a/1672349/2373138 + $command = \DIRECTORY_SEPARATOR === "\\" + ? "cmd /c echo 1 & ping -n 2 127.0.0.1 > nul & echo 2 & ping -n 2 127.0.0.1 > nul & echo 3 & exit 42" + : "echo 1; sleep 1; echo 2; sleep 1; echo 3; exit 42"; + $process = new Process($command); $process->start(); $stream = $process->getStdout();
Make examples/watch-live.php work on Windows
amphp_process
train
php
a7e831e9fda83ecaf1ae243f74ab0cd8369d5adf
diff --git a/backend/controllers/ProductController.php b/backend/controllers/ProductController.php index <HASH>..<HASH> 100644 --- a/backend/controllers/ProductController.php +++ b/backend/controllers/ProductController.php @@ -83,7 +83,7 @@ class ProductController extends Controller [ 'actions' => [ 'save', - 'add-image', 'delete-image', + 'add-image', 'delete-image', 'edit-image', 'add-video', 'delete-video', 'image-up', 'image-down', 'up', 'down', 'generate-seo-url',
Fixes permission for changing product image in ProductController.
black-lamp_blcms-shop
train
php
ae9b5bd7eb9d52b58296a742da99d5feaaaccd46
diff --git a/eval_test.go b/eval_test.go index <HASH>..<HASH> 100644 --- a/eval_test.go +++ b/eval_test.go @@ -1059,6 +1059,61 @@ func TestEvalInternal(t *testing.T) { "63", ast.TypeString, }, + + // Unary + { + "foo ${-46}", + nil, + false, + "foo -46", + ast.TypeString, + }, + + { + "foo ${-46 + 5}", + nil, + false, + "foo -41", + ast.TypeString, + }, + + { + "foo ${46 + -5}", + nil, + false, + "foo 41", + ast.TypeString, + }, + + { + "foo ${-bar}", + &ast.BasicScope{ + VarMap: map[string]ast.Variable{ + "bar": ast.Variable{ + Value: 41, + Type: ast.TypeInt, + }, + }, + }, + false, + "foo -41", + ast.TypeString, + }, + + { + "foo ${5 + -bar}", + &ast.BasicScope{ + VarMap: map[string]ast.Variable{ + "bar": ast.Variable{ + Value: 41, + Type: ast.TypeInt, + }, + }, + }, + false, + "foo -36", + ast.TypeString, + }, } for _, tc := range cases {
port unary tests back to hil, verified working From <URL>
hashicorp_hil
train
go
7b1b3276fb7a1d75be1b3c36bbe26e4a573a00cc
diff --git a/lib/pdf/reader/text_receiver.rb b/lib/pdf/reader/text_receiver.rb index <HASH>..<HASH> 100644 --- a/lib/pdf/reader/text_receiver.rb +++ b/lib/pdf/reader/text_receiver.rb @@ -31,6 +31,9 @@ class PDF::Reader # Usage: # receiver = PDF::Reader::TextReceiver.new($stdout) # PDF::Reader.file("somefile.pdf", receiver) + # + # DEPRECATED: this class was deprecated in version 0.11.0 and will + # eventually be removed class TextReceiver ################################################################################ # Initialize with the library user's receiver
deprecate the TextReceiver class
yob_pdf-reader
train
rb
f455757bec26cd8e961287be43a2ed1c58b01fda
diff --git a/lib/octokit/error.rb b/lib/octokit/error.rb index <HASH>..<HASH> 100644 --- a/lib/octokit/error.rb +++ b/lib/octokit/error.rb @@ -1,7 +1,7 @@ module Octokit # Custom error class for rescuing from all GitHub errors class Error < StandardError - def initialize(response) + def initialize(response=nil) @response = response super(build_error_message) end @@ -22,6 +22,8 @@ module Octokit private def build_error_message + return nil if @response.nil? + message = if response_body ": #{response_body[:error] || response_body[:message] || ''}" else
Respect superclass's initializer arity in Error This fixes rspec-mocks and probably other mocking libs that create instances of error classes without arguments. E.g. in rspec-mocks `api.stub(:foobar).and_raise(Octokit::NotFound)` would cause an error because of the missing response argument in Octokit::Error#initializer.
octokit_octokit.rb
train
rb
f3b7eb71ca93bc70ee1c915bc43ba0157ef85dde
diff --git a/packages/material-ui/src/Slider/Slider.js b/packages/material-ui/src/Slider/Slider.js index <HASH>..<HASH> 100644 --- a/packages/material-ui/src/Slider/Slider.js +++ b/packages/material-ui/src/Slider/Slider.js @@ -154,6 +154,14 @@ export const styles = theme => ({ height: '100%', padding: '0 11px', }, + // The primary input mechanism of the device includes a pointing device of limited accuracy. + '@media (pointer: coarse)': { + // Reach 42px touch target, about ~8mm on screen. + padding: '20px 0', + '&$vertical': { + padding: '0 20px', + }, + }, }, /* Styles applied to the root element if `color="primary"`. */ colorPrimary: {
[Slider] Improve UX for pointing device with limited accuracy (#<I>)
mui-org_material-ui
train
js
91cba1ccac67b4a519db5db943c3872540a416c7
diff --git a/functions.php b/functions.php index <HASH>..<HASH> 100644 --- a/functions.php +++ b/functions.php @@ -20,7 +20,7 @@ $understrap_includes = array( '/customizer.php', // Customizer additions. '/custom-comments.php', // Custom Comments file. '/jetpack.php', // Load Jetpack compatibility file. - '/class-wp-bootstrap-navwalker.php', // Load custom WordPress nav walker. + '/class-wp-bootstrap-navwalker.php', // Load custom WordPress nav walker. Trying to get deeper navigation? Check out: https://github.com/understrap/understrap/issues/567 '/woocommerce.php', // Load WooCommerce functions. '/editor.php', // Load Editor functions. '/wp-admin.php', // /wp-admin/ related functions
NavWalker link to more info
understrap_understrap
train
php
f84fe4d13a245b1484f9ae65c0d7d23af387870a
diff --git a/microfs.py b/microfs.py index <HASH>..<HASH> 100644 --- a/microfs.py +++ b/microfs.py @@ -247,7 +247,7 @@ def get(filename, target=None, serial=None): "f = open('{}', 'rb')".format(filename), "r = f.read", "result = True", - "while result:\n result = r(32)\n if result:\n " + "while result:\n result = r(32)\n if result:\n ", "uart.write(result)\n", "f.close()", ]
Add missing comma to list of commands in 'get'.
ntoll_microfs
train
py
4bcfcb3361bb5624395081e59707cf152efad920
diff --git a/fs/archive/tarfs/__init__.py b/fs/archive/tarfs/__init__.py index <HASH>..<HASH> 100644 --- a/fs/archive/tarfs/__init__.py +++ b/fs/archive/tarfs/__init__.py @@ -239,12 +239,14 @@ class TarSaver(base.ArchiveSaver): mtime = int(mtime) tar_info.mtime = mtime - for tarattr, infoattr in attr_map.items(): - if getattr(info, infoattr) is not None: - setattr(tar_info, tarattr, getattr(info, infoattr)) + if info.has_namespace('access'): + for tarattr, infoattr in attr_map.items(): + if getattr(info, infoattr) is not None: + setattr(tar_info, tarattr, getattr(info, infoattr)) + tar_info.mode = getattr(info.permissions, 'mode', 0o420) + tar_info.size = info.size - tar_info.mode = getattr(info.permissions, 'mode', 0o420) tar_info.type = type_map.get(info.type, tarfile.REGTYPE) if not info.is_dir:
Fix Info properties requiring some namespaces since fs <I>
althonos_fs.archive
train
py
3ff6e333dd004d3898e9cf832f01a8ac784331b5
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.8.44'; - const VERSION_ID = 20844; + const VERSION = '2.8.45-DEV'; + const VERSION_ID = 20845; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; - const RELEASE_VERSION = 44; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 45; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019';
bumped Symfony version to <I>
symfony_symfony
train
php
dca6ce7362363ae8160aeccc725af9a5002af38e
diff --git a/addon/components/mdl-button.js b/addon/components/mdl-button.js index <HASH>..<HASH> 100644 --- a/addon/components/mdl-button.js +++ b/addon/components/mdl-button.js @@ -36,6 +36,6 @@ export default BaseComponent.extend(RippleSupport, { }, click() { - this.sendAction(this); + this.sendAction('action', this); } });
Fix mdl-button not triggering primary action
mike-north_ember-material-lite
train
js
8667c86d81ec02fd3e92137df04394ab705c6516
diff --git a/trollsift/version.py b/trollsift/version.py index <HASH>..<HASH> 100644 --- a/trollsift/version.py +++ b/trollsift/version.py @@ -21,4 +21,4 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. """Version file. """ -__version__ = "0.3.0" +__version__ = "0.4.0a0.dev0"
Update version to <I>a0.dev0
pytroll_trollsift
train
py
f8023b0e479d3c33b628465372173e8adc0189e9
diff --git a/twilio/rest/resources/base.py b/twilio/rest/resources/base.py index <HASH>..<HASH> 100644 --- a/twilio/rest/resources/base.py +++ b/twilio/rest/resources/base.py @@ -1,4 +1,5 @@ import logging +logger = logging.getLogger('twilio') import os import platform @@ -181,7 +182,7 @@ class Resource(object): kwargs['timeout'] = self.timeout resp = make_twilio_request(method, uri, auth=self.auth, **kwargs) - logging.debug(resp.content) + logger.debug(resp.content) if method == "DELETE": return resp, {}
Set the name of the logger to twilio
twilio_twilio-python
train
py
80a08949f5f266aa878ae4201bff91e827b351f8
diff --git a/gnotty/static/js/gnotty.js b/gnotty/static/js/gnotty.js index <HASH>..<HASH> 100644 --- a/gnotty/static/js/gnotty.js +++ b/gnotty/static/js/gnotty.js @@ -1,4 +1,6 @@ +WEB_SOCKET_SWF_LOCATION = '/static/WebSocketMain.swf'; + /* Manages a connection to an IRC room - takes an options objects @@ -98,7 +100,7 @@ var gnotty = function(options) { var timeout = setTimeout(function() { alert('Took too long to connect, please try again'); location.reload(); - }, 10000); + }, 20000); // Clear the joining progress bar and join timeout. If joining // was successfull, finish the progress animation off first.
Increate connect timeout - flashsockets take a lot longer
stephenmcd_gnotty
train
js
394cf1ad9f55e165ce3c5aceec3f4e1f9fa453f1
diff --git a/src/Illuminate/Support/helpers.php b/src/Illuminate/Support/helpers.php index <HASH>..<HASH> 100755 --- a/src/Illuminate/Support/helpers.php +++ b/src/Illuminate/Support/helpers.php @@ -662,6 +662,10 @@ if (! function_exists('env')) { return; } + if (($valueLength = strlen($value)) > 1 && $value[0] === '"' && $value[$valueLength - 1] === '"') { + return substr($value, 1, -1); + } + return $value; }) ->getOrCall(function () use ($default) {
[<I>] Fix quoted environment variable parsing
laravel_framework
train
php
7956b6b96b5163c5cdf3d8c32cfef250ed7931d1
diff --git a/web/src/main/java/org/jboss/as/metadata/parser/servlet/TaglibMetaDataParser.java b/web/src/main/java/org/jboss/as/metadata/parser/servlet/TaglibMetaDataParser.java index <HASH>..<HASH> 100644 --- a/web/src/main/java/org/jboss/as/metadata/parser/servlet/TaglibMetaDataParser.java +++ b/web/src/main/java/org/jboss/as/metadata/parser/servlet/TaglibMetaDataParser.java @@ -58,10 +58,10 @@ public class TaglibMetaDataParser extends MetaDataElementParser { final Element element = Element.forName(reader.getLocalName()); switch (element) { case TAGLIB_URI: - taglib.setTaglibUri(reader.getElementText().trim()); + taglib.setTaglibUri(reader.getElementText()); break; case TAGLIB_LOCATION: - taglib.setTaglibLocation(reader.getElementText().trim()); + taglib.setTaglibLocation(reader.getElementText()); break; default: throw unexpectedElement(reader); }
Remove the trims, the staxmapper will do that eventually (STXM-3).
wildfly_wildfly
train
java
262311a65f52a7eeb7fb9857025d0beac138bf49
diff --git a/src/FieldHandlers/PhoneFieldHandler.php b/src/FieldHandlers/PhoneFieldHandler.php index <HASH>..<HASH> 100644 --- a/src/FieldHandlers/PhoneFieldHandler.php +++ b/src/FieldHandlers/PhoneFieldHandler.php @@ -29,6 +29,4 @@ class PhoneFieldHandler extends BaseFieldHandler return $dbFields; } - - }
Fixed CS (task #<I>)
QoboLtd_cakephp-csv-migrations
train
php
d859b21ed78e7581354ae07e880f6daf493053dd
diff --git a/Controller/CustomerController.php b/Controller/CustomerController.php index <HASH>..<HASH> 100644 --- a/Controller/CustomerController.php +++ b/Controller/CustomerController.php @@ -524,10 +524,10 @@ class CustomerController extends BaseFrontController /** * @param $token * - * @return \Symfony\Component\HttpFoundation\Response - * * @throws \Exception * @throws \Propel\Runtime\Exception\PropelException + * + * @return \Symfony\Component\HttpFoundation\Response */ public function confirmCustomerAction($token) { diff --git a/Controller/FeedController.php b/Controller/FeedController.php index <HASH>..<HASH> 100644 --- a/Controller/FeedController.php +++ b/Controller/FeedController.php @@ -51,9 +51,9 @@ class FeedController extends BaseFrontController * @param $id string The id of the parent element. The id of the main parent category for catalog context. * The id of the content folder for content context * - * @return Response - * * @throws \RuntimeException + * + * @return Response */ public function generateAction($context, $lang, $id) {
Fix BaseTaxType annotation order (#<I>) * Fix BaseTaxType annotation order * Fix php cs annotation order * Fix ci and lock ci versions
thelia-modules_Front
train
php,php
dafa06cf0934e50c333d2b3383d74edc196efb7c
diff --git a/views/js/portableLib/OAT/util/tooltip.js b/views/js/portableLib/OAT/util/tooltip.js index <HASH>..<HASH> 100644 --- a/views/js/portableLib/OAT/util/tooltip.js +++ b/views/js/portableLib/OAT/util/tooltip.js @@ -36,8 +36,8 @@ define([ if (contentId) { $content = $container.find('#' + contentId); if ($content.length) { - var targetHeight = parseInt($($target.get(0)).css('height'), 10), - targetFontSize = parseInt($($target.get(0)).css('fontSize'), 10); + var targetHeight = parseInt($target.css('height'), 10), + targetFontSize = parseInt($target.css('fontSize'), 10); /** * Tooltip may be attached to a phrase which is spread into 2 or more lines. For this case we apply
Removed excessive wrapping of the element.
oat-sa_extension-tao-itemqti
train
js
a0bb5599008973fb2ed4338a3850fdc1a3d96f69
diff --git a/stellar_base/transaction.py b/stellar_base/transaction.py index <HASH>..<HASH> 100644 --- a/stellar_base/transaction.py +++ b/stellar_base/transaction.py @@ -31,7 +31,8 @@ class Transaction(object): self.operations = opts.get('operations') or [] def add_operation(self, operation): - self.operations.append(operation) + if operation not in self.operations: + self.operations.append(operation) def to_xdr_object(self): source_account = account_xdr_object(self.source) diff --git a/stellar_base/transaction_envelope.py b/stellar_base/transaction_envelope.py index <HASH>..<HASH> 100644 --- a/stellar_base/transaction_envelope.py +++ b/stellar_base/transaction_envelope.py @@ -21,7 +21,8 @@ class TransactionEnvelope(object): assert isinstance(keypair, Keypair) tx_hash = self.hash_meta() sig = keypair.sign_decorated(tx_hash) - self.signatures.append(sig) + if sig not in self.signatures: + self.signatures.append(sig) return self def hash_meta(self):
keep ops in Tx and signatures in Envelope unique
StellarCN_py-stellar-base
train
py,py
c5309e37e1c4f289d3e2f68ac9b29474682cf51a
diff --git a/xflate/meta/writer.go b/xflate/meta/writer.go index <HASH>..<HASH> 100644 --- a/xflate/meta/writer.go +++ b/xflate/meta/writer.go @@ -206,10 +206,12 @@ func (mw *Writer) encodeBlock(final FinalMode) (err error) { mw.bw.WriteBits(0, 3) // Empty HCLen code } mw.bw.WriteBits(2, 3) // Final HCLen code + mw.bw.WriteBits(0, 1) // First HLit code must be zero // Encode data segment. cnts := mw.computeCounts(buf, 1<<uint(huffLen), final != FinalNil, inv) - val, pre := 0, 0 + cnts[0]++ // Remove first zero bit, treated as part of the header + val, pre := 0, -1 for len(cnts) > 0 { if cnts[0] == 0 { cnts = cnts[1:] @@ -220,7 +222,7 @@ func (mw *Writer) encodeBlock(final FinalMode) (err error) { cnt := cur * cnts[0] // Count as positive integer switch { - case pre != 0 && cur < 0 && cnt >= minRepZero: // Use repeated zero code + case cur < 0 && cnt >= minRepZero: // Use repeated zero code if val = maxRepZero; val > cnt { val = cnt }
xflate/meta: make first symZero part of the header Logically, there is no change, but this is done to make it match the specification a little more closely.
dsnet_compress
train
go
baf3e39a350dd3f54e77931cf2f6ca8b8a33549b
diff --git a/tests.py b/tests.py index <HASH>..<HASH> 100644 --- a/tests.py +++ b/tests.py @@ -58,8 +58,8 @@ def test_abort_transaction_on_failure(app): assert db['answer'] == 42 1/0 - with app.test_request_context(): - assert 'answer' not in db + with app.test_request_context(): + assert 'answer' not in db def test_abort_transaction_if_doomed(app):
pass tests on <I>/<I>
dag_flask-zodb
train
py
a38f11d022d125a1be56dabc624066c483cb1987
diff --git a/tests/phpbu-laravel/Configuration/TranslatorTest.php b/tests/phpbu-laravel/Configuration/TranslatorTest.php index <HASH>..<HASH> 100644 --- a/tests/phpbu-laravel/Configuration/TranslatorTest.php +++ b/tests/phpbu-laravel/Configuration/TranslatorTest.php @@ -22,7 +22,13 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase $configuration = $translator->translate(new Proxy($config)); $backups = $configuration->getBackups(); - $this->assertEquals(2, count($backups)); + $this->assertCount(2, $backups); + + /** @var \phpbu\App\Configuration\Backup $backup */ + foreach ($backups as $backup) { + $this->assertInstanceOf('\\phpbu\\App\\Configuration\\Backup\\Source', $backup->getSource()); + $this->assertInstanceOf('\\phpbu\\App\\Configuration\\Backup\\Target', $backup->getTarget()); + } } /**
Added some assertions to make sure a valid 'Configuration' is returned
sebastianfeldmann_phpbu-laravel
train
php
3b08ada96ed40e57fe7a70f2e4d5858e8dfd9af2
diff --git a/gomock/controller_test.go b/gomock/controller_test.go index <HASH>..<HASH> 100644 --- a/gomock/controller_test.go +++ b/gomock/controller_test.go @@ -720,14 +720,14 @@ func TestDuplicateFinishCallFails(t *testing.T) { rep.assertFatal(ctrl.Finish, "Controller.Finish was called more than once. It has to be called exactly once.") } -func TestTestNoHelper(t *testing.T) { +func TestNoHelper(t *testing.T) { ctrlNoHelper := gomock.NewController(NewErrorReporter(t)) // doesn't panic ctrlNoHelper.T.Helper() } -func TestTestWithHelper(t *testing.T) { +func TestWithHelper(t *testing.T) { withHelper := &HelperReporter{TestReporter: NewErrorReporter(t)} ctrlWithHelper := gomock.NewController(withHelper)
gomock: removes typo in Test names
golang_mock
train
go
2eb39c461f030ab0256309194ebd1ccbf2576a1b
diff --git a/dvc/__init__.py b/dvc/__init__.py index <HASH>..<HASH> 100644 --- a/dvc/__init__.py +++ b/dvc/__init__.py @@ -10,7 +10,7 @@ import os import warnings -VERSION_BASE = "0.27.1" +VERSION_BASE = "0.28.0" __version__ = VERSION_BASE PACKAGEPATH = os.path.abspath(os.path.dirname(__file__))
dvc: bump to <I>
iterative_dvc
train
py
25d37fbe3f5dfea92a0411d687d9ede1fbe5a9ff
diff --git a/keanu-project/src/main/java/io/improbable/keanu/vertices/Vertex.java b/keanu-project/src/main/java/io/improbable/keanu/vertices/Vertex.java index <HASH>..<HASH> 100644 --- a/keanu-project/src/main/java/io/improbable/keanu/vertices/Vertex.java +++ b/keanu-project/src/main/java/io/improbable/keanu/vertices/Vertex.java @@ -15,16 +15,16 @@ import java.util.Set; public abstract class Vertex<T> implements Observable<T> { private final VertexId id = new VertexId(); + private final long[] initialShape; + private final Observable<T> observation; + private Set<Vertex> children = Collections.emptySet(); private Set<Vertex> parents = Collections.emptySet(); private T value; - private long[] initialShape; - private final Observable<T> observation; private VertexLabel label = null; public Vertex() { - this.initialShape = Tensor.SCALAR_SHAPE; - this.observation = Observable.observableTypeFor(this.getClass()); + this(Tensor.SCALAR_SHAPE); } public Vertex(long[] initialShape) {
use single constructor in vertex cause it's cleaner
improbable-research_keanu
train
java
8d041dd05458b8c3a85eefcae81952933ef3f72e
diff --git a/iterator.go b/iterator.go index <HASH>..<HASH> 100644 --- a/iterator.go +++ b/iterator.go @@ -316,6 +316,19 @@ func (it *Iterator) ValidForPrefix(prefix []byte) bool { // Close would close the iterator. It is important to call this when you're done with iteration. func (it *Iterator) Close() { it.iitr.Close() + + // It is important to wait for the fill goroutines to finish. Otherwise, we might leave zombie + // goroutines behind, which are waiting to acquire file read locks after DB has been closed. + waitFor := func(l list) { + item := l.pop() + for item != nil { + item.wg.Wait() + item = l.pop() + } + } + waitFor(it.waste) + waitFor(it.data) + // TODO: We could handle this error. _ = it.txn.db.vlog.decrIteratorCount() }
Bug Fix for #<I> Wait for goroutines to finish before closing iterator. This ensures that we don't have zombie goroutines waiting to read from closed files.
dgraph-io_badger
train
go
58c4ee329e10ff52682af544574a0bf1fc8241c5
diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index <HASH>..<HASH> 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -0,0 +1,3 @@ +//= link_directory ../javascripts/comfy/cms .js +//= link_directory ../stylesheets/comfy/cms .css +//= link_directory ../fonts/comfy/cms .eot
will this works with sprokets 4?
comfy_comfortable-mexican-sofa
train
js
f4ed09faae121e2dfe174968eb34b47d8403107a
diff --git a/mod/quiz/report/overview/report.php b/mod/quiz/report/overview/report.php index <HASH>..<HASH> 100644 --- a/mod/quiz/report/overview/report.php +++ b/mod/quiz/report/overview/report.php @@ -607,17 +607,18 @@ document.getElementById("noscriptmenuaction").style.display = "none"; echo "</td>\n"; echo '</tr></table>'; } - } else if ($download == 'Excel' or $download == 'ODS') { - $workbook->close(); - exit; - } else if ($download == 'CSV') { - exit; } } else { if (!$download) { $table->print_html(); } } + if ($download == 'Excel' or $download == 'ODS') { + $workbook->close(); + exit; + } else if ($download == 'CSV') { + exit; + } if (!$download) { // Print display options $mform->set_data($displayoptions +compact('detailedmarks', 'pagesize'));
For the overview report : MDL-<I> "Option to only show / export final grade" and MDL-<I> "Make it clear which student attempt gives the final grade, if the scoring method is first, last or highest score" fixed a small problem I noticed in this patch.
moodle_moodle
train
php
cf2be80325bca08b4459e68c42de2416dc1b40f9
diff --git a/src/Renderer/Block.php b/src/Renderer/Block.php index <HASH>..<HASH> 100644 --- a/src/Renderer/Block.php +++ b/src/Renderer/Block.php @@ -81,8 +81,10 @@ class Block * @param string $string * @return string */ + // @codingStandardsIgnoreStart public function __($string) { + // @codingStandardsIgnoreEnd return $string; } }
Issue #<I>: Exclude __() method name from phpcs checks
lizards-and-pumpkins_catalog
train
php
027d364e1b29c16d0adc6bbec26f0d377b43ed85
diff --git a/skus/m1small/const.go b/skus/m1small/const.go index <HASH>..<HASH> 100644 --- a/skus/m1small/const.go +++ b/skus/m1small/const.go @@ -14,5 +14,5 @@ const ( ClientLeaseOwner = "pez-stage" //ProcurementMetaFieldRequestID -- fieldname for a defined metadata field for //requestid - ProcurementMetaFieldRequestID = "request_id" + ProcurementMetaFieldRequestID = "requestid" ) diff --git a/skus/m1small/m1small.go b/skus/m1small/m1small.go index <HASH>..<HASH> 100644 --- a/skus/m1small/m1small.go +++ b/skus/m1small/m1small.go @@ -98,6 +98,7 @@ func (s *SkuM1Small) Procurement() *taskmanager.Task { // ReStock -- this will grab a requestid from procurementMeta and call the innkeeper client to deprovision. func (s *SkuM1Small) ReStock() (tm *taskmanager.Task) { + lo.G.Debug("ProcurementMeta: ", s.ProcurementMeta) requestID := s.ProcurementMeta[ProcurementMetaFieldRequestID].(string) lo.G.Debug("requestID: ", requestID)
[#<I>] adding debug and correcting fieldname
pivotal-pez_pezdispenser
train
go,go
708d5e07ed14d58a1656d684e16e435491659bf0
diff --git a/Classes/Search/AccessComponent.php b/Classes/Search/AccessComponent.php index <HASH>..<HASH> 100644 --- a/Classes/Search/AccessComponent.php +++ b/Classes/Search/AccessComponent.php @@ -52,10 +52,6 @@ class Tx_Solr_Search_AccessComponent extends Tx_Solr_Search_AbstractComponent im ); $this->query->setSiteHashFilter($allowedSites); - if ($this->searchConfiguration['query.']['searchBelowPageIds']) { - $this->query->setRootlineFilter($this->searchConfiguration['query.']['searchBelowPageIds']); - } - $this->query->setUserAccessGroups(explode(',', $GLOBALS['TSFE']->gr_list)); // must generate default endtime, @see http://forge.typo3.org/issues/44276
Revert [FEATURE] Allow limiting search to certain page-branches * documentation missing * wrong location - not related to access restrictions
TYPO3-Solr_ext-solr
train
php
e2c4fec25332721e0d28e44d97445803060cd13b
diff --git a/src/ol/interaction/interaction.js b/src/ol/interaction/interaction.js index <HASH>..<HASH> 100644 --- a/src/ol/interaction/interaction.js +++ b/src/ol/interaction/interaction.js @@ -2,6 +2,7 @@ goog.provide('ol.interaction.Interaction'); +goog.require('goog.Disposable'); goog.require('ol.MapBrowserEvent'); goog.require('ol.animation.pan'); goog.require('ol.animation.rotate'); @@ -12,9 +13,12 @@ goog.require('ol.easing'); /** * @constructor + * @extends {goog.Disposable} */ ol.interaction.Interaction = function() { + goog.base(this); }; +goog.inherits(ol.interaction.Interaction, goog.Disposable); /**
Let's at least be disposable, so we can clean up after ourselves
openlayers_openlayers
train
js
4d1d4c6730c2d09ec387267f5eebbcc24f70ed38
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup setup( name='requests-facebook', - version='0.3.0', + version='0.4.0', install_requires=['requests>=1.0.0'], author='Mike Helmick', author_email='me@michaelhelmick.com',
Upgrade requests-facebook version to <I>
michaelhelmick_requests-facebook
train
py
f5a83dc82808487bf16ad8c1d4edaa9b5385e3d6
diff --git a/src/Illuminate/Collections/LazyCollection.php b/src/Illuminate/Collections/LazyCollection.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Collections/LazyCollection.php +++ b/src/Illuminate/Collections/LazyCollection.php @@ -1274,7 +1274,7 @@ class LazyCollection implements CanBeEscapedWhenCastToString, Enumerable /** * Sort through each item with a callback. * - * @param (callable(TValue, TValue): bool)|null|int $callback + * @param (callable(TValue, TValue): int)|null|int $callback * @return static */ public function sort($callback = null) diff --git a/types/Support/LazyCollection.php b/types/Support/LazyCollection.php index <HASH>..<HASH> 100644 --- a/types/Support/LazyCollection.php +++ b/types/Support/LazyCollection.php @@ -627,7 +627,7 @@ assertType('Illuminate\Support\LazyCollection<int, User>', $collection->sort(fun assertType('User', $userA); assertType('User', $userB); - return true; + return 1; })); assertType('Illuminate\Support\LazyCollection<int, User>', $collection->sort());
Update type in LazyCollection as well
laravel_framework
train
php,php
0dd8ba414f7cd1ab1019b0760d6d252d4bd42067
diff --git a/exporters/readers/hubstorage_reader.py b/exporters/readers/hubstorage_reader.py index <HASH>..<HASH> 100644 --- a/exporters/readers/hubstorage_reader.py +++ b/exporters/readers/hubstorage_reader.py @@ -57,7 +57,6 @@ class HubstorageReader(BaseReader): self.read_option('project_id'), self.read_option('collection_name'))) self.last_position = 0 - @retry(wait_exponential_multiplier=500, wait_exponential_max=10000, stop_max_attempt_number=10) def scan_collection(self): return next(self.batches)
remove line without effect (connection issues and retry are already handled by collection scanner)
scrapinghub_exporters
train
py