patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -68,11 +68,15 @@ public class TryScope extends AbstractMessageProcessorOwner implements Scope {
return event;
}
final boolean txPrevoiuslyActive = isTransactionActive();
+ Transaction previousTx = TransactionCoordination.getInstance().getTransaction();
ExecutionTemplate<CoreEvent> executionT... | [TryScope->[stop->[stop],initialise->[initialise],dispose->[dispose],start->[start],apply->[apply]]] | Process the given event using the current context of the current transaction. | newTx -> currentTx |
@@ -52,6 +52,14 @@ env => {
serviceAdapter = new ServiceAdapter(subscriptionService);
});
+ describe('getEncryptedDocumentKey', () => {
+ it('should call getEncryptedDocumentKey of subscription service', () => {
+ const stub = sandbox.stub(subscriptionService, 'getEncryptedDocumentKey');
+ servi... | [No CFG could be retrieved] | The real win environment Delegate action to local service. | If we do go down this path, we should also check `calledWith('serviceId')` and that it returns the same value as the service returns. Otherwise, it's just a basic call propagation and doesn't have to be tested. |
@@ -152,7 +152,7 @@ class Task(Model):
finished_at = models.DateTimeField(null=True)
non_fatal_errors = JSONField(default=list)
- result = JSONField(null=True)
+ error = JSONField(null=True)
parent = models.ForeignKey("Task", null=True, related_name="spawned_tasks")
worker = models.Foreign... | [ReservedResource->[ForeignKey,OneToOneField,TextField],TaskTag->[ForeignKey,TextField],WorkerManager->[get_unreserved_worker->[DoesNotExist,annotate,filter,Count]],TaskLock->[DateTimeField,TextField],Worker->[save_heartbeat->[save],DateTimeField,WorkerManager,TextField],Task->[set_failed->[save,exception_to_dict,now],... | set this task to the running state save it and log output in warning cases. | The Fields in the docstring need to be updated. |
@@ -1174,7 +1174,12 @@ namespace Microsoft.Xna.Framework
return matrix1;
}
-
+ /// <summary>
+ /// Divides the components of a <see cref="Matrix"/> by a scalar.
+ /// </summary>
+ /// <param name="matrix1">Source <see cref="Matrix"/>.</param>
+ /// <param name="divid... | [Matrix->[GetHashCode->[GetHashCode],Equals->[Equals],CreateFromYawPitchRoll->[CreateFromQuaternion,CreateFromYawPitchRoll],CreateScale->[CreateScale],Add]] | Creates a new matrix that is the sum of all elements of the given matrix divided by the Creates a new matrix with all elements of the named order that are not missing. | Use `elements` instead of `components`. |
@@ -285,8 +285,15 @@ namespace System.Text.Json.Serialization
internal bool TryWriteDataExtensionProperty(Utf8JsonWriter writer, T value, JsonSerializerOptions options, ref WriteStack state)
{
+ if (!IsInternalConverter)
+ {
+ return TryWrite(writer, value, optio... | [JsonConverter->[TryWrite->[TryWriteAsObject,OnTryWrite],TryRead->[OnTryRead]]] | Try write data extension property. | Let's assert that `value` is not `null` at the start of this method. |
@@ -88,6 +88,7 @@ public class ContentProviderTest {
"pdsqoelhmemmmbwjunnu",
"scxipjiyozczaaczoawo",
"cmxieunwoogyxsctnjmv::abcdefgh::ZYXW",
+ "cmxieunwoogyxsctnjmv::INSBGDS",
};
private static final String TEST_MODEL_NAME = "com.ichi2.anki.provider.test.a1x6h... | [ContentProviderTest->[testSuspendCard->[getCol,getFirstCardFromScheduler],testInsertField->[getCol],getCol->[getCol],testQueryNextCard->[getCol],testQueryCardFromCertainDeck->[getCol],testUpdateTags->[getCol,getFirstCardFromScheduler],setUp->[getCol],tearDown->[getCol],reopenCol->[getCol],testQueryCertainDeck->[getCol... | A content provider test for the presence of a specific header field value. The initial capacity of the model. | Confirming: does this break the test when used in association with the previous pull request? |
@@ -385,5 +385,7 @@ public class NewSparkInterpreterTest {
}
})
);
+ context.setClient(mockRemoteEventClient);
+ return context;
}
}
| [NewSparkInterpreterTest->[testSparkInterpreter->[run->[assertTrue,interpret,code,printStackTrace,contains,assertEquals],assertTrue,getValue,size,getDelegation,flush,mock,Thread,start,getType,getDefaultValue,join,cancel,setInterpreterGroup,setProperty,code,getDisplayName,trim,sleep,getData,completion,isAlive,open,asser... | get interpreter context. | Is this a good idea to have a similar test for OldSparkInterpreter too? |
@@ -15,11 +15,7 @@
*/
package com.alibaba.dubbo.examples.annotation.api;
-/**
- * AsyncService
- *
- * @author william.liangf
- */
+
public interface AnnotationService {
String sayHello(String name);
| [No CFG could be retrieved] | Say hello. | only remove author info |
@@ -1715,7 +1715,7 @@ dss_srv_init()
dss_register_key(&daos_srv_modkey);
xstream_data.xd_init_step = XD_INIT_REG_KEY;
- rc = bio_nvme_init(dss_storage_path, dss_nvme_conf, dss_nvme_shm_id);
+ rc = bio_nvme_init(dss_storage_path, dss_nvme_conf, dss_nvme_shm_id, dss_nvme_mem_size);
if (rc != 0)
D_GOTO(failed, ... | [No CFG could be retrieved] | function to initialize the xstream takes all the data from the DSS and creates the necessary state. | (style) line over 80 characters |
@@ -39,7 +39,7 @@ class GobiertoBudgets::BudgetLineIntegrationTest < ActionDispatch::IntegrationTe
end
def test_invalid_budget_line_url
- with_current_site(site) do
+ with_each_current_site(placed_site, organization_site) do |site|
visit gobierto_budgets_budget_line_path("1", last_year, GobiertoBud... | [test_invalid_budget_line_url->[visit,assert_equal,gobierto_budgets_budget_line_path,with_current_site,area_name],site->[sites],test_metric_boxes->[visit,all?,text,has_css?,assert,with_current_site],last_year->[last],setup->[gobierto_budgets_budget_line_path,area_name],test_budget_line_information->[visit,has_content?,... | Checks if there is a 404 invalid budget line url. | Unused block argument - site. You can omit the argument if you don't care about it. |
@@ -353,6 +353,7 @@ func (c *Config) Adjust(meta *toml.MetaData) error {
if meta == nil || !meta.IsDefined("enable-prevote") {
c.PreVote = true
}
+ c.PDServerCfg.EnableRegionStorage = true
return nil
}
| [Parse->[Parse],adjust->[validate],Adjust->[validate,Parse],Parse] | Adjust applies the default values to the configuration. adjusts the configuration parameters to match the default values. | Can we provide an option for this? |
@@ -298,12 +298,16 @@ func GetOwnedOrgsByUserIDDesc(userID int64, desc string) ([]*User, error) {
// GetOrgUsersByUserID returns all organization-user relations by user ID.
func GetOrgUsersByUserID(uid int64, all bool) ([]*OrgUser, error) {
ous := make([]*OrgUser, 0, 10)
- sess := x.Where("uid=?", uid)
+ sess := x.... | [GetUserRepositories->[GetUserTeamIDs],GetUserMirrorRepositories->[GetUserTeamIDs],GetUserTeamIDs->[getUserTeams],GetTeams->[getTeams],GetUserTeams->[getUserTeams],GetTeam->[getTeam],getOwnerTeam->[getTeam],GetOwnerTeam->[getOwnerTeam],RemoveOrgRepo->[removeOrgRepo],GetOwnerTeam] | GetOrgUsersByUserIDDesc returns a list of organizations owned by given user ID ordered descending ChangeOrgUserStatus changes public or private membership status. | No JOIN should be needed here, as user id is already in the OrgUser table ? |
@@ -346,7 +346,7 @@ class Options(object):
for (_, kwargs) in sorted(parser.option_registrations_iter()):
if kwargs.get('recursive', False) and not kwargs.get('recursive_root', False):
continue # We only need to fprint recursive options once.
- if bool(invert) == bool(kwargs.get(finge... | [Options->[for_global_scope->[for_scope],drop_flag_values->[Options],create->[OptionTrackerRequiredError,complete_scopes],registration_function_for_optionable->[register->[register]],for_scope->[for_scope],__getitem__->[for_scope],get_fingerprintable_for_scope->[for_scope,passthru_args_for_scope]]] | Returns a list of fingerprintable options for the given scope. Returns a list of tuples of tuples where the first tuple is the key and the second is. | I think this is >10x more readable and will hopefully avoid future confusion about the `invert` argument. |
@@ -0,0 +1,16 @@
+from django.db import models
+
+from ..core.permissions import ChannelPermission
+
+
+class Channel(models.Model):
+ name = models.CharField(max_length=250)
+ slug = models.SlugField(max_length=255, unique=True)
+ currencyCode = models.CharField(max_length=128)
+
+ class Meta:
+ ord... | [No CFG could be retrieved] | No Summary Found. | It should be in snake case: `currency_code` |
@@ -175,7 +175,14 @@ async function confirmTransfer(transfer, user) {
* @returns {Promise<String>} Hash of the transaction
*/
async function executeTransfer(transfer, transferTaskId, token) {
- const user = await hasBalance(transfer.userId, transfer.amount, transfer.id)
+ const balance = await getBalance(transfe... | [No CFG could be retrieved] | Executes a single token transfer Update the status of the crediting token and send a transaction to the user. | same question regarding locking user. |
@@ -284,6 +284,8 @@ public class DataSourceUtils {
props.getString(DataSourceWriteOptions.HIVE_PASS_OPT_KEY(), DataSourceWriteOptions.DEFAULT_HIVE_PASS_OPT_VAL());
hiveSyncConfig.jdbcUrl =
props.getString(DataSourceWriteOptions.HIVE_URL_OPT_KEY(), DataSourceWriteOptions.DEFAULT_HIVE_URL_OPT_VAL()... | [DataSourceUtils->[createHoodieRecord->[createPayload],buildHiveSyncConfig->[checkRequiredProperties],getTablePath->[getTablePath],dropDuplicates->[dropDuplicates],createHoodieClient->[createHoodieConfig],doWriteOperation->[createUserDefinedBulkInsertPartitioner],getCommitActionType->[getCommitActionType]]] | Build HiveSyncConfig from typed properties. HiveSyncConfig. | is this not "HIVE_METASTORE_URI_OPT_VAL()" ? |
@@ -239,9 +239,8 @@ namespace System.Runtime.InteropServices.JavaScript
if (IDFromJSOwnedObject.TryGetValue(o, out result))
return result;
- result = NextJSOwnedObjectID++;
+ result = (int)(IntPtr)GCHandle.Alloc(o, GCHandleType.Normal);
... | [Runtime->[DateTime->[DateTime],InvokeJS->[InvokeJS],SetupJSContinuation->[FreeObject],IntPtr->[SafeHandleAddRef],DumpAotProfileData->[DumpAotProfileData],New->[New],SafeHandleReleaseByHandle->[SafeHandleRelease],CompileFunction->[CompileFunction],GetGlobalObject->[GetGlobalObject]]] | GetJSOwnedObjectHandle - gets the object handle. | I don't think this is valid, afaik there's no guarantee that a GCHandle's id will not be re-used |
@@ -22,12 +22,13 @@ class GCSResultHandler(ResultHandler):
def __init__(self, bucket: str = None) -> None:
self.client = storage.Client()
+ self._bucket = bucket # used for serialization
self.bucket = self.client.bucket(bucket)
super().__init__()
def write(self, result: ... | [GCSResultHandler->[read->[debug,error,format,blob,b64decode,loads],__init__->[bucket,super,Client],write->[debug,uuid4,now,b64encode,format,blob]]] | Initialize the object with a client and a bucket. | Suggestion: store the string as the full `self.bucket` attribute (which will automatically work with serialization and not require overriding `create_object`) and dynamically create the `bucket` EITHER as `self.gcs_bucket` in `__init__` OR dynamically in each of the instance methods, since I don't think GCS really does... |
@@ -142,6 +142,8 @@ public interface ComponentMapper {
void resetBChangedForRootComponentUuid(@Param("projectUuid") String projectUuid);
+ void setPrivateForRootComponentUuid(@Param("projectUuid") String projectUuid, @Param("isPrivate") boolean isPrivate);
+
void delete(long componentId);
void updateTag... | [No CFG could be retrieved] | This method resets b - changed flag for root component. | I would prefer `componentUuid`, if it is not only relevant for qualifier `TRK`. |
@@ -75,7 +75,7 @@ namespace System.Text.Json.Serialization
}
// Provide a default implementation for value converters.
- internal virtual bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, ref ReadStack state, out T value)
+ internal virtual bo... | [JsonConverter->[TryWrite->[TryWriteAsObject,OnTryWrite],TryRead->[OnTryRead]]] | OnTryRead is called when a try - read operation is successful. | I don't know if this is accurate. Why was this annotation necessary? - `T` could be null when true (imagine the payload contains `{"foo": null}`) - `T` could also be non-null when returning true (payload is `{"foo": "hello"}`) - `T` could be null when false **Questions:** - I don't know whether `T` can be non-null when... |
@@ -7606,7 +7606,7 @@ void wallet2::get_outs(std::vector<std::vector<tools::wallet2::get_outs_entry>>
// check whether we're shortly after the fork
uint64_t height;
boost::optional<std::string> result = m_node_rpc_proxy.get_height(height);
- throw_on_rpc_response_error(result, "get_info");
+ THROW_... | [No CFG could be retrieved] | Find random output keys for the requested amount. missing public key. | Why ignore error cases? |
@@ -172,16 +172,13 @@ class TagManager implements TagManagerInterface
$tag = $this->tagRepository->createNew();
}
- $user = $this->userRepository->findUserById($userId);
-
// update data
$tag->setName($name);
- $tag->setChanger($user);
... | [TagManager->[findOrCreateByName->[findByName],resolveTagIds->[findById],resolveTagNames->[findByName]]] | Save a tag. | Just a small reminder for me: Test if this still works. |
@@ -222,6 +222,18 @@ public class SegmentMetadataQueryQueryToolChest extends QueryToolChest<SegmentAn
}
};
}
+
+ @Override
+ public Function<SegmentAnalysis, SegmentAnalysis> prepareForResultLevelCache()
+ {
+ return prepareForCache();
+ }
+
+ @Override
+ ... | [SegmentMetadataQueryQueryToolChest->[makeMetrics->[makeMetrics],getCacheStrategy->[getCacheObjectClazz->[getResultTypeReference]]]] | Returns a cache strategy that caches the given segments. Checks if the target interval overlaps with the current interval. | can we make these default implementations in CacheStrategy interface itself , so that they are not repeated everywhere ? |
@@ -759,11 +759,12 @@ class ostatus {
$contact = q("SELECT `id`, `rel`, `network` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' AND `network` != '%s'",
$uid, normalise_link($actor), NETWORK_STATUSNET);
- if (!$contact)
+ if (!dbm::is_result($contact)) {
$contact = q("SELECT `id`, `rel`, `network` F... | [ostatus->[add_author->[appendChild,createElement],follow_entry->[get_hostname,appendChild],entry_header->[setAttribute,createElementNS,createElement,appendChild],add_header->[setAttribute,createElementNS,appendChild],source_entry->[createElement],like_entry->[appendChild,createElement],fetchauthor->[item,query],salmon... | Get the details of an actor. | You forgot a "t". |
@@ -2186,13 +2186,17 @@ def _write_raw(fname, raw, info, picks, fmt, data_type, reset_range, start,
write_int(fid, FIFF.FIFF_FIRST_SAMPLE, first_samp)
# previous file name and id
+ if split_naming == 'elekta':
+ data = part_idx - 1
+ else:
+ data = part_idx - 2
if part_idx > 0 a... | [_start_writing_raw->[append],ToDataFrameMixin->[to_data_frame->[_get_check_picks]],_check_update_montage->[append],BaseRaw->[notch_filter->[notch_filter],apply_function->[_check_fun],_preload_data->[_read_segment],crop->[_update_times,set_annotations],__setitem__->[_parse_get_set_params],resample->[_update_times,resam... | Internal function to write a raw file with a . Write out a in the file. Write a chunk of data from the file. End of sequence of sequence of sequence of file number and index of next sequence of file number. | data is not a great name for an "int" can it be a name based on part_idx ? part_idx_tag ? |
@@ -569,8 +569,10 @@ func (fs *FS) ensureParentDir(filename string) error {
return nil
}
-func (fs *FS) requireNonEmpty() error {
- if fs.empty {
+func (fs *FS) checkEmpty(notExistErrIfEmpty bool) error {
+ if fs.empty && notExistErrIfEmpty {
+ return os.ErrNotExist
+ } else if fs.empty {
return errors.New("No... | [SyncAll->[requireNonEmpty,SyncAll],readDir->[makeFileInfo],Lchown->[PathForLogging],Chown->[PathForLogging],Chtimes->[requireNonEmpty,PathForLogging,lookupOrCreateEntry],Open->[OpenFile],Symlink->[requireNonEmpty,PathForLogging,lookupParent,ensureParentDir],Create->[OpenFile],Readlink->[requireNonEmpty,PathForLogging,... | ensureParentDir creates the parent directory for filename. | I'd just call this field `errIfEmpty`. |
@@ -47,6 +47,9 @@ public class JpaOutboundGateway extends AbstractReplyProducingMessageHandler {
private final JpaExecutor jpaExecutor;
private OutboundGatewayType gatewayType = OutboundGatewayType.UPDATING;
private boolean producesReply = true; //false for outbound-channel-adapter, true for outbound-gateway
+ ... | [JpaOutboundGateway->[handleRequestMessage->[IllegalArgumentException,equals,poll,build,format,executeOutboundJpaOperation],onInit->[setBeanFactory,onInit,getBeanFactory],setGatewayType->[notNull],notNull]] | Provides a way to create a Jpa outbound gateway. Executes the JPA operation on the specified request message. | Why hasn't been this property moved to `JpaExecutor`? To be together with `maxNumberOfResults` Anyway it should be `volatile` and it would better to make his name more consistent - **firstResultExpression** |
@@ -65,12 +65,10 @@ func (a keystonePasswordAuthenticator) AuthenticatePassword(username, password s
}
client.HTTPClient = *a.client
- err = openstack.AuthenticateV3(client, opts)
+ err = openstack.AuthenticateV3(client, &opts, gophercloud.EndpointOpts{})
if err != nil {
- if responseErr, ok := err.(*gopherclo... | [AuthenticatePassword->[UserFor,AuthenticateV3,Infof,Warningf,V,Errorf,NewClient,HandleError,Stack,NewDefaultUserIdentityInfo]] | AuthenticatePassword authenticates a user using the keystone password authentication scheme. | Do any of the options need to make it into EndpointOpts, or is empty always appropriate? |
@@ -5,9 +5,12 @@ class ImageUploadsController < ApplicationController
def create
authorize :image_upload
+ raise "too many uploads" if RateLimitChecker.new(current_user).limit_by_situation("image_upload")
+
uploader = ArticleImageUploader.new
begin
uploader.store!(params[:image])
+ li... | [ImageUploadsController->[create->[new,respond_to,render,authorize,store!,message,json,url,cloud_cover_url],before_action,after_action]] | Creates a new unique identifier for the current user. | This error shows up in the logs but isn't passed over to the client. |
@@ -89,6 +89,18 @@ func (s *PublicPoolService) SendRawTransaction(
return tx.Hash(), nil
}
+func (s *PublicPoolService) verifyChainID(tx *types.Transaction) error {
+ nodeChainID := s.hmy.ChainConfig().ChainID
+
+ if tx.ChainID().Cmp(nodeconfig.GetDefaultConfig().GetNetworkType().ChainConfig().EthCompatibleChainID... | [GetPoolStats->[GetPoolStats],GetCurrentTransactionErrorSink->[GetCurrentTransactionErrorSink],GetPendingCXReceipts->[GetPendingCXReceipts],GetCurrentStakingErrorSink->[GetCurrentStakingErrorSink]] | SendRawTransaction sends a raw transaction to a single recipient or a single recipient SendRawStakingTransaction sends a raw staking transaction to the chain. | same here, can check exactly chainID with != 0 |
@@ -39,6 +39,8 @@ import org.wildfly.security.x500.cert.X509CertificateBuilder;
* @since 10.0
**/
public abstract class AbstractInfinispanServerDriver implements InfinispanServerDriver {
+ public static final String DEFAULT_CLUSTERED_INFINISPAN_CONFIG_FILE_NAME = "infinispan.xml";
+
public static final Strin... | [AbstractInfinispanServerDriver->[createKeyStores->[getCertificateFile],stop->[stop],start->[start],createServerHierarchy->[createServerHierarchy],createSelfSignedCertificate->[getCertificateFile],createSignedCertificate->[getCertificateFile]]] | Creates an instance of the AbstractInfinispanServerDriver. This is a public method for the base class. | Is this still necessary? |
@@ -48,8 +48,11 @@ import org.apache.gobblin.metrics.event.TimingEvent;
* A FileSystem based implementation of {@link JobStatusRetriever}. This implementation stores the job statuses
* as {@link org.apache.gobblin.configuration.State} objects in a {@link FsStateStore}.
* The store name is set to flowGroup.flowNam... | [FsJobStatusRetriever->[getLatestExecutionIdsForFlow->[limit,checkArgument,copyOf,getTableNames,jobStatusStoreName,descendingSet],getJobStatusesForFlowExecution->[jobStatusTableName,singletonIterator,error,checkArgument,getAll,getJobStatus,get,getTableNames,iterator,isEmpty,shouldFilterJobStatus,add,startsWith,jobStatu... | This class is used to retrieve the job statuses for a given flow execution. Get all the job statuses for the given flow. | I don't this should be deprecated. We should support both JobStatusRetriever implementations. |
@@ -229,14 +229,13 @@ def _delay_auto_approval_indefinitely(version):
defaults={'auto_approval_delayed_until': datetime.max})
-def run_action(version_id):
+def run_action(version):
"""This function tries to find an action to execute for a given version,
based on the scanner results and associated... | [_delay_auto_approval->[_flag_for_human_review],run_customs->[run_scanner],_delay_auto_approval_indefinitely->[_flag_for_human_review],run_wat->[run_scanner]] | This function tries to find an action to execute for a given version. It will also check. | Do we really need to re-fetch the object then? |
@@ -57,6 +57,14 @@ namespace Dynamo.Wpf.Extensions
get { return dynamoViewModel.PackageManagerClientViewModel; }
}
+ /// <summary>
+ /// A reference to list of Local loaded packages
+ /// </summary>
+ public System.Collections.Generic.IEnumerable<Package> LocalPackage... | [ViewLoadedParams->[AddMenuItem->[AddItemToMenu],AddItemToMenu->[Insert,Count,Add,SearchForMenuItem],OnSelectionCollectionChanged->[SelectionCollectionChanged],AddSeparator->[AddItemToMenu],MenuItem->[ToDisplayString,ToString,Items,First],AddToExtensionsSideBar->[ExtensionAlreadyPresent,AddTabItem,ExtensionAdded,Log],B... | Creates a new view object that can be used to create a new view object. Extension object that is being added to the extensions side bar. | I find this super weird - Can you avoid adding anything here for now and lets just get the ExtensionsManager and then the PackageManagerExtension to avoid polluting this class until we have a plan? |
@@ -206,7 +206,9 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('https://docs.python.org/', None),
+ 'torch': ('https://pytorch.org/docs/stable/', None),
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
+ '... | [setup->[connect],inject_minigalleries->[append,split],patched_make_field->[handle_item->[astext,make_xrefs,pop,extend,len,paragraph,literal_strong,replace,isinstance,join,Text],list_item,handle_item,list_type,field_body,len,field,field_name],get_html_theme_path] | One entry per manual page output --------------------------------------- The type of the field is the type of the field. | Could we also add matplotlib here? |
@@ -37,6 +37,8 @@ if TYPE_CHECKING:
logger = logging.getLogger(__name__)
+WORKUNIT_TY = Dict[str, Any]
+
@dataclass(frozen=True)
class ExecutionRequest:
| [Scheduler->[_to_type->[_to_id],rule_graph_visualization->[visualize_rule_graph_to_file],graph_len->[graph_len],visualize_graph_to_file->[_raise_or_return],poll_workunits->[_from_value],visualize_rule_graph_to_file->[_raise_or_return],visualize_rule_subgraph_to_file->[_to_ids_buf,_to_id,_raise_or_return],add_root_selec... | Creates a new object of type type id. Initialize a new instance of the RuleSet class. | What does TY mean? Also, normally with MyPy type aliases, you use PascalCase. |
@@ -905,6 +905,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
'worker' => $worker_script_data,
'estimatedReadingTimeEnabled' => $this->estimated_reading_time_conditional->is_met(),
],
+ 'dismissedAlerts' => $dismissed_alerts,
];
if ( post_type_supports( get_post_type(), 'thu... | [WPSEO_Metabox->[enqueue->[current_post_type_has_taxonomies,display_metabox,determine_scope,get_metabox_script_data],get_recommended_replace_vars->[get_metabox_post],get_replace_vars->[get_metabox_post]]] | Enqueue metaboxes for the current page. Adds the script and styles to the administration panel. This function is used to build the script data for the shortcodes. - - - - - - - - - - - - - - - - - -. | `wpseoScriptData` is also loaded in other contexts (Elementor, taxonomies and config). Should this data be added there too? (your reducer would now produce an error already in Elementor without that safety check ) |
@@ -216,7 +216,16 @@ public class NameUtils
return false;
}
- public static String getGlobalPojoTypeName(DataType type)
+ /**
+ * Returns the name of the give top level {@code type}. If the
+ * {@code type}'s {@link DataType#getRawType()} contains the {@link Alias}
+ * annotation, then... | [NameUtils->[irregular->[singular,plural],getGlobalPojoTypeName->[hyphenize]]] | Checks if a word is uncountable. | Add "<p\>" before "If the..." |
@@ -255,6 +255,10 @@ func PGPKeyRawToArmored(raw []byte, priv bool) (ret string, err error) {
return
}
+func (k *PGPKeyBundle) SerializePrivate(w io.Writer) error {
+ return k.Entity.SerializePrivate(w, &packet.Config{ReuseSignaturesOnSerialize: !k.Generated})
+}
+
func (k *PGPKeyBundle) EncodeToStream(wc io.Writ... | [VerifyString->[VerifyStringAndExtract],CheckFingerprint->[Eq,GetFingerprint],ToIDString->[String],KeysByIdUsage->[toList,KeysByIdUsage],GetFingerprintP->[GetFingerprint],Match->[String],EncodeToStream->[Encode],KeysById->[toList,KeysById],DecryptionKeys->[toList,DecryptionKeys],HumanDescription->[ToKeyID,GetFingerprin... | EncodeToStream encodes the PGP key bundle to the given writer. | Out of curiosity, why does the generated case make more signatures during serialization? |
@@ -4,6 +4,17 @@ class ServiceProviderSessionDecorator
DEFAULT_LOGO = 'generic.svg'.freeze
+ SP_ALERTS = {
+ 'CBP Trusted Traveler Programs' => {
+ i18n_name: 'trusted_traveler',
+ learn_more: 'https://login.gov/help/trusted-traveler-programs/sign-in-doesnt-work/',
+ },
+ 'USAJOBS' => {
+ ... | [ServiceProviderSessionDecorator->[request_url->[url],sp_name->[friendly_name,agency],cancel_link_url->[sign_up_start_url],verification_method_choice->[t],return_to_service_provider_partial->[present?],sp_logo->[logo],sp_agency->[friendly_name,agency],sp_return_url->[present?,return_to_sp_url,decline_redirect_uri,valid... | Initializes the object with the values specified. | Are we planning on creating a new help page for USA Jobs? Is that why there is no URL configured here? If so, we should wait until that page is ready before merging this, right? |
@@ -111,7 +111,12 @@ class PytestRun(PartitionedTestRunnerTaskMixin, Task):
"it's best to use an absolute path to make it easy to find the subprocess "
"profiles later.")
- register('--options', type=list, fingerprint=True, help='Pass these options to pytest.')
+ register('... | [_Workdirs->[junitxml_path->[target_set_id],files->[files_iter]],PytestRun->[_run_pytest->[junitxml_path,get_pytest_rootdir,_get_failed_targets_from_junitxml,_get_target_from_test,_test_runner,_do_run_tests_with_args],_maybe_emit_coverage_data->[compute_coverage_pkgs->[packages->[package],packages],_cov_setup,compute_c... | Register options for the command line tool. | s/pass through the args/pass through args/ |
@@ -106,7 +106,7 @@ GCP_REQUIREMENTS = [
'proto-google-cloud-datastore-v1==0.90.0',
'googledatastore==7.0.0',
# GCP packages required by tests
- 'google-cloud-bigquery>=0.22.1,<0.23',
+ 'google-cloud-bigquery>=0.23.0,<1.0.0',
]
| [get_version->[open,exec],find_packages,get_distribution,system,get_version,format,warn,cythonize,setup,StrictVersion] | Return a tuple of int64_t if the package is present in the system. Package hierarchy for all packages. | Please put the upper bound to `0.24.0`. With major version `0` it is possible to introduce breaking changes with minor version changes. |
@@ -213,7 +213,6 @@ class Trainer:
self._last_log = time.time()
batch_num = 0
- logger.info("Training")
for batch in train_generator_tqdm:
batch_num += 1
self._optimizer.zero_grad()
| [Trainer->[train->[_validation_loss,_update_learning_rate,_should_stop_early,_metrics_to_tensorboard,_enable_gradient_clipping,_metrics_to_console,_train_epoch,_get_metrics],_validation_loss->[_get_metrics,_batch_loss],__init__->[TensorboardWriter],_metrics_to_tensorboard->[add_validation_scalar,add_train_scalar],_trai... | Trains one epoch and returns metrics. Adds the train loss and metrics to the tensorboard. | I would keep this here, as we have progress bars for training and validation separately, and this makes it more obvious which one is which. |
@@ -79,7 +79,7 @@ func main() {
}
}
- encData, err := asset.EncodeData(string(data))
+ encData, err := asset.EncodeData(strings.Replace(string(data), "\r", "", -1))
if err != nil {
fmt.Fprintf(os.Stderr, "Error encoding the data: %s\n", err)
os.Exit(1)
| [Write,StringVar,Fprintf,Fprintln,Execute,NewReader,Args,ReadFile,EncodeData,Find,Source,Parse,Bytes,ReadAll,Exit,WriteFile] | Reads the data from the specified file and writes it to the specified file or stdout. | Do you want to add a note here on why it's here to make sure if someone touches the code in the future he knows? |
@@ -28,6 +28,10 @@ public final class FormatOptions {
return new FormatOptions(word -> true);
}
+ public static FormatOptions noEscape() {
+ return new FormatOptions(word -> false);
+ }
+
/**
* Construct instance.
*
| [FormatOptions->[none->[FormatOptions],of->[FormatOptions],escape->[isReservedWord]]] | Returns a FormatOptions object that is a no - op if the format is not supported. | Probably worth a java doc that this is dangerous to use in anything other than in feedback to the user, e.g. error messages |
@@ -33,6 +33,11 @@ class ShowCommand(Command):
action='store_true',
default=False,
help='Show the full list of installed files for each package.')
+ self.cmd_opts.add_option(
+ '--json',
+ action='store_true',
+ default=False,
+ h... | [ShowCommand->[__init__->[add_option,insert_option_group,super],run->[warning,print_results,search_packages_info]],print_results->[get,strip,join,requires,info,enumerate],search_packages_info->[requires,join,startswith,get_metadata,append,len,sorted,isinstance,feed,close,canonicalize_name,relpath,split,FeedParser,get,s... | Initialize the command line interface. | I'm thinking me might want to stick to `--format json` like for the `pip list` command. cc @pypa/pip-committers |
@@ -916,8 +916,11 @@ namespace rpc
if (matched_handler == std::end(handlers) || matched_handler->method_name != request_type)
return BAD_REQUEST(request_type, req_full.getID());
- std::string response = matched_handler->call(*this, req_full.getID(), req_full.getMessage());
- MDEBUG("Returnin... | [operator<->[c_str],getBlockHeaderByHash->[front,,size,get_block_by_hash,get_blockchain_storage,get_current_blockchain_height,typeid],handleTxBlob->[AUTO_VAL_INIT,handle_incoming_tx,empty,MERROR,get_protocol,push_back,get_payload_object],handle_message->[fromJson,handle],handle->[,get_public_gray_peers_count,get_is_bac... | Handle a single RPC request. | Could be moved inside `MDEBUG(...)`, so it doesn't get evaluated of debug logs are disabled. |
@@ -1512,11 +1512,7 @@ namespace ProtoCore
}
StackValue ret = core.Heap.AllocateArray(retSVs, null);
-#if GC_MARK_AND_SWEEP
- core.AddCallSiteGCRoot(callsiteID, ret);
-#else
GCUtils.GCRetain(ret, core);
-#endif
return ret;
... | [CallSite->[FunctionEndPoint->[GetCandidateFunctions],WillCallReplicate->[GetCandidateFunctions],StackValue->[UpdateCallsiteExecutionState,ComputeFeps,ArgumentSanityCheck,IsFunctionGroupAccessible],TraceSerialiserHelper->[GetObjectData->[GetObjectData]],SingleRunTraceData->[GetObjectData->[GetObjectData],RecursiveGetNe... | This method is a slow path to execute a single - run function with a single - run This method is called to build the list of call - parameters and the list of formal parameters This method is called when a new object is created. | Because callsite still handles the objects the same way, Is my assumption correct that When Marksweep is on, refcount is also working along with it? At least for this specific case |
@@ -162,8 +162,8 @@ func (b *Botanist) DeploySeedMonitoring(ctx context.Context) error {
alertManagerValues, err := b.InjectSeedShootImages(map[string]interface{}{
"ingress": map[string]interface{}{
- "basicAuthSecret": basicAuth,
- "host": b.Seed.GetIngressFQDN("a", b.Shoot.Info.Name, b.Garde... | [deployGrafanaCharts->[Join,InjectSeedShootImages,Sprintf,GetReplicas,ApplyChartSeed,GetIngressFQDN],DeleteSeedMonitoring->[IgnoreNotFound,Delete,Client],DeploySeedMonitoring->[CreateSHA1Secret,ComputePrometheusHost,GetNodeNetwork,InjectSeedShootImages,GetServiceNetwork,GetIngressFQDN,GetAPIServerDomain,GetPodNetwork,d... | DeploySeedMonitoring deploys seed monitoring InjectSeedShootConfig injects seed images into seed. Info. Spec. Cloud. Deploy the kube - state - metrics image into the shoot namespace Injects alert manager images and applies chart seed alertmanager. | What was changed here? I can't see the variable has changed in this PR?. Can we choose a shorter ingress name? I would suggest `au` instead `a-users`, or why not simply stay with `a`? |
@@ -554,6 +554,8 @@ class _JsonToDictCoder(coders.Coder):
for x in table_field_schemas]
def decode(self, value):
+ if isinstance(value, bytes):
+ value = value.decode('utf-8')
value = json.loads(value)
return self._decode_with_schema(value, self.fields)
| [RowAsDictJsonCoder->[RowAsDictJsonCoder],BigQueryReader->[BigQueryReader],_JsonToDictCoder->[_decode_with_schema->[_decode_with_schema],_convert_to_tuple->[_convert_to_tuple]],_StreamToBigQuery->[expand->[InsertIdPrefixFn,BigQueryWriteFn]],WriteToBigQuery->[expand->[_compute_method,_StreamToBigQuery],table_schema_to_d... | Decodes the value of a . | Is the value here always `bytes`? If so, do we need the if? In general it is strongly discouraged to have apis that take both bytes and strings in Py3 sense. |
@@ -84,7 +84,10 @@ class BooleanAccuracy(Metric):
-------
The accumulated accuracy.
"""
- accuracy = float(self._correct_count) / float(self._total_count)
+ if self._total_count > 1e-12:
+ accuracy = float(self._correct_count) / float(self._total_count)
+ else:... | [BooleanAccuracy->[__call__->[,unwrap_to_tensors,size,sum,eq,ValueError,ones,view],get_metric->[float,reset]],register] | Returns the accumulated accuracy. | Can't you just test this against 0? |
@@ -381,10 +381,10 @@ function getSentinel_(iframe, opt_is3P) {
*/
function parseIfNeeded(data) {
const shouldBeParsed = typeof data === 'string'
- && data.charAt(0) === '{';
+ && data.indexOf('amp-') == 0;
if (shouldBeParsed) {
try {
- data = JSON.parse(data);
+ data = deserializeMess... | [No CFG could be retrieved] | Provides a postMessage API for a message sent to the target. The constructor for a window object. | Is this changed needed right now? No code except IframeMessagingClient is sending message in this format yet. I would expect a deprecation of this whole method in your refactoring CL. |
@@ -160,11 +160,11 @@ public class ColumnSelectorBitmapIndexSelector implements BitmapIndexSelector
public boolean hasMultipleValues(final String dimension)
{
if (isVirtualColumn(dimension)) {
- return virtualColumns.getVirtualColumn(dimension).capabilities(dimension).hasMultipleValues();
+ return ... | [ColumnSelectorBitmapIndexSelector->[getDimensionValues->[close->[close],iterator->[iterator]],hasMultipleValues->[hasMultipleValues],getBitmapIndex->[getBitmap->[getNumRows],getNumRows,getBitmapIndex,getIndex,getBitmap]]] | Checks if the dimension has multiple values. | IMO, better if this returns a `Capable`. Then the caller can decide what to do with unknowns. |
@@ -27,7 +27,7 @@ type Reader interface {
}
const (
- secondsInYear = int64(31_557_600)
+ secondsInYear = int64(31557600)
)
var (
| [Mul,Info,Add,CurrentHeader,Cmp,New,Sub,Logger,Time,Sign,Uint64,ParentHash,Config,Msg,ZeroDec,NewInt,Div,Epoch,GetHeader,Number] | apr import imports a block header from the database by hash and number. pastTwoEpochHeaders returns the current header and the next header in the block. | why change this line? |
@@ -385,6 +385,8 @@ func (f *StoreStateFilter) anyConditionMatch(typ int, opt *config.PersistOptions
case regionTarget:
funcs = []conditionFunc{f.isTombstone, f.isOffline, f.isDown, f.isDisconnected, f.isBusy,
f.exceedAddLimit, f.tooManySnapshots, f.tooManyPendingPeers}
+ case scatterRegionTarget:
+ funcs = [... | [Source->[anyConditionMatch],Target->[anyConditionMatch]] | anyConditionMatch returns true if any condition matches the given type. | If the target store is chosen by `scatter`, we can ignore some limitation like `exceedAddLimit` |
@@ -18,6 +18,11 @@ Examples:
------------------------------------------
$ prefect create project 'default'
$ prefect register --project default -m prefect.hello_world
+
+
+ Run this flow with the Prefect backend and agent
+ ------------------------------------------
+ $ prefect run --name "hello... | [capitalize->[capitalize],say_hello->[print],task,say_hello,Flow,capitalize,Parameter] | Provide a function to print a message if the is not present in the system. | is there a way to make it clearer that an agent must be running for this to work? |
@@ -0,0 +1,13 @@
+require 'spec_helper'
+
+describe AssignmentFile do
+ context 'a good AssignmentFile model' do
+ it { is_expected.to belong_to(:assignment) }
+ it { is_expected.to validate_presence_of(:filename ) }
+ it { is_expected.to validate_uniqueness_of(:filename)
+ .scoped_to(:... | [No CFG could be retrieved] | No Summary Found. | Expression at 8, 52 should be on its own line. |
@@ -138,6 +138,12 @@ class Amp3QPlayer extends AMP.BaseElement {
}
}
+ /**
+ *
+ * @param {!Event} event
+ * @private
+ * @return {void}
+ */
sdnBridge_(event) {
if (event.source) {
if (event.source != this.iframe_.contentWindow) {
| [No CFG could be retrieved] | Callback for video layout. Post a message to the video. | `return {void}` not needed right? |
@@ -615,6 +615,9 @@ module.exports = class bittrex extends Exchange {
}
throw e;
}
+ if (!response['result']) {
+ throw new OrderNotFound (this.id + ' order ' + id + ' not found');
+ }
return this.parseOrder (response['result']);
}
| [No CFG could be retrieved] | Get a single order by id or symbol Get deposit address by ID. | Hi! What do they reply instead, when `result` is missing? Can you please post their verbose response for that case or tell how to reproduce it? |
@@ -147,7 +147,8 @@ abstract class CommandWithTranslation extends \WP_CLI_Command {
\WP_CLI::success( "Language installed." );
if ( \WP_CLI\Utils\get_flag_value( $assoc_args, 'activate' ) ) {
- $this->activate( array( $language_code ), array() );
+ $set_date_time = \WP_CLI\Utils\get_flag_value( $assoc_a... | [CommandWithTranslation->[uninstall->[get_installed_languages]]] | Installs a language pack. | Let's only pass `array( 'set-date-time' => $set_date_time )` when it's a truthy value. |
@@ -73,6 +73,15 @@ class PrinterOutputModel(QObject):
self._type = type
self.typeChanged.emit()
+ @pyqtProperty(str, notify = buildplateChanged)
+ def buildplate(self):
+ return self._buildplate_name
+
+ def updateBuildplate(self, buildplate_name):
+ if self._buildplat... | [PrinterOutputModel->[cancelPreheatBed->[cancelPreheatBed],setHeadX->[updateHeadPosition,setHeadPosition],homeBed->[homeBed],homeHead->[homeHead],preheatBed->[preheatBed],setHeadZ->[updateHeadPosition,setHeadPosition],moveHead->[moveHead],setTargetBedTemperature->[updateTargetBedTemperature,setTargetBedTemperature],set... | Update the type and key of the object. | Naming is a bit vague, maybe something like setBuildplateName? |
@@ -684,14 +684,14 @@ export class AmpAnalytics extends AMP.BaseElement {
}
/**
- * @param {!Object<string, Object<string, string|Array<string>>>} source1
- * @param {!Object<string, Object<string, string|Array<string>>>} source2
+ * @param {!JsonObject|!./events.AnalyticsEvent} source1
+ * @param {!Jso... | [No CFG could be retrieved] | Expands the template with url parameters and returns a promise that resolves to the identifier of the. | mergeObject requires an `Object`. Does `JsonObject` and `Object` equals in type check? @erwinmombay do we want to avoid using object in the future? |
@@ -129,7 +129,6 @@ class MetaTwigExtension extends \Twig_Extension
// build meta tags
$result = array();
- $result[] = $this->getMeta('title', $seo['title']);
$result[] = $this->getMeta('description', $seo['description']);
$result[] = $this->getMeta('keywords', $seo['keywor... | [MetaTwigExtension->[getSeoMetaTags->[getMeta],getAlternateLinks->[getLocalization,getKey,getDefaultLocalization,getPortal,getAlternate],getAlternate->[getContentPath]]] | Get seo meta tags. | not a valid w3c meta tag. Searchengines use title Tag |
@@ -332,8 +332,15 @@ class ProductForm(forms.ModelForm, AttributesMixin):
def save(self, commit=True):
attributes = self.get_saved_attributes()
self.instance.attributes = attributes
+
+ price = self.cleaned_data["price"]
+ if not price.currency:
+ price.currency = setting... | [ProductForm->[save->[get_saved_attributes],__init__->[prepare_fields_for_attributes],RichTextField],ProductVariantForm->[save->[get_saved_attributes],__init__->[prepare_fields_for_attributes]],ReorderProductImagesForm->[save->[save]],AttributesMixin->[get_saved_attributes->[save]],ReorderAttributeValuesForm->[save->[s... | Save the object and all of the collections in the object. | How it could happen that price has `None` as currency? |
@@ -57,16 +57,15 @@ if ($full_view) {
$params = [
'collection' => $collection,
- 'metadata' => $menu,
+ 'metadata' => false,
'title' => $title,
'subtitle' => $subtitle,
'content' => $content,
];
-echo elgg_view('object/elements/summary/metadata', $params);
echo elgg_view('object/elements/summary/title', ... | [getSection,getMenu,getName,getURL,getMembers,addLinkClass] | Renders a summary element. | This is not the correct way to fix this issue. `$menu` is still used in the listing view of a collection and still needs to be displayed. In the `if` statement which checks `$full_view` `$metadata` needs to be set to `false` (around line 41) |
@@ -198,3 +198,15 @@ func genCompleter(cmd *cobra.Command) []readline.PrefixCompleterInterface {
}
return pc
}
+
+// ReadStdin convert stdin to string array
+func ReadStdin(r io.Reader) (input []string, err error) {
+ b, err := io.ReadAll(r)
+ if err != nil {
+ return nil, err
+ }
+ if s := strings.TrimSpace(stri... | [SetArgs,NewMemberCommand,ParseFlags,GetBool,StringP,NewServiceGCSafepointCommand,NewConfigCommand,Close,MarkHidden,NewPluginCommand,Exit,Set,NewEx,NewExitCommand,NewHotSpotCommand,LocalFlags,PrintPDInfo,NewLabelCommand,AddCommand,BoolP,FlagUsages,NewPrefixCompleter,Execute,Readline,NewOperatorCommand,NewUnsafeCommand,... | pc }. | Since the name of it is `ReadStdin`, I think there is no need to pass the `os.Stdin` through a parameter? |
@@ -390,6 +390,10 @@ public class HttpServerInventoryView implements ServerInventoryView, FilteredSer
synchronized (servers) {
DruidServerHolder holder = servers.get(server.getName());
if (holder == null) {
+ if (!finalPredicate.apply(Pair.of(server.getMetadata(), null))) {
+ log.debu... | [HttpServerInventoryView->[scheduleSyncMonitoring->[serverAdded,serverRemoved],getDebugInfo->[getDebugInfo],DruidServerHolder->[start->[start],addSegment->[apply,runSegmentCallbacks],stop->[stop],removeSegment->[runSegmentCallbacks]],serverRemoved->[runServerCallbacks,stop],serverInventoryInitialized->[runSegmentCallba... | Adds a server to the list of servers. | This makes `rhs` of the predicate argument nullable now, but I believe nullable argument can make things complicated. How about adding a new interface like `registerSegmentCallback(Executor exec, SegmentCallback callback, Predicate<DruidServerMetadata> predicate)` to `FilteredServerInventoryView`? |
@@ -76,15 +76,14 @@ func (e *defaultExecutor) ExecCommandInContainerWithFullOutput(ctx context.Conte
// execWithOptions executes a command in the specified container,
// returning stdout, stderr and error. `options` allowed for
// additional parameters to be passed.
-func execWithOptions(ctx context.Context, options... | [Context,RESTClient,Stream,NewSPDYExecutor,Kubernetes,Resource,CoreV1,Post,Name,Param,VersionedParams,String,Namespace,SubResource,URL,RESTConfig,TrimSpace] | NewExecutor returns a new Executor that runs a command in the specified container. Stream streams the given streams to the remote host. | Why is that removed? |
@@ -150,7 +150,7 @@ public class IntegrationComponentScanRegistrar implements ImportBeanDefinitionRe
}
protected Collection<String> getBasePackages(AnnotationMetadata importingClassMetadata,
- @SuppressWarnings("unused") BeanDefinitionRegistry registry) {
+ BeanDefinitionRegistry registry) {
Map<String, ... | [IntegrationComponentScanRegistrar->[invokeAwareMethods->[setResourceLoader,setEnvironment],registerBeanDefinitions->[setResourceLoader,registerBeanDefinitions]]] | Get the base packages from the annotation. | ? It is still unused (this was added to suppress a Sonar issue). |
@@ -161,4 +161,17 @@ public class InterpreterGroup {
public int hashCode() {
return id != null ? id.hashCode() : 0;
}
+
+ public void close() {
+ for (List<Interpreter> session : sessions.values()) {
+ for (Interpreter interpreter : session) {
+ try {
+ interpreter.close();
+ ... | [InterpreterGroup->[addInterpreterToSession->[put,get],equals->[equals],values->[values],hashCode->[hashCode],get->[get],put->[put],isEmpty->[isEmpty]]] | Returns the hashCode of this node. | would the exception stack be useful? just to LOGGER.warn( .... , e);? |
@@ -159,7 +159,7 @@ namespace TwoMGFX
{
private SamplerState _state;
- private bool _dirty;
+ private bool _dirty = true;
private TextureFilterType _minFilter;
private TextureFilterType _magFilter;
| [PassInfo->[ValidateShaderModels->[ParseShaderModel]],ShaderInfo->[],SamplerStateInfo->[Parse->[Parse],UpdateSamplerState]] | Initialize a sampler state object. Name - Gets the name of the filter. | This is most likely wrong. It would cause 2MGFX to always write sampler state to the effect and always overwrite the sampler set from code. This is not the normal behavior of XNA Effect. |
@@ -29,8 +29,6 @@ const (
)
type RegistryComponentOptions struct {
- ClusterAdminKubeConfig *rest.Config
-
OCImage string
MasterConfigDir string
Images string
| [Install->[DiscardContainer,AddSCCToServiceAccount,NewForConfig,LogContainer,Bind,New,HostPid,Errorf,Services,NewHelper,NewError,Join,Infof,Output,Privileged,Name,Get,Entrypoint,Command,HostNetwork,Image,Sprintf,Core,IsNotFound,NewRunHelper,WithCause]] | Imports a component from the registry Check if the registry service is not found. | Can we call this OriginImage ? |
@@ -38,7 +38,7 @@ class Sqlite(AutotoolsPackage):
'(unsafe for <3.26.0.0 due to Magellan).')
variant('rtree', default=False, description='Build with Rtree module')
- variant('column_metadata', default=False, description="Build with COLUMN_METADATA")
+ variant('column_metadata', default=True, d... | [Sqlite->[url_for_version->[list,Version,len,str,ValueError,format,join],libs->[find_libraries],get_arch->[str,platform,target,Arch],build_libsqlitefunctions->[install,Executable,cc],configure_args->[append,get_arch,extend],depends_on,resource,conflicts,version,patch,variant,run_after]] | Get all the versions of a single object. Creates an instance of the extension - functions. c resource. | Is this change necessary? |
@@ -83,9 +83,13 @@ public class IngestSegmentFirehoseFactory implements FirehoseFactory<InputRowPar
public IngestSegmentFirehoseFactory(
@JsonProperty("dataSource") final String dataSource,
@JsonProperty("interval") Interval interval,
+ // Specifying "segments" is intended only for when this Fireh... | [IngestSegmentFirehoseFactory->[getUniqueMetrics->[getMetrics],connect->[apply->[]],getUniqueDimensions->[getDimensions]]] | Creates an instance of FirehoseFactory which creates a Firehose instance for the given data source Get the data source for a given node id. | Would you please add `@Nullable` for `interval` and `segmentIds`? |
@@ -1219,8 +1219,9 @@ module.exports = class extends Generator {
const typeImports = new Map();
relationships.forEach(relationship => {
const relationshipType = relationship.relationshipType;
+ const otherEntityIsEmbedded = relationship.otherEntityIsEmbedded;
let t... | [No CFG could be retrieved] | Generate Entity Client Imports Generate Entity Client Enum Imports. | otherEntityIsEmbedded is used only once, use relationship.otherEntityIsEmbedded instead |
@@ -653,10 +653,10 @@ void GenericCAO::initialize(const std::string &data)
pos_translator.init(m_position);
updateNodePos();
- if(m_is_player)
- {
- LocalPlayer *player = m_env->getPlayer(m_name.c_str());
- if (player && player->isLocal()) {
+ if (m_is_player) {
+ // Check if it's the current player
+ LocalPl... | [sharpen->[init],step->[getSceneNode,update,removeFromScene,translate,setAttachments,addToScene,updateNodePos,getParent,getPosition],updateLight->[getParent], ClientActiveObject->[getType],processMessage->[updateTexture,update,init,updateTexturePos,updateTextures,updateAnimation,initialize,updateNodePos,updateAttachmen... | Initialize a node by reading the init data. add player to CAO. | how is this code cleaned up? |
@@ -163,6 +163,15 @@ func NewValidator(ctx context.Context, input *data.Data) (*Validator, error) {
op.Debugf("new validator Session.Populate: %s", err)
}
+ if v.Session.VMFolder == nil {
+ op.Debugf("Failed to set validator session VM folder")
+ // it's possible that VMFolder is not set, but session.Populate ... | [basics->[NoteIssue],getDatastore->[NoteIssue],registries->[NoteIssue],certificate->[NoteIssue],Validate->[ListIssues,datacenter],sessionValid->[checkSessionSet,NoteIssue],suggestDatacenter->[ListDatacenters],managedbyVC->[NoteIssue],credentials->[NoteIssue],certificateAuthorities->[NoteIssue],ValidateTarget->[ListIssu... | Accept a host and return a valid object. ParseURL parses a URL string into a URL object. | I think this may cause issues when doing a `vic-machine ls` with multiple datacenters. I suggest delaying any further work on this until @matthewavery has delivered the inventory folder support (#773) and then revisting it. |
@@ -51,12 +51,3 @@ class ServerInfoAPI(PulpAPI):
"""
path = self.base_path + 'distributors/'
return self.server.GET(path)
-
- def ping(self):
- """
- Retrieves basic status information from the server.
-
- @return: Response
- """
- path = '/v2/services/st... | [ServerInfoAPI->[ping->[GET],get_types->[GET],get_importers->[GET],__init__->[super],get_distributors->[GET]]] | Returns the list and descriptions of all installed distributors types installed on the server. | Since the bindings could be considered part of our API, we shouldn't remove this until 3.0.0. However, we could insert a DeprecationWarning. |
@@ -146,6 +146,14 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents
HasApcPower = false;
}
+ public bool TryGetWireNet([NotNullWhen(true)] out INodeGroup nodeGroup)
+ {
+ var wireNet = Provider.GetWireNet();
+
+ nodeGroup = wireNet;
+ ... | [PowerReceiverComponent->[AnchorUpdate->[ClearProvider,TryFindAndSetProvider],OnRemove->[OnRemove],ExposeData->[ExposeData],SetPowerReceptionRange->[TryFindAndSetProvider,ClearProvider],Startup->[Startup]]] | ClearProvider - Clear the provider. | This method doesn't use any non-public information, and is only used by one other class, so I don't think this method should be on this class. Also, you may want to check NeedsProvider, otherwise you may return an instance of PowerProviderComponent.NullProvider which may cause problems with whatever uses the returned v... |
@@ -376,4 +376,15 @@ public class ProgramState {
});
return fieldValues;
}
+
+ public ProgramState addRelation(SymbolicValueRelation constraint) {
+ List<SymbolicValueRelation> newRelations = new ArrayList<>(symbolicValueRelations);
+ newRelations.add(constraint);
+ return new ProgramState(this, ... | [ProgramState->[addConstraint->[ProgramState],inStack->[equals],cleanupConstraints->[ProgramState,inStack,isDisposable],equals->[peekValue,equals],isDisposable->[isDisposable],visitedPoint->[put,ProgramState],canReach->[isReachable],getFieldValues->[accept->[isField]],unstackValue->[ProgramState,Pop],cleanupDeadSymbols... | Get the field values. | missing @CheckForNull annotation. |
@@ -482,3 +482,16 @@ func queryElasticSearchComplianceResourceRunReport(client *elastic.Client, start
}
fmt.Println("The details of the runs can be found in : ", filename)
}
+
+func errorMessage(message string, err error) {
+ if err != nil {
+ fmt.Println(message, err)
+ os.Exit(1)
+ }
+}
+
+func endTimeBeforeSt... | [Before,Size,Index,Lte,Close,Gte,Exit,Add,Search,Flush,Field,NewFetchSourceContext,Format,Error,Sprint,Marshal,FetchSourceContext,Itoa,DefaultCSVWriter,NewClient,Aggregation,MarshalWithoutHeaders,SetURL,Do,NewCardinalityAggregation,NewRangeQuery,SetSniff,Query,Write,Println,Sprintf,Background,Unmarshal,ValueCount,Inclu... | Print details of the runs. | Now with this, you are Exiting the App for all Errors, earlier you were not. |
@@ -21,5 +21,4 @@ if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) && (!$loader
'php composer.phar install'.PHP_EOL;
exit(1);
}
-
return $loader;
| [No CFG could be retrieved] | Requires a composer. phar install. | should be reverted |
@@ -78,6 +78,14 @@ public class SearchableCacheConfiguration extends SearchConfigurationBase implem
}
}
+ private static Map<Class<? extends ServiceProvider<?>>, Object> initializeProvidedServices(EmbeddedCacheManager uninitializedCacheManager, ComponentRegistry cr) {
+ //Register the SelfLoopedCach... | [SearchableCacheConfiguration->[getProperty->[getProperty]]] | Returns an iterator over the classes that have been mapped to a . | Why create a concurrent hash map here? |
@@ -214,6 +214,7 @@ class SyncReport(object):
def __init__(self, success_flag, added_count, updated_count, removed_count, summary, details):
self.success_flag = success_flag
+ self.canceled_flag = False
self.added_count = added_count
self.updated_count = updated_count
s... | [RelatedRepository->[__init__->[__init__]],AssociatedUnit->[__init__->[__init__]]] | Initialize a ClusterNode object. | In hindsight, I wish I had gone with a state variable instead of the success flag. I go back and forth on how to handle those situations. It's a bit wonky to have two separate flags, but for API compatibility I think this is the right call. |
@@ -769,6 +769,10 @@ def _concretize_specs_together_original(*abstract_specs, **kwargs):
return spack.repo.Repo(repo_path)
+ if kwargs.get('multi_root', False):
+ # This feature cannot be implemented in the old concretizer
+ raise Exception
+
abstract_specs = [spack.spec.Spec(s) for s... | [_concretize_specs_together_original->[make_concretization_repository],Concretizer->[_adjust_target->[target_from_package_preferences],adjust_target->[_make_only_one_call],concretize_compiler->[_proper_compiler_style,concretize_version],choose_virtual_or_external->[_valid_virtuals_and_externals]]] | Concretizes the given abstract specs together. Returns a list of concrete specs that have a flag. | Minor, but marking this line since we should raise an object and be a bit more specific. |
@@ -555,6 +555,16 @@ func UpdateValidatorFromEditMsg(validator *Validator, edit *EditValidator) error
return nil
}
+// IsEligibleForEPoSAuction ..
+func IsEligibleForEPoSAuction(validator *ValidatorWrapper) bool {
+ switch validator.EPOSStatus {
+ case effective.FirstTimeCandidate, effective.Candidate:
+ return t... | [MarshalJSON->[String],SanityCheck->[TotalDelegation,String,SanityCheck],EnsureLength] | String returns a string representation of the validator. | For example, I don't see where the validator turn from other status e.g. InCommitteeAndSigning to Candidate? Seems elected validators won't get elected in new epochs. That's the complexity of state transition I am talking about after adding too many different status. |
@@ -1462,12 +1462,14 @@ func putFileHelper(c *client.APIClient, pfc client.PutFileClient,
return nil
}
childDest := filepath.Join(path, strings.TrimPrefix(filePath, source))
+ limiter.Acquire()
eg.Go(func() error {
+ defer limiter.Release()
// don't do a second recursive 'put file', just put ... | [StringVar,Pull,PrintDetailedCommitInfo,TempFile,Fd,TempDir,SubscribeCommit,Acquire,HasPrefix,CreateRepo,DeleteCommit,UintVar,Walk,RunFixedArgs,Flush,New,CreateDocsAlias,NewPutFileClient,PrintDetailedBranchInfo,StartCommit,NewWriter,GetFile,MarkFlagCustom,Split,PutFile,InteractiveConfirm,Println,Disable,AddFlagSet,Stdi... | putFile splits the file into two parts. joinPaths joins paths to prefix and filePath. | So for this to work it looks like it depends on the fact that this callsite will never use the limiter because `recursive` is false. That feels a little bit fragile to me. It's definitely worth a note that it shouldn't be changed but maybe it also makes sense to pass a `nil` limiter? I think a panic is probably prefera... |
@@ -476,7 +476,7 @@ class Jetpack_Search {
$posts_query = new WP_Query( $args );
// WP Core doesn't call the set_found_posts and its filters when filtering posts_pre_query like we do, so need to do these manually.
- $query->found_posts = $this->found_posts;
+ $query->found_posts = $posts_query->post_count... | [Jetpack_Search->[get_active_filter_buckets->[get_filters],get_search_aggregations_results->[get_search_result],get_search_facets->[get_search_aggregations_results],do_search->[search],get_filters->[get_search_aggregations_results],get_search_facet_data->[get_filters],get_current_filters->[get_active_filter_buckets],up... | This method is called before a post is fetched from the database. It will return an array. | Ok this won't work, my mistake this will always be the per page count. However, the underlying issue does still exist (count being off if search index is out of sync). So any opinion on how to solve would be good! |
@@ -18,7 +18,6 @@ class PyApacheBeam(PythonPackage):
depends_on('py-setuptools', type='build')
depends_on('py-pip@7.0.0:', type=('build', 'run'))
depends_on('py-cython@0.28.1:', type=('build', 'run'))
- depends_on('py-avro@1.8.1:1.10.8', type=('build', 'run'), when='^python@:2.9')
depends_on('py-... | [PyApacheBeam->[conflicts,depends_on,version]] | A unified programming model for Batch and Streaming. Find all build - specific dependencies. | why is this removed? |
@@ -53,6 +53,16 @@ class Posts extends Module {
*/
private $import_end = false;
+ /**
+ * Max bytes allowed for post_content => length.
+ * Current Setting : 5MB.
+ *
+ * @access public
+ *
+ * @var int
+ */
+ const MAX_POST_CONTENT_LENGTH = 2500000;
+
/**
* Default previous post state.
* Used for... | [Posts->[get_min_max_object_ids_for_batches->[get_where_sql],filter_post_content_and_add_links->[add_embed,remove_embed],wp_insert_post->[is_gutenberg_meta_box_update]]] | A post module that handles sync for posts. Get a post object by its ID. | Current setting looks like it's 2.5 MB (using the 1000-based definition), not 5 MB. Or else the value isn't actually bytes. |
@@ -224,6 +224,9 @@ class LongitudinalMpc:
def set_weights(self):
if self.e2e:
self.set_weights_for_xva_policy()
+ self.params[:,0] = -10.
+ self.params[:,1] = 10.
+ self.params[:,2] = 1e5*np.ones((N+1))
else:
self.set_weights_for_lead_policy()
| [gen_long_mpc_solver->[gen_long_model,get_safe_obstacle_distance],desired_follow_distance->[get_stopped_equivalence_factor,get_safe_obstacle_distance],LongitudinalMpc->[run->[reset],process_lead->[extrapolate_lead],update->[get_stopped_equivalence_factor,get_safe_obstacle_distance,process_lead]],gen_long_mpc_solver] | Sets the weights for the N - th node. | I assume this should happen regardless of `self.e2e`? |
@@ -193,7 +193,14 @@ func (c *CmdTeamListMemberships) runUser(cli keybase1.TeamsClient) error {
role += strings.ToLower(t.Role.String())
}
if c.showAll {
- fmt.Fprintf(c.tabw, "%s\t%s\t%s\t%s\n", t.FqName, role, t.Username, t.FullName)
+ var reset string
+ if !t.Active {
+ reset = "(inactive due to a... | [ParseArgv->[Args,String,New,Bool],outputJSON->[MarshalIndent,G,Printf,GetDumbOutputUI],outputInvites->[Fprintf,C,Sprintf,formatInviteName,ToLower,String],runUser->[GetTerminalUI,Printf,Fprintf,Flush,outputInvites,Init,Background,G,GetDumbOutputUI,TeamList,MarshalIndent,ToLower,String,Slice,OutputWriter],output->[outpu... | runUser lists all the teams in the system. This function prints out all the members of a given type. | We want to show this information? Does it matter? |
@@ -346,8 +346,12 @@ class SubdirData(object):
return _pickled_state
def _process_raw_repodata_str(self, raw_repodata_str):
- json_obj = json.loads(raw_repodata_str or '{}')
-
+ try:
+ json_obj = json.loads(raw_repodata_str or '{}')
+ except json.decoder.JSONDecodeError:
... | [fetch_repodata_remote_request->[maybe_decompress,Response304ContentUnchanged],SubdirData->[_read_local_repdata->[_pickle_me],query_all->[SubdirData],_load->[_load],_read_pickled->[_check_pickled_valid,load],iter_records->[load]]] | Process a repodata string. Add missing packages to the index. Check if the node has a node id. | We need to handle this decode error, but I don't think `log.debug()` is sufficient. Most users won't even see that. We need to throw the whole downloaded file away and start again. |
@@ -559,12 +559,7 @@ exports.singlePassCompile = async function(entryModule, options) {
.then(wrapMainBinaries)
.then(intermediateBundleConcat)
.then(eliminateIntermediateBundles)
- .then(thirdPartyConcat)
- .then(removeInvalidSourcemaps)
- .catch(err => {
- err.showStack = false; // Useles... | [No CFG could be retrieved] | Adds a new to the graph. Get the extension bundle config for the given filename or null if not found. | Why were these lines removed? |
@@ -18,15 +18,9 @@ class GradeEntryStudentTa < ActiveRecord::Base
# Create non-existing association between grade entry students and TAs.
columns = [:grade_entry_student_id, :ta_id]
# Get all existing associations to avoid violating the unique constraint.
- # TODO replace `select ... map` with pluck w... | [GradeEntryStudentTa->[merge_non_existing->[grade_entry_student_id,pluck,import,ta_id,map],table_name,belongs_to]] | Merges non - existing records from the database. | Align the operands of an expression in an assignment spanning multiple lines. |
@@ -1359,8 +1359,12 @@ def set_displayer(config):
"""
if config.quiet:
config.noninteractive_mode = True
+
+ devnull = open(os.devnull, "w")
+ atexit.register(devnull.close)
+
displayer: Union[None, display_util.NoninteractiveDisplay, display_util.FileDisplay] =\
- d... | [update_account->[_determine_account],renew_cert->[_init_le_client,_get_and_save_cert],install->[_init_le_client,_install_cert,_find_domains_or_certname],certificates->[certificates],register->[_determine_account],revoke->[revoke,_delete_if_appropriate,_determine_account],run->[_suggest_donation_if_appropriate,_find_do... | Set the displayer for the given configuration object. | What do you think about transforming `set_displayer` into a context manager, instead of using atexit ? |
@@ -445,6 +445,12 @@ def backward_transfer_pair(
# do anything and wait for the received lock to expire.
if channel.is_channel_usable(backward_channel, lock.amount, lock_timeout):
message_identifier = message_identifier_from_prng(pseudo_random_generator)
+
+ backward_route_state = RouteState(
... | [events_for_balanceproof->[is_safe_to_wait,get_payer_channel,get_payee_channel],forward_transfer_pair->[get_lock_amount_after_fees],events_for_expired_pairs->[get_pending_transfer_pairs],handle_onchain_secretreveal->[events_for_balanceproof,set_onchain_secret],handle_init->[mediate_transfer],handle_node_change_network_... | Sends a transfer backwards with the same amount and secrethash as the original payer Returns a list of events that are being processed. | I think we should not send a route backwards. IOW, the node sending the refund transfer cannot provide a valid path, so it should not send anything. |
@@ -47,8 +47,10 @@ class GiftCard(CountableDjangoObjectType):
@traced_resolver
def resolve_user(root: models.GiftCard, info):
requestor = get_user_or_app_from_context(info.context)
- if requestor_has_access(requestor, root.user, AccountPermissions.MANAGE_USERS):
- return root.user
+... | [GiftCard->[resolve_user->[requestor_has_access,PermissionDenied,get_user_or_app_from_context],resolve_code->[has_perm],String,Field]] | Resolve a user and code. | `traced_resolver` should only be used in more complex resolvers or when fetching relations, should be dropped here |
@@ -104,8 +104,10 @@ public class DruidMeta extends MetaImpl
{
// Build connection context.
final ImmutableMap.Builder<String, Object> context = ImmutableMap.builder();
- for (Map.Entry<String, String> entry : info.entrySet()) {
- context.put(entry);
+ if (info != null) {
+ for (Map.Entry<S... | [DruidMeta->[createStatement->[createStatement],prepareAndExecute->[prepare],prepare->[createStatement],closeAllConnections->[closeConnection],getDruidStatement->[getDruidConnection],getDruidConnection->[closeConnection],sqlResultSet->[closeStatement,createStatement,prepareAndExecute]]] | Open a connection. | i wonder if this was causing some problem before... looking at other implementations some do check for null on this field, :+1: |
@@ -100,6 +100,13 @@ class ProjMixin(object):
return self
+ def add_eeg_ref(self):
+ """Add an average EEG reference projector if one does not exist
+ """
+ if _needs_eeg_average_ref_proj(self.info):
+ eeg_proj = make_eeg_average_ref_proj(self.info, activate=True)
+ ... | [ProjMixin->[plot_projs_topomap->[plot_projs_topomap]],_read_proj->[Projection],make_eeg_average_ref_proj->[Projection],setup_proj->[_needs_eeg_average_ref_proj,make_eeg_average_ref_proj,make_projector_info,activate_proj],_needs_eeg_average_ref_proj->[_has_eeg_average_ref_proj],_uniquify_projs->[_proj_equal],make_proje... | Add a projection to the data container. Apply the projection to the data and return the object. | What does the `activate` do actually? It's not super clear to me ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.