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
ff5ae63cc1e1202affd04bd00b55cdf20fb18606
diff --git a/lib/xcodeproj/project/object/configuration.rb b/lib/xcodeproj/project/object/configuration.rb index <HASH>..<HASH> 100644 --- a/lib/xcodeproj/project/object/configuration.rb +++ b/lib/xcodeproj/project/object/configuration.rb @@ -35,6 +35,7 @@ module Xcodeproj 'GCC_VERSION' => 'com.apple.compilers.llvm.clang.1_0', 'MACOSX_DEPLOYMENT_TARGET' => '10.7', 'SDKROOT' => 'macosx', + 'COMBINE_HIDPI_IMAGES' => 'YES', }.freeze, [:osx, :debug] => { 'ONLY_ACTIVE_ARCH' => 'YES',
[XCBuildConfiguration] Added COMBINE_HIDPI_IMAGES default.
CocoaPods_Xcodeproj
train
rb
e8e7cefca97276cf93f44b7daa92097e5ed3b373
diff --git a/mot/utils.py b/mot/utils.py index <HASH>..<HASH> 100644 --- a/mot/utils.py +++ b/mot/utils.py @@ -330,9 +330,9 @@ def initialize_ranlux(cl_environment, cl_context, nmr_instances, ranlux=RanluxCL def is_scalar(value): """Test if the given value is a scalar. - This function also works with memmapped array values, in contrast to the numpy isscalar method. + This function also works with memory mapped array values, in contrast to the numpy is_scalar method. Args: value: the value to test for being a scalar value """ - return np.isscalar(value) or (isinstance(value, np.ndarray) and (len(np.squeeze(value.shape)) == 0)) + return np.isscalar(value) or (isinstance(value, np.ndarray) and (len(np.squeeze(value).shape) == 0))
Fixed some regressions due to the previous commit
cbclab_MOT
train
py
3cfbb36577c9a71ff2d19255749a04ba0786d984
diff --git a/lib/config/defaults.js b/lib/config/defaults.js index <HASH>..<HASH> 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -22,7 +22,9 @@ function getConfig() { const options = configDefinitions.getOptions(); const config = {}; options.forEach(option => { - config[option.name] = getDefault(option); + if (!option.parents) { + config[option.name] = getDefault(option); + } }); return config; }
fix: don’t add options with parents to defaults
renovatebot_renovate
train
js
3ce0478c3ecea2aaadbe98cae07d69497b90b989
diff --git a/indra/sources/omnipath/processor.py b/indra/sources/omnipath/processor.py index <HASH>..<HASH> 100644 --- a/indra/sources/omnipath/processor.py +++ b/indra/sources/omnipath/processor.py @@ -1,4 +1,6 @@ from __future__ import unicode_literals + +import copy import logging from indra.statements.validate import validate_text_refs from indra.ontology.standardize import standardize_agent_name @@ -130,7 +132,9 @@ class OmniPathProcessor(object): activation = True if lr_entry['consensus_stimulation'] else \ False ligrec_stmts.append(self._get_ligrec_regs( - lr_entry['source'], lr_entry['target'], evidence, + lr_entry['source'], lr_entry['target'], + # Make sure we decouple evidences from the above + copy.deepcopy(evidence), activation=activation)) elif lr_entry['consensus_stimulation'] and \ lr_entry['consensus_inhibition']:
Decouple evidences across multiple statements
sorgerlab_indra
train
py
4ffd8245473bff221f225a9ebad1959bde6f3db0
diff --git a/command/agent/http_test.go b/command/agent/http_test.go index <HASH>..<HASH> 100644 --- a/command/agent/http_test.go +++ b/command/agent/http_test.go @@ -33,7 +33,7 @@ func makeHTTPServerWithConfig(t *testing.T, cb func(c *Config)) (string, *HTTPSe } func makeHTTPServerWithACLs(t *testing.T) (string, *HTTPServer) { - return makeHTTPServerWithConfig(t, func(c *Config) { + dir, srv := makeHTTPServerWithConfig(t, func(c *Config) { c.ACLDatacenter = c.Datacenter c.ACLDefaultPolicy = "deny" c.ACLMasterToken = "root" @@ -41,6 +41,11 @@ func makeHTTPServerWithACLs(t *testing.T) (string, *HTTPServer) { c.ACLAgentMasterToken = "towel" c.ACLEnforceVersion8 = Bool(true) }) + + // Need a leader to look up ACLs, so wait here so we don't need to + // repeat this in each test. + testutil.WaitForLeader(t, srv.agent.RPC, "dc1") + return dir, srv } func makeHTTPServerWithConfigLog(t *testing.T, cb func(c *Config), l io.Writer, logWriter *logger.LogWriter) (string, *HTTPServer) {
Adds a leader wait when testing with ACLs.
hashicorp_consul
train
go
c80e51dc0a46eb2c88b908aa0f9c48b55ae41234
diff --git a/src/js/core/range.js b/src/js/core/range.js index <HASH>..<HASH> 100644 --- a/src/js/core/range.js +++ b/src/js/core/range.js @@ -534,7 +534,7 @@ define([ startPoint.offset, endPoint.node, endPoint.offset - ).normalize(); + ); }; /**
this points are on textNode, so normalize is not necessary.
summernote_summernote
train
js
2b7cbac1775bfca8461eb7a92b8781f29afd2b06
diff --git a/library/WirecardCEE/Stdlib/Fingerprint.php b/library/WirecardCEE/Stdlib/Fingerprint.php index <HASH>..<HASH> 100644 --- a/library/WirecardCEE/Stdlib/Fingerprint.php +++ b/library/WirecardCEE/Stdlib/Fingerprint.php @@ -102,7 +102,10 @@ class WirecardCEE_Stdlib_Fingerprint public static function generate(Array $aValues, WirecardCEE_Stdlib_FingerprintOrder $oFingerprintOrder) { if (self::$_HASH_ALGORITHM == self::HASH_ALGORITHM_HMAC_SHA512) { - $secret = isset( $aValues['secret'] ) && !empty( $aValues['secret'] ) ? $aValues['secret'] : ' '; + $secret = isset( $aValues['secret'] ) && !empty( $aValues['secret'] ) ? $aValues['secret'] : ''; + if( !strlen($secret) ){ + throw new WirecardCEE_Stdlib_Exception_UnexpectedValueException(); + } $hash = hash_init(self::HASH_ALGORITHM_SHA512, HASH_HMAC, $secret); } else { $hash = hash_init(self::$_HASH_ALGORITHM);
#<I> throw exception if no secret is provided
wirecard_checkout-client-library
train
php
40977c515dd9837019aaa0e5708773e78809fbe1
diff --git a/holoviews/plotting/mpl/plot.py b/holoviews/plotting/mpl/plot.py index <HASH>..<HASH> 100644 --- a/holoviews/plotting/mpl/plot.py +++ b/holoviews/plotting/mpl/plot.py @@ -280,7 +280,7 @@ class CompositePlot(GenericCompositePlot, MPLPlot): title = self._format_title(key) if self.show_title else '' if 'title' in self.handles: self.handles['title'].set_text(title) - else: + elif 'axis' in self.handles and self.handles['axis'].figure is not None: title = self.handles['axis'].set_title(title, **self._fontsize('title')) self.handles['title'] = title
Workaround for AttributeError (#<I>) * Workaround for AttributeError See #<I> * Update holoviews/plotting/mpl/plot.py
pyviz_holoviews
train
py
4b191b96881be7cc341a3b3059990b4c17d4136d
diff --git a/glances/plugins/glances_gpu.py b/glances/plugins/glances_gpu.py index <HASH>..<HASH> 100644 --- a/glances/plugins/glances_gpu.py +++ b/glances/plugins/glances_gpu.py @@ -203,7 +203,7 @@ class Plugin(GlancesPlugin): else: unit = 'C' if args.fahrenheit: - value = to_fahrenheit(i['value']) + mean_temperature = to_fahrenheit(mean_temperature) unit = 'F' mean_temperature_msg = '{:>3.0f}{}'.format(mean_temperature, unit)
Undefined name 'i' in plugins/glances_gpu.py #<I>
nicolargo_glances
train
py
5d61b91e12606a1917f8efdbe33d63494764fe31
diff --git a/lib/mk_time/consts.rb b/lib/mk_time/consts.rb index <HASH>..<HASH> 100644 --- a/lib/mk_time/consts.rb +++ b/lib/mk_time/consts.rb @@ -180,7 +180,8 @@ module MkTime ["20170330", 0.4], ["20170629", 0.3], ["20171130", 0.2], - ["20180228", 0.0] # (<= Provisional end-point) + ["20180315", 0.1], + ["20180615", 0.0] # (<= Provisional end-point) ].freeze # DUT1 adjustment end end diff --git a/lib/mk_time/version.rb b/lib/mk_time/version.rb index <HASH>..<HASH> 100644 --- a/lib/mk_time/version.rb +++ b/lib/mk_time/version.rb @@ -1,3 +1,3 @@ module MkTime - VERSION = "0.3.2" + VERSION = "0.3.3" end
UPD: Added a new DUT1 adjustment to constants.
komasaru_mk_time
train
rb,rb
94f7b47f883f696f216b8fde1656461b88ae3f75
diff --git a/src/Administration/Resources/administration/.storybook/webpack.config.js b/src/Administration/Resources/administration/.storybook/webpack.config.js index <HASH>..<HASH> 100644 --- a/src/Administration/Resources/administration/.storybook/webpack.config.js +++ b/src/Administration/Resources/administration/.storybook/webpack.config.js @@ -14,7 +14,8 @@ const baseConfig = { src: resolve('src'), atom: resolve('src/app/common/atom'), molecule: resolve('src/app/common/molecule'), - module: resolve('src/module') + module: resolve('src/module'), + less: resolve('src/app/assets/less') } }, module: {
NEXT-<I> - Add less alias to storybook webpack.config.js
shopware_platform
train
js
9f25ffdb3d8160127c07836fa566d1e2e5a52792
diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_view/helpers/tag_helper.rb +++ b/actionpack/lib/action_view/helpers/tag_helper.rb @@ -64,7 +64,7 @@ module ActionView # <% content_tag :div, :class => "strong" do -%> # Hello world! # <% end -%> - # # => <div class="strong"><p>Hello world!</p></div> + # # => <div class="strong">Hello world!</div> def content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &block) if block_given? options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash)
example output of content_tag block form was incorrectly wrapped in <p></p> tags
rails_rails
train
rb
120755c949ff3b59f9fc77680be866c0f9c708fd
diff --git a/haphilipsjs/__init__.py b/haphilipsjs/__init__.py index <HASH>..<HASH> 100644 --- a/haphilipsjs/__init__.py +++ b/haphilipsjs/__init__.py @@ -185,7 +185,7 @@ class PhilipsTV(object): LOG.warning("Level not in range (%i - %i)" % (self.min_volume + 1, self.max_volume)) return self._postReq('audio/volume', {'current': targetlevel, 'muted': muted}) - self.volume = targetlevel + self.volume = level self.muted = muted def sendKey(self, key):
Volume should store the 0-1 value
danielperna84_ha-philipsjs
train
py
82fc56a9e0336117a6ed2d453e5d8b82e13b6c59
diff --git a/ruby_event_store/spec/mappers/encryption_mapper_spec.rb b/ruby_event_store/spec/mappers/encryption_mapper_spec.rb index <HASH>..<HASH> 100644 --- a/ruby_event_store/spec/mappers/encryption_mapper_spec.rb +++ b/ruby_event_store/spec/mappers/encryption_mapper_spec.rb @@ -103,6 +103,26 @@ module RubyEventStore expect(event.metadata.to_h).to eq(metadata) expect(event.data[:personal_info]).to eq('FORGOTTEN_DATA') end + + specify '#serialized_record_to_event returns event instance with forgotten data when a new key is created' do + record = SerializedRecord.new( + event_id: domain_event.event_id, + data: YAML.dump(encrypted_item.data), + metadata: YAML.dump(encrypted_item.metadata), + event_type: SomeEventWithPersonalInfo.name + ) + key_repository.forget(123) + key_repository.create(123) + event = subject.serialized_record_to_event(record) + expected_event = SomeEventWithPersonalInfo.new( + data: build_data.merge(personal_info: ForgottenData.new), + metadata: metadata, + event_id: event_id + ) + expect(event).to eq(expected_event) + expect(event.metadata.to_h).to eq(metadata) + expect(event.data[:personal_info]).to eq('FORGOTTEN_DATA') + end end context 'when key is forgotten and has custom forgotten data text' do
Data are forgotten even with recreated key When encryption key is removed and new one is created with the same identifier data encrypted with old key could not be read.
RailsEventStore_rails_event_store
train
rb
5103c6ecb582aedcdefe59f7725f27b1cb733f50
diff --git a/abydos/phonetic.py b/abydos/phonetic.py index <HASH>..<HASH> 100644 --- a/abydos/phonetic.py +++ b/abydos/phonetic.py @@ -537,9 +537,12 @@ def metaphone(word, maxlength=float('inf')): elif ename[n] == 'G': if ename[n+1:n+2] == 'H' and (n+1 < l and ename[n+2] not in _vowels): continue - elif n > 0 and (n+1 == l or (ename[n+1:n+4] == 'NED' and n+3 == l)): + elif n > 0 and ((n+1 == l and ename[n+1] == 'N') or + (n+3 == l and ename[n+1:n+4] == 'NED')): continue - elif n-1 > 0 and n+1 < l and ename[n-1] == 'D' and ename[n+1] in _frontv: + elif n-1 > 0 and n+1 <= l and ename[n-1] == 'D' and ename[n+1] in _frontv: + continue + elif ename[n+1:n+2] == 'G': continue elif ename[n+1:n+2] in _frontv: if n == 0 or ename[n-1] != 'G':
fixed a couple of G rules for Metaphone
chrislit_abydos
train
py
f718b90b694e994a92b3f1e6091be530a9cb5cc9
diff --git a/code/cms/DMSUploadField.php b/code/cms/DMSUploadField.php index <HASH>..<HASH> 100644 --- a/code/cms/DMSUploadField.php +++ b/code/cms/DMSUploadField.php @@ -154,7 +154,7 @@ class DMSUploadField extends UploadField { 'thumbnail_url' => $document->Icon($document->getExtension()), 'edit_url' => $this->getItemHandler($document->ID)->EditLink(), 'size' => $document->getFileSizeFormatted(), - 'buttons' => $document->renderWith($this->getTemplateFileButtons()), + 'buttons' => (string) $document->renderWith($this->getTemplateFileButtons()), 'showeditform' => true ));
BUG: Fix the action buttons not rendering on upload. Due to escaping API changes, a HTMLText instance was being incorrectly casted to JSON.
silverstripe_silverstripe-dms
train
php
0ad3099213e66fe3202fac986dd2c79733b35055
diff --git a/great_expectations/render/view/view.py b/great_expectations/render/view/view.py index <HASH>..<HASH> 100644 --- a/great_expectations/render/view/view.py +++ b/great_expectations/render/view/view.py @@ -64,7 +64,13 @@ class DefaultJinjaView(object): @classmethod @contextfilter def render_content_block(cls, context, content_block): - if not isinstance(content_block, (dict, OrderedDict)): + if type(content_block) is str: + return "<span>{content_block}</span>".format(content_block=content_block) + elif content_block is None: + return "" + elif type(content_block) is list: + return "".join([cls.render_content_block(context, content_block_el) for content_block_el in content_block]) + elif not isinstance(content_block, (dict, OrderedDict)): return content_block content_block_type = content_block.get("content_block_type") return cls.render(context, template="{content_block_type}.j2".format(content_block_type=content_block_type), content_block=content_block)
Add ability to render lists of content blocks
great-expectations_great_expectations
train
py
59c9494380b4a3768a4f1def11bc94920830195c
diff --git a/apps/full-site-editing/full-site-editing-plugin/full-site-editing-plugin.php b/apps/full-site-editing/full-site-editing-plugin/full-site-editing-plugin.php index <HASH>..<HASH> 100644 --- a/apps/full-site-editing/full-site-editing-plugin/full-site-editing-plugin.php +++ b/apps/full-site-editing/full-site-editing-plugin/full-site-editing-plugin.php @@ -152,6 +152,12 @@ add_action( 'plugins_loaded', __NAMESPACE__ . '\load_posts_list_block' ); * Load Starter_Page_Templates. */ function load_starter_page_templates() { + // We don't want the user to choose a template when copying a post. + // phpcs:ignore WordPress.Security.NonceVerification.Recommended + if ( isset( $_GET['jetpack-copy'] ) ) { + return; + } + /** * Can be used to disable the Starter Page Templates. *
SPT: Do not display on copy-page flow (#<I>) * SPT: Do not display on copy-page flow Checks for the jetpack copy URL param and disables SPT if it exists.
Automattic_wp-calypso
train
php
a58bf36308389049bae60c2e0be4bd622f978039
diff --git a/src/user/user.php b/src/user/user.php index <HASH>..<HASH> 100755 --- a/src/user/user.php +++ b/src/user/user.php @@ -72,7 +72,13 @@ }); }else{ if($out){ - return $input=='all' ? $out : $out[$input]; + if($input!='all' && isset($out[$input])){ + return $out[$input]; + }elseif($input==='all'){ + return $out; + }else{ + return false; + } }else{ return false; }
user will not cause any bug in Whoops
angel-project_core
train
php
3b86cf38bcbac9c4298a697849f2c4cb79f5c18c
diff --git a/lib/airplay/protocol.rb b/lib/airplay/protocol.rb index <HASH>..<HASH> 100644 --- a/lib/airplay/protocol.rb +++ b/lib/airplay/protocol.rb @@ -10,6 +10,7 @@ class Airplay::Protocol @password = password @authentications = {} @http = Net::HTTP::Persistent.new + @http.idle_timeout = 900 # until nil works @http.debug_output = $stdout if ENV.has_key?('HTTP_DEBUG') end
Add <I>s timeout (@sodabrew)
elcuervo_airplay
train
rb
7b8cda448ae9ac83465d79b235de266c04b389d7
diff --git a/packages/neos-ui/src/Containers/LeftSideBar/NodeTree/Node/index.js b/packages/neos-ui/src/Containers/LeftSideBar/NodeTree/Node/index.js index <HASH>..<HASH> 100644 --- a/packages/neos-ui/src/Containers/LeftSideBar/NodeTree/Node/index.js +++ b/packages/neos-ui/src/Containers/LeftSideBar/NodeTree/Node/index.js @@ -307,7 +307,7 @@ export default class Node extends PureComponent { onToggle={this.handleNodeToggle} onClick={this.handleNodeClick} dragAndDropContext={this.getDragAndDropContext()} - dragForbidden={$get('isAutoCreated', node)} + dragForbidden={$get('isAutoCreated', node) || !$get(['policy', 'canEdit'], node)} title={labelTitle} /> {this.isCollapsed() ? null : (
BUGFIX: Non-Editable nodes should not be movable in Node Tree If a node is not editable, it should not be drag/droppable in the Neos node tree (as the user gets an exception on saving anyways) Resolves: #<I>
neos_neos-ui
train
js
4aac1e3f90578b08b9f9d3ee67bdb7a05b0f191e
diff --git a/spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java b/spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java index <HASH>..<HASH> 100644 --- a/spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java @@ -167,7 +167,7 @@ public class LoggingApplicationListenerTests { @Test public void tomcatNopLoggingConfigDoesNotCauseAFailure() throws Exception { TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.context, - "logging.config: -Dnop"); + "LOGGING_CONFIG: -Dnop"); this.initializer.initialize(this.context.getEnvironment(), this.context.getClassLoader()); this.logger.info("Hello world");
Refine LoggingApplicationListenerTests Update the Tomcat logging test to be more like the real scenario. See gh-<I>
spring-projects_spring-boot
train
java
925dc7186a5719e79d3c8fcb96600791604f8fa1
diff --git a/neo/Core/State/StorageKey.py b/neo/Core/State/StorageKey.py index <HASH>..<HASH> 100644 --- a/neo/Core/State/StorageKey.py +++ b/neo/Core/State/StorageKey.py @@ -14,7 +14,7 @@ class StorageKey(SerializableMixin): self.Key = key def _murmur(self): - return mmh3.hash(self.Key) + return mmh3.hash(bytes(self.Key)) def GetHashCode(self): return abs(self.ScriptHash.GetHashCode() + self._murmur())
fix for readonly bytearray issue with murmur library
CityOfZion_neo-python
train
py
3d88f8ca939da7cfc35eb7c20b85a5b0d76a37ff
diff --git a/lwr/util.py b/lwr/util.py index <HASH>..<HASH> 100644 --- a/lwr/util.py +++ b/lwr/util.py @@ -32,12 +32,12 @@ def _psutil_kill_pid(pid, including_parent=True): """ try: parent = Process(pid) + for child in parent.get_children(recursive=True): + child.kill() + if including_parent: + parent.kill() except NoSuchProcess: return - for child in parent.get_children(recursive=True): - child.kill() - if including_parent: - parent.kill() def _stock_kill_pid(pid):
Hopefully fix transient failing test where process is obtained correctly, but process ends before get_children is called.
galaxyproject_pulsar
train
py
019ea4d2a95bfe24637464a97d9d8d40d5e4c1c7
diff --git a/lib/servizio/service.rb b/lib/servizio/service.rb index <HASH>..<HASH> 100644 --- a/lib/servizio/service.rb +++ b/lib/servizio/service.rb @@ -80,7 +80,9 @@ class Servizio::Service self end - alias_method :call!, :call + def call! + call + end end def inherited(subclass)
Slighty changed call! alias implementation to ease metaprogramming
servizio-rb_servizio
train
rb
ab762c8acd5518c9e430c486069ab2ddab269de6
diff --git a/lib/Doctrine/Common/Annotations/AnnotationReader.php b/lib/Doctrine/Common/Annotations/AnnotationReader.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/Common/Annotations/AnnotationReader.php +++ b/lib/Doctrine/Common/Annotations/AnnotationReader.php @@ -406,7 +406,7 @@ final class AnnotationReader implements Reader $this->imports[$name] = array_merge( self::$globalImports, ($this->enablePhpImports) ? $this->phpParser->parseClass($class) : array(), - array('__NAMESPACE__' => $class->getNamespaceName()) + ($this->enablePhpImports) ? array('__NAMESPACE__' => $class->getNamespaceName()) : array() ); if ($this->defaultAnnotationNamespace) { $this->imports[$name]['__DEFAULT__'] = $this->defaultAnnotationNamespace;
When php parsing is disabled __NAMESPACE__ should not be passed aswell
doctrine_common
train
php
e891bf93e8413b4c0b348df1914e73c9910f5026
diff --git a/lib/palimpsest/environment.rb b/lib/palimpsest/environment.rb index <HASH>..<HASH> 100644 --- a/lib/palimpsest/environment.rb +++ b/lib/palimpsest/environment.rb @@ -14,6 +14,27 @@ module Palimpsest # ````yml # # example of palimpsest_config.yml # + # # component settings + # :components: + # # all component paths are relative to the base + # :base: _components + # + # # list of components + # :paths: + # #- [ components_path, install_path ] + # - [ my_app/templates, apps/my_app/templates ] + # - [ my_app/extra, apps/my_app ] + # + # # externals settings + # :externals: + # # server or local path that repos are under + # :server: "https://github.com/razor-x" + # + # # list of external repos + # :repos: + # #- [ name, install_path, branch, server (optional) ] + # - [ my_app, apps/my_app, master ] + # - [ sub_app, apps/my_app/sub_app, my_feature, "https://bitbucket.org/razorx" ] # # asset settings # :assets: # # all options are passed to Assets#options
Added components and externals to example palimpsest_config.yml.
ossuarium_palimpsest
train
rb
1b0bc0df1545fae3d64bb8e2bb03e0d34c210ecd
diff --git a/symphony/lib/boot/defines.php b/symphony/lib/boot/defines.php index <HASH>..<HASH> 100644 --- a/symphony/lib/boot/defines.php +++ b/symphony/lib/boot/defines.php @@ -244,7 +244,8 @@ define_safe('__SECURE__', * The current domain name. * @var string */ -define_safe('DOMAIN', rtrim(rtrim($_SERVER['HTTP_HOST'], '\\/') . dirname($_SERVER['PHP_SELF']), '\\/')); +define_safe('DOMAIN', HTTP_HOST . rtrim(dirname($_SERVER['PHP_SELF']), '\/')); + /** * The base URL of this Symphony install, minus the symphony path.
Simplified assignment of `DOMAIN` constant
symphonycms_symphony-2
train
php
6b9dd2f398eb30661b35258a9f713c4d6f9e805c
diff --git a/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java b/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java index <HASH>..<HASH> 100644 --- a/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java +++ b/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java @@ -147,7 +147,7 @@ public class LinkUtil { extension = getExtension(resource, extension); } - SlingUrl slingUrl = new SlingUrl(request, mapper).fromPath(url); + SlingUrl slingUrl = new SlingUrl(request, mapper).fromUrl(url); if (StringUtils.isNotBlank(selectors)) { slingUrl.selectors(selectors); }
paramater encoding fixed for complete URLs handled by the link tag
ist-dresden_composum
train
java
4660acd324cfa6c786245ea581691a23758ce960
diff --git a/lib/classes/PluginManager.js b/lib/classes/PluginManager.js index <HASH>..<HASH> 100644 --- a/lib/classes/PluginManager.js +++ b/lib/classes/PluginManager.js @@ -48,7 +48,7 @@ class PluginManager { this.cliOptions = {}; this.cliCommands = []; - this.pluginIndependentCommands = new Set(['plugin']); + this.pluginIndependentCommands = new Set(['help', 'plugin']); this.plugins = []; this.commands = {};
fix(CLI): Mark 'help' as command that doesn't depend on external plugins
serverless_serverless
train
js
e691bd31eba0bd849b0a5b7e778c958f4d82f080
diff --git a/core/quill.js b/core/quill.js index <HASH>..<HASH> 100644 --- a/core/quill.js +++ b/core/quill.js @@ -214,12 +214,12 @@ class Quill { return this.emitter.once.apply(this.emitter, arguments); } - pasteHTML(index, html) { + pasteHTML(index, html, source = Emitter.sources.API) { if (typeof index === 'string') { - this.setContents(this.clipboard.convert(index)); + this.setContents(this.clipboard.convert(index), html); } else { let paste = this.clipboard.convert(html); - this.updateContents(new Delta().retain(index).concat(paste)); + this.updateContents(new Delta().retain(index).concat(paste), source); } }
support non-api source for pasteHTML
quilljs_quill
train
js
5d8884e73b664cb2e2a69eeff4537b3fd9e3e8c0
diff --git a/abilian/web/forms/fields.py b/abilian/web/forms/fields.py index <HASH>..<HASH> 100644 --- a/abilian/web/forms/fields.py +++ b/abilian/web/forms/fields.py @@ -258,7 +258,7 @@ class DateTimeField(Field): def populate_obj(self, obj, name): dt = self.data - if self.use_naive: + if dt and self.use_naive: dt = dt.replace(tzinfo=None) setattr(obj, name, dt)
fix TB in DateTimeField
abilian_abilian-core
train
py
a00dbf26c33a46b82aa782e5f38fa74121a82251
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -170,7 +170,7 @@ function word2phrase( input, output, params, callback ) { paramsArr = []; for ( name in params ){ - if ( params.hasOwnProperty( params ) === true ) { + if ( params.hasOwnProperty( name ) === true ) { cc_name = changeCase.param( name ); paramsArr.push( '-' + cc_name ); paramsArr.push( params[name] );
params aren't being passed to word2phrase
Planeshifter_node-word2vec
train
js
06f850f8c18ca16855a50c3ce3d36197b92c1ea0
diff --git a/app/models/custom_property.rb b/app/models/custom_property.rb index <HASH>..<HASH> 100644 --- a/app/models/custom_property.rb +++ b/app/models/custom_property.rb @@ -1,5 +1,5 @@ class CustomProperty < ApplicationRecord - belongs_to :resource, polymorphic: true + belongs_to :resource, polymorphic: true, touch: true validates :label, presence: true end
add "touch: true" to refresh cache when custom_property is updated next-l/enju_leaf#<I>
next-l_enju_biblio
train
rb
0f280bb681b08600d33c3a9b42c9a84f4e3a48b5
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ requirements = [ "py-eth-sig-utils>=0.3.0", "typing-extensions==3.10.0.0; python_version < '3.8'", "requests>=2", - "web3>=5.18", + "web3>=5.18<=5.19", ] extras_require = {
Don't require new versions of web3 - Gnosis-py breaks with web3 >= <I>
gnosis_gnosis-py
train
py
c7a7b167552c0bd4594e12a909253273f2e974c0
diff --git a/GestureHandler.js b/GestureHandler.js index <HASH>..<HASH> 100644 --- a/GestureHandler.js +++ b/GestureHandler.js @@ -451,14 +451,18 @@ class BaseButton extends React.Component { this._lastActive = active; }; + // Normally, the parent would execute it's handler first, + // then forward the event to listeners. However, here our handler + // is virtually only forwarding events to listeners, so we reverse the order + // to keep the proper order of the callbacks (from "raw" ones to "processed"). _onHandlerStateChange = e => { - this._handleEvent(e); this.props.onHandlerStateChange && this.props.onHandlerStateChange(e); + this._handleEvent(e); }; _onGestureEvent = e => { - this._handleEvent(e); this.props.onGestureEvent && this.props.onGestureEvent(e); + this._handleEvent(e); }; render() {
Fix the order of the callbacks being called
kmagiera_react-native-gesture-handler
train
js
3a7b26ad5137a9cbc96f0884fa0ba3824f42e32c
diff --git a/lib/puppet/parser/type_loader.rb b/lib/puppet/parser/type_loader.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/parser/type_loader.rb +++ b/lib/puppet/parser/type_loader.rb @@ -19,7 +19,7 @@ class Puppet::Parser::TypeLoader modname, files = Puppet::Parser::Files.find_manifests_in_modules(pattern, environment) if files.empty? abspat = File.expand_path(pattern, dir) - file_pattern = abspat + (File.extname(abspat).empty? ? '{.pp}' : '' ) + file_pattern = abspat + (File.extname(abspat).empty? ? '.pp' : '' ) files = Dir.glob(file_pattern).uniq.reject { |f| FileTest.directory?(f) } modname = nil
(PUP-<I>) Cleanup {} around .pp in path
puppetlabs_puppet
train
rb
e9bba45d2e933bfdc154fdb7bdf7bc78da6ac487
diff --git a/tickets/views.py b/tickets/views.py index <HASH>..<HASH> 100644 --- a/tickets/views.py +++ b/tickets/views.py @@ -1,8 +1,8 @@ -from django.views.generic import ListView, DetailView, CreateView -from django.core.urlresolvers import reverse from django.contrib import messages +from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.utils.translation import ugettext_lazy as _ +from django.views.generic import ListView, DetailView, CreateView from forms import TicketCreateForm, TicketCommentCreateForm from models import Ticket
sort imports in views.py
byteweaver_django-tickets
train
py
7c8a21ddcf3159700aac542b0ca5676af5d6c8f6
diff --git a/plugins/bigquery/dbt/adapters/bigquery/connections.py b/plugins/bigquery/dbt/adapters/bigquery/connections.py index <HASH>..<HASH> 100644 --- a/plugins/bigquery/dbt/adapters/bigquery/connections.py +++ b/plugins/bigquery/dbt/adapters/bigquery/connections.py @@ -201,7 +201,7 @@ class BigQueryConnectionManager(BaseConnectionManager): job_params[ 'priority'] = google.cloud.bigquery.QueryPriority.INTERACTIVE - def fn(): + def fn(): self._query_and_results(client, sql, conn, job_params) query_job, iterator = self._retry_and_handle(msg=sql, conn=conn, fn=fn)
Update plugins/bigquery/dbt/adapters/bigquery/connections.py
fishtown-analytics_dbt
train
py
56b6ee1217e6c106af0780e5fb7dcfe0f94f69c7
diff --git a/world/components.go b/world/components.go index <HASH>..<HASH> 100644 --- a/world/components.go +++ b/world/components.go @@ -247,8 +247,10 @@ func (maker ComponentMaker) TPS(argv ...string) ifrit.Runner { maker.Artifacts.Executables["tps"], append([]string{ "-diegoAPIURL", "http://" + maker.Addresses.Receptor, - "-natsAddresses", maker.Addresses.NATS, "-listenAddr", maker.Addresses.TPS, + "-ccBaseURL", "http://" + maker.Addresses.FakeCC, + "-ccUsername", fake_cc.CC_USERNAME, + "-ccPassword", fake_cc.CC_PASSWORD, }, argv...)..., ), })
TPS speaks HTTP [#<I>]
cloudfoundry_inigo
train
go
c8f93b6d6c260a2093f0bd21733b216df46685d9
diff --git a/lib/Orkestra/Transactor/Transactor/NetworkMerchants/CardTransactor.php b/lib/Orkestra/Transactor/Transactor/NetworkMerchants/CardTransactor.php index <HASH>..<HASH> 100644 --- a/lib/Orkestra/Transactor/Transactor/NetworkMerchants/CardTransactor.php +++ b/lib/Orkestra/Transactor/Transactor/NetworkMerchants/CardTransactor.php @@ -70,6 +70,8 @@ class CardTransactor extends AbstractTransactor $request = $client->post($postUrl) ->addPostFields($params); + $request->getCurlOptions()->set(CURLOPT_SSLVERSION, 3); + try { $response = $request->send(); $data = array();
CardTransactor now properly sets ssl_version to 3
orkestra_orkestra-transactor
train
php
63c8a31d5006754a9f45bdfb8eabacedc775fe8f
diff --git a/vendor/github.com/google/cadvisor/container/docker/handler.go b/vendor/github.com/google/cadvisor/container/docker/handler.go index <HASH>..<HASH> 100644 --- a/vendor/github.com/google/cadvisor/container/docker/handler.go +++ b/vendor/github.com/google/cadvisor/container/docker/handler.go @@ -43,7 +43,8 @@ import ( const ( // The read write layers exist here. - aufsRWLayer = "diff" + aufsRWLayer = "diff" + overlay2RWLayer = "diff" // Path to the directory where docker stores log files if the json logging driver is enabled. pathToContainersDir = "containers" @@ -195,8 +196,10 @@ func newDockerContainerHandler( switch storageDriver { case aufsStorageDriver: rootfsStorageDir = path.Join(storageDir, string(aufsStorageDriver), aufsRWLayer, rwLayerID) - case overlayStorageDriver, overlay2StorageDriver: + case overlayStorageDriver: rootfsStorageDir = path.Join(storageDir, string(storageDriver), rwLayerID) + case overlay2StorageDriver: + rootfsStorageDir = path.Join(storageDir, string(storageDriver), rwLayerID, overlay2RWLayer) case zfsStorageDriver: status, err := Status() if err != nil {
UPSTREAM: google/cadvisor: <I>: Monitor diff directory for overlay2
openshift_origin
train
go
e662ef9c0b0b80c28c40cd4df5a2b1f306154931
diff --git a/src/pages/project/remix.js b/src/pages/project/remix.js index <HASH>..<HASH> 100644 --- a/src/pages/project/remix.js +++ b/src/pages/project/remix.js @@ -13,6 +13,7 @@ module.exports = { uri: uri }, (err, data) => { if (err) { + window.Platform.trackEvent('Remix', 'Remix Error', err); return console.error('Error remixing project', err); } @@ -25,9 +26,12 @@ module.exports = { uri: `/users/${this.state.params.user}/projects/${this.state.params.project}` }, (err, moreData) => { if (err) { + window.Platform.trackEvent('Remix', 'Remix Error', err); return console.error('Error remixing project', err); } + window.Platform.trackEvent('Remix', 'Remix', projectId); + if (window.Platform) { window.Platform.setView( `/users/${this.state.user.id}/projects/${projectID}`, @@ -70,6 +74,7 @@ module.exports = { } }, function (err, body) { if (err) { + window.Platform.trackEvent('Remix', 'Remix Rename Error', projectId); console.error('Could not update project settings.'); } });
[#<I>] Add remix event tracking
mozilla_webmaker-core
train
js
1e3af2e61bd34f1fb997359d386167f850f3f4fb
diff --git a/plugins/DevicesDetection/DevicesDetection.php b/plugins/DevicesDetection/DevicesDetection.php index <HASH>..<HASH> 100644 --- a/plugins/DevicesDetection/DevicesDetection.php +++ b/plugins/DevicesDetection/DevicesDetection.php @@ -184,7 +184,7 @@ class DevicesDetection extends \Piwik\Plugin { // Note: only one field segmented so far: deviceType foreach ($this->getRawMetadataReports() as $report) { - @list($category, $name, $apiModule, $apiAction, $columnName, $segment, $sqlSegment, $acceptedValues) = $report; + @list($category, $name, $apiModule, $apiAction, $columnName, $segment, $sqlSegment, $acceptedValues, $sqlFilter) = $report; if (empty($segment)) continue; @@ -194,7 +194,8 @@ class DevicesDetection extends \Piwik\Plugin 'name' => $columnName, 'segment' => $segment, 'acceptedValues' => $acceptedValues, - 'sqlSegment' => $sqlSegment + 'sqlSegment' => $sqlSegment, + 'sqlFilter' => isset($sqlFilter) ? $sqlFilter : false ); } }
Refs #<I> thanks for the report, putting the fix back in Reverting part of <URL>
matomo-org_matomo
train
php
8d0ab28b54161c70ca42da65f08718dc22b11ba2
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -82,7 +82,7 @@ module.exports = function (grunt) { }, libtest: { files: '<%= jshint.libtest.src %>', - tasks: ['jshint:libtest', 'jscs:libtest', 'lintspaces:libtest', 'nodeunit'] + tasks: ['jshint:libtest', 'jscs:libtest', 'lintspaces:libtest', 'build', 'test'] } }, 'release-it': { @@ -108,6 +108,11 @@ module.exports = function (grunt) { require('load-grunt-tasks')(grunt); // Default task. - grunt.registerTask('default', ['jshint', 'jscs', 'lintspaces', /*'simplemocha', */'umd:lib', 'concat', 'uglify']); + grunt.registerTask('default', ['lint', 'test', 'build']); + grunt.registerTask('build', ['umd:lib', 'concat', 'uglify']); + + grunt.registerTask('test', ['simplemocha']); + + grunt.registerTask('lint', ['jshint', 'jscs', 'lintspaces']); };
chore(grunt): reorganize tasks + fix ref to nodeunit + on lib, test change, launch build and test tasks
stephanebachelier_mixit
train
js
5deda63ee8db0a6e9d5bf0ea6c812179ff853996
diff --git a/check.go b/check.go index <HASH>..<HASH> 100644 --- a/check.go +++ b/check.go @@ -277,6 +277,8 @@ func (v *visitor) Visit(node ast.Node) ast.Visitor { v.discard(x.Y) case *ast.IndexExpr: v.discard(x.X) + case *ast.IncDecStmt: + v.discard(x.X) case *ast.AssignStmt: if !v.inBlock { return nil diff --git a/testdata/noniface_usage.go b/testdata/noniface_usage.go index <HASH>..<HASH> 100644 --- a/testdata/noniface_usage.go +++ b/testdata/noniface_usage.go @@ -21,6 +21,11 @@ func BinaryRight(m mint) { _ = 3 + m } +func IncDec(m mint) { + m.String() + m++ +} + type marr [3]int func (m marr) String() string {
Also avoid false positives with IncDecStmt usage
mvdan_interfacer
train
go,go
25969a8e946060c446e52ebf08e31f496169e687
diff --git a/src/main/java/org/elasticsearch/hadoop/rest/dto/Shard.java b/src/main/java/org/elasticsearch/hadoop/rest/dto/Shard.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/elasticsearch/hadoop/rest/dto/Shard.java +++ b/src/main/java/org/elasticsearch/hadoop/rest/dto/Shard.java @@ -118,6 +118,6 @@ public class Shard implements Comparable<Shard> { @Override public int compareTo(Shard o) { - return o.id - id; + return id - o.id; } } \ No newline at end of file
invert order of Shard comparison relates to #<I>
elastic_elasticsearch-hadoop
train
java
68ddb7c563e2dbdd59a1b405fbf9531dc395f0d4
diff --git a/src/Entity/Image.php b/src/Entity/Image.php index <HASH>..<HASH> 100644 --- a/src/Entity/Image.php +++ b/src/Entity/Image.php @@ -47,7 +47,7 @@ class Image extends AbstractEntity public $regions; /** - * @var array + * @var string */ - public $actionIds; + public $createdAt; }
remove actionIds but add createdAt to image
toin0u_DigitalOceanV2
train
php
3bb412438f55996e7c43a9c7f3bcbd1d069e2b7c
diff --git a/app/objectInformation.js b/app/objectInformation.js index <HASH>..<HASH> 100644 --- a/app/objectInformation.js +++ b/app/objectInformation.js @@ -53,6 +53,16 @@ function objectInformation( return asJsonString(value, 4); } + function createPad(count, padString) { + let result = ''; + + for (let index = 0; index < count; index++) { + result += padString; + } + + return result; + } + function asGridString(data) { const stringData = ( data @@ -91,8 +101,8 @@ function objectInformation( const basicPadding = Math.floor(lengthDiff / 2); const remainder = lengthDiff - (2 * basicPadding); - const frontPadding = ''.padStart(basicPadding, '.'); - const backPadding = ''.padStart(basicPadding + remainder, '.'); + const frontPadding = createPad(basicPadding, '.'); + const backPadding = createPad(basicPadding + remainder, '.'); return `${frontPadding}${datum}${backPadding}`; })
removed pad start to make it compatible with earlier versions of node.
JKerney-HunterIndustries_EcmaScriptObjectInformation
train
js
144b31bdd2ccc30a0de3efa97c180a1d07136218
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -8,8 +8,8 @@ from setuptools import setup, find_packages setup( name="rrbob", - version="0.1", - description="Basic example of a Reproducible Research Project in Python", + version="1.0", + description="Basic example of a Reproducible Research Project in Python/Bob", url='http://github.com/anjos/rrbob', license="BSD", author='Andre Anjos',
Updated short description [skip ci]
anjos_rrbob
train
py
cb162ffe6f593ac89193d6724c559af01ab84cf3
diff --git a/api/server/server.go b/api/server/server.go index <HASH>..<HASH> 100644 --- a/api/server/server.go +++ b/api/server/server.go @@ -164,15 +164,15 @@ func newServer(goCtx gocontext.Context, config gofig.Config) (*server, error) { s.ctx.Info("initializing server") - if err := s.initEndpoints(s.ctx); err != nil { + if err := services.Init(s.ctx, s.config); err != nil { return nil, err } - s.ctx.Info("initialized endpoints") + s.ctx.Info("initialized services") - if err := services.Init(s.ctx, s.config); err != nil { + if err := s.initEndpoints(s.ctx); err != nil { return nil, err } - s.ctx.Info("initialized services") + s.ctx.Info("initialized endpoints") if logConfig.HTTPRequests || logConfig.HTTPResponses { s.logHTTPEnabled = true
Endpoint/Service Init Order Fix This patch fixes an issue where service init failures would cause libStorage endpoints that use UNIX sock files to leave those sock files in place instead of removing them on error. This fix causes the service init routine to now occur *before* the endpoint init routine, thereby causing any service failure to occur before an endpoint's sock file is even created.
thecodeteam_libstorage
train
go
218cb99920e43ee475ac34ff137899d18ad81df3
diff --git a/src/extensions/katexExtension.js b/src/extensions/katexExtension.js index <HASH>..<HASH> 100644 --- a/src/extensions/katexExtension.js +++ b/src/extensions/katexExtension.js @@ -6,7 +6,7 @@ extensionSvc.onGetOptions((options, properties) => { options.math = properties.extensions.katex.enabled; }); -extensionSvc.onInitConverter(2, (markdown, options) => { +extensionSvc.onInitConverter(3, (markdown, options) => { if (options.math) { markdown.use(markdownItMath); markdown.renderer.rules.inline_math = (tokens, idx) =>
fix$(extensions): move katex a priority higher
benweet_stackedit
train
js
45809a0a9c3b99be6f71acf63e2f4862479435d4
diff --git a/languagetool-server/src/main/java/org/languagetool/server/HTTPSServer.java b/languagetool-server/src/main/java/org/languagetool/server/HTTPSServer.java index <HASH>..<HASH> 100644 --- a/languagetool-server/src/main/java/org/languagetool/server/HTTPSServer.java +++ b/languagetool-server/src/main/java/org/languagetool/server/HTTPSServer.java @@ -127,8 +127,8 @@ public class HTTPSServer extends Server { System.out.println("Usage: " + HTTPSServer.class.getSimpleName() + " --config propertyFile [--port|-p port] [--public]"); System.out.println(" --config file a Java property file (one key=value entry per line) with values for:"); - System.out.println(" 'keystore' - a Java keystore with an SSL certificate"); - System.out.println(" 'password' - the keystore's password"); + System.out.println(" 'keystore' - a Java keystore with an SSL certificate (deprecated, use a reverse proxy to handle SSL)"); + System.out.println(" 'password' - the keystore's password (deprecated, use a reverse proxy to handle SSL)"); printCommonConfigFileOptions(); printCommonOptions(); System.exit(1);
deprecate SSL handled by LT, it's better to have it handled by an external reverse proxy like Apache httpd or nginx
languagetool-org_languagetool
train
java
dc7b5c12e70c483547b5182beae9d7e0e2ea51ce
diff --git a/core/tests/finance/test_financial_metrics.py b/core/tests/finance/test_financial_metrics.py index <HASH>..<HASH> 100644 --- a/core/tests/finance/test_financial_metrics.py +++ b/core/tests/finance/test_financial_metrics.py @@ -19,11 +19,7 @@ class TestFinancialMetrics(unittest.TestCase): def test_get_metrics_no_metrics_parameter(self): pronac = '131886' - expected_metrics = ['items', 'approved_funds', 'verified_funds', \ - 'raised_funds', 'common_items_ratio', \ - 'new_providers', 'total_receipts', \ - 'proponent_projects'] - + expected_metrics = self.fm.metrics.keys() response = self.fm.get_metrics(pronac) for metric in expected_metrics:
Change keys getting for financial metrics test.
lappis-unb_salic-ml
train
py
1e59db573e66c67b24d4396391696f197147baf9
diff --git a/service/service.go b/service/service.go index <HASH>..<HASH> 100644 --- a/service/service.go +++ b/service/service.go @@ -109,7 +109,7 @@ func (s *Service) Start() error { if s.metricsClient != nil { go s.reportSystemMetrics() } - signal.Notify(s.sigC, os.Interrupt, os.Kill, syscall.SIGTERM, syscall.SIGUSR2) + signal.Notify(s.sigC, os.Interrupt, os.Kill, syscall.SIGTERM, syscall.SIGUSR2, syscall.SIGCHLD) // Block until a signal is received or we got an error for { @@ -132,6 +132,11 @@ func (s *Service) Start() error { } else { log.Infof("Successfully started self") } + case syscall.SIGCHLD: + log.Warningf("Child exited, got '%s', collecting status", signal) + var wait syscall.WaitStatus + syscall.Wait4(-1, &wait, syscall.WNOHANG, nil) + log.Warningf("Collected exit status from child") default: log.Infof("Ignoring '%s'", signal) }
Prevent zombie state in case if child has exited with error
vulcand_vulcand
train
go
67b3c149d34152b75156f9ad678567b600339467
diff --git a/src/ShellCommand.php b/src/ShellCommand.php index <HASH>..<HASH> 100644 --- a/src/ShellCommand.php +++ b/src/ShellCommand.php @@ -28,19 +28,19 @@ class ShellCommand implements ShellCommandInterface /** * @var ArgumentInterface[] Array of arguments to pass with the command. */ - private $arguments; + private $argumentList; /** * Constructor * * @param BinaryInterface $binary - * @param ArgumentInterface[] $arguments + * @param ArgumentInterface[] $argumentList */ - public function __construct(BinaryInterface $binary, array $arguments) + public function __construct(BinaryInterface $binary, array $argumentList) { $this->binary = $binary; - $this->arguments = $arguments; + $this->argumentList = $argumentList; } /** @@ -63,7 +63,7 @@ class ShellCommand implements ShellCommandInterface public function __toString() { return array_reduce( - $this->arguments, + $this->argumentList, function ($string, $argument) { return $string . ' ' . escapeshellarg($argument); },
Fix: Codestyle issues in ShellCommand.
ptlis_shell-command
train
php
07b737c567df6a64d2c74bc2a8f0ec4ee09e8161
diff --git a/lib/classifier/lsi.rb b/lib/classifier/lsi.rb index <HASH>..<HASH> 100644 --- a/lib/classifier/lsi.rb +++ b/lib/classifier/lsi.rb @@ -287,7 +287,7 @@ module Classifier s[ord] = 0.0 if s[ord] < s_cutoff end # Reconstruct the term document matrix, only with reduced rank - u * Matrix.diag( s ) * v.trans + u * ($GSL ? GSL::Matrix : ::Matrix).diag( s ) * v.trans end def node_for_content(item, &block)
Add check for $GSL when calling Matrix.diag to ensure GSL::Matrix is used. Also scope Matrix to root to prevent NameError exceptions.
jekyll_classifier-reborn
train
rb
00fec946ed925a21b8575a689e1a71161540e232
diff --git a/src/ProxyManager/Factory/AbstractBaseFactory.php b/src/ProxyManager/Factory/AbstractBaseFactory.php index <HASH>..<HASH> 100644 --- a/src/ProxyManager/Factory/AbstractBaseFactory.php +++ b/src/ProxyManager/Factory/AbstractBaseFactory.php @@ -106,9 +106,7 @@ abstract class AbstractBaseFactory $this->getGenerator()->generate(new ReflectionClass($className), $phpClass); - $signatureApplier = new ClassSignatureGenerator(new SignatureGenerator()); - - $phpClass = $signatureApplier->addSignature($phpClass, $proxyParameters); + $phpClass = $this->configuration->getClassSignatureGenerator()->addSignature($phpClass, $proxyParameters); $this->configuration->getGeneratorStrategy()->generate($phpClass); $this->configuration->getProxyAutoloader()->__invoke($proxyClassName);
Used signature class generator should come from the configuration
Ocramius_ProxyManager
train
php
f7ae308901bca087388c050459228abf481e0abf
diff --git a/openquake/commonlib/tests/calculators/event_loss_test.py b/openquake/commonlib/tests/calculators/event_loss_test.py index <HASH>..<HASH> 100644 --- a/openquake/commonlib/tests/calculators/event_loss_test.py +++ b/openquake/commonlib/tests/calculators/event_loss_test.py @@ -1,4 +1,3 @@ -import unittest from nose.plugins.attrib import attr from openquake.commonlib.tests.calculators import CalculatorTestCase @@ -8,8 +7,6 @@ from openquake.qa_tests_data.event_based_risk import case_2 class EventLossTestCase(CalculatorTestCase): @attr('qa', 'risk', 'event_loss') def test_case_2(self): - raise unittest.SkipTest # until the test is fixed properly - out = self.run_calc(case_2.__file__, 'job_haz.ini,job_risk.ini', calculation_mode='event_loss', exports='csv')
Restored event_loss tests
gem_oq-engine
train
py
956b4f86ae24dc82387d8067bef566c699fbdfd3
diff --git a/src/Lib/Twig/Extension/Profiler.php b/src/Lib/Twig/Extension/Profiler.php index <HASH>..<HASH> 100644 --- a/src/Lib/Twig/Extension/Profiler.php +++ b/src/Lib/Twig/Extension/Profiler.php @@ -18,15 +18,14 @@ use Twig\Profiler\Profile; * Class Basic. * @package WyriHaximus\TwigView\Lib\Twig\Extension */ -class Profiler extends ProfilerExtension +final class Profiler extends ProfilerExtension { /** * Enter $profile. * * @param \Twig\Profiler\Profile $profile Profile. - * */ - public function enter(Profile $profile): Profile + public function enter(Profile $profile) { $name = 'Twig Template: ' . substr($profile->getName(), strlen(ROOT) + 1); DebugTimer::start($name, __d('twig_view', $name)); @@ -38,9 +37,8 @@ class Profiler extends ProfilerExtension * Leave $profile. * * @param \Twig\Profiler\Profile $profile Profile. - * */ - public function leave(Profile $profile): Profile + public function leave(Profile $profile) { parent::leave($profile);
Profiler::enter/::leave do not return anything
WyriHaximus_TwigView
train
php
31ddb8355f7fe842f6f17ae8044bae3358f2c1a7
diff --git a/lib/ChargeBee/Models/Addon.php b/lib/ChargeBee/Models/Addon.php index <HASH>..<HASH> 100644 --- a/lib/ChargeBee/Models/Addon.php +++ b/lib/ChargeBee/Models/Addon.php @@ -11,6 +11,11 @@ class ChargeBee_Addon extends ChargeBee_Model # OPERATIONS #----------- + public static function create($params, $env = null) + { + return ChargeBee_Request::send(ChargeBee_Request::POST, "/addons", $params, $env); + } + public static function all($params = array(), $env = null) { return ChargeBee_Request::send(ChargeBee_Request::GET, "/addons", $params, $env); diff --git a/lib/ChargeBee/Models/Plan.php b/lib/ChargeBee/Models/Plan.php index <HASH>..<HASH> 100644 --- a/lib/ChargeBee/Models/Plan.php +++ b/lib/ChargeBee/Models/Plan.php @@ -11,6 +11,11 @@ class ChargeBee_Plan extends ChargeBee_Model # OPERATIONS #----------- + public static function create($params, $env = null) + { + return ChargeBee_Request::send(ChargeBee_Request::POST, "/plans", $params, $env); + } + public static function all($params = array(), $env = null) { return ChargeBee_Request::send(ChargeBee_Request::GET, "/plans", $params, $env);
Support for creating plans & addons on the fly via API.
chargebee_chargebee-php
train
php,php
8a2c1f7205219120d2b62539a8a917aa3d27bba3
diff --git a/src/Type/ArrayType.php b/src/Type/ArrayType.php index <HASH>..<HASH> 100644 --- a/src/Type/ArrayType.php +++ b/src/Type/ArrayType.php @@ -199,8 +199,6 @@ class ArrayType implements StaticResolvableType { if ($offsetType === null) { $offsetType = new IntegerType(); - } else { - $offsetType = TypeUtils::generalizeType($offsetType); } return new ArrayType(
No need to generalize offsetType in ArrayType
phpstan_phpstan
train
php
04d9c0e49f09e7b368dd0409fe7138b0dd695595
diff --git a/erizo_controller/erizoClient/src/webrtc-stacks/BaseStack.js b/erizo_controller/erizoClient/src/webrtc-stacks/BaseStack.js index <HASH>..<HASH> 100644 --- a/erizo_controller/erizoClient/src/webrtc-stacks/BaseStack.js +++ b/erizo_controller/erizoClient/src/webrtc-stacks/BaseStack.js @@ -72,15 +72,14 @@ const BaseStack = (specInput) => { candidate: 'end', }; } else { - if (!candidate.candidate.match(/a=/)) { - candidate.candidate = `a=${candidate.candidate}`; - } - candidateObject = { sdpMLineIndex: candidate.sdpMLineIndex, sdpMid: candidate.sdpMid, candidate: candidate.candidate, }; + if (!candidateObject.candidate.match(/a=/)) { + candidateObject.candidate = `a=${candidateObject.candidate}`; + } } if (specBase.remoteDescriptionSet) {
Use a variable instead of event object to concatenate candidate attr (#<I>)
lynckia_licode
train
js
e542f43ee15043b3c30568ae2e190e0d04a76ce2
diff --git a/currencies.js b/currencies.js index <HASH>..<HASH> 100644 --- a/currencies.js +++ b/currencies.js @@ -253,10 +253,10 @@ module.exports = [ }, { code: 'CHF', - symbol: 'CHF.', + symbol: 'CHF', thousandsSeparator: '\'', decimalSeparator: '.', - symbolOnLeft: true, + symbolOnLeft: false, spaceBetweenAmountAndSymbol: true, decimalDigits: 2 },
CHF symbol should be after the number According to <URL>
smirzaei_currency-formatter
train
js
8c28135755cae6cd82ba4c5d806d6311811e60e8
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,7 @@ 'use strict'; var listen = require('connected') + , parse = require('url').parse , path = require('path') , fs = require('fs'); @@ -96,10 +97,12 @@ function create(server, fn) { res.statusCode = 404; if (req.headers.host) { + var url = parse('http://'+ req.headers.host); + res.statusCode = 301; res.setHeader( 'Location', - 'http'+ (secure ? 's' : '') +'://'+ req.headers.host + req.url + 'http'+ (secure ? 's' : '') +'://'+ url.hostname +':'+ port + req.url ); }
[fix] Redirect to the correct server
primus_create-server
train
js
fb2c06eeb18bec5382f562fc050bc372d38a4bd5
diff --git a/rootpy/context.py b/rootpy/context.py index <HASH>..<HASH> 100644 --- a/rootpy/context.py +++ b/rootpy/context.py @@ -36,11 +36,14 @@ def preserve_current_canvas(): try: yield finally: - if old: + if old is not None: old.cd() else: - # Is it possible to set ROOT.gPad back to None, somehow? - pass + if ROOT.gPad.func() is not None: + with invisible_canvas(): + # This is a round-about way of resetting gPad to None. + # No other technique I tried could do it. + pass @contextmanager def preserve_current_directory(): @@ -52,6 +55,7 @@ def preserve_current_directory(): try: yield finally: + assert old, "BUG: assumptions were invalid. Please report this" # old is always valid and refers to ROOT.TROOT if no file is created. old.cd()
context: reset gPad to None if it was none before, add gDirectory assertion
rootpy_rootpy
train
py
32e08aeafd73c618bbe9d90b06a5b2f91683fbb6
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -117,6 +117,9 @@ OPSkinsAPI.prototype._req = function(httpMethod, iface, method, version, input, err.ray = res.headers['cf-ray']; } + // Discard the stream + res.on('data', devNull); + callback(err); return; } @@ -197,10 +200,12 @@ function userAgent() { return "node/" + process.versions.node + " node-opskins/" + require('./package.json').version; } +function devNull() { } + require('./interfaces/IInventory.js'); require('./interfaces/IPricing.js'); require('./interfaces/ISales.js'); require('./interfaces/ISupport.js'); require('./interfaces/ITest.js'); require('./interfaces/IUser.js'); -require('./interfaces/IStatus.js'); \ No newline at end of file +require('./interfaces/IStatus.js');
Fixed non-<I> responses preventing node from exiting
OPSkins_node-opskins-api
train
js
41855499b7a1a858f6186474bae372aff6577fc5
diff --git a/src/toil/test/utils/toilKillTest.py b/src/toil/test/utils/toilKillTest.py index <HASH>..<HASH> 100644 --- a/src/toil/test/utils/toilKillTest.py +++ b/src/toil/test/utils/toilKillTest.py @@ -31,7 +31,7 @@ class ToilKillTest(ToilTest): """Shared test variables.""" self.cwl = os.path.abspath('ABCWorkflowDebug/sleep.cwl') self.yaml = os.path.abspath('ABCWorkflowDebug/sleep.yaml') - self.jobstore = os.path.join(os.getcwd(), 'testkill') + self.jobstore = os.path.abspath('ABCWorkflowDebug/testkill') def tearDown(self): """Default tearDown for unittest."""
Change path for jobstore on jenkins.
DataBiosphere_toil
train
py
f53a516219561a84f77d880a20bdb4ed8add26e9
diff --git a/dosagelib/loader.py b/dosagelib/loader.py index <HASH>..<HASH> 100644 --- a/dosagelib/loader.py +++ b/dosagelib/loader.py @@ -7,6 +7,7 @@ import os import sys import zipfile import importlib +from .output import out def is_frozen (): @@ -36,7 +37,7 @@ def get_modules(folder='plugins'): name ="..%s.%s" % (folder, modname) yield importlib.import_module(name, __name__) except ImportError as msg: - print "ERROR: could not load module %s: %s" % (modname, msg) + out.error("could not load module %s: %s" % (modname, msg)) def get_importable_modules(folder):
Use output logging instead of print statement.
wummel_dosage
train
py
db364ba3d4b7fa5907a3ce3a7f94104d0cfde35c
diff --git a/src/test/java/rx/internal/operators/OperatorMergeTest.java b/src/test/java/rx/internal/operators/OperatorMergeTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/rx/internal/operators/OperatorMergeTest.java +++ b/src/test/java/rx/internal/operators/OperatorMergeTest.java @@ -494,7 +494,7 @@ public class OperatorMergeTest { }); } - @Test + @Test(timeout = 10000) public void testConcurrency() { Observable<Integer> o = Observable.range(1, 10000).subscribeOn(Schedulers.newThread());
MergeTest.testConcurrency timeout to let other tests run
ReactiveX_RxJava
train
java
1e45447e835f9a65585172857503d521afe63888
diff --git a/dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/ReplayCookieTests.java b/dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/ReplayCookieTests.java index <HASH>..<HASH> 100644 --- a/dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/ReplayCookieTests.java +++ b/dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/ReplayCookieTests.java @@ -207,7 +207,7 @@ public class ReplayCookieTests extends CommonSecurityFat { * - FFDCs should be emitted because the JWT signature is not valid */ @AllowedFFDC({ "org.jose4j.jwt.consumer.InvalidJwtException", "com.ibm.websphere.security.jwt.InvalidTokenException", - "com.ibm.ws.security.authentication.AuthenticationException" }) + "com.ibm.ws.security.authentication.AuthenticationException", "org.jose4j.jwt.consumer.InvalidJwtSignatureException" }) @Test public void test_reaccessResource_jwtCookieWithEmptySignature() throws Exception {
Additional minor updates to FAT tests for jose4j upgrade
OpenLiberty_open-liberty
train
java
cc978aa66dc7169fac472a517e479f428e4e285d
diff --git a/metrique/client/cubes/basecube.py b/metrique/client/cubes/basecube.py index <HASH>..<HASH> 100644 --- a/metrique/client/cubes/basecube.py +++ b/metrique/client/cubes/basecube.py @@ -12,5 +12,5 @@ class BaseCube(pyclient): self.query.find = self._find def _find(self, query, fields='', date=None, most_recent=True): - return self._queryfind(self.cube, query, fields, - date, most_recent) + return self._queryfind(cube=self.cube, query=query, fields=fields, + date=date, most_recent=most_recent)
update calling api to not send in cube (redudently)
kejbaly2_metrique
train
py
a64f524987eb6428e81399eeb1c36711ed717f7e
diff --git a/emitter.js b/emitter.js index <HASH>..<HASH> 100644 --- a/emitter.js +++ b/emitter.js @@ -124,14 +124,16 @@ Emitter.prototype = { var argv = [].slice.call( arguments, 1 ) var i, len = listeners.length + function fire( handler, argv ) { + typeof handler !== 'function' ? + handler.handleEvent.apply( handler, argv ) : + handler.apply( this, argv ) + } + for( i = 0; i < len; i++ ) { Emitter.nextTick( - function( handler, argv ) { - typeof handler !== 'function' - ? handler.handleEvent.apply( handler, argv ) - : handler.apply( this, argv ) - }.bind( this, listeners[i], argv ) - ) + fire.bind( this, listeners[i], argv ) + ) } return true
Moved function creation out of loop in #emit()
jhermsmeier_node-async-emitter
train
js
7786c675cba4319f6c9e048d969a5e14a8c6a87d
diff --git a/lib/mittsu/renderers/opengl_renderer.rb b/lib/mittsu/renderers/opengl_renderer.rb index <HASH>..<HASH> 100644 --- a/lib/mittsu/renderers/opengl_renderer.rb +++ b/lib/mittsu/renderers/opengl_renderer.rb @@ -21,7 +21,7 @@ module Mittsu attr_accessor :auto_clear, :auto_clear_color, :auto_clear_depth, :auto_clear_stencil, :sort_objects, :gamma_factor, :gamma_input, :gamma_output, :shadow_map_enabled, :shadow_map_type, :shadow_map_cull_face, :shadow_map_debug, :shadow_map_cascade, :max_morph_targets, :max_morph_normals, :info, :pixel_ratio, :window, :width, :height, :state def initialize(parameters = {}) - puts "OpenGLRenderer #{REVISION}" + puts "OpenGLRenderer (Revision #{REVISION})" @pixel_ratio = 1.0
patch: clarify opening puts a bit
jellymann_mittsu
train
rb
c6105a4d3ad063d9ccc8762d5f50bebfcbfd1982
diff --git a/test/node/server.js b/test/node/server.js index <HASH>..<HASH> 100644 --- a/test/node/server.js +++ b/test/node/server.js @@ -28,13 +28,13 @@ test('torrent.createServer: programmatic http server', function (t) { var host = 'http://localhost:' + port // Index page should list files in the torrent - get.concat(host + '/', function (err, data) { + get.concat(host + '/', function (err, res, data) { t.error(err, 'got http response for /') data = data.toString() t.ok(data.indexOf('Leaves of Grass by Walt Whitman.epub') !== -1) // Verify file content for first (and only) file - get.concat(host + '/0', function (err, data) { + get.concat(host + '/0', function (err, res, data) { t.error(err, 'got http response for /0') t.deepEqual(data, common.leaves.content)
changes for simple-get <I>
webtorrent_webtorrent
train
js
94ace113d171192c6d4354f7842bceaa2cfb4261
diff --git a/bcbio/structural/prioritize.py b/bcbio/structural/prioritize.py index <HASH>..<HASH> 100644 --- a/bcbio/structural/prioritize.py +++ b/bcbio/structural/prioritize.py @@ -140,9 +140,10 @@ def _combine_files(tsv_files, work_dir, data): out_file = os.path.join(work_dir, "%s-prioritize.tsv" % (sample)) if not utils.file_exists(out_file): with file_transaction(data, out_file) as tx_out_file: + tmpdir = os.path.dirname(tx_out_file) input_files = " ".join(tsv_files) sort_cmd = bedutils.get_sort_cmd() - cmd = "{{ echo '{header}'; cat {input_files} | {sort_cmd} -k3,3 -k4,4n; }} > {tx_out_file}" + cmd = "{{ echo '{header}'; cat {input_files} | {sort_cmd} -T {tmpdir} -k3,3 -k4,4n; }} > {tx_out_file}" do.run(cmd.format(**locals()), "Combine prioritized from multiple callers") return out_file
SV prioritize: use temporary directory for sorting Avoids using potentially problematic global TMPDIR #<I>
bcbio_bcbio-nextgen
train
py
8cc92dfc5e5b34194ef8320a7ce79d5ddc9e7418
diff --git a/src/japronto/request/__init__.py b/src/japronto/request/__init__.py index <HASH>..<HASH> 100644 --- a/src/japronto/request/__init__.py +++ b/src/japronto/request/__init__.py @@ -151,24 +151,15 @@ def parse_cookie(cookie): @memoize def cookies(request): - """A dictionary of Cookie.Morsel objects.""" - cookies = SimpleCookie() - if 'Cookie' in request.headers: - try: - parsed = parse_cookie(request.headers['Cookie']) - except Exception: - pass - else: - for k, v in parsed.items(): - try: - cookies[k] = v - except Exception: - # SimpleCookie imposes some restrictions on keys; - # parse_cookie does not. Discard any cookies - # with disallowed keys. - pass - - return cookies + if 'Cookie' not in request.headers: + return {} + + try: + cookies = parse_cookie(request.headers['Cookie']) + except Exception: + return {} + + return {k: urllib.parse.unquote(v) for k, v in cookies.items()} File = collections.namedtuple('File', ['type', 'body', 'name'])
make response cookies a dictionary, percent decode them automatically since many libs do that
squeaky-pl_japronto
train
py
421508b8be4192647f64d578c4212eae5007362f
diff --git a/mrq/monkey.py b/mrq/monkey.py index <HASH>..<HASH> 100644 --- a/mrq/monkey.py +++ b/mrq/monkey.py @@ -32,7 +32,7 @@ def patch_pymongo(config): return monkey_patched from pymongo.collection import Collection - for method in ["find", "update", "insert", "remove", "find_and_modify", "aggregate"]: + for method in ["find", "update", "insert", "remove", "find_and_modify"]: setattr(Collection, method, gen_monkey_patch(Collection, method)) # MongoKit completely replaces the code from PyMongo's find() function, so we
don't log aggregates, they already show up as commands.
pricingassistant_mrq
train
py
1cc0203a9ffa28c93dc0e9c96d5c44051fc3cc95
diff --git a/src/libs/customelement.js b/src/libs/customelement.js index <HASH>..<HASH> 100644 --- a/src/libs/customelement.js +++ b/src/libs/customelement.js @@ -21,11 +21,9 @@ export default class CustomElement { let ComElement = document.registerElement(validComponentName, ConstructedClass); // factory for creating custom element - (function(ComElement){ - ComponentClass.instance = function(){ - return new ComElement(); - }; - }(ComElement)); + ComponentClass.instance = function(){ + return new ComElement(); + }; } /**
refactoring part of ComponentClass.instance
SerkanSipahi_app-decorators
train
js
2e46b5e9e95147b3057a4319c14b9a031639ab45
diff --git a/test-client.py b/test-client.py index <HASH>..<HASH> 100644 --- a/test-client.py +++ b/test-client.py @@ -1,4 +1,7 @@ -import insights.client as client +from insights.client import InsightsClientApi + + +client = InsightsClientApi() ''' Get version @@ -6,7 +9,7 @@ Get version print '================' print 'Getting version' print '---------------' -print client.get_version() +print client.version() print ''
configure test-client.py to use the class
RedHatInsights_insights-core
train
py
5d838edceff1bc047ff9b225687cdd8d509ebd65
diff --git a/cmd/admin-handlers.go b/cmd/admin-handlers.go index <HASH>..<HASH> 100644 --- a/cmd/admin-handlers.go +++ b/cmd/admin-handlers.go @@ -1470,10 +1470,13 @@ func (a adminAPIHandlers) ServerInfoHandler(w http.ResponseWriter, r *http.Reque } func fetchLambdaInfo(cfg config.Config) []map[string][]madmin.TargetIDStatus { - lambdaMap := make(map[string][]madmin.TargetIDStatus) // Fetch the targets - targetList, _ := notify.RegisterNotificationTargets(cfg, GlobalServiceDoneCh, NewCustomHTTPTransport(), nil, true) + targetList, err := notify.RegisterNotificationTargets(cfg, GlobalServiceDoneCh, NewCustomHTTPTransport(), nil, true) + if err != nil { + return nil + } + lambdaMap := make(map[string][]madmin.TargetIDStatus) for targetID, target := range targetList.TargetMap() { targetIDStatus := make(map[string]madmin.Status)
Fix panic in ServerInfoHandler when (#<I>)
minio_minio
train
go
60fba6b64319774f4f78d47261e1a311acb4f51e
diff --git a/crispy_forms/__init__.py b/crispy_forms/__init__.py index <HASH>..<HASH> 100644 --- a/crispy_forms/__init__.py +++ b/crispy_forms/__init__.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -__version__ = '1.2.5' +__version__ = '1.2.6'
Bumping version to <I>
django-crispy-forms_django-crispy-forms
train
py
bee32c0ae68b1e6cf224f9017c758a8e31e8be83
diff --git a/core/setup.py b/core/setup.py index <HASH>..<HASH> 100644 --- a/core/setup.py +++ b/core/setup.py @@ -65,7 +65,7 @@ EXTRAS_REQUIREMENTS = { setup( name='google-cloud-core', - version='0.27.0', + version='0.27.1', description='API Client library for Google Cloud: Core Helpers', long_description=README, namespace_packages=[
Prep core-<I> release. (#<I>)
googleapis_google-cloud-python
train
py
07e8ff89719e8f66f21683fc45aca9af788a7331
diff --git a/fsps/__init__.py b/fsps/__init__.py index <HASH>..<HASH> 100644 --- a/fsps/__init__.py +++ b/fsps/__init__.py @@ -4,7 +4,7 @@ from __future__ import (division, print_function, absolute_import, unicode_literals) -__version__ = "0.2.0" +__version__ = "0.2.1" import os import re
Bump revision number to <I>
dfm_python-fsps
train
py
d6927ddc78e1012fab16278b9988dde6a601b374
diff --git a/autoflake.py b/autoflake.py index <HASH>..<HASH> 100644 --- a/autoflake.py +++ b/autoflake.py @@ -33,7 +33,7 @@ import pyflakes.messages import pyflakes.reporter -__version__ = '0.3' +__version__ = '0.3.1' PYFLAKES_BIN = 'pyflakes'
Increment patch version to <I>
myint_autoflake
train
py
a572c9c4183a6b9c7efab5c8fda56747882536aa
diff --git a/gulpfile.babel.js b/gulpfile.babel.js index <HASH>..<HASH> 100755 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -153,7 +153,7 @@ gulp.task('core-test-separately', ['prepare', 'core', 'core-dts-test'], (done) = } else { listOfSpecFiles = glob.sync(path.join(__dirname, 'core/src/**/*.spec.js')); } - + // Separately launch Karma server for each spec file try { for (let i = 0 ; i < listOfSpecFiles.length ; i++) { @@ -174,7 +174,7 @@ gulp.task('core-test-separately', ['prepare', 'core', 'core-dts-test'], (done) = }, (exitCode) => { const exitMessage = `Karma server has exited with ${exitCode}`; - + switch (exitCode) { case 0: // success $.util.log($.util.colors.green(exitMessage));
style(gulpfile): Removed trailing spaces.
OnsenUI_OnsenUI
train
js
7b8bcfb1739a0c662edf6b57fed2528898b31d02
diff --git a/influxql/query_executor.go b/influxql/query_executor.go index <HASH>..<HASH> 100644 --- a/influxql/query_executor.go +++ b/influxql/query_executor.go @@ -66,6 +66,9 @@ type ExecutionOptions struct { // Node to execute on. NodeID uint64 + + // Quiet suppresses non-essential output from the query executor. + Quiet bool } // ExecutionContext contains state that the query is currently executing with. @@ -226,7 +229,9 @@ func (e *QueryExecutor) executeQuery(query *Query, opt ExecutionOptions, closing } // Log each normalized statement. - e.Logger.Println(stmt.String()) + if !ctx.Quiet { + e.Logger.Println(stmt.String()) + } // Send any other statements to the underlying statement executor. err = e.StatementExecutor.ExecuteStatement(stmt, ctx)
Add option to suppress logging query statements in the query executor
influxdata_influxdb
train
go
63039b9c3356f73421b3742134959014d81973b0
diff --git a/railties/lib/rails/code_statistics.rb b/railties/lib/rails/code_statistics.rb index <HASH>..<HASH> 100644 --- a/railties/lib/rails/code_statistics.rb +++ b/railties/lib/rails/code_statistics.rb @@ -23,7 +23,7 @@ class CodeStatistics #:nodoc: private def calculate_statistics - Hash[@pais.map { |pair| [pair.first, calculate_directory_statistics(pair.last)] }] + Hash[@pairs.map{|pair| [pair.first, calculate_directory_statistics(pair.last)]}] end def calculate_directory_statistics(directory, pattern = /.*\.rb$/) diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index <HASH>..<HASH> 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -33,5 +33,10 @@ module ApplicationTests assert_match "SuperMiddleware", Dir.chdir(app_path){ `rake middleware` } end + + def test_code_statistics_sanity + assert_match "Code LOC: 5 Test LOC: 0 Code to Test Ratio: 1:0.0", + Dir.chdir(app_path){ `rake stats` } + end end -end \ No newline at end of file +end
Fix typo and add sanity test for code statistics rake task.
rails_rails
train
rb,rb
d06d0188b0ff5e27f36e1a100560514717abc9cf
diff --git a/lib/grom/graph_mapper.rb b/lib/grom/graph_mapper.rb index <HASH>..<HASH> 100644 --- a/lib/grom/graph_mapper.rb +++ b/lib/grom/graph_mapper.rb @@ -30,11 +30,13 @@ module Grom def statements_mapper_by_subject(graph) graph.subjects.map do |subject| + individual_graph = RDF::Graph.new pattern = RDF::Query::Pattern.new(subject, :predicate, :object) attributes = graph.query(pattern).map do |statement| + individual_graph << statement get_object_and_predicate(statement) end.reduce({}, :merge) - attributes.merge({id: get_id(subject), graph: graph}) + attributes.merge({id: get_id(subject), graph: individual_graph }) end end
amended graph property to only bring back the individual graph per subject
ukparliament_grom
train
rb
4e357b47ca81641409cb2dc87c23161569bf2080
diff --git a/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterEngine.java b/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterEngine.java index <HASH>..<HASH> 100644 --- a/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterEngine.java +++ b/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterEngine.java @@ -62,7 +62,7 @@ public class MeasureFilterEngine implements ServerComponent { } catch (NumberFormatException e) { result.setError(MeasureFilterResult.Error.VALUE_SHOULD_BE_A_NUMBER); - LOG.error("Value selected for the metric should be a number: " + context); + LOG.debug("Value selected for the metric should be a number: " + context); } catch (Exception e) { result.setError(MeasureFilterResult.Error.UNKNOWN); LOG.error("Fail to execute measure filter: " + context, e);
SONAR-<I> Replace log level from ERROR to DEBUG
SonarSource_sonarqube
train
java
723e8eed42658cabc28f39b7cfb4bdb2e4769d95
diff --git a/spyder/widgets/status.py b/spyder/widgets/status.py index <HASH>..<HASH> 100644 --- a/spyder/widgets/status.py +++ b/spyder/widgets/status.py @@ -48,9 +48,7 @@ class StatusBarWidget(QWidget): self.set_icon(icon) # See spyder-ide/spyder#9044. - self.text_font = QFont(QFont().defaultFamily()) - self.text_font.setPointSize(self.font().pointSize()) - self.text_font.setBold(True) + self.text_font = QFont(QFont().defaultFamily(), weight=QFont.Normal) self.label_value.setAlignment(Qt.AlignRight) self.label_value.setFont(self.text_font)
Status bar: Don't set its font weight to bold
spyder-ide_spyder
train
py
6f455a4a2533b43f1a6a763875156a88e7e565d3
diff --git a/OpenPNM/Geometry/models/throat_length.py b/OpenPNM/Geometry/models/throat_length.py index <HASH>..<HASH> 100644 --- a/OpenPNM/Geometry/models/throat_length.py +++ b/OpenPNM/Geometry/models/throat_length.py @@ -25,7 +25,7 @@ def straight(network, value = E-(D1+D2)/2. value = value[throats] if _sp.any(value<0): - geometry._logger.warning('Negative throat lengths are calculated. Arbitrary positive length assigned (1e9 meters)') + print('Negative throat lengths are calculated. Arbitrary positive length assigned (1e-9 meters)') Ts = _sp.where(value<0)[0] value[Ts] = 1e-9 return value
Found one instance of obj._logger being called. I converted it to just a print statement for now... PS - The pull request approach will be way too annoying for these little fixes! I'll use for larger projects/features/etc, but not for little bugs like this.
PMEAL_OpenPNM
train
py
f0d93764ea5ed09d7c8bf6d699448b8efd7567f8
diff --git a/docs/source/conf.py b/docs/source/conf.py index <HASH>..<HASH> 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -53,9 +53,9 @@ copyright = u'2016-2018, JWCrypto Contributors' # built documents. # # The short X.Y version. -version = '0.8' +version = '0.9' # The full version, including alpha/beta/rc tags. -release = '0.8' +release = '0.9.dev1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ from setuptools import setup setup( name = 'jwcrypto', - version = '0.8', + version = '0.9.dev1', license = 'LGPLv3+', maintainer = 'JWCrypto Project Contributors', maintainer_email = 'simo@redhat.com',
Post release bump to <I>.dev1
latchset_jwcrypto
train
py,py
fb8f30ca7da385e84a4d9578ebf8bb57d0c33d8c
diff --git a/rest_framework_json_api/utils.py b/rest_framework_json_api/utils.py index <HASH>..<HASH> 100644 --- a/rest_framework_json_api/utils.py +++ b/rest_framework_json_api/utils.py @@ -366,7 +366,7 @@ def extract_relationships(fields, resource, resource_instance): relation_data = list() serializer_data = resource.get(field_name) - resource_instance_queryset = relation_instance_or_manager.all() + resource_instance_queryset = list(relation_instance_or_manager.all()) if isinstance(serializer_data, list): for position in range(len(serializer_data)): nested_resource_instance = resource_instance_queryset[position] @@ -438,7 +438,7 @@ def extract_included(fields, resource, resource_instance, included_resources): serializer = field.child model = serializer.Meta.model relation_type = format_relation_name(model.__name__) - relation_queryset = relation_instance_or_manager.all() + relation_queryset = list(relation_instance_or_manager.all()) # Get the serializer fields serializer_fields = get_serializer_fields(serializer)
Accessing by index on Mode.objects.all() in Django produces weird behavior. Namely what should be a list of records like [1, 2, 3] becomes [1, 1, 2]. The solution is to cast to a list first
django-json-api_django-rest-framework-json-api
train
py
db35f9a8053d238cf270c8a482d788946cc3b1a9
diff --git a/test/moneyflow_tests.js b/test/moneyflow_tests.js index <HASH>..<HASH> 100644 --- a/test/moneyflow_tests.js +++ b/test/moneyflow_tests.js @@ -216,7 +216,7 @@ contract('Moneyflow', (accounts) => { token = await StdDaoToken.new("StdToken","STDT",18, true, true, true, 1000000000000000000000000000); - await token.mint(creator, 1000); + await token.mint(creator, 1000, {gasPrice: 0}); store = await DaoStorage.new([token.address],{from: creator}); daoBase = await DaoBase.new(store.address,{from: creator});
Update StdDaoToken - copy balances when voting begins v <I>
Thetta_Thetta-DAO-Framework
train
js
b28f8120ff7a4955eaafb2beb43dcb0a562b7ca3
diff --git a/app/controllers/barbeque/sns_subscriptions_controller.rb b/app/controllers/barbeque/sns_subscriptions_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/barbeque/sns_subscriptions_controller.rb +++ b/app/controllers/barbeque/sns_subscriptions_controller.rb @@ -44,6 +44,6 @@ class Barbeque::SnsSubscriptionsController < Barbeque::ApplicationController private def fetch_sns_topic_arns - Barbeque::SNSSubscriptionService.sns_client.list_topics.topics.map(&:topic_arn) + Barbeque::SNSSubscriptionService.sns_client.list_topics.flat_map(&:topics).map(&:topic_arn) end end
Fetch all SNS topic arns
cookpad_barbeque
train
rb
532a24181e35e86085264589f8814ed6346d2b95
diff --git a/frasco/users/avatars.py b/frasco/users/avatars.py index <HASH>..<HASH> 100644 --- a/frasco/users/avatars.py +++ b/frasco/users/avatars.py @@ -1,6 +1,7 @@ from frasco.ext import * from frasco.upload import url_for_upload from frasco.helpers import url_for +from frasco.utils import slugify from flask import current_app, request import sqlalchemy as sqla import hashlib @@ -80,6 +81,7 @@ def url_for_avatar(user): username = username.lower().encode('utf-8') else: username = username.lower() + username = slugify(username) hash = hashlib.md5(username).hexdigest() email = getattr(user, state.options["gravatar_email_column"] or 'email', None) if email:
slugify username before using in avatr url
frascoweb_frasco
train
py
9e3eec914d23584ac804debc5613a20bf3042574
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ setup(name='salt', scripts=['scripts/salt-master', 'scripts/salt-minion', 'scripts/saltkey', - 'scripts/salt-ftp', + 'scripts/salt-cp', 'scripts/salt'], data_files=[('/etc/salt', ['conf/master',
Fix that salt-cp thing in the setup.py
saltstack_salt
train
py
aaa03aeb4988ff491fc8150a30a5393e42247eef
diff --git a/Tests/HTTPTest.php b/Tests/HTTPTest.php index <HASH>..<HASH> 100644 --- a/Tests/HTTPTest.php +++ b/Tests/HTTPTest.php @@ -46,8 +46,6 @@ class HTTPTest extends \PHPUnit_Framework_TestCase * * Note: get_HTTP_code() relies on this $this->curl_instance. More testing may be required. * - * @covers ::get_HTTP_code - * * @see HTTP::get_HTTP_code_test() */ public function test_get_HTTP_code()
Fix problem with HTTPTest.php
MW-Peachy_Peachy
train
php
3fa102b64c9e0acf8e540ac370ef20540a213965
diff --git a/lib/timber-image-helper.php b/lib/timber-image-helper.php index <HASH>..<HASH> 100644 --- a/lib/timber-image-helper.php +++ b/lib/timber-image-helper.php @@ -84,8 +84,8 @@ class TimberImageHelper { $post = get_post( $post_id ); $image_types = array( 'image/jpeg', 'image/png', 'image/gif', 'image/jpg' ); if ( $post->post_type == 'attachment' && in_array( $post->post_mime_type, $image_types ) ) { - TimberImageHelper::delete_resized_files_from_url( $post->guid ); - TimberImageHelper::delete_letterboxed_files_from_url( $post->guid ); + TimberImageHelper::delete_resized_files( $post->guid ); + TimberImageHelper::delete_letterboxed_files( $post->guid ); } } ); } @@ -470,4 +470,4 @@ class TimberImageHelper { TimberImageHelper::load_dependencies(); TimberImageHelper::add_constants(); TimberImageHelper::add_actions(); -TimberImageHelper::add_filters(); \ No newline at end of file +TimberImageHelper::add_filters();
FIx deleting image, wrong function name delete_resized_files_from_url -> delete_resized_files
timber_timber
train
php