patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -9,6 +9,12 @@ module Engine
"#{tile.id}-#{index}"
end
+ def is?(other)
+ (tile&.id == other&.tile&.id) &&
+ id == other.id &&
+ (self == other)
+ end
+
def hex
@tile&.hex
end
| [Base->[hex->[hex],inspect->[name],id->[id],class,num,edge?,attr_accessor]] | Returns the id - node - sequence sequence for this node if it is a sequence of nodes. | why do you need this can't you just do part == part? |
@@ -110,9 +110,10 @@ public class JdbcExtractionNamespace implements ExtractionNamespace
public String toString()
{
return StringUtils.format(
- "JdbcExtractionNamespace = { connectorConfig = { %s }, table = %s, keyColumn = %s, valueColumn = %s, tsColumn = %s, pollPeriod = %s}",
+ "JdbcExtracti... | [JdbcExtractionNamespace->[hashCode->[hashCode],toString->[toString],equals->[equals]]] | String representation of . | Please re-generate toString using IntelliJ |
@@ -365,6 +365,9 @@ namespace System.Windows.Forms
value = string.Empty;
}
+ ToolTip.SetToolTip(this, value);
+ SetToolTipNative(ToolTip);
+
if (value == _toolTipText)
{
return;
| [TabPage->[AssignParent->[AssignParent],OnEnter->[OnEnter],TabPageControlCollection->[Add->[Add]],OnLeave->[OnLeave],OnPaintBackground->[OnPaintBackground],SetBoundsCore->[SetBoundsCore]]] | A base control that is a child of a tab control. This method assigns the parent of the given control to the tab page that it s parented. | Guard this with an `IsHandleCreated` |
@@ -228,6 +228,8 @@ class Constants
ios: 'https://apps.apple.com/us/app/2fa-authenticator-2fas/id1217793794'
},
}
+
+ SCINOTE_FLUICS_URL = 'https://www.scinote.net/fluics/'
TWO_FACTOR_RECOVERY_CODE_COUNT = 6
TWO_FACTOR_RECOVERY_CODE_LENGTH = 12
| [Constants->[megabyte,freeze,times]] | External URLs for missing nagios Construct a configuration object for the ProtocolIO API. | This could just be hardcoded in the template, probably no need for constant. Or potentially in the translation file. |
@@ -63,7 +63,7 @@
{
print '<td width="15%" class="fieldrequired">'.$langs->trans("WarehouseSource").'</td>';
print '<td width="15%">';
- print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid",'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot','int'):'ifone')),'id_entrepot','',1);
+... | [fetch,hasbatch,trans,selectWarehouses,select_produits,select_date,load] | Print a hidden input that can be used to transfer a single product or a warehouse. Print the number of warehouses. | id_entrepot moved into id_entrepot_source but we still have GETPOST('id_entrepot') ? Can you describe step to reproduce bug ? I think it was already fixed differently into 3.9 |
@@ -36,12 +36,8 @@ public class FtpWriteTypeTestCase extends FtpConnectorTestCase
{"Ftp - String", new ClassicFtpTestHarness(), HELLO_WORLD, HELLO_WORLD},
{"Ftp - native byte", new ClassicFtpTestHarness(), "A".getBytes()[0], "A"},
{"Ftp - Object byte", new ClassicFtpTe... | [FtpWriteTypeTestCase->[TestOutputHandler->[write->[write]],doSetUp->[doSetUp]]] | Returns a collection of data objects that can be read from the file system. There are two cases where there are no files in the file system. | why are these removed? |
@@ -86,6 +86,14 @@ public class AutoConfigurationBuilder extends AbstractResourceConfigurationBuild
ConfigResource[] constructorArg = new ConfigResource[configs.size()];
System.arraycopy(configs.toArray(), 0, constructorArg, 0, configs.size());
ConfigurationBuilder cb ... | [AutoConfigurationBuilder->[doConfigure->[autoConfigure],autoConfigure->[getValue,size,toArray,arraycopy,openStream,getFile,put,configurationBuilderNoMatching,getKey,isClassOnPath,load,createConfigResourcesString,entrySet,substringAfterLast,get,Properties,configure,add,instanciateClass,getClass,ConfigurationException]]... | Auto configure. | Can you move the domain injection to the place where DomainMuleContextAwareConfigurationBuilder instance is created? |
@@ -282,9 +282,12 @@ public class ExceptionUtils extends org.apache.commons.lang.exception.ExceptionU
public static MessagingException updateMessagingExceptionWithError(MessagingException exception, Processor failing,
FlowConstruct flowConstruct... | [ExceptionUtils->[getErrorFromFailingProcessor->[getErrorTypeFromFailingProcessor],updateMessagingExceptionWithError->[putContext,createErrorEvent],extractOfType->[containsType]]] | Update a messaging exception with a specific error context. | can this behaviour be unit tested outside of interception? |
@@ -24,6 +24,8 @@ import org.apache.avro.mapreduce.AvroJob;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Mapper;
+import gobblin.compaction.mapreduce.avro.AvroKeyDedupReducer.EVENT_COUNTER;
+
/**
* Mapper class for compaction MR job for Avro data.
| [AvroKeyMapper->[populateComparableKeyRecord->[populateComparableKeyRecord]]] | Class to map a single key - value pair into an object. Map output key schema. | I am not sure why this is showing up in the diff. Can you make sure that your branch is up-to-date with the master? |
@@ -44,8 +44,13 @@ module Idv
'encryption_key', 'front_image_iv', 'back_image_iv', 'selfie_image_iv', 'front_image_url',
'back_image_url', 'selfie_image_url'
).to_h
+ applicant_pii = flow_session[:pii_from_doc]
+ applicant = {
+ applicant_pii: applicant_pii,
+ ... | [VerifyDocumentAction->[image_metadata->[deep_symbolize_keys],enqueue_job->[requested_at,to_h,proof_document,browser_attributes,create_document_capture_session,now,create_doc_auth_session,hybrid_flow_mobile?,liveness_checking_enabled?],image_params->[permit],form_submit->[status,new,render_json,success?,submit],form->[... | Enqueue a job missing key in the job history. | part of me thinks it would be nice to only do the UUID/prefix here instead of all the applicant PII because it gets persisted to the queue (even if temporarily) it would be nice to handle the minimum PII possible in the job |
@@ -83,7 +83,7 @@ func GetWatcher(base mb.BaseMetricSet, resource kubernetes.Resource, nodeScope b
return nil, nil
}
- client, err := kubernetes.GetKubernetesClient(config.KubeConfig)
+ client, err := kubernetes.GetKubernetesClient(config.KubeConfig, nil)
if err != nil {
return nil, err
}
| [Start->[Start,Lock,Unlock,Warn],Stop->[Stop,Lock,Unlock],Enrich->[DeepUpdate,RLock,Delete,GetValue,Clone,RUnlock,index],Value,Unlock,NewConfigFrom,GroupVersionKind,GetObjectMeta,NewServiceMetadataGenerator,ParseQuantity,Info,Set,GetKubernetesClient,NewPodMetadataGenerator,AddEventHandler,NewResourceMetadataGenerator,G... | GetWatcher returns a new instance of the kubernetes watcher with the given base metric set and resource NewResourceMetadataEnricher returns an enricher configured for the given metric set and resource. | Why we don't add the options here too? |
@@ -470,13 +470,16 @@ define([
// Add base color to fragment shader
if (defined(parameterValues.baseColorTexture)) {
- fragmentShader += ' vec4 baseColorWithAlpha = texture2D(u_baseColorTexture, ' + v_texcoord + ');\n';
+ fragmentShader += ' vec4 baseColorWithAlpha = SRGB... | [No CFG could be retrieved] | Shader for the missing color in the fragment shader. Add metallic - roughness to the base color. | This breaks glTF spec, and I don't think we have any need to do it in code here. The models can and should simply specify `baseColorFactor: [0, 0, 0, 1]` so that all engines know to turn this off. |
@@ -41,11 +41,6 @@ func (v *Validator) storage(ctx context.Context, input *data.Data, conf *config.
return
}
- // provide a default path if only a DS name is provided
- if imageDSpath.Path == "" {
- imageDSpath.Path = path.Join(input.DisplayName, "images")
- }
-
v.NoteIssue(err)
if ds != nil {
v.SetDatas... | [suggestDatastore->[DatastoreList,Infof,Begin,Sprintf,Name,End,Errorf,Info],DatastoreHelper->[DatastoreList,DatastoreOrDefault,Infof,Begin,Sprintf,suggestDatastore,New,Name,End,Parse,Errorf,ToURL,SplitN,Debugf],storage->[DatastoreHelper,Join,NoteIssue,Begin,End,SetDatastore,AddImageStore]] | storage is used to validate the input data. | So we used to do `path.Join( display name, "images" )`. After this change, is the path just "display name"? Because I would've expected line 46 to just be `imageDSpath.Path = input.DisplayName` |
@@ -2421,6 +2421,11 @@ class ExpressionChecker(ExpressionVisitor[Type]):
e.method_type = method_type
return result
+ def visit_assignment_expr(self, e: AssignmentExpr) -> Type:
+ value = self.accept(e.value)
+ self.chk.check_assignment(e.target, e.value)
+ return value
+
... | [ExpressionChecker->[visit_star_expr->[accept],analyze_ordinary_member_access->[analyze_ref_expr],check_overload_call->[check_call,infer_arg_types_in_empty_context],visit_await_expr->[accept],check_any_type_call->[infer_arg_types_in_empty_context],erased_signature_similarity->[check_argument_count,check_argument_types]... | Type check a list multiplication operation. | It seems to me this direct call will result in allowing assignments to final variables. |
@@ -111,11 +111,11 @@ public class VictoryTest {
moveDelegate.start();
String error = moveDelegate.move(libya.getUnits().getUnits(), gameData.getMap().getRoute(libya, angloEgypt));
// first step is legal
- assertEquals(null, error);
+ assertNull(error);
// second step isn't legal because we lo... | [VictoryTest->[testFuelCostAndFuelFlatCost->[changeOwner,assertTrue,create,addUnits,getQuantity,start,advanceToStep,getRoute,getUnits,end,performChange,setDelegateBridgeAndPlayer,assertEquals,startsWith,move],testNotEnoughMultipleResourcesToPurchase->[assertNotNull,purchase,advanceToStep,start,getProductionRule,subtrac... | Test if there is no blitz with stop through mountain. | The argument order should be reversed |
@@ -130,6 +130,13 @@ class ApolloAdapter {
titleKey: data.titleKey,
detailsKey: data.detailsKey
}
+ const optionalFields = ['titleKey', 'title', 'detailsKey', 'details']
+ optionalFields.forEach(field => {
+ if (data[field]) {
+ listingInfo[field] = data[... | [No CFG could be retrieved] | Creates a new object with basic campaign data. This function returns an object that represents a growth object. | nit: remove those 2 lines since titleKey and detailsKey get added below. |
@@ -104,7 +104,6 @@ public class RevisedTest {
any(),
any(),
any(),
- any(),
anyBoolean(),
any(),
any(),
| [RevisedTest->[testLoadUnloadAlliedTransport->[newDelegateBridge],testRocketsDontFireInConquered->[newDelegateBridge],testRetreatBug->[newDelegateBridge],testAaOwnership->[newDelegateBridge],testStratBombCasualties->[newDelegateBridge],testLoadUndo->[newDelegateBridge],testAttackDestroyerAndSubsAgainstSub->[newDelegate... | This method is called when a remote player wants to select casualties per channel. | This is where the test failure comes from. In line 90, the 11th argument is being cast to a `CasualtyList`, after this change the parameter is the 10th argument (when starting from 0, as usual). |
@@ -1035,14 +1035,10 @@ function photos_content(App $a)
if ($cmd === 'drop') {
$drop_url = $a->query_string;
- $extra_inputs = [
- ['name' => 'albumname', 'value' => $_POST['albumname']],
- ];
-
return Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [
'$method' => 'post',
... | [photos_content->[getItemsPerPage,renderFull,internalRedirect,getStart,match],photos_post->[isValid,getExt,getWidth,rotate,getHeight,scaleDown,orient,toString,internalRedirect]] | This function is used to retrieve the photos content of a user Checks if user can post or not upload form for photos upload upload photo page This function is used to retrieve the list of images that have been identified by a given album This function is used to display a confirmation message to the user. | What does now happen on deleting - or not deleting - the album? |
@@ -79,10 +79,10 @@ type NaclDHKeyPair struct {
Private *NaclDHKeyPrivate
}
-func (n NaclDHKeyPair) Clone() (ret NaclDHKeyPair) {
- ret.Public = n.Public
- if n.Private != nil {
- tmp := *n.Private
+func (k NaclDHKeyPair) Clone() (ret NaclDHKeyPair) {
+ ret.Public = k.Public
+ if k.Private != nil {
+ tmp := *k.P... | [VerifyStringAndExtract->[GetKID],VerifyString->[VerifyStringAndExtract],Encrypt->[GetKID],ToShortIDString->[ToShortIDString,GetKID],GetKID->[GetBinaryKID,GetKID],EncryptToString->[Encrypt],Sign->[GetBinaryKID,Sign],GetBinaryKID->[GetBinaryKID],ExportPublicAndPrivate->[GetKID],SignV2->[GetBinaryKID,hasNullByte,Prefix,S... | Clone returns a copy of the NaclDHKeyPair. | Some linter was complaining about lettering inconsistency here. |
@@ -1,6 +1,10 @@
_HAS_OPS = False
+def _has_ops():
+ return False
+
+
def _register_extensions():
import os
import importlib
| [_register_extensions->[load_library,find_spec,dirname,FileFinder],_check_cuda_version->[int,split,_cuda_version,str,format,RuntimeError],_register_extensions,_check_cuda_version] | Load the custom op library and register the custom ops. | This can probably be removed now |
@@ -78,6 +78,12 @@ AsmJsJITInfo::GetWasmSignatureAddr(uint index) const
Assert(index < m_data.wasmSignatureCount);
return m_data.wasmSignaturesBaseAddr + index * sizeof(Wasm::WasmSignature);
}
+
+bool AsmJsJITInfo::IsSharedMemory() const
+{
+ return !!m_data.wasmIsSharedMemory;
+}
+
#endif
bool
| [m_data->[CompileAssert],GetWasmSignature->[Assert],GetWasmSignatureAddr->[Assert],GetArgType->[AssertOrFailFast,GetArgCount,GetArgTypeArray]] | private private intptr_t pointer_t wasmSignatureBaseAddr ;. | nit: for consistency would prefer `!= FALSE` |
@@ -99,6 +99,14 @@ public class CloseContainerEventHandler implements EventHandler<ContainerID> {
}
}
+ private String getContainerToken(ContainerID containerID) {
+ StorageContainerManager scm = scmContext.getScm();
+ return scm != null
+ ? scm.getContainerTokenGenerator()
+ .generat... | [CloseContainerEventHandler->[getNodes->[getNodes]]] | Handle a close container event. | should we pass meaningful name here instead of the class name as user for the container token? |
@@ -209,7 +209,7 @@ namespace Content.Client.UserInterface
if (args.Function == ContentKeyFunctions.MouseMiddle)
{
- hands.SendChangeHand(slotName);
+ hands.SetActiveHand(slotName);
args.Handle();
return;
}
| [HandsGui->[UpdatePanels->[TryGetHands],FrameUpdate->[FrameUpdate,UpdatePanels],_OnStoragePressed->[TryGetHands],HandKeyBindDown->[TryGetHands],UpdateHandIcons->[TryGetHands,AddHand,Texture]]] | This method is called when a key is bound down. | You should not directly edit simulation state from UI like this. As it is this "event" is not correctly tracked by the game state system and will be undone during reconciliation. Use `EntityManagerExt.RaisePredictiveEvent()` to fire events into the EventBus and to the server that are correctly replayed during reconcili... |
@@ -275,7 +275,16 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna
s_logger.error("Unhandled exception configuring UsageManger", e);
throw new ConfigurationException("Unhandled exception configuring UsageManager " + e.toString());
}
- _pid = I... | [UsageManagerImpl->[parseHelperTables->[parse],run->[run],configure->[mergeConfigs],parse->[start],Heartbeat->[runInContext->[scheduleParse],updateJob->[start]]]] | This method is called to configure a specific usage server. Private methods called by the job. private int _lastJobID ;. | @DaanHoogland @div8cn What do you think of using `e.printStackTrace()` to add the stack on the log/ConfigurationException? With `toString` (or simply s_logger.debug(msg , e)) it logs only the exception name and the error message (if there is any message). On the other hand, `printStackTrace()` presents the whole stack ... |
@@ -77,6 +77,7 @@ int ACE_TMAIN(int argc, ACE_TCHAR** argv)
DDS::DataReader_var reader = model.reader( Elements::DataReaders::reader);
DDS::Subscriber_var subscriber = reader->get_subscriber();
+ DDS::Topic_var topic = DDS::Topic::_narrow(reader->get_topicdescription());
ACE_SYNCH_MUTEX lock;
... | [No CFG could be retrieved] | The main entry point for the sample_info action. - - - - - - - - - - - - - - - - - -. | TopicDescription reference is leaked here |
@@ -1241,10 +1241,10 @@ def _mt_spectrum_proc(x, sfreq, line_freqs, notch_widths, mt_bandwidth,
for rm_freqs in freq_list:
if line_freqs is None:
if len(rm_freqs) > 0:
- logger.info('Detected notch frequencies:\n%s'
- % ', '.join([str(rm_f) for rm_f i... | [notch_filter->[filter_data,_check_method],_construct_fir_filter->[_filter_attenuation],resample->[_check_filterable,_resamp_ratio_len],detrend->[detrend],FilterMixin->[apply_hilbert->[next_fast_len],filter->[filter_data],savgol_filter->[savgol_filter],resample->[resample]],_triage_filter_params->[_check_filterable],_o... | Process the MT - spectrum remove function. filter out notch frequencies and report. | frequecies was the fixed one |
@@ -39,10 +39,10 @@ module AutomatedTestsHelper
def add_parser_file_link(name, form)
link_to_function name do |page|
- test_file = render(:partial => 'test_file',
- :locals => {:form => form,
- :test_file => TestFile.new,
- ... | [run_ant_file->[short_identifier,system,each_line,new,exists?,cd,create,id,raise,pwd,now,join,close,parse_test_output,exitstatus,t,open,l],delete_test_repo->[exists?,markus_config_automated_tests_repository,rm_rf,repo_name,join],add_parser_file_link->[new,render,link_to_function,escape_javascript,t],export_repository->... | link to parse file. | Align the elements of a hash literal if they span more than one line. |
@@ -243,10 +243,10 @@ class Index {
}
continue;
case STOP:
- assert indexQueue.poll() == null;
+ assert indexQueue.peek() == null;
shutdown();
return;
- cas... | [Index->[start->[start],stopOperations->[stopOperations],Segment->[allocateIndexSpace->[size],shutdown->[size,write],write->[write],loadFreeBlocks->[read],run->[size],pauseAndClear->[clear],read->[read],size],size->[size]]] | This method is run in a thread. private int size = 0 ;. | :+1: Interesting little bug :D |
@@ -364,7 +364,7 @@ func (ctx *Context) Call(tok string, args Input, output Output, self Resource, o
// If we have a value for self, add it to the arguments.
if self != nil {
var deps []URN
- resolvedSelf, selfDeps, err := marshalInput(self, nil, true)
+ resolvedSelf, selfDeps, err := marshalInput(self, a... | [Call->[Call],ReadResource->[ReadResource],RegisterComponentResource->[RegisterResource],collapseAliases->[Project,Stack],registerResource->[RegisterResource,getResource],Invoke->[Invoke],resolve->[DryRun,resolve],RegisterRemoteComponentResource->[registerResource],withKeepOrRejectUnknowns->[DryRun],RegisterResourceOut... | Call invokes a remote function with the given arguments. Encode all the dependencies for a call and return a call request. Call a protected object via RPC. Call returns a list of dependency resources that can be used to call a single object. | Feels like we ought to have a better type than `anyType` for `resolvedSelf`. Is there a reason that we can't use the type of the resource itself? |
@@ -666,6 +666,8 @@ func (display *ProgressDisplay) processEndSteps() {
wroteDiagnosticHeader := false
for _, row := range display.eventUrnToResourceRow {
+ wroteResourceHeader := false
+
for id, payloads := range row.DiagInfo().StreamIDToDiagPayloads {
if len(payloads) > 0 {
if id != 0 {
| [filterOutUnnecessaryNodesAndSetDisplayTimes->[filterOutUnnecessaryNodesAndSetDisplayTimes],processEvents->[processNormalEvent,processEndSteps,processTick],processEndSteps->[refreshAllRowsIfInTerminal,writeSimpleMessage,refreshSingleRow,writeBlankLine],handleSystemEvent->[refreshAllRowsIfInTerminal,writeSimpleMessage],... | processEndSteps is called when the end of the processing of the progress steps. This function splits the given message into lines that can be displayed. Write a simple message to the screen. | this was the original intent of the code here. We iterate over each resource so that all the messages are grouped by resource. The intent was that if we then had any diagnostics to show for that resource, we would print out its name once, then all the diags. but my logic was bad (or this got munged around over time), a... |
@@ -12,7 +12,7 @@ class PyOnnxconverterCommon(PythonPackage):
homepage = "https://github.com/microsoft/onnxconverter-common"
url = "https://github.com/microsoft/onnxconverter-common/archive/refs/tags/v1.9.0.tar.gz"
- version('1.9.0', sha256='e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b78... | [PyOnnxconverterCommon->[depends_on,version]] | Onnx Converter and Optimization Tools. | Why the checksum change? |
@@ -139,6 +139,11 @@ func basicCredentialsFromKeyring(keyring credentialprovider.DockerKeyring, targe
glog.V(5).Infof("Being asked for %s, trying %s for legacy behavior", target, "index.docker.io/v1")
return basicCredentialsFromKeyring(keyring, &url.URL{Host: "index.docker.io", Path: "/v1"})
}
+ // docker 1... | [init->[Unlock,Infof,secretsFn,MakeDockerKeyring,V,Lock],Err->[Lock,Unlock],Basic->[init,Infof],Infof,Lookup,V,NewDockerKeyring,HasPrefix] | Determines the username and password for the given secret. | Isn't this broken for imagePullSecrets as well then? Do we need a Kube fix? |
@@ -18,13 +18,10 @@ import {xhrServiceForTesting} from '../src/service/xhr-impl';
import {getService, getServiceForDoc} from '../src/service';
export function stubService(sandbox, win, serviceId, method) {
- const stub = sandbox.stub();
- getService(win, serviceId, () => {
- const service = {};
- service[me... | [No CFG could be retrieved] | Checks that the given element is visible to screen readers. computedStyle - >. | need to add method to service in order to stub it? |
@@ -7,7 +7,7 @@ angular.module('<%=angularAppName%>')
replace: true,
restrict: 'E',
template: '<div id="strength">' +
- '<small translate="global.messages.validate.newpassword.strength">Password strength:</small>' +
+ '<small<% if(enableTranslation){ ... | [No CFG could be retrieved] | Password strength bar A function to get the color of the user - nightly - selected item. | even if we let this sit in here its still valid html and will not cause any issues, that is why I left this as such originally |
@@ -13,15 +13,6 @@ class Program
{
static int Main(string[] args)
{
- // since we are using Invariant GlobalizationMode = true, setting the culture doesn't matter.
- // The app will always use Invariant mode, so even in the Turkish culture, 'i' ToUpper will be "I"
- Thread.CurrentThread.... | [Program->[Type->[GetType],Main->[Public,CurrentCulture,Contains,GetCoreLibType,WriteLine,Name,NonPublic,ToUpper,GetMembers,IsWindows,StartsWith,Static]]] | Checks if an unexpected member is left on GlobalizationMode. | Can we find another way to test that Invariant mode is set here? This is basically removing what this test is trying to test. Maybe a thought here is to split this test into 2? * One just set Invariant = true, and runs this part of code. * One sets both Invariant = true && PredefinedCultures = true, and tests that the ... |
@@ -2,7 +2,7 @@ using System.Linq;
using Content.Shared.Body.Components;
using Content.Shared.Body.Mechanism;
using Content.Shared.Body.Part;
-using Content.Shared.Damage.Components;
+using Content.Shared.Damage;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using R... | [BodyScannerDisplay->[MechanismOnItemSelected->[ElementAt,UpdateMechanismBox,ItemIndex],UpdateMechanismBox->[CurrentDurability,Name,GetString,MaxDurability,SetMessage],BodyPartOnItemSelected->[ItemIndex,SlotAt,Part,Id,UpdateBodyPartBox,Key],UpdateBodyPartBox->[Mechanisms,Clear,TotalDamage,AddItem,Name,GetString,TryGetC... | Creates an SS14Window that displays the body of the current entity. Creates a container with the information. | So the damageable component had it's own folder & namespace despite being the only component. AFAIK, unless there's more than one component it should just be using `Content.Shared.Damage` |
@@ -243,7 +243,9 @@ def recreate_theme_previews(addon_ids, **kw):
log.info('Recreating previews for theme: %s' % version.addon_id)
xpi = get_filepath(version.all_files[0])
theme_data = parse_addon(xpi, minimal=True).get('theme', {})
- generate_static_theme_preview(theme... | [delete_preview_files->[delete_preview_files,Preview],update_addon_average_daily_users->[int,get,update,len,info,float],update_addon_hotness->[error,dict,get,update,len,filter,info,float],create_custom_icon_from_predefined->[force_str,split,copy_stored_file,get,update,len,filter,md5,join,exists,open,get_icon_dir,listdi... | Recreate theme previews for given addons. generate preview for theme if it s not there yet. | despite our warnings in settings_base, I guess this is okay @diox ? |
@@ -431,6 +431,7 @@ public class RealtimePlumber implements Plumber
mergedFile,
sink.getSegment().withDimensions(Lists.newArrayList(index.getAvailableDimensions()))
);
+ index.close();
log.info("Inserting [%s] to the metadata store", sink.... | [RealtimePlumber->[persistHydrant->[persist,computePersistDir],persistAndMerge->[doRun->[add]],finishJob->[persistAndMerge],addSink->[add],add->[add],computePersistDir->[computeBaseDir],persist->[add],mergeAndPush->[persistAndMerge,add],bootstrapSinksFromDisk->[compare->[compare],add]]] | This method is called when a sink is committed to the persistent store and a merge is performed Push a single hydrant segment to the deep storage. This method is called when a segment is abandoned. | It doesn't seem that creating index is even needed here, `IndexMerger.getMergedDimensions(indexes)` could be used |
@@ -556,6 +556,7 @@ class ProductCreateInput(ProductInput):
),
required=False,
)
+ base_price = Decimal(description="Default price for product variant.",)
T_INPUT_MAP = List[Tuple[models.Attribute, List[str]]]
| [CollectionCreate->[save->[save],Arguments->[CollectionCreateInput]],ProductImageDelete->[perform_mutation->[ProductImageDelete]],ProductImageReorder->[perform_mutation->[save,ProductImageReorder]],ProductImageCreate->[Arguments->[ProductImageCreateInput],perform_mutation->[ProductImageCreate]],VariantImageAssign->[per... | Creates a new object from the given base object. Retrieve attributes nodes from given global IDs and or slugs. | What about the `productUpdate` mutation? It uses `ProductInput` and for now we want to use it to update prices of simple products (with the one default variant). |
@@ -25,7 +25,7 @@ namespace System.Net
private bool _syncHint;
private int _aborted;
-#pragma warning disable SYSLIB0014
+#pragma warning disable SYSLIB0014 // WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.
internal FileWebRequest(Uri uri)
... | [No CFG could be retrieved] | Creates a new instance of a ata request that returns a file object. set. Content - Length. | Should we just suppress SYSLIB0014 in System.Net.Requests at the project level? This assembly is entirely about providing these types. Same for System.Net.ServicePoint. |
@@ -5,13 +5,14 @@
using System;
using System.Reflection;
+#nullable enable
namespace Microsoft.Extensions.Internal
{
internal class ParameterDefaultValue
{
private static readonly Type _nullable = typeof(Nullable<>);
- public static bool TryGetDefaultValue(ParameterInfo parameter, out ... | [ParameterDefaultValue->[TryGetDefaultValue->[IsGenericType,GetUnderlyingType,HasDefaultValue,ParameterType,ToObject,DefaultValue,CreateInstance,IsValueType,IsEnum,GetGenericTypeDefinition]]] | Try to get the default value of a parameter. | Nit: not a big deal, but we've generally been putting these above the using statements when they're needed |
@@ -115,7 +115,9 @@ class ExerciseStreamingMetricsPipelineTest(unittest.TestCase):
return dataflow_exercise_streaming_metrics_pipeline.run(argv)
# Need not run streaming test in batch mode.
- @attr('IT', 'ValidatesRunner', 'sickbay-batch')
+ @pytest.mark.no_sickbay_batch
+ @pytest.mark.it_validatesrunner
+... | [ExerciseStreamingMetricsPipelineTest->[test_streaming_pipeline_returns_expected_user_metrics_fnapi_it->[_inject_words,run_pipeline]]] | Runs streaming Dataflow job and verifies that the user metrics are reported correctly. | This is the only test that runs in both ValidatesRunner and post-commit. I think that's a bug but let's leave it for this PR. |
@@ -8,8 +8,10 @@ class ResultTextsController < ApplicationController
before_action :load_vars, only: [:edit, :update, :download]
before_action :load_vars_nested, only: [:new, :create]
- before_action :check_manage_permissions, only: %i(new create edit update)
+ before_action :check_manage_permissions, only: %... | [ResultTextsController->[new->[new],create->[new]]] | Displays a form to create a new nag node. | use except for view permissions |
@@ -40,7 +40,7 @@
// ReSharper disable once MemberCanBePrivate.Global
public Context Context { get; set; }
- public Task<TestSaga08.SagaData08> FindBy(SomeOtherMessage message, ReadOnlyContextBag context)
+ public Task<TestSaga08.SagaData08> FindBy(SomeO... | [When_a_finder_exists_and_found_saga->[Task->[FinderUsed,Run,True],SagaEndpoint->[CustomFinder->[FindBy->[FromResult,FinderUsed]],TestSaga08->[Task->[FromResult,SendLocal,Completed]],c]]] | Find by some other message. | Should the `ContextBag` be part of the session? |
@@ -56,6 +56,17 @@ namespace Dynamo
return Path.Combine(directory.Parent.Parent.Parent.FullName, "test");
}
+ public string GetSampleDirectory()
+ {
+ var directory = new FileInfo(ExecutingDirectory);
+ string assemblyDir = directory.DirectoryName;
+ ... | [UnitTestBase->[SetupDirectories->[EmptyTempFolder]]] | Get test directory. | Added this method to get Sample directory. |
@@ -184,6 +184,10 @@ Rails.application.routes.draw do
get :cache
end
end
+
+ namespace :admin do
+ resource :config, only: %i[show]
+ end
end
end
| [new,authenticate,authenticated,redirect,devise_scope,mount,put,draw,freeze,has_role?,resources,member,root,use,scope,post,set,controllers,require,secrets,class_eval,use_doorkeeper,resource,url,patch,devise_for,each,production?,delete,namespace,collection,get,session_options,tech_admin?,app] | Resources of all the items in a collection. API for listing all the nagios. | I'm wondering if we should really make the admin routes a namespace under the public API. It doesn't seem outlandish to have two distinct APIs for this, e.g. `api/v0/` and `api/admin` we can of course also version the latter). |
@@ -77,7 +77,7 @@ if ( ! defined( 'JP_SITEMAP_LOCK_INTERVAL' ) ) {
}
/**
- * Cache lifetime of news sitemap (in seconds).
+ * Number of seconds between news sitemap updates.
*
* @since 4.8.0
*/
| [No CFG could be retrieved] | region Private methods region Page Page Sitemap Index and Page Sitemap Index. | Good call on that, that makes a lot more sense that way. |
@@ -504,7 +504,9 @@ class PyclingoDriver(object):
def solve(
self, solver_setup, specs, dump=None, nmodels=0,
timers=False, stats=False, tests=False, reuse=False,
+ multi_root=False
):
+ # Spec_list must always be treated in order so PSIDs match up
timer = ... | [AspFunctionBuilder->[__getattr__->[AspFunction]],solve->[visit->[],PyclingoDriver,SpackSolverSetup,solve],listify->[issequence],SpackSolverSetup->[condition->[condition,fact],package_provider_rules->[condition,newline,fact],os_defaults->[fact,h2],impose->[fact],conflict_rules->[newline,fact],generate_possible_compiler... | Solves a single object. This function is called by the solve method of the base system. It turns our facts and. | Not a fault of this PR, and can be done separately - but we should add a docstring to this method as it is gaining new arguments at each new feature. |
@@ -608,6 +608,7 @@ func SearchImages(w http.ResponseWriter, r *http.Request) {
NoTrunc bool `json:"noTrunc"`
Filters []string `json:"filters"`
TLSVerify bool `json:"tlsVerify"`
+ ListTags bool `json:"listTags"`
}{
// This is where you can override the golang default value for one of fie... | [Context,RemoveAll,Value,StatusText,Commit,InternalServerError,TempFile,Tar,GetImage,ErrorsToStrings,NewFromLocal,Close,TempDir,GetConfig,IsReadOnly,Wrap,LoadImage,PushImageToHeuristicDestination,Copy,Error,Save,ParseBool,Cause,New,ParseDockerReference,TagImage,GetSystemContext,GetImages,GetName,Errorf,ImageNotFound,Pa... | SearchImages searches for images with the given tag. filters - Optional parameters. | We also need to extend the swagger docs in `pkg/api/server/register_images.go` |
@@ -494,7 +494,6 @@ class GraphLock(object):
node.graph_lock_node = locked_node
if locked_node.options is not None: # This was a "partial" one, not a "base" one
node.conanfile.options.values = locked_node.options
- node.conanfile.options.freeze()
def loc... | [GraphLockNode->[deserialize->[GraphLockNode]],GraphLock->[_find_node_by_requirement->[_find_first],get_consumer->[_find_first],clean_modified->[clean_modified],relax->[relax],__init__->[GraphLockNode],serialize->[serialize],only_recipes->[only_recipe],deserialize->[GraphLock,deserialize],find_require_and_lock->[requir... | Lock a node before it is imported. Check if a is found in the node s list of locked requirements. | This is the key of this PR: the options are not freezed anymore, so they do not error while being evaluated and getting different values. |
@@ -51,8 +51,12 @@ class Plumed(AutotoolsPackage):
# The ones listed here are not built by default for various reasons,
# such as stability, lack of testing, or lack of demand.
# FIXME: This needs to be an optional
- variant('optional_modules', default='all',
- description='String that is u... | [Plumed->[filter_gslcblas->[filter_file],apply_patch->[join_path,write,str,wait,Popen,format],configure_args->[append,format,extend],run_before,variant,depends_on,version]] | This module is a wrapper around the Plumed library. It is used to build a Provides a dictionary mapping PLUMED versions to the patches it provides. | There is probably actually a set list of valid strings, but someone would have to look them up. |
@@ -20,7 +20,7 @@ describe StatusesController do
end
it 'ステータスが「見てる」になること' do
- expect(user.status(work).kind).to eq 'watching'
+ expect(user.statuses.kind_of(work).kind).to eq 'watching'
end
end
| [create,context,skip_callback,let,to,describe,before,post,eq,sign_in,let!,it,require,id] | Describe the statuses controller. | Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
@@ -322,8 +322,11 @@ class SocketManager():
if packet.requires_ack:
if packet.blocking:
# Put the packet right back into its place to prevent sending
- # other packets
+ # other packets, then block
self._safe_put(connection_id, (send_... | [SocketManager->[_send_ack->[_safe_send,get_ack],channel_thread->[_send_packet,_send_needed_heartbeat],shutdown->[close_all_channels,_ensure_closed],_send_world_alive->[get_my_sender_id,_safe_send],queue_packet->[socket_is_open,get_receiver_connection_id],_send_needed_heartbeat->[new_copy,_safe_send],close_channel->[_s... | Sends a packet blocks if the packet is blocking. | assuming this is an arbitrary amount of time? |
@@ -702,10 +702,10 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
post2(listener);
} finally {
// update the culprit list
- HashSet<String> r = new HashSet<>();
+ SortedSet<String> r = new TreeSet<>();
... | [AbstractBuild->[_getUpstreamBuilds->[getUpstreamRelationship],getNextBuild->[getNextBuild],getModuleRoot->[getWorkspace,getModuleRoot],getBuildVariableResolver->[getBuildVariables],getEnvironment->[getWorkspace,getEnvironment],getDownstreamBuilds->[getDownstreamRelationship],AbstractBuildExecution->[performAllBuildSte... | Post the build. | `r` was declared within this method and goes out of scope at the end of the method, so nothing else can modify it. We do not need to copy it. |
@@ -43,6 +43,17 @@ var _ = Describe("Podman images", func() {
Expect(session.LineInOuputStartsWith("docker.io/library/busybox")).To(BeTrue())
})
+ It("podman images with no images prints header", func() {
+ rmi := podmanTest.Podman([]string{"rmi", "-a"})
+ rmi.WaitWithDefaultTimeout()
+ Expect(rmi.ExitCode())... | [WaitWithDefaultTimeout,OutputToStringArray,RestoreAllArtifacts,Cleanup,ExitCode,InspectImageJSON,Sprintf,SliceIsSorted,LineInOutputContainsTag,To,IsJSONOutputValid,LineInOutputContains,BuildImage,Podman,FromHumanSize,Exit,Setup,LineInOuputStartsWith] | BeforeEach tests the number of unique identifiers in the system. This test is used to check if the podman command is running and if it is running. | Some other tests are failing because they expect `.To(Equal(0))` which doesn't hold anymore. |
@@ -12,6 +12,7 @@ BRAKE_THRESHOLD_TO_PID = 0.2
BRAKE_STOPPING_TARGET = 0.5 # apply at least this amount of brake to maintain the vehicle stationary
RATE = 100.0
+DEFAULT_LONG_LAG = 0.5
def long_control_state_trans(active, long_control_state, v_ego, v_target, v_pid,
| [LongControl->[reset->[reset],update->[reset,long_control_state_trans,update]]] | Update longitudinal control state machine. | I'm pretty sure this changes based on speed, for my Corolla 0.5s was too much at low speed and it jerked much worse than it normally does. 0.2 at 10 mph to 0.5 at 70 mph is what I settled on, but it most likely varies by car. |
@@ -150,7 +150,7 @@ class Authenticator(common.Plugin):
# one self-signed key for all tls-sni-01 certificates
self.key = OpenSSL.crypto.PKey()
- self.key.generate_key(OpenSSL.crypto.TYPE_RSA, bits=2048)
+ self.key.generate_key(OpenSSL.crypto.TYPE_RSA, 2048)
self.served = col... | [Authenticator->[cleanup->[running,stop],perform2->[run],__init__->[ServerManager]]] | Initialize the authenticator with a self - signed key. | I find `bits=2048` more readable |
@@ -15,6 +15,8 @@ use Symfony\Component\EventDispatcher\Event;
/**
* This event is dispatched when any object permission have been updated.
+ *
+ * @deprecated
*/
class PermissionUpdateEvent extends Event
{
| [No CFG could be retrieved] | This class is a class which is dispatched when any object permissions have been updated. Get the permissions. | Remove if possible |
@@ -23,7 +23,6 @@ import com.google.common.base.Charsets;
import com.google.common.io.ByteSource;
import com.google.common.io.LineProcessor;
import com.metamx.common.parsers.Parser;
-
import java.io.IOException;
import java.util.Map;
| [MapPopulator->[populate->[processLine->[parse,putAll],readLines]]] | Creates a new instance of MapPopulator that reads through the source line by line and populates Populates the given map with the parsed entries from the given ByteSource. | minor nit, I don't think we need to change formatting here |
@@ -13,7 +13,12 @@ declare(strict_types=1);
namespace ApiPlatform\Core\Tests\Bridge\Symfony\Bundle\DependencyInjection;
+use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryCollectionExtensionInterface;
+use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryItemExtensionInterface;
+use ApiPlatform\Core\Bridg... | [ApiPlatformExtensionTest->[testDisableEagerLoadingExtension->[reveal,load,getContainerBuilderProphecy,shouldBeCalled],testNotPrependSerializerWhenConfigExist->[prepend,shouldNotBeCalled,prophesize,reveal,shouldBeCalled],testNotPrependPropertyInfoWhenConfigExist->[prepend,shouldNotBeCalled,prophesize,reveal,shouldBeCal... | Creates a new ApiPlatformExtensionTest class that can be used to test a single Set up the extension and set up the extension. | It should be `ApiPlatform\Core\Api\FilterInterface`. |
@@ -5584,6 +5584,10 @@ amp.validator.ValidationResult.prototype.outputToTerminal = function(
const {status} = this;
if (status === amp.validator.ValidationResult.Status.PASS) {
terminal.info('AMP validation successful.');
+ terminal.info('Important: Valid AMP pages should also be tested for proper '
+ ... | [TagStack->[matchChildTagName->[matchChildTagName],updateFromTagResults->[getSpec],exitTag->[childTagMatcher,referencePointMatcher],updateStackEntryFromTagResult_->[childTagMatcher,cdataMatcher,referencePointMatcher],setDescendantConstraintList->[getSpec]],info->[info],Context->[recordAttrRequiresExtension_->[attrsCanS... | Output the given message to the console if it is not already logged. Check if there are any errors that match the errorCategoryFilter. If there are no errors. | Let's avoid starting with `important` and find a shorter to the point message. |
@@ -140,6 +140,7 @@ def check_lines_quantity(
quantities,
country,
channel_slug,
+ site_settings_quantity_limit,
allow_zero_quantity=False,
existing_lines=None,
replace=False,
| [CheckoutBillingAddressUpdate->[perform_mutation->[CheckoutBillingAddressUpdate,save,get_checkout_by_token]],CheckoutLinesDelete->[perform_mutation->[update_checkout_shipping_method_if_invalid,CheckoutLinesDelete,validate_lines,get_checkout_by_token]],CheckoutComplete->[perform_mutation->[CheckoutComplete,get_checkout_... | Check if the quantity of a single branch is sufficient for each checkout line. | Just curious. Do we need to name it `site_settings_...`? I mean - is it important that this limit comes from site_settings? |
@@ -245,3 +245,16 @@ func (p *leaderProxy) handleRequest(msgID uint64, req *pdpb.Request) (*pdpb.Resp
}
return resp, errors.Trace(err)
}
+
+func isUnexpectedConnError(err error) bool {
+ if err == nil {
+ return false
+ }
+ if errors.Cause(err) == io.EOF {
+ return false
+ }
+ if strings.Contains(err.Error(), "u... | [checkRequest->[GetCmdType,GetClusterId,Errorf,GetHeader],handleRequest->[handleReportSplit,handleAllocID,handleGetPDMembers,handleTso,Close,handleGetClusterConfig,handleRegionHeartbeat,handleAskSplit,Errorf,handleStoreHeartbeat,GetAddr,Trace,GetCmdType,handleIsBootstrapped,handlePutStore,handleGetRegion,handleBootstra... | handleRequest is used to handle a request to the leader. | maybe you can check the err is net.Error instead. It's better not to check the error message directly. |
@@ -0,0 +1,13 @@
+class ConfirmationsController < Devise::ConfirmationsController
+ FLASH_MESSAGE = "Email sent! Please contact support at %<email>s if you are "\
+ "having trouble receiving your confirmation instructions.".freeze
+
+ def create
+ self.resource = resource_class.send_confirmation_instructions(re... | [No CFG could be retrieved] | No Summary Found. | It seems by overriding the controller we lost paranoid mode, at least I could see error messages. Instead of digging deep into Devise internals, I decided to just clear the resource errors manually. |
@@ -50,10 +50,6 @@ public final class SourceFormatAdapter {
/**
* Fetch new data in avro format. If the source provides data in different format, they are translated to Avro format
- *
- * @param lastCkptStr
- * @param sourceLimit
- * @return
*/
public InputBatch<JavaRDD<GenericRecord>> fetchNe... | [SourceFormatAdapter->[fetchNewDataInRowFormat->[getCheckpointForNextBatch,IllegalArgumentException,ofNullable,getSchemaProvider,orElse,convertAvroSchemaToStructType,getSourceType,fetchNext,getSourceSchema],fetchNewDataInAvroFormat->[getCheckpointForNextBatch,IllegalArgumentException,ofNullable,getSchemaProvider,orElse... | Fetch new data in avro format. | why these changes>? |
@@ -550,13 +550,12 @@ void Minimap::updateActiveMarkers()
video::IImage *minimap_mask = data->minimap_shape_round ?
data->minimap_mask_round : data->minimap_mask_square;
- std::list<Nametag *> *nametags = client->getCamera()->getNametags();
+ const std::list<Nametag *> &nametags = client->getCamera()->getNametag... | [getVideoDriver->[getVideoDriver],getMinimapTexture->[blitMinimapPixelsToImageSurface,blitMinimapPixelsToImageRadar],enqueueBlock->[pushBlockUpdate],drawMinimap->[getMinimapTexture],stop->[stop],addBlock->[enqueueBlock],doUpdate->[popBlockUpdate]] | This function updates active markers based on the current position of the nametags. | Variable `nametag` is only used once here, optimizing away doesn't hurt here. |
@@ -4,10 +4,11 @@
import argparse
import os
+import json
import random
+import tempfile
import subprocess
import sys
-from typing import List
# This has to happen before we import spacy (even indirectly), because for some crazy reason spacy
# thought it was a good idea to set the random seed on import...
| [main->[basename,from_file,append,print,str,check_output,items,run,join,as_flat_dict],randint,abspath,add_argument,append,insert,dirname,ArgumentParser,parse_args,extend,replace,join,main] | Creates a script that runs AllenNLP Beaker on a specific branch. Logs into ECR and builds the Docker image and pushes it to the beaker dataset. | Can you give a type annotation for `args`? |
@@ -22,11 +22,12 @@ def hash_pair(first: Optional[Keccak256], second: Optional[Keccak256]) -> Option
deterministic way of ordering the elements making sure the smart contract
verification and the python code are compatible.
"""
-
if first is None:
+ assert second, 'Both arguments to hash_pair... | [compute_layers->[hash_pair],validate_proof->[hash_pair]] | Computes the keccak hash of the elements ordered topologically. | This looks like the wrong approach. Why are any of the arguments optional anyways? |
@@ -289,14 +289,14 @@ public class RecoveryManagerImpl implements RecoveryManager {
txCoordinator.prepare(localTx, true);
txCoordinator.commit(localTx, false);
} catch (XAException e) {
- log.warn("Could not commit local tx " + localTx, e);
+ log.warnCouldNotCom... | [RecoveryManagerImpl->[getInDoubtTransactionInfoFromCluster->[getInDoubtTransactionInfo],getInDoubtTransactionInfo->[getInDoubtTransactions],forceTransactionCompletion->[getPreparedTransaction],removeRecoveryInformation->[removeRecoveryInformation],isSuccessful->[isSuccessful],completeTransaction->[removeRecoveryInform... | Complete the given transaction. | I believe the X in TX should be small-case. |
@@ -294,3 +294,6 @@ class Jetpack_Tiled_Gallery {
}
add_action( 'init', array( 'Jetpack_Tiled_Gallery', 'init' ) );
+add_action( 'init', function() {
+ Jetpack::load_jetpack_gutenberg( '/tiled-gallery' );
+ } );
\ No newline at end of file
| [Jetpack_Tiled_Gallery->[set_atts->[tiles_enabled],gallery_shortcode->[set_atts,get_attachments]]] | Example of how to add gallery to a list of images. | Before this could be merged, it would need to be converted to a function. Anonymous functions aren't allowed in PHP 5.2. |
@@ -147,14 +147,6 @@ public class GetHBase extends AbstractProcessor implements VisibilityFetchSuppor
.allowableValues(NONE, CURRENT_TIME)
.defaultValue(NONE.getValue())
.build();
- static final PropertyDescriptor AUTHORIZATIONS = new PropertyDescriptor.Builder()
- .... | [GetHBase->[getStateFile->[getStateDir],clearState->[getStateFile,getKey],ScanResult->[contains->[contains,getTimestamp],toFlatMap->[getKey],fromFlatMap->[getKey,ScanResult]],getState->[getKey,getStateFile,getState]]] | This class is used to create a ScanResult object that can be used to scan a table. | Is this an unused property? I see it being removed but didn't see it moved anywhere |
@@ -628,7 +628,7 @@ def create_line_for_order(checkout_line: "CheckoutLine", discounts) -> OrderLine
if not isinstance(unit_price, Decimal)
else Decimal("0.0")
)
- line = OrderLine(
+ line = OrderLine( # type: ignore
product_name=product_name,
variant_name=variant_name,
... | [change_shipping_address_in_checkout->[_check_new_checkout_address],is_valid_shipping_method->[get_valid_shipping_methods_for_checkout],clean_checkout->[is_valid_shipping_method,is_fully_paid],get_shipping_price_estimate->[get_valid_shipping_methods_for_checkout],add_voucher_to_checkout->[get_voucher_discount_for_check... | Create a line of order related to a given checkout line. | What's the issue with the typing here? |
@@ -60,6 +60,7 @@ type CreateValidator struct {
MinSelfDelegation *big.Int `json:"min_self_delegation" yaml:"min_self_delegation"`
MaxTotalDelegation *big.Int `json:"max_total_delegation" yaml:"max_total_delegation"`
SlotPubKeys []shard.BlsPublicKey `json:"slot_pub_keys" yaml:"slot... | [String->[Sprintf],New] | DirectiveUndelegate returns a string representation of a Directive. - type for delegating to a validator or a delegator. | Please use bytes. you can add another type like shard.BlsSignature = [96]byte |
@@ -37,4 +37,13 @@ public @interface Udf {
* @return the text to display to the user.
*/
String description() default "";
+
+ /**
+ * The schema for the return value of the UDF.
+ *
+ * <p>For simple method signatures, this is optional and can be determined from
+ * the return value itself. For comp... | [No CFG could be retrieved] | description of the ethernet ethernet ethernet type. | What does this failure look like? Will it prevent the KSQL server from starting? What's the error message? |
@@ -267,9 +267,9 @@ public class MessageQueue {
/**
* Configures defaut messaging actions needed by RHN
* This method should be called directly after <code>startMessaging</code>.
- *
+ * @param systemQuery instance for gathering data from a system.
*/
- public static void configureDefa... | [MessageQueue->[configureDefaultActions->[registerAction]]] | Register the default actions for all messages that are not yet registered. Register actions for any unknown type. | I assume we will use this `systemQuery` later in some other PR, right? |
@@ -299,11 +299,10 @@ public class TestOzoneFileSystemV1 extends TestOzoneFileSystem {
LOG.info("Rename op-> source:{} to destin:{}}", source, destin);
try {
- getFs().rename(source, destin);
- Assert.fail("Should throw exception : Source doesn't exist!");
+ // rename should fail and return f... | [TestOzoneFileSystemV1->[cleanup->[getMessage,cleanup,deleteRootDir,info,fail],testRenameDestinationParentDoesntExist->[Path,mkdirs,rename,touch,toString,getFs,getResult,isEnabledFileSystemPaths,assertEquals,fail],init->[setIsBucketFSOptimized],testRenameWithNonExistentSource->[Path,mkdirs,rename,toString,getResult,inf... | Test rename with non existent source. | Please remove `TestOzoneFileSystemV1#testRenameWithNonExistentSource` method, as now V1 code has the same exception handling mechanism with V0 existing code. Basically, its not required to override this test and we can verify it using `TestOzoneFileSystem#testRenameWithNonExistentSource` itself. |
@@ -348,7 +348,9 @@ func (a Archive) openURLStream(url *url.URL) (io.ReadCloser, error) {
// APIs that demand []bytes.
func (a Archive) Bytes(format ArchiveFormat) []byte {
var data bytes.Buffer
- a.Archive(format, &data)
+ err := a.Archive(format, &data)
+ contract.Assert(err == nil)
+
return data.Bytes()
}
| [readMap->[Read,GetMap],GetURIURL->[GetURI],Bytes->[Bytes],readText->[GetText],readURI->[GetURIURL],archiveZIP->[Read,Close],ReadSourceArchive->[openURLStream,GetPath,GetURIURL],archiveTarGZIP->[archiveTar],readPath->[GetPath],Seek->[Seek],GetURI->[IsURI],Read->[readURI,IsText,IsMap,readPath,Read,IsPath,IsURI],GetText-... | Bytes returns the archive as bytes in the given format. | Should `Bytes` propagate its failure? |
@@ -4228,6 +4228,11 @@ def polyval(coeffs, x, name=None):
p(x) = coeffs[n-1] + x * (coeffs[n-2] + ... + x * (coeffs[1] +
x * coeffs[0]))
+
+Usage Example:
+ >>> coefficients = [1.0, 2.5, -4.2]
+ >>> x = 5.0
+ >>> y = tf.math.polyval(coefficients, x)
Args:
coeffs: A list of ... | [reduce_max->[_ReductionDims],to_double->[cast],reduce_sum->[_ReductionDims],reciprocal_no_nan->[div_no_nan],scalar_mul_v2->[scalar_mul],tensor_equals->[equal],_ReductionDims->[range],reduce_std->[reduce_variance],reduce_all->[_may_reduce_to_scalar,_ReductionDims],accumulate_n->[add_n,_input_error],truediv->[_truediv_p... | Computes the elementwise value of a polynomial. | You should indent the 'Usage example' and the code on the same level. JuanC |
@@ -77,6 +77,14 @@ func init() {
portMapper = portmap.NewPortMapper()
}
+//TODO: gotta be a better way...
+// type and funcs to provide sorting by created date
+type containerByCreated []*types.Container
+
+func (r containerByCreated) Len() int { return len(r) }
+func (r containerByCreated) Swap(i, j int... | [ContainerResize->[ContainerResize],findPortBoundNetworkEndpoint->[defaultScope],containerStop->[mapPorts,findPortBoundNetworkEndpoint]] | Package private functions ContainerExecCreate creates an exec in a running container. | nope, that's the best way :) |
@@ -268,7 +268,7 @@ public class FileWritingMessageHandler extends AbstractReplyProducingMessageHand
}
protected String getTemporaryFileSuffix() {
- return this.temporaryFileSuffix;
+ return this.temporaryFileNameHelper.toTempFile("", this.evaluationContext);
}
/**
| [FileWritingMessageHandler->[Flusher->[run->[doFlush]],setTaskScheduler->[setTaskScheduler],FileState->[close->[close]],flushIfNeeded->[flushIfNeeded],evaluateDestinationDirectoryExpression->[validateDestinationDirectory]]] | Get the temporary file suffix. | I think this method has to be `@Deprecated` as well |
@@ -51,7 +51,6 @@ class ColorFormatter(logging.Formatter):
color_code = {
"DEBUG": colorama.Fore.BLUE,
- "INFO": "",
"WARNING": colorama.Fore.YELLOW,
"ERROR": colorama.Fore.RED,
"CRITICAL": colorama.Fore.RED,
| [ColorFormatter->[_parse_exc->[_walk_exc,_current_level],_description->[format],format->[format],_is_visible->[_current_level]],LoggerHandler->[emit->[format,handleError],handleError->[LoggingException]]] | This is a class method that will be called when a log entry is not found. Returns a string describing the given log record. | It was never used. |
@@ -812,7 +812,7 @@ void Server::handleCommand_Damage(NetworkPacket* pkt)
<< std::endl;
PlayerHPChangeReason reason(PlayerHPChangeReason::FALL);
- playersao->setHP(playersao->getHP() - damage, reason);
+ playersao->setHP((s32)playersao->getHP() - damage, reason);
SendPlayerHPOrDie(playersao, reason);
}... | [handleCommand_Interact->[process_PlayerPos,checkInteractDistance],handleCommand_PlayerPos->[process_PlayerPos]] | Handle a damage command. This function is called when a new client is connected to a new peer. This is a bit of a hack to make sure that the password is correct. | subtraction of signed from unsigned |
@@ -233,6 +233,10 @@ public class Functions {
// The path starts with a "/" character but does not end with a "/" character.
context.setVariable("rootURL", rootURL);
+ Jenkins jenkins = Jenkins.getInstance();
+ if (jenkins != null) {
+ jenkins.setCachedRootUrl(jenkins.getRoo... | [Functions->[isCollapsed->[isCollapsed],subList->[subList],getSearchURL->[getUrl],xmlEscape->[xmlEscape],getRelativeNameFrom->[getRelativeNameFrom],emptyList->[emptyList],getServerName->[getServerName],getCrumb->[getCrumb],getCurrentDescriptorByNameUrl->[getCurrentDescriptorByNameUrl],setCurrentDescriptorByNameUrl->[ge... | Initializes page variables. | _cough_ - so `setCachedRootURL(String)` is no @Restricted(NoExternalUse) - yet you have a public backdoor here :-) |
@@ -56,6 +56,8 @@ func NewTestServer(c *check.C) (*Config, *Server, CleanupFunc, error) {
return cfg, s, cleanup, nil
}
+var zapLogOnce = new(sync.Once)
+
// NewTestSingleConfig is only for test to create one pd.
// Because PD client also needs this, so export here.
func NewTestSingleConfig(c *check.C) *Config ... | [RemoveAll,Join,Alloc,Sprintf,Adjust,NewDuration,Close,TempDir,Assert,Run,TODO] | NewTestServer creates a new server for testing. NewTestMultiConfig creates a list of configuration objects for a given check. C. | Why do we need to use `new` here? |
@@ -0,0 +1,14 @@
+import time
+import nni
+
+if __name__ == '__main__':
+ print('trial start')
+ params = nni.get_next_parameter()
+ print('params:', params)
+ epochs = 2
+
+ for i in range(epochs):
+ nni.report_intermediate_result(0.1 * (i+1))
+ time.sleep(1)
+ nni.report_final_result(0... | [No CFG could be retrieved] | No Summary Found. | as you added naive_trial.py, what is the original trial.py used for? |
@@ -10,8 +10,7 @@ class ActivitiesService
if filters[:subjects].present?
subjects_with_children = load_subjects_children(filters[:subjects])
if subjects_with_children[:Project]
- add_or = subjects_with_children.length > 1
- query = query.where("project_id IN (?) #{add_or ? 'OR' : ''}", ... | [ActivitiesService->[load_activities->[to_s,limit,exists?,except!,utc,to_a,or,where,flatten,group_by,join,blank?,present?,length,viewable_by_user,order,last,load_subjects_children],load_subjects_children->[to_sym,uniq!,pluck,each,constantize]]] | Load all activities for a user optionally filtered by a list of filters This method returns an array of activities and notif records for the given . | Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. |
@@ -107,6 +107,15 @@ class Exchange(object):
"""exchange ccxt id"""
return self._api.id
+ def set_sandbox(self, api, exchange_config: dict, name: str):
+ if exchange_config.get('sandbox'):
+ if api.urls.get('test'):
+ api.urls['api'] = api.urls['test']
+ ... | [retrier->[wrapper->[wrapper]],Exchange->[cancel_order->[cancel_order],get_trades_for_order->[exchange_has]]] | Exchange ccxt id. | should we add a info logging statement here to allert users that they are on the sandbox? would be helpful for me as i'm playing with ~20 configuration files ... |
@@ -89,8 +89,8 @@ public class ReactiveStreamsConsumer extends AbstractEndpoint implements Integra
Assert.notNull(subscriber, "'subscriber' must not be null");
this.inputChannel = inputChannel;
- if (inputChannel instanceof NullChannel && logger.isWarnEnabled()) {
- logger.warn("The consuming from the NullCh... | [ReactiveStreamsConsumer->[onInit->[onInit],MessageHandlerSubscriber->[start->[start],isRunning->[isRunning],stop->[stop]],getOutputChannel->[getOutputChannel],SubscriberDecorator->[hookOnSubscribe->[onSubscribe],hookOnNext->[onNext],hookOnComplete->[onComplete]]]] | Construct a new ReactiveStreamsConsumer for a channel based on a message handler. | We don't need `Supplier` wrapper here: the message is just plain string constant. The target logging system still checks its `enabled` before printing the message. And yes: that `isWarnEnabled()` was really an overhead |
@@ -60,6 +60,7 @@ func TestJsonSchemaKeywordLimitation(t *testing.T, fieldPaths []string, schema s
mapping := []Mapping{
{"errors.context", "context"},
{"transactions.context", "context"},
+ {"errors.transaction.id", "transaction.id"},
{"errors", "error"},
{"transactions.spans", "span"},
{"transaction... | [Size,Difference,HasPrefix,Add,Error,Validate,New,Nil,Equal,Contains,NoError,Union,NewDecoder,NewReader,SymmetricDifference,Sprintf,Decode,List,Replace,Fail] | TestJsonSchemaKeywordLimitation tests if the given field paths are present in the given JSON payload Union returns a union of mappedSchemaNames and exceptions. | @roncohen: I wasn't that comfortable with this, any way to do this better? |
@@ -288,11 +288,13 @@ class StorageAccountHostsMixin(object): # pylint: disable=too-many-instance-att
boundary="batch_{}".format(uuid4())
)
- pipeline_response = self._pipeline.run(
- request, **kwargs
- )
- response = pipeline_response.http_response
+ err... | [StorageAccountHostsMixin->[close->[close],__exit__->[__exit__],__enter__->[__enter__]],TransportWrapper->[send->[send]]] | Send a batch request to the batch service. | Are we ever hitting this line? |
@@ -939,6 +939,8 @@ export const adConfig = {
consentHandlingOverride: true,
},
+ 'torimochi': {},
+
'triplelift': {},
'trugaze': {
| [No CFG could be retrieved] | A list of urls for a specific sequence number. Server - side API for Phoenix. | So I noticed here you are not implementing `renderStartImplemented`. If possible, could you please implement this? It helps us serve ads as fast as possible to our users, and gives us some big performance gains. Let me know what you think. Thank you! |
@@ -909,4 +909,9 @@ public class ConfigurationKeys {
public static final String GIT_MONITOR_CONFIG_BASE_DIR = "configBaseDirectory";
public static final String GIT_MONITOR_POLLING_INTERVAL = "pollingInterval";
public static final String GIT_MONITOR_BRANCH_NAME = "branchName";
+
+ /**
+ * Configuration relat... | [ConfigurationKeys->[name,toString,toMillis]] | GITMONITOR properties. | Why is this not in `ServiceConfigKeys` or `DagManager`? And maybe `dagManager.checkpointDir`. I see that the name`dagManager` is used in `ServiceConfigKeys`. Also, is this being used? |
@@ -403,6 +403,9 @@ public class UnpackContent extends AbstractProcessor {
attributes.put(FRAGMENT_ID, fragmentId);
attributes.put(FRAGMENT_INDEX, String.valueOf(++fragmentCount));
+ final String encryptionMethod = zipEnt... | [UnpackContent->[ZipUnpacker->[unpack->[process->[fileMatches]]],TarUnpacker->[unpack->[process->[fileMatches]]]]] | Unpacks a file from a source file into a list of unpacked files. | Can this value be `null` if there is no/unknown encryption method used? |
@@ -221,7 +221,7 @@ static void host_dma_cb(void *arg, enum notify_id type, void *data)
struct host_data *hd = comp_get_drvdata(dev);
uint32_t bytes = next->elem.size;
- comp_cl_dbg(&comp_host, "host_dma_cb() %p", (uintptr_t)&comp_host);
+ comp_cl_dbg(&comp_host, "host_dma_cb() %p", &comp_host);
/* update pos... | [No CFG could be retrieved] | Callback for DMA complete transfer of a component. calculate minimum size of data to copy from one shot. | So Zephyr tracing system actually supports pointers directly? |
@@ -216,7 +216,9 @@ public class BulkServiceImpl implements BulkService {
}
Thread.sleep(100);
} while (deadline > System.currentTimeMillis());
- log.debug("await timeout for commandId(" + commandId + ") after " + duration.toMillis() + " ms");
+ if (log.isDebugEnabled())... | [BulkServiceImpl->[await->[getStatus,getKvStore],abort->[getStatus,setStatus],getStatuses->[getKvStore]]] | This method waits for a bulk command to complete or abort. | Unless you want to easily backport, you can use log4j2 logger with lambdas now. |
@@ -65,8 +65,13 @@ public class FakePrimaryDataStoreDriver implements PrimaryDataStoreDriver {
}
@Override
- public long getVolumeSizeIncludingHypervisorSnapshotReserve(Volume volume, StoragePool pool) {
- return volume.getSize();
+ public long getDataObjectSizeIncludingHypervisorSnapshotReserv... | [FakePrimaryDataStoreDriver->[getVolumeSizeIncludingHypervisorSnapshotReserve->[getSize],takeSnapshot->[setAnswer,setResult,SnapshotObjectTO,CreateObjectAnswer,setPath,toString,complete,CreateCmdResult],deleteAsync->[CommandResult,complete,setSuccess]]] | This method is called when a snapshot is requested. | Minor Nit: `0` is an integer value. `0L` is a long value. Java automatically widens the value, but it is more hygienic to match the type for a constant value. |
@@ -1875,6 +1875,9 @@ def plot_compare_evokeds(evokeds, picks=None, gfp=False, colors=None,
_validate_type(vlines, (list, tuple), "vlines", "list or tuple")
picks = [] if picks is None else picks
+ picked_a_type = isinstance(picks, str) and picks in _DATA_CH_TYPES_SPLIT
+ if title is None and picked_a... | [plot_evoked_joint->[plot_evoked_joint,_plot_evoked],_combine_grad->[pair_and_combine],_setup_styles->[convert_colors,_aux_setup_styles],plot_evoked_image->[_plot_evoked],_handle_spatial_colors->[_plot_legend],_plot_lines->[_rgb],plot_compare_evokeds->[_format_evokeds_colors,_combine_grad,_setup_styles,_plot_legend,_ch... | Plot evoked time courses for one or more conditions and or more data channels. Plots a single with the given colors and lines. This function is called by the base class to plot a single - dimensional sequence of conditions that Plots a single . | Why is the type check necessary? It's only gonna be in _DATA_CH_TYPES_SPLIT if it's a str anyways, and if it's not a str, it'll simply return false right? And then you can drop 1878 and just have: `if title is None and picks in _DATA_CH_TYPES_SPLIT:` |
@@ -14,6 +14,13 @@ public interface TimeExtractor<REQUEST, RESPONSE> {
/** Returns the timestamp marking the start of the request processing. */
Instant extractStartTime(REQUEST request);
- /** Returns the timestamp marking the end of the response processing. */
+ /**
+ * Returns the timestamp marking the e... | [No CFG could be retrieved] | Extract start and end time from REQUEST. | WDYT about moving it to class level? There are some metrics (`http.server.active_requests`) that receive new values on both `start()` and `end()`. |
@@ -219,6 +219,9 @@ func (h *chatLocalHandler) GetThreadLocal(ctx context.Context, arg chat1.GetThre
return chat1.GetThreadLocalRes{}, err
}
+ // Run type filter if it exists
+ thread.Messages = chat.FilterByType(thread.Messages, arg.Query)
+
return chat1.GetThreadLocalRes{
Thread: thread,
RateLimits... | [addPrevPointersToMessage->[GetThreadLocal],GetInboxSummaryForCLILocal->[GetInboxLocal,aggRateLimits],GetConversationForCLILocal->[GetThreadLocal,GetInboxLocal,aggRateLimits],prepareMessageForRemote->[addSenderToMessage,addPrevPointersToMessage],unboxMessages->[getSenderInfoLocal],getSecretUI->[getSecretUI],getSenderIn... | GetThreadLocal implements ChatHandler. GetThreadLocal. | If we make this filter accept boxed messages, and move this to before `unboxThread`, I think we can just use the message type from the server header. (Or did you want to use unboxed version to make it less prone to server abuse?) |
@@ -244,6 +244,11 @@ func (shard *indexShard) delete(labels labels.Labels, fp model.Fingerprint) {
j := sort.Search(len(fingerprints.fps), func(i int) bool {
return fingerprints.fps[i] >= fp
})
+
+ // see if search didn't find fp which matches the condition which means we don't have to do anything.
+ if j <... | [Add->[HashFP,add],labelNames->[Strings,RUnlock,RLock],labelValues->[Strings,RUnlock,RLock],add->[Sort,Lock,Unlock,Search],Lookup->[lookup],Delete->[HashFP,delete],lookup->[FindSetMatches,Sort,RLock,Matches,RUnlock],LabelValues->[labelValues],LabelNames->[labelNames],delete->[Lock,Unlock,Search],Sizeof] | delete removes the given label from the indexShard. | It seems to me that this logic is now inverted... if this condition is true, we should delete. What am I missing? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.