patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -139,8 +139,17 @@ class ColorPalette:
def get_model(ie, args):
+ if args.architecture_type in ('ctpn', 'yolo', 'yolov4', 'retinaface') and \
+ (
+ args.reverse_input_channels or
+ not np.array_equal(args.mean_values, [0., 0., 0.]) or
+ not np.array_equal(args.scale_values,... | [ColorPalette->[min_distance->[dist]],main->[build_argparser,get_model,get_plugin_configs,print_raw_results,ColorPalette,draw_detections],main] | Get the model object for the given IEEE. | This also seems like it should be moved to `InputTransform` (e.g. `input_transform.is_trivial`). |
@@ -48,11 +48,6 @@ import org.apache.beam.sdk.values.PCollection;
* After you've looked at this example, then see the {@link DebuggingWordCount}
* pipeline, for introduction of additional concepts.
*
- * <p>For a detailed walkthrough of this example, see
- * <a href="https://cloud.google.com/dataflow/java-sdk/w... | [WordCount->[CountWords->[apply->[apply,ExtractWordsFn]],main->[apply,create,getOutput]]] | This method is used to import the given word count object from the SDK. This method is used to build a composite transform from a MinimalWordCount object. | @francesperry -- rather than deleting, should we link to the Beam pages that will eventually contain this text (but now link backwards to cloud.google.com?) |
@@ -0,0 +1,10 @@
+"""KIT module for conversion to FIF"""
+
+# Author: Teon Brooks <teon@nyu.edu>
+#
+# License: BSD (3-clause)
+
+from . kit import read_raw_kit
+from . import kit
+from . import coreg
+from . import constants
| [No CFG could be retrieved] | No Summary Found. | we usually avoid spaces for relative imports from .kit import read_raw_kit |
@@ -12,11 +12,11 @@ import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+import static org.mule.runtime.core.MessageExchangePattern.*;
+import static org.mule.runtime.core.api.config... | [DefaultMuleEventTestCase->[defaultProcessingStrategyOneWay->[DefaultMuleEvent,thenReturn,mock,equalTo,isTransacted,isSynchronous,assertThat,DefaultFlowProcessingStrategy],inboundPropertyForceSyncOneWay->[DefaultMuleEvent,thenReturn,mock,equalTo,isTransacted,isSynchronous,setProperty,assertThat],nonBlockingProcessingSt... | Creates a new instance of the DefaultMuleEventTestCase given a set of parameters. Creates a mock with a default message and a default event. | Avoid using wildcards |
@@ -272,14 +272,14 @@ static void discard_button_clicked(GtkWidget *widget, gpointer user_data)
if(res == GTK_RESPONSE_YES)
{
+ GList *imgs_copy = g_list_copy((GList *)imgs);
dt_history_delete_on_list(imgs_copy, TRUE);
dt_collection_update_query(darktable.collection, DT_COLLECTION_CHANGE_RELOAD,
... | [No CFG could be retrieved] | Function to clear history of selected images copy history from previous image to current selection and paste on new image. | why is this copy needed? Not needed in dt_history_delete_on_list and it is copied again in next instruction (dt_collection_update_query). |
@@ -88,7 +88,7 @@ class BucketIterator(BasicIterator):
"""
instances_with_lengths = []
for instance in dataset.instances:
- padding_lengths = instance.get_padding_lengths()
+ padding_lengths = cast(Dict[str, Dict[str, float]], instance.get_padding_lengths())
... | [BucketIterator->[__init__->[super],_create_batches->[_sort_dataset_by_padding,insert,pop,super,shuffle],_sort_dataset_by_padding->[get_padding_lengths,sort,append,print,items,add_noise_to_dict_values,Dataset]]] | Sorts the Dataset by their padding lengths using the keys in sorting_keys. | What is this `cast` doing? |
@@ -80,7 +80,7 @@ func (consensus *Consensus) WaitForNewBlockAccount(blockChannel chan *types.Bloc
}
startTime = time.Now()
- consensus.Log.Debug("STARTING CONSENSUS", "consensus", consensus, "startTime", startTime, "publicKeys", len(consensus.PublicKeys))
+ consensus.Log.Debug("STARTING CONSENSUS", "numTxs",... | [processStartConsensusMessage->[NewCoinbaseTX,NewGenesisBlock,startConsensus],reportMetrics->[IsStateBlock,Info,DecodeBytes,Seconds,GetProfiler,Transactions,Now,String,Sub,LogMetrics,EncodeToString],WaitForNewBlock->[RemovePeers,HasEnoughValidators,Now,ResetState,startConsensus,Sleep,Debug],ProcessMessageLeader->[proce... | WaitForNewBlockAccount waits for a new block to be added to the consensus consensus node. | is there a risk of newBlock.Transactions() == nil? |
@@ -63,6 +63,7 @@ public final class RowNumberNode
checkArgument(!orderSensitive || partitionBy.isEmpty(), "unexpected partitioning in order sensitive node");
requireNonNull(rowNumberSymbol, "rowNumberSymbol is null");
requireNonNull(maxRowCountPerPartition, "maxRowCountPerPartition is null")... | [RowNumberNode->[replaceChildren->[RowNumberNode],getOutputSymbols->[getOutputSymbols]]] | A node which is a child of a plan. A node is identified by a node that Get the source and partition by of a node. | Make commit message more explicit: "Verify arguments to RowNumberNode constructor" |
@@ -1926,6 +1926,12 @@ def raise_on_unsupported_feature(func_ir, typemap):
isinstance(ty, types.DictType)):
raise TypingError(msg % (ty, stmt.value.name, ty), loc=stmt.loc)
+ # checks for generator expressions (yield in use when func_ir has
+ # not been ... | [find_build_sequence->[require,get_definition],mk_loop_header->[mk_unique_var],mk_alloc->[mk_unique_var],find_global_value->[find_global_value,get_definition],rename_labels->[find_topo_order],gen_np_call->[get_np_ufunc_typ,mk_unique_var],set_index_var_of_get_setitem->[is_getitem,is_setitem],get_ir_of_code->[DummyPipeli... | Helper function to walk IR and raise if it finds op codes that are unsupported. Checks if a node in the language has a reserved reserved value. Check if a is supported. | There should be a similar check in `InlineClosureCallPass` so that it either: * reject inlining if it will produce an illegal IR; or, * abort compilation after it produces an illegal IR. |
@@ -198,6 +198,12 @@ AVAILABLE_CLI_OPTIONS = {
action='store_false',
default=True,
),
+ "print_json": Arg(
+ '--print-json',
+ help='Print best result detailization in JSON format.',
+ action='store_true',
+ default=False,
+ ),
"hyperopt_jobs": Arg(
... | [check_int_positive->[ArgumentTypeError,int],Arg,join] | Hyperopt specific options. Options for the hyperopt optimizers. | i am not sure about this argument naming wouldn't `--print-result-format json` be more flexible (so we can add `csv` / `strategycode` / whatever other format) later? |
@@ -57,7 +57,7 @@ public class SniHandler extends ByteToMessageDecoder implements ChannelOutboundH
InternalLoggerFactory.getInstance(SniHandler.class);
private static final Selection EMPTY_SELECTION = new Selection(null, null);
- private final AsyncMapping<String, SslContext> mapping;
+ protec... | [SniHandler->[read->[read],disconnect->[disconnect],connect->[connect],write->[write],AsyncMappingAdapter->[map->[map]],close->[close],deregister->[deregister],bind->[bind],flush->[flush]]] | Provides a handler which handles SNI - related messages. This method is called by the server to create a new NSNI handler. | does this need to be `protected`? can we just force users to use `super.lookup`? |
@@ -944,6 +944,10 @@ class Package(object):
self._total_time = time.time() - start_time
build_time = self._total_time - self._fetch_time
+ # Symlink local license to global license if one is required
+ if self.license_required and self.license_files:
+ se... | [Package->[do_install->[build_process->[do_stage,do_fake_install,do_patch],remove_prefix],sanity_check_prefix->[check_paths],do_install_dependencies->[do_install],do_uninstall->[remove_prefix],build_log_path->[build_log_path],_make_stage->[_make_resource_stage,_make_root_stage],_sanity_check_extension->[_check_extendab... | Installs a package and its dependencies recursively. Installs a single node - level object. Add a package to the system. | Can this be implemented as a post-install hook? It would keep the logic a bit more separate. If it were implemented as a post-install hook, it would also ensure that the build is cleaned up properly if anything goes wrong here in symlink_license. |
@@ -183,6 +183,10 @@ abstract class CommandWithUpgrade extends \WP_CLI_Command {
return $this->get_color( $status ) . $this->map[ $format ][ $status ];
}
+ protected function format_version( $version ) {
+ return '' . $version;
+ }
+
private function get_color( $status ) {
static $colors = array(
'inac... | [CommandWithUpgrade->[install->[install,install_from_repo],status->[status_single],status_all->[get_all_items],update_all->[get_item_list]]] | Format a status string. | What's the point of prepending an empty string? |
@@ -240,11 +240,12 @@ namespace Dynamo.Graph.Workspaces
// relevant ports.
var connectors = obj["Connectors"].ToObject<IEnumerable<ConnectorModel>>(serializer);
- // annotations
- var annotations = obj["Annotations"].ToObject<IEnumerable<AnnotationModel>>(serializer);
-... | [NodeReadConverter->[ReadJson->[CreateCustomNodeInstance,Context,Count,ToObject,OutPorts,ReferenceResolver,GUID,RemapPorts,IsAssignableFrom,InPorts,GetType,SetNumInputs,ToString,ToArray,AddReference,tryParseOrCreateGuid,Parse,GetFunctionDescriptor,Load],RemapPorts->[OutPorts,AddToReferenceMap,InPorts,GUID],manager,libr... | Reads a JSON object from the DynamoDb. This method returns an empty collection if there is no preset model in the collection. | WorkspaceModel requires annotations. I believe after the View block serialization, annotationModel will be added to workspaceModel, and the viewModel will get constructed. |
@@ -1,8 +1,11 @@
+from typing import List, Dict, TypeVar, Type, Generic # pylint: disable=unused-import
+
from allennlp.data.dataset import Dataset
from allennlp.common import Params
+from allennlp.common.registrable import Registrable
-class DatasetReader:
+class DatasetReader(Registrable):
"""
A ``Da... | [DatasetReader->[from_params->[list_dataset_readers,get_dataset_reader,pop_choice]]] | Reads a single from some location and returns a Dataset. | Why do we need these imports? |
@@ -2786,7 +2786,7 @@ class Jetpack {
}
ob_start();
- require $file;
+ require_once $file;
$active[] = $module;
| [Jetpack->[verify_json_api_authorization_request->[add_nonce],get_locale->[guess_locale_from_lang],admin_notices->[opt_in_jetpack_manage_notice,can_display_jetpack_manage_notice],authenticate_jetpack->[verify_xml_rpc_signature],admin_page_load->[disconnect,unlink_user,can_display_jetpack_manage_notice],wp_rest_authenti... | Activate default modules This method is called before activate all modules in the system Activates all default modules. | Just dropping a note that this is here because when authorizing a user via CLI I was seeing an error due to requiring a file twice. |
@@ -45,6 +45,11 @@ class SuluSearchExtension extends Extension implements PrependExtensionInterface
'services' => [
'factory' => 'sulu_search.search.factory',
],
+ 'persistence' => [
+ 'doctrine_orm' => [
+ 'enabled' => true,
+ ... | [SuluSearchExtension->[prepend->[prependExtensionConfig],load->[processConfiguration,setParameter,load]]] | Adds a missing configuration to the container. | this enables orm-indexing by default. |
@@ -273,7 +273,8 @@ public class HoodieMergeHandle<T extends HoodieRecordPayload, I, K, O> extends H
insertRecordsWritten++;
}
}
- keyToNewRecords.clear();
+
+ ((ExternalSpillableMap) keyToNewRecords).close();
writtenRecordKeys.clear();
if (fileWriter != null) {
| [HoodieMergeHandle->[close->[writeRecord,close],write->[writeUpdateRecord]]] | Close the merge handle. | merge handle seems to be the only place where deleting on jvm shutdown would be a problem. In other cases, they are fairly long lived. |
@@ -86,8 +86,8 @@ exports.postClosureBabel = function () {
file.contents,
file.sourceMap
);
- const {compressed, terserMap} = terserMinify(code);
+ const {compressed, terserMap} = await terserMinify(code);
file.contents = Buffer.from(compressed, 'utf-8');
file.sourceMap = remapping(... | [No CFG could be retrieved] | Debug function for the closure - pre - and - terser - minify - plugin. | Note that this won't propagate an error from terser into the pipeline. We need an explicit try/catch (since we're using async/await now), with the catch block doing `next(error)` |
@@ -0,0 +1,8 @@
+package modes
+
+var ModeScope = "Scope"
+var ModeSystemMasters = "SystemMasters"
+
+func init() {
+ AuthorizationModeChoices = append(AuthorizationModeChoices, ModeScope, ModeSystemMasters)
+}
| [No CFG could be retrieved] | No Summary Found. | why not also BrowserSafe? |
@@ -93,7 +93,8 @@ class ProxyInvocationHandler implements InvocationHandler, HasDisplayData {
* No two instances of this class are considered equivalent hence we generate a random hash code
* between 0 and {@link Integer#MAX_VALUE}.
*/
- private final int hashCode = (int) (Math.random() * Integer.MAX_VALUE... | [ProxyInvocationHandler->[getValueFromJson->[toString],buildOptionNameToSpecMap->[getValue],Deserializer->[deserialize->[as,getValue]],cloneAs->[as],populateDisplayData->[isDefault,getValue],BoundValue->[fromDefault->[of],fromExplicitOption->[of]],toString->[toString,getValue],Serializer->[serialize->[getValue],ensureS... | Provides a proxy for the class which implements the HasDisplayData interface. ProxyInvocationHandler for the . | please drop the extra ` ` |
@@ -398,14 +398,15 @@ public class JdbcIO {
checkArgument(getQuery() != null, "withQuery() is required");
checkArgument(getRowMapper() != null, "withRowMapper() is required");
checkArgument(getCoder() != null, "withCoder() is required");
- checkArgument(
- getDataSourceConfiguration()... | [JdbcIO->[ReadFn->[setup->[buildDatasource],processElement->[setParameters,mapRow]],Reparallelize->[expand->[apply]],Write->[withBatchSize->[build],withPreparedStatementSetter->[build],expand->[getStatement,getPreparedStatementSetter,apply,getDataSourceConfiguration],withRetryStrategy->[build],withStatement->[build],Wr... | Expands the query into a collection of objects with a sequence of objects. | Please also validate that the user didn't specify both. |
@@ -58,6 +58,13 @@ __all__ = (
'TextEditor',
'TimeEditor',
'TableWidget',
+ 'AvgAggregator',
+ 'MinAggregator',
+ 'MaxAggregator',
+ 'SumAggregator',
+ 'TableWidget',
+ 'GroupingInfo',
+ 'DataCube',
)
#-----------------------------------------------------------------------------
| [HTMLTemplateFormatter->[String],DataTable->[Int,Override,Bool,List,Enum,String,Either,Instance],BooleanFormatter->[Enum],NumberEditor->[Float],NumberFormatter->[Enum,String],IntEditor->[Int],DateFormatter->[Enum,Either],StringFormatter->[Enum,Color],TableWidget->[__init__->[super,CDSView],Instance],StringEditor->[List... | Abstract base class for data table s has_many functions. | @jburgy there is already `TableWidget` in the list above, this is what is causing the docs failure. Also the `__all__` list should generally be sorted alphabetically. |
@@ -828,6 +828,13 @@ long SSL_SESSION_set_time(SSL_SESSION *s, long t)
return (t);
}
+int SSL_SESSION_get_protocol_version(const SSL_SESSION *s)
+{
+ if (s == NULL)
+ return (0);
+ return s->ssl_version;
+}
+
const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s)
{
return s->tlsext_host... | [No CFG could be retrieved] | Reads all the fields of the next call to the next function. Protected in the following methods are private and private methods. | Is this necessary. For other similar calls we just assume s is non-NULL, and it is a programmer error if a NULL is provided. |
@@ -446,12 +446,7 @@ class Article < ApplicationRecord
def evaluate_front_matter(front_matter)
self.title = front_matter["title"] if front_matter["title"].present?
- if front_matter["tags"].present?
- self.tag_list = [] # overwrite any existing tag with those from the front matter
- tag_list.add(... | [Article->[username->[username],update_notifications->[update_notifications],set_cached_object->[username],readable_edit_date->[edited?]]] | Evaluate the front matter and set attributes. | Removed these because they are redundant. This will be handled with `validate_tag` |
@@ -20,7 +20,7 @@ if ( WPSEO_Utils::is_api_available() ) :
</p>
<p>
<a class="button"
- href="<?php echo esc_url( admin_url( 'admin.php?page=' . WPSEO_Configuration_Page::PAGE_IDENTIFIER ) ); ?>"><?php _e( 'Open the installation wizard', 'wordpress-seo' ); ?></a>
+ href="<?php echo esc_url( admin_url( 'admin... | [No CFG could be retrieved] | Echos the content of a single - page menu entry. Echos the link to the default SEO settings page. | If you make the method static, you can call the method without instantiate it. |
@@ -391,12 +391,16 @@ class ElggGroup extends \ElggEntity
/**
* Set the content access mode used by group_gatekeeper()
*
- * @param string $mode One of CONTENT_ACCESS_MODE_* constants
+ * @param string $mode One of CONTENT_ACCESS_MODE_* constants. If empty string, mode will not be changed.
* @return void
... | [ElggGroup->[getContentAccessMode->[isPublicMembership],get->[__get],__construct->[initializeAttributes],prepareObject->[getDisplayName]]] | set the content access mode. | Note: I chose to do this because this requires checking the raw `->content_access_mode` metadata and I'd prefer not do that in the action. |
@@ -244,12 +244,12 @@ vdev_disk_open(vdev_t *v, uint64_t *psize, uint64_t *max_psize,
{
struct block_device *bdev = ERR_PTR(-ENXIO);
vdev_disk_t *vd;
- int mode, block_size;
+ int count = 0, mode, block_size;
/* Must have a pathname and it must be absolute. */
if (v->vdev_path == NULL || v->vdev_path[0] != '... | [No CFG could be retrieved] | Private function for vdev_disk_open. Allocate a number of device - specific structures and return it. | Are the three SET_ERROR changes logically related to this patch? |
@@ -381,4 +381,4 @@ ExceptionSink.reset_log_location(os.path.join(get_buildroot(), '.pants.d'))
# Sets except hook.
ExceptionSink.reset_exiter(Exiter(exiter=sys.exit))
# Sets a SIGUSR2 handler.
-ExceptionSink.reset_interactive_output_stream(sys.stderr)
+ExceptionSink.reset_interactive_output_stream(sys.stderr.buffer... | [ExceptionSink->[_log_unhandled_exception_and_exit->[log_exception,_exit_with_failure,_format_unhandled_exception_log],_format_exception_message->[_iso_timestamp_for_now],_exit_with_failure->[_iso_timestamp_for_now],handle_signal_gracefully->[log_exception,_format_traceback,_exit_with_failure],_check_or_create_new_dest... | Sets a SIGUSR2 handler to exit the process. | Do we need to change any of the other invocations of this method to use the appropriate type of buffer? Is there a way we can check in the `reset_interactive_output_stream()` method whether we're receiving the appropriate type of object to write to? |
@@ -76,8 +76,8 @@
<span class="profile-header__meta__item -ml-1">
<% Profile.special_social_link_attributes.each do |attribute| %>
<% if @user.send(attribute).present? %>
- <a href="<%= @user.send(attribute) %>" target="_blank" rel="noopener me" class="px-1 ... | [No CFG could be retrieved] | Renders a hidden hidden list of all user s special attributes. Displays a dialog with a single unique id. | Rubocop fix, unrelated to this PR. |
@@ -47,7 +47,15 @@ class GroupsController < ApplicationController
@removed_groupings.push(grouping)
end
end
- head :ok
+ unless @errors.empty?
+ err_msg = 'The following groupings could not be deleted since they have submissions: ' +
+ @errors.join(', ')
+ flash_message(:erro... | [GroupsController->[destroy->[destroy],remove_member->[remove_member],delete_rejected->[destroy],disinvite_member->[destroy],decline_invitation->[decline_invitation]]] | Removes a from the group_name and group_id. | Instead of having two consecutive conditionals, use an if-else construct. |
@@ -56,10 +56,15 @@ class Jetpack_Modules_List_Table extends WP_List_Table {
) );
wp_enqueue_script( 'jetpack-modules-list-table' );
- add_action( 'admin_footer', array( $this, 'js_templates' ), 9 );
+ add_action( 'admin_footer', array( 'Jetpack_Modules_List_Table', 'js_templates' ), 9 );
+
+ /**
+ * @TODO... | [Jetpack_Modules_List_Table->[column_name->[is_module_available],single_row->[is_module_available],views->[get_views],column_cb->[is_module_available]]] | This function is called by the Jetpack_List_Table constructor. It is called Renders the modules list table. Network - related functions. | Same as above, maybe use `__CLASS__` instead. |
@@ -308,7 +308,7 @@ void UniformRefineUtility<TDim>::CreateNodeInEdge(
// Add the node to the sub model parts
const int key0 = mNodesColorMap[rEdge(0)->Id()];
const int key1 = mNodesColorMap[rEdge(1)->Id()];
- const int key = mSubModelPartsColors.IntersectKeys(key0, key1, mColors);
+ ... | [No CFG could be retrieved] | Get the middle node key. Get the middle node on a given edge. | Are you using negative values? (otherwise it could be unsigned int or std::size_t) |
@@ -1441,9 +1441,10 @@ static void set_legacy_nid(const char *name, void *vlegacy_nid)
#endif
static void *evp_cipher_from_dispatch(const int name_id,
- const OSSL_DISPATCH *fns,
+ const OSSL_ALGORITHM *algodef,
... | [No CFG could be retrieved] | get the associated cipher from the dispatch and set the value of the legacy NID. This function is called by the name_id_add_name_add_name_. | should the function be renamed to evp_cipher_from_algorithm? And similarly for other evp_xxx_from_dispatch? |
@@ -184,6 +184,7 @@ export const WebAnimationTimingFill = {
const WHITELISTED_RPOPS = {
'opacity': true,
'transform': true,
+ 'transform-origin': true,
'visibility': true,
'offset-distance': true,
'offsetDistance': true,
| [No CFG could be retrieved] | Checks if a property is whitelisted by WebAnimationTimingFill. | hey @aghassemi, question: if I would like to whitelist this property, do I have to do something on the validator side as well? |
@@ -26,6 +26,10 @@ class S3CorsRulesets
max_age_seconds: 3000
}.freeze
+ RULE_STATUS_SKIPPED = "rules_skipped_from_settings".freeze
+ RULE_STATUS_EXISTED = "rules_already_existed".freeze
+ RULE_STATUS_APPLIED = "rules_applied".freeze
+
##
# Used by the s3:ensure_cors_rules rake task to make sure the
... | [S3CorsRulesets->[sync->[s3_install_cors_rule,backup_location,build_from_config,enable_s3_uploads,use_s3?,s3_bucket_name,enable_direct_s3_uploads,ensure_cors!,enable_backups?,puts],freeze],require_dependency] | Creates a new instance of the S3CorsRulesets class. This method checks if the assets and backup rules are applied. If so it checks if the. | `# frozen_string_literal: true` makes these freezes redundant, doesn't it? |
@@ -112,6 +112,18 @@ class Generator(object):
['X'], 'Out', max_relative_error=1e-3, no_grad_set=set('Y'))
+class TestMatmulOpError(OpTest):
+ def test_errors(self):
+ with program_guard(Program(), Program()):
+ # The inputs type of sign_op must be Variable or numpy.ndarray.
+ ... | [inject_test->[generate_compatible_shapes],Generator->[setUp->[reference_matmul]],generate_compatible_shapes,inject_test] | Inject test for the MatMul operation. | sign_op typo? numpy.ndarray?OpVariable |
@@ -53,11 +53,13 @@ public class CsvToJsonConverter extends Converter<String, JsonArray, String, Jso
@Override
public Iterable<JsonObject> convertRecord(JsonArray outputSchema, String inputRecord, WorkUnitState workUnit)
throws DataConversionException {
- InputStreamCSVReader reader =
- new Input... | [CsvToJsonConverter->[convertSchema->[parse,JsonParser,getAsJsonArray],convertRecord->[addProperty,newArrayList,charAt,size,equals,get,JsonObject,splitRecord,getAsString,isEmpty,add,DataConversionException,InputStreamCSVReader]]] | Convert a record from input schema to output schema. | Why not just define `DEFAULT_CONVERTER_CSV_TO_JSON_ENCLOSEDCHAR` to `\0`? BTW: I saw `parser.ordinaryChar(enclosedChar);` in `InputStreamCSVReader`, which means it will treat the quoting character as ordinary character, is this expected? |
@@ -1,5 +1,11 @@
from unittest import TestSuite, TestLoader
+import django
+
+if hasattr(django, 'setup'):
+ django.setup()
+
+
TEST_MODULES = [
'saleor.cart.tests',
'saleor.checkout.tests',
| [TestSuite,TestLoader,addTests,loadTestsFromName] | Creates a TestSuite object with all unit tests loaded from the given modules. | Two blank lines before a constant? |
@@ -1333,6 +1333,11 @@ def main(cli_args=sys.argv[1:]):
:raises errors.Error: error if plugin command is not supported
"""
+
+ # On windows, shell without administrative right cannot create symlinks required by certbot.
+ # So we check the rights before continuing.
+ compat.raise_for_non_administra... | [enhance->[_init_le_client],revoke->[revoke,_delete_if_appropriate,_determine_account],renew_cert->[_init_le_client,_get_and_save_cert],_ask_user_to_confirm_new_names->[_format_list,_get_added_removed],install->[_init_le_client,_install_cert,_find_domains_or_certname],unregister->[_determine_account],certificates->[cer... | Command line entry point for the certbot - n - auth command. | Most times Certbot will need to create symlinks. This isn't always the case though. If you want to run `certbot --help`, `certbot certificates`, `certbot revoke`, etc., I don't think we need this permission. At least in the long term, I think I'd like to remove this from `main` and put a similar check early in the code... |
@@ -400,7 +400,7 @@ class TestBase(unittest.TestCase, metaclass=ABCMeta):
).new_session(zipkin_trace_v2=False, build_id="buildid_for_test")
self._scheduler = graph_session.scheduler_session
self._build_graph, self._address_mapper = graph_session.create_build_graph(
- TargetRoots([]), self._build_r... | [TestBase->[reset_build_graph->[invalidate_for,buildroot_files],target->[_init_target_subsystem],create_resources->[create_library],LoggingRecorder->[warnings->[_messages_for_level],errors->[_messages_for_level],infos->[_messages_for_level]],create_file->[invalidate_for],scheduler->[_init_engine],isolated_local_store->... | Initialize the engine. | This was incorrect code. |
@@ -32,8 +32,13 @@ class EpollRecvByteAllocatorHandle extends RecvByteBufAllocator.DelegatingHandle
receivedRdHup = true;
}
+ final boolean isReceivedRdHup() {
+ return receivedRdHup;
+ }
+
boolean maybeMoreDataToRead() {
- return isEdgeTriggered && lastBytesRead() > 0;
+ ... | [EpollRecvByteAllocatorHandle->[continueReading->[continueReading,maybeMoreDataToRead]]] | called when the read lock is held. | Is it possible to swap conditions "lastBytesRead() > 0" and "receivedRdHup" (receivedRdHup has faster access)? |
@@ -131,7 +131,8 @@ public class GroupByQueryQueryToolChest extends QueryToolChest<Row, GroupByQuery
.setUser5(Joiner.on(",").join(query.getIntervals()))
.setUser6(String.valueOf(query.hasFilters()))
.setUser7(String.format("%,d aggs", query.getAggregatorSpecs().size()))
- .setUser9(Mi... | [GroupByQueryQueryToolChest->[mergeResults->[run->[run]]]] | Makes a builder for a GroupBy query. | i wonder if getQueryId should be a method on the baseQuery object. Then there is no need for query helper |
@@ -88,7 +88,16 @@ func (consensus *Consensus) construct(
consensusMsg.Payload = consensus.blockHash[:]
}
- marshaledMessage, err := consensus.signAndMarshalConsensusMessage(message, priKey.Pri)
+ var marshaledMessage []byte
+ var err error
+ if needMsgSig {
+ // The message that needs signing only needs to be ... | [populateMessageFields->[GetCurBlockViewID],construct->[Str,Write,GetConsensus,Msg,Error,Serialize,AggregateVotes,SignHash,populateMessageFields,ConstructConsensusMessage,String,Bytes,signAndMarshalConsensusMessage,Err,Logger]] | construct creates a new network message from a specific message type. This function is used to create a NetworkMessage from a protobuf message. | so we don't sign the message with the validator's key anymore? shouldn't we just sign with one key? what's the potential risk? |
@@ -1203,6 +1203,14 @@ RSpec.describe TopicsController do
expect(response.parsed_body['basic_topic']).to be_present
end
+ it 'should trigger only the `topic_edited` event' do
+ expect_enqueued_with(job: :emit_web_hook_event, args: { event_name: "topic_edited" }) do
+ put... | [topic_user_post_timings_count->[count,map],extract_post_stream->[parsed_body,map],invite_group->[id,to,post,eq,name],email,create,let,duration,week,freeze_time,eq_time,it,set_subfolder,contain_exactly,to,external_system_avatars_enabled,cooked,allow_staff_to_tag_pms,tl1_requires_read_posts,with,avatar_template,username... | It can not move to a category that requires topic approval allows a change of title. | I think this assertion doesn't fully cover what the description requires which is to ensure that only the `topic_edited` event job is enqueued. We need to test for a count or assert thta the `post_edited` event is not fired. |
@@ -21,7 +21,7 @@ func main() {
fmt.Println("Error creating xds: ", err)
os.Exit(1)
}
- err = metrics.DeployPrometheus(clientset, namespace)
+ err = prometheus.DeployPrometheus(clientset, namespace)
if err != nil {
fmt.Println("Error creating prometheus: ", err)
os.Exit(1)
| [Println,DeployPrometheus,GetClient,DeployXDS,Getenv,Exit] | DeployXDS deploys all xds and metrics. | nit: `prometheus.DeployPrometheus` sounds weird, might be better to rename the function to `Deploy` if the package name is prometheus. Conversely, you could continue to use `metrics` as the package name even within the prometheus subfolder. |
@@ -205,7 +205,7 @@ class WP_CLI {
}
// {plugin|theme} update --all -> {plugin|theme} update-all
- if ( in_array( self::$arguments[0], array( 'plugin', 'theme' ) )
+ if ( count( self::$arguments ) > 0 && in_array( self::$arguments[0], array( 'plugin', 'theme' ) )
&& self::$arguments[1] == 'update'
&... | [WP_CLI->[add_command->[add_command],run_command->[invoke],render_automcomplete->[get_subcommands],after_wp_load->[show_usage,get_subcommands],error_to_string->[get_error_messages,get_error_code,get_error_data]]] | Parse command line arguments. | Shouldn't that be `> 1`? |
@@ -99,12 +99,16 @@ public class StreamedQueryResource implements KsqlConfigurable {
commandQueueCatchupTimeout,
activenessRegistrar,
authorizationValidator,
- errorHandler
+ errorHandler,
+ heartbeatAgent,
+ routingFilters
);
}
@VisibleForTesting
+ /... | [StreamedQueryResource->[writeValueAsString->[writeValueAsString]]] | private class to hold the properties of the resource. | As above - it looks like it's time to for `PullQueryExecutor` to have a constructor. Adding these here is just unnecessary coupling. |
@@ -275,8 +275,8 @@ public class ServerLauncher extends AbstractLauncher {
new Thread(() -> {
try {
serverGame.getRandomSource().getRandom(gameData.getDiceSides(), 2, "Warming up crypto random source");
- } catch (final RuntimeException re) {
- re.printStackTrace(System.out);
+ } c... | [ServerLauncher->[ServerReady->[await->[await]],addObserver->[addObserver],saveAndEndGame->[stopGame],stopGame->[stopGame],launchInNewThread->[setInGameLobbyWatcher,testShouldWeAbort]]] | This method warmes up the crypto random source. | Are you sure this is not shared code between headless and non-headless? |
@@ -216,7 +216,7 @@ class Media_Command extends WP_CLI_Command {
$file_array = array(
'tmp_name' => $tempfile,
- 'name' => basename( $file )
+ 'name' => Utils\basename( $file )
);
$post_array= array(
| [Media_Command->[process_regeneration->[needs_regeneration,get_error_message,remove_old_images],import->[get_error_messages,make_copy],regenerate->[process_regeneration]]] | Imports a file or a folder into a post. Imports a file. Import image and attach to a post. | WPCS: trailing comma recommended |
@@ -634,6 +634,11 @@ bool ValueType::IsLikelyTypedArray() const
return IsLikelyObject() && GetObjectType() >= ObjectType::Int8Array && GetObjectType() <= ObjectType::CharArray;
}
+bool ValueType::IsJITOptimizedTypedArray() const
+{
+ return IsObject() && ((GetObjectType() >= ObjectType::Int8Array && GetObje... | [No CFG could be retrieved] | Determines if an object is an integer array a float array a typed array a typed array a Checks if an array of float32 or float64 are in fact a mixed array of float. | Does this return true only for arrays that are supported in memset/memcopy optimizations? |
@@ -124,6 +124,11 @@ class WikiTablesDecoderState(DecoderState['WikiTablesDecoderState']):
debug_info = [debug_info for state in states for debug_info in state.debug_info]
else:
debug_info = None
+ if states[0].checklist_state is not None:
+ checklist_states = [check... | [WikiTablesDecoderState->[get_valid_actions->[get_valid_actions],combine_states->[WikiTablesDecoderState]]] | Combine two states into a single state. | And you could simplify this. |
@@ -21,10 +21,9 @@ def find_and_assign_cart(request, response):
response.delete_cookie(Cart.COOKIE_NAME)
-def get_cart_from_request(request, create=False):
+def get_cart_from_request(request, create=False, prefetch_product_data=False):
"""Returns Cart object for current user. If create option is True,... | [get_cart_from_request->[get_user_open_cart_token],get_or_empty_db_cart->[func->[get_cart_from_request]],assign_anonymous_cart->[func->[find_and_assign_cart]],get_or_create_db_cart->[func->[get_cart_from_request]]] | Returns Cart object for current user. If create option is True new cart will be saved to. | I think `queryset` parameter will be nicer here. By default `Cart.obects.all()`. |
@@ -195,3 +195,4 @@ with mne.open_report('report.h5') as report:
###############################################################################
# With the context manager, the updated report is also automatically saved
# back to :file:`report.h5` upon leaving the block.
+# This line needs to be removed.
| [read_evokeds,plot,print,open_report,parse_folder,data_path,add_figs_to_section,join,save,Report] | This is a hack to save the updated report when the block leaves. | FYI instead of doing this, which will require another commit (and another round of CIs), it's better to either improve the wording/tutorial in some way, or (if you can't easily find an improvement) do some harmless (PEP8-compatible) newline removal or insertion. |
@@ -1588,6 +1588,7 @@ aggregate_enter(struct vos_container *cont, bool discard)
}
cont->vc_in_aggregation = 1;
+ cont->vc_abort_aggregation = 0;
return 0;
}
| [No CFG could be retrieved] | region vos_util functions vos_aggregate returns the first non - zero value of the given object in the D. | Is it possible that the vc_abort_aggregation is set as 1 via vos_cont_ctl(), but it is reset as zero here before vos_aggregate_cb() check it? |
@@ -30,13 +30,15 @@ module Db
end
def edit
+ @person = Person.find(params[:id])
authorize @person, :edit?
end
- def update(person)
+ def update
+ @person = Person.find(params[:id])
authorize @person, :update?
- @person.attributes = person
+ @person.attributes... | [PeopleController->[destroy->[destroy],new->[new],create->[new],activities->[new]]] | This function is called to edit a user s . It does not perform any actions except. | Similar blocks of code found in 3 locations. Consider refactoring. |
@@ -6,6 +6,8 @@ class Identity < ApplicationRecord
delegate :metadata, to: :sp, prefix: true
+ CONSENT_EXPIRATION = 1.year
+
def deactivate
update!(session_uuid: nil)
end
| [Identity->[deactivate->[update!],piv_cac_enabled?->[enabled?],decorate->[new],sp->[from_issuer],include,validates,delegate,belongs_to]] | Deactivate a node id from the list of active sessions. | Do we have a better home for this constant? |
@@ -258,7 +258,7 @@ class AllenNlpDocstringProcessor(Struct):
if ty == "mod":
href = "/api/" + "/".join(path[1:])
else:
- href = "/api/" + "/".join(path[1:-1]) + "#" + path[-1].lower()
+ href = "/api/" + "/".join(path[1:-1]) + ... | [_py2md_wrapper->[py2md],AllenNlpDocstringProcessor->[_preprocess_line->[to_line,from_str,from_line],process_node->[ProcessorState]],main->[py2md,parse_args],RetVal->[to_line->[DocstringError,emphasize],from_line->[DocstringError]],Param->[to_line->[emphasize],from_line->[DocstringError]],parse_args->[parse_args],py2md... | Replace sphinx style crossreferences with markdown links. | Is this a long-standing bug? |
@@ -6,6 +6,8 @@ module TwoFactorAuthenticatable
before_action :handle_two_factor_authentication
before_action :check_already_authenticated
before_action :reset_attempt_count_if_user_no_longer_locked_out, only: :create
+
+ before_action :apply_secure_headers_override, only: :show
end
DELIVERY_M... | [otp_view_data->[recovery_code_unavailable?,unconfirmed_phone?],authenticator_view_data->[recovery_code_unavailable?],phone_view_data->[recovery_code_unavailable?,unconfirmed_phone?]] | The TwoFactorAuthenticatable class Handle invalid OTP. | it seems weird to me that we would put an Openid-specific method/logic in a concern shared by non-Openid controllers. Should this maybe go in the consuming controller rather than the concern? |
@@ -889,9 +889,7 @@ def test_checkout_complete_insufficient_stock_payment_voided(
assert data["errors"][0]["message"] == "Insufficient product stock: 123"
assert orders_count == Order.objects.count()
- gateway_void_mock.assert_called_once_with(
- payment, ANY, channel_slug=checkout_info.channel.sl... | [test_checkout_complete_without_redirect_url->[fetch_checkout_info,exists,get_plugins_manager,calculate_checkout_total_with_gift_cards,filter,post_graphql,get_graphql_content,refresh_from_db,first,save,zero_money,fetch_checkout_lines,count],test_checkout_confirm->[fetch_checkout_info,get_plugins_manager,checkout_total,... | Test if a payment transaction is complete with insufficient stock payment. This function checks if a specific node is in the gift card. Check if a node is not used by any other node in the gift card. | I think that the previous assertion was correct. We should change the test code to trigger the same action. |
@@ -559,8 +559,8 @@ class Evoked(ProjMixin, ContainsMixin, UpdateChannelsMixin,
out.comment = '-' + (out.comment or 'unknown')
return out
- def get_peak(self, ch_type=None, tmin=None, tmax=None, mode='abs',
- time_as_index=False):
+ def get_peak(self, ch_type=None, merge_grads=... | [_read_evoked->[_get_entries,_get_aspect],grand_average->[copy],EvokedArray->[__init__->[copy]],Evoked->[__neg__->[copy],detrend->[detrend],resample->[resample]],read_evokeds->[Evoked,_get_evoked_node]] | Returns a new object with a negative channel response. Get the last n - node channel name and time index. | this breaks API. Put merge_grads param at the end. |
@@ -61,6 +61,7 @@ async function doBuild(extraArgs = {}) {
const options = {
fortesting: extraArgs.fortesting || argv.fortesting,
minify: false,
+ npm: argv.npm,
watch: argv.watch,
};
printNobuildHelp();
| [No CFG could be retrieved] | Builds a single node - module with the given options. Creates a new AMP library. | Does the `npm` flag get read somewhere? The `options.npm` in `build-system/tasks/extension-helpers.js` is reading the `ExtensionOption` definition, not this boolean. |
@@ -135,6 +135,8 @@ public class GobblinClusterManager implements ApplicationLauncher, StandardMetri
private GobblinHelixJobScheduler jobScheduler;
@Getter
private JobConfigurationManager jobConfigurationManager;
+ @Getter
+ private volatile boolean started = false;
protected final String clusterName;
... | [GobblinClusterManager->[handleApplicationMasterShutdownRequest->[stop],initializeHelixManager->[apply->[getUserDefinedMessageHandlerFactory]],stop->[stopAppLauncherAndServices],main->[printUsage,buildOptions,start,getApplicationId,GobblinClusterManager],start->[configureHelixQuotaBasedTaskScheduling,start,startAppLaun... | Creates a new instance of GobblinClusterManager. Initialize the app launcher and the service server. | So how is this flag going to be used? I see that it is only set to true, but never read in OSS codebase. |
@@ -55,11 +55,12 @@ func TestRequest(t *testing.T) {
t.Run(strconv.Itoa(i), func(t *testing.T) {
r, err := http.NewRequest("GET", tc.url, nil)
require.NoError(t, err)
+ r.Header.Add("Test-Header", "test")
ctx := user.InjectOrgID(context.Background(), "1")
- r = r.WithContext(ctx)
+ r = r.Clone(ct... | [NewBuffer,InjectOrgID,Itoa,EqualValues,Equal,NewRequest,NopCloser,Background,Unmarshal,WithContext,DecodeRequest,EncodeRequest,NoError,DecodeResponse,Errorf,EncodeResponse,MergeResponse,Run] | expected - request TestResponse tests that the response contains the correct data. | Another copy. Why do we need this one? |
@@ -331,11 +331,17 @@ func (b *Beat) createBeater(bt beat.Creator) (beat.Beater, error) {
}
}
+ tracer, err := apm.NewTracer(b.Info.Beat, b.Info.Version)
+ if err != nil {
+ return nil, err
+ }
+
pipeline, err := pipeline.Load(b.Info,
pipeline.Monitors{
Metrics: reg,
Telemetry: monitoring.GetName... | [launch->[InitWithSettings,createBeater],TestConfig->[InitWithSettings,createBeater],Setup->[InitWithSettings,Setup,createBeater],indexSetupCallback->[Setup],createBeater->[BeatConfig],configure->[BeatConfig],Init->[InitWithSettings]] | createBeater creates a new beat. This is a helper function that creates a new beacon and registers it with the pipeline. | We should probably close the `apm.DefaultTracer` -- otherwise it will attempt to communicate with an APM Server on localhost. |
@@ -124,10 +124,11 @@ SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, cache, CTLFLAG_RW, 0, "ZFS VDEV Cache");
SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, mirror, CTLFLAG_RD, 0,
"ZFS VDEV mirror");
+#ifdef ZFS_META_VERSION
SYSCTL_DECL(_vfs_zfs_version);
SYSCTL_CONST_STRING(_vfs_zfs_version, OID_AUTO, module, CTLFLAG_RD,
(... | [No CFG could be retrieved] | Node for reading and writing ZFS VMs VDEV cache implementation. | Hmm well we do need to pull in this definition somehow. |
@@ -31,7 +31,6 @@ class AWSLambdaTarget:
class AWSLambdaOptions(LineOriented, GoalSubsystem):
- """Runs tests."""
name = "awslambda"
| [create_awslambda->[to_address,AWSLambdaGoal,MultiGet,materialize_directory,DirectoryToMaterialize,print_stdout,str,tuple,DirectoriesToMerge,line_oriented],dataclass] | Generate an AWS Lambda for a single object. Retrieve an AWS Lambda object from the specified HydratedTarget. | Could you please add a correct message for this? Otherwise, `./pants goals` will show `<no description>`. |
@@ -770,7 +770,7 @@ class order extends base {
}
$stock_values = $db->Execute($stock_query_raw, false, false, 0, true);
} else {
- $stock_values = $db->Execute("select * from " . TABLE_PRODUCTS . " where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'", false, fal... | [order->[create->[notify,Insert_ID],query->[MoveNext,RecordCount,notify,Execute],cart->[recordCount,Execute,attributes_price_onetime_charges,notify,get_products,get_content_type,attributes_price,get_decimal_places],create_add_products->[update_credit_account,Execute,notify,RecordCount,Insert_ID,display_price,apply_cred... | Creates a new product record and adds it to the list of products This function calculates stock values and stock value for the given product and updates the stock_value Zebra kategorii do zu Zen_db_perform_transaction Zen_db_perform_transaction_transaction Select all product attributes values options and attributes fro... | Given that `'products_attributes_filename'` is also used on line 780, I think the query should also include `'' as products_attributes_filename`. But I suppose 780 could be rewritten too. |
@@ -578,6 +578,13 @@ class TypeChecker(NodeVisitor[None], CheckerPluginInterface):
# values. IOW, tc is None.
return NoneTyp()
+ def get_coroutine_return_type(self, return_type: Type) -> Type:
+ if isinstance(return_type, AnyType):
+ return AnyType(TypeOfAny.from_anothe... | [TypeChecker->[analyze_async_iterable_item_type->[accept],visit_try_without_finally->[check_assignment,accept],visit_class_def->[accept],iterable_item_type->[lookup_typeinfo],visit_for_stmt->[accept_loop],visit_operator_assignment_stmt->[check_assignment,accept],check_return_stmt->[get_generator_return_type,accept],vis... | Get the type of the generator receive. If the function doesn t have a proper Generator return type. | Is the `is_coroutine` argument here still useful, or can we remove it now? |
@@ -78,7 +78,7 @@ func (d *Datastore) watchChanges() error {
stopCh := make(chan struct{})
kvCh, err := d.kv.Watch(d.lockKey, stopCh, nil)
if err != nil {
- return err
+ return fmt.Errorf("%v: %s", err, d.lockKey)
}
safe.Go(func() {
ctx, cancel := context.WithCancel(d.ctx)
| [Commit->[Marshall],Load->[unmarshall],Begin->[reload]] | watchChanges watches for changes to the datastore and calls the listener when the changes are made. | Can you add a sentence here like `error while watching key %s: %v` |
@@ -210,7 +210,7 @@ def add_parser(subparsers, parent_parser):
"--targets",
nargs="*",
help=(
- "Metric files or directories (see -R) to show diff for. "
+ "Metric files to show diff for. "
"Shows diff for all metric files by default."
),
m... | [CmdMetricsShow->[run->[show_metrics]],add_parser->[add_parser],CmdMetricsDiff->[run->[_show_diff]]] | Adds a parser to subparsers to display and compare metrics. Adds a parser to show the changes in metrics between a commit and a workspace. This command is used to show old metric value. | Actually, in this case `-R` works, so we should keep it :slightly_smiling_face: But probably need to rephrase it a bit, because it is about directories containing metric files. |
@@ -1,10 +1,14 @@
from __future__ import unicode_literals
+from django.conf import settings
from django.utils.translation import pgettext
-from django.utils.encoding import python_2_unicode_compatible
+from django.utils.encoding import python_2_unicode_compatible, smart_text
from satchless import cart
from satchl... | [Cart->[__str__->[pgettext,count]]] | A class to hold the data of a single item in the cart. | Please, please keep imports sorted :) |
@@ -18,7 +18,6 @@
package org.apache.beam.runners.flink.translation.types;
import org.apache.beam.sdk.coders.Coder;
-import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.api.common.ExecutionConfig;
import org.apache.flink.api.common.typeinfo.AtomicType;
import org.apache.flink.api.common.ty... | [EncodedValueTypeInformation->[hashCode->[hashCode]]] | Creates an instance of the UnifiedType class that represents a Beam value of a given Returns the number of fields in the array. | This was removed to stop needing the flink-annotation dependency as suggested during the PR review.. |
@@ -1,10 +1,10 @@
import React from "react";
import PropTypes from "prop-types";
-import sendRequest from "yoast-components/composites/OnboardingWizard/helpers/ajaxHelper";
+import { sendRequest } from "yoast-components";
import RaisedButton from "material-ui/RaisedButton";
-import { localize } from "yoast-component... | [No CFG could be retrieved] | The Mailchimp signup component. Sends a request to the MailChimp API to request a specific . | Please combine this with line 3 and 5. |
@@ -280,10 +280,11 @@ class TypeChecker(NodeVisitor[Type]):
# be accessed so any type is acceptable.
return AnyType()
- def get_generator_receive_type(self, return_type: Type) -> Type:
+ def get_generator_receive_type(self, return_type: Type, is_coroutine: bool) -> Type:
+ """Gi... | [TypeChecker->[visit_try_without_finally->[check_assignment,accept],visit_op_expr->[visit_op_expr],visit_operator_assignment_stmt->[accept,check_indexed_assignment],visit_unicode_expr->[visit_unicode_expr],visit_yield_from_expr->[accept,get_generator_return_type,get_generator_yield_type],visit_func_expr->[visit_func_ex... | Returns the type of the generator that should be used to generate the generator. | I think you mean "Awaitable" here. How does sending values to an Awaitable work? Why isn't the type of values an Awaitable can receive specified? |
@@ -5,7 +5,7 @@ import KratosMultiphysics
# Import KratosUnittest
import KratosMultiphysics.KratosUnittest as KratosUnittest
-from tests_python_scripts.interpolation_scripts.interpolation_test_analysis import InterpolationTestAnalysis
+from KratosMultiphysics.SwimmingDEMApplication.tests_python_scripts.interpolatio... | [TestFactory->[test_execution->[controlledExecutionScope],setUp->[controlledExecutionScope]]] | Initialize a new object with the current path and scope. | @philbucher : this was the problematic line. We tried many different combinations here, in order to avoid changing the core. It is clear that we are inside the 'tests' folder and we want to load a python module (which might be independent from the application, if you want) inside of 'tests' as well. I will try a bit mo... |
@@ -331,7 +331,7 @@ public final class DefaultEventContext extends AbstractEventContext implements S
@Override
public String getCorrelationId() {
- return parent.getCorrelationId();
+ return correlationId.orElse(parent.getCorrelationId());
}
@Override
| [DefaultEventContext->[ChildEventContext->[getOriginatingLocation->[getOriginatingLocation],getCorrelationId->[getCorrelationId],getProcessingTime->[getProcessingTime],getReceivedTime->[getReceivedTime],basicToString->[getId],getRootContext->[getRootContext],isCorrelationIdFromSource->[isCorrelationIdFromSource],toStri... | Gets the correlation id of this message. | why don't you do this directly in the constructor and avoid having the `Optional`? |
@@ -371,9 +371,10 @@ describe NotesController do
it "with good Assignment data" do
assignment = create(:assignment)
@notes = Note.count
- post_as @admin,
+ post_as @instructor,
:create,
- params: { noteable_type: 'Assignment', note: { noteable_id: a... | [display_for_note,create,describe,post_as,it,assignment,map,to,before,notes_message,t,count,human,have_http_status,parsed_body,delete_as,get_as,extract_text,put_as,id,redirect_to,context,user_name,not_to,format_date,eq] | GET on new_update_groupings get all groupings with new data and redirect to for Groupings and Students. | Layout/AlignHash: Align the elements of a hash literal if they span more than one line. |
@@ -30,12 +30,14 @@ NON_EMPTY_TRANSLATION_UNIT
# define DEFBITS 2048
# define DEFPRIMES 2
+static int verbose = 0;
+
static int genrsa_cb(int p, int n, BN_GENCB *cb);
typedef enum OPTION_choice {
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP,
OPT_3, OPT_F4, OPT_ENGINE,
- OPT_OUT, OPT_PASSOUT, OPT_CIPHER, OPT... | [No CFG could be retrieved] | This function returns the index of the n - th element in the list of possible genrsa The main entry point for the RSA key generation. | I know that things look different in other programs... in *this* program, you may notice that all option variables are defined in `genrsa_main`, so it would be nice if this was as well. (we aren't consistent in this regard, I know... that's a cleanup job waiting to happen. It's not high priority, though) |
@@ -27,6 +27,7 @@ LOCALDB = ".conan.db"
REMOTES = "remotes.json"
PROFILES_FOLDER = "profiles"
HOOKS_FOLDER = "hooks"
+SCHED_FILE = 'sched'
def is_case_insensitive_os():
| [ClientCache->[delete_empty_dirs->[package_layout],package_layout->[check_ref_case]],_mix_settings_with_env->[get_env_value,get_setting_name],is_case_insensitive_os] | Check if the current operating system is case insensitive. | maybe this file should start with dot? it's not something intended to be edited by user, right? also, it will avoid accidentally checking it into version control |
@@ -67,6 +67,10 @@ public class FetchAzureDataLakeStorage extends AbstractAzureDataLakeStorageProce
final DataLakeDirectoryClient directoryClient = dataLakeFileSystemClient.getDirectoryClient(directory);
final DataLakeFileClient fileClient = directoryClient.getFileClient(fileName);
+ ... | [FetchAzureDataLakeStorage->[onTrigger->[getValue,fetch,getFileUrl,getFileClient,nanoTime,isBlank,modifyContent,getDirectoryClient,toMillis,getDisplayName,transfer,ProcessException,error,read,write,get,getFileSystemClient,penalize,getStorageClient]]] | On trigger. | The Exception I am getting is FetchAzureDataLakeStorage[id=xxxxx] failed to process session due to com.azure.storage.file.datalake.models.PathProperties.isDirectory()Ljava/lang/Boolean;; Processor Administratively Yielded for 1 sec: java.lang.NoSuchMethodError: com.azure.storage.file.datalake.models.PathProperties.isDi... |
@@ -373,7 +373,7 @@ public abstract class Slave extends Node implements Serializable {
return res.openConnection();
}
- public URL getURL() throws MalformedURLException {
+ public URL getURL() throws IOException {
String name = fileName;
// P... | [Slave->[hashCode->[hashCode],JnlpJar->[generateResponse->[doIndex]],getWorkspaceRoot->[getRootPath],equals->[equals]]] | Connect to the URL. | Not a compatible change since you switch to the upper level class |
@@ -240,6 +240,9 @@ func NewBlockChain(
if bc.genesisBlock == nil {
return nil, ErrNoGenesis
}
+ var nilBlock *types.Block
+ bc.currentBlock.Store(nilBlock)
+ bc.currentFastBlock.Store(nilBlock)
if err := bc.loadLastState(); err != nil {
return nil, err
}
| [AddPendingCrossLinks->[WritePendingCrossLinks,ReadPendingCrossLinks],IsSameLeaderAsPreviousBlock->[GetHeaderByNumber],SuperCommitteeForNextEpoch->[ShardID,CurrentHeader,Config],ValidatorCandidates->[ReadValidatorList],ReadValidatorStats->[ReadValidatorStats],ReadTxLookupEntry->[ReadTxLookupEntry],UpdateStakingMetaData... | ValidateNewBlock returns a new block object based on the current state of the chain. Process processes a single block of a block type. | What is context for this fix and why a nil pointer solves it ? |
@@ -912,12 +912,15 @@ void VtkOutput::WriteIntegrationVectorContainerVariable(
return;
}
- const int res_size = static_cast<int>((rContainer.begin()->GetValue(rVariable)).size());
+ // determining size of results
+ const auto& r_process_info = mrModelPart.GetProcessInfo();
+ std::vector<TVar... | [WriteConditionResultsToFile->[IsCompatibleVariable],PrintOutput->[PrepareGaussPointResults],WriteNodalResultsToFile->[IsCompatibleVariable],WriteModelPartWithoutNodesToFile->[WriteModelPartToFile],WriteElementResultsToFile->[IsCompatibleVariable]] | Write integration vector container variable. | for the record, `rVariable.Zero()` does not work for variables of type `Vector`, since those have a size of zero by default |
@@ -155,4 +155,14 @@ public abstract class OfflineCause {
this.message = message;
}
}
+
+ /**
+ * Caused by idle period.
+ * @since TODO
+ */
+ public static class IdleOfflineCause extends SimpleOfflineCause {
+ public IdleOfflineCause () {
+ super(hudson.s... | [OfflineCause->[SimpleOfflineCause->[toString->[toString]],create->[SimpleOfflineCause],ChannelTermination->[getShortDescription->[toString]]]] | This is the constructor for the exception. | (not critical) Description should be descriptive imho. `Offline caused by idle period.` or `Offline caused by idle timeout.` |
@@ -48,10 +48,8 @@ func newRefreshCmd() *cobra.Command {
Short: "Refresh the resources in a stack",
Long: "Refresh the resources in a stack.\n" +
"\n" +
- "This command compares the current stack's resource state with the state known to exist in\n" +
- "the actual cloud provider. Any such changes are adop... | [StringVar,GetGlobalColorization,New,RunFunc,HasChanges,PersistentFlags,StringVarP,StringSliceVar,IntVarP,Wrap,Interactive,BoolVarP,Refresh,BoolVar] | newRefreshCmd returns a Command object that refreshes the resource state of a stack. if returns an error if the command fails to parse the n - node node identifier. | This doesn't looks correct. |
@@ -160,8 +160,11 @@ class StaticController < ApplicationController
format.js do
# https://github.com/w3c/ServiceWorker/blob/master/explainer.md#updating-a-service-worker
# Maximum cache that the service worker will respect is 24 hours.
- immutable_for 24.hours
+ # However, ensure... | [StaticController->[service_worker_asset->[render,js,respond_to,immutable_for,first,hours],show->[has_key?,any?,xhr?,nil?,exists?,cooked,t,find_by_id,from_now,empty?,include?,blank?,title,locale,redirect_to,path,send,gsub!,render,raise,login_required?],enter->[redirect_to,path,query,host,blank?,base_url,present?,match,... | Renders a javascript file with a with a maximum cache size. | I don't quite agree with this here. Wouldn't we bloat clients/nginx in this case since they end up caching all the service workers file for a year? |
@@ -115,11 +115,11 @@ class AppServicePlan(Resource):
'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'StatusOptions'},
'subscription': {'key': 'properties.subscription', 'type': 'str'},
- 'admin_site_name': {'key'... | [AppServicePlan->[__init__->[super,get]]] | A map of all the attributes of a node. Base class for a single node of type AppServicePlan. | @Nking92 @panchagnula, assuming this is on purpose, when you update cli, please remove `az appservice plan update --admin_site_name`, tag it with a breaking change, and do call out the reason which users would understand. |
@@ -575,6 +575,7 @@ int main(int argc, char **argv)
printf("----------------------------------------\n\n");
/* Spawn 2 servers, each one reads and writes URIs into diff file */
+ umask(600);
fd0 = mkstemp(tmp_file0);
fd1 = mkstemp(tmp_file1);
| [main->[strtok_r,mkstemp,fork,close,server_main,unlink,print_usage,getopt,printf,assert,D_ERROR],void->[sem_post,kill,D_ASSERTF,printf,assert],int->[lseek,strerror,setenv,crt_req_dst_rank_get,crt_bulk_transfer,RPC_PUB_DECREF,crt_finalize,syncfs,d_sgl_init,crt_reply_send,DBG_PRINT,crt_group_primary_rank_add,strlen,crt_r... | This is the entry point for the server - level command line interface. This function is the main entry point for the network network interface. close all file descriptors and return 0 if no child or parent. | this should be umask(S_IWGRP | S_IWOTH); instead. umask param turns off bits set in permissions, so the current umask(600) will make it not read/writeable by the user |
@@ -8,8 +8,9 @@ RSpec.describe Search::FeedContent, type: :service do
end
describe "::search_documents", elasticsearch: "FeedContent" do
- let(:article1) { create(:article) }
- let(:article2) { create(:article) }
+ let(:article1) { create(:article, published_at: Time.now.utc - 1.day) }
+ let(:articl... | [create,search_documents,let,describe,ago,first,it,map,to,flatten,with,iso8601,require,tags,include,dig,update,receive,each,id,context,not_to,a_kind_of,index_documents,eq,user_id,and_return] | defines INDEX_NAME INDEX_ALIAS and MAPPINGS Queries the index for the given tag. | `1.day.ago`, `2.days.ago`, `Time.current` :) |
@@ -583,7 +583,7 @@ void gui_init(dt_imageio_module_format_t *self)
gtk_grid_attach(grid, widget, 0, ++line, 1, 1);
d->title = GTK_ENTRY(gtk_entry_new());
- gtk_entry_set_placeholder_text(d->title, "untitled");
+ gtk_entry_set_placeholder_text(d->title, C_("pdf placeholder", "untitled"));
gtk_widget_set_he... | [No CFG could be retrieved] | Initialize the compression toggle - > add - > remove - > add - > add - > add - > add. | "pdf placeholder" -> is that a name? a title? maybe just "name" or "title"? |
@@ -535,6 +535,12 @@ public class PlayerAttachment extends DefaultAttachment {
this::setGiveUnitControl,
this::getGiveUnitControl,
this::resetGiveUnitControl))
+ .put("giveUnitControlInAllTerritories",
+ MutableProperty.of(
+ this::setG... | [PlayerAttachment->[getCanTheseUnitsMoveWithoutViolatingStackingLimit->[getPlacementLimit,get,getAttackingLimit,getMovementLimit]]] | Gets the map of all properties of this object including all derived classes and methods. This method is invoked when a resource of the given type is not found in the system. | I'm not 100% sure anymore, but I think there's a method that allows to provide a simple mapping function (getBool in this case) instead of another setter for string values. |
@@ -48,7 +48,8 @@ def supports_firefox(file_obj):
def get_endpoint(file_obj):
"""Get the endpoint to sign the file, depending on its review status."""
server = settings.SIGNING_SERVER
- if file_obj.version.addon.status != amo.STATUS_PUBLIC:
+ if (file_obj.status == amo.STATUS_BETA or
+ file_... | [sign_file->[get_endpoint,call_signing,supports_firefox],call_signing->[SigningError],sign_multi->[call_signing]] | Get the endpoint to sign the file depending on its review status. | This is weird: the first line is redundant, right? If it's `amo.STATUS_BETA` it sure isn't `amo.STATUS_PUBLIC`. I think this change isn't needed. |
@@ -135,10 +135,9 @@ module Engine
end
def buyable_train_variants(train, entity)
- return [] unless buyable_trains(entity).include?(train)
+ return [] unless train_among_buyable?(entity, train)
variants = train.variants.values
-
return variants if train.owned_by_corpora... | [president_may_contribute?->[must_buy_train?],must_buy_train?->[must_buy_train?],buy_train_action->[can_buy_train?,president_may_contribute?],ebuy_president_can_contribute?->[must_issue_before_ebuy?]] | Returns an array of all the variants that can be buyed for the given train and entity. | this can be simplified buyable_trains(entity).any? { |train| train.variants[train.name] } |
@@ -23,5 +23,8 @@ class JavacSubsystem(Subsystem):
advanced=True,
help="The JDK to use for invoking javac."
" This string will be passed directly to Coursier's `--jvm` parameter."
- " Run `cs java --available` to see a list of available JVM versions on your platform.",
... | [JavacSubsystem->[register_options->[register,super]],getLogger] | Register options for Coursier. | Formatting nit, good to add `\n\n` after this first sentence so that they're separate paragraphs. We've been doing that a lot more recently to make our help messages more readable. |
@@ -1,10 +1,11 @@
class AccountShow # rubocop:disable Metrics/ClassLength
- attr_reader :decorated_user, :decrypted_pii, :personal_key
+ attr_reader :decorated_user, :decrypted_pii, :personal_key, :locked_for_session
- def initialize(decrypted_pii:, personal_key:, decorated_user:)
+ def initialize(decrypted_pii:... | [AccountShow->[manage_personal_key_partial->[blank?],password_reset_partial->[present?],piv_cac_partial->[enabled?],personal_key_partial->[present?],header_personalization->[email,present?,first_name],verified_account_badge_partial->[identity_verified?],totp_partial->[enabled?],piv_cac_content->[t,enabled?],pending_pro... | Initialize a new object. | looks like `locked_for_session` was added in both places this class is used in the main flow, let's remove the default param? (since the other `AccountShow.new` appear to be all in specs?) |
@@ -205,7 +205,9 @@ public class Neo4jCypherInterpreter extends Interpreter {
if (value instanceof Collection) {
try {
value = jsonMapper.writer().writeValueAsString(value);
- } catch (Exception ignored) {}
+ } catch (Exception ignored) {
+ logger.info(ignored.getMessag... | [Neo4jCypherInterpreter->[renderGraph->[getLabels,getTypes],close->[close],setTabularResult->[setTabularResult],open->[open]]] | Adds a value to a line. | might be confusing to log an exception message (that is ignored)? |
@@ -1199,13 +1199,16 @@ def _area_between_times(t1, t2):
@verbose
def _is_good(e, ch_names, channel_type_idx, reject, flat, full_report=False,
- verbose=None):
+ ignore_chs=[], verbose=None):
"""Test if data segment e is good according to the criteria
defined in reject and flat. If... | [read_epochs->[Epochs],combine_event_ids->[copy],equalize_epoch_counts->[drop_epochs,drop_bad_epochs],Epochs->[equalize_event_counts->[drop_epochs,copy,_key_match,drop_bad_epochs],_get_data_from_disk->[_get_epoch_from_disk],to_nitime->[copy,get_data],resample->[resample],get_data->[_get_data_from_disk],next->[_is_good_... | Test if data segment e is good according to the criteria defined in reject and flat. | you're going to have to do this for each epoch. Maybe it is better to pass directly a mask / picks for channels tested against flat/reject |
@@ -111,10 +111,7 @@ func (b *BlobStorage) Stop() {}
func (b *BlobStorage) GetObject(ctx context.Context, objectKey string) (io.ReadCloser, error) {
if b.cfg.RequestTimeout > 0 {
- // The context will be cancelled with the timeout or when the parent context is cancelled, whichever occurs first.
- var cancel cont... | [RegisterFlagsWithPrefix->[StringVar,Join,Sprintf,DurationVar,Var,IntVar],getBlobURL->[NewBlockBlobURL,selectBlobURLFmt,Sprintf,newPipeline,Replace,Parse],GetObject->[WithTimeout,getBlobURL,Download,Body],Validate->[Join,Errorf,StringsContain],buildContainerURL->[NewContainerURL,Sprintf,selectContainerURLFmt,newPipelin... | GetObject returns a reader for the object identified by objectKey. | Doesn't introduce a leak not calling the `cancel` function at all? |
@@ -128,7 +128,11 @@ class FnApiControlClient implements Closeable {
SettableFuture<BeamFnApi.InstructionResponse> completableFuture =
outstandingRequests.remove(response.getInstructionId());
if (completableFuture != null) {
- completableFuture.set(response);
+ if (response.getErr... | [FnApiControlClient->[forRequestObserver->[FnApiControlClient],ResponseStreamObserver->[onError->[closeAndTerminateOutstandingRequests],onCompleted->[closeAndTerminateOutstandingRequests]]]] | Invoked when a response from the client is received. | @kennknowles just an FYI that Thomas got to this change before you. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.