patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -197,4 +197,11 @@ class UserCardSerializer < BasicUserSerializer
def card_background_upload_url
object.card_background_upload&.url
end
+
+ private
+
+ def custom_field_keys
+ # Can be extended by other serializers
+ User.whitelisted_user_custom_fields(scope)
+ end
end
| [UserCardSerializer->[featured_topic->[featured_topic],bio_excerpt->[bio_excerpt],website->[website],time_read->[time_read],location->[location],recent_time_read->[recent_time_read],staff_attributes,untrusted_attributes]] | Returns the url of the last successful card upload. | If it's meant to be extended shouldn't the method be `protected`? |
@@ -32,6 +32,7 @@ def run_configure_method(conanfile, down_options, down_ref, ref):
conanfile.settings.validate() # All has to be ok!
conanfile.options.validate()
# Recipe provides its own name if nothing else is defined
+ # FIXME: This shouldn't be here
conanfile.provides = ... | [run_configure_method->[propagate_upstream,hasattr,configure,validate,conanfile_exception_formatter,config_options,str,config,isinstance,warn,conan_v2_behavior,make_tuple,_validate_fpic,get_env_context_manager],_validate_fpic->[get_safe,hasattr,error,get_env,ConanInvalidConfiguration]] | Run all the config - related functions for the given conanfile object. | Where instead? `init()` function closer to `set_name`? |
@@ -0,0 +1,16 @@
+<?php
+
+require 'includes/graphs/common.inc.php';
+
+$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/saf.rrd';
+
+if (file_exists($rrdfilename)) {
+ $rrd_options .= ' COMMENT:" Now Min Max\r" ';
+ $rrd_options .= ' DEF:modemRadialMSE='.$rrdfilename.':modemRadialMSE:A... | [No CFG could be retrieved] | No Summary Found. | Should be using rrd_name() to generate the filename. |
@@ -96,7 +96,9 @@
using (var stream = new MemoryStream(physicalMessage.Body))
{
var messageTypes = messageMetadata.Select(metadata => metadata.MessageType).ToList();
- var messageSerializer = deserializerResolver.Resolve(physicalMessage.Headers[Headers.ContentTy... | [DeserializeLogicalMessagesConnector->[Extract->[GetMessageMetadata,WarnFormat,Add,TryGetValue,DoesTypeHaveImplAddedByVersion3,MessageId,Resolve,Count,IsV4OrBelowScheduledTask,ToList,ContentType,GetMesssageIntent,Publish,EnclosedMessageTypes,Headers,Body,Split,Length],IsV4OrBelowScheduledTask->[StartsWith],ExtractWithE... | Extracts a list of logical messages from the given physical message. | Should we throw a better exception here in cases where content type is not known and we attempt the default one and that still fails ? |
@@ -177,7 +177,11 @@ public class RayletClientImpl implements RayletClient {
}
}
// Deserialize return ids
- UniqueId[] returnIds = UniqueIdUtil.getUniqueIdsFromByteBuffer(info.returnsAsByteBuffer());
+ UniqueId[] uniqueIds = UniqueIdUtil.getUniqueIdsFromByteBuffer(info.returnsAsByteBuffer());
+ ... | [RayletClientImpl->[generateTaskId->[getBytes,UniqueId,nativeGenerateTaskId],notifyActorResumedFromCheckpoint->[getBytes,nativeNotifyActorResumedFromCheckpoint],parseTaskSpecFromFlatbuffer->[language,checkArgument,TaskSpec,getRootAsTaskInfo,returnsAsByteBuffer,actorHandleIdAsByteBuffer,order,put,actorIdAsByteBuffer,rem... | Parse a task spec from a Flatbuffer. Deserialize task spec. | This is a bit weird. What about having another helper function that converts `ByteBuffer` to `List<byte[]>`, and then convert each `byte[]` to `ObjectId`? |
@@ -241,8 +241,8 @@ public class ExecutableStageDoFnOperator<InputT, OutputT> extends DoFnOperator<I
return StateRequestHandlers.delegateBasedUponType(handlerMap);
}
- private static class BagUserStateFactory
- implements StateRequestHandlers.BagUserStateHandlerFactory {
+ private static class BagUserS... | [ExecutableStageDoFnOperator->[ensureStateCleanup->[finishBundle->[finishBundle,setCurrentKey],getCurrentKey],BagUserStateFactory->[forUserState->[clear->[clear]]],fireTimer->[fireTimer,setCurrentKey],CleanupTimer->[currentInputWatermarkTime->[currentInputWatermarkTime],setForWindow->[setTimer,setCurrentKey]],dispose->... | Returns a state handler based on the given executable stage. | Why not make this `ByteString` instead of `K extends ByteString`? |
@@ -1023,8 +1023,15 @@ func (i *Ingester) closeAllTSDB() {
}(userDB)
}
- // Wait until all Close() completed
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ i.closeAllBackfillTSDBs()
+ }()
+
i.userStatesMtx.Unlock()
+
+ // Wait until all Close() completed
wg.Wait()
}
| [shipBlocks->[getTSDB],runConcurrentUserWorkers->[getTSDBUsers],v2Push->[setLastUpdate],getOrCreateTSDB->[getTSDB],compactBlocks->[isIdle,getTSDB],v2LifecyclerFlush->[shipBlocks,compactBlocks],createTSDB->[setLastUpdate],openExistingTSDB->[createTSDB]] | closeAllTSDB closes all TSDB. | I think we should do it after `i.userStatesMtx.Unlock()`. Also to further simplify the code, I would run `wg.Wait()` to wait until all user TSDBs are closed, and then I would call `closeAllBackfillTSDBs()` outside of any go routine. |
@@ -33,6 +33,7 @@ if IS_PY3:
get_ident = threading.get_ident
intern = sys.intern
file_replace = os.replace
+ asbyteint = int
def erase_traceback(exc_value):
"""
| [benchmark->[BenchmarkResult],finalize->[_exitfunc->[_select_for_exit],__init__->[_Info]],stream_list->[sublist_iterator],ConfigOptions->[unset->[set],copy->[copy],__setattr__->[_check_attr],__getattr__->[_check_attr]],total_ordering->[_is_inherited_from_object,_not_op,_op_or_eq,_not_op_or_eq,_not_op_and_not_eq,_op_and... | Erase the traceback and hanging locals from the given exception instance. | Don't think this is needed? |
@@ -389,8 +389,6 @@ QString WbPerspective::getActionName(WbAction::WbActionKind action) {
return "objectMoveDisabled";
case WbAction::DISABLE_FORCE_AND_TORQUE:
return "forceAndTorqueDisabled";
- case WbAction::DISABLE_FAST_MODE:
- return "fastModeDisabled";
default:
return QString... | [No CFG could be retrieved] | Splits the given text into a list of unique names. | The `DISABLE_3D_VIEW` status should be added in the perspective file (as it was the case for the `DISABLE_FAST_MODE` option. |
@@ -183,8 +183,7 @@ class RepositoryDatatable < CustomDatatable
# number of samples/all samples it's dependant upon sort_record query
def fetch_records
records = get_raw_records
- records = filter_records(records) if dt_params[:search].present? &&
- dt_params[:searc... | [RepositoryDatatable->[searchable_columns->[filter_search_array],new_sort_column->[split,to_i,join],assigned_row->[include?],repository_columns_sort_by->[times],sort_assigned_records->[send,join,order,pluck],sortable_columns->[push],data->[display_tooltip,id,created_at,assigned_row,custom_auto_link,data,escape_input,ed... | fetch_records - Fetch records with type. | this will evaluate always to true because always get this hash {"value"=>"", "regex"=>"false"} so we have to check for the "value" attribute. |
@@ -26,6 +26,9 @@ type config struct {
ContentType string `config:"content_type"`
SecretHeader string `config:"secret.header"`
SecretValue string `config:"secret.value"`
+ HmacHeader string `config:"hmac.header"`
+ HmacPrefix string ... | [Validate->[Valid,New]] | Config contains information about the HTTP response of a single . returns an error if both secret. header and secret. value are set. | At some point we should consider to introduce structs for Secret or HMAC :) nit: `HMACX`, not `HmacX` (common go naming convention) |
@@ -51,4 +51,11 @@ public abstract class Context {
public abstract void sendStickyBroadcastAsUser(Intent intent, UserHandle user);
public abstract void sendStickyOrderedBroadcast(Intent intent, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, Bundle initialExtras);
publ... | [No CFG could be retrieved] | This abstract implementation is used to send a broadcast to a user in the order they were received. | @quentin-jaquier-sonarsource it should be `android.database.sqlite.SQLiteDatabase` and not `net.sqlcipher.database.SQLiteDatabase` which is a 3rd party dependency. |
@@ -41,8 +41,8 @@ module AutomatedTestsHelper
link_to_function name do |page|
test_file = render(partial: 'test_file',
locals: {form: form,
- test_file: TestFile.new,
- file_type: 'parse'})
+ ... | [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. | Space inside } missing. |
@@ -49,6 +49,10 @@ if ($device['os'] == 'openbsd') {
include 'includes/discovery/sensors/openbsd.inc.php';
}
+if ($device['os'] == 'ciena-sds') {
+ require 'includes/discovery/sensors/dbm/ciena.inc.php';
+}
+
if (strstr($device['hardware'], 'Dell')) {
include 'includes/discovery/sensors/fanspeed/dell.i... | [No CFG could be retrieved] | This function is called by the SNMP layer to process the data. The functions below are defined in the class description. | You don't need this check, please remove this `if()` block |
@@ -646,8 +646,9 @@ class ReceivedMessage(PeekMessage):
self._check_live(MESSAGE_DEAD_LETTER)
details = {
- MGMT_REQUEST_DEAD_LETTER_REASON: str(reason) if reason else "",
- MGMT_REQUEST_DEAD_LETTER_DESCRIPTION: str(description) if description else ""}
+ RECEIVER_LIN... | [ReceivedMessage->[abandon->[_settle_message,_check_live],defer->[_settle_message,_check_live],_settle_message->[_settle_via_receiver_link,_settle_via_mgmt_link],dead_letter->[_settle_message,_check_live],complete->[_settle_message,_check_live],renew_lock->[_check_live]],Message->[_build_message->[Message]],BatchMessag... | Moves the message to the Dead Letter queue. Settle a message that was not sent by the client. | Structural nit: settle_message does both receiver and mgmt based dead-lettering. The way we're populating this via the full dictionary results in having to extract the properties using the RECEIVER_LINK consts in the mgmt flow, (which confused me a tiny bit when first reading that section without this context) and requ... |
@@ -589,9 +589,9 @@ func (b *cloudBackend) makeProgramUpdateRequest(stackName tokens.QName, proj *wo
Color: colors.Raw, // force raw colorization, we handle colorization in the CLI
DryRun: opts.DryRun,
Parallel: opts.Parallel,
- ShowConfig: opts.ShowConfi... | [GetStack->[Name],makeProgramUpdateRequest->[Name]] | makeProgramUpdateRequest creates a new update program request from the given parameters. | From the description, it wasn't immediately apparent why this became legacy. Can we just remove it? |
@@ -7,13 +7,8 @@ HASH_DIR_SUFFIX = ".dir"
@dataclass
class HashInfo:
- PARAM_SIZE = "size"
- PARAM_NFILES = "nfiles"
-
name: Optional[str]
value: Optional[str]
- size: Optional[int] = field(default=None, compare=False)
- nfiles: Optional[int] = field(default=None, compare=False)
obj_name:... | [HashInfo->[__hash__->[hash],isdir->[endswith],__bool__->[bool],from_dict->[copy,cls,pop,items],to_dict->[OrderedDict],field]] | Returns True if the value is a sequence of integers. | `obj_name` is the last part of `HashInfo` that will need to go away in the near future. We've introduced it temporarily during transfer refactor and will soon be ready to get rid of it in favor of oid-name mapping or just plain removal. |
@@ -262,8 +262,9 @@ public class IndexedTableJoinMatcher implements JoinMatcher
final IndexedInts row = selector.getRow();
if (row.size() == 1) {
- final String key = selector.lookupName(row.get(0));
- return index.find(key).iterator();
+ int dimensionId = row.get(0);
+ ... | [IndexedTableJoinMatcher->[advanceCurrentRow->[nextInt,hasNext],nextMatch->[hasMatch]]] | This method is called when a dimension selector is not supported by this join system. | This is only safe when the selector has a 'real' dictionary, i.e. when `selector.getValueCardinality()` does not return `DimensionSelector.CARDINALITY_UNKNOWN`. If it is unknown then the ids are not valid outside the context of a specific row. So, in that case you'll need to fall back to the slower code. |
@@ -103,6 +103,7 @@ public abstract class DirScanner implements Serializable {
private final String includes, excludes;
private boolean useDefaultExcludes = true;
+ private boolean followSymlinks = true;
public Glob(String includes, String excludes) {
this.includes = i... | [DirScanner->[Full->[scan->[scanSingle,scan]],Glob->[scan->[scanSingle,scan]],Filter->[scan->[scan]]]] | Scans a directory for a single node. privatat is the only file that is descendant of the current project. | AIUI, when this is `true` the behavior should be identical to before this change, right? It seems a little inconsistent to change the behavior for `FilePath#tar` but not `FilePath#archive`, should we change that one as well? (I'm not sure which behavior would make more sense as a default for `FilePath#copyRecursiveTo`.... |
@@ -830,4 +830,9 @@ public class Paragraph extends Job implements Cloneable, JsonSerializable {
return Note.getGson().fromJson(json, Paragraph.class);
}
+ @Override
+ public void postJsonDeser() {
+ parseText();
+ }
+
}
| [Paragraph->[toJson->[toJson],completion->[setText,getBindedInterpreter,completion],createOrGetApplicationState->[getApplicationId],ParagraphRunner->[run->[run]],equals->[equals],setAuthenticationInfo->[getUser],getInterpreterContextWithoutRunner->[getText,setAuthenticationInfo,getTitle,getAuthenticationInfo,getUser],s... | Deserialize a Paragraph from JSON. | When this method is called ? |
@@ -326,3 +326,18 @@ func (v *CmdLaunchdAction) Run() error {
return nil
}
+
+func RestartLaunchdService(g *libkb.GlobalContext, label string) error {
+ launchService := launchd.NewService(label)
+ launchService.SetLogger(g.Log)
+ err := launchService.Restart()
+ if err != nil {
+ return err
+ }
+ launchdStatus, ... | [Run->[Uninstall,Fprintf,Stop,ListServices,G,Restart,MarshalIndent,Start,Errorf,ShowServices,ServiceStatus],ParseArgv->[NewServiceLabel,GetRunMode,Args,G,DefaultServiceLabel,String,Errorf,DefaultKBFSLabel],showServices->[GetTerminalUI,Printf,ListServices,G,StatusDescription],ShowServices->[showServices],Args,Install,Se... | Run launchd action. | won't this be needed for `keybase ctl restart` too? |
@@ -1,10 +1,14 @@
# coding=utf-8
-# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
+# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, prin... | [PathDeps->[console_output->[is_safe->[hasattr],is_safe,set]]] | Return a list of paths containing BUILD files that the target depends on. | nit: I remember in one of my previous reviews, you suggest using "getattr" instead of "hasattr". I don't quite remember the reasoning behind it, but just wonder if it applies here. |
@@ -181,6 +181,10 @@ class App extends Component {
export default withIsMobile(withWeb3(withCreatorConfig(withRouter(App))))
require('react-styl')(`
+ html, body
+ -webkit-overflow-scrolling: touch
+ overflow: auto
+ height: 100%
.app-spinner
position: fixed
top: 50%
| [No CFG could be retrieved] | Component that exports a sequence number. | Do we need this? What's it for? |
@@ -304,7 +304,7 @@ set_property(TARGET {name}::{name}
find_lib = target_template.format(name=pkg_findname, deps=deps,
build_type_suffix=build_type_suffix,
deps_names=deps_names)
- ret["... | [CMakeFindPackageMultiGenerator->[_config->[find_transitive_dependencies,format,join],content->[_get_components,render,_config,_get_name,extend,str,_get_filename,_get_require_name,format,DepsCppCmake,join,reversed,_validate_components,lower,get_public_deps],Template,dedent]] | Return a dict of all cmake - related information. Generate a list of all components that can be found in CMake. | so, configuration no longer matches build type? |
@@ -168,6 +168,7 @@ def remove_weight_norm(*args):
@deprecated(
since="2.0.0",
update_to="paddle.nn.utils.weight_norm",
+ level=1,
reason="weight_norm in paddle.nn will removed in future")
def weight_norm(*args):
'''
| [diag_embed->[diag_embed],remove_weight_norm->[remove_weight_norm],weight_norm->[weight_norm]] | Weight normalization function for paddle. nn. utils. weight_norm. | will be removed |
@@ -248,7 +248,9 @@ class ReadOnlyMiddleware(MiddlewareMixin):
if isinstance(exception, mysql.OperationalError):
if request.is_api:
return self._render_api_error()
- return render(request, 'amo/read-only.html', status=503)
+ response = render(request, 'amo/re... | [SetRemoteAddrFromForwardedFor->[process_request->[is_request_from_cdn]],CommonMiddleware->[process_request->[safe_query_string]]] | Renders a 404 if the user is read - only. | if you were in the mood for refactoring, these lines are a bit DRYy with `process_request` |
@@ -604,6 +604,8 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) {
while(optionGroupsCache.length > groupIndex) {
optionGroupsCache.pop()[0].element.remove();
}
+
+ renderScheduled = false;
}
}
}
| [No CFG could be retrieved] | Provides a directive to display a list of options that can be selected or selected. Private function to handle the case where the select is in optgroup. | this should be the first thing in the render method in case an exception is thrown in the body |
@@ -706,6 +706,8 @@ type Volume struct {
VolumeSize string
// Encrypted determines if the volume should be encrypted.
Encrypted *bool
+ // Interface is the interface of local ssd disk.
+ Interface *string
}
// CRI contains information about the Container Runtimes.
| [FromInt] | The type of the node in the system. Set the default worker max unavailable value. | Should we call this `LocalSSDInterface` to make it more clear what this field is used for? |
@@ -417,7 +417,7 @@ func makeRuntime(runtime *Runtime) (err error) {
// Setting signaturepolicypath
ir.SignaturePolicyPath = runtime.config.SignaturePolicyPath
defer func() {
- if err != nil {
+ if err != nil && store != nil {
// Don't forcibly shut down
// We could be opening a store in use by another ... | [Shutdown->[ID,Wrapf,Unlock,AllContainers,Shutdown,Close,Lock,StopWithTimeout,Errorf],GetConfig->[Copy,RUnlock,To,RLock],Info->[Wrapf,GetInsecureRegistries,storeInfo,GetRegistries,hostInfo],refresh->[ID,Wrapf,Unlock,AllContainers,Close,Lock,Errorf,AllPods,OpenFile,refresh,Refresh],generateName->[LookupContainer,Cause,L... | Find a conmon binary that can be used to run a container. Initialization of the container. | Will the nil check work here? Store is an interface, not a pointer, so you usually can't check against nil directly |
@@ -186,6 +186,9 @@ func buildRoute(pathMatchTypeType trafficpolicy.PathMatchType, path string, meth
ClusterSpecifier: &xds_route.RouteAction_WeightedClusters{
WeightedClusters: buildWeightedCluster(weightedClusters, totalWeight, direction),
},
+ HostRewriteSpecifier: &xds_route.RouteAction_HostRewri... | [Error,IsWASMStatsEnabled,GetLocalClusterNameForServiceCluster,Sprintf,Stable,Msgf,StatsHeaders,TotalClustersWeight,Err,Iter] | buildOutboundRoutes builds a list of routes based on the given parameters. buildWeightedCluster builds a weighted cluster from a set of weights. | I missed this change. We should not be rewriting the host header in any way here. This needs to be removed. |
@@ -160,10 +160,7 @@ class PluginInstallerTest extends TestCase
$installer->install($this->repository, $this->packages[3]);
$plugins = $this->pm->getPlugins();
- $this->assertEquals('plugin1', $plugins[0]->name);
- $this->assertEquals('installer-v4', $plugins[0]->version);
- $th... | [PluginInstallerTest->[testPluginConstraintWorksOnlyWithCertainAPIVersion->[setPluginApiVersionWithPlugins],testStarPluginVersionWorksWithAnyAPIVersion->[setPluginApiVersionWithPlugins],testQueryingWithNonExistingOrWrongCapabilityClassTypesThrows->[testQueryingWithInvalidCapabilityClassNameThrows],testPluginRangeConstr... | Test install multiple plugins. | This does not assert anymore that the plugins are the right ones |
@@ -93,12 +93,16 @@ class _ManagedIdentityBase(object):
# retry is the only IO policy, so its class is a kwarg to increase async code sharing
retry_policy = kwargs.pop("retry_policy", RetryPolicy) # type: ignore
- args = kwargs.copy() # combine kwargs and default retry settings in a Python ... | [ManagedIdentityCredential->[get_token->[AccessToken],__new__->[ImdsCredential,MsiCredential,get]],ImdsCredential->[get_token->[get_cached_token,CredentialUnavailableError,request_token,len,endswith,ValueError],__init__->[super]],MsiCredential->[get_token->[get_cached_token,_request_app_service_token,CredentialUnavaila... | Build a default configuration for the credential s HTTP pipeline. | We use black with line length 120 (`black -l 120`), could you please format again? |
@@ -229,7 +229,7 @@ func execPlugin(bin string, pluginArgs []string, pwd string) (*plugin, error) {
// Flow the logging information if set.
if logging.LogFlow {
if logging.LogToStderr {
- args = append(args, "--logtostderr")
+ args = append(args, "-logtostderr")
}
if logging.Verbose > 0 {
args = ap... | [Close->[Append,IgnoreError,Kill,Close,KillChildren],Error->[Sprintf,String],Close,WithInsecure,RegisterProcessGroup,StdinPipe,StderrPipe,Code,Atoi,Itoa,Dial,IgnoreError,Start,WaitForStateChange,Errorf,Assert,AddInt32,TrimSpace,Wrapf,Invoke,Infof,ReadString,Kill,V,StdoutPipe,Read,GetState,Command,WithUnaryInterceptor,N... | execPlugin executes a plugin command and returns the plugin info. RegisterProcessGroup registers a process group with the plugin. | All the plugins were using `flag` directly (and hence calling `flag.Parse()`), and this is the preferred form for options there. |
@@ -495,8 +495,8 @@ public class DruidSchema extends AbstractSchema
false
);
- // Use SystemAuthorizationInfo since this is a query generated by Druid itself.
- return queryLifecycleFactory.factorize().runSimple(segmentMetadataQuery, SystemAuthorizationInfo.INSTANCE, null);
+ // This is an inte... | [DruidSchema->[getFunctionMultimap->[build,put,entrySet,builder],removeSegment->[remove,debug,notifyAll,info,get,getDataSource,isEmpty,add,getIdentifier],buildDruidTable->[TableDataSource,getRowOrder,build,get,DruidTable,values,builder,forEach,getColumnType,putIfAbsent],runSegmentMetadataQuery->[getOnlyElement,SegmentM... | Runs a SegmentMetadataQuery for the given list of segments. | Can this use auth + the internal system identity? In the interests of minimizing the number of code paths. Also, I think it'll end up being nice for every query to have an identity attached to it, for things like request logs and metrics. |
@@ -971,7 +971,7 @@ class RestAPI: # pragma: no unittest
def get_raiden_internal_events_with_timestamps(
self, limit: Optional[int], offset: Optional[int]
) -> Response:
- assert self.raiden_api.raiden.wal
+ assert self.raiden_api.raiden.wal, "Raiden Service has to be initialized"
... | [endpoint_not_found->[api_error],RestAPI->[initiate_payment->[api_error,api_response],get_raiden_internal_events_with_timestamps->[api_response],mint_token_for->[mint_token_for,api_error,api_response],connect->[api_error,api_response],get_connection_managers_info->[api_response],get_raiden_events_payment_history_with_t... | Get events with timestamps. | I wonder if we even should have this check here |
@@ -178,7 +178,9 @@ define([
var TRANSLUCENCY_BY_DISTANCE_INDEX = Billboard.TRANSLUCENCY_BY_DISTANCE_INDEX = 12;
var PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX = Billboard.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX = 13;
var DISTANCE_DISPLAY_CONDITION = Billboard.DISTANCE_DISPLAY_CONDITION = 14;
- Billboard.NUMBE... | [No CFG could be retrieved] | Constructor for the object that represents a single object in the Billboard. Defines the properties of the Billboard that are used to show or hide the . | Do you have ideas for avoiding going above 16 attributes? |
@@ -36,11 +36,13 @@ public class HttpRequestMultipleValueHeadersTestCase extends AbstractHttpRequest
public SystemProperty host = new SystemProperty("host", "localhost");
@Rule
public SystemProperty encoding = new SystemProperty("encoding" , CHUNKED);
+ @Rule
+ public DynamicPort port = new Dynamic... | [HttpRequestMultipleValueHeadersTestCase->[preservesOrderAndFormatWithMultipleValuedOutboundProperties->[get]]] | Returns the configuration file name for the HTTP request headers configuration. | is this file still being used elsewhere? if not delete it |
@@ -214,6 +214,11 @@ export default class AlwaysOnTop extends Component<*, State> {
api.on('videoMuteStatusChanged', this._videoMutedListener);
api.on('audioAvailabilityChanged', this._audioAvailabilityListener);
api.on('videoAvailabilityChanged', this._videoAvailabilityListener);
+ ap... | [No CFG could be retrieved] | Handles mouse over event of the component. This method is called when the component is unmounted. | Side thought: it'd be nice if these event names were constants on the api. |
@@ -19,5 +19,5 @@ interface CacheClearerInterface
/**
* Clear the website cache.
*/
- public function clear();
+ public function clear(/* ?string $webspaceKey = null */);
}
| [No CFG could be retrieved] | Clear the cache. | same need to be done in the implemented class as the class is not final and could be extended |
@@ -28,8 +28,11 @@ class BaseObject
public static function getApp()
{
if (empty(self::$app)) {
- $logger = $logger = LoggerFactory::create('app');
- self::$app = new App(dirname(__DIR__), $logger);
+ $basedir = BasePath::create(dirname(__DIR__));
+ $configLoader = new Config\ConfigCacheLoader($basedir);
... | [No CFG could be retrieved] | Get the App object. | I think we're at the point where we don't need this implicit App instantiation, since all the entry points have their own App instance. I'd be in favor of throwing an Exception if app isn't defined at this point. |
@@ -1340,6 +1340,17 @@ class _OutputProcessor(OutputProcessor):
self.per_element_output_counter.add_input(0)
return
+ if isinstance(results, (dict, str, unicode, bytes)):
+ results_type = type(results).__name__
+ raise TypeCheckError(
+ 'Returning a %s from a ParDo or FlatMap is ... | [PerWindowInvoker->[_try_split->[compute_whole_window_split],current_element_progress->[_scale_progress],_invoke_process_per_window->[get_restriction_provider],_should_process_window_for_sdf->[invoke_create_watermark_estimator,invoke_create_tracker],__init__->[is_stateful_dofn,is_splittable_dofn,ArgPlaceholder],try_spl... | Process the results of the computation. This method is called when a windowed value is received from the tag. | This check is slow. Let's guard this or remove it (as it will still fail below). |
@@ -162,13 +162,14 @@ public class ExecutableStageDoFnOperator<InputT, OutputT> extends DoFnOperator<I
@Override
public void dispose() throws Exception {
- // DoFnOperator generates another "bundle" for the final watermark
- super.dispose();
// Remove the reference to stageContext and make stageConte... | [ExecutableStageDoFnOperator->[dispose->[dispose],addSideInputValue->[addSideInputValue],open->[open]]] | This method is called when the watermark is being processed. | LGTM, let's add the JIRA link for non-intuitive DoFnOperator behavior as well. |
@@ -196,7 +196,7 @@ ipcMain.on('CHROME_TABS_SEND_MESSAGE', function (event, tabId, extensionId, isBa
contents._sendInternalToAll(`CHROME_RUNTIME_ONMESSAGE_${extensionId}`, senderTabId, message, resultID)
ipcMain.once(`CHROME_RUNTIME_ONMESSAGE_RESULT_${resultID}`, (event, result) => {
- event.sender._sendInte... | [No CFG could be retrieved] | This function is called when the user clicks on the message in the extension. Get the code of the extension. | does `CHROME_TABS_EXECUTESCRIPT` below also need to use `_reply`? |
@@ -71,7 +71,9 @@ class CmdConfig(CmdBaseNoRepo):
prefix = self._config_file_prefix(
self.args.show_origin, self.config, level
)
- logger.info("\n".join(self._format_config(conf, prefix)))
+ configs = list(self._format_config(conf, prefix))
+ i... | [CmdConfig->[_check->[ConfigError],_config_file_prefix->[relpath,find_root],_get->[_check,_config_file_prefix,read,format,info],_list->[any,error,_config_file_prefix,read,_format_config,join,info],run->[any,error,_get,_list,_set],_set->[_check,warning,edit],_format_config->[flatten],__init__->[super,Config]],add_parser... | List option. | `conf` might turn out to be empty. Before we were just printing empty lines for some levels. It was easier to fix in the PR itself. |
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using System.Reflection;
using Dynamo.Extensions;
using Dynamo.Logging;
using Dynamo.Models;
| [ExtensionTests->[RegisterService->[RegisterService]]] | Package private API for testing extensions. Extension can be added to the extension manager. | Can you remind me where is this used in this file? |
@@ -124,6 +124,8 @@ class Server:
# NOTE: the instance is constructed in the parent process but
# serve() is called in the grandchild (by daemonize()).
+ buffer_size = 2**16
+
def __init__(self, options: Options,
timeout: Optional[int] = None) -> None:
"""Initialize the se... | [Server->[find_changed->[find_changed],update_changed->[update_changed]]] | Initialize the server with the desired mypy flags. | Dead code now? |
@@ -92,6 +92,13 @@ class DirectoryLayout(object):
"""Return absolute path from the root to a directory for the spec."""
_check_concrete(spec)
+ if spec.external:
+ return spec.external_path
+ if self.check_upstream and spec.package.installed_upstream:
+ raise Spac... | [YamlViewExtensionsLayout->[extension_file_path->[_check_concrete],remove_extension->[check_activated,_check_concrete],extension_map->[_check_concrete],_extension_map->[specs_by_hash,extension_file_path,_check_concrete],_write_extensions->[extension_file_path],add_extension->[check_extension_conflict,_check_concrete]],... | Returns the absolute path to a directory for the given specification. | Why not just return the upstream path here? |
@@ -113,8 +113,6 @@ public final class WeightedFairQueueByteDistributor implements StreamByteDistrib
@Override
public boolean distribute(int maxBytes, Writer writer) throws Http2Exception {
- checkNotNull(writer, "writer");
-
// As long as there is some active frame we should write at least ... | [WeightedFairQueueByteDistributor->[State->[poll->[poll],write->[write],peek->[peek],isActiveCountChangeForTree->[isActiveCountChangeForTree,state],remove->[remove],close->[updateStreamableBytes],offer->[offer],updateStreamableBytes->[isActiveCountChangeForTree]],streamableBytes0->[state],distributeToChildren->[distrib... | Distributes the given number of bytes to the children of the connection stream. | why you removed this ? |
@@ -74,7 +74,6 @@ function extensionPayload(name, version, latest, isModule, loadPriority) {
`v:"${VERSION}",` +
`n:"${name}",` +
`ev:"${version}",` +
- `l:${latest},` +
priority +
`f:(function(AMP,_){<%= contents %>})` +
'}'
| [No CFG could be retrieved] | JS - Variable that exports a single object. | See also code in `src/runtime.js` and `src/service/extensions-impl.js` |
@@ -227,6 +227,17 @@ describe('sanitizeHtml', () => {
expect(sanitizeHtml('<a [href]="foo.bar">link</a>'))
.to.equal('<a [href]="foo.bar" target="_top">link</a>');
});
+
+ it('should allow amp-subscriptions attributes', () => {
+ expect(sanitizeHtml('<div subscriptions-action="login">link</div>'))
... | [No CFG could be retrieved] | Checks that the HTML is valid for binding attributes. Sanitize html and check for missing attributes. | Please add one more with some value for `subscriptions-dialog` attribute. |
@@ -100,6 +100,8 @@ namespace System
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2006:UnrecognizedReflectionPattern",
Justification = "Implementation detail of Activator that linker intrinsically recognizes")]
+ [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:Unreco... | [Activator->[CreateInstanceInternal->[CreateInstance],CreateInstance->[CreateInstance]]] | Create an object handle from a managed type. | Why are `IL2006` and `IL2026` both `UnrecognizedReflectionPattern` ? Shouldn't different warning numbers have different titles/names? |
@@ -144,14 +144,6 @@ class BiasaddMatMulTest(trt_test.TfTrtIntegrationTestBase):
# mode, which is a bug. Re-enable this when trt library is fixed.
return not trt_test.IsQuantizationMode(run_params.precision_mode)
- def ExpectedAbsoluteTolerance(self, run_params):
- """The absolute tolerance to compare f... | [BiasaddMatMulTest->[ExpectedEnginesToRun->[_ValidEngines],ExpectedEnginesToBuild->[_ValidEngines,_InvalidEngines]]] | Determines if the test should be run. | Is this supposed to be deleted? |
@@ -325,7 +325,13 @@ public class RemoteTaskRunner implements TaskRunner, TaskLogStreamer
return ImmutableList.of();
}
- public Collection<ZkWorker> getWorkers()
+ @Override
+ public Collection<Worker> getWorkers()
+ {
+ return ImmutableList.copyOf(getWorkerFromZK(zkWorkers.values()));
+ }
+
+ public... | [RemoteTaskRunner->[tryAssignTask->[findWorkerRunningTask],scheduleTasksCleanupForWorker->[cancelWorkerCleanup],shutdown->[findWorkerRunningTask],run->[findWorkerRunningTask],start->[start],markWorkersLazy->[apply],announceTask->[isWorkerRunningTask],addWorker->[childEvent->[runPendingTasks],start,cancelWorkerCleanup],... | get all tasks that have not been scheduled yet. | @drcrallen this change made the overlord `/druid/indexer/v1/workers` API no longer return a `runningTasks` key for each worker, which may confuse some folks' rolling update scripts and definitely makes the web UI less useful. how do you feel about having the OverlordResource specifically call `getZkWorkers` if the runn... |
@@ -122,7 +122,11 @@ public class MuleExpressionLanguage implements ExtendedExpressionLanguage {
Error error = event.getError().isPresent() ? event.getError().get() : null;
contextBuilder.addBinding(ERROR, new DefaultTypedValue(error, fromType(Error.class)));
Map<String, TypedValue> flowVars = new ... | [MuleExpressionLanguage->[validate->[validate],evaluate->[evaluate],bindingContextBuilderFor->[addEventBindings]]] | Adds event bindings. | This must be done before any other binding, so variables names do not override other binding like "error", "payload" |
@@ -256,7 +256,9 @@ func backchannel(ctx context.Context, conn *net.Conn) error {
return ctx.Err()
}
err := serial.HandshakeServer(ctx, *conn)
- if err == nil {
+ if err != nil {
+ log.Error(err)
+ } else {
return nil
}
}
| [start->[Enabled,IsEnabled],stop->[Disabled,IsEnabled],run->[IsEnabled],Stop] | run is a function that is called by the client when a connection is opened. It is Catches any errors that occur while establishing a connection. | We _expect_ to get handshake failures here, so consider logging this at Debug or Info level. |
@@ -61,9 +61,9 @@ public class GetMongoIT {
static {
CAL = Calendar.getInstance();
DOCUMENTS = Lists.newArrayList(
- new Document("_id", "doc_1").append("a", 1).append("b", 2).append("c", 3),
- new Document("_id", "doc_2").append("a", 1).append("b", 2).append("c", 4).append(... | [GetMongoIT->[testQueryAttribute->[testQueryAttribute]]] | This class creates a mongo client and runs the tests for the GetMongo test. Create a MongoDB collection with all the documents in the collection. | Was this done by IDE auto-indentation or because the earlier version did not match the general indentation? There are also similar places in the other classes. |
@@ -463,7 +463,9 @@ namespace DynamoCoreWpfTests
// Ignoring the ExtensionWorkspaceData property as this is added after the re-save,
// this will cause a difference between jobject1 and jobject2 if it is not ignored.
- jobject2.Remove("ExtensionWorkspaceData");
+ // Sam... | [SerializationTests->[GetLibrariesToPreload->[GetLibrariesToPreload]],JSONSerializationTests->[SerializationTest->[DoWorkspaceOpenAndCompareView],AllTypesSerialize->[DoWorkspaceOpenAndCompareView],GetLibrariesToPreload->[GetLibrariesToPreload],DoWorkspaceOpenAndCompareView->[DoWorkspaceOpen],ConvertCurrentWorkspaceView... | This test tests if the JSON file is the same before and after save with dummy nodes. | Is this supposed to be removed |
@@ -36,6 +36,15 @@ class Siesta(Package):
def configure(self, spec, prefix):
sh = which('sh')
+
+ # Patch config.guess and config.sub from gnu savannah
+ sh("-c", "rm -f Src/config.guess Src/config.sub Src/FoX/config/config.guess Src/FoX/config/config.sub")
+ sh("-c", "wget -O Src/c... | [Siesta->[build->[which,working_dir,make,sh],install->[install,join_path,walk,working_dir,mkdir,access],configure->[write,satisfies,append,working_dir,sh,which,open],flag_handler->[append],depends_on,version,patch]] | configure the object with the given spec. | This won't work for users on air-gapped systems. Doesn't the `AutotoolsPackage` base class already have logic for patching `config.guess`? |
@@ -36,8 +36,8 @@ class ThemeUpdate(object):
class MigratedUpdate(ThemeUpdate):
def get_data(self):
- if hasattr(self, 'row'):
- return self.row
+ if hasattr(self, 'data'):
+ return self.data
primary_key = (
'getpersonas_id' if self.from_gp else 'light... | [LWThemeUpdate->[get_json->[get_update],get_update->[row_to_dict]],application->[LWThemeUpdate,get_headers,get_json,MigratedUpdate],MigratedUpdate->[get_json->[get_data],is_migrated->[get_data]]] | get data from database. | ! So before, we were re-executing that query ... |
@@ -1277,6 +1277,7 @@ const Parameters MmgProcess<TMMGLibrary>::GetDefaultParameters() const
{
"isosurface_variable" : "DISTANCE",
"nonhistorical_variable" : false,
+ "use_metric_field" : true,
"remove_internal_regions" ... | [No CFG could be retrieved] | Parameters for the given MSSQL - based model part. This function returns a dictionary of all the possible values for the given attribute. | Should we use the new behaviour as default, or keep the isosurface discretization only (no adaptation) as default? @loumalouomega |
@@ -109,9 +109,7 @@ public class NewGameChooser extends JDialog {
NewGameChooser chooser = new NewGameChooser(parent);
chooser.setSize(800, 600);
chooser.setLocationRelativeTo(parent);
- if (defaultGameName != null) {
- chooser.selectGame(defaultGameName);
- }
+ chooser.selectGame(defaultGa... | [NewGameChooser->[refreshGameList->[run->[getNewGameChooserModel,refreshNewGameChooserModel],getSelected],chooseGame->[NewGameChooser],setupListeners->[updateInfoPanel],selectAndReturn->[getSelected]]] | Select a game. | I'm curious whether it is `chooser.selectGame` handles the NPE situation, or whether `defaultGameName` is never null? |
@@ -92,6 +92,14 @@ module Idv
)
end
+ # making a new method to avoid breaking the existing flow
+ def save_pii_in_session(pii)
+ flow_session[:pii_from_doc] = pii.merge(
+ uuid: current_user.uuid,
+ phone: current_user.phone_configurations.take&.phone,
+ )
+ ... | [DocAuthBaseStep->[post_front_image->[post_front_image],liveness_checking_enabled?->[liveness_checking_enabled?],doc_auth_vendor->[doc_auth_vendor],post_images->[post_images],idv_failure->[attempter_throttled?],post_back_image->[post_back_image]]] | extract pii from doc. | Looks like this is uncovered, but I also can't find where it is used. I think if we pulled this out we'd fix our coverage woes. |
@@ -36,7 +36,7 @@ type Config struct {
// Scheduler defines the syntax of a heartbeat.yml scheduler block.
type Scheduler struct {
- Limit uint `config:"limit" validate:"min=0"`
+ Limit int64 `config:"limit" validate:"min=0"`
Location string `config:"location"`
}
| [No CFG could be retrieved] | Scheduler defines the syntax of a heartbeat. yml scheduler block. | Changed this type to reflect the underlying weighted semaphor which can track at most int64 entries. |
@@ -256,6 +256,8 @@ func TestPollingDeviationChecker_TriggerIdleTimeThreshold(t *testing.T) {
Return(big.NewInt(1), nil)
ethClient.On("SubscribeToLogs", mock.Anything, mock.Anything).
Return(fakeSubscription(), nil)
+ ethClient.On("GetLatestSubmission", mock.Anything, mock.Anything).
+ Return(big.NewInt(0), bi... | [Fetch->[Decimal],Disconnect,MustNewTaskType,ExportedCurrentPrice,MatchedBy,AddJob,NewFromFloat,Duration,NewStore,NewJobRun,RemoveJob,Eventually,CreateJob,Stop,Error,ExportedFetchAggregatorData,New,Connect,EVMWordUint64,Start,ExtractFeedURLs,CallbackOrTimeout,NewPollingDeviationChecker,Len,NewJobWithRunLogInitiator,Ass... | TestPollingDeviationChecker_StartError tests that a JobRun is created and then pol NewJobWithFluxMonitorInitiator creates a new job with a flux monitor init. | It seems like all the tests that have `GetLatestSubmission` mocked cover the case where no run is created. Can we get a test with the positive case, or am I missing it? |
@@ -143,8 +143,9 @@ class CMakePackage(PackageBase):
def cmake(self, spec, prefix):
"""Runs ``cmake`` in the build directory"""
- options = [self.root_cmakelists_dir] + self.std_cmake_args + \
- self.cmake_args()
+ options = [os.path.abspath(self.cmakelists_abs_path)]
+ o... | [CMakePackage->[cmake->[cmake_args],_std_args->[build_type]]] | Runs cmake in the build directory. | `self.cmakelists_abs_path`: this member var is not default-defined yet for `CMakePackage` objects :) |
@@ -97,8 +97,7 @@ class UserMailer < ActionMailer::Base
mail(to: email_address.email, subject: t('user_mailer.account_reset_cancel.subject'))
end
- def please_reset_password(email_address, message)
- @message = message
+ def please_reset_password(email_address)
mail(to: email_address, subject: t('us... | [UserMailer->[reset_password_instructions->[t,mail],confirm_email_and_reverify->[email,t,mail,request_token],email_deleted->[email_should_receive_nonessential_notifications?,t,mail],doc_auth_desktop_link_to_sp->[t,mail],letter_expired->[email_should_receive_nonessential_notifications?,t,mail],please_reset_password->[t,... | Sends an email if there is a user with a password reset link that can be reset. | There used to be a freeform `message` param in the old templates, I decided to remove it as part of the cleanup |
@@ -3542,7 +3542,7 @@ def build_save_model_DRF(params, x, train, respName):
# generate random dataset, copied from Pasha
-def random_dataset(response_type, verbose=True, NTESTROWS=200):
+def random_dataset(response_type, verbose=True, NTESTROWS=200, missing_fraction=0.0, seed=None):
"""Create and return a ran... | [extract_comparison_attributes_and_print_multinomial->[compare_two_arrays],generate_and_save_mixed_glm->[remove_negative_response],expect_warnings->[locate],grab_model_params_metrics->[get_train_glm_params],extract_comparison_attributes_and_print->[less_than,get_train_glm_params,compare_two_arrays],genTrainFrame->[rand... | Create and return a random dataset. | Looks like a valuable addition, but is this a leftover ? |
@@ -86,7 +86,8 @@ spec:
- containerPort: 5432
volumeMounts:
- name: data
- mountPath: /var/lib/postgresql/
+ mountPath: /var/lib/postgresql/data
+ subMount: postgres
resources:
requests:
memory: "512Mi"
| [No CFG could be retrieved] | _% = > _ - > _ - > _. | should this be `subPath`? |
@@ -111,7 +111,15 @@ public class TabularRow {
for (int row = 0; row < numRows; row++) {
builder.append('|');
for (int col = 0; col < columns.size(); col++) {
- builder.append(columns.get(col).get(row));
+ final String colValue = columns.get(col).get(row);
+ if (shouldClip(column... | [TabularRow->[toString->[toString],createRow->[TabularRow],createHeader->[TabularRow]]] | Format a row of a sequence of strings into a string builder. | > // clip if there are more than one line and any of the remaining lines are non-empty Isn't this check "if there are more than one line and NO LINES ARE EMPTY". So it would return `false` if there are multiple lines and one is empty. I think maybe you want '! parts....allMatch(String::isEmpty)' |
@@ -156,6 +156,13 @@ func TestAccAWSLBTargetGroup_networkLB_TargetGroup(t *testing.T) {
ExpectNonEmptyPlan: true,
ExpectError: regexp.MustCompile("Health check interval cannot be updated"),
},
+ {
+ Config: testAccAWSLBTargetGroupConfig_typeTCP_withProxyProtocol(targetGroupName),
+ Check: r... | [Wrapf,Meta,Test,Sprintf,TestCheckResourceAttrSet,TestMatchResourceAttr,New,TestCheckResourceAttr,RandString,RootModule,DescribeTargetGroups,ComposeTestCheckFunc,String,ComposeAggregateTestCheckFunc,Fatalf,Errorf,MustCompile,RandStringFromCharSet] | TestAccAWSLB_TCP_HTTPHealthCheck tests the AWS LB health check configuration. IDRefreshName is the name of the refresh step that refreshes the AWS LB target. | Can you please move this to its own acceptance test? |
@@ -144,9 +144,10 @@ func GenerateDeploymentConfig(name string, options *ipfailover.IPFailoverConfigC
podTemplate := &kapi.PodTemplateSpec{
ObjectMeta: kapi.ObjectMeta{Labels: selector},
Spec: kapi.PodSpec{
- HostNetwork: true,
- Containers: containers,
- Volumes: generateVolumeConfig(),
+ HostNetw... | [ClientConfig,ExpandOrDie,Itoa,FormatBool,NewDefaultClientConfig,Sprintf,List,Errorf,Load,LoadTLSFiles] | GenerateFailoverMonitorContainerConfig generates the failover monitor container config. nil - > null. | This also seems like it is pulling double duty as the pod selector and the node selector. I feel like there will be cases when these things don't match. |
@@ -285,7 +285,7 @@ class RawEEGLAB(_BaseRaw):
def _read_segment_file(self, data, idx, fi, start, stop, cals, mult):
"""Read a chunk of raw data"""
_read_segments_file(self, data, idx, fi, start, stop, cals, mult,
- dtype=np.float32)
+ dtype=n... | [RawEEGLAB->[__init__->[_check_fname,_get_info,_check_mat_struct]],EpochsEEGLAB->[__init__->[_check_fname,_get_info,_check_mat_struct]],_get_info->[_to_loc]] | Read a chunk of raw data. | I'd call it `stim_channel` or something of that sort. So that it's generic for different readers which may want to use this. |
@@ -202,10 +202,12 @@ setuptools.setup(
'apache_beam/transforms/cy_combiners.py',
'apache_beam/utils/counters.py',
'apache_beam/utils/windowed_value.py',
- ]),
+ ],
+ nthreads=4),
install_requires=REQUIRED_PACKAGES,
python_requires=python_requires,
test_suite='nose... | [get_version->[open,exec],generate_protos_first->[cmd->[run->[super,generate_proto_files]],warn],find_packages,get_distribution,system,generate_protos_first,get_version,format,warn,cythonize,setup,StrictVersion] | Package information for a specific package. Package Keywords - License version 2. 0. | we probably can also use pytest here. |
@@ -937,11 +937,8 @@ class DistributeTranspiler(object):
"LearningRate": [lr_var]
}
outputs = {"ParamOut": [param_var]}
- table_opt_block.append_op(
- type=table_opt_op.type,
- inputs=inputs,
- outputs=outputs,
- attrs=table_opt_op.attrs)... | [DistributeTranspiler->[_append_pserver_ops->[_get_optimizer_input_shape,same_or_split_var],get_startup_program->[_get_splited_name_and_shape->[same_or_split_var],_get_splited_name_and_shape],_create_ufind->[_is_op_connected],_orig_varname->[_get_varname_parts],_get_optimize_pass->[_is_opt_role_op],_is_splited_grad_var... | Create table optimize block. add operation to table_opt_block and add it to grad_to_block_. | Could print a warning here to indicate users. |
@@ -613,8 +613,7 @@ function settings_post(&$a) {
intval(local_user())
);
-
- if($name_change) {
+ if ($name_change) {
q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `self`",
dbesc($username),
dbesc(datetime_convert()),
| [settings_content->[get_baseurl,get_hostname,get_path],settings_post->[get_baseurl,discover]] | POST to the settings page Save or update a user s security token. This function is called from the command line. It sets the configuration of the user s mailbox update mailaccount record Connect to the email account using the settings provided. | can we leave the old indents in front of the equal sign? For lines with nearly same looking content it would be more readable. There are some more places in this PR where the equal sign at the same horizontal position would increase the readability |
@@ -548,8 +548,10 @@ func (as *ApplicationState) Stop(timeout time.Duration) error {
s := as.status
doneChan := as.checkinDone
as.checkinLock.RUnlock()
- if s == proto.StateObserved_STOPPING && doneChan == nil {
- // sent stopping and now is disconnected (so its stopped)
+ if (wasConn && doneChan == nil) |... | [Register->[Get],Stop->[Stop],watchdog->[flushExpiredActions]] | Stop stops the application. | i'm not sure i follow this. if it was connected and doneChan is nil means it got disconnected this seems ok. second part means if status of application is stopping and doneChan is nil (got disconnected) then we;re destroying but only in case doneChan was nil before so nothing changed. |
@@ -272,6 +272,12 @@ sys.stdout = DynamoStdOut({0})
[Obsolete("Do not use! This will be subject to changes in a future version of Dynamo")]
public static event EvaluationEventHandler EvaluationBegin;
+ /// <summary>
+ /// Emitted immediately before execution begins
+ /// </s... | [IronPythonEvaluator->[EvaluateIronPythonScript->[PythonStandardLibPath]]] | Creates a dictionary of data marshalled into a Python object. - A helper function to check if the evaluation of a sequence has completed successfully or failed. | should we change these messages, to note these events are not even raised any longer? |
@@ -66,9 +66,17 @@ Status Distributed::pullUpdates() {
return Status(1, "Missing distributed plugin: " + distributed_plugin);
}
+ // should not have any work in progress when this is called.
+ assert(results_.size() == 0);
+
+ // if last read document is in DB, worker process was killed
+ reportInterrupte... | [No CFG could be retrieved] | Disable distributed queries get the last known result from the query. | I'm generally ok with having asserts in production code but @muffins @fmanco @akindyakov |
@@ -78,10 +78,7 @@ func (a *APIServer) master() {
// to restart.
b.InitialInterval = 10 * time.Second
backoff.RetryNotify(func() error {
- ctx, cancel := context.WithCancel(a.pachClient.AddMetadata(context.Background()))
- defer cancel()
-
- ctx, err := masterLock.Lock(ctx)
+ ctx, err := masterLock.Lock(a.pac... | [aggregate->[getMasterLogger],jobSpawner->[jobLogger],master->[getMasterLogger]] | master launches a master process that will be run in a separate goroutine. This function is called when a master process fails to run. | Looks like we are getting rid of a `cancel()` here. Is that intended? |
@@ -226,13 +226,11 @@ export class AmpStoryPage extends AMP.BaseElement {
/** @private @const {!../../../src/service/resources-impl.Resources} */
this.resources_ = Services.resourcesForDoc(getAmpdoc(this.win.document));
- /** @private @const {!Promise} */
- this.mediaLayoutPromise_ = this.waitForMedia... | [AmpStoryPage->[setState->[PLAYING,dev,NOT_ACTIVE,PAUSED],pauseCallback->[DESKTOP_PANELS,UI_STATE],constructor->[resolve,timerFor,getAmpdoc,NOT_ACTIVE,forElement,getStoreService,resourcesForDoc,platformFor,promise,debounce,reject],emitProgress_->[dict,PAGE_PROGRESS,dispatch],getPreviousPageId->[id,tagName],renderOpenAt... | private private methods Determines whether the user agent matches a bot. | This is going to cause race conditions. This is exposed through the public method `whenLoaded` and we don't (or perhaps shouldn't) have the guarantee that `whenLoaded` will be called after `layoutCallback`. As such, `whenLoaded` will return `null` initially, which violates the contact of returning a Promise that resolv... |
@@ -60,6 +60,12 @@ class FnApiRunnerTest(unittest.TestCase):
def create_pipeline(self):
return beam.Pipeline(runner=fn_api_runner.FnApiRunner())
+ def create_pipeline_with_grpc(self):
+ return beam.Pipeline(
+ runner=fn_api_runner.FnApiRunner(
+ default_environment=beam_runner_api_pb2.En... | [FnApiRunnerTest->[test_reshuffle->[create_pipeline],test_multimap_side_input->[create_pipeline],test_non_user_metrics->[assert_counter_exists,create_pipeline,split],test_pardo_metrics->[MyOtherDoFn,create_pipeline,MyDoFn],test_group_by_key->[create_pipeline],test_pardo->[create_pipeline],test_pardo_state_only->[AddInd... | Create pipeline for the given object. | We should not be requiring GRPC for these tests. If it only works with the GRPC runner, please move these test to FnApiRunnerTestWithGrpc with a JIRA to fix this. |
@@ -1695,6 +1695,8 @@ class Grunion_Contact_Form extends Crunion_Contact_Form_Shortcode {
isset( $_POST['action'] ) && 'grunion-contact-form' === $_POST['action']
&&
isset( $_POST['contact-form-id'] ) && $form->get_attribute( 'id' ) == $_POST['contact-form-id']
+ &&
+ isset( $_POST['contact-form-hash'] ) ... | [Grunion_Contact_Form_Plugin->[download_feedback_as_csv->[get_export_data_for_posts],get_export_data_for_posts->[get_post_content_for_csv_export,get_parsed_field_contents_of_post,get_post_meta_for_csv_export,map_parsed_field_contents_of_post_to_field_names],widget_shortcode_hack->[add_shortcode]],Crunion_Contact_Form_S... | Parse a contact form field Render the neccessary field. | use `hash_equals()` here instead. |
@@ -393,7 +393,12 @@ func (a *apiServer) Activate(ctx context.Context, req *authclient.ActivateReques
time.Sleep(time.Second) // give other pachd nodes time to update their cache
// Call PPS.ActivateAuth to set up all affected pipelines and repos
- if _, err := pachClient.ActivateAuth(ctx, &pps.ActivateAuthReques... | [ModifyMembers->[LogReq,LogResp,isAdmin,activationState],GetScope->[LogResp,getEnterpriseTokenState,isAdmin,activationState,LogReq],GetAdmins->[LogReq,LogResp,activationState],GetUsers->[LogReq,LogResp,isAdmin,activationState],getEnterpriseTokenState->[getPachClient],Authenticate->[LogResp,getEnterpriseTokenState,activ... | Activate - activates a user in the cluster This is a helper function that will authenticate the user in the cluster and create a new P initialize admins and tokens. | What's the inlined function accomplishing here? |
@@ -87,9 +87,9 @@ namespace Js
handler = VarTo<DynamicObject>(args[2]);
if (VarIs<JavascriptProxy>(handler))
{
- if (VarTo<JavascriptProxy>(handler)->handler == nullptr)
+ if (VarTo<JavascriptProxy>(handler)->IsRevoked())
{
- JavascriptError::... | [No CFG could be retrieved] | Replies the next unique object in the stack. - - - - - - - - - - - - - - - - - -. | Change this VarTo to an UnsafeVarTo. (VarTo includes a check but we've already done the check in the if on line 93) (Unrelated to the change you're doing but a good drive by improvement to add) |
@@ -256,11 +256,6 @@ namespace XLinqTests
return s;
}
- private static string NormalizeNewLines(string s)
- {
- s = s.Replace("\n", "");
- s = s.Replace("\r", "");
- return s;
- }
+ private static string NormalizeNewLines(string s) => ... | [SaveWithFileName->[XElementSave->[Path,Create,Equal,Save,PreserveWhitespace,ReadAllText,AssertExists,Parse,NormalizeNewLines],XStreamingElementSave->[Path,Create,Equal,PreserveWhitespace,Save,Attributes,Nodes,Name,AssertExists,ReadAllText,Parse,NormalizeNewLines],XElementSave_NullParameter->[Save,DisableFormatting,Non... | Strip off xml declaration and normalize newlines. | Would `s.ReplaceLineEndings()` work the same? |
@@ -7,14 +7,13 @@ package query
import (
"context"
"fmt"
- "strconv"
- "strings"
- "time"
+
+ "github.com/elastic/beats/v7/libbeat/common"
+ "github.com/elastic/beats/v7/metricbeat/helper/sql"
"github.com/jmoiron/sqlx"
"github.com/pkg/errors"
- "github.com/elastic/beats/v7/libbeat/common"
"github.com/ela... | [fetchTableMode->[ParseFloat,Next,Columns,ToLower,Event,Scan,Wrap,Err,Logger,Debug],fetchVariableMode->[ParseFloat,Next,ToLower,Wrap,Event,Scan,Err,Logger,Debug],Close->[Wrap,Close],Fetch->[QueryxContext,fetchTableMode,Close,Wrap,fetchVariableMode,DB],DB->[Wrap,HostData,Ping,Open],Format,Beta,Sprint,MustAddMetricSet,Mo... | New registers the metricset with the central registry. if module config. | nit: import order |
@@ -64,7 +64,7 @@
var basePath = Path.Combine(TestContext.CurrentContext.TestDirectory, @"databus\sender");
builder.UseDataBus<FileShareDataBus>().BasePath(basePath);
- builder.UseSerialization<JsonSerializer>();
+ builder.RegisterCompone... | [When_sending_databus_properties_with_unobtrusive->[Task->[ReceivedPayload,AreEqual,Run],Sender->[TestDirectory,Contains,RouteToEndpoint,DefiningDataBusPropertiesAs,Combine,BasePath,builder],Receiver->[MyMessageHandler->[Task->[ReceivedPayload,Payload,FromResult]],TestDirectory,Contains,DefiningDataBusPropertiesAs,Comb... | Creates an endpoint that will receive a single . | shouldn't this use the `RegisterMessageMutator` API? |
@@ -270,6 +270,7 @@ namespace DotNetNuke.Modules.Html
}
this._htmlTextController.UpdateHtmlText(htmlContent, this._htmlTextController.GetMaximumVersionHistory(this.PortalId));
+ Entities.EventManager.Instance.OnModuleGenericEvent(new Entities.Mo... | [EditHtml->[DisplayPreview->[DisplayHistory],OnInit->[OnInit],OnMasterContentClick->[DisplayMasterLanguageContent],DisplayEdit->[DisplayMasterContentButton],OnLoad->[OnLoad],OnHistoryClick->[DisplayVersions],DisplayLockedContent->[DisplayPreview,DisplayVersions]]] | The method called when the user clicks on the Save button. This method is invoked from the UI thread and logs any exceptions that occur. If the exception. | I would think we'd want to set an example of having a unique event name, e.g. `DNN_HTML_Update` |
@@ -96,7 +96,7 @@ class iCalendarReader {
} else {
// If the timezone isn't set then the GMT offset must be set.
// generate a DateInterval object from the timezone offset
- $gmt_offset = get_option( 'gmt_offset' ) * HOUR_IN_MINUTES;
+ $gmt_offset = get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
$time... | [icalendar_render_events->[render],iCalendarReader->[render->[apply_timezone_offset,escape,get_events],add_component->[timezone_from_string]],icalendar_get_events->[get_events]] | This function applies the timezone offset to the given events. Get the necunicallcite object. | Will this cause any problems with line 100 where it is getting the time difference in minutes? Should that be changed to seconds? The HOUR_IN_MINUTES constant returns 60, and the HOUR_IN_SECONDS constant returns 3600. |
@@ -124,8 +124,10 @@ import org.slf4j.LoggerFactory;
*
* <p><b>Note:</b> Normally, a Cloud Dataflow job will read from Cloud Datastore in parallel across
* many workers. However, when the {@link Query} is configured with a limit using
- * {@link com.google.datastore.v1.Query.Builder#setLimit(Int32Value)}, then
- ... | [DatastoreV1->[DeleteKeyFn->[apply->[isValidKey,build]],Mutate->[populateDisplayData->[populateDisplayData],toString->[toString]],DatastoreWriterFn->[populateDisplayData->[populateDisplayData],flushBatch->[build]],Write->[withProjectId->[Write]],DeleteEntityFn->[apply->[isValidKey,build]],UpsertFn->[apply->[isValidKey,... | This method is intended to be used by the Read API and can be used to read a Delete all entities associated with a Cloud Datastore. | Please abstract Dataflow away. |
@@ -163,7 +163,13 @@ define([
}
if (vertexFormat.tangent || vertexFormat.binormal) {
- geometry = GeometryPipeline.computeBinormalAndTangent(geometry);
+ try {
+ geometry = GeometryPipeline.computeBinormalAndTangent(geometry);
+ } catch (e) {
+ ... | [No CFG could be retrieved] | Creates a geometry object that represents a single non - overlapping region of a polyline. The ellipsoid to be used as a reference. | Are we sure about this change? It is atypical. |
@@ -105,6 +105,10 @@ func mergeJSONFields(e *Event, event common.MapStr) {
}
}
} else {
- event["json"] = e.JSONFields
+ key := e.JSONConfig.JsonKey
+ if len(key) == 0 {
+ key = "json"
+ }
+ event[key] = e.JSONFields
}
}
| [ToMapStr->[Time],Time,Sprintf,Err,Parse] | JSON fields for event. | It would be nice if this check could be done once at initialization and then set the value to the default if it's empty. The usual pattern is to initialize the `JsonKey` value to its default value prior to unpacking the user's config; maybe that can be done in this case. |
@@ -0,0 +1,15 @@
+using NUnit.Framework;
+
+namespace MonoGame.Tests.Framework
+{
+ /// <summary>
+ /// Base class for test classes with floating point operations.
+ /// </summary>
+ class FPointBase
+ {
+ protected void Compare(float expected, float source)
+ {
+ Assert.That(exp... | [No CFG could be retrieved] | No Summary Found. | I don't like this. First it seems to only be there in some effort to reduce typing... something that is not a concern. Second it requires all tests that use this to derive from this `FPointBase` class. |
@@ -301,7 +301,7 @@ func (d *Distributor) Push(ctx context.Context, req *client.WriteRequest) (*clie
// check each sample and discard if outside limits.
validatedTimeseries := make([]client.PreallocTimeseries, 0, len(req.Timeseries))
keys := make([]uint32, 0, len(req.Timeseries))
- numSamples := 0
+ numSamples = ... | [AllUserStats->[AllUserStats],Stop->[Stop],sendSamples->[Push],MetricsForLabelMatchers->[forAllIngesters,MetricsForLabelMatchers],Push->[tokenForLabels,checkSample],UserStats->[forAllIngesters,UserStats],LabelNames->[forAllIngesters,LabelNames],RegisterFlags->[RegisterFlags],LabelValuesForLabelName->[forAllIngesters]] | Push is a private method that will push a request to the cluster Samples returns a list of samples that have been received from the client. sends all the samples in the request to the server and returns the last partial error. | Does `numSamples` need to be recounted? Is there any way that it would differ from the above calculation? |
@@ -76,8 +76,12 @@ module ApplicationHelper
"https://res.cloudinary.com/#{ApplicationConfig['CLOUDINARY_CLOUD_NAME']}/image/upload/#{postfix}"
end
+ def idn_domain_fix(url)
+ SimpleIDN.to_ascii(url)
+ end
+
def cloudinary(url, width = "500", quality = 80, format = "auto")
- cl_image_path(url || ass... | [title_with_timeframe->[title],sanitized_referer->[sanitized_referer]] | Returns the url of the cloudinary icon with optional parameters. | **thought (non-blocking):** This helper doesn't seem to serve much of a purpose. Maybe for now we can just inline the call to `SimpleIDN` in `cloudinary` and update the test to check the URL in the attribute. I'll accept the PR either way, but if you do change it please request a re-review. |
@@ -43,9 +43,9 @@ public class UsageSanityChecker {
protected static final int DEFAULT_AGGREGATION_RANGE = 1440;
protected StringBuilder errors;
protected List<CheckCase> checkCases;
- protected String lastCheckFile = "/usr/local/libexec/sanity-check-last-id";
+ protected String lastCheckFile = "/v... | [UsageSanityChecker->[checkItemCountByPstmt->[checkItemCountByPstmt],runSanityCheck->[checkVolumeUsage,checkVmUsage,checkMaxUsage,reset,checkItemCountByPstmt,checkSnapshotUsage,checkTemplateISOUsage,readMaxId,readLastCheckId],main->[UsageSanityChecker,runSanityCheck]]] | Reset the errors and check cases. | Just a thought, why we store this in a file (on one of the mgmt/usage server hosts) and not in database? |
@@ -983,7 +983,15 @@ class Lower(BaseLower):
argvals = self.fold_call_args(
fnty, signature, expr.args, expr.vararg, expr.kws,
)
- impl = self.context.get_function(fnty, signature)
+ tname = expr.hardware
+ if tname is not None:
+ from numba.cor... | [Lower->[lower_inst->[typeof,debug_print],lower_static_raise->[return_exception],incref->[incref],_lower_call_normal->[fold_call_args,debug_print],lower_call->[typeof,debug_print],loadvar->[getvar],_lower_call_RecursiveCall->[fold_call_args],delvar->[_alloca_var,typeof,getvar],_cast_var->[typeof],lower_yield->[typeof],... | Given a function fnty and an expression expr return the function with the necessary arguments and. | The pattern of `dispatcher_registry[hardware_registry[tname]]` has appeared multiple times. It's common enough to have a method for it. |
@@ -744,6 +744,7 @@ namespace System.Collections.Concurrent.Tests
[Theory]
[InlineData(4, 2048, 2, 64)]
[OuterLoop]
+ [PlatformSpecific(~TestPlatforms.Browser)] // Cannot wait on monitors on this runtime.
private static void TestConcurrentAddAnyTakeAny(int numOfThreads, int nu... | [BlockingCollectionTests->[TestAddTake_Longrunning->[TestAddTake],TestAddAnyTakeAny_Longrunning->[TestAddAnyTakeAny],ConcurrentStackCollection->[IEnumerator->[GetEnumerator],GetEnumerator->[GetEnumerator],ToArray->[ToArray],CopyTo->[CopyTo]]]] | Tests that the elements in the list are added to any of the threads in parallel. check if there are no elements in the thread pool and if so add them to the removed. | AFAIR we used to add `PlatformDetection.IsThreadingSupported` for case ` Cannot wait on monitors on this runtime.`: `[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]`. Though, not sure if it's still so. |
@@ -149,9 +149,10 @@ public class DelegatedAuthenticationWebflowConfiguration implements CasWebflowEx
}
@RefreshScope
+ @ConditionalOnMissingBean(name = "delegatedClientAuthenticationAction")
@Bean
@Lazy
- public Action clientAction() {
+ public Action delegatedClientAuthenticationAction(... | [DelegatedAuthenticationWebflowConfiguration->[delegatedClientNavigationController->[delegatedClientWebflowManager],configureWebflowExecutionPlan->[delegatedAuthenticationWebflowConfigurer]]] | The client action. | You also need to make sure everything else that references `clientAction` is switched over, to use the new name. |
@@ -607,8 +607,10 @@ export class FixedLayer {
if (!this.transfer_ || this.fixedLayer_) {
return this.fixedLayer_;
}
- this.fixedLayer_ = this.ampdoc.win.document.createElement('body');
- this.fixedLayer_.id = '-amp-fixedlayer';
+ const doc = this.ampdoc.win.document;
+ const bodyId = doc.b... | [No CFG could be retrieved] | Determines the fixed - layer element based on the given element definition. MISSING - INVISIBLE - INVISIBLE - INVISIBLE - INVISIBLE - INVISIBLE. | Why not do a shallow clone here? Then we have `class`, `id` and any other attributes. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.