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
46d97a8a3a66b19bd708aa918320ab2f2eb9b233
diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index <HASH>..<HASH> 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -795,10 +795,16 @@ class XCCClient(IMMClient): rt = self.wc.grab_json_response('/api/providers/rp_vm_remote_connect', json.dumps(rq)) if 'return' not in rt or rt['return'] != 0: + if rt['return'] in (657, 659, 656): + raise pygexc.InvalidParameterValue( + 'Given location was unreachable by the XCC') raise Exception('Unhandled return: ' + repr(rt)) rt = self.wc.grab_json_response('/api/providers/rp_vm_remote_mountall', '{}') if 'return' not in rt or rt['return'] != 0: + if rt['return'] in (657, 659, 656): + raise pygexc.InvalidParameterValue( + 'Given location was unreachable by the XCC') raise Exception('Unhandled return: ' + repr(rt)) if not self.webkeepalive: self._keepalivesession = self._wc
Provide better error message for common scenarios There are a few error codes that pretty much mean the same thing. Provide a better text message to match that error code. Change-Id: Ic<I>b8dff3f<I>ddd<I>c7b<I>eb8dab<I>
openstack_pyghmi
train
py
78406fc0b6cd3ee00daa8ffaa16c7e83541c1a0e
diff --git a/library/src/com/nineoldandroids/view/ViewPropertyAnimator.java b/library/src/com/nineoldandroids/view/ViewPropertyAnimator.java index <HASH>..<HASH> 100644 --- a/library/src/com/nineoldandroids/view/ViewPropertyAnimator.java +++ b/library/src/com/nineoldandroids/view/ViewPropertyAnimator.java @@ -298,9 +298,28 @@ public class ViewPropertyAnimator { } @Override - public void setListener(AnimatorListener listener) { - // TODO Not sure what to do here. We can dispatch callbacks fine but we can't pass - // back the native animation instance... perhaps just null? + public void setListener(final AnimatorListener listener) { + mNative.setListener(new android.animation.Animator.AnimatorListener() { + @Override + public void onAnimationStart(android.animation.Animator animation) { + listener.onAnimationStart(null); + } + + @Override + public void onAnimationRepeat(android.animation.Animator animation) { + listener.onAnimationRepeat(null); + } + + @Override + public void onAnimationEnd(android.animation.Animator animation) { + listener.onAnimationEnd(null); + } + + @Override + public void onAnimationCancel(android.animation.Animator animation) { + listener.onAnimationCancel(null); + } + }); } @Override
Forward listener events with a null animation for now.
JakeWharton_NineOldAndroids
train
java
ca09aa4a981b16110c39b71b129457cb58cff492
diff --git a/Eloquent/Relations/MorphMany.php b/Eloquent/Relations/MorphMany.php index <HASH>..<HASH> 100755 --- a/Eloquent/Relations/MorphMany.php +++ b/Eloquent/Relations/MorphMany.php @@ -46,4 +46,15 @@ class MorphMany extends MorphOneOrMany { return $this->matchMany($models, $results, $relation); } + + /** + * Create a new instance of the related model. Allow mass-assignment. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function forceCreate(array $attributes = []) { + $attributes[$this->getMorphType()] = $this->morphClass; + parent::forceCreate($attributes); + } }
Fixed bug on forceCreate on a MorphMay relationship not including morph type
illuminate_database
train
php
7026d6e6b553418a2ee46c98c7220b1d577629eb
diff --git a/src/Handlers/AbstractTreeHandler.php b/src/Handlers/AbstractTreeHandler.php index <HASH>..<HASH> 100644 --- a/src/Handlers/AbstractTreeHandler.php +++ b/src/Handlers/AbstractTreeHandler.php @@ -358,15 +358,15 @@ class AbstractTreeHandler implements Handler protected function getParser() { - $refParser = new \ReflectionClass(\PhpParser\Parser::class); + $refParser = new \ReflectionClass(\PhpParser\Parser::class); - if (!$refParser->isInterface()) { - /** + if (! $refParser->isInterface()) { + /* * If we are running nikic/php-parser 1.* */ return new \PhpParser\Parser(new Lexer()); } else { - /** + /* * If we are running nikic/php-parser 2.* */ return (new \PhpParser\ParserFactory)->create(\PhpParser\ParserFactory::PREFER_PHP7);
Applied fixes from StyleCI (#8) [ci skip] [skip ci]
KKSzymanowski_Traitor
train
php
97357d8a16cf65a4350b93e8f3ca0fec8a193ddb
diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -261,6 +261,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run this.project = job; this.timestamp = timestamp; this.state = State.NOT_STARTED; + getRootDir().mkdirs(); } /** @@ -828,9 +829,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run * Files related to this {@link Run} should be stored below this directory. */ public File getRootDir() { - File f = new File(project.getBuildDir(),getId()); - f.mkdirs(); - return f; + return new File(project.getBuildDir(),getId()); } /**
mkdirs() is expensive on Windows, so don't do it on every getRootDir()
jenkinsci_jenkins
train
java
3c60625dc2ed64ec584e29e0b3807c0b770fb04f
diff --git a/CHANGELOG b/CHANGELOG index <HASH>..<HASH> 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +v1.1.1 + - return singleton from app instantiation v1.0.1 - Add caching to FB token retrieval, add specs v1.0.0 diff --git a/lib/fb/feed.rb b/lib/fb/feed.rb index <HASH>..<HASH> 100644 --- a/lib/fb/feed.rb +++ b/lib/fb/feed.rb @@ -11,6 +11,7 @@ module FB @app_id = app_id @app_secret = app_secret @facebook_oauth = ::Koala::Facebook::OAuth.new(@app_id, @app_secret) + self end def get_feed(name, options={}) diff --git a/lib/fb/feed/version.rb b/lib/fb/feed/version.rb index <HASH>..<HASH> 100644 --- a/lib/fb/feed/version.rb +++ b/lib/fb/feed/version.rb @@ -1,5 +1,5 @@ module FB class Feed - VERSION = '1.0.1'.freeze + VERSION = '1.1.1'.freeze end end
Return self from FB api instantiation
DigitalReflow_fb-feed
train
CHANGELOG,rb,rb
5db2e9fe40ac1b7341cadd60be72c6450c995ed7
diff --git a/Gemfile.lock b/Gemfile.lock index <HASH>..<HASH> 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - with_events (0.1.0) + with_events (0.1.1) activesupport (~> 4.2.7) require_all (~> 1.4.0) sidekiq (~> 3.5.3) diff --git a/lib/with_events/version.rb b/lib/with_events/version.rb index <HASH>..<HASH> 100644 --- a/lib/with_events/version.rb +++ b/lib/with_events/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module WithEvents - VERSION = '0.1.0' + VERSION = '0.1.1' end diff --git a/spec/with_events/version_spec.rb b/spec/with_events/version_spec.rb index <HASH>..<HASH> 100644 --- a/spec/with_events/version_spec.rb +++ b/spec/with_events/version_spec.rb @@ -1,5 +1,5 @@ RSpec.describe WithEvents::VERSION do it 'Should be 0.1.0' do - expect(WithEvents::VERSION).to eq('0.1.0') + expect(WithEvents::VERSION).to eq('0.1.1') end end
chore(version): Update gem version
pandomic_with_events
train
lock,rb,rb
d42cbdd61392eb2c48d0eef841c305b1b9172cfc
diff --git a/admin/code/CMSProfileController.php b/admin/code/CMSProfileController.php index <HASH>..<HASH> 100644 --- a/admin/code/CMSProfileController.php +++ b/admin/code/CMSProfileController.php @@ -23,6 +23,7 @@ class CMSProfileController extends LeftAndMain { $form = parent::getEditForm($id, $fields); if($form instanceof SS_HTTPResponse) return $form; + $form->Fields()->removeByName('LastVisited'); $form->Fields()->push(new HiddenField('ID', null, Member::currentUserID())); $form->Actions()->push( FormAction::create('save',_t('CMSMain.SAVE', 'Save'))
Removed "Last visited" from admin/myprofile (fixes #<I>) It doesn't make any sense in this context
silverstripe_silverstripe-framework
train
php
76ee4d4e7ca4ea278e57efc60269b0a61e1a6871
diff --git a/gyp_learnuv.py b/gyp_learnuv.py index <HASH>..<HASH> 100755 --- a/gyp_learnuv.py +++ b/gyp_learnuv.py @@ -43,7 +43,7 @@ def host_arch(): def compiler_version(): proc = subprocess.Popen(CC.split() + ['--version'], stdout=subprocess.PIPE) is_clang = 'clang' in proc.communicate()[0].split('\n')[0] - proc = subprocess.Popen(CC.split() + ['-dumpversion'], stdout=subprocess.PIPE) + proc = subprocess.Popen(CC.split() + ['-dumpfullversion','-dumpversion'], stdout=subprocess.PIPE) version = proc.communicate()[0].split('.') version = map(int, version[:2]) version = tuple(version)
fix for version info in recent gcc
thlorenz_learnuv
train
py
dff00797438a77442a18db943ee2442cc8b69fad
diff --git a/dipper/sources/KEGG.py b/dipper/sources/KEGG.py index <HASH>..<HASH> 100644 --- a/dipper/sources/KEGG.py +++ b/dipper/sources/KEGG.py @@ -499,7 +499,7 @@ class KEGG(Source): #print(kegg_disease_id+'_'+omim_disease_id) gu.addClassToGraph(g, kegg_disease_id, None) gu.addClassToGraph(g, omim_disease_id, None) - gu.addEquivalentClass(g, kegg_disease_id, omim_disease_id) + gu.addXref(g, kegg_disease_id, omim_disease_id) logger.info("Done with KEGG disease to OMIM disease mappings.") return
KEGG.py: Switched KEGG disease to OMIM disease relation to XREF.
monarch-initiative_dipper
train
py
8c159b106baa22f7374cce86340551243d5e89d9
diff --git a/src/terra/Command/App/AppAdd.php b/src/terra/Command/App/AppAdd.php index <HASH>..<HASH> 100644 --- a/src/terra/Command/App/AppAdd.php +++ b/src/terra/Command/App/AppAdd.php @@ -103,7 +103,7 @@ class AppAdd extends Command // Offer to enable the environment (only if interactive.) - if ($input->isInteractive()) { + if (!$input->isInteractive()) { return; }
Wrong logic when checking if we should quit the command!
terra-ops_terra-cli
train
php
4d7ea2bcabe7c9f43c3763cc8f741953e56b0c00
diff --git a/cherrypy/test/test_core.py b/cherrypy/test/test_core.py index <HASH>..<HASH> 100644 --- a/cherrypy/test/test_core.py +++ b/cherrypy/test/test_core.py @@ -372,7 +372,7 @@ class CoreRequestHandlingTest(helper.CPWebCase): ignore.append(TypeError) try: self.getPage("/params/?notathing=meeting") - self.assertInBody("TypeError: index() got an unexpected keyword argument 'notathing'") + self.assertInBody("index() got an unexpected keyword argument 'notathing'") finally: ignore.pop()
Fix for test which broke in [<I>].
cherrypy_cheroot
train
py
f2faff2864f2828416e3b41fda47fff7e4a957a8
diff --git a/client/me/help/controller.js b/client/me/help/controller.js index <HASH>..<HASH> 100644 --- a/client/me/help/controller.js +++ b/client/me/help/controller.js @@ -15,10 +15,10 @@ import HelpComponent from './main'; import CoursesComponent from './help-courses'; import ContactComponent from './help-contact'; import { CONTACT, SUPPORT_ROOT } from 'calypso/lib/url/support'; -import userUtils from 'calypso/lib/user/utils'; +import { isUserLoggedIn } from 'calypso/state/current-user/selectors'; export function loggedOut( context, next ) { - if ( userUtils.isLoggedIn() ) { + if ( isUserLoggedIn( context.store.getState() ) ) { return next(); }
Help: Use Redux to check if user is logged in (#<I>)
Automattic_wp-calypso
train
js
76b57e9387bb81b2df275a8ecb039ed89bfb4ca5
diff --git a/playground/samples/customObject.js b/playground/samples/customObject.js index <HASH>..<HASH> 100644 --- a/playground/samples/customObject.js +++ b/playground/samples/customObject.js @@ -6,7 +6,11 @@ function ObjectFieldTemplate({ TitleField, properties, title, description }) { <TitleField title={title} /> <div className="row"> {properties.map(prop => ( - <div className="col-lg-2 col-md-4 col-sm-6 col-xs-12">{prop}</div> + <div + className="col-lg-2 col-md-4 col-sm-6 col-xs-12" + key={prop.content.key}> + {prop.content} + </div> ))} </div> {description}
Fix customObject sample (#<I>) The sample for customObject.js had few defects. React <I> throws an no-keys-defined warning as well as 'child-can-not-be-objects' exception. The code has been changed to fix these issues. * Fixed customObject sample to fix "Objects are not valid as a React child" error for react <I> and to avoid "<URL>
mozilla-services_react-jsonschema-form
train
js
a30b290ef9b04c4b1dc16cc39629b9d5f841ef84
diff --git a/sparse/client_test.go b/sparse/client_test.go index <HASH>..<HASH> 100644 --- a/sparse/client_test.go +++ b/sparse/client_test.go @@ -135,6 +135,31 @@ func TestSyncFile9(t *testing.T) { testSyncFile(t, layoutLocal, layoutRemote) } +func TestSyncDiff1(t *testing.T) { + layoutLocal := []FileInterval{ + {SparseData, Interval{0, 100 * Blocks}}, + } + layoutRemote := []FileInterval{ + {SparseData, Interval{0, 30 * Blocks}}, + {SparseData, Interval{30 * Blocks, 34 * Blocks}}, + {SparseData, Interval{34 * Blocks, 100 * Blocks}}, + + } + testSyncFile(t, layoutLocal, layoutRemote) +} + +func TestSyncDiff2(t *testing.T) { + layoutLocal := []FileInterval{ + {SparseData, Interval{0, 30 * Blocks}}, + {SparseData, Interval{30 * Blocks, 34 * Blocks}}, + {SparseData, Interval{34 * Blocks, 100 * Blocks}}, + } + layoutRemote := []FileInterval{ + {SparseData, Interval{0, 100 * Blocks}}, + } + testSyncFile(t, layoutLocal, layoutRemote) +} + func TestSyncHash1(t *testing.T) { var hash1, hash2 []byte {
ssync: added diff around block batch alignment
rancher_sparse-tools
train
go
677ec0ec97badf3daa346dc0ead1091570876c94
diff --git a/bundle/src/main/java/org/ops4j/pax/web/service/internal/HttpServiceStarted.java b/bundle/src/main/java/org/ops4j/pax/web/service/internal/HttpServiceStarted.java index <HASH>..<HASH> 100644 --- a/bundle/src/main/java/org/ops4j/pax/web/service/internal/HttpServiceStarted.java +++ b/bundle/src/main/java/org/ops4j/pax/web/service/internal/HttpServiceStarted.java @@ -462,6 +462,9 @@ class HttpServiceStarted null, // no initParams httpContext ); + if(contextModel == null){ + contextModel = m_serviceModel.getContextModel( httpContext ); + } contextModel.setJspServlet( jspServlet ); } catch( ServletException ignore )
RE PAXWEB-<I> Prevent the creation of multiple ContextModel objects
ops4j_org.ops4j.pax.web
train
java
fba59bdd21e35d9cdfec02991bedc11e58a1872e
diff --git a/contao/config/config.php b/contao/config/config.php index <HASH>..<HASH> 100644 --- a/contao/config/config.php +++ b/contao/config/config.php @@ -17,3 +17,5 @@ $GLOBALS['TL_EVENTS'][\ContaoCommunityAlliance\Contao\EventDispatcher\Event\CreateEventDispatcherEvent::NAME][] = 'MetaModels\DcGeneral\Events\Table\Attribute\Translated\Select\PropertyAttribute::registerEvents'; + +$GLOBALS['TL_EVENT_SUBSCRIBERS'][] = 'MetaModels\Attribute\TranslatedSelect\AttributeTypeFactory';
Add a missing event. Add the missing event for register the AttributeTypeFactory.
MetaModels_attribute_translatedselect
train
php
09f0b88ec48ea548806acc2af98ddb15a2cdbcf7
diff --git a/core/ledger/ledgerstorage/store_test.go b/core/ledger/ledgerstorage/store_test.go index <HASH>..<HASH> 100644 --- a/core/ledger/ledgerstorage/store_test.go +++ b/core/ledger/ledgerstorage/store_test.go @@ -158,6 +158,7 @@ func TestStoreWithExistingBlockchain(t *testing.T) { provider := NewProvider(storeDir, conf, metricsProvider) defer provider.Close() store, err := provider.Open(testLedgerid) + assert.NoError(t, err) store.Init(btlPolicyForSampleData()) defer store.Shutdown()
[FAB-<I>] staticcheck - core/ledger/ledgerstorage
hyperledger_fabric
train
go
9ab40547893e9c7e83585500256ebb2db7f9e81c
diff --git a/spyderlib/plugins/ipythonconsole.py b/spyderlib/plugins/ipythonconsole.py index <HASH>..<HASH> 100644 --- a/spyderlib/plugins/ipythonconsole.py +++ b/spyderlib/plugins/ipythonconsole.py @@ -608,9 +608,12 @@ class IPythonClient(QWidget, SaveHistoryMixin): #---- Qt methods ---------------------------------------------------------- def closeEvent(self, event): - """Reimplement Qt method to stop sending the custom_restart_kernel_died - signal""" - self.ipywidget.custom_restart = False + """ + Reimplement Qt method to stop sending the custom_restart_kernel_died + signal + """ + kc = self.ipywidget.kernel_client + kc.hb_channel.pause() class IPythonConsole(SpyderPluginWidget):
IPython console: Pause the heartbeat channel when a console is closed - Without this change we get an infinite stream of warnings printed in the internal console mentioning a "kernel died" issue.
spyder-ide_spyder
train
py
ee625d10dfd83348a129525029ce4a0f4b2793ea
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ setup( packages=find_packages('.'), install_requires = [ 'prompt_toolkit==0.57', - 'pyte>=0.4.10', + 'pyte>=0.5.1', 'six>=1.9.0', 'docopt>=0.6.2', ],
Require at least Pyte <I>.
prompt-toolkit_pymux
train
py
ae0b32cafa937c78e2d27817b46423248961ea59
diff --git a/packages/generator-bolt/generators/component/index.js b/packages/generator-bolt/generators/component/index.js index <HASH>..<HASH> 100644 --- a/packages/generator-bolt/generators/component/index.js +++ b/packages/generator-bolt/generators/component/index.js @@ -258,5 +258,17 @@ module.exports = class extends Generator { addBoltPackage(this.props.packageName); shelljs.exec('yarn'); + + shelljs.exec( + `npx prettier ${this.folders.patternLabFolder}/${ + this.props.name.kebabCase + }/**/*.{js,scss,json} --write`, + ); + + shelljs.exec( + `npx prettier ${this.folders.src}/bolt-${ + this.props.name.kebabCase + }/**/*.{js,scss,json} --write`, + ); } };
fix: update to automatically run generated files through Prettier automatically to prevent any linting issues
bolt-design-system_bolt
train
js
a5b066d2ebc3ad5bd92bffd31ccf22e508c3e69e
diff --git a/core/src/main/java/org/infinispan/newstatetransfer/StateConsumerImpl.java b/core/src/main/java/org/infinispan/newstatetransfer/StateConsumerImpl.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/infinispan/newstatetransfer/StateConsumerImpl.java +++ b/core/src/main/java/org/infinispan/newstatetransfer/StateConsumerImpl.java @@ -158,8 +158,12 @@ public class StateConsumerImpl implements StateConsumer { this.rCh = rCh; this.wCh = wCh; - if (configuration.clustering().stateTransfer().fetchInMemoryState()) { - addedSegments = this.wCh.getSegmentsForOwner(rpcManager.getAddress()); + if (this.wCh.getMembers().size() != 1) { + // There is at least one other member to pull the data from + // TODO If this is the initial CH update, we could have multiple joiners but noone to pull the data from + if (configuration.clustering().stateTransfer().fetchInMemoryState()) { + addedSegments = this.wCh.getSegmentsForOwner(rpcManager.getAddress()); + } } } else { Set<Integer> oldSegments = this.rCh.getMembers().contains(rpcManager.getAddress()) ? this.rCh.getSegmentsForOwner(rpcManager.getAddress()) : new HashSet<Integer>();
ISPN-<I> Don't pull anything if this is the first node to join the cache
infinispan_infinispan
train
java
1eca327f9afc916c0510b9c5adea2acd61587f0c
diff --git a/inject-java/src/main/java/io/micronaut/annotation/processing/BeanDefinitionInjectProcessor.java b/inject-java/src/main/java/io/micronaut/annotation/processing/BeanDefinitionInjectProcessor.java index <HASH>..<HASH> 100644 --- a/inject-java/src/main/java/io/micronaut/annotation/processing/BeanDefinitionInjectProcessor.java +++ b/inject-java/src/main/java/io/micronaut/annotation/processing/BeanDefinitionInjectProcessor.java @@ -1269,14 +1269,14 @@ public class BeanDefinitionInjectProcessor extends AbstractInjectAnnotationProce } private ExecutableElementParamInfo populateParameterData(ExecutableElement element) { + if (element == null) { + return new ExecutableElementParamInfo(false, null); + } AnnotationMetadata elementMetadata = annotationUtils.getAnnotationMetadata(element); ExecutableElementParamInfo params = new ExecutableElementParamInfo( modelUtils.isPrivate(element), elementMetadata ); - if (element == null) { - return params; - } element.getParameters().forEach(paramElement -> { String argName = paramElement.getSimpleName().toString();
Fix NPE when no constructor is found
micronaut-projects_micronaut-core
train
java
30188d8b7d9de374f2339301cad0f7ca08cb665f
diff --git a/core/src/test/java/io/undertow/server/handlers/ForwardedHandlerTestCase.java b/core/src/test/java/io/undertow/server/handlers/ForwardedHandlerTestCase.java index <HASH>..<HASH> 100644 --- a/core/src/test/java/io/undertow/server/handlers/ForwardedHandlerTestCase.java +++ b/core/src/test/java/io/undertow/server/handlers/ForwardedHandlerTestCase.java @@ -4,6 +4,7 @@ import io.undertow.server.HttpHandler; import io.undertow.server.HttpServerExchange; import io.undertow.testutils.DefaultServer; import io.undertow.testutils.HttpClientUtils; +import io.undertow.testutils.ProxyIgnore; import io.undertow.testutils.TestHttpClient; import io.undertow.util.Headers; import io.undertow.util.StatusCodes; @@ -28,6 +29,7 @@ import static io.undertow.server.handlers.ForwardedHandler.parseHeader; * @author Stuart Douglas */ @RunWith(DefaultServer.class) +@ProxyIgnore public class ForwardedHandlerTestCase { @BeforeClass
Ignore test when running with a proxy
undertow-io_undertow
train
java
f8b89a7a51aab62937d6db1f93743702d412a993
diff --git a/tq/custom.go b/tq/custom.go index <HASH>..<HASH> 100644 --- a/tq/custom.go +++ b/tq/custom.go @@ -86,7 +86,7 @@ func NewCustomAdapterDownloadRequest(oid string, size int64, action *Action) *cu } type customAdapterTerminateRequest struct { - MessageType string `json:"type"` + Event string `json:"event"` } func NewCustomAdapterTerminateRequest() *customAdapterTerminateRequest {
Fix terminate request from custom transfer, should be “event” not “type”
git-lfs_git-lfs
train
go
a9b9d5e2251dc901d94967c2356095bb825fcd4a
diff --git a/lib/spring/client/status.rb b/lib/spring/client/status.rb index <HASH>..<HASH> 100644 --- a/lib/spring/client/status.rb +++ b/lib/spring/client/status.rb @@ -21,7 +21,7 @@ module Spring end def application_pids - candidates = `ps -o ppid= -o pid=`.lines + candidates = `ps -a -o ppid= -o pid=`.lines candidates.select { |l| l =~ /^#{env.pid} / } .map { |l| l.split(" ").last } end
Status command list application in all terminals Fixes #<I>
rails_spring
train
rb
90bc773cdf1ec298cb110f46157ac0df949ac566
diff --git a/src/physics/quadtree.js b/src/physics/quadtree.js index <HASH>..<HASH> 100644 --- a/src/physics/quadtree.js +++ b/src/physics/quadtree.js @@ -253,7 +253,7 @@ QT_ARRAY_PUSH(this.nodes[i]); } // empty the array - this.nodes.length = 0; + this.nodes = []; // resize the root bounds if required if (typeof bounds !== "undefined") {
[#<I>] small update for code consistency
melonjs_melonJS
train
js
df66011c7c66500a7161470597042da41faaea0e
diff --git a/src/Bundle.js b/src/Bundle.js index <HASH>..<HASH> 100644 --- a/src/Bundle.js +++ b/src/Bundle.js @@ -223,7 +223,18 @@ export default class Bundle { } const exportDeclaration = otherModule.exports[ importDeclaration.name ]; - return trace( otherModule, exportDeclaration.localName ); + if ( exportDeclaration ) return trace( otherModule, exportDeclaration.localName ); + + for ( let i = 0; i < otherModule.exportDelegates.length; i += 1 ) { + const delegate = otherModule.exportDelegates[i]; + const delegateExportDeclaration = delegate.module.exports[ importDeclaration.name ]; + + if ( delegateExportDeclaration ) { + return trace( delegate.module, delegateExportDeclaration.localName ); + } + } + + throw new Error( 'Could not trace binding' ); } function getSafeName ( name ) {
handle export * (all function tests now passing)
rollup_rollup
train
js
8ef8b53e1dc4563c63ddd2ae009bea42fe97f522
diff --git a/pkg_resources.py b/pkg_resources.py index <HASH>..<HASH> 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1568,7 +1568,6 @@ class ZipManifests(dict): for name in zfile.namelist() ) return dict(items) -zip_manifests = ZipManifests() class ContextualZipFile(zipfile.ZipFile): @@ -1595,6 +1594,7 @@ class ZipProvider(EggProvider): """Resource support for zips and eggs""" eagers = None + _zip_manifests = ZipManifests() def __init__(self, module): EggProvider.__init__(self, module) @@ -1620,7 +1620,7 @@ class ZipProvider(EggProvider): @property def zipinfo(self): - return zip_manifests.load(self.loader.archive) + return self._zip_manifests.load(self.loader.archive) def get_resource_filename(self, manager, resource_name): if not self.egg_name:
Create zip_manifests as a class attribute rather than a global --HG-- extra : amend_source : <I>d<I>c<I>dca<I>e<I>f<I>c<I>ee
pypa_setuptools
train
py
05216c7f5ae4e351dba25db8cb237a9d99e10294
diff --git a/lib/digital_opera.rb b/lib/digital_opera.rb index <HASH>..<HASH> 100644 --- a/lib/digital_opera.rb +++ b/lib/digital_opera.rb @@ -5,7 +5,10 @@ require "digital_opera/banker" require "digital_opera/presenter/base" require "digital_opera/document" require "digital_opera/form_object" -require "digital_opera/services/s3" + +if defined?(AWS) + require "digital_opera/services/s3" +end module DigitalOpera end \ No newline at end of file diff --git a/lib/digital_opera/services/s3.rb b/lib/digital_opera/services/s3.rb index <HASH>..<HASH> 100644 --- a/lib/digital_opera/services/s3.rb +++ b/lib/digital_opera/services/s3.rb @@ -1,4 +1,5 @@ require 'aws' + ## Service for handling interactions with S3 ## module DigitalOpera
made the S3 service conditional on AWS actually being installed.
noiseunion_do-toolbox
train
rb,rb
682a1a5cc1deca08b23e0f98f26fe6020254090d
diff --git a/alot/command.py b/alot/command.py index <HASH>..<HASH> 100644 --- a/alot/command.py +++ b/alot/command.py @@ -101,7 +101,7 @@ class SearchCommand(Command): def apply(self, ui): if self.query: - if self.query == '*': + if self.query == '*' and ui.current_buffer: s = 'really search for all threads? This takes a while..' if not ui.choice(s) == 'yes': return
fix: issue with initial searches for * for the searchstring '*' an orly? prompt is hardcoded as these tend to take long. Prompts don't work if the ui is not properly set up.
pazz_alot
train
py
c4148b88831348a44b678990b79f463881a6828a
diff --git a/mockgen/tests/vendor_dep/doc.go b/mockgen/tests/vendor_dep/doc.go index <HASH>..<HASH> 100644 --- a/mockgen/tests/vendor_dep/doc.go +++ b/mockgen/tests/vendor_dep/doc.go @@ -1,3 +1,4 @@ package vendor_dep //go:generate mockgen -package vendor_dep -destination mock.go github.com/golang/mock/mockgen/tests/vendor_dep VendorsDep +//go:generate mockgen -destination source_mock_package/mock.go -source=vendor_dep.go
Add a (failing) test case for using source mode to mock something that depends on a vendored package.
golang_mock
train
go
751f3a90ab6b1cd72605c4274fd7d87ce291a209
diff --git a/spoon-runner/src/main/java/com/squareup/spoon/SpoonDeviceRunner.java b/spoon-runner/src/main/java/com/squareup/spoon/SpoonDeviceRunner.java index <HASH>..<HASH> 100644 --- a/spoon-runner/src/main/java/com/squareup/spoon/SpoonDeviceRunner.java +++ b/spoon-runner/src/main/java/com/squareup/spoon/SpoonDeviceRunner.java @@ -37,6 +37,7 @@ import static com.squareup.spoon.SpoonUtils.obtainRealDevice; public final class SpoonDeviceRunner { private static final String FILE_EXECUTION = "execution.json"; private static final String FILE_RESULT = "result.json"; + private static final int ADB_TIMEOUT = 60 * 1000; static final String TEMP_DIR = "work"; static final String JUNIT_DIR = "junit-reports"; @@ -176,6 +177,7 @@ public final class SpoonDeviceRunner { try { logDebug(debug, "About to actually run tests for [%s]", serial); RemoteAndroidTestRunner runner = new RemoteAndroidTestRunner(testPackage, testRunner, device); + runner.setMaxtimeToOutputResponse(ADB_TIMEOUT); if (!Strings.isNullOrEmpty(className)) { if (Strings.isNullOrEmpty(methodName)) { runner.setClassName(className);
Add ADB shell timeout of <I> seconds. Closes #<I>.
square_spoon
train
java
18fcb1301e6292545b8f1058f9641824cff8a679
diff --git a/pipe.go b/pipe.go index <HASH>..<HASH> 100644 --- a/pipe.go +++ b/pipe.go @@ -338,12 +338,14 @@ func NumberLines() Filter { } } -// Cut emits just the bytes indexed [startOffset..endOffset] of each input item. -func Cut(startOffset, endOffset int) Filter { +// Slice emits just the bytes indexed [startOffset..endOffset) of each +// input item. Note that unlike the "cut" utility, offsets are numbered +// starting at zero, and the end offset is not included in the output. +func Slice(startOffset, endOffset int) Filter { return func(arg Arg) { for s := range arg.In { if len(s) > endOffset { - s = s[:endOffset+1] + s = s[:endOffset] } if len(s) < startOffset { s = "" diff --git a/pipe_test.go b/pipe_test.go index <HASH>..<HASH> 100644 --- a/pipe_test.go +++ b/pipe_test.go @@ -426,7 +426,7 @@ func ExampleNumberLines() { func ExampleCut() { pipe.Run( pipe.Echo("hello", "world."), - pipe.Cut(2, 4), + pipe.Slice(2, 5), pipe.WriteLines(os.Stdout), ) // Output:
renamed Cut to Slice and made it behave more like Go than the shell cut command
ghemawat_stream
train
go,go
91314d83b9b222b548365799729a77ef947ef1de
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -230,7 +230,7 @@ and dependencies of wheels ''' setup(name="symengine", - version="0.2.1.dev", + version="0.3.0.rc0", description="Python library providing wrappers to SymEngine", setup_requires=['cython>=0.19.1'], long_description=long_description, diff --git a/symengine/__init__.py b/symengine/__init__.py index <HASH>..<HASH> 100644 --- a/symengine/__init__.py +++ b/symengine/__init__.py @@ -33,7 +33,7 @@ if have_numpy: return f -__version__ = "0.2.1.dev" +__version__ = "0.3.0.rc0" def test():
Update to <I>.rc0
symengine_symengine.py
train
py,py
8e18bf0e0bb7672d68c54627c5db716b0b9c6b7b
diff --git a/controls.js b/controls.js index <HASH>..<HASH> 100644 --- a/controls.js +++ b/controls.js @@ -184,18 +184,26 @@ playerControls.updateTimeAndSeekRange = function(event) { var currentTime = document.getElementById('currentTime'); var seekBar = document.getElementById('seekBar'); + var showHour = video.duration >= 3600; var displayTime = video.currentTime; var prefix = ''; if (playerControls.isLive_) { // The amount of time we are behind the live edge. displayTime = Math.max(0, Math.floor(event.end - video.currentTime)); if (displayTime) prefix = '-'; + showHour = (event.end - event.start) >= 3600; } - var m = Math.floor(displayTime / 60); + var h = Math.floor(displayTime / 3600); + var m = Math.floor((displayTime / 60) % 60); var s = Math.floor(displayTime % 60); if (s < 10) s = '0' + s; - currentTime.innerText = prefix + m + ':' + s; + var text = m + ':' + s; + if (showHour) { + if (m < 10) text = '0' + text; + text = h + ':' + text; + } + currentTime.innerText = prefix + text; if (playerControls.isLive_) { seekBar.min = event.start;
Add support for hours in the currentTime UI. Change-Id: Ib2c<I>c8ce4b0d9d<I>be<I>a8bd5f<I>cfde<I>a
google_shaka-player
train
js
ffe11e743e7763e6550ce601b3a7eeeaf7b08d0c
diff --git a/bugwarrior/config.py b/bugwarrior/config.py index <HASH>..<HASH> 100644 --- a/bugwarrior/config.py +++ b/bugwarrior/config.py @@ -82,6 +82,11 @@ def get_service_password(service, username, oracle=None, interactive=False): oracle, interactive=True) if password: keyring.set_password(service, username, password) + elif not interactive and password is None: + log.error( + 'Unable to retrieve password from keyring. ' + 'Re-run in interactive mode to set a password' + ) elif interactive and oracle == "@oracle:ask_password": prompt = "%s password: " % service password = getpass.getpass(prompt)
Add a log message to help debug keyring password errors Helps with reports like #<I>
ralphbean_bugwarrior
train
py
7a8715f13340f28a23e11c7bb6f122a1252a6dd7
diff --git a/bids/grabbids/bids_layout.py b/bids/grabbids/bids_layout.py index <HASH>..<HASH> 100644 --- a/bids/grabbids/bids_layout.py +++ b/bids/grabbids/bids_layout.py @@ -31,7 +31,7 @@ class BIDSLayout(Layout): for ext in extensions or []: with open(pathjoin(root, 'config', '%s.json' % ext)) as fobj: ext_config = json.load(fobj) - config['entities'].update(ext_config['entities']) + config['entities'].extend(ext_config['entities']) super(BIDSLayout, self).__init__(path, config, dynamic_getters=True, **kwargs) diff --git a/bids/grabbids/tests/test_grabbids.py b/bids/grabbids/tests/test_grabbids.py index <HASH>..<HASH> 100644 --- a/bids/grabbids/tests/test_grabbids.py +++ b/bids/grabbids/tests/test_grabbids.py @@ -114,3 +114,7 @@ def test_exclude(testlayout2): testlayout2.root, 'models/ds-005_type-russ_sub-all_model.json') \ not in testlayout2.files assert 'all' not in testlayout2.get_subjects() + + +def test_layout_with_derivs(testlayout3): + assert isinstance(testlayout3.files, dict)
TEST: Use derivatives fixture, fix error
bids-standard_pybids
train
py,py
88a913ee1edc346a1879a921b1ceeaff187eded4
diff --git a/src/rdf2h.js b/src/rdf2h.js index <HASH>..<HASH> 100644 --- a/src/rdf2h.js +++ b/src/rdf2h.js @@ -262,7 +262,7 @@ RDF2h.prototype.getRenderer = function (renderee) { let types = getTypes(renderee.graphNode).map(t => GraphNode(t, this.rendererGraph)); let renderer = getMatchingRenderer(types, renderee.context); if (!renderer) { - throw Error("No renderer found with context: "+renderee.context+" for any of the types "+types.map(t => "<"+t.value+">").join() + throw Error("No renderer found with context: <"+renderee.context.value+"> for any of the types "+types.map(t => "<"+t.value+">").join() +". The resource <"+renderee.graphNode.value+"> could thus not be rendered."); } let mustache = renderer.out(vocab.rdf2h("mustache"));
error message assmbled more consistently
rdf2h_rdf2h
train
js
9bb64fdfcb2ea153809e9876d443e3896bceff20
diff --git a/src/com/googlecode/objectify/EntityMetadata.java b/src/com/googlecode/objectify/EntityMetadata.java index <HASH>..<HASH> 100644 --- a/src/com/googlecode/objectify/EntityMetadata.java +++ b/src/com/googlecode/objectify/EntityMetadata.java @@ -139,10 +139,10 @@ public class EntityMetadata<T> private Field parentField; /** The fields we persist, not including the @Id or @Parent fields */ - private Set<Field> writeables = new HashSet<Field>(); + protected Set<Field> writeables = new HashSet<Field>(); /** The things that we read, keyed by name (including @OldName fields and methods). A superset of writeables. */ - private Map<String, Populator> readables = new HashMap<String, Populator>(); + protected Map<String, Populator> readables = new HashMap<String, Populator>(); /** */ public EntityMetadata(ObjectifyFactory fact, Class<T> clazz)
Changed readables and writables to protected so Scott can hack on it :-) git-svn-id: <URL>
objectify_objectify
train
java
b73cc624e20952d20766ce79019f47543f46782f
diff --git a/js/flowbtc.js b/js/flowbtc.js index <HASH>..<HASH> 100644 --- a/js/flowbtc.js +++ b/js/flowbtc.js @@ -12,7 +12,6 @@ module.exports = class flowbtc extends ndax { 'id': 'flowbtc', 'name': 'flowBTC', 'countries': [ 'BR' ], // Brazil - 'version': 'v1', 'rateLimit': 1000, 'urls': { 'logo': 'https://user-images.githubusercontent.com/51840849/87443317-01c0d080-c5fe-11ea-95c2-9ebe1a8fafd9.jpg',
flowbtc api upgraded close #<I>
ccxt_ccxt
train
js
1eb9284279a50cbf73cc45fa692ec4ae9b5ad04b
diff --git a/components/messages.js b/components/messages.js index <HASH>..<HASH> 100644 --- a/components/messages.js +++ b/components/messages.js @@ -469,7 +469,7 @@ SteamUser.prototype._handleNetMessage = function(buffer) { let sessionID = (header.proto && header.proto.client_sessionid) || header.sessionID; let steamID = (header.proto && header.proto.steamid) || header.steamID; - if (steamID && sessionID && sessionID != this._sessionID) { + if (steamID && sessionID && (sessionID != this._sessionID || steamID.toString() != this.steamID.toString())) { this._sessionID = sessionID; this.steamID = new SteamID(steamID.toString()); delete this._tempSteamID;
Reset steamID prop if it's different from header SteamID
DoctorMcKay_node-steam-user
train
js
19c474e2e1c11f48659a82f07064f82aa9778369
diff --git a/packages/@vue/cli-plugin-typescript/__tests__/tsPluginESLint.spec.js b/packages/@vue/cli-plugin-typescript/__tests__/tsPluginESLint.spec.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-plugin-typescript/__tests__/tsPluginESLint.spec.js +++ b/packages/@vue/cli-plugin-typescript/__tests__/tsPluginESLint.spec.js @@ -1,4 +1,4 @@ -jest.setTimeout(10000) +jest.setTimeout(60000) const create = require('@vue/cli-test-utils/createTestProject')
test: bump timeout, fixes AppVeyor CI
vuejs_vue-cli
train
js
9c4f1b7ba53689c9220dc369077bd4e4e5e3760a
diff --git a/Qt.py b/Qt.py index <HASH>..<HASH> 100644 --- a/Qt.py +++ b/Qt.py @@ -79,6 +79,9 @@ def _pyside2(): def load_ui(ui_filepath, *args, **kwargs): """Wrap QtUiTools.QUiLoader().load() for compatibility against PyQt5.uic.loadUi() + + Args: + ui_filepath (str): The filepath to the .ui file """ from PySide2 import QtUiTools return QtUiTools.QUiLoader().load(ui_filepath) @@ -99,6 +102,9 @@ def _pyside(): def load_ui(ui_filepath, *args, **kwargs): """Wrap QtUiTools.QUiLoader().load() for compatibility against PyQt5.uic.loadUi() + + Args: + ui_filepath (str): The filepath to the .ui file """ from PySide import QtUiTools return QtUiTools.QUiLoader().load(ui_filepath)
Added args description to docstrings
mottosso_Qt.py
train
py
e8d36579be2e957dfba9b7bdf268f814be941e23
diff --git a/Lib/fontbakery/profiles/shaping.py b/Lib/fontbakery/profiles/shaping.py index <HASH>..<HASH> 100644 --- a/Lib/fontbakery/profiles/shaping.py +++ b/Lib/fontbakery/profiles/shaping.py @@ -88,13 +88,18 @@ def create_report_item(vharfbuzz, message += f"\n\n<pre>Got : {serialized_buf1}</pre>\n\n" if buf2: if isinstance(buf2, FakeBuffer): - serialized_buf2 = vharfbuzz.serialize_buf(buf2) + try: + serialized_buf2 = vharfbuzz.serialize_buf(buf2) + except Exception: + # This may fail if the glyphs are not found in the font + serialized_buf2 = None + buf2 = None # Don't try to draw it either else: serialized_buf2 = buf2 message += f"\n\n<pre>Expected: {serialized_buf2}</pre>\n\n" # Report a diff table - if serialized_buf1: + if serialized_buf1 and serialized_buf2: diff = list(ndiff([serialized_buf1], [serialized_buf2])) if diff and diff[-1][0] == "?": message += f"\n\n<pre> {diff[-1][1:]}</pre>\n\n"
Be more robust when the glyphs are not present
googlefonts_fontbakery
train
py
811b676fbab9c99e359885032e5ebc70e442f5b8
diff --git a/src/functions.php b/src/functions.php index <HASH>..<HASH> 100644 --- a/src/functions.php +++ b/src/functions.php @@ -72,7 +72,7 @@ function uri_for($uri) * @param resource|string|null|int|float|bool|StreamInterface|callable $resource Entity body data * @param array $options Additional options * - * @return Stream + * @return StreamInterface * @throws \InvalidArgumentException if the $resource arg is not valid. */ function stream_for($resource = '', array $options = [])
Fix the return typehint in docblock of stream_for function (#<I>)
guzzle_psr7
train
php
0e525a3f2e09edbe80c5666d9432e0c72c707d03
diff --git a/nodash.js b/nodash.js index <HASH>..<HASH> 100644 --- a/nodash.js +++ b/nodash.js @@ -507,7 +507,7 @@ function makeNodash(options, undefined) { return false; }); - register('/=', 'neq', 'NEQ', function _neq(a, b) { + register('/=', '!=', '<>', 'neq', 'NEQ', function _neq(a, b) { return !Nodash.eq(a, b); });
Added != and <> aliases
scravy_nodash
train
js
023ca2e89511388c3488b3a3cfb8f0bf9f88bc73
diff --git a/lurklib/__init__.py b/lurklib/__init__.py index <HASH>..<HASH> 100644 --- a/lurklib/__init__.py +++ b/lurklib/__init__.py @@ -2,7 +2,7 @@ import socket, time, sys, select from . import channel, connection, optional, sending, squeries, uqueries try: import ssl except ImportError: ssl = None -__version__ = 'Beta 2 AKA 0.4.6.1' +__version__ = 'Beta 2 AKA 0.4.7' class irc: @@ -93,8 +93,8 @@ class irc: self.KEYSET = self.IRCError self.PASSWDMISMATCH = self.IRCError self.NOCHANMODES = self.IRCError - self.AlreadyInChannel = Exception - self.NotInChannel = Exception + self.AlreadyInChannel = self.IRCError + self.NotInChannel = self.IRCError self.UnhandledEvent = Exception diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from distutils.core import setup setup (\ name='lurklib', packages=['lurklib'], - version='0.4.6.1', + version='0.4.7', author='LK-', license='GPL V3', author_email='lk.codeshock@gmail.com',
Changed irc.AlreadyInChannel and irc.NotInChannel exceptions to irc.IRCError exception class.
jamieleshaw_lurklib
train
py,py
b69e6c90b29dd45ef2ce46a4d8e126ea6f0d42af
diff --git a/pmagpy/pmag.py b/pmagpy/pmag.py index <HASH>..<HASH> 100755 --- a/pmagpy/pmag.py +++ b/pmagpy/pmag.py @@ -9280,7 +9280,7 @@ def mktk03(terms, seed, G2, G3): g10, sfact, afact = -18e3, 3.8, 2.4 g20 = G2 * g10 g30 = G3 * g10 - alpha = old_div(g10, afact) + alpha = g10/afact s1 = s_l(1, alpha) s10 = sfact * s1 gnew = random.normal(g10, s10)
modified: pmag.py
PmagPy_PmagPy
train
py
27b8d9834a17f9cd64b4b75c90a5c227ff6e8133
diff --git a/hcn/hcnpolicy.go b/hcn/hcnpolicy.go index <HASH>..<HASH> 100644 --- a/hcn/hcnpolicy.go +++ b/hcn/hcnpolicy.go @@ -167,10 +167,10 @@ type L4ProxyPolicySetting struct { OutboundNat bool `json:",omitempty"` // For the WFP proxy - FilterTuple FiveTuple `json:",omitempty"` - ProxyType ProxyType `json:",omitempty"` - UserSID string `json:",omitempty"` - NetworkCompartmentID uint32 `json:",omitempty"` + FilterTuple FiveTuple `json:",omitempty"` + ProxyType ProxyType `json:",omitempty"` + UserSID string `json:",omitempty"` + CompartmentID uint32 `json:",omitempty"` } // PortnameEndpointPolicySetting sets the port name for an endpoint.
Use the right field name in L4ProxyPolicySetting WFP expects the field "CompartmentID", not "NetworkCompartmentID". Passing the wrong field causes it to be silently ignored, but the proxy would be misconfigured.
Microsoft_hcsshim
train
go
a3e4495a35c0170046874eb70854d59e04381f5d
diff --git a/src/rez/serialise.py b/src/rez/serialise.py index <HASH>..<HASH> 100644 --- a/src/rez/serialise.py +++ b/src/rez/serialise.py @@ -3,7 +3,6 @@ Read and write data from file. File caching via a memcached server is supported. """ from contextlib import contextmanager from inspect import isfunction, ismodule, getargspec -from StringIO import StringIO import sys import stat import os @@ -21,6 +20,7 @@ from rez.utils.system import add_sys_paths from rez.config import config from rez.vendor.atomicwrites import atomic_write from rez.vendor.enum import Enum +from rez.vendor.six.six.moves import StringIO from rez.vendor import yaml diff --git a/src/rez/tests/util.py b/src/rez/tests/util.py index <HASH>..<HASH> 100644 --- a/src/rez/tests/util.py +++ b/src/rez/tests/util.py @@ -211,7 +211,7 @@ def get_cli_output(args): """ import sys - from StringIO import StringIO + from rez.vendor.six.six.moves import StringIO command = args[0] other_args = list(args[1:])
import StringIO from six.moves
nerdvegas_rez
train
py,py
8195043db28783672f401c0ee1f5bb999b1a37d1
diff --git a/hilbert/tests/runtests.py b/hilbert/tests/runtests.py index <HASH>..<HASH> 100644 --- a/hilbert/tests/runtests.py +++ b/hilbert/tests/runtests.py @@ -21,6 +21,7 @@ if not settings.configured: 'hilbert', ), ROOT_URLCONF='hilbert.tests.urls', + SITE_ID=1, TEST_RUNNER='hilbert.test.CoverageRunner', COVERAGE_MODULES=( 'decorators',
Fix runtests to pass on Django <I>.
mlavin_django-hilbert
train
py
e1292ca55a44b2568e11df287bd4fff824c52190
diff --git a/simuvex/procedures/libc___so___6/recvfrom.py b/simuvex/procedures/libc___so___6/recvfrom.py index <HASH>..<HASH> 100644 --- a/simuvex/procedures/libc___so___6/recvfrom.py +++ b/simuvex/procedures/libc___so___6/recvfrom.py @@ -8,6 +8,5 @@ class recvfrom(simuvex.SimProcedure): #pylint:disable=arguments-differ def run(self, fd, dst, length, flags): #pylint:disable=unused-argument - data = self.state.posix.read(fd, length) - self.state.memory.store(dst, data) - return length + bytes_recvd = self.state.posix.read(fd, dst, self.state.se.any_int(length)) + return bytes_recvd
Fix recvfrom posix.read() takes exactly 4 arguments original fix was proposed by Yiming Jing
angr_angr
train
py
f2a0773467c4fc8bd1bbfb4a8dcaffc055a203e1
diff --git a/src/GraphQL/ReadOneAreaResolver.php b/src/GraphQL/ReadOneAreaResolver.php index <HASH>..<HASH> 100644 --- a/src/GraphQL/ReadOneAreaResolver.php +++ b/src/GraphQL/ReadOneAreaResolver.php @@ -3,7 +3,9 @@ namespace DNADesign\Elemental\GraphQL; use DNADesign\Elemental\Models\ElementalArea; +use Exception; use GraphQL\Type\Definition\ResolveInfo; +use InvalidArgumentException; use SilverStripe\GraphQL\OperationResolver; class ReadOneAreaResolver implements OperationResolver @@ -12,8 +14,12 @@ class ReadOneAreaResolver implements OperationResolver { $area = ElementalArea::get()->byID($args['ID']); + if (!$area) { + throw new InvalidArgumentException('Could not find elemental area matching ID ' . $args['ID']); + } + if (!$area->canView($context['currentUser'])) { - throw new \Exception('Current user cannot view element areas'); + throw new Exception('Current user cannot view element areas'); } return $area;
FIX Assert elemental areas exist before calling methods on them
dnadesign_silverstripe-elemental
train
php
15928ec385485e3587fe1df073b267e82284d5c9
diff --git a/lib/collection.js b/lib/collection.js index <HASH>..<HASH> 100644 --- a/lib/collection.js +++ b/lib/collection.js @@ -244,6 +244,11 @@ Collection.prototype.findAndModify = function (query, update, opts, fn) { opts = opts || {}; + // `new` defaults to `true` for upserts + if (null == opts.new && opts.upsert) { + opts.new = true; + } + if (fn) { promise.on('complete', fn); }
Enhanced findAndModify default behavior for upserts.
Automattic_monk
train
js
57d505cf9b06dcf5a82d85bf127189f7bc941886
diff --git a/lib/Post.php b/lib/Post.php index <HASH>..<HASH> 100644 --- a/lib/Post.php +++ b/lib/Post.php @@ -213,7 +213,7 @@ class Post extends Core implements CoreInterface { * Determined whether or not an admin/editor is looking at the post in "preview mode" via the * WordPress admin * @internal - * @return bool + * @return bool */ protected static function is_previewing() { global $wp_query; @@ -1071,7 +1071,7 @@ class Post extends Core implements CoreInterface { public function date( $date_format = '' ) { $df = $date_format ? $date_format : get_option('date_format'); $the_date = (string) mysql2date($df, $this->post_date); - return apply_filters('get_the_date', $the_date, $df); + return apply_filters('get_the_date', $the_date, $df, $this->id); } /** @@ -1095,7 +1095,7 @@ class Post extends Core implements CoreInterface { public function time( $time_format = '' ) { $tf = $time_format ? $time_format : get_option('time_format'); $the_time = (string) mysql2date($tf, $this->post_date); - return apply_filters('get_the_time', $the_time, $tf); + return apply_filters('get_the_time', $the_time, $tf, $this->id); }
Changed usage 'get_the_date' and 'get_the_time' filters according WP core: third post id param is added
timber_timber
train
php
5705763d86ce31a616f42904e72a1526c4865871
diff --git a/src/devTools.js b/src/devTools.js index <HASH>..<HASH> 100644 --- a/src/devTools.js +++ b/src/devTools.js @@ -63,7 +63,7 @@ function init(options) { socket = socketCluster.connect(options && options.port ? options : socketOptions); socket.on('error', function (err) { - console.error(err); + console.warn(err); }); socket.emit('login', 'master', (err, channelName) => {
Just warn when socket is not available instead of showing errors, not to be caught inside the app
zalmoxisus_remote-redux-devtools
train
js
76349af2e9cbdd3db22852bfb81856f7526f3f1b
diff --git a/js/tbone_test.js b/js/tbone_test.js index <HASH>..<HASH> 100644 --- a/js/tbone_test.js +++ b/js/tbone_test.js @@ -147,12 +147,16 @@ var test_strings = [ , "“Hello World!”" , "Fred" + String.fromCharCode(180) + "s Car" , "Fred" + String.fromCharCode(8217) + "s Car" + , "this is\nanother line." + , "&\nthat was it." ]; var expected_strings = [ "Hello World!" , "&ldquo;Hello World!&rdquo;" , "Fred&acute;s Car" , "Fred&rsquo;s Car" + , "this is&NewLine;another line." + , "&&NewLine;that was it." ]; var result_string;
Added a test for new line handling.
rsdoiel_tbone
train
js
8a2c31f7908db0c589371f850f3a7048c3787313
diff --git a/lib/record_cache/version_store.rb b/lib/record_cache/version_store.rb index <HASH>..<HASH> 100644 --- a/lib/record_cache/version_store.rb +++ b/lib/record_cache/version_store.rb @@ -4,7 +4,7 @@ module RecordCache def initialize(store) [:increment, :write, :read, :read_multi, :delete].each do |method| - raise "Store #{store.inspect} must respond to #{method}" unless store.respond_to?(method) + raise "Store #{store.class.name} must respond to #{method}" unless store.respond_to?(method) end @store = store end diff --git a/spec/lib/version_store_spec.rb b/spec/lib/version_store_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/version_store_spec.rb +++ b/spec/lib/version_store_spec.rb @@ -9,7 +9,7 @@ describe RecordCache::VersionStore do end it "should only accept ActiveSupport cache stores" do - lambda { RecordCache::VersionStore.new(Object.new) }.should raise_error("Must be an ActiveSupport::Cache::Store") + lambda { RecordCache::VersionStore.new(Object.new) }.should raise_error("Store Object must respond to increment") end context "current" do
Accept Dalli 2 as a version store + spec
orslumen_record-cache
train
rb,rb
dee2bdc0106a7b2477ebcee61e0d3d41fa91eed7
diff --git a/mod/quiz/attemptlib.php b/mod/quiz/attemptlib.php index <HASH>..<HASH> 100644 --- a/mod/quiz/attemptlib.php +++ b/mod/quiz/attemptlib.php @@ -539,6 +539,7 @@ class quiz_attempt extends quiz { case QUESTION_EVENTSAVE: case QUESTION_EVENTGRADE: + case QUESTION_EVENTSUBMIT: return 'answered'; case QUESTION_EVENTCLOSEANDGRADE:
MDL-<I> error unexpected event exception in essay question
moodle_moodle
train
php
71a3f723ec53a505c46715cb319ef87a8c087446
diff --git a/karma.saucelabs.conf.js b/karma.saucelabs.conf.js index <HASH>..<HASH> 100644 --- a/karma.saucelabs.conf.js +++ b/karma.saucelabs.conf.js @@ -30,12 +30,6 @@ var customLaunchers = { base: 'SauceLabs', browserName: 'internet explorer', platform: 'Windows 10' - }, - win7ie9: { - base: 'SauceLabs', - browserName: 'internet explorer', - platform: 'Windows 7', - version: '9.0' } }
Moving to available browsers in saucelabs
holidayextras_barometer
train
js
27ebe76ede48a897b43d1c5f7e975c9531c1d79f
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ setup( data_files=[( (BASE_DIR, ['data/nssm_original.exe']) )], - install_requires=['indy-plenum-dev==1.2.205', + install_requires=['indy-plenum-dev==1.2.212', 'indy-anoncreds-dev==1.0.32', 'python-dateutil', 'timeout-decorator'],
INDY-<I>: Updated indy-plenum dependency (#<I>)
hyperledger_indy-node
train
py
ecce203898471189d1080d6cba3e3dcfb947f6d5
diff --git a/packages/dai-plugin-governance/src/GovPollingService.js b/packages/dai-plugin-governance/src/GovPollingService.js index <HASH>..<HASH> 100644 --- a/packages/dai-plugin-governance/src/GovPollingService.js +++ b/packages/dai-plugin-governance/src/GovPollingService.js @@ -244,7 +244,8 @@ export default class GovPollingService extends PrivateService { rounds: 1, winner: null, totalMkrParticipation, - options: {} + options: {}, + numVoters: votes.length }; const defaultOptionObj = { firstChoice: BigNumber(0),
add num voters to ranked choice tally
makerdao_dai.js
train
js
d9532a44edf5c320e70a6ece539aa63843f80f7d
diff --git a/h5p.classes.php b/h5p.classes.php index <HASH>..<HASH> 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -1240,7 +1240,9 @@ class H5PContentValidator { // Check if string is according to optional regexp in semantics if (isset($semantics->regexp)) { - $pattern = '|' . $semantics->regexp->pattern . '|'; + // Note: '|' used as regexp fence, to allow / in actual patterns. + // But also escaping '|' found in patterns, so that is valid too. + $pattern = '|' . str_replace('|', '\\|', $semantics->regexp->pattern) . '|'; $pattern .= isset($semantics->regexp->modifiers) ? $semantics->regexp->modifiers : ''; if (preg_match($pattern, $text) === 0) { // Note: explicitly ignore return value FALSE, to avoid removing text
Escape '|' characters in regexp
h5p_h5p-php-library
train
php
425e992faeb55b0ed9c035317c6f2028173d427f
diff --git a/lib/userlist/push/client.rb b/lib/userlist/push/client.rb index <HASH>..<HASH> 100644 --- a/lib/userlist/push/client.rb +++ b/lib/userlist/push/client.rb @@ -40,7 +40,7 @@ module Userlist request['Content-Type'] = 'application/json; charset=UTF-8' request.body = JSON.dump(payload) - logger.debug "Sending #{request.method} to #{endpoint}#{request.path} with body #{request.body}" + logger.debug "Sending #{request.method} to #{URI.join(endpoint, request.path)} with body #{request.body}" http.request(request) end
Improves debug output by properly joining URI segments
userlistio_userlist-ruby
train
rb
1f7e8228f004ef20034d3882dca2d25d4ae78936
diff --git a/cassandra_test.go b/cassandra_test.go index <HASH>..<HASH> 100644 --- a/cassandra_test.go +++ b/cassandra_test.go @@ -1132,6 +1132,8 @@ func TestPreparedCacheEviction(t *testing.T) { t.Fatalf("insert into prepcachetest failed, error '%v'", err) } + stmtsLRU.Lock() + //Make sure the cache size is maintained if stmtsLRU.lru.Len() != stmtsLRU.lru.MaxEntries { t.Fatalf("expected cache size of %v, got %v", stmtsLRU.lru.MaxEntries, stmtsLRU.lru.Len()) @@ -1154,8 +1156,10 @@ func TestPreparedCacheEviction(t *testing.T) { _, ok = stmtsLRU.lru.Get(session.cfg.Hosts[i] + ":9042gocql_testSELECT id,mod FROM prepcachetest WHERE id = 0") selEvict = selEvict || !ok - } + + stmtsLRU.Unlock() + if !selEvict { t.Fatalf("expected first select statement to be purged, but statement was found in the cache.") }
Get and Len are not thread safe Fixes a race condition when checking items inside the prepared statement cache during tests.
gocql_gocql
train
go
15d5cc34e73efaeaadeb7b935dcd6e160b1d3bad
diff --git a/src/Twig/Handler/AdminHandler.php b/src/Twig/Handler/AdminHandler.php index <HASH>..<HASH> 100644 --- a/src/Twig/Handler/AdminHandler.php +++ b/src/Twig/Handler/AdminHandler.php @@ -280,7 +280,7 @@ class AdminHandler public function hclass($classes, $raw = false) { if (is_array($classes)) { - $classes = join(' ', $classes); + $classes = join(' ', $classes); } $classes = preg_split('/ +/', trim($classes)); $classes = join(' ', $classes);
It seems like the identation of this line is off - right, Scruti!
bolt_bolt
train
php
363a20c869b1430933a649e949845a406a7cb2ca
diff --git a/python_modules/libraries/dagster-aws/setup.py b/python_modules/libraries/dagster-aws/setup.py index <HASH>..<HASH> 100644 --- a/python_modules/libraries/dagster-aws/setup.py +++ b/python_modules/libraries/dagster-aws/setup.py @@ -27,7 +27,7 @@ if __name__ == "__main__": ], packages=find_packages(exclude=["test"]), include_package_data=True, - install_requires=["boto3>=1.9", "dagster", "psycopg2-binary", "requests",], + install_requires=["boto3>=1.9", "dagster", "packaging", "psycopg2-binary", "requests"], extras_require={"pyspark": ["dagster-pyspark"]}, zip_safe=False, )
Add missing packaging dependency in dagster-aws Summary: As the title. Test Plan: bk, eks dev works Reviewers: johann, alangenfeld, nate Reviewed By: nate Differential Revision: <URL>
dagster-io_dagster
train
py
68a34e4b467405a70386820b03abd0e24e5c58df
diff --git a/support/cas-server-support-hazelcast-ticket-registry/src/test/java/org/apereo/cas/ticket/registry/config/DefaultHazelcastInstanceConfigurationTests.java b/support/cas-server-support-hazelcast-ticket-registry/src/test/java/org/apereo/cas/ticket/registry/config/DefaultHazelcastInstanceConfigurationTests.java index <HASH>..<HASH> 100644 --- a/support/cas-server-support-hazelcast-ticket-registry/src/test/java/org/apereo/cas/ticket/registry/config/DefaultHazelcastInstanceConfigurationTests.java +++ b/support/cas-server-support-hazelcast-ticket-registry/src/test/java/org/apereo/cas/ticket/registry/config/DefaultHazelcastInstanceConfigurationTests.java @@ -67,7 +67,6 @@ public class DefaultHazelcastInstanceConfigurationTests { assertNotNull(mapConfig); assertEquals(28800, mapConfig.getMaxIdleSeconds()); assertEquals(EvictionPolicy.LRU, mapConfig.getEvictionPolicy()); - assertEquals(10, mapConfig.getEvictionPercentage()); } @After
Removed deprecated prop from HZ config; cleaned up pac4j prop mgmt
apereo_cas
train
java
6d280ed7c20ebcdeccd42bc38797a17848592703
diff --git a/can/interfaces/vector/canlib.py b/can/interfaces/vector/canlib.py index <HASH>..<HASH> 100644 --- a/can/interfaces/vector/canlib.py +++ b/can/interfaces/vector/canlib.py @@ -670,8 +670,7 @@ class VectorBus(BusABC): hardware channel. :raises can.interfaces.vector.VectorInitializationError: - Raises a VectorError when the application name does not exist in - Vector Hardware Configuration. + If the application name does not exist in the Vector hardware configuration. """ hw_type = ctypes.c_uint() hw_index = ctypes.c_uint() @@ -722,8 +721,7 @@ class VectorBus(BusABC): The channel index of the interface. :raises can.interfaces.vector.VectorInitializationError: - Raises a VectorError when the application name does not exist in - Vector Hardware Configuration. + If the application name does not exist in the Vector hardware configuration. """ xldriver.xlSetApplConfig( app_name.encode(),
improve docstrings related to exceptions
hardbyte_python-can
train
py
62709106ec9692e211b42465e323148e500ca365
diff --git a/src/Speller.php b/src/Speller.php index <HASH>..<HASH> 100644 --- a/src/Speller.php +++ b/src/Speller.php @@ -143,8 +143,8 @@ abstract class Speller * @param string $language A two-letter, ISO 639-1 code of the language to spell the amount in. * @param string $currency A three-letter, ISO 4217 currency code. * @param bool $requireDecimal If true, output decimals even if the value is 0. - * @param bool $spellDecimal If true, spell decimals out same as whole numbers; - * otherwise, output decimals as numbers. + * @param bool $spellDecimal If true, spell the decimal part out same as the whole part; + * otherwise, spell only the whole part and output the decimal part as integer. * @return string The currency as written in words in the specified language. * @throws InvalidArgumentException If any parameter is invalid. */
Updating this parameter's description to be more clear.
jurchiks_numbers2words
train
php
af3a5a02c550309561deb54fd348b676e3f3bef3
diff --git a/lib/ronin/ui/command_line/commands/extension.rb b/lib/ronin/ui/command_line/commands/extension.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/ui/command_line/commands/extension.rb +++ b/lib/ronin/ui/command_line/commands/extension.rb @@ -69,6 +69,7 @@ module Ronin FileUtils.mkdir_p(path) FileUtils.mkdir_p(lib_dir) FileUtils.touch(File.join(lib_dir,File.basename(path) + '.rb')) + FileUtils.mkdir_p(File.join(lib_dir,File.basename(path))) File.open(extension_path,'w') do |file| template_path = File.join(Config::STATIC_DIR,'extension.rb.erb')
Also make a directory within the lib/ dir of an extension.
ronin-ruby_ronin
train
rb
3ad26ff8711ae33fb52476603f5b48b4a896651c
diff --git a/src/main/java/com/frostwire/jlibtorrent/IntSeries.java b/src/main/java/com/frostwire/jlibtorrent/IntSeries.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/frostwire/jlibtorrent/IntSeries.java +++ b/src/main/java/com/frostwire/jlibtorrent/IntSeries.java @@ -79,6 +79,16 @@ public final class IntSeries { return buffer[(head + index) % size]; } + /** + * This method will always returns a value, if the series is empty + * {@code 0} is returned. + * + * @return the last value in the series + */ + public long last() { + return end != 0 ? buffer[end] : 0; + } + public int size() { return size; }
added IntSeries#last method
frostwire_frostwire-jlibtorrent
train
java
5582ba852822833dc554578a28fcb7b7e2d0c0ab
diff --git a/endpoints/__init__.py b/endpoints/__init__.py index <HASH>..<HASH> 100644 --- a/endpoints/__init__.py +++ b/endpoints/__init__.py @@ -34,4 +34,4 @@ from users_id_token import get_current_user, get_verified_jwt, convert_jwks_uri from users_id_token import InvalidGetUserCall from users_id_token import SKIP_CLIENT_ID_CHECK -__version__ = '2.1.2' +__version__ = '2.2.0'
Version bump (<I> -> <I>) Rationale: Backwards-compatible but important changes to proxy.html serving.
cloudendpoints_endpoints-python
train
py
c2f210844f723e28cb8293336c84121d22b1bfcc
diff --git a/caliper/src/main/java/com/google/caliper/runner/ExperimentingCaliperRun.java b/caliper/src/main/java/com/google/caliper/runner/ExperimentingCaliperRun.java index <HASH>..<HASH> 100644 --- a/caliper/src/main/java/com/google/caliper/runner/ExperimentingCaliperRun.java +++ b/caliper/src/main/java/com/google/caliper/runner/ExperimentingCaliperRun.java @@ -123,7 +123,7 @@ public final class ExperimentingCaliperRun implements CaliperRun { .setDaemon(true) .build())); - private final Stopwatch trialStopwatch = new Stopwatch(); + private final Stopwatch trialStopwatch = Stopwatch.createUnstarted(); /** This is 1-indexed because it's only used for display to users. E.g. "Trial 1 of 27" */ private volatile int trialNumber = 1;
new Stopwatch(); -> Stopwatch.createUnstarted(); (Reverted the files which didn't import com.google.common.base.Stopwatch) ------------- Created by MOE: <URL>
trajano_caliper
train
java
79866ee33f2934501bc5cbd2a3d9777447346dff
diff --git a/lib/bolt/version.rb b/lib/bolt/version.rb index <HASH>..<HASH> 100644 --- a/lib/bolt/version.rb +++ b/lib/bolt/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Bolt - VERSION = '3.16.0' + VERSION = '3.16.1' end
(GEM) update bolt version to <I>
puppetlabs_bolt
train
rb
6e951c11ee6d716367899c50e82f293cca2bd0d6
diff --git a/src/state.py b/src/state.py index <HASH>..<HASH> 100644 --- a/src/state.py +++ b/src/state.py @@ -20,6 +20,7 @@ class State(Module): processed_occ = {} with self.lock: for pc, state in occ.iteritems(): + pc = pc.lower() # normalize HG075PC47 -> hg075pc47 # TODO do not hardcode this if pc.startswith('cz'): continue
state: normalize pc names to lowercase
bwesterb_tkbd
train
py
154761676f8881f386d1d864080da57db62d7f4c
diff --git a/hwt/code.py b/hwt/code.py index <HASH>..<HASH> 100644 --- a/hwt/code.py +++ b/hwt/code.py @@ -58,7 +58,8 @@ class If(IfContainer): self._now_is_event_dependent = arr_any( discoverEventDependency(cond_sig), lambda x: True) - + + self._inputs.append(cond_sig) cond_sig.endpoints.append(self) case = []
add condition in elif to if-statement _inputs
Nic30_hwt
train
py
ed9120ce60e11f395b6f66a0d182c9fc314ef6db
diff --git a/marshmallow_jsonapi/schema.py b/marshmallow_jsonapi/schema.py index <HASH>..<HASH> 100644 --- a/marshmallow_jsonapi/schema.py +++ b/marshmallow_jsonapi/schema.py @@ -107,6 +107,8 @@ class Schema(ma.Schema): raise IncorrectTypeError(actual=item['type'], expected=self.opts.type_) payload = self.dict_class() + if 'id' in item: + payload['id'] = item['id'] for key, value in iteritems(item.get('attributes', {})): payload[key] = value for key, value in iteritems(item.get('relationships', {})):
Marshaling payload id
marshmallow-code_marshmallow-jsonapi
train
py
868f26be1e364ffc43de32ee3fe2b68e8f8ec950
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -112,7 +112,7 @@ setup(name='cldoc', description='clang based documentation generator for C/C++', author='Jesse van den Kieboom', author_email='jessevdk@gmail.com', - url='http://github.com/jessevdk/cldoc', + url='http://jessevdk.github.com/cldoc', packages=['cldoc', 'cldoc.clang', 'cldoc.nodes', 'cldoc.generators'], scripts=['scripts/cldoc'], package_data={'cldoc': ['data/*.html', 'data/javascript/*.js', 'data/styles/*.css']},
Point website to cldoc website
jessevdk_cldoc
train
py
6f00de087f1db5b6cb40d750e8f76401f0389f2b
diff --git a/src/python/grpcio/grpc/experimental/aio/_call.py b/src/python/grpcio/grpc/experimental/aio/_call.py index <HASH>..<HASH> 100644 --- a/src/python/grpcio/grpc/experimental/aio/_call.py +++ b/src/python/grpcio/grpc/experimental/aio/_call.py @@ -400,11 +400,11 @@ class _StreamRequestMixin(Call): if inspect.isasyncgen(request_iterator): async for request in request_iterator: await self._write(request) - await self._done_writing() else: for request in request_iterator: await self._write(request) - await self._done_writing() + + await self._done_writing() except AioRpcError as rpc_error: # Rpc status should be exposed through other API. Exceptions raised # within this Task won't be retrieved by another coroutine. It's
Aggregate common statement in both branches
grpc_grpc
train
py
5dd80aa272fb2dd84680c5f6e2daf329fbe9dc9e
diff --git a/lib/features/modeling/cmd/MoveConnectionHandler.js b/lib/features/modeling/cmd/MoveConnectionHandler.js index <HASH>..<HASH> 100644 --- a/lib/features/modeling/cmd/MoveConnectionHandler.js +++ b/lib/features/modeling/cmd/MoveConnectionHandler.js @@ -63,6 +63,8 @@ MoveConnectionHandler.prototype.revert = function(context) { p.original.y -= delta.y; } }); + + return connection; };
fix(modeling): update connection after move undo
bpmn-io_diagram-js
train
js
2cc6b5172337db97c1ac855899935cb137944a18
diff --git a/config/routes.rb b/config/routes.rb index <HASH>..<HASH> 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -111,6 +111,16 @@ Rails.application.routes.draw do end end + resources :feedback, only: [:index, :edit, :create, :update, :destroy], format: false do + collection do + post 'bulkops' + end + member do + get 'article' + post 'change_state' + end + end + resources :notes, only: [:index, :show, :edit, :create, :update, :destroy], format: false resources :pages, only: [:index, :new, :edit, :create, :update, :destroy], format: false @@ -172,7 +182,7 @@ Rails.application.routes.draw do end # Admin/XController - %w{feedback}.each do |i| + %w{}.each do |i| match "/admin/#{i}", controller: "admin/#{i}", action: :index, format: false, via: [:get, :post, :put, :delete] # TODO: convert this magic catchers to resources item to close un-needed HTTP method match "/admin/#{i}(/:action(/:id))", controller: "admin/#{i}", action: nil, id: nil, format: false, via: [:get, :post, :put, :delete] # TODO: convert this magic catchers to resources item to close un-needed HTTP method end
Make feedback controller use resourceful routes.
publify_publify
train
rb
93bbe7a8cdc8aa3155eefdc210ef0e8eec0db13b
diff --git a/menuinst/win32.py b/menuinst/win32.py index <HASH>..<HASH> 100644 --- a/menuinst/win32.py +++ b/menuinst/win32.py @@ -149,9 +149,9 @@ def to_bytes(var, codec=locale.getpreferredencoding()): return var -if u'\\envs\\' in to_unicode(sys.prefix): - logger.warn('menuinst called from non-root env %s' % (sys.prefix)) unicode_root_prefix = to_unicode(sys.prefix) +if u'\\envs\\' in unicode_root_prefix: + logger.warn('menuinst called from non-root env %s', unicode_root_prefix) def substitute_env_variables(text, dir):
fix logging traceback from #<I>
ContinuumIO_menuinst
train
py
3ec475b67778c6ae0816013720609624aa0ced16
diff --git a/addons/docs/src/mdx/mdx-compiler-plugin.js b/addons/docs/src/mdx/mdx-compiler-plugin.js index <HASH>..<HASH> 100644 --- a/addons/docs/src/mdx/mdx-compiler-plugin.js +++ b/addons/docs/src/mdx/mdx-compiler-plugin.js @@ -218,8 +218,8 @@ function extractExports(node, options) { }, value: { type: 'StringLiteral', - value: encodeURI(generate(ast, {}).code), - /* ast.children + value: encodeURI( + ast.children .map( el => generate(el, { @@ -228,7 +228,6 @@ function extractExports(node, options) { ) .join('\n') ), - */ }, }); }
code to use only the children of the <Preview components, maybe potential issue with line breaks?
storybooks_storybook
train
js
bab1d1f02979cc7a2ad36c8ac5b5369cd6b7f113
diff --git a/draft-js-mention-plugin/src/SearchSuggestions/index.js b/draft-js-mention-plugin/src/SearchSuggestions/index.js index <HASH>..<HASH> 100644 --- a/draft-js-mention-plugin/src/SearchSuggestions/index.js +++ b/draft-js-mention-plugin/src/SearchSuggestions/index.js @@ -234,7 +234,7 @@ export default class SearchSuggestions extends Component { }; render() { - if (!this.state.isActive) { + if (!this.state.isActive || this.props.suggestions.isEmpty()) { return null; }
only show the list if there is a result
draft-js-plugins_draft-js-plugins
train
js
64bb7b8b6802a0cae277147a93ce84e1a8a42d47
diff --git a/commerce-discount-service/src/main/java/com/liferay/commerce/discount/model/impl/CommerceDiscountCommerceAccountGroupRelImpl.java b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/model/impl/CommerceDiscountCommerceAccountGroupRelImpl.java index <HASH>..<HASH> 100644 --- a/commerce-discount-service/src/main/java/com/liferay/commerce/discount/model/impl/CommerceDiscountCommerceAccountGroupRelImpl.java +++ b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/model/impl/CommerceDiscountCommerceAccountGroupRelImpl.java @@ -18,10 +18,13 @@ import aQute.bnd.annotation.ProviderType; import com.liferay.commerce.account.model.CommerceAccountGroup; import com.liferay.commerce.account.service.CommerceAccountGroupLocalServiceUtil; +import com.liferay.commerce.discount.model.CommerceDiscount; +import com.liferay.commerce.discount.service.CommerceDiscountLocalServiceUtil; import com.liferay.portal.kernel.exception.PortalException; /** * @author Marco Leo + * @author Alessio Antonio Rendina */ @ProviderType public class CommerceDiscountCommerceAccountGroupRelImpl @@ -38,4 +41,10 @@ public class CommerceDiscountCommerceAccountGroupRelImpl getCommerceAccountGroupId()); } + @Override + public CommerceDiscount getCommerceDiscount() throws PortalException { + return CommerceDiscountLocalServiceUtil.getCommerceDiscount( + getCommerceDiscountId()); + } + } \ No newline at end of file
COMMERCE-<I> Refactor commerce discount commerce account group rel implementation
liferay_com-liferay-commerce
train
java
8ff419a71968caf36dde8501112e7a37c982bc81
diff --git a/pkg/cmd/server/origin/master.go b/pkg/cmd/server/origin/master.go index <HASH>..<HASH> 100644 --- a/pkg/cmd/server/origin/master.go +++ b/pkg/cmd/server/origin/master.go @@ -785,6 +785,7 @@ func (c *MasterConfig) RunDNSServer() { glog.Fatalf("Could not start DNS: %v", err) } config.DnsAddr = c.Options.DNSConfig.BindAddress + config.NoRec = true // do not want to deploy an open resolver _, port, err := net.SplitHostPort(c.Options.DNSConfig.BindAddress) if err != nil {
SkyDNS: don't recurse requests
openshift_origin
train
go
ee2975f9194bb4d2291b6c5bd294e7c2ee2dec93
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -27,7 +27,7 @@ function PackeryComponent(React) { initializePackery: function(force) { if (!this.packery || force) { - this.packery = new Masonry( + this.packery = new Packery( this.refs[refName], this.props.options ); @@ -46,7 +46,7 @@ function PackeryComponent(React) { var oldChildren = this.domChildren.filter(function(element) { /* * take only elements attached to DOM - * (aka the parent is the masonry container, not null) + * (aka the parent is the packery container, not null) */ return !!element.parentNode; });
Fix typo Use Packery instead of Masonry :)
eiriklv_react-packery-component
train
js
b59e22caf5abe67f9489708b21fe16bb18cb5ffc
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ except IOError: readme = '' setup( name = 'layered-yaml-attrdict-config', - version = '12.06.1', + version = '12.06.2', author = 'Mike Kazantsev', author_email = 'mk.fraggod@gmail.com', license = 'WTFPL', @@ -38,4 +38,6 @@ setup( 'Topic :: Software Development :: Libraries :: Python Modules' ], install_requires = ['PyYAML'], - packages = find_packages() ) + packages = find_packages(), + package_data = {'': ['README.txt']}, + exclude_package_data = {'': ['README.*']} )
setup: included README.txt in the tarball
mk-fg_layered-yaml-attrdict-config
train
py
b6024d187efcdef6eed34d7324da09326d43e5bf
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -2073,7 +2073,7 @@ function AudioCB(voiceSession, audioChannels, encoder, maxStreamSize) { }; this._read = function _read() {}; this.stop = function stop() { - return this._systemEncoder.stdout.push(null); + return this._systemEncoder.stdout.read = function() { return null }; }; if (maxStreamSize) {
`Stream#stop` stops immediately
izy521_discord.io
train
js
b1ec831cce8dbac5839f7905fa48377f288cbc87
diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php @@ -148,7 +148,7 @@ EOF if ('/' === \DIRECTORY_SEPARATOR && $mounts = @file('/proc/mounts')) { foreach ($mounts as $mount) { $mount = array_slice(explode(' ', $mount), 1, -3); - if (!\in_array(array_pop($mount), array('vboxfs', 'nfs'))) { + if (!\in_array(array_pop($mount), array('vboxsf', 'nfs'))) { continue; } $mount = implode(' ', $mount).'/';
[FrameworkBundle] fix typo in CacheClearCommand
symfony_symfony
train
php
aa715ed0a6af8f341db9ef154d30e3759c858932
diff --git a/tests/cli/collectors.py b/tests/cli/collectors.py index <HASH>..<HASH> 100644 --- a/tests/cli/collectors.py +++ b/tests/cli/collectors.py @@ -26,6 +26,7 @@ class Collector(base.TDataCollector): ) outname = base.maybe_data_path(datadir / 'on', name, self.should_exist) ref = base.maybe_data_path(datadir / 'r', name, self.should_exist) + oo_opts = base.maybe_data_path(datadir / 'oo', name, self.should_exist) return datatypes.TData( datadir, @@ -33,7 +34,8 @@ class Collector(base.TDataCollector): base.load_data(opts, default=[]), datatypes.Expected(**exp_data), base.load_data(outname, default=''), - base.load_data(ref) + base.load_data(ref), + base.load_data(oo_opts, default={}), ) # vim:sw=4:ts=4:et: diff --git a/tests/cli/datatypes.py b/tests/cli/datatypes.py index <HASH>..<HASH> 100644 --- a/tests/cli/datatypes.py +++ b/tests/cli/datatypes.py @@ -32,5 +32,6 @@ class TData(typing.NamedTuple): # Optional extra data. outname: str = '' ref: typing.Optional[DictT] = None + oo_opts: DictT = {} # vim:sw=4:ts=4:et:
change: add oo_opts member to TData and set it on load
ssato_python-anyconfig
train
py,py
dd179cb9d13007d75c1363677e2f9d026b48c746
diff --git a/bakery/management/commands/build.py b/bakery/management/commands/build.py index <HASH>..<HASH> 100644 --- a/bakery/management/commands/build.py +++ b/bakery/management/commands/build.py @@ -1,5 +1,6 @@ import os import six +import glob import shutil from django.conf import settings from optparse import make_option @@ -77,6 +78,20 @@ settings.py or provide a list as arguments." verbosity=0 ) target_dir = os.path.join(self.build_dir, settings.STATIC_URL[1:]) + # walk through the static directory, + # and match for any .css or .js file + for (dirpath, dirnames, filenames) in walk(target_dir): + pattern = re.compile('(\.css|\.js|\.json)$') + for filename in filenames: + m = pattern.search(filename) + if m: + f_path = os.path.join(dirpath, filename) + f_in = open(f_path, 'rb') + f_out = gzip.open('%s.gz' % f_path, 'wb', mtime=0) + f_out.writelines(f_in) + f_out.close() + f_in.close() + if os.path.exists(settings.STATIC_ROOT) and settings.STATIC_URL: shutil.copytree(settings.STATIC_ROOT, target_dir) # If they exist in the static directory, copy the robots.txt
dirty attempt at regex searching for and gzipping static files
datadesk_django-bakery
train
py
19b83a28d95f54de60b55925736cf149b9c6c651
diff --git a/generic_positions/templatetags/position_tags.py b/generic_positions/templatetags/position_tags.py index <HASH>..<HASH> 100644 --- a/generic_positions/templatetags/position_tags.py +++ b/generic_positions/templatetags/position_tags.py @@ -19,6 +19,9 @@ def order_by_position(qs, reverse=False): position = 'position' if reverse: position = '-' + position + # Check that every item has a valid position item + for obj in qs: + ObjectPosition.objects.get_or_create(content_object=obj) # Get content type of first queryset item c_type = ContentType.objects.get_for_model(qs[0]) return [
fixed order by position tag if items have no position object
bitlabstudio_django-generic-positions
train
py
00711a9f968467a771b77acb226b8ec321d284a0
diff --git a/lib/test-server/test-server.js b/lib/test-server/test-server.js index <HASH>..<HASH> 100644 --- a/lib/test-server/test-server.js +++ b/lib/test-server/test-server.js @@ -151,7 +151,7 @@ var routeCoverage = function (req, res, next) { var jsonApi = function (req, res, next) { var testServer = this; - if (!req.path == "status.json") { + if (req.path !== "/status.json") { return next(); } var status = testServer.getStatus();
Fixing issue introduced in ba3aa<I>bd<I>aa<I>d<I>db<I>de6a<I> The status page was returned instead of <I> errors.
attester_attester
train
js
779fc2cdb5477278102fd6ae3d83a0b1a0907380
diff --git a/src/Codeception/Codecept.php b/src/Codeception/Codecept.php index <HASH>..<HASH> 100644 --- a/src/Codeception/Codecept.php +++ b/src/Codeception/Codecept.php @@ -7,7 +7,7 @@ use Symfony\Component\EventDispatcher\EventDispatcher; class Codecept { - const VERSION = "2.6.0"; + const VERSION = "3.0.0"; /** * @var \Codeception\PHPUnit\Runner
Set the VERSION constant to <I>
Codeception_base
train
php
b3c8a39dc0690bc9b49d2e57446bb27a9b861a5f
diff --git a/gsh/control_shell.py b/gsh/control_shell.py index <HASH>..<HASH> 100644 --- a/gsh/control_shell.py +++ b/gsh/control_shell.py @@ -104,6 +104,9 @@ def switch_readline_history(new_histo): add_history(line) return prev_histo +def handle_control_command(line): + singleton.onecmd(line) + class control_shell(cmd.Cmd): """The little command line brought when a SIGINT is received""" def __init__(self, options): diff --git a/gsh/stdin.py b/gsh/stdin.py index <HASH>..<HASH> 100644 --- a/gsh/stdin.py +++ b/gsh/stdin.py @@ -130,9 +130,15 @@ class input_buffer(object): def process_input_buffer(): """Send the content of the input buffer to all remote processes, this must be called in the main thread""" + from gsh.control_shell import handle_control_command data = the_stdin_thread.input_buffer.get() if not data: return + + if data.startswith(':'): + handle_control_command(data[1:-1]) + return + for r in dispatchers.all_instances(): try: r.dispatch_write(data)
Initial support of control commands prefixed by ':' in the main shell
innogames_polysh
train
py,py
03145a9fcebce8afef7d393916de64428c885813
diff --git a/connect.js b/connect.js index <HASH>..<HASH> 100644 --- a/connect.js +++ b/connect.js @@ -25,10 +25,10 @@ exports.connect = function (config, PassedClass) { return; } + var dirPath = path.resolve( + internals.argv['migrations-dir'] || 'migrations' + ); if (internals.migrationMode) { - var dirPath = path.resolve( - internals.argv['migrations-dir'] || 'migrations' - ); if (internals.migrationMode !== 'all') { var switched = false; var newConf; @@ -56,7 +56,7 @@ exports.connect = function (config, PassedClass) { null, new PassedClass( db, - internals.argv['migrations-dir'], + dirPath, internals.mode !== 'static', internals, prefix @@ -69,7 +69,7 @@ exports.connect = function (config, PassedClass) { null, new PassedClass( db, - internals.argv['migrations-dir'], + dirPath, internals.mode !== 'static', internals, prefix @@ -112,7 +112,7 @@ exports.connect = function (config, PassedClass) { null, new PassedClass( db, - internals.argv['migrations-dir'], + dirPath, internals.mode !== 'static', internals, prefix
fix wrong reference to migration folder fixes #<I>
db-migrate_node-db-migrate
train
js
36e4925b9c1da95a9dd182718e3a4e33e15bd4eb
diff --git a/backbone.js b/backbone.js index <HASH>..<HASH> 100644 --- a/backbone.js +++ b/backbone.js @@ -374,7 +374,7 @@ var prevId = this.id; this.id = this.generateId(current); - if (prevId !== this.id) this.trigger('changeId', this, prevId, options); + if (prevId !== this.id) this.trigger('change-id', this, prevId, options); // Trigger all relevant attribute changes. if (!silent) { @@ -968,7 +968,7 @@ _onModelEvent: function(event, model, collection, options) { if ((event === 'add' || event === 'remove') && collection !== this) return; if (event === 'destroy') this.remove(model, options); - if (event === 'changeId') { + if (event === 'change-id') { if (collection != null) delete this._byId[collection]; if (model.id != null) this._byId[model.id] = model; }
#<I> -- use 'change-id' as the event name
jashkenas_backbone
train
js