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
|
---|---|---|---|---|---|
6bc735a903393d7b129409e7747635ebf5d49bab | diff --git a/lib/rooted_tree/version.rb b/lib/rooted_tree/version.rb
index <HASH>..<HASH> 100644
--- a/lib/rooted_tree/version.rb
+++ b/lib/rooted_tree/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module RootedTree
- VERSION = '0.2.3'
+ VERSION = '0.3.0'
end | Bumped minor version number to signify breaking API changes | seblindberg_ruby-rooted_tree | train | rb |
489ed94d24a7c1d0ffe4f885786853be46e9e793 | diff --git a/src/main/java/com/jayway/maven/plugins/android/phase09package/ApkMojo.java b/src/main/java/com/jayway/maven/plugins/android/phase09package/ApkMojo.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/jayway/maven/plugins/android/phase09package/ApkMojo.java
+++ b/src/main/java/com/jayway/maven/plugins/android/phase09package/ApkMojo.java
@@ -97,6 +97,14 @@ public class ApkMojo extends AbstractAndroidMojo {
* @readonly
*/
private String signDebug;
+
+ /**
+ * <p>A possibly new package name for the application. This value will be passed on to the aapt
+ * parameter --rename-manifest-package. Look to aapt for more help on this. </p>
+ *
+ * @parameter expression="${android.renameManifestPackage}"
+ */
+ private String renameManifestPackage;
/**
* <p>Root folder containing native libraries to include in the application package.</p>
@@ -756,6 +764,11 @@ public class ApkMojo extends AbstractAndroidMojo {
commands.add("-A");
commands.add(combinedAssets.getAbsolutePath());
}
+
+ if (StringUtils.isNotBlank(renameManifestPackage)) {
+ commands.add("--rename-manifest-package");
+ commands.add(renameManifestPackage);
+ }
commands.add("-I");
commands.add(androidJar.getAbsolutePath()); | Fix issue-<I>. Added possibility to specify a custom application package name on commandline (-Dandroid.renameManifestPackage=my.new.package) or in the plugin's configuration (<renameManifestPackage>my.new.package</renameManifestPackage>) | simpligility_android-maven-plugin | train | java |
1f3d3dcd675c3d93d13f53a2e886ade7d9c4d619 | diff --git a/lib/specinfra/version.rb b/lib/specinfra/version.rb
index <HASH>..<HASH> 100644
--- a/lib/specinfra/version.rb
+++ b/lib/specinfra/version.rb
@@ -1,3 +1,3 @@
module Specinfra
- VERSION = "2.70.1"
+ VERSION = "2.70.2"
end | Bump up version
[skip ci] | mizzy_specinfra | train | rb |
28e6d52860bb9857cd3ae69059d7975404dbbf73 | diff --git a/lib/models/providers/push/zeropush.js b/lib/models/providers/push/zeropush.js
index <HASH>..<HASH> 100644
--- a/lib/models/providers/push/zeropush.js
+++ b/lib/models/providers/push/zeropush.js
@@ -20,11 +20,11 @@ function ZeroPush(keys){
this.send = function(data, callback) {
var context = this;
+ var zeropushStat;
var deviceType = getType(data.deviceType);
var notification = getNotificationObject(deviceType, data.message);
context.client.register([data.deviceToken], function(err, response) {
- var zeropushStat;
if (err) {
zeropushStat = new ZeroPushErrorStatus(err); | Refactor.
for #<I> | TeamLifecycle_venn-messaging-node | train | js |
9a99c28c7def108877f160ff1f3d5f85aa05853e | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='soundscrape',
- version='0.15.1',
+ version='0.15.2',
packages=['soundscrape'],
install_requires=required,
include_package_data=True,
diff --git a/soundscrape/soundscrape.py b/soundscrape/soundscrape.py
index <HASH>..<HASH> 100755
--- a/soundscrape/soundscrape.py
+++ b/soundscrape/soundscrape.py
@@ -204,6 +204,9 @@ def tag_file(filename, artist, title, year, genre, artwork_url, album=None, trac
audio.save()
if artwork_url:
+
+ artwork_url = artwork_url.replace('https', 'http')
+
mime = 'image/jpeg'
if '.jpg' in artwork_url:
mime = 'image/jpeg' | <I> - security downgrade but SC https is maybe broken? or my system is fucked tx nsa | Miserlou_SoundScrape | train | py,py |
f6c96309c741b4826ec8234b5514b4c990ad6438 | diff --git a/ombutil/appdata.go b/ombutil/appdata.go
index <HASH>..<HASH> 100644
--- a/ombutil/appdata.go
+++ b/ombutil/appdata.go
@@ -62,11 +62,8 @@ func appDataDir(goos, appName string, roaming bool) string {
}
case "darwin":
- if homeDir != "" {
- return filepath.Join("Library",
- "Application Support", appNameUpper)
- }
-
+ return filepath.Join("/", "Library",
+ "Application Support", appNameUpper)
case "plan9":
if homeDir != "" {
return filepath.Join(homeDir, appNameLower) | Added leading slash.
Commit without comment... | soapboxsys_ombudslib | train | go |
45dab57237125345e93830ff1ac72c4a9e9c8771 | diff --git a/plans/contrib.py b/plans/contrib.py
index <HASH>..<HASH> 100644
--- a/plans/contrib.py
+++ b/plans/contrib.py
@@ -38,7 +38,7 @@ def send_template_email(recipients, title_template, body_template, context, lang
mail_title_template = loader.get_template(title_template)
mail_body_template = loader.get_template(body_template)
- title = mail_title_template.render(context)
+ title = mail_title_template.render(context).strip()
body = mail_body_template.render(context)
try:
mail_body_template_html = loader.get_template(body_template.replace('.txt', '.html')) | be less restrictive on mail title templates newlines | django-getpaid_django-plans | train | py |
a150b54104f82a4da09eb449c7f53c0e99b0abc7 | diff --git a/app/controllers/thredded/topics_controller.rb b/app/controllers/thredded/topics_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/thredded/topics_controller.rb
+++ b/app/controllers/thredded/topics_controller.rb
@@ -203,12 +203,6 @@ module Thredded
@messageboard = topic.messageboard
end
- def topic_params
- params
- .require(:topic)
- .permit(:title, :locked, :sticky, category_ids: [])
- end
-
def topic_params_for_update
params
.require(:topic) | remove unused method (#<I>) | thredded_thredded | train | rb |
9428c5a7a43fa30081f7fa15364d0aab70fb5d6a | diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go
index <HASH>..<HASH> 100644
--- a/test/integration/addons_test.go
+++ b/test/integration/addons_test.go
@@ -56,7 +56,7 @@ func TestAddons(t *testing.T) {
return nil
}
- if err := commonutil.RetryAfter(10, checkAddon, 5*time.Second); err != nil {
+ if err := commonutil.RetryAfter(20, checkAddon, 5*time.Second); err != nil {
t.Fatalf("Addon Manager pod is unhealthy: %s", err)
}
} | Increase the timeout on the addon manager pod. | kubernetes_minikube | train | go |
240b0d7d45005a3faaf701e9095172888dc48ce4 | diff --git a/rules/predicates.py b/rules/predicates.py
index <HASH>..<HASH> 100644
--- a/rules/predicates.py
+++ b/rules/predicates.py
@@ -298,8 +298,8 @@ def is_group_member(*groups):
def fn(user):
if not hasattr(user, 'groups'):
return False # swapped user model, doesn't support groups
- if not hasattr(user, '_group_names_cache'): # pragma: no cover
- user._group_names_cache = set(user.groups.values_list('name', flat=True))
- return set(groups).issubset(user._group_names_cache)
+ group_names = set(user.groups.values_list('name', flat=True))
+ user._group_names_cache = group_names # just in case people were using this
+ return set(groups).issubset(group_names)
return fn | Fixed undesired caching in `is_group_member` factory
Fixes #<I> | dfunckt_django-rules | train | py |
0a46d4e57b77019751696ae3191722f49a051ebe | diff --git a/ezp/content/services/trash.php b/ezp/content/services/trash.php
index <HASH>..<HASH> 100644
--- a/ezp/content/services/trash.php
+++ b/ezp/content/services/trash.php
@@ -11,6 +11,13 @@
/**
* Trash service, used for content trash handling
+ *
+ * Notes:
+ * Moving to trash is currently the same as moving to a custom subtree, not directly visible from the outside.
+ * When a Content is moved to the trash, it should remember its previous locations, so that it can be moved there
+ * again if restored. We therefore most likely need extra informations in order to be able to do that.
+ * Is it possible to achieve this in the business layer only, or do we need extra storage ?
+ *
* @package Content
* @subpackage Services
*/ | Added notes to Content/Services/Trash | ezsystems_ezpublish-kernel | train | php |
460232f3024bfe729902846b6672abc59846174a | diff --git a/lib/simpletest/testnavigationlib.php b/lib/simpletest/testnavigationlib.php
index <HASH>..<HASH> 100644
--- a/lib/simpletest/testnavigationlib.php
+++ b/lib/simpletest/testnavigationlib.php
@@ -46,6 +46,8 @@ class navigation_node_test extends UnitTestCase {
parent::setUp();
$this->activeurl = $PAGE->url;
+ navigation_node::override_active_url($this->activeurl);
+
$this->inactiveurl = new moodle_url('http://www.moodle.com/');
$this->fakeproperties['action'] = $this->inactiveurl; | navigation MDL-<I> Attempting to fix navigation simpletests | moodle_moodle | train | php |
79f4466b4a48b990232ecf40f9a05af8be7583f3 | diff --git a/test/mactag/tag/parser_test.rb b/test/mactag/tag/parser_test.rb
index <HASH>..<HASH> 100644
--- a/test/mactag/tag/parser_test.rb
+++ b/test/mactag/tag/parser_test.rb
@@ -22,16 +22,16 @@ class ParserTest < ActiveSupport::TestCase
setup do
File.stubs(:directory?).returns(true)
end
-
+
context 'none' do
setup do
- Mactag::Tag::Plugin.stubs(:all).returns([])
-
+ Mactag::Tag::Plugin.stubs(:all).returns(['devise'])
+
@parser.plugin
end
should 'have correct tag' do
- assert_equal [], tags
+ assert_equal 'vendor/plugins/devise/lib/**/*.rb', tags.first.tag
end
end | Actually, let there be a plugin in this test. | rejeep_mactag | train | rb |
526cba85e3baca936b918abb7e7867c110d81ff6 | diff --git a/src/Models/Concerns/HasMemberOf.php b/src/Models/Concerns/HasMemberOf.php
index <HASH>..<HASH> 100644
--- a/src/Models/Concerns/HasMemberOf.php
+++ b/src/Models/Concerns/HasMemberOf.php
@@ -148,7 +148,7 @@ trait HasMemberOf
*/
public function inGroup($group, $recursive = false)
{
- $memberOf = $this->getGroups(['*'], $recursive);
+ $memberOf = $this->getGroups(['cn'], $recursive);
if ($group instanceof Collection) {
// If we've been given a collection then we'll convert | Optimize inGroup method
Only request the common name from groups. | Adldap2_Adldap2 | train | php |
e67bc4d400fa97a325cf61c42a11fbc0fa8c80aa | diff --git a/src/super_archives/models.py b/src/super_archives/models.py
index <HASH>..<HASH> 100644
--- a/src/super_archives/models.py
+++ b/src/super_archives/models.py
@@ -326,10 +326,7 @@ class Message(models.Model):
@property
def author(self):
- from_address = self.from_address
- if from_address.user:
- return from_address.user.username
- return None
+ return self.fullname
@property
def author_url(self):
@@ -338,6 +335,10 @@ class Message(models.Model):
return None
@property
+ def fullname(self):
+ return self.from_address.get_full_name()
+
+ @property
def icon_name(self):
return u'envelope' | adding a fullname property to messages | colab_colab | train | py |
d5f45cdef3872d03d555f9906ca3bdc8b48e307e | diff --git a/txdbus/interface.py b/txdbus/interface.py
index <HASH>..<HASH> 100644
--- a/txdbus/interface.py
+++ b/txdbus/interface.py
@@ -38,10 +38,10 @@ class Method (object):
self.sigOut = returns
if arguments.count('h') > 1:
# More than one UNIX_FD argument requires Twisted >= 17.1.0.
- minTxVersion = type(twisted.version)('twisted', 17, 1, 0)
- if twisted.version < minTxVersion:
+ minTxVersion = '17.1.0'
+ if twisted.version.base() < minTxVersion:
raise RuntimeError('Method %r with multiple UNIX_FD arguments '
- 'requires Twisted >= %s' % (name, minTxVersion.short()))
+ 'requires Twisted >= %s' % (name, minTxVersion))
class Signal (object): | Simpler Twisted version check for multi FD arg support. | cocagne_txdbus | train | py |
bd6455e0c29ac25255adeeecfc19505edf86209f | diff --git a/plugins/debug/debugPanel.js b/plugins/debug/debugPanel.js
index <HASH>..<HASH> 100644
--- a/plugins/debug/debugPanel.js
+++ b/plugins/debug/debugPanel.js
@@ -590,13 +590,14 @@
}
// draw the panel
- renderer.setColor("#00000080");
+ renderer.setGlobalAlpha(0.5);
+ renderer.setColor("black");
renderer.fillRect(
this.left, this.top,
this.width, this.height
);
-
- renderer.setColor("#FFFFFFFF");
+ renderer.setGlobalAlpha(1.0);
+ renderer.setColor("white");
this.font.textAlign = "left";
diff --git a/src/video/webgl/webgl_renderer.js b/src/video/webgl/webgl_renderer.js
index <HASH>..<HASH> 100644
--- a/src/video/webgl/webgl_renderer.js
+++ b/src/video/webgl/webgl_renderer.js
@@ -514,7 +514,9 @@
* @param {me.Color|String} color css color string.
*/
setColor : function (color) {
+ var alpha = this.currentColor.glArray[3];
this.currentColor.copy(color);
+ this.currentColor.glArray[3] *= alpha;
},
/** | [#<I>][WebGL] multiply the new currentColor alpha with the previous globalAlpha value
also restored the previous debugPanel setColor usage, as a testcase, and
to align both the canvas and wegbl rendering. | melonjs_melonJS | train | js,js |
8b07909fcdb426ca8c7106def03abc8babe43777 | diff --git a/lib/rdo/connection.rb b/lib/rdo/connection.rb
index <HASH>..<HASH> 100644
--- a/lib/rdo/connection.rb
+++ b/lib/rdo/connection.rb
@@ -101,7 +101,7 @@ module RDO
rs.info[:execution_time] ||= Time.now - t
if logger.debug?
logger.debug(
- "(%.6f) %s%s" % [
+ "(%.6f) %s %s" % [
rs.execution_time,
statement,
("<Bind: #{bind_values.inspect}>" unless bind_values.empty?)
diff --git a/lib/rdo/version.rb b/lib/rdo/version.rb
index <HASH>..<HASH> 100644
--- a/lib/rdo/version.rb
+++ b/lib/rdo/version.rb
@@ -6,5 +6,5 @@
##
module RDO
- VERSION = "0.1.4"
+ VERSION = "0.1.5"
end | Fix logger format inconsistency | d11wtq_rdo | train | rb,rb |
dcc060a5a522bc9fa5d8560eb6e72ea25138e828 | diff --git a/src/main/core.js b/src/main/core.js
index <HASH>..<HASH> 100644
--- a/src/main/core.js
+++ b/src/main/core.js
@@ -259,7 +259,7 @@ function format(text, opts) {
module.exports = {
formatWithCursor(text, opts) {
opts = normalizeOptions(opts);
- return format(text, normalizeOptions(opts));
+ return format(text, opts);
},
parse(text, opts, massage) { | refactor: remove redundant call to normalizeOptions (#<I>)
Removes redundant call to `normalizeOptions` (already done in preceding line)
<URL> | josephfrazier_prettier_d | train | js |
26b182b01d880d90c16c229636c3d67692fa0701 | diff --git a/tsfresh/feature_extraction/extraction.py b/tsfresh/feature_extraction/extraction.py
index <HASH>..<HASH> 100644
--- a/tsfresh/feature_extraction/extraction.py
+++ b/tsfresh/feature_extraction/extraction.py
@@ -104,7 +104,7 @@ def extract_features(timeseries_container, feature_extraction_settings=None,
sorting=feature_extraction_settings.PROFILING_SORTING)
pool.close()
- pool.terminate()
+ pool.join()
return result
diff --git a/tsfresh/feature_selection/feature_selector.py b/tsfresh/feature_selection/feature_selector.py
index <HASH>..<HASH> 100644
--- a/tsfresh/feature_selection/feature_selector.py
+++ b/tsfresh/feature_selection/feature_selector.py
@@ -120,7 +120,7 @@ def check_fs_sig_bh(X, y, settings=None):
df_features.update(p_values_of_features)
pool.close()
- pool.terminate()
+ pool.join()
# Perform the real feature rejection
if "const" in set(df_features.type): | Wait for the worker processes to exit (#<I>)
This fixes Issue #<I> | blue-yonder_tsfresh | train | py,py |
137466c4a7c37e182d06711d59c8396bee188c9f | diff --git a/absl/testing/absltest.py b/absl/testing/absltest.py
index <HASH>..<HASH> 100644
--- a/absl/testing/absltest.py
+++ b/absl/testing/absltest.py
@@ -434,15 +434,21 @@ class TestCase(unittest3_backport.TestCase):
if six.PY2:
def assertCountEqual(self, expected_seq, actual_seq, msg=None):
- """An unordered sequence specific comparison.
+ """Tests two sequences have the same elements regardless of order.
- It asserts that actual_seq and expected_seq have the same element counts.
- Equivalent to::
+ It tests that the first sequence contains the same elements as the
+ second, regardless of their order. When they don't, an error message
+ listing the differences between the sequences will be generated.
- self.assertEqual(Counter(iter(actual_seq)),
- Counter(iter(expected_seq)))
+ Duplicate elements are not ignored when comparing first and second.
+ It verifies whether each element has the same count in both sequences.
+ Equivalent to:
+
+ self.assertEqual(Counter(list(expected_seq)),
+ Counter(list(actual_seq)))
+
+ but works with sequences of unhashable objects as well.
- Asserts that each element has the same count in both sequences.
Example:
- [0, 1, 1] and [1, 0, 1] compare equal.
- [0, 0, 1] and [0, 1] compare unequal. | Update assertCountEqual's document, to match the one on <URL> | abseil_abseil-py | train | py |
035294e573b9397bbe2278e1666c54268562e7e0 | diff --git a/src/you_get/extractors/bilibili.py b/src/you_get/extractors/bilibili.py
index <HASH>..<HASH> 100644
--- a/src/you_get/extractors/bilibili.py
+++ b/src/you_get/extractors/bilibili.py
@@ -192,7 +192,12 @@ class Bilibili(VideoExtractor):
index_id = int(re.search(r'index_(\d+)', self.url).group(1))
cid = page_list[index_id-1]['cid'] # change cid match rule
except:
- cid = re.search(r'"cid":(\d+)', self.page).group(1)
+ page = re.search(r'p=(\d+)', self.url)
+ if page is None:
+ p = 1
+ else:
+ p = int(page.group(1))
+ cid = re.search(r'"cid":(\d+),"page":%s' % p, self.page).group(1)
if cid is not None:
self.download_by_vid(cid, re.search('bangumi', self.url) is not None, **kwargs)
else: | [bilibili] the production of too many useful things results in | soimort_you-get | train | py |
0064d69711eb32b8ea4db3577424e7fb87d8bac4 | diff --git a/testem.js b/testem.js
index <HASH>..<HASH> 100755
--- a/testem.js
+++ b/testem.js
@@ -44,6 +44,7 @@ program.on('--help', function(){
console.log(' q quit')
console.log(' LEFT ARROW move to the next browser tab on the left')
console.log(' RIGHT ARROW move to the next browser tab on the right')
+ console.log(' TAB switch between top and bottom panel (split mode only)')
console.log(' UP ARROW scroll up in the target text panel')
console.log(' DOWN ARROW scroll down in the target text panel')
console.log(' SPACE page down in the target text panel') | Added TAB to keyboard help. | testem_testem | train | js |
e2ecc6968eb4108a3c15d16898e60e0962eba9f8 | diff --git a/invocations/checks.py b/invocations/checks.py
index <HASH>..<HASH> 100644
--- a/invocations/checks.py
+++ b/invocations/checks.py
@@ -6,15 +6,21 @@ from __future__ import unicode_literals
from invoke import task
-@task(name='blacken', iterable=['folder'])
-def blacken(c, line_length=79, folder=None):
+
+@task(name="blacken", iterable=["folder"])
+def blacken(c, line_length=79, folder=None, check=False):
"""Run black on the current source"""
default_folders = ["."]
- configured_folders = c.config.get("blacken", {}).get("folders", default_folders)
+ configured_folders = c.config.get("blacken", {}).get(
+ "folders", default_folders
+ )
folders = configured_folders if not folder else folder
black_command_line = "black -l {0}".format(line_length)
+ if check:
+ black_command_line = "{0} --check".format(black_command_line)
+
cmd = "find {0} -name '*.py' | xargs {1}".format(
" ".join(folders), black_command_line
) | Add --check support to the invocations.blacken task | pyinvoke_invocations | train | py |
9f234cd7050a22662d32887fedf42288a909dd6b | diff --git a/salt/cloud/clouds/ec2.py b/salt/cloud/clouds/ec2.py
index <HASH>..<HASH> 100644
--- a/salt/cloud/clouds/ec2.py
+++ b/salt/cloud/clouds/ec2.py
@@ -2064,6 +2064,8 @@ def create(vm_=None, call=None):
)
)
vm_['key_filename'] = key_filename
+ # wait_for_instance requires private_key
+ vm_['private_key'] = key_filename
# Get SSH Gateway config early to verify the private_key,
# if used, exists or not. We don't want to deploy an instance | Fixed private_key missing in vm_ for wait_for_instance | saltstack_salt | train | py |
3938248c3b49ed24d19ab76ae545b4db17cb0226 | diff --git a/src/Channels/PushChannel.php b/src/Channels/PushChannel.php
index <HASH>..<HASH> 100644
--- a/src/Channels/PushChannel.php
+++ b/src/Channels/PushChannel.php
@@ -70,11 +70,7 @@ abstract class PushChannel
$feedback = $this->push->send()
->getFeedback();
- if (function_exists('broadcast')) {
- broadcast(new NotificationPushed($this->push));
- } elseif (function_exists('event')) {
- event(new NotificationPushed($this->push));
- }
+ $this->broadcast();
return $feedback;
}
@@ -126,9 +122,22 @@ abstract class PushChannel
abstract protected function buildData(PushMessage $message);
/**
+ * BroadCast NotificationPushed event
+ */
+ protected function broadcast()
+ {
+ if (function_exists('broadcast')) {
+ broadcast(new NotificationPushed($this->push));
+ } elseif (function_exists('event')) {
+ event(new NotificationPushed($this->push));
+ }
+ }
+
+ /**
* Get push notification service name.
*
* @return string
*/
abstract protected function pushServiceName();
+
} | Code Refactoring
Extract broadcasting action to a method | Edujugon_PushNotification | train | php |
0c1c475dd5a23ec50ca32b845c816530695eb3fe | diff --git a/llvmlite/binding/analysis.py b/llvmlite/binding/analysis.py
index <HASH>..<HASH> 100644
--- a/llvmlite/binding/analysis.py
+++ b/llvmlite/binding/analysis.py
@@ -58,10 +58,11 @@ def view_dot_graph(graph, filename=None, view=False):
else:
# Attempts to show the graph in IPython notebook
try:
- import IPython.display as display
- except ImportError:
+ __IPYTHON__
+ except NameError:
return src
else:
+ import IPython.display as display
format = 'svg'
return display.SVG(data=src.pipe(format)) | Detect if we are in ipython | numba_llvmlite | train | py |
c374ce4c000106e22982bce971ea292ddda82ea8 | diff --git a/lib/systemd/journal/version.rb b/lib/systemd/journal/version.rb
index <HASH>..<HASH> 100644
--- a/lib/systemd/journal/version.rb
+++ b/lib/systemd/journal/version.rb
@@ -1,6 +1,6 @@
module Systemd
class Journal
# The version of the systemd-journal gem.
- VERSION = '1.4.1'
+ VERSION = '1.4.2'.freeze
end
end | Update VERSION to <I> | ledbettj_systemd-journal | train | rb |
4336c21d462af11336fb1665064a36d32ba9bb55 | diff --git a/src/Context/RawMultilingualContext.php b/src/Context/RawMultilingualContext.php
index <HASH>..<HASH> 100644
--- a/src/Context/RawMultilingualContext.php
+++ b/src/Context/RawMultilingualContext.php
@@ -66,8 +66,6 @@ class RawMultilingualContext extends RawMinkContext implements MultilingualConte
}
$session = $this->getSession();
$element = $session->getPage()->find('css', $input);
- $text = "";
-
if(isset($element)) {
$text = $element->getValue();
}
@@ -132,7 +130,6 @@ class RawMultilingualContext extends RawMinkContext implements MultilingualConte
$session = $this->getSession();
$element = $session->getPage()->find('region', $region)->find('xpath', $session->getSelectorsHandler()->selectorToXpath('xpath',
'//*[contains(text(),"' . $text . '")]'));
-
if (null === $element) {
throw new \InvalidArgumentException(sprintf('Cannot find text: "%s"', $text));
} | Fixing code issues in RawContext. | toni-kolev_MultilingualExtension | train | php |
7639373d0118bb29f3823a92182bf79f5b444e0b | diff --git a/java/client/test/org/openqa/selenium/remote/StartingFirefoxRemotelyTest.java b/java/client/test/org/openqa/selenium/remote/StartingFirefoxRemotelyTest.java
index <HASH>..<HASH> 100644
--- a/java/client/test/org/openqa/selenium/remote/StartingFirefoxRemotelyTest.java
+++ b/java/client/test/org/openqa/selenium/remote/StartingFirefoxRemotelyTest.java
@@ -40,6 +40,7 @@ public class StartingFirefoxRemotelyTest extends JUnit4TestBase {
@BeforeClass
public static void ensureTestingFirefox() {
Assume.assumeTrue("ff".equals(System.getProperty("selenium.browser")));
+ Assume.assumeTrue(Boolean.getBoolean("selenium.browser.remote"));
}
@Before | Adding a guard for remote specific test | SeleniumHQ_selenium | train | java |
149881a01c5d109bf9c8235651d609b12094af75 | diff --git a/lib/Doctrine/Common/Collections/ArrayCollection.php b/lib/Doctrine/Common/Collections/ArrayCollection.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/Common/Collections/ArrayCollection.php
+++ b/lib/Doctrine/Common/Collections/ArrayCollection.php
@@ -347,7 +347,7 @@ class ArrayCollection implements Collection
*/
public function map(Closure $func)
{
- return new ArrayCollection(array_map($func, $this->_elements));
+ return new static(array_map($func, $this->_elements));
}
/**
@@ -359,7 +359,7 @@ class ArrayCollection implements Collection
*/
public function filter(Closure $p)
{
- return new ArrayCollection(array_filter($this->_elements, $p));
+ return new static(array_filter($this->_elements, $p));
}
/**
@@ -399,7 +399,7 @@ class ArrayCollection implements Collection
$coll2[$key] = $element;
}
}
- return array(new ArrayCollection($coll1), new ArrayCollection($coll2));
+ return array(new static($coll1), new static($coll2));
}
/** | Replaced "new ArrayCollection" with "new static". This allows subclasses to create new instances of the subclass | doctrine_annotations | train | php |
2ea1c0e9492371e7161b37f9d453d7544d708d8f | diff --git a/lib/netaddr.rb b/lib/netaddr.rb
index <HASH>..<HASH> 100644
--- a/lib/netaddr.rb
+++ b/lib/netaddr.rb
@@ -48,10 +48,10 @@ module NetAddr
## parse_net parses a string into an IPv4Net or IPv6Net
def parse_net(net)
- if (net.include?(".")) # ipv4
- return IPv4Net.parse(net)
+ if (net.include?(":"))
+ return IPv6Net.parse(net)
end
- return IPv6Net.parse(net)
+ return IPv4Net.parse(net)
end
module_function :parse_net
diff --git a/test/netaddr_test.rb b/test/netaddr_test.rb
index <HASH>..<HASH> 100644
--- a/test/netaddr_test.rb
+++ b/test/netaddr_test.rb
@@ -13,6 +13,7 @@ class TestNetAddr < Test::Unit::TestCase
def test_parse_net
assert_equal("128.0.0.1/32", NetAddr.parse_net("128.0.0.1/32").to_s)
assert_equal("1::/24", NetAddr.parse_net("1::1/24").to_s)
+ assert_equal("1::aabb:ccdd/128", NetAddr.parse_net("1::170.187.204.221/128").to_s)
end
def test_ipv4_prefix_len | Fix support for ipv4-embedded ipv6 networks | dspinhirne_netaddr-rb | train | rb,rb |
a7ac7b3239739ea1e0c7805760cb4464204244a6 | diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -2,6 +2,7 @@ require 'date'
require 'set'
require 'bigdecimal'
require 'bigdecimal/util'
+require 'active_support/core_ext/string/strip'
module ActiveRecord
module ConnectionAdapters #:nodoc: | Add missing AS require
`strip_heredoc` method is defined on active_support/core_ext/string | rails_rails | train | rb |
b267379bd9a95788f4e725f8c4d2a5447fcd2fb2 | diff --git a/cleverhans/picklable_model.py b/cleverhans/picklable_model.py
index <HASH>..<HASH> 100644
--- a/cleverhans/picklable_model.py
+++ b/cleverhans/picklable_model.py
@@ -1,5 +1,11 @@
-"""Models that support pickling
-
+"""Models that support pickling.
+
+NOTE: This module is much more free to change than many other modules
+in CleverHans. CleverHans is very conservative about changes to any
+code that affects the output of benchmark tests (attacks, evaluation
+methods, etc.). This module provides *models* not *benchmarks* and
+thus is free to change rapidly to provide better speed, accuracy,
+etc.
"""
from __future__ import absolute_import
diff --git a/cleverhans/train.py b/cleverhans/train.py
index <HASH>..<HASH> 100644
--- a/cleverhans/train.py
+++ b/cleverhans/train.py
@@ -1,3 +1,14 @@
+"""
+Multi-replica synchronous training
+
+
+NOTE: This module is much more free to change than many other modules
+in CleverHans. CleverHans is very conservative about changes to any
+code that affects the output of benchmark tests (attacks, evaluation
+methods, etc.). This module provides *model training* functionality
+not *benchmarks* and thus is free to change rapidly to provide better
+speed, accuracy, etc.
+"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function | disclaimers about fast-changing portions of codebase | tensorflow_cleverhans | train | py,py |
d41ebdc7a9f4de5d80a89485a4501b416b856a9e | diff --git a/app/models/web_console/console_session.rb b/app/models/web_console/console_session.rb
index <HASH>..<HASH> 100644
--- a/app/models/web_console/console_session.rb
+++ b/app/models/web_console/console_session.rb
@@ -104,4 +104,7 @@ module WebConsole
synchronize { INMEMORY_STORAGE[id] = self }
end
end
+
+ # Explicitly configue include_root_in_json for Rails 3 compatibility.
+ ConsoleSession.include_root_in_json = false
end | Explicitly configue include_root_in_json for Rails 3 compatibility | gsamokovarov_web-console-rails3 | train | rb |
534808bf2ba0de27d06c8e5fb7105fc9d9607f29 | diff --git a/public/js/runner/processor.js b/public/js/runner/processor.js
index <HASH>..<HASH> 100644
--- a/public/js/runner/processor.js
+++ b/public/js/runner/processor.js
@@ -74,11 +74,6 @@ var processor = (function () {
source = doctypeObj.tail;
combinedSource.push(doctype);
- // this ensures that requests are bounced away from
- // jsbin when they're relative. They shouldn't be
- // hitting jsbin directly for broken images, etc.
- combinedSource.push('<base href="//null.jsbin.com/">');
-
// Kill the blocking functions
// IE requires that this is done in the script, rather than off the window
// object outside of the doc.write. | Remove <base>
Note: this doesn't remove the null domain, this is now set as the runner: null.jsbin.com - but null.jsbin.com/runner *does* serve the correct file, and everything is else returned a <I> - so we're still protected.
Fixes #<I>
Fixes #<I>
Fixes #<I> | jsbin_jsbin | train | js |
9129bdf258f3c2ae67e375701a651291a1d2101f | diff --git a/wallace/command_line.py b/wallace/command_line.py
index <HASH>..<HASH> 100755
--- a/wallace/command_line.py
+++ b/wallace/command_line.py
@@ -79,7 +79,8 @@ def deploy(*args):
# Create the psiturk command script.
with open("psiturk_commands.txt", "w") as file:
- file.write("server on")
+ file.write("server restart")
+
# Commit the new files to the new experiment branch.
log("Inserting psiTurk- and Heroku-specfic files.") | Restart psiTurk server instead of turning it on | berkeley-cocosci_Wallace | train | py |
6f5d63faeae544336cb95f74421081ed29062ebb | diff --git a/greenmail-core/src/main/java/com/icegreen/greenmail/store/SimpleMessageAttributes.java b/greenmail-core/src/main/java/com/icegreen/greenmail/store/SimpleMessageAttributes.java
index <HASH>..<HASH> 100644
--- a/greenmail-core/src/main/java/com/icegreen/greenmail/store/SimpleMessageAttributes.java
+++ b/greenmail-core/src/main/java/com/icegreen/greenmail/store/SimpleMessageAttributes.java
@@ -738,7 +738,7 @@ public class SimpleMessageAttributes
}
public String escapeHeader(final String text) {
- return text.replace("\r", "\\\r").replace("\n", "\\\n").replace("\\", "\\\\").replace("\"", "\\\"");
+ return MimeUtility.unfold(text).replace("\\", "\\\\").replace("\"", "\\\"");
}
} | Use MimeUtility for unfolding. | greenmail-mail-test_greenmail | train | java |
71e06761f02c05faba6c7f03fb59077679b2e19d | diff --git a/test/spec/ol/layer/vectorlayer.test.js b/test/spec/ol/layer/vectorlayer.test.js
index <HASH>..<HASH> 100644
--- a/test/spec/ol/layer/vectorlayer.test.js
+++ b/test/spec/ol/layer/vectorlayer.test.js
@@ -170,12 +170,13 @@ describe('ol.layer.Vector', function() {
});
- layer.dispose();
+ goog.dispose(layer);
});
});
+goog.require('goog.dispose');
goog.require('ol.Expression');
goog.require('ol.Feature');
goog.require('ol.filter.Extent'); | Fix use of dispose in ol.layer.Vector tests | openlayers_openlayers | train | js |
7d26a0e1e1e0a2435a13c32df6eb1478561afead | diff --git a/lib/traject/marc4j_reader.rb b/lib/traject/marc4j_reader.rb
index <HASH>..<HASH> 100644
--- a/lib/traject/marc4j_reader.rb
+++ b/lib/traject/marc4j_reader.rb
@@ -51,11 +51,13 @@ class Traject::Marc4JReader
@input_stream = input_stream
ensure_marc4j_loaded!
-
- if @settings['marc4j_reader.keep_marc4j']
+
+ if @settings['marc4j_reader.keep_marc4j'] &&
+ ! (MARC::Record.instance_methods.include?(:original_marc4j) &&
+ MARC::Record.instance_methods.include?(:"original_marc4j="))
MARC::Record.class_eval('attr_accessor :original_marc4j')
end
-
+
end
# Loads solrj unless it appears to already be loaded. | Marc4JReader, original_marc4j, try not to monkey patch MARC::Record more than once | traject_traject | train | rb |
30226028434264af2f1b26285164485e2fa68cc4 | diff --git a/src/HttpFactory.php b/src/HttpFactory.php
index <HASH>..<HASH> 100644
--- a/src/HttpFactory.php
+++ b/src/HttpFactory.php
@@ -55,7 +55,7 @@ class HttpFactory
* @since 1.0
* @throws \InvalidArgumentException
*/
- public static function getAvailableDriver($options, $default = null)
+ public static function getAvailableDriver($options = array(), $default = null)
{
if (!is_array($options) && !($options instanceof \ArrayAccess))
{ | Make options param optional, not required to inject into TransportInterface objects | joomla-framework_http | train | php |
cd3c8faeeafeaac73311fab8f607e54136eac303 | diff --git a/lib/Client.js b/lib/Client.js
index <HASH>..<HASH> 100644
--- a/lib/Client.js
+++ b/lib/Client.js
@@ -131,6 +131,8 @@ Client.prototype.mergeRemoteConfig = function(callback) {
return cb(err);
}
+ self.config.web.forgotPassword.enabled = directory.passwordPolicy.resetEmailStatus === 'ENABLED';
+ self.config.web.changePassword.enabled = directory.passwordPolicy.resetEmailStatus === 'ENABLED';
self.config.web.verifyEmail.enabled = directory.accountCreationPolicy.verificationEmailStatus === 'ENABLED';
self.config.web.changePassword.enabled = self.config.web.forgotPassword.enabled = directory.passwordPolicy.resetEmailStatus === 'ENABLED'; | Updating Client config to merge in the password reset configuration options. | stormpath_stormpath-sdk-node | train | js |
b5c8d65525e682c37c158771a160280d5cbf88ea | diff --git a/tests/test_descriptions.py b/tests/test_descriptions.py
index <HASH>..<HASH> 100644
--- a/tests/test_descriptions.py
+++ b/tests/test_descriptions.py
@@ -35,6 +35,14 @@ type_defs = '''
"Chinese"
CH
}
+
+ """
+ A poorly documented object type.
+ """
+ type MyObject {
+ myField: String
+ transform(a: String): String
+ }
'''
@@ -67,3 +75,14 @@ def test_object_field_argument_has_description(schema):
translate_field = schema.get_type("Query").fields.get("translate")
argument = translate_field.args["fromLanguage"]
assert isinstance(argument.description, str)
+
+
+def test_undocumented_object_field_description_is_none(schema):
+ description = schema.get_type("MyObject").fields.get("myField").description
+ assert description is None
+
+
+def test_undocumented_object_field_argument_description_is_none(schema):
+ my_field = schema.get_type("MyObject").fields.get("transform")
+ description = my_field.args.get("a").description
+ assert description is None | Assert description is absent when not documented | mirumee_ariadne | train | py |
c355a0edf2d8c863ec2b621b07b31042f788ed5c | diff --git a/test/com/opera/core/systems/OperaDriverTest.java b/test/com/opera/core/systems/OperaDriverTest.java
index <HASH>..<HASH> 100644
--- a/test/com/opera/core/systems/OperaDriverTest.java
+++ b/test/com/opera/core/systems/OperaDriverTest.java
@@ -215,8 +215,10 @@ public class OperaDriverTest extends OperaDriverTestCase {
}
}
String profile = a.preferences().get("User Prefs", "Opera Directory").toString();
- assertTrue("'" + profile + "' (case insensitively) should contain 'tmp' or 'temp'",
- profile.toLowerCase().contains("tmp") || profile.toLowerCase().contains("temp"));
+ assertTrue("'" + profile + "' (case insensitively) should contain 'tmp', 'temp' or 'var/folders/ly'",
+ profile.toLowerCase().contains("tmp") ||
+ profile.toLowerCase().contains("temp") ||
+ profile.toLowerCase().contains("var/folders/ly"));
a.quit();
} | Apparently temporary folder on Mac is /var/folders | operasoftware_operaprestodriver | train | java |
19fc3dffe61b28cf4c03569dc359413f344afccd | diff --git a/src/rules/no-cycle.js b/src/rules/no-cycle.js
index <HASH>..<HASH> 100644
--- a/src/rules/no-cycle.js
+++ b/src/rules/no-cycle.js
@@ -22,7 +22,7 @@ module.exports = {
create: function (context) {
const myPath = context.getFilename()
- if (myPath === '<text>') return // can't cycle-check a non-file
+ if (myPath === '<text>') return {} // can't cycle-check a non-file
const options = context.options[0] || {}
const maxDepth = options.maxDepth || Infinity | [Fix] `no-cycle`: `create` must *always* return an object, even if there’s no listeners | benmosher_eslint-plugin-import | train | js |
d1b214f1ada21cdac36594743f63aebb3bc94e60 | diff --git a/src/test/java/org/jdbdt/DBTestCase.java b/src/test/java/org/jdbdt/DBTestCase.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/jdbdt/DBTestCase.java
+++ b/src/test/java/org/jdbdt/DBTestCase.java
@@ -84,7 +84,7 @@ public class DBTestCase {
protected static final User[] INITIAL_DATA = {
new User("linus", "Linus Torvalds", "linux", Date.valueOf("2015-01-01")),
- new User("steve", "Steve Hobs", "macos", Date.valueOf("2015-12-31")),
+ new User("steve", "Steve Jobs", "macos", Date.valueOf("2015-12-31")),
new User("bill", "Bill Gates", "windows", Date.valueOf("2015-09-12"))
}; | DBTestCase: small adjustment | JDBDT_jdbdt | train | java |
41219386268f670399a905c11e28b1ef76939ee1 | diff --git a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
+++ b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
@@ -74,6 +74,13 @@ module ActionDispatch
class AbstractStore < Rack::Session::Abstract::ID
include Compatibility
include StaleSessionCheck
+
+ private
+
+ def set_cookie(env, session_id, cookie)
+ request = ActionDispatch::Request.new(env)
+ request.cookie_jar[key] = cookie
+ end
end
end
end
diff --git a/actionpack/test/activerecord/active_record_store_test.rb b/actionpack/test/activerecord/active_record_store_test.rb
index <HASH>..<HASH> 100644
--- a/actionpack/test/activerecord/active_record_store_test.rb
+++ b/actionpack/test/activerecord/active_record_store_test.rb
@@ -254,6 +254,13 @@ class ActiveRecordStoreTest < ActionDispatch::IntegrationTest
end
end
+ def test_session_store_with_all_domains
+ with_test_route_set(:domain => :all) do
+ get '/set_session_value'
+ assert_response :success
+ end
+ end
+
private
def with_test_route_set(options = {}) | Support cookie jar options for all cookie stores | rails_rails | train | rb,rb |
789bfe1b9fab6b3fb47e71ff57e58802dae01620 | diff --git a/src/Bridge/AuthCodeRepository.php b/src/Bridge/AuthCodeRepository.php
index <HASH>..<HASH> 100644
--- a/src/Bridge/AuthCodeRepository.php
+++ b/src/Bridge/AuthCodeRepository.php
@@ -32,7 +32,7 @@ class AuthCodeRepository implements AuthCodeRepositoryInterface
'expires_at' => $authCodeEntity->getExpiryDateTime(),
];
- Passport::authCode()->setRawAttributes($attributes)->save();
+ Passport::authCode()->forceFill($attributes)->save();
}
/** | Change to forceFill. Fixes #<I>. (#<I>) | laravel_passport | train | php |
d84a0af6d96ae2c39ceed6521c8a5c0268b166ab | diff --git a/lib/chef/knife/backup_restore.rb b/lib/chef/knife/backup_restore.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/knife/backup_restore.rb
+++ b/lib/chef/knife/backup_restore.rb
@@ -133,7 +133,6 @@ module ServerBackup
def users
JSON.create_id = "no_thanks"
ui.info "=== Restoring users ==="
- password = SecureRandom.hex[0..7]
users = Dir.glob(File.join(config[:backup_dir], "users", "*.json"))
if !users.empty? and Chef::VERSION !~ /^1[1-9]\./
ui.warn "users restore only supported on chef >= 11"
@@ -141,6 +140,7 @@ module ServerBackup
end
users.each do |file|
user = JSON.parse(IO.read(file))
+ password = SecureRandom.hex[0..7]
begin
rest.post_rest("users", {
:name => user['name'], | Generate a new password on each round. | mdxp_knife-backup | train | rb |
5fed4c1f4b67b7337de4c9a01bd8e3c23e6a529f | diff --git a/paramiko/server.py b/paramiko/server.py
index <HASH>..<HASH> 100644
--- a/paramiko/server.py
+++ b/paramiko/server.py
@@ -579,6 +579,8 @@ class ServerInterface (object):
The default implementation always returns ``(None, None)``.
:returns: A tuple containing the banner and language code.
+
+ .. versionadded:: 2.3
"""
return (None, None) | Really, really gotta get better about enforcing these | paramiko_paramiko | train | py |
38c7da4888610648132e3ac781b8d05c740f50ed | diff --git a/src/IncomingEntry.php b/src/IncomingEntry.php
index <HASH>..<HASH> 100644
--- a/src/IncomingEntry.php
+++ b/src/IncomingEntry.php
@@ -243,6 +243,16 @@ class IncomingEntry
}
/**
+ * Determine if the incoming entry is a query.
+ *
+ * @return bool
+ */
+ public function isQuery()
+ {
+ return $this->type === EntryType::QUERY;
+ }
+
+ /**
* Get the family look-up hash for the incoming entry.
*
* @return string|null | improvement - Added isQuery() in IncomingEntry | laravel_telescope | train | php |
484bde10b3a67977f970b26a384bab3fb2b27dff | diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/RetryableZuulProxyApplicationTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/RetryableZuulProxyApplicationTests.java
index <HASH>..<HASH> 100644
--- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/RetryableZuulProxyApplicationTests.java
+++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/RetryableZuulProxyApplicationTests.java
@@ -43,7 +43,8 @@ import com.netflix.zuul.context.RequestContext;
value = {
"zuul.routes.simple.path: /simple/**",
"zuul.routes.simple.retryable: true",
- "ribbon.OkToRetryOnAllOperations: true"})
+ "ribbon.OkToRetryOnAllOperations: true",
+ "simple.ribbon.retryableStatusCodes: 404"})
@DirtiesContext
public class RetryableZuulProxyApplicationTests { | Adding <I> to list of retryable status codes | spring-cloud_spring-cloud-netflix | train | java |
4349a482d9364b50f9dfc964236bdee36ed26c3e | diff --git a/src/express/index.spec.js b/src/express/index.spec.js
index <HASH>..<HASH> 100644
--- a/src/express/index.spec.js
+++ b/src/express/index.spec.js
@@ -4,4 +4,22 @@ describe('graffiti express', function() {
var express = require('./');
+ it('checks for required options');
+
+ it('creates the schema');
+
+ describe('requested url starts with prefix', function() {
+
+ it('returns with proper results');
+
+ it('returns with an error');
+
+ });
+
+ describe('requested url does not start with prefix', function() {
+
+ it('calls the next middleware');
+
+ });
+
}); | test(express): add failing test cases for Express middleware | RisingStack_graffiti | train | js |
04d6b5301607af92263707a0fca0f3c640c8e6ac | diff --git a/pcapfile/structs.py b/pcapfile/structs.py
index <HASH>..<HASH> 100644
--- a/pcapfile/structs.py
+++ b/pcapfile/structs.py
@@ -54,7 +54,13 @@ class pcap_packet(ctypes.Structure):
return binascii.unhexlify(self.packet)
def __repr__(self):
- return self.raw()
+ if isinstance(self.packet, str):
+ try:
+ return self.raw()
+ except TypeError:
+ return str(self.packet)
+ else:
+ return str(self.packet) | pcap_packets have improved __repr__
if the packet is a string (i.e. not decoded), the packet will
still be represented as a string; otherwise, it is up to the
decoded packet type to choose display types. | kisom_pypcapfile | train | py |
eb8939ef9ebce097c0ef3ea1a42bebfdd66d7c9c | diff --git a/lib/pansophy/synchronizer.rb b/lib/pansophy/synchronizer.rb
index <HASH>..<HASH> 100644
--- a/lib/pansophy/synchronizer.rb
+++ b/lib/pansophy/synchronizer.rb
@@ -18,7 +18,9 @@ module Pansophy
next if directory?(file)
file_path = @local_directory.join(destination_for(file))
file_path.dirname.mkpath
- file_path.write(file.body)
+ File.open(file_path, 'w') do |f|
+ f.write file.body
+ end
end
end | Retrocompatibility for Ruby <I> and <I> | sealink_pansophy | train | rb |
9189e9f6abd09a36b2ed12097ad4e00dcecf2b6d | diff --git a/password/git.go b/password/git.go
index <HASH>..<HASH> 100644
--- a/password/git.go
+++ b/password/git.go
@@ -145,7 +145,7 @@ func (s *Store) gitCommit(msg string) error {
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
- return fmt.Errorf("failed to committ files to git: %v", err)
+ return fmt.Errorf("failed to commit files to git: %v", err)
}
return nil | Fix typo: committ -> commit (#<I>) | gopasspw_gopass | train | go |
70f5929ff8e64ed620485065128b3b8aad746acb | diff --git a/zengine/lib/catalog_data.py b/zengine/lib/catalog_data.py
index <HASH>..<HASH> 100644
--- a/zengine/lib/catalog_data.py
+++ b/zengine/lib/catalog_data.py
@@ -65,6 +65,18 @@ class CatalogData(object):
"""
return self._get_from_local_cache(cat) or self._get_from_cache(cat) or self._get_from_db(cat)
+ def get_all_as_dict(self, cat):
+ """
+ Transforms get_all method's results to key value pairs in dict.
+
+ Args:
+ cat(str): catalog data key name
+
+ Returns(dict): key-value pair dict.
+
+ """
+ return {item['value']: item['name'] for item in self.get_all(cat)}
+
def _get_from_cache(self, cat):
lang = self._get_lang()
self.CACHE[lang][cat] = CatalogCache(self._get_lang(), cat).get() | ADD, catalog_data_results as dict implementation is taken to under catalog data manager. | zetaops_zengine | train | py |
f245360049d35d2f8bd553156de2a234b117bbec | diff --git a/lib/server/serverJquery.js b/lib/server/serverJquery.js
index <HASH>..<HASH> 100644
--- a/lib/server/serverJquery.js
+++ b/lib/server/serverJquery.js
@@ -1,8 +1,15 @@
"use strict";
-var jsdom = require("jsdom").jsdom;
+var serverWindow = require("jsdom").jsdom().parentWindow;
-module.exports = require("jquery")(jsdom().parentWindow);
+/**
+ * [wawjr3d] next 2 lines fix issue here:
+ * https://github.com/bloomberg/brisket/issues/36
+ */
+serverWindow.HTMLFrameElement._init = function() {};
+serverWindow.HTMLIFrameElement._init = function() {};
+
+module.exports = require("jquery")(serverWindow);
// ----------------------------------------------------------------------------
// Copyright (C) 2015 Bloomberg Finance L.P. | fix iframe in View leaks on server side | brisket_brisket | train | js |
4708791cb3b13ffd400bde87cf0dfc954312fee9 | diff --git a/ctypeslib/codegen/codegenerator.py b/ctypeslib/codegen/codegenerator.py
index <HASH>..<HASH> 100644
--- a/ctypeslib/codegen/codegenerator.py
+++ b/ctypeslib/codegen/codegenerator.py
@@ -916,13 +916,13 @@ def generate_code(srcfiles,
# if we only want complete matches:
if match and match.group() == i.name:
todo.append(i)
- break
+ continue
# if we follow our own documentation,
# allow regular expression match of any part of name:
match = s.search(i.name)
if match:
todo.append(i)
- break
+ continue
if symbols or expressions:
items = todo | Allow more then one match when testing expressions | trolldbois_ctypeslib | train | py |
30d69e29857850577e5efe9a21e6ef819dfb3618 | diff --git a/public/js/main.js b/public/js/main.js
index <HASH>..<HASH> 100644
--- a/public/js/main.js
+++ b/public/js/main.js
@@ -156,7 +156,7 @@ $.extend(true, window, {
var type = aposPages.getType(typeName);
if (type.settings) {
- var $typeEl = apos.fromTemplate('.apos-page-settings-' + type._css);
+ var $typeEl = apos.fromTemplate('.apos-page-settings-' + type._typeCss);
$el.find('[data-type-details]').html($typeEl);
var typeDefaults = typeData[typeName];
if (!typeDefaults) { | A page type that has custom page settings must now have an _typeCss property. _css is unsuitable because page types may share an instance type | apostrophecms-legacy_apostrophe-pages | train | js |
0e8ead0262f004af34e063439bdc617b2b919d31 | diff --git a/aiohttp/helpers.py b/aiohttp/helpers.py
index <HASH>..<HASH> 100644
--- a/aiohttp/helpers.py
+++ b/aiohttp/helpers.py
@@ -6,7 +6,6 @@ import functools
import io
import os
import re
-import warnings
from urllib.parse import quote, urlencode
from collections import namedtuple
@@ -503,13 +502,9 @@ class Timeout:
else:
self._cancel_handler.cancel()
- def __del__(self):
- if self._task:
- # just for preventing improper usage
- warnings.warn("Use async with")
-
def _cancel_task(self):
self._cancelled = self._task.cancel()
def cancel(self):
+ """Stop counting time and timeout logic"""
self._cancel_handler.cancel() | drop __del__ method | aio-libs_aiohttp | train | py |
75b23bf37e315e203032e09093c64230a37560bf | diff --git a/lib/actions/ResourcesDeploy.js b/lib/actions/ResourcesDeploy.js
index <HASH>..<HASH> 100644
--- a/lib/actions/ResourcesDeploy.js
+++ b/lib/actions/ResourcesDeploy.js
@@ -164,7 +164,7 @@ usage: serverless resources deploy`,
.then(function(resources) {
_this.cfTemplate = resources;
- console.log(resources);
+
// Create CloudFormation template in _meta folder
return SUtils.writeFile(
path.join(_this.S.config.projectPath, '_meta', 'resources', 's-resources-cf-' + _this.evt.options.stage + '-' + replaceall('-', '', _this.evt.options.region) + '.json'), | removes `console.log` from ResourcesDeploy | serverless_serverless | train | js |
eb802cf6b198c78e3cedc7996b6d457c5fa90b3d | diff --git a/binder/src/main/java/io/grpc/binder/AndroidComponentAddress.java b/binder/src/main/java/io/grpc/binder/AndroidComponentAddress.java
index <HASH>..<HASH> 100644
--- a/binder/src/main/java/io/grpc/binder/AndroidComponentAddress.java
+++ b/binder/src/main/java/io/grpc/binder/AndroidComponentAddress.java
@@ -16,6 +16,7 @@
package io.grpc.binder;
+import static android.content.Intent.URI_ANDROID_APP_SCHEME;
import static com.google.common.base.Preconditions.checkArgument;
import android.content.ComponentName;
@@ -114,6 +115,13 @@ public class AndroidComponentAddress extends SocketAddress { // NOTE: Only tempo
return bindIntent.cloneFilter(); // Intent is mutable so return a copy.
}
+ /**
+ * Returns this address as an "android-app://" uri.
+ */
+ public String asAndroidAppUri() {
+ return bindIntent.toUri(URI_ANDROID_APP_SCHEME);
+ }
+
@Override
public int hashCode() {
return bindIntent.filterHashCode(); | Add an asAndroidAppUri() method to AndroidComponentAddress. (#<I>)
This returns the address as an "android-app://" uri, which can be
used with AndroidAppNameResolverProvider. | grpc_grpc-java | train | java |
42dcf8cef21f7fd805ac4b33802201cfcae16b07 | diff --git a/libre/urls.py b/libre/urls.py
index <HASH>..<HASH> 100644
--- a/libre/urls.py
+++ b/libre/urls.py
@@ -10,7 +10,6 @@ admin.autodiscover()
urlpatterns = patterns('',
- url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^', include('main.urls')), | Disabled the Django admin documentation generator, its setup is incomplete and not adding any additional value, should close issue #8. | commonwealth-of-puerto-rico_libre | train | py |
f42c16b612c4856df41bebb37d80429399c52462 | diff --git a/lnd_test.go b/lnd_test.go
index <HASH>..<HASH> 100644
--- a/lnd_test.go
+++ b/lnd_test.go
@@ -366,7 +366,7 @@ func calcStaticFee(numHTLCs int) btcutil.Amount {
const (
commitWeight = btcutil.Amount(724)
htlcWeight = 172
- feePerKw = btcutil.Amount(50/4) * 1000
+ feePerKw = btcutil.Amount(50 * 1000 / 4)
)
return feePerKw * (commitWeight +
btcutil.Amount(htlcWeight*numHTLCs)) / 1000 | lnd test: ensure static fee is not rounded down | lightningnetwork_lnd | train | go |
4dfac2aa7737227265ff7d25cddae5557e717e09 | diff --git a/spotify/__init__.py b/spotify/__init__.py
index <HASH>..<HASH> 100644
--- a/spotify/__init__.py
+++ b/spotify/__init__.py
@@ -5,7 +5,7 @@ from .models import *
from .client import Client
from .models import SpotifyBase
-__version__ = '0.4.4' # noqa
+__version__ = '0.4.5' # noqa
from .http import HTTPClient, HTTPUserClient | bump patch version
I should seriously setup a CI/CD pipeline right about now. | mental32_spotify.py | train | py |
ac024f41affb95f6894e28fcd2cb4fe2fbfcfe0d | diff --git a/src/edit/input.js b/src/edit/input.js
index <HASH>..<HASH> 100644
--- a/src/edit/input.js
+++ b/src/edit/input.js
@@ -107,7 +107,7 @@ export function dispatchKey(pm, name, e) {
} else {
result = bound(pm)
}
- return result
+ return result == false ? false : "handled"
}
let result
diff --git a/src/edit/main.js b/src/edit/main.js
index <HASH>..<HASH> 100644
--- a/src/edit/main.js
+++ b/src/edit/main.js
@@ -29,7 +29,7 @@ import {normalizeKeyName} from "./keys"
// representing that document in the browser document.
//
// Contains event methods (`on`, etc) from the [event
-// mixin](#eventMixin).
+// mixin](#EventMixin).
export class ProseMirror {
// :: (Object)
// Construct a new editor from a set of [options](#edit_options) | Fix preventing of default for handled keys | ProseMirror_prosemirror-markdown | train | js,js |
5ef8afc4c3cd5813a264209b64d87e1f66fd6fc8 | diff --git a/tests/test_type.py b/tests/test_type.py
index <HASH>..<HASH> 100644
--- a/tests/test_type.py
+++ b/tests/test_type.py
@@ -127,7 +127,7 @@ def test_bot_data_fields(bot_data: types.BotData) -> None:
for attr in bot_data:
if "id" in attr.lower():
assert isinstance(bot_data[attr], int) or bot_data[attr] is None
- elif isinstance(attr, list) and attr in ("owners", "guilds"):
+ elif attr in ("owners", "guilds"):
for item in bot_data[attr]:
assert isinstance(item, int)
assert bot_data.get(attr) == bot_data[attr] == getattr(bot_data, attr) | Remove redundant (and not working) check in tests | DiscordBotList_DBL-Python-Library | train | py |
946fa9807b52bfccc4f35ac44a379d1cb2ec6efb | diff --git a/lib/core/engine/index.js b/lib/core/engine/index.js
index <HASH>..<HASH> 100644
--- a/lib/core/engine/index.js
+++ b/lib/core/engine/index.js
@@ -31,7 +31,7 @@ function addExtraFieldsToHar(totalResults, har, options) {
if (har) {
for (let pageNumber = 0; pageNumber < totalResults.length; pageNumber++) {
for (let iteration = 0; iteration < options.iterations; iteration++) {
- const page = har.log.pages[pageNumber];
+ const page = har.log.pages[iteration + pageNumber];
const visualMetric = totalResults[pageNumber].visualMetrics[iteration];
const browserScript =
totalResults[pageNumber].browserScripts[iteration]; | pick correct HAR page when inserting extra content | sitespeedio_browsertime | train | js |
cfe87ac764e8947b067dea82ed811de6081b153f | diff --git a/pylatex/utils.py b/pylatex/utils.py
index <HASH>..<HASH> 100644
--- a/pylatex/utils.py
+++ b/pylatex/utils.py
@@ -9,6 +9,7 @@ _latex_special_chars = {
'~': r'\lettertilde{}',
'^': r'\letterhat{}',
'\\': r'\letterbackslash{}',
+ '\n': r'\\\\',
} | Add \n to the escape character list | JelteF_PyLaTeX | train | py |
ad47e33314b3ecbaddf158faa08888339d22eb28 | diff --git a/metric_tank/http.go b/metric_tank/http.go
index <HASH>..<HASH> 100644
--- a/metric_tank/http.go
+++ b/metric_tank/http.go
@@ -90,7 +90,7 @@ func Get(w http.ResponseWriter, req *http.Request, metaCache *MetaCache, aggSett
out := make([]Series, len(targets))
for i, target := range targets {
var consolidateBy string
- var id string
+ id := target
// yes, i am aware of the arguably grossness of the below.
// however, it is solid based on the documented allowed input format.
// once we need to support several functions, we can implement | fix: set id properly in non-consolidation case | grafana_metrictank | train | go |
a5a1b2c24d77f9b67146466c9e7dd2fe7680dc11 | diff --git a/lib/hancock-client.rb b/lib/hancock-client.rb
index <HASH>..<HASH> 100644
--- a/lib/hancock-client.rb
+++ b/lib/hancock-client.rb
@@ -13,13 +13,9 @@ module Hancock
module Client
class Default < ::Sinatra::Default
enable :sessions
- cattr_accessor :sso_url
+ set :sso_url, nil
register Sinatra::Hancock::SSO
-
- def self.sso_configure(&block)
- yield self
- end
end
end
end | move from a cattr_accessor to the built in sinatra configuration options | atmos_hancock-client | train | rb |
4452583a8427b30369905ecb33a502c5fc8ae643 | diff --git a/msm/util.py b/msm/util.py
index <HASH>..<HASH> 100644
--- a/msm/util.py
+++ b/msm/util.py
@@ -97,7 +97,7 @@ class cached_property(object):
return self
def __get__(self, inst, owner):
- now = time.time()
+ now = time.monotonic()
try:
value, last_update = inst._cache[self.__name__]
if self.ttl > 0 and now - last_update > self.ttl: | changed cached property recipe to use time.monotonic instead of time.time | MycroftAI_mycroft-skills-manager | train | py |
6a15f301a0c4aeab759b331fada1a3777c02005d | diff --git a/lib/natural/classifiers/classifier.js b/lib/natural/classifiers/classifier.js
index <HASH>..<HASH> 100644
--- a/lib/natural/classifiers/classifier.js
+++ b/lib/natural/classifiers/classifier.js
@@ -34,6 +34,15 @@ var Classifier = function(classifier, stemmer) {
};
function addDocument(text, classification) {
+
+ // Ignore further processing if classification is undefined
+ if(typeof classification === 'undefined') return;
+
+ // If classification is type of string then make sure it's dosen't have blank space at both end
+ if(typeof classification === 'sytring'){
+ classification = classification.trim();
+ }
+
if(typeof text === 'string')
text = this.stemmer.tokenizeAndStem(text); | Checked for undefined and blank spaces in label
Added check for undefined and blank spaces at in string (beginning and end) in classification label | NaturalNode_natural | train | js |
d4676a17766fec4215071aa0511d04c8bf2ccb9d | diff --git a/productmd/composeinfo.py b/productmd/composeinfo.py
index <HASH>..<HASH> 100644
--- a/productmd/composeinfo.py
+++ b/productmd/composeinfo.py
@@ -22,6 +22,12 @@
This module provides classes for manipulating composeinfo.json files.
composeinfo.json files provide details about composes which includes
product information, variants, architectures and paths.
+
+Example::
+
+ import productmd.compose
+ compose = productmd.compose.Compose("/path/to/compose")
+ print(compose.info.compose.id) # prints "Fedora-Rawhide-20180616.n.0"
"""
@@ -238,6 +244,12 @@ def cmp_label(label1, label2):
class Compose(productmd.common.MetadataBase):
+ """
+ This class represents the top level of metadata for a compose.
+
+ It provides access to general information about the compose (ID, type,
+ date, etc.) and structures with RPMs and images.
+ """
def __init__(self, metadata):
super(Compose, self).__init__() | composeinfo: add docs for Compose class
Document what the composeinfo.Compose class is and how to use it. | release-engineering_productmd | train | py |
a0dfe319ae8c834cc4257ef7be4aa0982490d9a0 | diff --git a/kafka/protocol/types.py b/kafka/protocol/types.py
index <HASH>..<HASH> 100644
--- a/kafka/protocol/types.py
+++ b/kafka/protocol/types.py
@@ -155,6 +155,8 @@ class Array(AbstractType):
raise ValueError('Array instantiated with no array_of type')
def encode(self, items):
+ if items is None:
+ return Int32.encode(-1)
return b''.join(
[Int32.encode(len(items))] +
[self.array_of.encode(item) for item in items]
@@ -162,7 +164,11 @@ class Array(AbstractType):
def decode(self, data):
length = Int32.decode(data)
+ if length == -1:
+ return None
return [self.array_of.decode(data) for _ in range(length)]
def repr(self, list_of_items):
+ if list_of_items is None:
+ return 'NULL'
return '[' + ', '.join([self.array_of.repr(item) for item in list_of_items]) + ']' | Add protocol support for null Arrays | dpkp_kafka-python | train | py |
e2c11647205188bee60fb1fa8b06798b874d7416 | 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.8.2';
+ const VERSION = '2.8.3';
} | <I> - so much progress | matomo-org_matomo | train | php |
afad9080677fd1eb891238cb64f905338d8e972c | diff --git a/py/setup.py b/py/setup.py
index <HASH>..<HASH> 100755
--- a/py/setup.py
+++ b/py/setup.py
@@ -32,7 +32,7 @@ setup_args = {
'description': 'Python bindings for Selenium',
'long_description': open(join(abspath(dirname(__file__)), "README.rst")).read(),
'url': 'https://github.com/SeleniumHQ/selenium/',
- 'python_requires': '~=3.7.*',
+ 'python_requires': '~=3.7',
'classifiers': ['Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License', | [py] Fix flake8 error on setup.py | SeleniumHQ_selenium | train | py |
ac491c92601e71daca9fae22a9482040387f6759 | diff --git a/cerberus/platform.py b/cerberus/platform.py
index <HASH>..<HASH> 100644
--- a/cerberus/platform.py
+++ b/cerberus/platform.py
@@ -3,9 +3,9 @@
import sys
-if sys.version_info[0] == 3:
- _str_type = str
- _int_types = (int,)
-else:
+if sys.version_info[0] == 2:
_str_type = basestring # noqa
_int_types = (int, long) # noqa
+else:
+ _str_type = str
+ _int_types = (int,) | Makes the software ready for Python 4 | pyeve_cerberus | train | py |
8254cd7cf8ae3b8f1cfa91305dd260ebf0be5802 | diff --git a/lib/Buzz/Message/FormUpload.php b/lib/Buzz/Message/FormUpload.php
index <HASH>..<HASH> 100644
--- a/lib/Buzz/Message/FormUpload.php
+++ b/lib/Buzz/Message/FormUpload.php
@@ -105,6 +105,10 @@ class FormUpload extends AbstractMessage
private function detectContentType()
{
+ if (!class_exists('finfo')) {
+ return false;
+ }
+
$finfo = new \finfo(FILEINFO_MIME_TYPE);
return $this->file ? $finfo->file($this->file) : $finfo->buffer(parent::getContent()); | Added a check as fileinfo is not enabled by default on Windows | kriswallsmith_Buzz | train | php |
6c0f5329aa94e6749cd985ce13c718c1a2b21ce3 | diff --git a/src/app/panels/graph/graph.js b/src/app/panels/graph/graph.js
index <HASH>..<HASH> 100755
--- a/src/app/panels/graph/graph.js
+++ b/src/app/panels/graph/graph.js
@@ -115,7 +115,12 @@ function (angular, $, kbn, moment, _, GraphTooltip) {
var series = data[i];
var axis = yaxis[series.yaxis - 1];
var formater = kbn.valueFormats[scope.panel.y_formats[series.yaxis - 1]];
- series.updateLegendValues(formater, axis.tickDecimals, axis.scaledDecimals + 2);
+
+ // legend and tooltip gets one more decimal precision
+ // than graph legend ticks
+ var tickDecimals = (axis.tickDecimals || -1) + 1;
+
+ series.updateLegendValues(formater, tickDecimals, axis.scaledDecimals + 2);
if(!scope.$$phase) { scope.$digest(); }
}
} | Graph: improved decimal precision in legend and graph hover when graph ticks use single decimal point, now graph legend and tooltip always use one more decimal precision than axis ticks (if axis ticks has decimals), Fixes #<I> | grafana_grafana | train | js |
6f77afb0d6be06a400e097961392dc39157398f7 | diff --git a/app/models/content.rb b/app/models/content.rb
index <HASH>..<HASH> 100644
--- a/app/models/content.rb
+++ b/app/models/content.rb
@@ -360,6 +360,7 @@ class Object
end
class ContentTextHelpers
+ include ActionView::Helpers::UrlHelper
include ActionView::Helpers::TagHelper
include ActionView::Helpers::SanitizeHelper
include ActionView::Helpers::TextHelper | after upgrading a Typo <I> blog to <I>.x the blog was "getting ActionView::TemplateError: undefined method `mail_to' for ContentTextHelpers" errors for any rss request, mail_to is in ActionView::Helpers::UrlHelper | publify_publify | train | rb |
a0c1eb71a805a3e1b13ee4fea6cf9ece85c7e462 | diff --git a/demo/src/demos/SMAADemo.js b/demo/src/demos/SMAADemo.js
index <HASH>..<HASH> 100644
--- a/demo/src/demos/SMAADemo.js
+++ b/demo/src/demos/SMAADemo.js
@@ -244,11 +244,11 @@ export class SMAADemo extends Demo {
controls.settings.translation.enabled = false;
controls.settings.sensitivity.zoom = 1.0;
controls.lookAt(scene.position);
- controls.setEnabled(false);
this.controls = controls;
const controls2 = controls.clone();
controls2.setDom(rendererAA.domElement);
+ controls2.setEnabled(false);
this.controls2 = controls2;
// Sky. | Fixed a minor control state issue. | vanruesc_postprocessing | train | js |
32a8e3d7811a3d2db72ae1604eb002422f0fadb8 | diff --git a/src/nwmatcher.js b/src/nwmatcher.js
index <HASH>..<HASH> 100644
--- a/src/nwmatcher.js
+++ b/src/nwmatcher.js
@@ -482,7 +482,7 @@ NW.Dom = (function(global) {
var i = -1, element, elements, node;
from || (from = doc);
id = id.replace(/\\/g, '');
- if (from.getElementById) {
+ if (!isXMLDocument && from.getElementById) {
if ((element = from.getElementById(id)) &&
id != getAttribute(element, 'id') && from.getElementsByName) {
elements = from.getElementsByName(id); | avoid querying XML documents by id also if they seems to exposes an usable GEBID method | dperini_nwmatcher | train | js |
f0bbcf6f125cf9ead5ac4bbce116bf6390d2d5ed | diff --git a/cellpy/cli.py b/cellpy/cli.py
index <HASH>..<HASH> 100644
--- a/cellpy/cli.py
+++ b/cellpy/cli.py
@@ -352,6 +352,7 @@ def _check_import_pyodbc():
print(" checking existence of mdb-export")
import subprocess
sub_process_path = "mdb-export"
+
try:
x = subprocess.check_output(["command", "-v", sub_process_path])
if x:
@@ -364,6 +365,7 @@ def _check_import_pyodbc():
print(" - but cannot find it!")
return False
return True
+
except AssertionError:
print(" - not found")
return False
@@ -455,7 +457,10 @@ def _check():
check_funcs = [_check_import_cellpy, _check_import_pyodbc]
for ct, cf in zip(check_types, check_funcs):
- failed_checks += sub_check(ct, cf)
+ try:
+ failed_checks += sub_check(ct, cf)
+ except Exception as e:
+ click.echo(f"[cellpy] check raised an exception ({e})")
number_of_checks += 1
click.echo( | Travis did not like my check - so surrounded it with a try except clause | jepegit_cellpy | train | py |
3e8ca40cbe9e168cff58505e7d8f46ecf488469e | diff --git a/lib/ui/dropdown/dropdown.js b/lib/ui/dropdown/dropdown.js
index <HASH>..<HASH> 100644
--- a/lib/ui/dropdown/dropdown.js
+++ b/lib/ui/dropdown/dropdown.js
@@ -113,7 +113,10 @@
return result.id;
};
+ // Wrapper around the query function for Select2. When the promise resolves
+ // the callback
this.query = function(options) {
+
self.queryFn(options).then(function(response) {
// Callback function that should be called with the result object. The result object:
@@ -124,7 +127,8 @@
// key if hierarchical data is displayed. The object may also contain a disabled
// boolean property indicating whether this result can be selected.
//
- // result.more (boolean) - true if more results are available for the current search term.
+ // result.more (boolean) - true if more results are available for the current
+ // search term.
//
// results.context (object) - A user-defined object that should be made available
// as the context parameter to the query function on subsequent queries to load | more docs for select2 remote data integration | Availity_availity-angular | train | js |
c3534da4a5fde8c48e64fb7baf1a630042e6e0de | diff --git a/lib/fog/google/requests/storage/get_bucket_acl.rb b/lib/fog/google/requests/storage/get_bucket_acl.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/google/requests/storage/get_bucket_acl.rb
+++ b/lib/fog/google/requests/storage/get_bucket_acl.rb
@@ -1,6 +1,6 @@
module Fog
- module Google
- class Storage
+ module Storage
+ class Google
class Real
require 'fog/google/parsers/storage/access_control_list' | fix get_bucket_acl request method in Google Cloud Storage | fog_fog | train | rb |
e4319705f6666fa520e48bf9e2b280e64cd20d2d | diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb
index <HASH>..<HASH> 100644
--- a/lib/linguist/generated.rb
+++ b/lib/linguist/generated.rb
@@ -302,7 +302,7 @@ module Linguist
return false unless extname == '.go'
return false unless lines.count > 1
- return lines.first(10).any? { |l| l.include? "Code generated by" }
+ return lines.first(40).any? { |l| l.include? "Code generated by" }
end
PROTOBUF_EXTENSIONS = ['.py', '.java', '.h', '.cc', '.cpp', '.m', '.rb', '.php'] | Bump line limit for generated_go (#<I>)
In some cases (e.g. the Cilium project) the `Code generated by` comment
appears after a license header. This header might be longer than <I>
lines which generated_go currently searches for this comment.
Bump the limit to <I> lines (roughly corresponding to the length of the
BSD 4-clause header + some slack) to detect these cases.
Suggested by Paul Chaignon in
<URL> | github_linguist | train | rb |
2754abb25d78a7b5fd8bbf4660c4c979a175e6fb | diff --git a/packages/dai-plugin-governance/src/GovQueryApiService.js b/packages/dai-plugin-governance/src/GovQueryApiService.js
index <HASH>..<HASH> 100644
--- a/packages/dai-plugin-governance/src/GovQueryApiService.js
+++ b/packages/dai-plugin-governance/src/GovQueryApiService.js
@@ -119,8 +119,8 @@ export default class QueryApi extends PublicService {
}
}`;
const response = await this.getQueryResponse(this.serverUrl, query);
- if (!response.currentVote.nodes[0]) return null;
- return response.currentVote.nodes[0].optionIdRaw;
+ if (!response.currentVoteRankedChoice.nodes[0]) return null;
+ return response.currentVoteRankedChoice.nodes[0].optionIdRaw;
}
async getBlockNumber(unixTime) { | check currentVoteRankedChoice in current vote ranked choice response | makerdao_dai.js | train | js |
626c6cfecc9b424f4d78fbe8db6f84d5e7ccb0c3 | diff --git a/hazelcast/src/main/java/com/hazelcast/map/mapstore/writebehind/SynchronizedWriteBehindQueue.java b/hazelcast/src/main/java/com/hazelcast/map/mapstore/writebehind/SynchronizedWriteBehindQueue.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/main/java/com/hazelcast/map/mapstore/writebehind/SynchronizedWriteBehindQueue.java
+++ b/hazelcast/src/main/java/com/hazelcast/map/mapstore/writebehind/SynchronizedWriteBehindQueue.java
@@ -20,9 +20,11 @@ import java.util.Collection;
import java.util.List;
/**
- * Thread safe write behind queue.
+ * Wrapper for a not thread safe {@link WriteBehindQueue},
+ * only provides thread-safe access, if all accesses to the underlying wrapped {@link WriteBehindQueue}
+ * are from an instance of this wrapper sync queue.
*
- * @param <E>
+ * @param <E> Type of entry to be stored.
*/
class SynchronizedWriteBehindQueue<E> implements WriteBehindQueue<E> { | fix javadoc to clarify thread safe access guarantees to wrapped write-behind-queue | hazelcast_hazelcast | train | java |
9cc3fbabf73cdb2d59fd492cb1fb39a9b24f1bb3 | diff --git a/script/publish-to-npm.js b/script/publish-to-npm.js
index <HASH>..<HASH> 100644
--- a/script/publish-to-npm.js
+++ b/script/publish-to-npm.js
@@ -121,8 +121,8 @@ new Promise((resolve, reject) => {
}
const currentJson = JSON.stringify(fs.readFileSync(path.join(tempDir, 'package.json'), 'utf8'))
- currentJson.name = '@electron/nightly'
- rootPackageJson.name = '@electron/nightly'
+ currentJson.name = 'electron-nightly'
+ rootPackageJson.name = 'electron-nightly'
fs.writeFileSync(
path.join(tempDir, 'package.json'), | chore: @electron/nightly => electron-nightly (#<I>) | electron_electron | train | js |
c134ea05cb142d4df1b2b7164d8eda9741d7cacb | diff --git a/metricdef/metricdef_es.go b/metricdef/metricdef_es.go
index <HASH>..<HASH> 100644
--- a/metricdef/metricdef_es.go
+++ b/metricdef/metricdef_es.go
@@ -200,7 +200,7 @@ func (d *DefsEs) processEsResponse(body []byte) error {
return err
}
if response.Errors {
- log.Warn("ES: Bulk Insertion: some operations failed. to be retried.")
+ log.Debug("ES: Bulk Insertion: some operations failed. to be retried.")
} else {
log.Debug("ES: Bulk Insertion: all operations succeeded")
} | only need to see this in debug mode. we have metrics to report these
- very common - types of issues | grafana_metrictank | train | go |
77ce1358f99dc95c8fe86364915058c9f1b01b7d | diff --git a/sportsreference/nfl/schedule.py b/sportsreference/nfl/schedule.py
index <HASH>..<HASH> 100644
--- a/sportsreference/nfl/schedule.py
+++ b/sportsreference/nfl/schedule.py
@@ -104,8 +104,9 @@ class Game(object):
The boxscore is embedded within the HTML tag and needs a special
parsing scheme in order to be extracted.
"""
- boxscore = game_data('td[data-stat="box_score_text"]:first')
+ boxscore = game_data('td[data-stat="boxscore_word"]:first')
boxscore = re.sub(r'.*/boxscores/', '', str(boxscore))
+ boxscore = re.sub(r'\.htm.*', '', str(boxscore))
setattr(self, '_boxscore', boxscore)
def _parse_game_data(self, game_data): | Fix issue parsing NFL boxscores | roclark_sportsreference | train | py |
54baa790cc4d9bd7fb58f397af90cecd9be64c96 | diff --git a/sklearn_porter/utils/Environment.py b/sklearn_porter/utils/Environment.py
index <HASH>..<HASH> 100644
--- a/sklearn_porter/utils/Environment.py
+++ b/sklearn_porter/utils/Environment.py
@@ -58,8 +58,13 @@ class Environment(object):
"""Get information from the system and local environment."""
@staticmethod
+ def read_python_version():
+ """Return the local Python version."""
+ return sys.version_info[:3]
+
+ @staticmethod
def read_sklearn_version():
- """Determine the installed version of scikit-learn."""
+ """Return the local scikit-learn version."""
from sklearn import __version__ as sklearn_ver
sklearn_ver = str(sklearn_ver).split('.')
sklearn_ver = [int(v) for v in sklearn_ver] | release/<I>: Move 'read_python_version' to Environment class | nok_sklearn-porter | train | py |
347d7d2760ba19f1ce3a28b0041d06f21501f332 | diff --git a/blocks/recent_activity/block_recent_activity.php b/blocks/recent_activity/block_recent_activity.php
index <HASH>..<HASH> 100644
--- a/blocks/recent_activity/block_recent_activity.php
+++ b/blocks/recent_activity/block_recent_activity.php
@@ -31,6 +31,10 @@ class block_recent_activity extends block_base {
return $this->content;
}
-}
+ function applicable_formats() {
+ require_once($GLOBALS['CFG']->dirroot.'/my/pagelib.php');
+ return array('all' => true, MY_MOODLE_FORMAT => false);
+ }
+}
?> | Recent activity block shouldn't go into my moode | moodle_moodle | train | php |
6367c1b70ad2f759d2d7299f25943d5a3b219135 | diff --git a/samplers/parser.go b/samplers/parser.go
index <HASH>..<HASH> 100644
--- a/samplers/parser.go
+++ b/samplers/parser.go
@@ -162,16 +162,14 @@ func ParseMetricSSF(metric *ssf.SSFSample) (UDPMetric, error) {
tempTags := make([]string, 0)
for key, value := range metric.Tags {
if key == "veneurlocalonly" {
- // delete the tag from the list
ret.Scope = LocalOnly
- break
- } else if key == "veneurglobalonly" {
- // delete the tag from the list
+ continue
+ }
+ if key == "veneurglobalonly" {
ret.Scope = GlobalOnly
- break
- } else {
- tempTags = append(tempTags, fmt.Sprintf("%s:%s", key, value))
+ continue
}
+ tempTags = append(tempTags, fmt.Sprintf("%s:%s", key, value))
}
sort.Strings(tempTags)
ret.Tags = tempTags | In translating tags, don't break on veneur meta tags
This should make veneur not truncate the list of tags translated from
SSF samples as soon as it hits (at some arbitrary point) the tags
"veneurglobalonly" and "veneurlocalonly". | stripe_veneur | train | go |
f6c48c0dc2b6ac6029380c03e006da30336fd9e0 | diff --git a/src/main/java/org/takes/facets/hamcrest/AbstractHmTextBody.java b/src/main/java/org/takes/facets/hamcrest/AbstractHmTextBody.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/takes/facets/hamcrest/AbstractHmTextBody.java
+++ b/src/main/java/org/takes/facets/hamcrest/AbstractHmTextBody.java
@@ -43,8 +43,10 @@ import org.hamcrest.TypeSafeMatcher;
* @since 2.0
*
* @todo #794:30min Implement describeMismatchSafely and cover mismatch
- * descriptions with relevant test cases. It should show, what was
- * expected and what was actually in the body for clear understanding.
+ * descriptions with relevant test cases. Update describeTo implementation
+ * to be more informative and add relevant test cases for that. Both should
+ * show, what was expected, what was actually in the body and text description
+ * for clear understanding.
*/
public abstract class AbstractHmTextBody<T> extends TypeSafeMatcher<T> { | #<I> Modify puzzle to update the describeTo as well | yegor256_takes | train | java |
32974a696e3bd834310a74f685f0e4196aba3435 | diff --git a/plugins/Goals/Archiver.php b/plugins/Goals/Archiver.php
index <HASH>..<HASH> 100644
--- a/plugins/Goals/Archiver.php
+++ b/plugins/Goals/Archiver.php
@@ -13,6 +13,7 @@ use Piwik\DataAccess\LogAggregator;
use Piwik\DataArray;
use Piwik\DataTable;
use Piwik\Metrics;
+use Piwik\Plugin\Manager;
use Piwik\Tracker\GoalManager;
use Piwik\Plugins\VisitFrequency\API as VisitFrequencyAPI;
@@ -96,7 +97,10 @@ class Archiver extends \Piwik\Plugin\Archiver
public function aggregateDayReport()
{
$this->aggregateGeneralGoalMetrics();
- $this->aggregateEcommerceItems();
+
+ if (Manager::getInstance()->isPluginActivated('Ecommerce')) {
+ $this->aggregateEcommerceItems();
+ }
$this->getProcessor()->processDependentArchive('Goals', VisitFrequencyAPI::NEW_VISITOR_SEGMENT);
$this->getProcessor()->processDependentArchive('Goals', VisitFrequencyAPI::RETURNING_VISITOR_SEGMENT); | Archive ecommerce items only if Ecommerce plugin is enabled (#<I>) | matomo-org_matomo | train | php |
5f165275b1c4de5eddcbfbe38aee1eb6802cc4b6 | diff --git a/gems/__init__.py b/gems/__init__.py
index <HASH>..<HASH> 100644
--- a/gems/__init__.py
+++ b/gems/__init__.py
@@ -2,7 +2,7 @@
__author__ = 'Blake Printy'
__email__ = '[email protected]'
-__version__ = '0.3.2'
+__version__ = '0.3.3'
from .datatypes import composite | incremented patch version for new methods | bprinty_gems | train | py |
1ed7cf73ca8ac13c8207443477f26d1532152986 | diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php
index <HASH>..<HASH> 100644
--- a/DependencyInjection/Configuration.php
+++ b/DependencyInjection/Configuration.php
@@ -34,7 +34,7 @@ class Configuration implements ConfigurationInterface
->ifNotInArray(array('object', 'array'))
->thenInvalid('Invalid return_type "%s"')
->end()
- ->info('Whether to return mailchimp API return values as object (default) or as array')
+ ->info('Whether to return MailChimp API return values as object (default) or as array')
->end()
->end(); | fixed typo - MailChimp vs. mailchimp | coderbyheart_MailChimpBundle | train | php |
Subsets and Splits