patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -3118,9 +3118,13 @@ class EpochsFIF(BaseEpochs):
@verbose
def __init__(self, fname, proj=True, preload=True,
verbose=None): # noqa: D102
- if isinstance(fname, str):
- check_fname(fname, 'epochs', ('-epo.fif', '-epo.fif.gz',
- '_... | [BaseEpochs->[equalize_event_counts->[drop,drop_bad],plot_drop_log->[plot_drop_log],_get_data->[_get_epoch_from_raw,_detrend_offset_decim,_is_good_epoch,_project_epoch],drop_bad->[_reject_setup],get_data->[_get_data],crop->[_set_times],to_data_frame->[copy,get_data],reset_drop_log_selection->[_check_consistency],__init... | Initialize a BAM file from a file - like object. Initialize base epoch with a base epoch missing - block - index. | Usually `_check_*` functions raise errors, this would be better as `_path_like(...)` I think |
@@ -193,10 +193,7 @@ class AmpStickyAd extends AMP.BaseElement {
// `render-start` is expected to arrive first, but it's not emitted by
// all types of ads.
const signals = ad.signals();
- return Promise.race([
- signals.whenSignal(CommonSignals.RENDER_START),
- signals.whenSignal(CommonSign... | [No CFG could be retrieved] | Function that check if ad has been built. If not schedule layout for ad. Function that add a close button to sticky ad. | This could break now if the ad fail to send 'render-start' msg, but still we toggle ad display at iframe onload event. I have #22305 to fix the issue. |
@@ -324,3 +324,15 @@ class UnsplittableRangeTracker(iobase.RangeTracker):
def fraction_consumed(self):
return self._range_tracker.fraction_consumed()
+
+ def split_points(self):
+ return self._range_tracker.split_points()
+
+ def set_split_points_remaining_callback(self, callback):
+ self._range_track... | [UnsplittableRangeTracker->[position_at_fraction->[position_at_fraction],start_position->[start_position],try_claim->[try_claim],fraction_consumed->[fraction_consumed],stop_position->[stop_position],set_current_position->[set_current_position]],GroupedShuffleRangeTracker->[try_split->[stop_position,start_position,last_... | Returns the fraction consumed. | This isn't correct for an unsplittable source. |
@@ -194,7 +194,7 @@ public class PluginManagerTest {
// plugins should be already visible in the UberClassLoader
assertFalse(activePlugins.isEmpty());
- uberClassLoader.loadClass("hudson.plugins.tasks.Messages");
+ assertNotNull(uberClass... | [PluginManagerTest->[PluginManagerImpl_for_testUberClassLoaderIsAvailableDuringStart->[createPluginStrategy->[startPlugin->[startPlugin]]],dynamicLoadAndDisable->[dynamicLoad],installDependedPluginWithoutRestart->[callDependerValue],optionalExtensionCanBeFoundAfterDynamicLoadOfVariant->[dynamicLoad],installDependingPlu... | Create a strategy that will check if a plugin is not already running. | I unintentionally broke this test in commit 1b2ca8a709 by switching from `tasks.jpi` to `htmlpublisher.jpi` without updating the corresponding class name, but we never noticed because the return value is ignored. I fixed the return value problem by asserting that the value is not null, which would have exposed the orig... |
@@ -72,3 +72,15 @@ class Fruit{
static class Pear{}
static class Apple{}
}
+
+
+class UnknownParam {
+ private static int method(UNKNOWN arg) {
+
+ }
+}
+class UnknownParamChild extends UnknownParam {
+ protected int method(UNKNOWN arg) {
+
+ }
+}
| [No CFG could be retrieved] | Static class for all the classes that are not part of the Pear class. | missing new line at the EOF `Settings -> Editor -> General -> Other / Ensure line feed` |
@@ -853,12 +853,14 @@ class TestSpecDag(object):
self.check_diamond_deptypes(s)
self.check_diamond_normalized_dag(s)
+ @pytest.mark.usefixtures('config')
def test_concretize_deptypes(self):
"""Ensure that dependency types are preserved after concretization."""
s = Spec('dt-... | [TestSpecDag->[test_unsatisfiable_architecture->[set_dependency],test_copy_deptypes->[check_diamond_normalized_dag,check_diamond_deptypes],test_unsatisfiable_compiler->[set_dependency],test_copy_simple->[check_links],test_normalize_diamond_deptypes->[check_diamond_normalized_dag,check_diamond_deptypes],test_concretize_... | Test for normalization of diamond dependency types. | Changes in this file shouldn't be needed anymore as recently the `config` fixture has been added at class level. |
@@ -35,6 +35,12 @@ public class ProjectMeasuresIndexDefinition implements IndexDefinition {
public static final String FIELD_MEASURES_KEY = "key";
public static final String FIELD_MEASURES_VALUE = "value";
+ public static final String TYPE_AUTHORIZATION = "authorization";
+ public static final String FIELD_AU... | [ProjectMeasuresIndexDefinition->[define->[create,build,createType,createDateTimeField,refreshHandledByIndexer,setEnableSource,configureShards]]] | This class defines a new index for the project measures. Adds fields to the mapping object. | We know that this field should contains group ids. It's not possible yet because of "anyone" and organizations. Still I recommend to rename the field to "groupNames" to remove ambiguity and potential bugs. |
@@ -115,7 +115,7 @@
orderByFilter.$inject = ['$parse'];
function orderByFilter($parse){
return function(array, sortPredicate, reverseOrder) {
- if (!isArray(array)) return array;
+ if (!(isArray(array) || array instanceof Array)) return array;
if (!sortPredicate) return array;
sortPredicate = isArr... | [No CFG could be retrieved] | Requires an array with a name phone and age. - - - - - - - - - - - - - - - - - -. | Did you consider using `isArrayLike()`? |
@@ -29,3 +29,16 @@ class TestSelfChat(unittest.TestCase):
]
)
self_chat.self_chat(opt)
+
+ def test_ed(self):
+ pp = self_chat.setup_args()
+ opt = pp.parse_args(
+ [
+ '-mf',
+ 'zoo:blender/blender_3B/model',
+ '-t'... | [TestSelfChat->[test_convai2->[setup_args,parse_args,self_chat],test_vanilla->[setup_args,parse_args,self_chat]]] | Test if a sequence of tokens is not available in the convai2 system. | Can we use SelfChat.main(task='empathetic_dialogues', ...) |
@@ -41,9 +41,11 @@ public class DerivativeDataSourceMetadata implements DataSourceMetadata
@JsonProperty("metrics") Set<String> metrics
)
{
- this.baseDataSource = Preconditions.checkNotNull(baseDataSource, "baseDataSource cannot be null. This is not a valid DerivativeDataSourceMetadata.");
this.di... | [DerivativeDataSourceMetadata->[equals->[getBaseDataSource,getMetrics,getDimensions,equals]]] | Get base data source from . | nit: Please don't change the initialization order. It would be good if they're aligned with their definition order. |
@@ -278,9 +278,6 @@ type SourceControlUser struct {
// BuildStrategy contains the details of how to perform a build.
type BuildStrategy struct {
- // Type is the kind of build strategy.
- Type BuildStrategyType
-
// DockerStrategy holds the parameters to the Docker build strategy.
DockerStrategy *DockerBuildStr... | [NewString] | Describes the description of a specific branch. | @bparees just to make it clear, are we removing this in favor of checking which one and only one of the three other fields is non-nil? |
@@ -185,9 +185,9 @@ class TimeDelayingRidge(BaseEstimator):
Parameters
----------
- X : array, shape (n_samples, n_features)
+ X : array, shape (n_samples[, n_epochs], n_features)
The training input samples to estimate the linear coefficients.
- y : array, shape (n_... | [TimeDelayingRidge->[fit->[_compute_corrs,_fit_corrs]]] | Estimate the coefficients of the linear model. | there's a docstring discrepancy between here and `_delay_time_series`...that OK? |
@@ -139,7 +139,7 @@ namespace System.ComponentModel
_asyncOperation = AsyncOperationManager.CreateOperation(null);
Task.Factory.StartNew(
- (arg) => WorkerThreadStart(arg),
+ (arg) => WorkerThreadStart(arg!),
argument,
... | [BackgroundWorker->[RunWorkerAsync->[RunWorkerAsync],ReportProgress->[ReportProgress],ProgressReporter->[OnProgressChanged],WorkerThreadStart->[OnDoWork]]] | This method runs a worker asynchronously. | NIT: Seems `WorkerThreadStart` could accept nullable `arg` |
@@ -150,7 +150,9 @@ func (pack *cloudPolicyPack) Apply(ctx context.Context, op backend.ApplyOperatio
return pack.cl.ApplyPolicyPack(ctx, pack.ref.orgName, string(pack.ref.name), op.Version)
}
-func installRequiredPolicy(finalDir string, zip []byte) error {
+const npmPackageDir = "package"
+
+func installRequiredPo... | [Version->[Itoa],Install->[DownloadPolicyPack,Itoa,GetPolicyPath],Apply->[ApplyPolicyPack],String->[Sprintf],Publish->[Println,GetAnalyzerInfo,Name,PolicyAnalyzer,FromError,PublishPolicyPack,Process,Ref],RemoveAll,Printf,Dir,Wrapf,Sprintf,IgnoreError,Rename,TempDir,Base,Wrap,Unzip,MkdirAll,IsExist] | Apply applies the policy pack to the cloud. | For my own understanding, is `tarball []byte` here actually the tarball that was produced by `npm pack` or is it a zip file that contains the output of `npm pack`? |
@@ -278,10 +278,8 @@ namespace System.Windows.Forms
/// <summary>
/// The Name of the column header
/// </summary>
- [
- Browsable(false),
- SRDescription(nameof(SR.ColumnHeaderNameDescr))
- ]
+ [Browsable(false)]
+ [SRDescription(nameof(SR.ColumnHea... | [ColumnHeader->[AutoResize->[None,AutoResizeColumn,nameof,ColumnContent],ShouldSerializeName->[IsNullOrEmpty],Dispose->[Dispose,RemoveAt],Clone->[GetType,text,textAlign,CreateInstance,Width],SetDisplayIndices->[SETCOLUMNORDERARRAY,Disposing,SendMessageW,IsHandleCreated,Length],ColumnHeaderImageListIndexer->[ListView,As... | Creates a control that can be used to display a single column header. - A string that will be displayed in the column header if no value is specified. | How does the designer set these names? I can only assume it doesn't do it via `Name`, otherwise it should be persisted. |
@@ -4886,16 +4886,7 @@ resource "aws_subnet" "test" {
}
func testAccAwsInstanceVpcConfigBasic(rName string) string {
- return fmt.Sprintf(`
-data "aws_availability_zones" "available" {
- state = "available"
-
- filter {
- name = "opt-in-status"
- values = ["opt-in-not-required"]
- }
-}
-
+ ret... | [ParallelTest,DeepEqual,PushBack,Setenv,TestCheckTypeSetElemNestedAttrs,StopInstances,TestCheckNoResourceAttr,Quote,TestCheckResourceAttrSet,RandInt,New,RootModule,ComposeTestCheckFunc,Errorf,MustCompile,RandStringFromCharSet,Bool,ModifyInstanceAttribute,Join,TestMatchResourceAttr,DescribeInstanceAttribute,Contains,Fat... | testAccLatestWindowsServer2016CoreAmiConfig returns the configuration for the Windows - Server testAccAwsInstanceVpcSecurityGroupConfig returns the configuration for a specific security group in the VPC. | Nit: could also use `composeConfig` to concatenate these 2 configs |
@@ -162,7 +162,8 @@ class TestSpecSematics(object):
check_unsatisfiable('foo@4.0%pgi@4.5', '@1:3%pgi@4.4:4.6')
check_satisfies('foo %gcc@4.7.3', '%gcc@4.7')
- check_unsatisfiable('foo %gcc@4.7', '%gcc@4.7.3')
+ # This is unsatisfiable but the reverse is compatible
+ check_unsati... | [check_satisfies->[_specify,make_spec],TestSpecSematics->[test_unsatisfiable_variant_mismatch->[check_unsatisfiable],test_errors_in_variant_directive->[Pkg],test_constrain_dependency_not_changed->[check_constrain_not_changed],test_satisfies_matching_variant->[check_satisfies],test_constrain_architecture->[check_constra... | Test if the compiler version of the module matches the version of the module. region Public API Methods. | I think the tests could use more examples of where `satisfies` and `compatible` disagree (e.g. for variants). I'd also prefer separate functions for checking satisfiability and compatibility (since the default for `compatible` may confuse users of this function). Also, IMO replacing the name `compatible` with `can_be_c... |
@@ -7,5 +7,14 @@
</div>
<% rescue => e %>
<% logger.error("Notifification error - #{e.message} - #{notification.id}") %>
+ <div class="small-pic">
+ <img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LnVw15KE--/c_fill,f_auto,fl_progressive,h_90,q_auto,w_90/https://thepracticaldev.s3.amazona... | [No CFG could be retrieved] | end of notification. | Feel free to change the copy. |
@@ -502,8 +502,8 @@ public abstract class Recycler<T> {
item.recycleId = item.lastRecycledId = OWN_THREAD_ID;
int size = this.size;
- if (size >= maxCapacity) {
- // Hit the maximum capacity - drop the possibly youngest object.
+ if (size >= maxCapacity |... | [Recycler->[threadLocalSize->[get],threadLocalCapacity->[get],DefaultHandle->[recycle->[get]],Stack->[scavengeSome->[hasFinalData,get,transfer]],recycle->[recycle],get->[get],WeakOrderQueue->[transfer->[reclaimSpace,get],finalize->[finalize,reclaimSpace],allocate->[WeakOrderQueue],add->[get,reserveSpace,Link],hasFinalD... | Adds a default handle to the tail of the queue. | nit: missing space before `-` |
@@ -295,9 +295,10 @@ namespace System.Windows.Forms.Design
bool resizable = true;
bool autoSize = false;
bool growOnly = false;
- if (autoSizeProp != null &&
- !(autoSizeProp.Attributes.Contains(DesignerSerializationVisibilityAttribute.Hidden) ||
- ... | [ControlDesigner->[HookChildControls->[HookChildControls],SetUnhandledException->[DisplayError],OnDragOver->[OnDragOver],OnMouseLeave->[OnMouseLeave],InitializeExistingComponent->[InitializeExistingComponent],PreFilterProperties->[PreFilterProperties],OnHandleChange->[HookChildControls,HookChildHandles],OnDragEnter->[O... | IsResizableConsiderAutoSize - Checks if the property is set to be resizable. | Consider factoring `autoSizeProp.Attributes` into a local variable. |
@@ -140,7 +140,10 @@ void genAptUrl(const std::string& source,
}
std::string content;
- if (!readFile(cache_files[0], content)) {
+ auto s = readFile(cache_files[0], content, 0, false, false, false, false);
+ if (!s.ok()) {
+ logger.log(google::GLOG_WARNING, s.getMessage());
+ logger.vlog(1, s.getMessa... | [void->[genAptUrl],genAptUrl->[getCacheFilename,parseAptSourceLine]] | Generate Apt URL from AptSource and AptSource line. | Please remove this `vlog` call. |
@@ -48,14 +48,14 @@ namespace System.Reflection.TypeLoading.Ecma
public bool IsSystemType(RoType type) => type == Loader.TryGetCoreType(CoreType.Type);
public PrimitiveTypeCode GetUnderlyingEnumType(RoType type) => type.GetEnumUnderlyingPrimitiveTypeCode(Loader);
- public RoType GetTypeFromSe... | [EcmaModule->[IsSystemType->[Type,TryGetCoreType],PrimitiveTypeCode->[GetEnumUnderlyingPrimitiveTypeCode],RoType->[LoadTypeFromAssemblyQualifiedName,ResolveTypeDef,GetUniqueByRefType,Format,GetUniqueConstructedGenericType,GenericMethodParamIndexOutOfRange,NotSupported_FunctionPointers,ToCoreType,Type,GetUniqueArrayType... | Get the underlying Enum type from serialized name. | Intentionally forcing the return type as non-nullable here, as declaring it nullable would require marking the `ISignatureTypeProvider` and `ICustomAttributeTypeProvider` interfaces implemented by this class as having a nullable `RoType` type parameter. In turn this would result in pervasive and unnecessary nullability... |
@@ -65,6 +65,10 @@ class ShippingMethod(ChannelContextTypeWithMetadata, CountableDjangoObjectType):
minimum_order_price = graphene.Field(
Money, description="The price of the cheapest variant (including discounts)."
)
+ zip_codes = graphene.List(
+ ShippingMethodZipCode,
+ descriptio... | [ShippingZone->[resolve_price_range->[resolve_price_range]]] | Relations for the channel and the channel listings. Returns the price of the maximum order in the given node. | We only have exclusion rules for now if I'm correct. |
@@ -379,6 +379,8 @@ func (app *ChainlinkApplication) Start() error {
return err
}
+ app.LogBroadcaster.SetLatestHeadFromStorage(app.HeadTracker.HighestSeenHead())
+
if err := app.Scheduler.Start(); err != nil {
return err
}
| [NewBox->[NewBox],ArchiveJob->[ArchiveJob],stop->[Stop],Start->[Start],AddServiceAgreement->[AddJob],AddJob->[AddJob]] | Start starts the application Start the scheduler. | This is racey. If the head tracker has pulled down a new head between `Start()` and now, this head number will be wrong. You need to read from the DB _before_ the head tracker starts. |
@@ -919,7 +919,7 @@ dc_enumerate_cb(tse_task_t *task, void *arg)
if (enum_args->eaa_anchor)
enum_anchor_copy(enum_args->eaa_anchor,
&oeo->oeo_anchor);
- rc = csum_enum_verify_keys(enum_args, oeo);
+ rc = csum_enum_verify(enum_args, oeo);
if (rc != 0)
D_GOTO(out, rc);
| [No CFG could be retrieved] | Enumerate all keys in the OOO object. Copy all the enum keys from the object to the object. | hmm, we probably should provide the option to the user to only fetch/update(not verify) the csum during the rebuild. Since rebuild means there are duplication(either replication or EC), so even there is corruption, it may be able to fix it later. Since disable csum can actually save a lot server cpu cycle for rebuild, ... |
@@ -34,11 +34,11 @@ func init() {
return func(v interface{}) error {
conf, ok := v.(*balanceRegionSchedulerConfig)
if !ok {
- return ErrScheduleConfigNotExist
+ return errs.ErrScheduleConfigNotExist
}
ranges, err := getKeyRanges(args)
if err != nil {
- return errors.WithStack(err)
+ r... | [Schedule->[GetName],EncodeConfig->[EncodeConfig],transferPeer->[GetName]] | init registers the required components of the Schedule and registers the necessary components of the balanceRegionRetryLimit is the limit to retry schedule for selected store. | Does this error need to be handled in the lower level? |
@@ -500,3 +500,10 @@ def split_basename_and_dirname(path):
if not os.path.isfile(path):
raise ValueError("{} does not exist or is not a regular file.".format(path))
return (os.path.dirname(path), os.path.basename(path))
+
+
+def narrow_relative_paths(cur_root_dir, new_root_subdir, rel_paths):
+ """If `cur_r... | [register_rmtree->[_mkdtemp_register_cleaner],relativize_paths->[relativize_path],rm_rf->[safe_delete],absolute_symlink->[safe_mkdir_for],safe_mkdir_for->[safe_mkdir],touch->[safe_open],safe_concurrent_rename->[safe_delete,safe_rmtree],safe_open->[safe_mkdir_for],mergetree->[ExistingDirError,ExistingFileError,safe_mkdi... | Splits a file path into its parent directory and basename. | This is pretty specific... would not add it here unless you've used the pattern multiple times. |
@@ -194,9 +194,12 @@ export default class DatePicker extends PureComponent {
displayFormat,
displayMonthFormat,
displayDayFormat,
- translations
+ translations,
+ language
} = this.props;
+ const locale = language in localeMap ? localeMap[language] : undefined;
+
const... | [No CFG could be retrieved] | Create popup ref and text for calendar component that displays a datepicker anchor. Renders a sequence number in a calendar widget. | Can simplify code here as well |
@@ -118,7 +118,10 @@ public class HttpClientModule implements Module
builder.withSslContext(getSslContextBinding().getProvider().get());
}
- return HttpClientInit.createClient(builder.build(), LifecycleUtils.asMmxLifecycle(getLifecycleProvider().get()));
+ return HttpClientInit.createClient(... | [HttpClientModule->[global->[HttpClientModule],HttpClientProvider->[get->[get]]]] | Get a . | maybe we can do something here so that httpClient is wrapped with appropriate internal authenticator. |
@@ -337,7 +337,7 @@ namespace System.Net.Security
AuthenticateAsServer(options);
}
- private void AuthenticateAsServer(SslServerAuthenticationOptions sslServerAuthenticationOptions)
+ public void AuthenticateAsServer(SslServerAuthenticationOptions sslServerAuthenticationOptions)
... | [SslStream->[Flush->[Flush],Write->[Write],AuthenticateAsClient->[AuthenticateAsClient,SetAndVerifySelectionCallback,SetAndVerifyValidationCallback],AuthenticateAsServer->[AuthenticateAsServer,SetAndVerifyValidationCallback],ThrowIfExceptionalOrNotAuthenticated->[ThrowIfExceptional],ThrowIfExceptionalOrNotAuthenticated... | This method is called by the server side to authenticate the client. | I noticed we don't have null checks on these in the async versions. We should probably add them for both, to throw ArgumentNullException if null is passed in, rather than null ref'ing. |
@@ -40,4 +40,17 @@
</span>
</a>
</div>
+ <% if @community_mod_channel %>
+ <div class="fs-s mod-feedback">
+ <span class="fw-medium">Have feedback to improve your Mod experience?</span>
+ <span>Please share in
+ <a
+ class="mod-feedback-link"
+ href="/connect/<%= @c... | [No CFG could be retrieved] | - >. | I think we can do "your Connect Channel!" in plain text here with no link, and then in the "Resources" section we have a link to "Connect Channel" which would link to this specific channel. |
@@ -2312,11 +2312,7 @@ void BailOutRecord::ScheduleLoopBodyCodeGen(Js::ScriptFunction * function, Js::S
entryPointInfo->totalJittedLoopIterations += entryPointInfo->jittedLoopIterationsSinceLastBailout;
entryPointInfo->jittedLoopIterationsSinceLastBailout = 0;
- if (entryPointInfo->totalJittedLoopIterati... | [No CFG could be retrieved] | Initializes the loop header and jitted loop iterations. if possible else return false. | > uint32 totalJittedLoopIterations = entryPointInfo->totalJittedLoopIterations; [](start = 4, length = 77) In keeping with @LouisLaf 's suggestion in ScheduleFunctionCodeGen, we should retain the existing code here. |
@@ -17,6 +17,12 @@ class Cgdb(AutotoolsPackage):
# Required dependency
depends_on('ncurses')
depends_on('readline')
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('flex', type='build')
+ depends_on('bison', t... | [Cgdb->[configure_args->[format],depends_on,version]] | Return a list of command line arguments for the object. | I wonder if these dependencies are actually needed to build from a release, the tarball already contains a configure script. |
@@ -166,6 +166,8 @@ namespace Content.Client.Entry
ContentContexts.SetupContexts(inputMan.Contexts);
IoCManager.Resolve<IGameHud>().Initialize();
+ IoCManager.Register<DistortionMapOverlay>();
+ IoCManager.BuildGraph();
var overlayMgr = IoCManager.Resolve... | [EntryPoint->[PostInit->[PostInit],Update->[Update]]] | Initialize the components of the client. | It does need to be in IoC (lest it be `static`), but it **must** come after `PrototypeManager` initializes, since its shader comes from a `ShaderPrototype`. |
@@ -1,4 +1,5 @@
/*
+ * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2016 VMS Software, Inc. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
| [No CFG could be retrieved] | Create a typedef for a given n - bit integer. IRQ - like object with all the fields filled in. | Has VSI granted us copyright? If not, this is wrong. |
@@ -65,6 +65,16 @@ module Engine
self.class::STEP_DESCRIPTION[@step]
end
+ def pass_description
+ # If the user is continuing an action change the phrasing from Don't to Done
+ if @step == @lastactionstep
+ return self.class::ACTIVE_PASS_DESCRIPTION[@step] if self.class::AC... | [Operating->[can_buy_train?->[corp_has_room?],next_step!->[can_buy_train?,next_step!,can_buy_companies?,must_buy_train?],buy_company->[name],place_token->[place_token,name],rust_trains!->[name],log_pass->[name],payout->[name],payout_entity->[name],liquidate->[sell_shares,name],withhold->[name],ignore_action?->[can_buy_... | Returns true if the sequence number is not a sequence number and false if it is a sequence. | i don't understand how this works. isn't last action step always company? you're using the class definition why would active pass descriptions have multiple things? |
@@ -202,8 +202,11 @@ func containerServiceName(ctr *libpod.Container, options entities.GenerateSystem
// containerInfo. Note that the containerInfo is also post processed and
// completed, which allows for an easier unit testing.
func executeContainerTemplate(info *containerInfo, options entities.GenerateSystemdOpt... | [Executable,GetBool,NArg,Warnf,Now,Delims,SetInterspersed,Wrap,StringArrayP,Strings,Format,New,Errorf,Bool,BoolP,SplitN,RunRoot,ID,Join,Execute,Contains,Name,Lookup,NewFlagSet,Config,StopTimeout,Sprintf,Changed,Runtime,String,Parse,GetStringArray] | containerServiceName returns the service name of the container and the name of the container. We don t want to do a best effort unit generation here. | we could warn and reset to the default restart policy here, not sure if this makes sense |
@@ -1,12 +1,9 @@
"""
Copyright (c) 2018-2020 Intel Corporation
-
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-
http://www.apache.org/licenses/LICENSE-2.0
-
Unless required by applica... | [SegmentationIOU->[update->[update]],SegmentationAccuracy->[update->[update]],SegmentationMeanAccuracy->[update->[update]],SegmentationMetric->[update->[confusion_matrix]],SegmentationFWAcc->[update->[update]],SegmentationDIAcc->[parameters->[update]]] | Creates a new metric object for the given n - tuple. Update the meta file or regenerated annotation. | please return back whitelines in license header |
@@ -25,8 +25,6 @@ func SetDefaults_ImagePolicyConfig(obj *ImagePolicyConfig) {
obj.ResolutionRules = []ImageResolutionPolicyRule{
{TargetResource: metav1.GroupResource{Resource: "pods"}, LocalNames: true},
{TargetResource: metav1.GroupResource{Group: "build.openshift.io", Resource: "builds"}, LocalNames: tru... | [AddTypeDefaultingFunc] | SetDefaults_ImagePolicyConfig sets defaults for ImagePolicyConfig objects missing the global default. | is the BZ resolved? :) |
@@ -102,13 +102,7 @@ func getPachClient(t testing.TB, subject string) *client.APIClient {
// Check if seed client exists -- if not, create it
if seedClient == nil {
- var err error
- if _, ok := os.LookupEnv("PACHD_PORT_650_TCP_ADDR"); ok {
- seedClient, err = client.NewInCluster()
- } else {
- seedClient,... | [WhoAmI,Authorize,Index,HasPrefix,CreateRepo,ListDatum,New,IsErrNotSignedIn,StartCommit,HasSuffix,GetFile,DeletePipeline,Authenticate,NoError,Fatalf,GetScope,DeleteAll,PutFile,WithCtx,NoneEquals,GetAdmins,Helper,FinishCommit,False,ModifyAdmins,NewUnionInput,StartPipeline,OneOfEquals,ListPipeline,NotEqual,FlushCommit,Ne... | activateAuth activates the auth service in the test cluster Activate a cluster. | This looks like a typo. |
@@ -34,10 +34,6 @@ import java.io.IOException;
* response values, as well as any other arbitraty Object <--> byte[] conversions, such as those used in client/server
* communications.
* <p/>
- * The interface is also used by the {@link org.infinispan.loaders.CacheStore} framework to efficiently serialize data
- * ... | [No CFG could be retrieved] | This class is used to marshall a single object to a byte array. Returns the marshalled form of the object. | State transfer might have changed, but the following is still true: "The interface is also used by the {@link org.infinispan.loaders.CacheStore} framework to efficiently serialize data to be persisted," |
@@ -597,6 +597,17 @@ public class RealtimePlumber implements Plumber
}
}
);
+ handoffNotifier.registerSegmentHandoffCallback(
+ new SegmentDescriptor(sink.getInterval(), sink.getVersion(), config.getShardSpec().getPartitionNum()),
+ mergeExecutor, new Runnable()
+ {
+ ... | [RealtimePlumber->[abandonSegment->[makeHydrantIdentifier],persistHydrant->[persist,computePersistDir],getSink->[add],finishJob->[persistAndMerge],persistAndMerge->[doRun->[add]],registerServerViewCallback->[segmentAdded->[abandonSegment]],add->[add],computePersistDir->[computeBaseDir],persist->[add],mergeAndPush->[per... | This method is called when a sink is committed to the persistent store and a merge is performed This method is called when a new hydrant is added to the index. This method is called when a sink is about to be shut down. | For some reason the diff on this file came out really difficult to read. Can you provide a high level statement of what you changed? |
@@ -212,6 +212,14 @@ public class KinesisSupervisor extends SeekableStreamSupervisor<String, String>
// not yet implemented, see issue #6739
}
+
+ /**
+ * We try to parse the shard number of the shard ID, using a BigInteger because the Kinesis shard ID can be
+ * up to 128 characters. The shard number is... | [KinesisSupervisor->[createReportPayload->[getBasicState,getReplicas,getStream,isHealthy,getSupervisorState,getExceptionEvents,getDataSource,isSuspended,KinesisSupervisorReportPayload,getMillis,getIoConfig],isEndOfShard->[equals],createTaskIoConfig->[getAwsExternalId,getStream,getAwsAssumedRoleArn,getFetchDelayMillis,K... | This method is called by the reporting executor to schedule a reporting for a given partition. | Curious: Did we want to stop returning nulls and return Optional instead? Seems much cleaner, safer, and more explicit to me... |
@@ -249,12 +249,10 @@ public class TestOzoneFileSystem {
}
}
- private void setupOzoneFileSystem()
+ protected void setupOzoneFileSystem()
throws IOException, TimeoutException, InterruptedException {
- OzoneConfiguration conf = new OzoneConfiguration();
- conf.setInt(FS_TRASH_INTERVAL_KEY, 1);
... | [TestOzoneFileSystem->[getKey->[getKey],testFileSystem->[testCreateFileShouldCheckExistenceOfDirWithSameName,testMakeDirsWithAnExistingDirectoryPath,testCreateWithInvalidPaths]]] | Setup the Ozone file system and the filesystem. | Can we remove this unused line. |
@@ -15,6 +15,7 @@ DEBUG_PROPAGATE_EXCEPTIONS = False
# These apps are great during development.
INSTALLED_APPS += (
'django_extensions',
+ 'djcelery',
'landfill',
)
| [path,get] | This is the standard development settings file. WS = False. | This is deprecated, and isn't necessary since we upgraded to Celery 3.1. Celery commands run via `celery -A olympia ...` now. |
@@ -25,8 +25,9 @@ class PythonToolInstance(object):
def pex(self):
return self._pex
- def run(self, workunit_factory, args, **kwargs):
- cmdline = ' '.join(self._pex.cmdline(args))
+ @contextmanager
+ def run_with(self, workunit_factory, args, **kwargs):
+ cmdline = safe_shlex_join(self._pex.cmdline(... | [PythonToolInstance->[run->[run]],PythonToolPrepBase->[execute->[_build_tool_pex]]] | Returns a function that runs the pex command and returns the exit code. | I think that rather than making this a context manager, you could have it return the created workunit... I don't think it needs to be in a context. |
@@ -64,7 +64,7 @@ def collect_all_repodata(use_cache, tasks):
import concurrent.futures
executor = concurrent.futures.ThreadPoolExecutor(10)
repodatas = _collect_repodatas_concurrent(executor, use_cache, tasks)
- except (ImportError, RuntimeError) as e:
+ except (Imp... | [read_local_repodata->[read_pickled_repodata,write_pickled_repodata],fetch_repodata->[get_cache_control_max_age,process_repodata,read_local_repodata,read_mod_and_etag,fetch_repodata_remote_request,write_pickled_repodata],fetch_repodata_remote_request->[maybe_decompress,Response304ContentUnchanged],_collect_repodatas_se... | Collect all repodatas of a task. | Missing a space after `)` |
@@ -42,10 +42,10 @@ namespace System.Text.RegularExpressions.Tests
[InlineData(@"[a\x00(?#)b]", RegexOptions.None, null)]
[InlineData(@"[a\u0000(?#)b]", RegexOptions.None, null)]
[InlineData(@"[a\](?#)b]", RegexOptions.None, null)]
- [InlineData("(?", RegexOptions.None, RegexParseError... | [RegexParserTests->[Parse_NotNetFramework->[Parse]]] | Best effort rule for parsing a sequence of tokens. Best effort rule for parsing group - level tokens. Inline data in the language tree This function return all the tokens in the sequence that can be parsed. | Can you please update the tests to verify the offset? |
@@ -0,0 +1,9 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Threading.Tasks;
+
+await Task.Delay(1);
+Console.WriteLine("Hello From Wasm!");
+return 42;
\ No newline at end of file
| [No CFG could be retrieved] | No Summary Found. | Needs a trailing newline |
@@ -632,11 +632,15 @@ export class AmpVideo extends AMP.BaseElement {
childElementByTag(this.element, 'video'),
'Tried to reset amp-video without an underlying <video>.'
);
-
this.uninstallEventHandlers_();
this.installEventHandlers_();
+ if (this.isManagedByBitrate_) {
+ getBitrate... | [No CFG could be retrieved] | Private methods - Component lifecycle methods - Private methods for the base class. | `this.loadPromise` would not work here since it won't have the sources attached yet, so we use the loadedMetadata directly here. |
@@ -246,7 +246,7 @@ class CarController(object):
send_ui = False
if (frame % 100 == 0 or send_ui) and ECU.CAM in self.fake_ecus:
- can_sends.append(create_ui_command(self.packer, steer, sound1, sound2, left_line, right_line))
+ can_sends.append(create_ui_command(self.packer, steer, sound1, sound... | [CarController->[update->[ipas_state_transition,accel_hysteresis,process_hud_alert]]] | Update the control surfaces. sends a message if the system is not active and the last message is not in the This method is called from the main frame to determine if a specific node can be sent. check if there is a nagios message and send it if it is Convert the binary representation of the object into bytes. | Can you follow the python naming convention? So `left_lane_depart`? |
@@ -1050,11 +1050,11 @@ def _process_times(inst, times, n_peaks=None, few=False):
if isinstance(times, string_types):
if times == "peaks":
if n_peaks is None:
- n_peaks = 3 if few else 7
+ n_peaks = min(3 if few else 7, len(times))
times = _find_peak... | [_mouse_click->[_plot_raw_time,_handle_change_selection],_change_channel_group->[_set_radio_button],tight_layout->[tight_layout],ClickableImage->[plot_clicks->[plt_show],__init__->[plt_show]],_process_times->[_find_peaks],_plot_raw_onkey->[_channels_changed,_change_channel_group,_plot_raw_time],_handle_change_selection... | Helper to return a list of times for topomaps. | You don't need these. times = 'auto' or 'peaks' |
@@ -456,12 +456,13 @@ async function cleanup_(tempDir) {
async function release() {
const outputDir = path.resolve(argv.output_dir || './release');
const tempDir = path.join(outputDir, 'tmp');
+ const useCustomConfigs = Boolean(argv.use_custom_configs);
log('Preparing environment for release build in', `${... | [No CFG could be retrieved] | Creates a wildcard directory and copies the package. json file into the specified output directory. Generate files from rtv and net - wildcard. | 1. The rest of this file uses `argv.flag_name` inside the various functions directly, instead of passing it between the function calls. Let's keep that consistent. 2. We tend to prefer `!!var` instead of `Boolean(var)` |
@@ -0,0 +1,16 @@
+<%= content_for :head do %>
+ <%= render partial: 'course_summaries_table', formats: [:'js.jsx'], handlers: [:erb] %>
+<% end %>
+
+<div class='title_bar'>
+ <h1>
+ <%= t('course_summaries.title') %>
+ </h1>
+ <div class='heading_buttons'>
+ <%= link_to t('marking_schemes.title'), marking_sc... | [No CFG could be retrieved] | No Summary Found. | Use `wrapper` instead of `wrapLeft`. |
@@ -156,6 +156,10 @@ func (p *TemplatePlugin) HandleEndpoints(eventType watch.EventType, endpoints *k
if commit {
p.Router.Commit()
}
+ case watch.Deleted:
+ glog.V(4).Infof("Deleting endpoints for %s", key)
+ p.Router.DeleteEndpoints(key)
+ p.Router.Commit()
}
return nil
| [HandleEndpoints->[Commit,Infof,FindServiceUnit,V,AddEndpoints,CreateServiceUnit],SetLastSyncProcessed->[SetSkipCommit],HandleNamespaces->[FilterNamespaces,Commit],HandleRoute->[AddRoute,Commit,Infof,RemoveRoute,V,FindServiceUnit,CreateServiceUnit],Templates,Itoa,Sprintf,Sum,ParseFiles,New,Name,Funcs,Base,Getenv] | HandleEndpoints handles the given endpoints. | Is there a specific reason for handing the delete event? Endpoints is like a "chunk" of entries and so the modified event contains an empty set of endpoints (similar to the delete step) and we do process that above. We would be doing the same work twice. |
@@ -67,7 +67,7 @@ func TestDeleteExpiredKeys(t *testing.T) {
// Test with a 6 day gap, but no expiry
keyMap = keyExpiryMap{
- 0: now - keybase1.Time(time.Hour*24*6),
+ 0: now - keybase1.Time(60*60*24*6),
1: now,
}
expired = getExpiredGenerations(keyMap, now)
| [Time,Unix,Equal,Sync,Background,SetupTest,Now,UnixSeconds,EkGeneration,NoError,CreateAndSignupFakeUser,GetPerUserKeyring,TimeFromSeconds] | Test with a single key that is stale but not expired. | Ditto. Here we should be able to use the conversion function, `TimeFromSeconds`. Note that all that function does is multiple by 1000. |
@@ -116,7 +116,7 @@ def _should_cache(
has determined a wheel needs to be built.
"""
if not should_build_for_install_command(
- req, check_binary_allowed=check_binary_allowed
+ req, check_binary_allowed=_always_true
):
# never cache if pip install would not have built
... | [should_build_for_wheel_command->[_should_build],_should_cache->[should_build_for_install_command,_contains_egg_info],_get_cache_dir->[_should_cache],build->[_build_one,_get_cache_dir],should_build_for_install_command->[_should_build]] | Checks if a built InstallRequirement can be stored in the persistent wheel cache assuming the wheel cache. | Side note: this test actually boils down to not caching wheels built from editable requirements. |
@@ -559,7 +559,7 @@ class PublishReportMixin(object):
r = PublishReport(True, summary, details)
return r
- def build_failure_report(self, summary, details):
+ def build_failure_report(self, summary, details, is_canceled=False):
"""
Creates the PublishReport instance that need... | [RepoScratchpadReadMixin->[get_repo_scratchpad->[get_repo_scratchpad]],RepoGroupDistributorScratchPadMixin->[get_scratchpad->[DistributorConduitException],set_scratchpad->[DistributorConduitException]],do_get_repo_units->[get_units],ImporterScratchPadMixin->[get_scratchpad->[ImporterConduitException],set_scratchpad->[I... | Build a report that indicates that the publish operation has successfully completed and that the publish operation has. | IIRC, and I could be wrong, the Importer base implementation for cancel stores an is_cancelled flag in the importer instance. Rather than putting it on the plugin writer to properly set this, what about if we look at that flag in the manager? We still have the importer instance floating around at the time it's used. Th... |
@@ -14,8 +14,15 @@ class TenantConfigContext {
*/
final OidcTenantConfig oidcConfig;
+ final boolean ready;
+
public TenantConfigContext(OidcProvider client, OidcTenantConfig config) {
+ this(client, config, true);
+ }
+
+ public TenantConfigContext(OidcProvider client, OidcTenantConfi... | [No CFG could be retrieved] | TenantConfigContext constructor. | Where is this 'ready' used? |
@@ -3365,17 +3365,6 @@ function api_ff_ids($type,$qtype)
$user_info = api_get_user($a);
- if ($qtype == 'friends') {
- $sql_extra = sprintf(" AND ( `rel` = %d OR `rel` = %d ) ", intval(CONTACT_IS_SHARING), intval(CONTACT_IS_FRIEND));
- }
- if ($qtype == 'followers') {
- $sql_extra = sprintf(" AND ( `rel` = %d O... | [api_oauth_access_token->[fetch_access_token,getMessage],post_photo_item->[get_hostname],api_oauth_request_token->[fetch_request_token,getMessage],api_friendica_notification->[getAll],api_error->[getMessage],api_friendica_notification_seen->[getByID,setSeen],api_statusnet_config->[get_hostname],api_saved_searches_list-... | Get list of ids of users who have access to this user. | Why did you remove this code? |
@@ -18,13 +18,6 @@
<% end %>
<meta name="environment" content="<%= Rails.env %>">
<%= render "layouts/styles" %>
- <style>
- .home {
- position: relative;
- margin: auto;
- max-width: 1250px;
- }
- </style>
<% unless user_signed_in? %>
... | [No CFG could be retrieved] | A page - level meta tag that shows the payment pointer of the user s page. Missing icons are included in the logo. | This is an old hack we can remove. (If I'm adding a bit of a hack to fix this, best to balance the universe and remove one too) |
@@ -6,12 +6,9 @@ module IdvSession
end
def confirm_idv_attempts_allowed
- if idv_attempter.exceeded?
- analytics.track_event(Analytics::IDV_MAX_ATTEMPTS_EXCEEDED, request_path: request.path)
- redirect_to failure_url(:fail)
- elsif idv_attempter.reset_attempts?
- idv_attempter.reset
- en... | [idv_attempter->[new],confirm_idv_needed->[present?,redirect_to],confirm_idv_session_started->[redirect_to,blank?],confirm_idv_vendor_session_started->[redirect_to,proofing_started?],idv_session->[new],confirm_idv_attempts_allowed->[redirect_to,path,reset,track_event,failure_url,reset_attempts?,exceeded?],extend] | Checks if idv attempts are allowed and redirects to the activated page if it is. | So, I don't know that we need to change it here in the legacy flow. This code was working. It was only broken in the docauth flow. |
@@ -108,6 +108,7 @@ public class GraphiteEmitterConfig
result = 31 * result + getMaxQueueSize().hashCode();
result = 31 * result + getDruidToGraphiteEventConverter().hashCode();
result = 31 * result + (getAlertEmitters() != null ? getAlertEmitters().hashCode() : 0);
+ result = 31 * result + (getReques... | [GraphiteEmitterConfig->[hashCode->[hashCode],equals->[equals]]] | This method calculates the hash code of this object. | Could use `Objects.hash()` in this method |
@@ -333,10 +333,15 @@ type PropertySpec struct {
// Description is the description of the property, if any.
Description string `json:"description,omitempty"`
+ // Const is the constant value for the property, if any. The type of the value must be assignable to the type of
+ // the property.
+ Const interface{} `j... | [bindObjectType->[bindProperties],bindProperties->[bindType],String->[String],bindType->[String,bindType],bindObjectType,bindProperties,String] | Language contains language - specific data about the type reference. | We can remove this. |
@@ -1607,7 +1607,6 @@ class BaseRaw(ProjMixin, ContainsMixin, UpdateChannelsMixin,
if self.annotations is not None:
annotations = self.annotations
- annotations.onset -= tmin
BaseRaw.annotations.fset(self, annotations, emit_warning=False)
return self
| [_start_writing_raw->[append],ToDataFrameMixin->[to_data_frame->[_get_check_picks]],_check_update_montage->[append],BaseRaw->[notch_filter->[notch_filter],apply_function->[_check_fun],_preload_data->[_read_segment],crop->[_update_times],__setitem__->[_parse_get_set_params],resample->[_update_times,resample],append->[_r... | Crop the raw data file to go between specific times. Compute the last n - th element of the sequence that is not in the sequence. | since annotations times are all in seconds wrt to absolute time this is no need subtract anything when cropping. |
@@ -55,6 +55,16 @@ const FUNCTION_WHITELIST = (function() {
String.prototype.toLowerCase,
String.prototype.toUpperCase,
],
+ '[object Math]':
+ [
+ Math.abs,
+ Math.ceil,
+ Math.floor,
+ Math.random,
+ Math.round,
+ Math.max,
+ Math.min,
... | [No CFG could be retrieved] | Provides a BindExpression that evaluates a single object type. Construct a constructor for the object. | add `sign` (we polyfill it already so support is there) |
@@ -52,6 +52,16 @@ class AmpAnim extends AMP.BaseElement {
this.srcset_ = parseSrcset(this.element.getAttribute('srcset') ||
this.element.getAttribute('src'));
+ /** @private */
+ typeSupported(typeval, type) {
+ if (!typeval in this.supported_types) {
+ // we haven't seen this mimetyp... | [No CFG could be retrieved] | Package that contains the functionality of AMPAnim. private private method for updating image src attribute in the placeholder. | Please cache the video element |
@@ -104,11 +104,11 @@ public abstract class ItemGroupMixIn {
// Try to retain the identity of an existing child object if we can.
V item = (V) parent.getItem(subdir.getName());
if (item == null) {
- XmlFile xmlFile = Items.getConfigFile( subdir );
+ ... | [ItemGroupMixIn->[copy->[add],createProjectFromXML->[copy,add],createProject->[add]]] | Load all child items from the given directory. | It's better to make the logger a static variable just to follow the common pattern |
@@ -5,6 +5,7 @@
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
+ * Wil Moore III <wil.moore@wilmoore.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
| [MemoryPackageTest->[testMemoryPackage->[assertEquals,getVersion,getName]]] | Checks if a given package has a specific version. | you should not add your name in the license header but in the `@author` annotation |
@@ -164,6 +164,7 @@ func startServer() *apiserver.Server {
}
// FIXME: assignment copies lock value to tlsConfig: crypto/tls.Config contains sync.Once contains sync.Mutex
+ // #nosec
tlsConfig := func(c *tls.Config) *tls.Config {
return &tls.Config{
Certificates: c.Certificates,
| [Trap,NewCheckpointBackend,NewImageBackend,Certificate,Close,NewVolumeBackend,Subjects,Info,Exit,Routes,NewTextFormatter,NewPortlayerEventMonitor,Stop,UseMiddleware,NewRouter,Init,New,NewNetworkBackend,Start,IsNil,NewSystemBackend,InitRouter,Wait,Bool,Debugf,NewContainerBackend,PrintDefaults,SetFormatter,Accept,GuestIn... | loadCAPool loads a certificate authority pool and starts a server TLS enabled for the server. | What is that FIXME and why we are not fixing it? |
@@ -21,11 +21,15 @@ class LinkAgencyIdentities
private
+ def log(msg)
+ Rails.logger.info(msg)
+ end
+
def sps_to_link
sps = []
service_providers.each do |issuer, config|
priority, agency_id = agency_info(config)
- sps << AGENCY_INFO.new(issuer, priority, agency_id) if priority && a... | [LinkAgencyIdentities->[agency_info->[to_i],link->[sort!,agency_id,issuer,link_service_provider,each,priority],link_service_provider->[format,execute],service_providers->[fetch,env,result],sps_to_link->[each,agency_info,new],report->[execute],new]] | Returns an array of all the sps to link to. | This was added to not track service providers without an agency id (which would show up in agency identities as agency 0 ie unspecified agency) |
@@ -78,7 +78,10 @@ def handler403(request):
@non_atomic_requests
def handler404(request):
- if request.path_info.startswith('/api/'):
+ if request.path_info.startswith('/api/v3/'):
+ return JsonResponse(
+ {'detail': unicode(NotFound.default_detail)}, status=404)
+ elif request.path_info.... | [handler403->[handler403],handler500->[handler500],handler404->[handler404]] | 404 action for a 404 page. | If we ever bump the API version I bet we'll forget about this. Could you not inspect the `Accept` request header instead to see if it's `json`? |
@@ -144,6 +144,10 @@ GlobOptBlockData::ReuseBlockData(GlobOptBlockData *fromData)
this->changedSyms = fromData->changedSyms;
this->capturedValues = fromData->capturedValues;
+ if (this->capturedValues)
+ {
+ this->capturedValues->IncrementRefCount();
+ }
this->OnDataReused(fromData);
... | [No CFG could be retrieved] | This function is called by the constructor of the class. It is called by the constructor of Initializes a new object from the given data. | >IncrementRefCount [](start = 30, length = 17) We won't call delete on the previous block, so I don't think you should inc here. |
@@ -187,8 +187,10 @@ def _read_events_fif(fid, tree):
event_list = event_list.reshape(len(event_list) // 3, 3)
return event_list, mappings
-
-def read_events(filename, include=None, exclude=None, mask=0):
+@deprecated("The default setting for the argument 'mask_type' will change "
+ "from None to... | [_find_events->[_find_stim_steps],read_events->[pick_events,_read_events_fif],find_stim_steps->[_find_stim_steps],find_events->[_find_events]] | Reads events from a file in a FITS tree. - The base event number for the event. Returns a list of events with a single key in the order of the first row. | This is not how we deprecate a parameter. The warning should only be emitted if `mask_type=None`, what you have here will _always_ give a warning, even if a user explicitly does `mask_type=whatever`. See how we do it elsewhere, `git grep DeprecationWarning`. |
@@ -67,7 +67,7 @@ namespace MonoGame.Framework
static private ReaderWriterLockSlim _allWindowsReaderWriterLockSlim = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion);
static private List<WinFormsGameWindow> _allWindows = new List<WinFormsGameWindow>();
- private readonly WinFormsGame... | [WinFormsGameWindow->[UpdateWindows->[UpdateMouseState],Dispose->[Dispose,UnregisterFromAllWindows],OnClientSizeChanged->[OnClientSizeChanged]]] | License for a WinFormsGameWindow region ResourceConfigGetter methods. | Cannot be readonly as we clear it in Dispose. |
@@ -23,7 +23,7 @@ define([
*
* @exports destroyObject
*
- * @param {Object} object The object to destroy.
+ * @param {*} object The object to destroy.
* @param {String} [message] The message to include in the exception that is thrown if
* a destroyed objec... | [No CFG could be retrieved] | Creates a function that destroys an object. Returns a reference to the current page. | The wording implies this should still be an `Object`, I don't think you can destroy primitive types. |
@@ -31,12 +31,16 @@ func GetImages(w http.ResponseWriter, r *http.Request) ([]*image.Image, error) {
if _, found := mux.Vars(r)["digests"]; found && query.Digests {
UnSupportedParameter("digests")
}
+
if len(query.Filters) > 0 {
for k, v := range query.Filters {
for _, val := range v {
filters = ap... | [Context,Value,GetImagesWithFilters,Sprintf,Decode,Vars,ImageRuntime,Query] | GetImagesWithFilters - get images with no filters. | looks like a good fix, but not really related to the slash fix right? I'd prefer a second PR for historicla purposes, but shrug. |
@@ -325,3 +325,18 @@ class TestPipSession:
)
assert not hasattr(session.adapters["https://example.com/"], "cache")
+
+
+def test_parse_credentials():
+ auth = MultiDomainBasicAuth()
+ assert auth.parse_credentials(u"foo:bar@example.com") == (u'foo', u'bar')
+ assert auth.parse_credentials(u... | [test_unpack_http_url_bad_downloaded_checksum->[MockResponse,read,_write_file],MockResponse->[__init__->[FakeStream]],Test_unpack_file_url->[test_unpack_file_url_download_already_exists->[prep],test_unpack_file_url_download_bad_hash->[prep],test_unpack_file_url_bad_hash->[prep],test_unpack_file_url_no_download->[prep],... | Test if insecure host cache is not enabled. | In python 3, strings are natively unicode anyway; in python 2, I don't think this should be unicode here (either expecting to receive it, nor outputting). What you've output in the new function is unicode but that's because of the utf-8 jig I'm not sure about. |
@@ -218,6 +218,12 @@ func (c *CLI) Template(t string) *CLI {
return c
}
+// InputString adds expected input to the command
+func (c *CLI) InputString(input string) *CLI {
+ c.stdin.WriteString(input)
+ return c
+}
+
// Args sets the additional arguments for the OpenShift CLI command
func (c *CLI) Args(args ...st... | [Execute->[Output],Run->[KubeFramework,SetOutput,Namespace],SetOutput->[SetOutput],OutputToFile->[Output,Namespace],SetupProject->[ChangeUser,SetNamespace,Username],Output->[printCmd]] | Template is the command line interface that will render the result of the command. | Thanks for this :-) We can get rid of creating temporary files when processing template. |
@@ -201,12 +201,12 @@ public class NiFiAtlasClient {
nifiFlow.setUrl(toStr(attributes.get(ATTR_URL)));
nifiFlow.setDescription(toStr(attributes.get(ATTR_DESCRIPTION)));
- nifiFlow.getQueues().putAll(toQualifiedNameIds(toAtlasObjectIds(nifiFlowEntity.getAttribute(ATTR_QUEUES))));
- nifi... | [NiFiAtlasClient->[registerFlowPathEntities->[getGuidAssignments,getComponentIdFromQualifiedName,containsKey,updateEntities,setExEntity,setGuid,toSet,getAttribute,debug,getChangedFlowPathEntities,getGuid,AtlasEntitiesWithExtInfo,containsChange,createEntities,toStr,get,collect,forEach,keySet],registerNiFiFlow->[setAttri... | Fetch NiFiFlow with the specified name and cluster. This method is called to populate FlowPath with the flowPathEntity. | Feels strange to leave the handling of the flowpaths as it is. We retrieve only the `ACTIVE` ones, but we discard their `referredEntities`. So when it comes to their inputs/ouputs, we fall back to the old logic and retrieve them all and filter out the `DELETED` ones afterwards. Even more, to me it seems if we actually ... |
@@ -32,8 +32,11 @@ class Solution(object):
def GetInputParameters(self):
parameters_file_name = self.GetParametersFileName()
- parameters_file = open(parameters_file_name, 'r')
- return Parameters(parameters_file.read())
+ #parameters_file = open(parameters_file_name, 'r')
+ ... | [Solution->[RunAnalytics->[MakeAnalyticsMeasurements],SetRotationalScheme->[SelectRotationalScheme],SetInitialNodalValues->[SetInitialNodalValues],CleanUpOperations->[__SafeDeleteModelParts],SolverInitialize->[Initialize],_UpdateTimeParameters->[InitializeTimeStep,UpdateTimeInModelParts],SelectRotationalScheme->[Select... | Retrieves the input parameters for the DSM. | this seems to be a duplicate, maybe you can refactor |
@@ -138,6 +138,18 @@ public class ListProperty extends AbstractProperty implements List<Property> {
}
}
+ @Override
+ public void set(String name, Property property) throws PropertyException {
+ try {
+ // don't implement set(int, Property) for now as we don't have usage
+ ... | [ListProperty->[getValueForWrite->[getValueForWrite,getDefaultValue],applyListDiff->[setValue,get,remove,clear,addValue],get->[get],remove->[remove],isEmpty->[isEmpty],toArray->[toArray],accept->[accept,isContainer],getDefaultValue->[getDefaultValue],listIterator->[listIterator],convertTo->[convertTo],init->[init],setV... | Get the value of a . | `can not` -> `cannot` Maybe `Chid name` instead of `Property name`? |
@@ -155,7 +155,7 @@ public class CliUtils {
}
return true;
} catch (Exception e) {
- LOGGER.error(ExceptionUtil.stackTraceToString(e));
+ LOGGER.error("createFile failed, path:" + path, e);
return false;
}
}
| [CliUtils->[getLocalServerAddress->[format],getAvroSchemaIfAvroTopic->[equalsIgnoreCase,visitRegisterTopic,of,unquote,get,containsKey,empty,getAvroSchema,toString,AstBuilder,KsqlException],readQueryFile->[getMessage,append,close,readLine,lineSeparator,BufferedReader,toString,StringBuilder,FileReader,KsqlException],pars... | create file if not exists. | is this an error or should it be warn? |
@@ -207,6 +207,7 @@ inline int32_t drc_inv_fixed(int32_t x, int precision_x, int precision_y)
const int32_t A1 = Q_CONVERT_FLOAT(-21.25031280517578125f, qc);
const int32_t A0 = Q_CONVERT_FLOAT(7.152250766754150390625f, qc);
int e;
+ int precision_inv;
int sqrt2_extracted = 0;
int32_t x2, x4; /* Q2.30 */
int... | [inline->[Q_SHIFT_RND,Q_SHIFT_LEFT,rexp_fixed,Q_CONVERT_FLOAT,q_mult,norm_int32],int32_t->[SGN,Q_SHIFT_RND,log10_fixed,Q_SHIFT_LEFT,drc_log_fixed,rexp_fixed,exp_fixed,Q_CONVERT_FLOAT,sin_fixed,q_multq,ABS,q_mult]] | - - - - - - - - - - - - i a u D r c Q_mult - Mult inv for all possible errors in the system. | please change int to int32_t |
@@ -429,6 +429,8 @@ ds_mgmt_drpc_pool_evict(Drpc__Call *drpc_req, Drpc__Response *drpc_resp)
uuid_t uuid;
uuid_t *handles;
int n_handles;
+ char *machine;
+ uint32_t count = 0;
d_rank_list_t *svc_ranks = NULL;
uint8_t *body;
size_t len;
| [No CFG could be retrieved] | Management pool destroy Reads the request to evict pool connections. | (style) please, no space before tabs |
@@ -3,12 +3,14 @@
import os
import json
+import shutil
from .constants import NNICTL_HOME_DIR
+from .command_utils import print_error
class Config:
'''a util class to load and save config'''
- def __init__(self, file_path):
- config_path = os.path.join(NNICTL_HOME_DIR, str(file_path))
+ def __... | [Experiments->[remove_experiment->[write_file],update_experiment->[write_file],add_experiment->[write_file],__init__->[read_file]]] | Initialize the object with the configuration file. | better to remove spaces around `=` for default values. |
@@ -69,7 +69,7 @@ func newCancelCmd() *cobra.Command {
msg := fmt.Sprintf("%sThe currently running update for '%s' has been canceled!%s", colors.SpecAttention, s.Name(),
colors.Reset)
- fmt.Println(colors.ColorizeText(msg))
+ fmt.Println(opts.Color.Colorize(msg))
return nil
}),
| [Backend,Println,ColorizeText,Sprintf,BoolVarP,New,RunFunc,Name,CancelCurrentUpdate,String,MaximumNArgs,PersistentFlags] | Cancel the current update if it exists. | no one should call colors.ColorizeText now. Only the very lowest level (that is calling into 'lorely') now does this. |
@@ -84,7 +84,7 @@ class ShippingZone(models.Model):
def countries_display(self):
countries = self.countries
if self.default:
- from ..dashboard.shipping.forms import get_available_countries
+ from .utils import get_available_countries
countries = get_available... | [ShippingMethodQueryset->[applicable_shipping_methods_for_instance->[applicable_shipping_methods],applicable_shipping_methods->[_applicable_price_based_methods,_applicable_weight_based_methods]],ShippingMethod->[__repr__->[_get_weight_type_display],get_type_display->[_get_weight_type_display,_get_price_type_display]]] | Returns a string describing the number of countries available in the system. | Are you sure that circular imports still exist? Maybe we could move this import at the beginning of the file? |
@@ -931,6 +931,8 @@ func NewContext() {
sec = Cfg.Section("U2F")
U2F.TrustedFacets, _ = shellquote.Split(sec.Key("TRUSTED_FACETS").MustString(strings.TrimRight(AppURL, "/")))
U2F.AppID = sec.Key("APP_ID").MustString(strings.TrimRight(AppURL, "/"))
+
+ zip.Verbose = false
}
func loadInternalToken(sec *ini.Sect... | [IsFile,LastIndex,Dir,SetValue,Warn,KeysHash,TrimRight,Count,RequestURI,MustBool,Close,TempDir,MustInt,LookupEnv,Strings,MapTo,Error,Clean,Append,Format,SetFallbackHost,Compare,Empty,MustInt64,New,NewJwtSecret,SaveTo,Trace,LookPath,SplitN,IsAbs,Key,NewInternalToken,Create,Join,NewLogger,Section,Contains,Name,ReadAll,To... | Mirror. MinInterval is too low. loadInternalToken loads the internal token from the given section. | Do we still need this? I'm not sure we use cae/zip elsewhere. |
@@ -259,7 +259,7 @@ def update_excludes(args):
def adjust_patterns(paths, excludes):
if paths:
- return (excludes or []) + [IncludePattern(path) for path in paths] + [ExcludePattern('*')]
+ return (excludes or []) + [PathPrefixPattern(path) for path in paths] + [FnmatchPattern('*')]
else:
... | [format_file_mode->[x],ProgressIndicatorPercent->[show->[progress]],update_excludes->[load_excludes],Location->[to_key_filename->[get_keys_dir],parse->[match],_parse->[match]],unhexlify->[unhexlify],ExcludePattern->[_match->[match]],Statistics->[show_progress->[get_terminal_size]],sizeof_fmt_iec->[sizeof_fmt],location_... | Adjust patterns to include and exclude patterns. | due to the renaming, the code is now harder to understand. one has to know which matching mechanism are used for incuding / for excluding. also: why can't we have any mechanism as well for including as for excluding? |
@@ -26,6 +26,18 @@ namespace System.Runtime.Intrinsics
namespace System.Runtime.Intrinsics.X86
{
+ internal abstract class X86Base
+ {
+ public abstract class X64
+ {
+ public const bool IsSupported = false;
+ public static ulong BitScanForward(ulong value) => throw new Pla... | [No CFG could be retrieved] | Creates a new object that can be used to access the vector of a single type. This method is not supported on all platforms. | This should probably be `internal` to match the `X86Base`... |
@@ -71,6 +71,12 @@ def test_read_write_info():
"""
info = fiff.read_info(raw_fname)
temp_file = op.join(tempdir, 'info.fif')
+ # check for bug `#1198`
+ info['dev_head_t']['trans'] = np.eye(4)
+ t1 = info['dev_head_t']['trans']
fiff.write_info(temp_file, info)
info2 = fiff.read_info(t... | [test_fiducials_io->[assert_array_equal,assert_equal,read_fiducials,write_fiducials,assert_raises,join,zip],test_read_write_info->[read_info,len,assert_true,join,write_info],test_info->[average,Raw,read_events,int,split,all,keys,assert_equal,assert_true,len,isinstance,Epochs,Info],dirname,_TempDir,join] | Test IO of info. | this test fails on master. |
@@ -483,6 +483,7 @@ class IntegrationFixture {
if (env.iframe.parentNode) {
env.iframe.parentNode.removeChild(env.iframe);
}
+ return RequestBank.tearDown();
}
}
| [RealWinFixture->[setup->[installAmpAdStylesPromise,interceptEventListeners,AMP_TEST_IFRAME,attachFetchMock,onerror,onload,name,installRuntimeStylesPromise,testLocation,location,srcdoc,body,document,win,iframe,fakeRegisterElement,defineProperty,allowExternalResources,mockFetch,installCustomElements,resolve,ampCss,doNot... | Teardown method for the JSP environment. | To make sure `RequestBank` is only used with integrationFixture? I don't see an issue with using it in RealWinFixture? However I don't know if it is too expensive to do a xhr request for every test. |
@@ -676,11 +676,14 @@ class FileClient(StorageAccountHostsMixin):
:dedent: 12
:caption: Download a file.
"""
+ validate_content = kwargs.pop('validate_content', False)
+ timeout = kwargs.pop('timeout', None)
if self.require_encryption or (self.key_encryp... | [FileClient->[upload_range_from_url->[_upload_range_from_url_options,upload_range_from_url],upload_file->[_upload_file_helper],resize_file->[set_http_headers],abort_copy->[abort_copy],clear_range->[upload_range],upload_range->[upload_range],set_http_headers->[set_http_headers]]] | Downloads a file to a stream with automatic chunking. Deserialize a from the file. | can we rename this length to offset_end or range_end? |
@@ -66,9 +66,7 @@ class TestCrBeamAdjointElement(KratosUnittest.TestCase):
apply_material_properties(self.model_part,dim)
prop = self.model_part.GetProperties()[0]
- self.model_part.CreateNewElement("CrLinearBeamElement3D2N", 1, [1, 2], prop)
- StructuralMechanicsApplication.ReplaceEle... | [TestCrBeamAdjointElement->[_create_property_perturbed_elements->[add_variables,apply_material_properties],setUp->[add_variables,apply_material_properties],test_CalculateSensitivityMatrix_Property->[zero_vector,_create_property_perturbed_elements,_assert_matrix_almost_equal,get_displacement_vector],test_CalculateSensit... | This method sets up the model part and the variables. | @MFusseder now the adjoint elements can directly be created. |
@@ -0,0 +1 @@
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
| [No CFG could be retrieved] | No Summary Found. | Is this file here to make editable installs work (for python 2)? It is not included in the actual package (wheel/sdist), correct? |
@@ -81,6 +81,7 @@ func GetBootstrapSecurityContextConstraints(sccNameToAdditionalGroups map[string
SupplementalGroups: kapi.SupplementalGroupsStrategyOptions{
Type: kapi.SupplementalGroupsStrategyRunAsAny,
},
+ SeccompProfiles: []string{"*"},
},
// SecurityContextConstraintNonRoot does not allow ho... | [MakeUsername] | constraints is a set of security context constraints that allow access to a specific object. Returns an object that represents the strategy that should be run as a root. | Why are we not making this restrictive? Do we have a value that is actually secure that we can use here? |
@@ -71,7 +71,7 @@ public class WorkerHolder
{
};
- private static final StatusResponseHandler RESPONSE_HANDLER = new StatusResponseHandler(StandardCharsets.UTF_8);
+ private static final StatusResponseHandler RESPONSE_HANDLER = StatusResponseHandler.getInstance();
private final Worker worker;
private ... | [WorkerHolder->[start->[start],toImmutable->[getAvailabilityGroups,getCurrCapacityUsed],stop->[stop]]] | Creates a worker holder which manages the status of the task. if worker has an return it. | `StatusResponseHandler.getInstance()` can be used directly. |
@@ -478,8 +478,8 @@ func (node *Node) AddNewBlock(newBlock *types.Block) error {
utils.Logger().Error().
Err(err).
Uint64("blockNum", newBlock.NumberU64()).
- Bytes("parentHash", newBlock.Header().ParentHash.Bytes()[:]).
- Bytes("hash", newBlock.Header().Hash().Bytes()[:]).
+ Str("parentHash", newBlock... | [transactionMessageHandler->[TransactionMessageType,Msg,Error,addPendingTransactions,NewReader,Decode,Err,Logger],processStakingMessage->[Msg,addPendingTransactions,Error,GetStaking,DecodeBytes,Unmarshal,Info,Err,Logger],VerifyNewBlock->[ShardID,Hash,Transactions,New,ValidateNewBlock,Blockchain,WithCause],ReceiveGlobal... | AddNewBlock adds a new block to the blockchain. | As a side node I think `Bytes()[:]` its the same as `Bytes()` since `Bytes()` implicitly uses `len()` |
@@ -87,7 +87,10 @@ class RowCoder(FastCoder):
@staticmethod
def from_type_hint(type_hint, registry):
if isinstance(type_hint, row_type.RowTypeConstraint):
- schema = named_fields_to_schema(type_hint._fields)
+ try:
+ schema = named_fields_to_schema(type_hint._fields)
+ except ValueError... | [RowCoder->[is_deterministic->[is_deterministic],from_payload->[RowCoder],coder_from_type->[coder_from_type,RowCoder],from_runner_api_parameter->[RowCoder],from_type_hint->[RowCoder]],RowCoderImpl->[decode_from_stream->[decode_from_stream],encode_to_stream->[encode_to_stream]]] | Create a row coder from a type hint. | Is this a fallback for when a Row uses types that we don't support in Python schemas? I worry about this since it makes it tricky for a user to tell when a PCollection can be used in an ExternalTransform that uses rows. Are there some specific types that we need to add coverage for? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.