patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -1409,6 +1409,12 @@ class TestKVMLiveMigration(cloudstackTestCase):
if len(self.hosts) < 2:
self.skipTest("Requires at least two hosts for performing migration related tests")
+
+ for host in self.hosts:
+ print(f"=== setup() === Host.OS = {host.details['Host.OS']}")
+ if host.details['Host.OS'] in ['CentOS']:
+ self.skipTest("live migration is not stabily supported on CentOS")
+
def tearDown(self):
try:
cleanup_resources(self.apiclient, self.cleanup)
| [TestMigrateVMwithVolume->[test_01_migrate_VM_and_root_volume->[migrate_vm_with_pools,deploy_vm,get_target_pool,get_vm_volumes],test_03_migrate_detached_volume->[create_volume,deploy_vm,get_target_pool],test_02_migrate_VM_with_two_data_disks->[get_target_pool,get_vm_volumes,migrate_vm_with_pools,deploy_vm,create_volume]],TestSecuredVmMigration->[secure_all_hosts->[waitUntilHostInState],updateConfiguration->[updateConfiguration],test_03_secured_to_nonsecured_vm_migration->[unsecure_host,deploy_vm,migrate_and_check],migrate_and_check->[check_migration_protocol],test_04_nonsecured_to_secured_vm_migration->[unsecure_host,deploy_vm,migrate_and_check],unsecure_host->[waitUntilHostInState],test_02_unsecure_vm_migration->[get_target_host,unsecure_host,deploy_vm,migrate_and_check],test_01_secure_vm_migration->[get_target_host,deploy_vm,migrate_and_check]],TestKVMLiveMigration->[test_01_migrate_VM_and_root_volume->[get_target_host,deploy_vm,get_target_pool,get_vm_volumes],test_02_migrate_VM_with_two_data_disks->[get_target_host,get_target_pool,get_vm_volumes,deploy_vm,create_volume]],TestVAppsVM->[test_01_vapps_vm_cycle->[verify_disks,verify_nics,get_ova_parsed_information_from_template]]] | Sets up the object. | @DaanHoogland it seems not be a CentOS issue, but issue with test scripts or libvrt/kvm plugin. let's skip the live migration with volume on kvm at first, so trillian test for other prs is good. we can fix the issue afterwards. it needs investigation. could you change the lines to skip the test by checking the host hypervisor instead of host os ? |
@@ -95,9 +95,9 @@ namespace System.IO
[Fact]
public void GetAccessControl_Filestream_ReturnValidObject()
{
- using var directory = new TempDirectory();
+ using var directory = new TempAclDirectory();
using var file = new TempFile(Path.Combine(directory.Path, "file.txt"));
- using FileStream fileStream = File.Open(file.Path, FileMode.Append, FileAccess.Write, FileShare.None);
+ using FileStream fileStream = File.Open(file.Path, FileMode.Open, FileAccess.Write, FileShare.Delete);
FileSecurity fileSecurity = FileSystemAclExtensions.GetAccessControl(fileStream);
Assert.NotNull(fileSecurity);
Assert.Equal(typeof(FileSystemRights), fileSecurity.AccessRightType);
| [FileSystemAclExtensionsTests->[Verify_FileInfo_Create->[Verify_FileInfo_Create]]] | Get access control of file. txt. | Why didn't you passed `AccessControlSections.Access` in this case? |
@@ -249,9 +249,10 @@ class CallableType(FunctionLike):
arg_types = None # type: List[Type] # Types of function arguments
arg_kinds = None # type: List[int] # mypy.nodes.ARG_ constants
arg_names = None # type: List[str] # None if not a keyword argument
- min_args = 0 # Minimum number of arguments
- is_var_arg = False # Is it a varargs function?
- ret_type = None # type:Type # Return value type
+ min_args = 0 # Minimum number of arguments; derived from arg_kinds
+ is_var_arg = False # Is it a varargs function? derived from arg_kinds
+ ret_type = None # type: Type # Return value type
+ fallback = None # type: Instance
name = '' # Name (may be None; for error messages)
definition = None # type: SymbolNode # For error messages. May be None.
# Type variables for a generic function
| [replace_leading_arg_type->[copy_modified],strip_type->[strip_type,copy_modified,items,Overloaded],TypeQuery->[visit_star_type->[accept],visit_overloaded->[items],query_types->[accept]],UnionType->[make_simplified_union->[AnyType,make_union],make_union->[Void,UnionType]],Type->[__repr__->[accept]],Void->[with_source->[Void]],TypeStrVisitor->[visit_star_type->[accept],visit_tuple_type->[accept],visit_overloaded->[accept,items],visit_partial_type->[name],list_str->[accept]],TypeTranslator->[visit_union_type->[UnionType],visit_callable_type->[copy_modified,accept],visit_star_type->[accept,StarType],translate_types->[accept],visit_instance->[Instance],visit_tuple_type->[TupleType,accept],visit_overloaded->[accept,Overloaded,items],translate_bound_vars->[accept]],Overloaded->[with_name->[with_name,Overloaded]],CallableType->[copy_modified->[CallableType],with_name->[copy_modified,with_source],type_object->[is_type_obj]],TypeVisitor->[visit_star_type->[_notimplemented_helper],visit_overloaded->[_notimplemented_helper],visit_error_type->[_notimplemented_helper],visit_erased_type->[_notimplemented_helper],visit_type_list->[_notimplemented_helper],visit_ellipsis_type->[_notimplemented_helper]]] | Abstract base class for function types. Constructor for the object. | Repeated from base class `FunctionLike`. I wonder why mypy doesn't complain about this. |
@@ -331,7 +331,7 @@ class FakeLocation {
*/
change_(args) {
const change = parseUrl(this.url_.href);
- Object.assign(change, args);
+ Object.assign({}, change, args);
this.changes.push(change);
}
| [No CFG could be retrieved] | Provides a base class for handling a bunch of unique events. Adds a change to the hashchange event. | This used to throw a can't set property because the `change` is frozen. This is ok, no? |
@@ -50,6 +50,9 @@ class QuantumEspresso(Package):
# Versions of HDF5 prior to 1.8.16 lead to QE runtime errors
depends_on('hdf5@1.8.16:+fortran', when='+hdf5')
+ # KISS for now and only build the mpi version
+ depends_on('mpi', when='+epw')
+
patch('dspev_drv_elpa.patch', when='@6.1.0:+elpa ^elpa@2016.05.004')
patch('dspev_drv_elpa.patch', when='@6.1.0:+elpa ^elpa@2016.05.003')
| [QuantumEspresso->[install->[join_path,install,mkdirp,find,append,dirname,extend,filter_file,format,glob,join,configure,make],depends_on,conflicts,version,patch,variant]] | Returns a list of all possible values for a given sequence number. Deprecated. Use with caution!. | I think it would be more useful to phrase this as a TODO like `TODO: add support for X in the future also` |
@@ -3169,7 +3169,12 @@ def get_parfor_params(blocks, options_fusion, fusion_info):
dummy_block.body = block.body[:i]
before_defs = compute_use_defs({0: dummy_block}).defmap[0]
pre_defs |= before_defs
- parfor.params = get_parfor_params_inner(parfor, pre_defs, options_fusion, fusion_info) | parfor.races
+ params = get_parfor_params_inner(
+ parfor, pre_defs, options_fusion, fusion_info,
+ )
+ parfor.params, parfor.races = _combine_params_races_for_ssa_names(
+ block.scope, params, parfor.races,
+ )
parfor_ids.add(parfor.id)
parfors.append(parfor)
| [ConvertReducePass->[_reduce_to_parfor->[_mk_parfor_loops,Parfor,dump],_mk_reduction_body->[_make_index_var]],simplify_parfor_body_CFG->[simplify_parfor_body_CFG],remove_dead_parfor->[list_vars],repr_arrayexpr->[repr_arrayexpr],get_parfor_array_accesses->[unwrap_parfor_blocks,wrap_parfor_blocks],get_parfor_params_inner->[get_parfor_params],ParforPassStates->[__init__->[ParforDiagnostics]],prod_parallel_impl->[prod_1->[init_prange,internal_prange]],min_parallel_impl->[min_1->[init_prange,internal_prange]],linspace_parallel_impl->[linspace_3->[init_prange,internal_prange]],get_parfor_writes->[get_parfor_writes],_lower_parfor_sequential_block->[_lower_parfor_sequential_block],_update_parfor_get_setitems->[list_vars],mean_parallel_impl->[mean_1->[init_prange,internal_prange]],get_copies_parfor->[unwrap_parfor_blocks,wrap_parfor_blocks],has_cross_iter_dep->[list_vars],visit_vars_parfor->[visit_parfor_pattern_vars],dotvm_parallel_impl->[init_prange,internal_prange],argmin_parallel_impl->[init_prange,internal_prange],arange_parallel_impl->[arange_4->[init_prange,internal_prange]],push_call_vars->[list_vars,process_assign,push_call_vars],argmax_parallel_impl->[init_prange,internal_prange],sum_parallel_impl->[sum_1->[init_prange,internal_prange]],_arrayexpr_tree_to_ir->[_arrayexpr_tree_to_ir],_can_reorder_stmts->[list_vars,expand_aliases],_mk_parfor_loops->[LoopNest],dotmv_parallel_impl->[init_prange,internal_prange],ConvertNumpyPass->[_numpy_map_to_parfor->[_make_index_var,_mk_parfor_loops,Parfor,dump],_arrayexpr_to_parfor->[_make_index_var,_mk_parfor_loops,Parfor,dump]],_get_saved_call_nodes->[rename_global_or_getattr],ConvertSetItemPass->[_setitem_to_parfor->[LoopNest,Parfor,dump]],max_parallel_impl->[max_1->[init_prange,internal_prange]],lower_parfor_sequential->[run],var_parallel_impl->[var_1->[init_prange,internal_prange]],ParforPass->[_pre_run->[run],fuse_recursive_parfor->[run,fuse_parfors],run->[find_indexed_arrays->[],find_mask_from_size->[],_pre_run,ConvertReducePass,setup,run,ConvertNumpyPass,ConvertLoopPass,ConvertSetItemPass,validate_params],_mk_parfor_loops->[_mk_parfor_loops],_find_mask->[_find_mask]],parfor_find_max_label->[unwrap_parfor_blocks,wrap_parfor_blocks],parfor_insert_dels->[DummyFuncIR],get_parfor_call_table->[unwrap_parfor_blocks,wrap_parfor_blocks],get_parfor_tuple_table->[unwrap_parfor_blocks,wrap_parfor_blocks],fill_parallel_impl->[fill_1->[init_prange,internal_prange]],Parfor->[list_vars->[list_vars],get_shape_classes->[get_shape_classes],dump->[dump_graph_indented->[print_graph->[print_g->[]]],print_unoptimised->[print_fuse->[],print_nest->[print_g->[]]],print_optimised->[print_fuse->[],print_nest->[print_g->[]]],dump]],parfor_typeinfer->[unwrap_parfor_blocks,wrap_parfor_blocks],ParforDiagnostics->[reachable_nodes->[reachable_nodes],_get_parfors->[_get_nested_parfors],get_parfors->[_get_parfors],sort_pf_by_line->[sort_pf_by_line,compute_graph_info],get_stats->[count_root->[count_root],count_root],dump->[dump_graph_indented->[print_graph->[print_g->[print_g,print_wrapped],print_g,print_wrapped],print_graph,compute_graph_info],print_unoptimised->[print_fuse->[reachable_nodes,print_wrapped],print_nest->[print_g->[reachable_nodes,print_g,print_wrapped],print_g,print_wrapped],print_fuse,print_nest],print_optimised->[print_fuse->[reachable_nodes,print_wrapped],print_nest->[print_g->[reachable_nodes,print_g,print_wrapped],print_g,print_wrapped],print_fuse,print_wrapped,print_nest],dump_graph_indented,get_parfors,sort_pf_by_line,print_wrapped,count_parfors,print_unoptimised,print_optimised,compute_graph_info]],apply_copies_parfor->[unwrap_parfor_blocks,wrap_parfor_blocks],get_reduce_nodes->[lookup->[lookup],list_vars,supported_reduction,lookup],get_parfor_reductions->[list_vars,get_parfor_reductions],ConvertLoopPass->[run->[find_indexed_arrays->[list_vars],find_mask_from_size->[find_indexed_arrays],LoopNest,Parfor,_mk_parfor_loops,_make_index_var,dump],_get_prange_init_block->[list_vars,_is_parallel_loop],_replace_loop_access_indices->[unver,_replace_loop_access_indices]],parfor_add_offset_to_labels->[unwrap_parfor_blocks,wrap_parfor_blocks],dotvv_parallel_impl->[init_prange,internal_prange],try_fuse->[is_equiv->[is_equiv],is_equiv]] | find variables used in body of parfors from outside and save them. | Should this actually just raise? |
@@ -333,10 +333,15 @@ type PropertySpec struct {
// Description is the description of the property, if any.
Description string `json:"description,omitempty"`
+ // Const is the constant value for the property, if any. The type of the value must be assignable to the type of
+ // the property.
+ Const interface{} `json:"const,omitempty"`
+ // ConstInfo contains additional information about the property's constant value, if any.
+ ConstInfo *ConstSpec `json:"constInfo,omitempty"`
// Default is the default value for the property, if any. The type of the value must be assignable to the type of
// the property.
Default interface{} `json:"default,omitempty"`
- // DefautSpec contains additional information aboout the property's default value, if any.
+ // DefaultInfo contains additional information about the property's default value, if any.
DefaultInfo *DefaultSpec `json:"defaultInfo,omitempty"`
// DeprecationMessage indicates whether or not the property is deprecated.
DeprecationMessage string `json:"deprecationMessage,omitempty"`
| [bindObjectType->[bindProperties],bindProperties->[bindType],String->[String],bindType->[String,bindType],bindObjectType,bindProperties,String] | Language contains language - specific data about the type reference. | We can remove this. |
@@ -217,7 +217,7 @@ public class MockConnectorFactory
@Override
public Optional<ConnectorViewDefinition> getView(ConnectorSession session, SchemaTableName viewName)
{
- return Optional.of(getViews.apply(session, viewName.toSchemaTablePrefix()).get(viewName));
+ return Optional.ofNullable(getViews.apply(session, viewName.toSchemaTablePrefix()).get(viewName));
}
}
}
| [MockConnectorFactory->[Builder->[build->[MockConnectorFactory]]]] | Get view definition. | Wouldn't be enough to leave the code as it was and just use `Optional.ofNullable`? |
@@ -114,7 +114,12 @@ class VersionManager(ManagerBase):
channel=amo.RELEASE_CHANNEL_LISTED,
addon__status__in=(amo.STATUS_NOMINATED, amo.STATUS_APPROVED),
addon__disabled_by_user=False,
- addon__type__in=(amo.ADDON_EXTENSION, amo.ADDON_LPAPP, amo.ADDON_DICT),
+ addon__type__in=(
+ amo.ADDON_EXTENSION,
+ amo.ADDON_PERMISSION_ENABLER,
+ amo.ADDON_LPAPP,
+ amo.ADDON_DICT,
+ ),
)
# For unlisted, add-on can't be deleted or disabled.
| Q(
| [update_status->[update_status],DeniedInstallOrigin->[find_denied_origins->[punycode],save->[punycode]],Version->[was_auto_approved->[is_public],is_public->[is_public],transformer->[rollup,_create_compatible_apps],inherit_nomination->[reset_nomination_time],is_ready_for_auto_approval->[auto_approvable],from_upload->[VersionCreateError,from_upload],can_be_disabled_and_deleted->[valid],transformer_auto_approvable->[auto_approvable],transformer_activity->[rollup],compatible_apps->[_create_compatible_apps],UnfilteredVersionManagerForRelations,VersionManager],inherit_nomination->[inherit_nomination],License->[LicenseManager],VersionManager->[__init__->[__init__]],ApplicationsVersions->[__str__->[get_application_display,is_compatible_app]],InstallOrigin->[save->[_extract_base_domain_from_origin],_extract_base_domain_from_origin->[punycode]]] | Returns a queryset of versions that should be granted for auto - approval by the cron job. | nit: this list should probably be in a constant somewhere |
@@ -31,6 +31,13 @@ import datetime
import os
import logging
import re
+import functools
+
+AppConfigPreparer = functools.partial(
+ PowerShellPreparer,
+ 'appconfiguration',
+ appconfiguration_connection_string="Endpoint=https://fake_app_config.azconfig-test.io;Id=0-l4-s0:h5htBaY5Z1LwFz50bIQv;Secret=lamefakesecretlamefakesecretlamefakesecrett=",
+ appconfiguration_endpoint_string="https://fake_app_config.azconfig-test.io")
try:
from unittest.mock import Mock
| [AppConfigurationClientTest->[test_list_configuration_settings_key_label->[list_configuration_settings,list,all,len],test_list_revisions_key_label->[list_revisions,list,all,len],test_list_configuration_settings_contains->[list_configuration_settings,list,all,len],test_set_existing_configuration_setting_label_etag->[set_configuration_setting],_add_for_test->[bool,list,_delete_from_test,list_configuration_settings,add_configuration_setting],test_set_existing_configuration_setting_label_wrong_etag->[raises,set_configuration_setting],test_read_only->[set_read_only],test_get_configuration_setting_label->[get_configuration_setting],test_delete_with_key_no_label->[remove,raises,delete_configuration_setting,get_configuration_setting],__init__->[is_playback,getenv,super,AccessToken,DefaultAzureCredential,Mock,AzureAppConfigurationClient],test_list_configuration_settings_correct_etag->[list_configuration_settings,list,all,len],test_add_configuration_setting->[add_configuration_setting,append,ConfigurationSetting],test_list_configuration_settings_only_accepttime->[list,list_configuration_settings,len,timedelta,today],test_add_existing_configuration_setting->[add_configuration_setting,raises,ConfigurationSetting],test_list_configuration_settings_multi_pages->[list,list_configuration_settings,len,add_configuration_setting,str,delete_configuration_setting,ConfigurationSetting,range],setUp->[_add_for_test,super,ConfigurationSetting],test_set_read_only->[set_read_only,raises,set_configuration_setting],test_list_configuration_settings_fields->[list_configuration_settings,list,all,len],test_list_configuration_settings_only_key->[list_configuration_settings,list,all,len],test_list_configuration_settings_reserved_chars->[list,all,append,list_configuration_settings,sub,len,add_configuration_setting,ConfigurationSetting],test_set_configuration_setting_no_etag->[append,set_configuration_setting,ConfigurationSetting],test_list_revisions_key_no_label->[list_revisions,list,all,len],test_list_revisions_correct_etag->[list_revisions,list,all,len],test_get_configuration_setting_no_label->[get_configuration_setting],test_delete_correct_etag->[remove,raises,delete_configuration_setting,get_configuration_setting],test_delete_with_key_label->[remove,raises,delete_configuration_setting,get_configuration_setting],test_delete_read_only->[get_configuration_setting,set_read_only,delete_configuration_setting,remove,raises],test_delete_non_existing->[delete_configuration_setting],test_list_revisions_only_label->[list_revisions,list,all,len],_delete_from_test->[delete_configuration_setting,debug],test_list_configuration_settings_only_label->[list_configuration_settings,list,all,len],test_set_configuration_setting_etag->[raises,set_configuration_setting,ConfigurationSetting],test_list_revisions_fields->[list_revisions,list,all],test_get_non_existing_configuration_setting->[raises,get_configuration_setting],test_delete_wrong_etag->[raises,delete_configuration_setting],test_list_configuration_settings_null_label->[list_configuration_settings,list,len],tearDown->[super,delete_configuration_setting]]] | Creates a new object that can be used to access the Azure Mgmt API. Adds a configuration option to the configuration object. | I would put `None` here, since this file is not supposed to use that at all |
@@ -136,6 +136,12 @@ namespace Dynamo.Graph
return Enumerable.Empty<AnnotationModel>();
}
+ /// <summary>
+ /// Loads presets from xml file for specified nodes.
+ /// </summary>
+ /// <param name="xmlDoc">xml file</param>
+ /// <param name="nodesInNodeGraph">node models</param>
+ /// <returns>list of presets</returns>
public static IEnumerable<PresetModel> LoadPresetsFromXml(XmlDocument xmlDoc, IEnumerable<NodeModel> nodesInNodeGraph)
{
XmlNodeList PresetsNodes = xmlDoc.GetElementsByTagName("Presets");
| [NodeGraph->[LoadNotesFromXml->[Select,GetElementsByTagName,Count,Enumerable],NodeModel->[CreateNodeFromXml],LoadNodesFromXml->[Count,ChildNodes,LoadNodeFromXml,GetElementsByTagName,File],AnnotationModel->[File,Deserialize],LoadPresetsFromXml->[GetElementsByTagName,ChildNodes,Enumerable,PresetFromXml],LoadAnnotationsFromXml->[Count,LoadAnnotationFromXml,ChildNodes,GetElementsByTagName,Enumerable],ElementResolver->[Value,Attributes,Count,ChildNodes,GetElementsByTagName,Add],PresetModel->[File,Deserialize],ConnectorModel->[TryGetValue,ReadGuid,Make,NewGuid,ReadInteger],LoadConnectorsFromXml->[GetElementsByTagName,ChildNodes,Count,LoadConnectorFromXml],NoteModel->[File,NewGuid,Empty,Deserialize]]] | Load annotations from xml. | remove - for specified nodes. |
@@ -904,6 +904,14 @@ public enum Config {
"random",
"'random', 'firstfit', 'userdispersing', 'userconcentratedpod_random', 'userconcentratedpod_firstfit', 'firstfitleastconsumed' : Order in which hosts within a cluster will be considered for VM/volume allocation.",
null),
+ ImageStoreAllocationAlgorithm(
+ "Advanced",
+ ManagementServer.class,
+ String.class,
+ "image.store.allocation.algorithm",
+ "firstfitleastconsumed",
+ "firstfitleastconsumed','random' : Order in which hosts within a cluster will be considered for VM/volume allocation.",
+ null),
VmDeploymentPlanner(
"Advanced",
ManagementServer.class,
| [getCategories->[add,toArray],getConfig->[getCategories,equals,getConfigs],getConfigs->[get],StringTokenizer,trim,getScope,hasMoreTokens,get,getCategory,toString,put,add,values,valueOf] | A list of all known host capacity types that are used by the deployment planner to order the region Network Load Balancing Service. | adding keys here is an obsoleted way of creating Configuration details. please use a `Configkey<String>` |
@@ -566,7 +566,9 @@ export class ActionService {
* @param {!Array<{tagOrTarget: string, method: string}>} whitelist
*/
setWhitelist(whitelist) {
- this.whitelist_ = whitelist;
+ this.whitelist_ = whitelist.filter(
+ (value) => hasOwn(value, 'tagOrTarget') && hasOwn(value, 'method')
+ );
}
/**
| [No CFG could be retrieved] | Checks if the given element has a particular action type. Returns the action node for the given tag id. | Curious why add this? |
@@ -94,6 +94,11 @@ namespace Microsoft.Xna.Framework
}
}
+ // When the game is resumed from a portrait orientation it may receive a portrait surface at first.
+ // If the game does not support portrait we should ignore it because we will receive the landscape surface a moment later.
+ if (width < height && (_game.graphicsDeviceManager.SupportedOrientations & DisplayOrientation.Portrait) == 0)
+ return;
+
var manager = _game.graphicsDeviceManager;
manager.PreferredBackBufferWidth = width;
| [MonoGameAndroidGameView->[OnContextLost->[OnContextLost],OnKeyDown->[OnKeyDown],OnKeyUp->[OnKeyUp],Resume->[Resume],SurfaceDestroyed->[SurfaceDestroyed],OnContextSet->[OnContextSet],CreateFrameBuffer->[CreateFrameBuffer],SurfaceChanged->[SurfaceChanged],SurfaceCreated->[SurfaceCreated],OnGenericMotionEvent->[OnGenericMotionEvent],OnLoad->[OnLoad]]] | Called by the Android surface manager when it changes its size. | Can the opposite happen? Getting a landscape surface change event first, but the game does not support landscape? |
@@ -649,7 +649,7 @@ TASK_DEFINITION
`, tdName)
}
-func testAccAWSEcsTaskDefinitionFargate(tdName string) string {
+func testAccAWSEcsTaskDefinitionFargate(tdName, portMappings string) string {
return fmt.Sprintf(`
resource "aws_ecs_task_definition" "fargate" {
family = "%s"
| [DescribeTaskDefinition,Meta,Test,Sprintf,TestCheckResourceAttr,RootModule,ComposeTestCheckFunc,String,Errorf,Fatalf,RandString,DeregisterTaskDefinition] | dfn - nofollow - task - definition testAccAWSEcsTaskDefinitionExecutionRole - returns a string that can be used to. | Nitpick: It'd be much better if this was a separate test and test configuration as it does not pertain to the basic functionality of the resource with Fargate |
@@ -51,11 +51,10 @@ public class HiveSyncContext {
return new HiveSyncTool(this.syncConfig, this.hiveConf, this.fs);
}
- public static HiveSyncContext create(Configuration conf) {
+ public static HiveSyncContext create(SerializableConfiguration serConf, Configuration conf) {
HiveSyncConfig syncConfig = buildSyncConfig(conf);
- org.apache.hadoop.conf.Configuration hadoopConf = StreamerUtil.getHadoopConf();
String path = conf.getString(FlinkOptions.PATH);
- FileSystem fs = FSUtils.getFs(path, hadoopConf);
+ FileSystem fs = FSUtils.getFs(path, serConf.get());
HiveConf hiveConf = new HiveConf();
hiveConf.addResource(fs.getConf());
return new HiveSyncContext(syncConfig, hiveConf, fs);
| [HiveSyncContext->[hiveSyncTool->[HiveSyncTool],create->[addResource,getHadoopConf,getString,HiveConf,getFs,buildSyncConfig,getConf,HiveSyncContext],buildSyncConfig->[toList,getBoolean,HiveSyncConfig,getString,collect]]] | create a new HiveSyncTool. | IMO, we'd better make these two parameters more readable. The first one is serialized `Configuration` for Hadoop. The second one is the requirement of Flink right? While, from the name, we can not distinguish them. |
@@ -350,6 +350,7 @@ public final class IntrospectionUtils
return getAnnotatedFields(extensionType, Parameter.class);
}
+
public static Collection<Field> getParameterGroupFields(Class<?> extensionType)
{
ImmutableList.Builder<Field> listFieldsBuilder = ImmutableList.builder();
| [IntrospectionUtils->[isVoid->[isVoid],isRequired->[isRequired],getAliasName->[getAliasName],checkInstantiable->[checkInstantiable],getExpressionSupport->[getExpressionSupport],getAnnotation->[getAnnotation],isInstantiable->[isInstantiable,hasDefaultConstructor],getField->[getField],getExposedFields->[getParameterFields],getFieldByAlias->[getField]]] | getParameterFields - Gets all Parameter and ParameterGroup fields from the given extension type. | remove empty line |
@@ -147,7 +147,7 @@ class Mumps(Package):
if '+int64' in self.spec:
if using_xlf:
- makefile_conf.append('OPTF = -O%s' % opt_level)
+ makefile_conf.append('OPTF = -O%s %s' % opt_level)
else:
# the fortran compilation flags most probably are
# working only for intel and gnu compilers this is
| [Mumps->[install->[install,join_path,dsimpletest,working_dir,Executable,csimpletest,install_tree,zsimpletest,write_makefile_inc,make,ssimpletest],write_makefile_inc->[join_path,LibraryList,write,append,working_dir,dirname,extend,endswith,filter_file,format,read,join,RuntimeError,open],libs->[find_libraries],variant,depends_on,version,patch]] | Write a bunch of missing configuration files to makefile. Add missing parameters and orderings to makefile_conf. Add flags to makefile and add flags to makefile. Add missing libraries to the makefile conf. | That second `%s` is probably a leftover? |
@@ -43,6 +43,8 @@ class SyslogController extends WidgetController
$data['device'] = Device::hasAccess($request->user())->find($data['device']);
+ $data['priorities'] = array_flip(app('translator')->get('syslog.severity'));
+
return view('widgets.settings.syslog', $data);
}
| [SyslogController->[getSettingsView->[getSettings,find],getView->[getSettings]]] | getSettingsView - Get settings view of system log. | You don't need to array_flip() here, just flip $name and $val in syslog.blade.php foreach |
@@ -23,6 +23,11 @@ func TestNextDayBoundary(t *testing.T) {
{0, 1, millisecondPerDay - 1},
{0, 15 * seconds, millisecondPerDay - 15*seconds},
{1 * seconds, 15 * seconds, millisecondPerDay - (15-1)*seconds},
+ {14 * seconds, 15 * seconds, millisecondPerDay - (15-14)*seconds},
+ {0, 35 * seconds, millisecondPerDay - 20*seconds},
+ {1 * seconds, 35 * seconds, millisecondPerDay - (20-1)*seconds},
+ {20 * seconds, 35 * seconds, millisecondPerDay - 35*seconds},
+ {millisecondPerDay + 15*seconds, 35 * seconds, 2*millisecondPerDay - 5*seconds},
} {
t.Run(strconv.Itoa(i), func(t *testing.T) {
require.Equal(t, tc.out, nextDayBoundary(tc.in, tc.step))
| [Write,toHTTPResponse,Itoa,InjectOrgID,Equal,NewServer,NewRequest,HandlerFunc,Background,WithContext,Close,NoError,Parse,Wrap,ReadAll,Run,RoundTrip] | frontend import tests if a given object is imported and importable. returns an object that represents the optional conditions that can be found in the request. | I initially didn't understand the significance of the 20s here - a commend would be helpful. (As discussed on slack). |
@@ -190,6 +190,7 @@ class BasePreviewMixin(object):
preview = self.get_object()
assert 'png' in preview.thumbnail_path
assert 'png' in preview.image_path
+ assert 'png' in preview.original_path
def test_filename_in_url(self):
preview = self.get_object()
| [BasePreviewMixin->[test_delete_thumbnail->[get_object,check_delete],test_delete_image->[get_object,check_delete],test_filename_in_url->[get_object],test_filename->[get_object]]] | Test if filename is in image path or thumbnail. | nitpick, can we change these tests to `assert preview.thumbnail_path.endswith('.png')` to be a bit more failure-proof and make sure we actually have that as an ext of the filename. |
@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+internal static partial class Interop
+{
+ internal static partial class User32
+ {
+ public struct USEROBJECTFLAGS
+ {
+ public BOOL fInherit;
+ public BOOL fReserved;
+ public uint dwFlags;
+ }
+ }
+}
| [No CFG could be retrieved] | No Summary Found. | can we change this into a flags enum, I see we use it in `SystemInformation` below |
@@ -29,7 +29,7 @@ public class WorkloadStat implements Serializable {
private long numUpdates = 0L;
- private HashMap<String, Long> updateLocationToCount;
+ private HashMap<String, Pair<String, Long>> updateLocationToCount;
public WorkloadStat() {
updateLocationToCount = new HashMap<>();
| [WorkloadStat->[toString->[append,toString,StringBuilder],addUpdates->[getFileId,put]]] | Creates a class which provides statistics about a single partition. Get string. | rename to reflect whats being stored now into the map |
@@ -414,6 +414,16 @@ func (u *URLFetcher) IsNonretryableClientError() bool {
s != http.StatusLocked && s != http.StatusTooManyRequests
}
+func (u *URLFetcher) extractMsgBody(rdr io.ReadCloser) (string, error) {
+ out := bytes.NewBuffer(nil)
+ _, err := io.Copy(out, rdr)
+ if err != nil {
+ return "", err
+ }
+ return string(out.Bytes()), nil
+
+}
+
func (u *URLFetcher) setUserAgent(req *http.Request) {
log.Debugf("Setting user-agent to vic/%s", version.Version)
req.Header.Set("User-Agent", "vic/"+version.Version)
| [FetchAuthToken->[Fetch],fetchToFile->[fetch],head->[Head],fetchToString->[fetch]] | IsNonretryableClientError returns true if the status code of the request is not 400. | remove this empty line |
@@ -208,7 +208,7 @@ public class MqttPahoMessageHandler extends AbstractMqttMessageHandler
}
@Override
- public void connectionLost(Throwable cause) {
+ public synchronized void connectionLost(Throwable cause) {
logger.error("Lost connection; will attempt reconnect on next request");
this.client = null;
}
| [MqttPahoMessageHandler->[onInit->[onInit],publish->[publish],deliveryComplete->[sendDeliveryComplete],connectIfNeeded->[doConnect]]] | This method is called when a connection is lost. | Would you mind to explain a bit deeper how this `synchronized` fix helps ? Thanks in advance |
@@ -6,11 +6,12 @@
from spack import *
-class FontUtil(AutotoolsPackage):
+class FontUtil(AutotoolsPackage, XorgPackage):
"""X.Org font package creation/installation utilities and fonts."""
homepage = "http://cgit.freedesktop.org/xorg/font/util"
- url = "https://www.x.org/archive/individual/font/font-util-1.3.1.tar.gz"
+ xorg_mirror_path = "font/font-util-1.3.1.tar.gz"
+
version('1.3.2', sha256='f115a3735604de1e852a4bf669be0269d8ce8f21f8e0e74ec5934b31dadc1e76')
version('1.3.1', sha256='34ebb0c9c14e0a392cdd5ea055c92489ad88d55ae148b2f1cfded0f3f63f2b5b')
| [FontUtil->[font_install->[join_path,find,append,working_dir,Executable,format,autoreconf,configure,which,make],setup_build_environment->[prepend_path],depends_on,append,resource,version,join,variant,run_after]] | Create a single object of type ElementID. A list of fonts that can be used to generate a sequence of random numbers. Empirical analysis of a given node. | @RemiLacroix-IDRIS @tkameyama just in case you added the `font_baseurl`: we could somehow update this to use the selected mirror... #16056 (don't know how, cc @adamjstewart @alalazo) |
@@ -1,4 +1,4 @@
<!-- <%= t('notices.dap_participation') %> -->
<% dap_source = 'https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=GSA&subagency=TTS' %>
-<%= nonced_javascript_tag({src: dap_source, async: true, id: '_fed_an_ua_tag'}) do %>
+<%= backwards_compatible_javascript_tag(src: dap_source, async: true, id: '_fed_an_ua_tag') do %>
<% end %>
| [No CFG could be retrieved] | Find the nexus tag in the DAP. | I've heard that every time you get rid of optional `{` in ruby, an angel gets its wings |
@@ -659,6 +659,9 @@ def _apply_grid_transform(img: Tensor, grid: Tensor, mode: str) -> Tensor:
need_cast = True
img = img.to(torch.float32)
+ if grid.device.type != img.device.type:
+ grid = grid.to(img)
+
img = grid_sample(img, grid, mode=mode, padding_mode="zeros", align_corners=False)
if need_squeeze:
| [_assert_grid_transform_inputs->[_is_tensor_a_torch_image],crop->[_is_tensor_a_torch_image],affine->[_gen_affine_grid,_assert_grid_transform_inputs,_apply_grid_transform],_get_image_size->[_is_tensor_a_torch_image],rotate->[_gen_affine_grid,_apply_grid_transform,_assert_grid_transform_inputs,_compute_output_size],adjust_brightness->[_is_tensor_a_torch_image],ten_crop->[five_crop,hflip,_is_tensor_a_torch_image,vflip],vflip->[_is_tensor_a_torch_image],resize->[_get_image_size,_is_tensor_a_torch_image],center_crop->[crop,_is_tensor_a_torch_image],adjust_contrast->[rgb_to_grayscale,_is_tensor_a_torch_image],five_crop->[crop,center_crop,_is_tensor_a_torch_image],adjust_saturation->[rgb_to_grayscale,_is_tensor_a_torch_image],perspective->[_apply_grid_transform,_assert_grid_transform_inputs,_is_tensor_a_torch_image,_perspective_grid],adjust_hue->[_is_tensor_a_torch_image],hflip->[_is_tensor_a_torch_image],pad->[pad,_is_tensor_a_torch_image,_pad_symmetric]] | Apply a grid transform to the image. | In PyTorch in general we don't perform implicit CPU / CUDA conversions, but we instead raise errors to the user, in order to avoid silent performance penalties. I think we should instead fix the locations where the grid is created, so that they take the original Tensor device as input |
@@ -2,12 +2,15 @@
module GobiertoCms
module PageHelper
+
+ # TODO - Refactor
def section_tree(nodes, viewables)
html = ["<ul>"]
nodes.each do |node|
html << "<li>" + link_to(node.item.title, gobierto_cms_section_item_path(@section.slug, node.item.slug))
+ # TODO - This conditions are not fully tested and are too complex for a view helper
if node.children.any? && !(viewables & node.children).empty?
- html << section_tree(node.children, viewables)
+ html << section_tree(node.children.not_archived.not_drafted, viewables)
end
html << "</li>"
end
| [gobierto_cms_page_or_news_path->[section,gobierto_cms_section_item_path,slug,url_helpers,item_type,gobierto_cms_news_path,gobierto_cms_page_path],section_tree->[empty?,gobierto_cms_section_item_path,slug,section_tree,link_to,title,any?,each,html_safe,children]] | Returns a tree of nodes with links to the section s item title and its children if any. | Annotation keywords like TODO should be all upper case, followed by a colon, and a space, then a note describing the problem. |
@@ -186,7 +186,7 @@ def parse_type_ignore_tag(tag: Optional[str]) -> List[str]:
# TODO: Implement proper parsing and error checking
if not tag:
return []
- m = re.match(r'\[([^#]*)\]', tag)
+ m = re.match(r'\s*\[([^#]*)\]', tag)
if m is None:
return []
return [code.strip() for code in m.group(1).split(',')]
| [parse_type_string->[parse_type_comment],parse_type_comment->[parse_type_ignore_tag,ast3_parse],stringify_name->[stringify_name],TypeConverter->[visit_UnaryOp->[invalid_type,visit],visit_Num->[numeric_type],visit_Str->[parse_type_string],visit_Attribute->[invalid_type,visit],_extract_argument_name->[fail],visit_Subscript->[invalid_type,visit,translate_expr_list,fail],translate_argument_list->[visit],visit_raw_str->[parse_type_comment],visit_Name->[convert_column],visit_Constant->[parse_type_string,invalid_type],translate_expr_list->[visit],visit_Tuple->[translate_expr_list,convert_column],visit_List->[translate_argument_list],visit_Call->[invalid_type,parent,visit,fail],visit->[invalid_type]],parse->[ast3_parse],ASTConverter->[visit_IfExp->[visit,set_line],visit_Str->[set_line],visit_Delete->[visit,translate_expr_list,set_line],visit_AsyncWith->[translate_type_comment,visit,as_required_block,set_line],visit_Raise->[visit,set_line],visit_While->[as_block,visit,as_required_block,set_line],visit_If->[as_block,visit,as_required_block,set_line],visit_Pass->[set_line],do_func_def->[fail,note,translate_expr_list,as_required_block,set_line,in_method_scope,ast3_parse,is_no_type_check_decorator],visit_BinOp->[from_operator,visit,set_line],visit_Await->[visit,set_line],visit_ClassDef->[visit,translate_expr_list,as_required_block],visit_AugAssign->[from_operator,visit,set_line],visit_Dict->[translate_expr_list,set_line],visit_YieldFrom->[visit,set_line],visit_BoolOp->[translate_expr_list],visit_AsyncFor->[as_block,as_required_block,set_line,translate_type_comment,visit],visit_With->[translate_type_comment,visit,as_required_block,set_line],visit_Assign->[translate_type_comment,visit,translate_expr_list,set_line],visit_JoinedStr->[translate_expr_list,set_line],visit_Index->[visit],visit_Ellipsis->[set_line],visit_ImportFrom->[translate_module_id,set_line],visit_Import->[translate_module_id,set_line],visit_NamedExpr->[visit,set_line],as_block->[translate_stmt_list,set_line],visit_Try->[as_block,visit,as_required_block,set_line],visit_Lambda->[as_required_block,transform_args,set_line],visit_List->[visit,set_line],translate_expr_list->[visit],group->[group,set_line],visit_Compare->[from_comp_operator,translate_expr_list,set_line],visit_DictComp->[visit,translate_expr_list,set_line],fail_arg->[fail],visit_Expr->[visit,set_line],visit_Continue->[set_line],visit_Starred->[visit,set_line],visit_FormattedValue->[visit,set_line],visit_ExtSlice->[translate_expr_list],visit_Subscript->[visit,set_line],visit_Yield->[visit,set_line],visit_NameConstant->[set_line],visit_AnnAssign->[visit,set_line],visit_GeneratorExp->[visit,translate_expr_list,set_line],visit_Return->[visit,set_line],visit_Bytes->[set_line],visit_Constant->[set_line],make_argument->[translate_type_comment,visit,fail],visit_For->[as_block,as_required_block,set_line,translate_type_comment,visit],visit_Tuple->[visit,set_line],visit_ListComp->[set_line],translate_type_comment->[parse_type_comment],visit_Break->[set_line],visit_Nonlocal->[set_line],visit_Global->[set_line],visit_Set->[translate_expr_list,set_line],visit_UnaryOp->[visit,set_line],visit_Num->[set_line],visit_Attribute->[visit,set_line],visit_SetComp->[set_line],visit_Assert->[visit,set_line],visit_Module->[translate_stmt_list,parse_type_ignore_tag,fix_function_overloads],visit_Name->[set_line],visit_Slice->[visit],as_required_block->[translate_stmt_list,set_line],visit_Call->[visit,translate_expr_list,set_line],translate_stmt_list->[get_lineno,visit,translate_stmt_list]]] | Parse type ignore tag. | Ideally we should give a warning if user makes a mistake like `# type: ignore [one-code][other-code]` or something else we don recognize, but I see there is already a TODO about this. |
@@ -474,6 +474,7 @@ class Product(CountableDjangoObjectType):
variants = graphene.List(
ProductVariant, description="List of variants for the product."
)
+ default_variant = graphene.Field(ProductVariant)
images = graphene.List(
lambda: ProductImage, description="List of images for the product."
)
| [ProductVariant->[resolve_meta->[resolve_meta],resolve_pricing->[calculate_pricing_info->[calculate_pricing_with_product->[calculate_pricing_with_collections->[VariantPricingInfo]],calculate_pricing_with_variants->[calculate_pricing_with_collections->[]]]],resolve_private_meta->[resolve_private_meta]],Category->[resolve_meta->[resolve_meta],resolve_private_meta->[resolve_private_meta]],Product->[resolve_meta->[resolve_meta],resolve_pricing->[calculate_pricing_info->[calculate_pricing_with_product->[calculate_pricing_with_collections->[]],calculate_pricing_with_variants->[calculate_pricing_with_collections->[ProductPricingInfo]]]],resolve_private_meta->[resolve_private_meta],resolve_margin->[Margin]],Collection->[resolve_meta->[resolve_meta],resolve_private_meta->[resolve_private_meta]],ProductType->[resolve_available_attributes->[resolve_attributes],resolve_meta->[resolve_meta],resolve_private_meta->[resolve_private_meta]]] | A main thumbnail for a product. Resolve category by id. | We should add a descritption here :) |
@@ -101,7 +101,7 @@ func (wrapper *lazyRPCWrapper) Call(result interface{}, method string, args ...i
return wrapper.client.Call(result, method, args...)
}
-func (wrapper *lazyRPCWrapper) Subscribe(ctx context.Context, channel interface{}, args ...interface{}) (eth.Subscription, error) {
+func (wrapper *lazyRPCWrapper) Subscribe(_ context.Context, channel interface{}, args ...interface{}) (eth.Subscription, error) {
err := wrapper.lazyDialInitializer()
if err != nil {
return nil, err
| [Subscribe->[lazyDialInitializer],Unscoped->[Unscoped],Close->[Close],Call->[lazyDialInitializer,Call],AuthorizedUserWithSession->[AuthorizedUserWithSession],Dial] | Call calls the method with the given arguments. | We probably shouldn't actually be throwing away the context... Can we use it instead? |
@@ -301,15 +301,11 @@ func (mod *modContext) genInit(exports []string) string {
child = child[match[2]:match[3]]
}
}
- if i > 0 {
- fmt.Fprintf(w, ",\n")
+ if child != "config" {
+ fmt.Fprintf(w, " %s,\n", PyName(child))
}
- fmt.Fprintf(w, " '%s'", PyName(child))
}
- fmt.Fprintf(w, ",\n]\n")
- fmt.Fprintf(w, "for pkg in _submodules:\n")
- fmt.Fprintf(w, " if pkg != 'config':\n")
- fmt.Fprintf(w, " importlib.import_module(f'{__name__}.{pkg}')\n")
+ fmt.Fprintf(w, ")\n")
}
return w.String()
| [gen->[genHeader,add],genResource->[genHeader,has,add],genFunction->[genHeader,genAwaitableType],genPropertyConversionTables->[genHeader],genInit->[genHeader,submodulesExist],genNestedStructureBullets->[genNestedStructureBullets],genConfig->[genHeader],genHeader,genPropertyConversionTables,add,gen] | genInit generates the init. py file for the package. Print out the string representation of the NestedNode objects in the given way. | @pgavlin, do you know why we skip config? Avoiding side-effects or something else? |
@@ -53,8 +53,8 @@ public class DiceServerEditor extends EditorPanel {
new Insets(0, 0, bottomSpace, labelSpace),
0,
0));
- add(
- servers,
+ diceRollerOptions.add(
+ toAddress,
new GridBagConstraints(
1,
row,
| [DiceServerEditor->[areFieldsValid->[isValid,validateComboBox,setLabelValid,isEmpty,getText,setEnabled],applyToGameProperties->[getText,set,getSelectedItem],newDiceServer->[setToAddress,setCcAddress,get,setGameId,getSelectedItem,getText],checkFieldsAndNotify->[areFieldsValid,run],populateFromGameProperties->[setSelectedItem,setText,get],forEach,GridBagConstraints,toImmutableMap,addActionListener,PbemDiceRoller,JTextField,add,newDiceServer,attachDocumentListener,JLabel,addItemListener,collect,checkFieldsAndNotify,identity,test,JButton,Insets]] | A class to configure a Dice Server for the game. Adds the missing - block constraints to the end of the array. | Identical blocks of code found in 3 locations. Consider refactoring. |
@@ -28,6 +28,8 @@ class RocmGdb(AutotoolsPackage):
depends_on('expat', type='build')
depends_on('python', type='build')
depends_on('zlib', type='link')
+ depends_on('babeltrace@1.2.4', type='link')
+
for ver in ['3.5.0', '3.7.0', '3.8.0']:
depends_on('rocm-dbgapi@' + ver, type='link', when='@' + ver)
depends_on('comgr@' + ver, type='link', when='@' + ver)
| [RocmGdb->[configure_args->[format],depends_on,version]] | Creates a single object that represents a single unique identifier in the system. Configure options for GCC. | Is this the only version of babeltrace that works? If not, I would remove the version specification. |
@@ -59,6 +59,8 @@ public class CSMMetrics {
private @Metric MutableCounterLong numReadStateMachineMissCount;
private @Metric MutableCounterLong numStartTransactionVerifyFailures;
private @Metric MutableCounterLong numContainerNotOpenVerifyFailures;
+ private @Metric MutableCounterLong numDataCacheMiss;
+ private @Metric MutableCounterLong numDataCacheHit;
private @Metric MutableRate applyTransaction;
private @Metric MutableRate writeStateMachineData;
| [CSMMetrics->[incNumBytesWrittenCount->[incr],incNumApplyTransactionsOps->[incr],create->[register,CSMMetrics,toString,instance],getNumWriteStateMachineFails->[value],getNumReadStateMachineFails->[value],incNumReadStateMachineOps->[incr],getNumQueryStateMachineFails->[value],getNumBytesCommittedCount->[value],getNumApplyTransactionsFails->[value],incNumWriteStateMachineFails->[incr],recordApplyTransactionCompletion->[add],incNumQueryStateMachineOps->[incr],incNumQueryStateMachineFails->[incr],incNumApplyTransactionsFails->[incr],getNumWriteStateMachineOps->[value],getNumWriteDataFails->[value],getNumBytesWrittenCount->[value],incNumContainerNotOpenVerifyFailures->[incr],unRegister->[unregisterSource,instance],incNumReadStateMachineMissCount->[incr],incNumBytesCommittedCount->[incr],incNumWriteDataFails->[incr],incNumStartTransactionVerifyFailures->[incr],incNumReadStateMachineFails->[incr],getNumReadStateMachineOps->[value],incNumWriteStateMachineOps->[incr],recordWriteStateMachineCompletion->[add],getNumApplyTransactionsOps->[value],incPipelineLatency->[add],getNumQueryStateMachineOps->[value],getNumReadStateMachineMissCount->[value],MetricsRegistry,getSimpleName,forNumber,newRate,toString,values]] | Common metrics for container state machine operations. increments the number of query state machine ops. | Isn't pre-existing `numReadStateMachineMissCount` metric the same as this new one? |
@@ -21,5 +21,5 @@
</span>
</div>
<% else %>
- <%= render "aggregated_reactions", notification: notification %>
+ <%= render "aggregated_reactions", notification: notification, siblings: siblings %>
<% end %>
| [No CFG could be retrieved] | Demonstrates how to render the . | Passing along `siblings` from this file to `aggregated_reactions` instead of defining it twice (once in this file, another in `aggregated_reactions`). |
@@ -130,7 +130,13 @@ func (w *watcher) sync() error {
w.logger.Debugf("Found %d allocations", len(allocations))
for _, alloc := range allocations {
// the allocation has not changed since last seen, ignore
- if w.waitIndex > alloc.AllocModifyIndex {
+ if w.waitIndex > alloc.ModifyIndex {
+ w.logger.Debugf(
+ "Skip allocation:%s ClientStatus:%s because w.waitIndex=%v > alloc.ModifyIndex=%v",
+ alloc.ID,
+ alloc.ClientStatus,
+ fmt.Sprint(w.waitIndex),
+ fmt.Sprint(alloc.ModifyIndex))
continue
}
| [fetchNodeID->[Errorw,Nodes,List,Agent,Errorf,Self],Start->[watch,sync],getAllocations->[Nodes,Allocations,List,Info,Warnw],watch->[Stop,NewTicker,Info,sync,Warnw],sync->[Sprint,Debug,OnAdd,OnDelete,getAllocations,Errorf,OnUpdate,Debugf],Sleep,fetchNodeID,Now,NewLogger] | sync syncs all allocations and metadata This function is called when an allocation is in a terminal state and does not trigger a new. | It would be nice to make this log line a bit more consistent with the format on line 167. Looks like that one uses `=` instead of `:`. Also perhaps `allocation.id` instead of `allocation` (the structured log lines use a `nomad.allocation.id`). |
@@ -0,0 +1,10 @@
+class RecoveryCode < ApplicationRecord
+ self.ignored_columns = %w(encrypted_code)
+
+ belongs_to :user
+
+ include EncryptableAttribute
+ encrypted_attribute(name: :code)
+
+ include RecoveryCodeEncryptedAttributeOverrides
+end
| [No CFG could be retrieved] | No Summary Found. | This means active record won't load the encrypted code column from the database. Is this really what we need? |
@@ -52,13 +52,15 @@ public class WorkerContext {
currentTask = ThreadLocal.withInitial(() -> null);
currentClassLoader = null;
if (workerMode == WorkerMode.DRIVER) {
- workerId = driverId;
+ // TODO(qwang): Assign the driver id to worker id
+ // once we treat driver id as a special worker id.
+ workerId = jobId;
currentTaskId.set(TaskId.randomId());
- currentDriverId = driverId;
+ currentJobId = jobId;
} else {
workerId = UniqueId.randomId();
this.currentTaskId.set(TaskId.NIL);
- this.currentDriverId = UniqueId.NIL;
+ this.currentJobId = UniqueId.NIL;
}
}
| [WorkerContext->[nextTaskIndex->[set,get],getCurrentTaskId->[get],getCurrentTask->[get],setCurrentTask->[checkNotNull,checkState,set,getId],nextPutIndex->[set,get],withInitial,getLogger,randomId,set,getId]] | The worker context. Increments the put index and returns the new value. | Should we just set this to `UniqueId.randomId()` now? |
@@ -3129,7 +3129,10 @@ bool simple_wallet::handle_command_line(const boost::program_options::variables_
m_restore_deterministic_wallet = command_line::get_arg(vm, arg_restore_deterministic_wallet);
m_restore_multisig_wallet = command_line::get_arg(vm, arg_restore_multisig_wallet);
m_non_deterministic = command_line::get_arg(vm, arg_non_deterministic);
- m_trusted_daemon = command_line::get_arg(vm, arg_trusted_daemon);
+ if (!command_line::is_arg_defaulted(vm, arg_trusted_daemon) || !command_line::is_arg_defaulted(vm, arg_untrusted_daemon))
+ m_trusted_daemon = command_line::get_arg(vm, arg_trusted_daemon) && !command_line::get_arg(vm, arg_untrusted_daemon);
+ if (!command_line::is_arg_defaulted(vm, arg_trusted_daemon) && !command_line::is_arg_defaulted(vm, arg_untrusted_daemon))
+ message_writer() << tr("--trusted-daemon and --untrusted-daemon are both seen, assuming untrusted");
m_allow_mismatched_daemon_version = command_line::get_arg(vm, arg_allow_mismatched_daemon_version);
m_restore_height = command_line::get_arg(vm, arg_restore_height);
m_do_not_relay = command_line::get_arg(vm, arg_do_not_relay);
| [No CFG could be retrieved] | Handle the command line arguments. Get the value of the command line argument. | Maybe error out when `--trusted-daemon` and `--untrusted-daemon` are both given? |
@@ -80,12 +80,12 @@ public class SqlPredicateTest {
analyzer.process(statements.get(0), new AnalysisContext(null));
AggregateAnalysis aggregateAnalysis = new AggregateAnalysis();
AggregateAnalyzer aggregateAnalyzer = new AggregateAnalyzer(aggregateAnalysis,
- analysis);
+ analysis, ksqlFunctionRegistry);
for (Expression expression: analysis.getSelectExpressions()) {
aggregateAnalyzer.process(expression, new AnalysisContext(null));
}
// Build a logical plan
- PlanNode logicalPlan = new LogicalPlanner(analysis, aggregateAnalysis).buildPlan();
+ PlanNode logicalPlan = new LogicalPlanner(analysis, aggregateAnalysis, ksqlFunctionRegistry).buildPlan();
return logicalPlan;
}
| [SqlPredicateTest->[testFilter->[buildLogicalPlan],testFilterBiggerExpression->[buildLogicalPlan]]] | Builds a logical plan node that only returns rows where the column 0 > 100 is a key. | would make me happy to rename this to functionRegistry |
@@ -122,6 +122,7 @@ public class DruidRexExecutor implements RexExecutor
if (exprResult.type() == ExprType.LONG) {
bigDecimal = BigDecimal.valueOf(exprResult.asLong());
} else {
+ // if exprResult evaluates to Nan or infinity, this will throw a NumberFormatException
bigDecimal = BigDecimal.valueOf(exprResult.asDouble());
}
| [DruidRexExecutor->[reduce->[jodaToCalciteTimestampString,IAE,getExpression,getType,eval,makeNullLiteral,getTimeZone,toDruidExpression,utc,asDouble,isArray,asArray,asLong,asList,valueOf,asBoolean,parse,type,makeDateLiteral,jodaToCalciteDateString,makeLiteral,isNumericNull,getExprMacroTable,UnsupportedOperationException,isNullable,value,makeTimestampLiteral,contains,add,getSqlTypeName],build]] | Reduce the given list of expressions to a list of values. Joda timestamp string. | I wasn't sure how to deal with non numbers here, so I decided to leave the behavior as is and let it fail. It's unclear to me if Calcite will allow us to get here. In my local testing, I've seen NumberFormatExceptions thrown in Calcite when I tried to write sql expressions that would compute to Nan or infinity (like `0D / 0`). My thoughts were this is an edge case so it's ok to leave this behavior as is. |
@@ -1104,10 +1104,12 @@ static int dmic_get_hw_params(struct dai *dai,
return 0;
}
-static int dmic_set_config(struct dai *dai, struct sof_ipc_dai_config *config)
+static int dmic_set_config(struct dai *dai, struct ipc_config_dai *common_config,
+ void *spec_config)
{
struct sof_ipc_dai_dmic_params **uncached_dmic_prm = cache_to_uncache(&dmic_prm[0]);
struct dmic_pdata *dmic = dai_get_drvdata(dai);
+ struct sof_ipc_dai_config *config = spec_config;
struct matched_modes modes_ab;
struct dmic_configuration cfg;
struct decim_modes modes_a;
| [No CFG could be retrieved] | Select the decimation factors from the list of modes. Calculate remaining gain and FIR coefficients. | @lgirdwood maybe we dont need the typecasting here in the other dai_type.c files no? |
@@ -61,8 +61,14 @@ public final class RedisUtils {
Properties info = redisOperations.execute(
(RedisCallback<Properties>) connection -> connection.serverCommands().info(SECTION));
if (info != null) {
- int majorVersion = Integer.parseInt(info.getProperty(VERSION_PROPERTY).split("\\.")[0]);
- return majorVersion >= 4;
+ String version = info.getProperty(VERSION_PROPERTY);
+ if (StringUtils.hasText(version)) {
+ int majorVersion = Integer.parseInt(version.split("\\.")[0]);
+ return majorVersion >= 4;
+ }
+ else {
+ return false;
+ }
}
else {
throw new IllegalStateException("The INFO command cannot be used in pipeline/transaction.");
| [RedisUtils->[removeEldestEntry->[size],isUnlinkAvailable->[split,parseInt,IllegalStateException,computeIfAbsent,info,execute]]] | Checks if the unlink is available in the pipeline. | I wonder if we should fall back to a `spring.integration.properties`? Clearly, their version supports the operation. |
@@ -45,6 +45,11 @@ class Portcullis(AutotoolsPackage):
'scripts/Makefile.am', string=True
)
+ # remove -m64 on aarch64
+ if 'aarch64' in self.spec.architecture.target.lower():
+ for f in ['lib/Makefile.am', 'src/Makefile.am']:
+ filter_file('-m64', '', f)
+
def build(self, spec, prefix):
# build manpages
make('man')
| [Portcullis->[build->[which,sh,make],patch->[filter_file],depends_on,version]] | Patch the build script to build a single unknown node. | as in the other PR: maybe a `if not 'amd64' in ...` is even better? |
@@ -283,16 +283,7 @@ class GraphBinariesAnalyzer(object):
# Make sure not duplicated
indirect_reqs.difference_update(direct_reqs)
else:
- node.id_direct_prefs = set() # of PackageReference
- node.id_indirect_prefs = set() # of PackageReference, avoid duplicates
- for neighbor in neighbors:
- node.id_direct_prefs.add(neighbor.pref)
- node.id_indirect_prefs.update(neighbor.id_direct_prefs)
- node.id_indirect_prefs.update(neighbor.id_indirect_prefs)
- # Make sure not duplicated, totally necessary
- node.id_indirect_prefs.difference_update(node.id_direct_prefs)
- direct_reqs = node.id_direct_prefs
- indirect_reqs = node.id_indirect_prefs
+ direct_reqs, indirect_reqs = node.package_id_transitive_reqs()
python_requires = getattr(conanfile, "python_requires", None)
if python_requires:
| [GraphBinariesAnalyzer->[_process_node->[_evaluate_is_cached,_evaluate_cache_pkg,_evaluate_build,_evaluate_remote_pkg,_evaluate_clean_pkg_folder_dirty],_evaluate_cache_pkg->[_check_update],reevaluate_node->[_evaluate_node,_compute_package_id],evaluate_graph->[_compute_package_id,_propagate_options,_evaluate_node]]] | Compute the binary package ID of this node. missing - version - specific version of package_id. | Probably if we are moving only one branch this function doesn't belong to `node`, but to `self`, or we should move both branches. |
@@ -364,6 +364,12 @@ namespace Dnn.Modules.ResourceManager.Services
thumbnailUrl = thumbnailsManager.ThumbnailUrl(ActiveModule.ModuleID, file.FileId, 110, 110)
};
}
+
+ private ModuleInstanceContext GetModuleContext()
+ {
+ var moduleControl = ModuleControlFactory.CreateModuleControl(this.ActiveModule) as IModuleControl;
+ return new ModuleInstanceContext(moduleControl);
+ }
#endregion
}
}
| [ItemsController->[GetItemViewModel->[GetFileIconUrl,GetFolderIconUrl]]] | Get ItemViewModel. | DI guys @bdukes @ahoefling if you have a better idea of how to access EditUrl (which lives in PortalModuleBase) from a WebApi method, I am all ears on improving this :) |
@@ -686,6 +686,12 @@ def upload_for_addon(request, addon_id, addon):
return upload(request, addon_slug=addon.slug)
+@post_required
+@dev_required
+def upload_for_addon_unlisted(request, addon_id, addon):
+ return upload(request, addon_slug=addon.slug, is_listed=False)
+
+
@dev_required
@json_view
def upload_detail_for_addon(request, addon_id, addon, uuid):
| [standalone_upload->[upload],upload_image->[ajax_upload_image],upload_detail->[_compat_result,json_upload_detail],_resume->[_step_url],submit_media->[_step_url],upload_for_addon->[upload],version_add_file->[delete,auto_sign_file,check_validation_override],submit->[_step_url],submit_bump->[_step_url],ajax_dependencies->[AddonDependencySearch],remove_locale->[remove_locale],dashboard->[addon_listing],delete->[delete],version_add->[auto_sign_file,check_validation_override],submit_addon->[_step_url,auto_sign_file,check_validation_override],version_delete->[delete],upload_unlisted->[upload],ownership->[mail_user_changes],submit_describe->[delete,_step_url],feed->[_get_addons,_get_activities,_get_rss_feed,_get_items],submit_step] | Return a JSON object with details about an upload. | No waffle check here ? |
@@ -32,4 +32,17 @@ trait TabViewChildBuilderTrait
{
$view->setOption('tabPriority', $tabPriority);
}
+
+ private function addTabBadgeToView(View $view, Badge $badge, ?string $key = null): void
+ {
+ $tabBadges = $view->getOption('tabBadges') ?? [];
+
+ if (null === $key) {
+ $tabBadges[] = $badge->getConfiguration();
+ } else {
+ $tabBadges[$key] = $badge->getConfiguration();
+ }
+
+ $view->setOption('tabBadges', $tabBadges);
+ }
}
| [setTabTitleToView->[setOption],setTabConditionToView->[setOption],setTabPriorityToView->[setOption],setTabOrderToView->[setOption]] | Sets the tab priority to the given view. | what the purpose of the `$key`? would like to kee this consistent with the `ToolbarAction` and `ListItemAction` |
@@ -78,6 +78,9 @@ class Hdf5(Package):
else:
extra_args.append('--enable-production')
+ if '+static' in spec:
+ extra_args.append('--enable-static-exec')
+
if '+unsupported' in spec:
extra_args.append("--enable-unsupported")
| [Hdf5->[install->[append,validate,extend,configure,make],url_for_version->[str,Version,up_to],validate->[RuntimeError],variant,depends_on,version]] | Installs a new with the given specification. | I assume this is a leftover from the closed PR (should read `~shared`, right?) |
@@ -55,7 +55,7 @@ namespace Content.Server.Commands
/// Checks if attached entity is null, returning false and sending a message
/// to performer if not.
/// </summary>
- public static bool ValidateAttachedEntity(IConsoleShell shell, IPlayerSession performer, IEntity attachedEntity)
+ public static bool ValidateAttachedEntity(IConsoleShell shell, IPlayerSession performer, [NotNullWhen(true)] IEntity attachedEntity)
{
if (attachedEntity != null) return true;
shell.SendText(performer, "User has no attached entity.");
| [CommandUtils->[TryGetAttachedEntityByUsernameOrId->[TryGetSessionByUsernameOrId]]] | Validate attached entity. | This file doesn't have nullables enabled, so this attribute doesn't do anything. |
@@ -23,8 +23,13 @@ from data import get_dataset
from utils import AverageMeter, accuracy, progress_bar
sys.path.append('../../models')
-from mobilenet import MobileNet
-from mobilenet_v2 import MobileNetV2
+try:
+ from mobilenet import MobileNet
+ from mobilenet_v2 import MobileNetV2
+except ModuleNotFoundError as e:
+ print(e)
+ print('Please check whether the current working path is the path where this file is located.')
+ exit()
def parse_args():
parser = argparse.ArgumentParser(description='AMC train / fine-tune script')
| [train->[train],parse_args->[parse_args],get_model,train,test,parse_args,adjust_learning_rate] | Parse command line options. | Then I would suggest `sys.path.append(Path(__file__).parents[2])`. |
@@ -304,7 +304,7 @@ namespace System.Drawing
// Create the DIB section. Let Win32 allocate the memory and return
// a pointer to the bitmap surface.
hbmRet = SafeNativeMethods.CreateDIBSection(new HandleRef(null, hdc), ref pbmi, NativeMethods.DIB_RGB_COLORS, ref ppvBits, IntPtr.Zero, 0);
- Win32Exception ex = null;
+ Win32Exception? ex = null;
if (hbmRet == IntPtr.Zero)
{
ex = new Win32Exception(Marshal.GetLastWin32Error());
| [BufferedGraphicsContext->[ReleaseBuffer->[DisposeDC,Dispose],Dispose->[DisposeDC,Dispose,DisposeBitmap],Invalidate->[Dispose],IntPtr->[FillBitmapInfo]]] | Create a compatible DIB section. B_RGB_COLORS - BGR colorization. | Just curious why it is not just throw here directly |
@@ -30,6 +30,9 @@ if TYPE_CHECKING:
logger = logging.getLogger(__name__)
+BASH_SEARCH_PATHS = ("/usr/bin", "/bin", "/usr/local/bin")
+
+
@dataclass(frozen=True)
class ProductDescription:
value: str
| [remove_platform_information->[FallibleProcessResult],fallible_to_exec_result_or_raise->[ProcessResult,ProcessExecutionFailure],InteractiveProcess->[from_process->[InteractiveProcess]],BinaryPath->[fingerprinted->[_fingerprint]],upcast_process->[MultiPlatformProcess],MultiPlatformProcess->[product_description->[ProductDescription]],find_binary->[BinaryPath,UncacheableProcess,BinaryPaths,fingerprinted,Process]] | Creates a new object from a single object. Initialize a new object with the given arguments. | Could you please update `archive.py` to use this value, rather than duplicating? Will keep the surface area smaller. Maybe rename to something more generic, although I can't think of a good name for the binaries that we expect to be installed in `/bin` et al. |
@@ -185,6 +185,14 @@ export class AmpRender extends BaseElement {
});
}
+ /** @override */
+ buildCallback() {
+ super.buildCallback();
+ if (!this.element.hasAttribute('aria-live')) {
+ this.element.setAttribute('aria-live', 'polite');
+ }
+ }
+
/** @override */
mutationObserverCallback() {
const src = this.element.getAttribute('src');
| [No CFG could be retrieved] | The base class for the AMP - SCRIPT - based components. The first time this component is instantiated we check if there is a template set on the element. | Must have missed this in this review ... Bento components should not have `buildCallback`, please move to `init`. |
@@ -69,10 +69,11 @@ public class PermissionTemplateService {
this.defaultTemplatesResolver = defaultTemplatesResolver;
}
- public boolean wouldUserHavePermissionWithDefaultTemplate(DbSession dbSession,
- String organizationUuid, @Nullable Integer userId, String globalPermission, @Nullable String branch, String projectKey,
- String qualifier) {
- if (userSession.hasOrganizationPermission(organizationUuid, globalPermission)) {
+ public boolean wouldUserHaveScanPermissionWithDefaultTemplate(DbSession dbSession,
+ String organizationUuid, @Nullable Integer userId,
+ @Nullable String branch, String projectKey,
+ String qualifier) {
+ if (userSession.hasPermission(OrganizationPermission.SCAN, organizationUuid)) {
return true;
}
| [PermissionTemplateService->[copyPermissions->[updateAuthorizationDate,UserPermissionDto,selectByTemplateIds,deleteByRootComponentId,getOrganizationUuid,insert,asList,selectGroupPermissionsByTemplateId,setResourceId,getId,forEach,collect,selectUserPermissionsByTemplateId,getPermission,getUserId,toSet,deleteProjectPermissions],indexProjectPermissions->[indexProjectsByUuids],findTemplate->[IllegalArgumentException,resolve,selectAll,size,orElseThrow,equals,IllegalStateException,selectByUuid,matches,getKey,checkAtMostOneMatchForComponentKey,get,qualifier,format,add,isNotBlank,getKeyPattern,getProject],wouldUserHavePermissionWithDefaultTemplate->[findTemplate,selectPotentialPermissionsByUserIdAndTemplateId,hasOrganizationPermission,createKey,contains,getId,setQualifier],applyDefault->[copyPermissions,findTemplate,indexProjectPermissions,checkArgument,asList,uuid,commit],hasDefaultTemplateWithPermissionOnProjectCreator->[hasProjectCreatorPermission,findTemplate],apply->[copyPermissions,indexProjectPermissions,toList,isEmpty,collect,commit],checkAtMostOneMatchForComponentKey->[hasNext,size,append,IllegalStateException,iterator,format,toString,StringBuilder],hasProjectCreatorPermission->[anyMatch]]] | Checks if user would have a permission with a default template. | while this change makes sense, it is unrelated to this commit and deserves one of its own |
@@ -233,8 +233,9 @@ class Driver(object):
_logger.info('init')
self.cuInit(0)
except CudaAPIError as e:
- self.initialization_error = e
- raise CudaSupportError("Error at driver init: \n%s:" % e)
+ description = f"{e.msg} ({e.code})"
+ self.initialization_error = description
+ raise CudaSupportError(f"Error at driver init: {description}")
else:
self.pid = _getpid()
| [Device->[from_identity->[get_device,get_device_count],reset->[release_primary_context,reset]],host_memory_size->[host_memory_extents],Driver->[__new__->[__new__],is_available->[initialize],__getattr__->[initialize],reset->[reset],initialize->[_getpid,make_logger],__init__->[deref->[],find_driver],_check_error->[_getpid,CudaAPIError]],device_to_device->[device_pointer],_hostalloc_finalizer->[core->[add_item]],_CudaIpcImpl->[open->[open_ipc_handle]],Module->[unload->[unload_module],get_global_symbol->[MemoryPointer]],Stream->[auto_synchronize->[synchronize],async_done->[add_callback]],_device_pointer_attr->[device_ctypes_pointer],require_device_memory->[is_device_memory],device_extents->[device_ctypes_pointer],_workaround_for_datetime->[_is_datetime_dtype,view],IpcHandle->[open_array->[open],open_staged->[_sentry_source_info,_StagedIpcImpl,open],can_access_peer->[from_identity,get_device_identity,_sentry_source_info,can_access_peer],close->[close],open_direct->[_CudaIpcImpl,open],open->[can_access_peer]],HostOnlyCUDAMemoryManager->[memhostalloc->[allocator,_attempt_allocation],memallocmanaged->[_attempt_allocation],mempin->[allocator,_attempt_allocation]],_event_finalizer->[core->[add_item]],device_memset->[device_pointer],device_memory_size->[device_extents],Context->[memallocmanaged->[memallocmanaged],pop->[pop_active_context],mempin->[mempin],get_ipc_handle->[get_ipc_handle],memalloc->[memalloc],memhostalloc->[memhostalloc],reset->[reset,clear],push->[prepare_for_use],prepare_for_use->[initialize],get_memory_info->[get_memory_info],__init__->[deref->[],_PendingDeallocs,_ensure_memory_manager],__ne__->[__eq__],defer_cleanup->[defer_cleanup,disable]],device_pointer->[device_ctypes_pointer],host_to_device->[device_pointer,host_pointer],OwnedPointer->[__init__->[deref->[free]]],host_pointer->[_workaround_for_datetime,_is_datetime_dtype],device_to_host->[device_pointer,host_pointer],GetIpcHandleMixin->[get_ipc_handle->[get_device_identity]],load_module_image->[CudaAPIError],launch_kernel->[device_ctypes_pointer],_alloc_finalizer->[core->[add_item]],Function->[_read_func_attr_all->[_read_func_attr]],device_pointer_type->[_device_pointer_attr],_stream_finalizer->[core->[add_item]],host_memory_extents->[_workaround_for_datetime],_StagedIpcImpl->[open->[memalloc,from_identity,close,_CudaIpcImpl,open]],_module_finalizer->[core->[add_item]],profiling->[profile_stop,profile_start],Linker->[add_file->[LinkerError],add_ptx->[LinkerError],add_file_guess_ext->[add_file],complete->[LinkerError]],NumbaCUDAMemoryManager->[initialize->[get_memory_info],memalloc->[_attempt_allocation]],MemoryPointer->[view->[MemoryPointer]],Driver,_SizeNotSet,_build_reverse_device_attrs,_build_reverse_error_map] | Initialize the CudaDriver object. | Could this just be `str(e)`? |
@@ -412,6 +412,16 @@ namespace System.Data.Common
return propertyDescriptors;
}
+ [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
+ Justification = "The type of component is statically known. This class is marked with [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)]")]
+ private PropertyDescriptorCollection GetPropertiesOfThis()
+ {
+ // Below call is necessary to tell the trimmer that it should mark derived types appropriately.
+ // We cannot use overload which takes type because the result might differ if derived class implements ICustomTypeDescriptor.
+ Type thisType = GetType();
+ return TypeDescriptor.GetProperties(this, true);
+ }
+
protected virtual void GetProperties(Hashtable propertyDescriptors)
{
long logScopeId = DataCommonEventSource.Log.EnterScope("<comm.DbConnectionStringBuilder.GetProperties|API> {0}", ObjectID);
| [DbConnectionStringBuilder->[Clear->[Clear],ShouldSerialize->[ContainsKey],CopyTo->[CopyTo],GetEditor->[GetEditor],GetProperties->[GetAttributesFromCollection,GetProperties,ContainsKey,Remove],ContainsKey->[ContainsKey],Add->[Add],GetClassName->[GetClassName],GetAttributesFromCollection->[CopyTo],GetComponentName->[GetComponentName],PropertyDescriptorCollection->[GetProperties,CopyTo],TryGetValue->[TryGetValue],Remove->[Remove,ObjectToString]]] | GetProperties - Gets all strongly typed properties in this builder. Checks if a value can be parsed into a CQPropertyDescriptor. If so it will. | This isn't a valid suppression. `GetProperties` is always `RUC` because the PropertyDescriptor's Type needs to be `[DAM.All]` as well, which we can't guarantee here. The `protected virtual void GetProperties(Hashtable)` method should be marked with `[RUC]`. |
@@ -947,7 +947,8 @@ namespace Dynamo.ViewModels
var oldClipboardData = model.ClipBoard.ToList();
model.Copy();
- if (model.ClipBoard.Any())
+ // Prevents Paste from being called when only ConnectorPins are selected.
+ if (model.ClipBoard.Where(m => !(m is ConnectorPinModel)).Select(m => m).Any())
{
model.Paste(targetPoint, false);
owningWorkspace.DynamoViewModel.UndoCommand.RaiseCanExecuteChanged();
| [WorkspaceViewModel->[HandleMouseMove->[HandleMouseMove],RequestToggleOrbitMode->[RequestToggleOrbitMode],HandleLeftButtonDown->[HandleLeftButtonDown],HandlePortClicked->[HandlePortClicked],HandleFocusChanged->[HandleFocusChanged],HandleMouseRelease->[HandleMouseRelease],RequestTogglePanMode->[RequestTogglePanMode],PasteSelection->[PasteSelection],StateMachine->[HandleMouseMove->[HandleMouseMove,SetCurrentState,UpdateDraggedSelection,UpdateActiveConnector],SetCurrentState->[CancelConnection],HandleLeftButtonDown->[SetCurrentState],HandlePortClicked->[CheckActiveConnectorCompatibility,BeginCreateConnections,BeginShiftReconnections],HandleFocusChanged->[CancelActiveState],CancelWindowSelection->[OnDragSelectionEnded],HandleMouseRelease->[SetCurrentState],PasteSelection->[SetCurrentState],InitiateDragSequence->[SetCurrentState],InitiateWindowSelectionSequence->[OnDragSelectionStarted,SetCurrentState]],CancelActiveState->[CancelActiveState],EndDragSelection->[UpdateDraggedSelection]]] | PasteSelection - Paste selection from the selected point. | same here, maybe use `All()`? |
@@ -109,6 +109,12 @@ type VolumeInspectReport struct {
*VolumeConfigResponse
}
+// VolumePruneOptions describes the options needed
+// to prune a volume from the CLI
+type VolumePruneOptions struct {
+ Filters url.Values `json:"filters" schema:"filters"`
+}
+
type VolumePruneReport struct {
Err error
Id string //nolint
| [No CFG could be retrieved] | Config for a specific key - value volume SwagDockerVolumeInfoResponse provides information about a specific volume. | I was conflicted whether to use `url.Values` or the underlying type of `map[string][]string` for the filters. I saw it both ways throughout the codebase. I settled on `url.Values` but I don't feel strongly either way. I thought I remember seeing some mention of a refactor for filters so hopefully the inconsistency can be fixed then. |
@@ -2,10 +2,10 @@
<div class="col-sm-6">
<h2>Activity</h2>
<ul>
- <li><%= @user.comments.size %> comments</li>
- <li><%= @user.articles.size %> articles</li>
- <li><%= @user.reactions.size %> reactions</li>
- <li><%= @user.followers.size %> followers</li>
+ <li><%= @user.comments_count %> comments</li>
+ <li><%= @user.articles_count %> articles</li>
+ <li><%= @user.reactions_count %> reactions</li>
+ <li><%= @user.followers_count %> followers</li>
<li><%= @user.following_users_count %> users following</li>
<li><%= @user.badge_achievements_count %> badges</li>
</ul>
| [No CFG could be retrieved] | Displays a list of all possible tags for the user. | Hmmmmm I think this is for the better but not entirely sure whether or not we care about accuracy here. |
@@ -126,6 +126,16 @@ func (o DiagnosticsOptions) buildClusterDiagnostics(rawConfig *clientcmdapi.Conf
d = &clustdiags.ServiceExternalIPs{MasterConfigFile: o.MasterConfigLocation, KclusterClient: kclusterClient}
case clustdiags.RouteCertificateValidationName:
d = &clustdiags.RouteCertificateValidation{SARClient: kclusterClient.Authorization(), RESTConfig: config}
+ case networkdiags.NetworkDiagnosticName:
+ nd := o.ParameterizedDiagnostics[diagnosticName].(*networkdiags.NetworkDiagnostic)
+ nd.KubeClient = kclusterClient
+ nd.NetNamespacesClient = networkClient.Network()
+ nd.ClusterNetworkClient = networkClient.Network()
+ nd.ClientFlags = o.ClientFlags
+ nd.Level = o.LogOptions.Level
+ nd.Factory = o.Factory
+ nd.PreventModification = o.PreventModification
+ diagnostics = append(diagnostics, nd)
default:
return nil, fmt.Errorf("unknown diagnostic: %v", diagnosticName)
}
| [buildClusterDiagnostics->[NewForConfig,Project,findClusterClients,Names,Route,Errorf,NewString,Oauth,Notice,Logger,Apps,Authorization,NewAggregatedLogging,Security,ClusterRoleBindings,Image,ClusterRoles,Intersection,List],findClusterClients->[Error,makeClusterClients,Errorf,HasPrefix,Logger],makeClusterClients->[NewFactory,ClientConfig,Create,Error,Authorization,MatchString,NewDefaultClientConfig,Sprintf,SelfSubjectAccessReviews,MustCompile,Info,ClientSet,Logger,Debug],NewDefaultAppCreateDiagnostic] | buildClusterDiagnostics builds a list of diagnostics that can be run on the cluster. This function returns a new AggregatedLogging instance that logs all the metrics of a single application ExternalIPsName - External IPs name - External IPs name - External IPs name - External IPs. | this could cause empty `d` to be added to diagnostics in this iteration. |
@@ -2092,6 +2092,7 @@ resource "aws_ecs_service" "ghost" {
cluster = "${aws_ecs_cluster.default.id}"
task_definition = "${aws_ecs_task_definition.ghost.family}:${aws_ecs_task_definition.ghost.revision}"
scheduling_strategy = "DAEMON"
+ deployment_minimum_healthy_percent = "50"
}
`, clusterName, tdName, svcName)
}
| [Test,DescribeServices,RandString,NonRetryableError,RootModule,ComposeTestCheckFunc,Errorf,MustCompile,RetryableError,Bool,DeleteService,TestMatchResourceAttr,Fatalf,StringValue,Meta,Sprintf,TestCheckResourceAttr,WaitForState,String,Retry] | testAccAWSEcsServiceWithDaemonSchedulingStrategy tests if a service has a daemon or Creates a TaskDefinition with the default values. | We should implement this in a separate acceptance test and test configuration to ensure both the unconfigured and configured cases either work or are covered by `ExpectError` testing as appropriate. Copy-pasting most of the existing test is fine. |
@@ -350,6 +350,11 @@ class ConstraintBuilderVisitor(TypeVisitor[List[Constraint]]):
cb = infer_constraints(template.args[0], item, SUPERTYPE_OF)
res.extend(cb)
return res
+ elif isinstance(actual, TupleType) and template.type.is_protocol:
+ if mypy.subtypes.is_subtype(actual.fallback, erase_typevars(template)):
+ res.extend(infer_constraints(template, actual.fallback, self.direction))
+ return res
+ return []
else:
return []
| [infer_constraints_if_possible->[infer_constraints],infer_constraints->[Constraint,infer_constraints],ConstraintBuilderVisitor->[visit_callable_type->[infer_constraints],visit_typeddict_type->[infer_constraints],infer_against_overloaded->[infer_constraints],visit_instance->[infer_constraints],visit_tuple_type->[infer_constraints],visit_type_type->[infer_constraints],visit_overloaded->[infer_constraints],infer_against_any->[infer_constraints]]] | Visit an instance and return the constraint. Infer constraints from the given template and return a list of constraints. | Support also structural checks for ``TypedDict``s via fallback (here and in ``subtypes.py``). |
@@ -46,6 +46,16 @@ class CourseSummariesController < ApplicationController
}
end
+ def grade_distribution
+ marking_schemes = current_user.student? ? MarkingScheme.none : MarkingScheme
+ table_data = marking_schemes.order(id: :asc).map{ |m| m.students_weighted_grade_distribution_array(current_user)}
+ marking_schemes_id = marking_schemes.order(id: :asc).map{ |m| m.id}
+ labels = (0..20).to_a
+ table_data[0][:backgroundColor] = 'rgb(231, 163, 183)'
+ table_data[0][:label] = "Weighted Total Grades #{marking_schemes_id[0]}"
+ render json: { datasets: table_data, labels: labels }
+ end
+
def view_summary
@marking_schemes = MarkingScheme.all
@marking_weights = MarkingWeight.all
| [CourseSummariesController->[assessment_overview->[get_assessment_data]]] | Populates the JSON with the missing node index data. This includes the average median and weight of. | Layout/SpaceBeforeBlockBraces: Space missing to the left of {.<br>Style/SymbolProc: Pass &:id as an argument to map instead of a block.<br>Layout/SpaceInsideBlockBraces: Space missing inside }. |
@@ -132,7 +132,7 @@ namespace System.Windows.Forms
return base.GetPropertyValue(propertyID);
}
- public override string Name
+ public override string? Name
{
get
{
| [ToolStripItem->[ToolStripItemAccessibleObject->[FragmentNavigate->[FragmentNavigate],GetChildFragmentIndex->[GetChildFragmentIndex],IsPatternSupported->[IsPatternSupported],GetPropertyValue->[GetPropertyValue],GetChildFragmentCount->[GetChildFragmentCount],ToString->[ToString],GetHelpTopic->[GetHelpTopic]]]] | Override GetPropertyValue to return the value of a property. | I don't see this can be null. It can be `string.empty` but not null. |
@@ -1414,7 +1414,7 @@ _test_gurt_hash_threaded_same_operations(void *(*fn)(struct hash_thread_arg *),
/* Use barrier to make sure all threads start at the same time */
rc = pthread_barrier_init(&barrier, NULL,
- TEST_GURT_HASH_NUM_THREADS + 1);
+ TEST_GURT_HASH_NUM_THREADS + 1);
assert_int_equal(rc, 0);
for (i = 0; i < TEST_GURT_HASH_NUM_THREADS; i++) {
| [No CFG could be retrieved] | This function is called by hash_gurt_hash_threaded_same_ Checks if all threads in the list have the same number of arguments. | (style) line over 80 characters |
@@ -54,6 +54,7 @@ class State(object):
return State(root_dir, dvc_dir)
def update(self, path, md5, mtime):
+ mtime = int(mtime)
existing = self.get(path)
if not existing:
return self.add(path, md5, mtime)
| [State->[get->[loadd,StateDuplicateError],init->[State],add->[dumpd,StateEntry],update->[dumpd,StateEntry,update]],StateEntry->[loadd->[StateEntry]]] | Update a node in the state. | This brakes comparisons in stage.py. Looks like you only need this for fsck, why not just convert it there? Though, i'm not that sure that dropping fractions of a second in mtime is a good idea. |
@@ -512,7 +512,7 @@ public class TaskExecutor
if (!split.isDestroyed()) {
if (t instanceof PrestoException) {
PrestoException e = (PrestoException) t;
- log.error("Error processing %s: %s: %s", split.getInfo(), e.getErrorCode().getName(), e.getMessage());
+ log.error(t, "Error processing %s: %s: %s", split.getInfo(), e.getErrorCode().getName(), e.getMessage());
}
else {
log.error(t, "Error processing %s", split.getInfo());
| [TaskExecutor->[TaskRunner->[run->[addRunnerThread,splitFinished]],toString->[toString],getMaxActiveSplitsInfo->[toString]]] | This method is called when a split is running. | I'd make that `e`, but it doesn't really matter. |
@@ -847,6 +847,18 @@ define([
get : function() {
return this._minimumDisableDepthTestDistance;
}
+ },
+
+ /**
+ * The highlight color of unclassified 3D Tiles.
+ *
+ * @memberof UniformState.prototype
+ * @type {Number}
+ */
+ invertClassificationColor : {
+ get : function() {
+ return this._invertClassificationColor;
+ }
}
});
| [No CFG could be retrieved] | A sampler that s used to measure the environment of the scene. Clones the given matrix and updates the state of the view projection and rotation. | Should be `Color`. |
@@ -1126,6 +1126,9 @@ public class LibvirtVMDef {
if (_networkName != null) {
netBuilder.append("<target dev='" + _networkName + "'/>\n");
}
+ if (_mtu > 0 && _mtu <= 9000) {
+ netBuilder.append("<mtu size='" + _mtu + "'/>\n");
+ }
if (_macAddr != null) {
netBuilder.append("<mac address='" + _macAddr + "'/>\n");
}
| [LibvirtVMDef->[HyperVEnlightenmentFeatureDef->[toString->[toString,getRetries],setFeature->[setFeature,isValidFeature]],ClockDef->[toString->[toString],setTimer->[setTimer]],FilesystemDef->[toString->[toString]],addComp->[toString],VideoDef->[toString->[toString]],GraphicDef->[toString->[toString]],MetadataDef->[getMetadataNode->[getName],toString->[toString]],CpuTuneDef->[toString->[toString]],getDevices->[toString],CpuModeDef->[toString->[toString]],getMetaData->[toString,MetadataDef,addComp],SCSIDef->[toString->[toString]],setLibvirtVersion->[setGlobalLibvirtVersion],ChannelDef->[toString->[toString]],ConsoleDef->[toString->[toString]],RngDef->[toString->[toString]],GuestResourceDef->[toString->[toString]],FeaturesDef->[toString->[toString]],TermPolicy->[toString->[toString]],InputDef->[toString->[toString]],DiskDef->[defBlockBasedDisk->[getDevLabel],defISODisk->[defISODisk,getDevLabel],defFileBasedDisk->[getDevLabel],toString->[toString],defNetworkBasedDisk->[getDevLabel]],InterfaceDef->[defEthernet->[defEthernet],toString->[toString],defBridgeNet->[defBridgeNet],defDirectNet->[defDirectNet],defPrivateNet->[defPrivateNet]],GuestDef->[toString->[toString]],setQemuVersion->[setGlobalQemuVersion],DevicesDef->[addDevice->[toString],getInterfaces->[toString],toString->[toString],getDisks->[toString]],SerialDef->[toString->[toString]],WatchDogDef->[toString->[toString]],NuageExtensionDef->[toString->[toString]],toString->[toString]]] | Returns a string representation of the GuestNetInfo object. Private method to build GuestNetType from GuestNetType. | I see you silently skip the MTU if it's equal to 9000, but some networks also allow 9216 as that's what the switch allows. I'm also not seeing why we should allow an MTU of 10 or something. Shouldn't 1280 be the minimum? And shouldn't the API do this check already? |
@@ -291,6 +291,9 @@ class Event
}
$contact = DBA::selectFirst('contact', [], $conditions);
+ if (!DBA::isResult($contact)) {
+ Logger::warning('Contact not found', ['condition' => $conditions]);
+ }
// Existing event being modified.
if ($event['id']) {
| [Event->[getStrings->[t,get],getHTML->[t,getDay],getItemHTML->[t,getDayShort,getDay],prepareListForTemplate->[t,getDay],createBirthday->[t]]] | store an event in the database This function will return the id of the object that is related to the given event. This function will generate the BBCode of the event and store it in the DBA This function creates an item in the tree. | No exception throwing? |
@@ -1505,7 +1505,10 @@ bio_xsctxt_alloc(struct bio_xs_context **pctxt, int tgt_id)
/* Initialize all registered subsystems: bdev, vmd, copy. */
common_prep_arg(&cp_arg);
- spdk_subsystem_init(subsys_init_cb, &cp_arg);
+ spdk_subsystem_init_from_json_config(nvme_glb.bd_nvme_conf,
+ SPDK_DEFAULT_RPC_ADDR,
+ subsys_init_cb, &cp_arg,
+ true);
rc = xs_poll_completion(ctxt, &cp_arg.cca_inflights, 0);
D_ASSERT(rc == 0);
| [No CFG could be retrieved] | Initialize the specified NVMe context. Initialize bdevs for the given context. | I didn't check if the spdk_subsystem_fini() is already exported in SPDK master, but the hack in bio_internal.h (declaring spdk_sub_system_init/fini() APIs) could be adjusted or totally removed. |
@@ -576,6 +576,9 @@ abstract class CommonObject
if (empty($this->socid)) return 0;
+ if (!class_exists('Societe'))
+ require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
+
$thirdparty = new Societe($this->db);
$result=$thirdparty->fetch($this->socid);
$this->client = $thirdparty; // deprecated
| [CommonObject->[swapContactStatus->[update_contact],showLinkedObjectBlock->[fetchObjectLinked],printObjectLine->[fetch_thirdparty],getListContactId->[liste_contact],line_ajaxorder->[updateRangOfLine],line_max->[getRangOfLine],displayMarginInfos->[getMarginInfos],update_note_public->[update_note],printObjectLines->[fetch_optionals],line_down->[line_order],line_up->[line_order]]] | Fetch the next non - zero non - zero non - zero non - zero non - zero. | The "_once" part in "require_once" does exactly that already. The condition is superfluous ;) |
@@ -55,6 +55,18 @@
# define _mm_prefetch(where,hint)
#endif
+#ifndef dt_omp_shared
+#ifdef _OPENMP
+#if defined(__clang__) || __GNUC__ > 8
+# define dt_omp_shared(var, ...) shared(var, __VA_ARGS__)
+#else
+ // GCC 8.4 throws string of errors "'x' is predetermined 'shared' for 'shared'" if we explicitly declare
+ // 'const' variables as shared
+# define dt_omp_shared(var, ...)
+#endif
+#endif /* _OPENMP */
+#endif /* dt_omp_shared */
+
// the filter does internal tiling to keep memory requirements reasonable, so this structure
// defines the position of the tile being processed
typedef struct tile
| [No CFG could be retrieved] | Guided Image Filtering get a pointer to pixel number i within the color image. | I suppose this should be: `# define dt_omp_shared(...) shared(__VA_ARGS__)` To allow for a single argument to be passed. |
@@ -87,11 +87,7 @@ DATETIME_TYPES: Set[type] = {
}
if pd:
- try:
- _pd_timestamp = pd.Timestamp
- except AttributeError:
- _pd_timestamp = pd.tslib.Timestamp
- DATETIME_TYPES.add(_pd_timestamp)
+ DATETIME_TYPES.add(pd.Timestamp)
DATETIME_TYPES.add(pd.Timedelta)
DATETIME_TYPES.add(pd.Period)
DATETIME_TYPES.add(type(pd.NaT))
| [encode_base64_dict->[Base64BufferJson],transform_column_source_data->[transform_series,transform_array,traverse_data],transform_series->[transform_array],serialize_array->[transform_array_to_list,array_encoding_disabled],convert_datetime_type->[convert_date_to_datetime],traverse_data->[traverse_data,transform_array],transform_array->[convert_datetime_array],encode_binary_dict->[BufferJson,make_id]] | Create a new object from a binary array. This function is used to provide a basic object representation of a node s n - tuple. | Should we add a constraint on supported pandas versions? |
@@ -196,6 +196,8 @@ crt_proc_struct_dcs_iod_csums_adv(crt_proc_t proc, crt_proc_op_t proc_op,
if (DECODING(proc_op)) {
PROC(uint32_t, &iod_csum->ic_nr);
D_ALLOC_ARRAY(iod_csum->ic_data, iod_csum->ic_nr);
+ if (iod_csum->ic_data == NULL)
+ return -DER_NOMEM;
for (i = 0; i < iod_csum->ic_nr; i++) {
rc = proc_struct_dcs_csum_info(proc,
&iod_csum->ic_data[i]);
| [crt_proc_struct_dcs_iod_csums->[crt_proc_struct_dcs_iod_csums_adv]] | This function is called from the DCS - ODCS - Csums - adv private static volatile int i ;. | This would have resulted in a segfault here before presumably? |
@@ -566,7 +566,9 @@ public class BattleTracker implements java.io.Serializable {
final PlayerAttachment paWhoseCapital = PlayerAttachment.get(whoseCapital);
final List<Territory> capitalsList =
new ArrayList<Territory>(TerritoryAttachment.getAllCurrentlyOwnedCapitals(whoseCapital, data));
- if (paWhoseCapital != null && paWhoseCapital.getRetainCapitalNumber() < capitalsList.size()) // we are losing one right now, so it is
+ if (paWhoseCapital != null && paWhoseCapital.getRetainCapitalNumber() < capitalsList.size()) // we are losing one
+ // right now, so it
+ // is
// < not <=
{
// do nothing, we keep our money since we still control enough capitals
| [BattleTracker->[addBattle->[addBattle],removeBattle->[removeDependency],clearBattleRecords->[clear],addMustFightBattleChange->[addBattle],addBombingBattle->[addBattle],getBlocked->[getDependentOn],addAirBattle->[addBattle],clear->[clear],takeOver->[markWasInCombat,addToConquered],addEmptyBattle->[addBattle]]] | Takes over a unit of a given territory. Checks if the unit is not in the list of matches and if so subtract them from the Checks if the player is a neutral territory and if it is a person and if take the money of a specific player in the system capturedPUCount - Count of PUs in the player who owns it. | bad formatting, you're responsible for good formatting even if the auto-formatter does not do the right thing. IE: I made the change because that is what my formatter did is both missing the point of formatting and also not valid. When mass formatting all files, I think we can let things slide, but for a single file in a controlled change, either the formatting should be good or not changed IMO. |
@@ -11,9 +11,15 @@ class PyEasybuildEasyblocks(PythonPackage):
installation framework for (scientific) software on HPC systems.
"""
- homepage = 'http://hpcugent.github.io/easybuild/'
- url = 'https://pypi.io/packages/source/e/easybuild-easyblocks/easybuild-easyblocks-3.1.2.tar.gz'
+ homepage = 'https://easybuilders.github.io/easybuild'
+ url = 'https://pypi.io/packages/source/e/easybuild-easyblocks/easybuild-easyblocks-4.0.0.tar.gz'
+ maintainers = ['boegel']
+ version('4.0.0', sha256='a0fdef6c33c786e323bde1b28bab942fd8e535c26842877d705e692e85b31b07')
version('3.1.2', 'be08da30c07e67ed3e136e8d38905fbc')
- depends_on('py-easybuild-framework@3.1:', when='@3.1:', type='run')
+ depends_on('python@2.6:2.8', when='@:3', type=('build', 'run'))
+ depends_on('python@2.6:2.8,3.5:', when='@4:', type=('build', 'run'))
+
+ for v in ['@3.1.2:', '@4.0.0:']:
+ depends_on('py-easybuild-framework' + v, when=v, type='run')
| [PyEasybuildEasyblocks->[depends_on,version]] | Installation framework for EasyBlock software on HPC systems. | This should be `['@3.1.2', '@4.0.0']` I think? (fixed versions, not ranges) |
@@ -1003,7 +1003,7 @@ export class AmpStory extends AMP.BaseElement {
// Preloads and prerenders the share menu.
this.shareMenu_.build();
- const infoDialog = shouldShowStoryUrlInfo(this.viewer_)
+ const infoDialog = this.viewer_ && shouldShowStoryUrlInfo(this.viewer_)
? new InfoDialog(this.win, this.element)
: null;
if (infoDialog) {
| [AmpStory->[isBrowserSupported->[Boolean,CSS],initializeMediaQueries_->[getAttribute,getMediaQueryService,onMediaQueryMatch,toArray],onMutedStateUpdate_->[MUTED],isStandalone_->[STANDALONE],onUIStateUpdate_->[DESKTOP_PANELS,VERTICAL,scopedQuerySelectorAll,setImportantStyles,LOAD_END,MOBILE,DESKTOP_FULLBLEED,element,length],maybePreloadBookend_->[CAN_SHOW_BOOKEND],closeOpacityMask_->[dev,toggle],initializeStoryNavigationPath_->[NAVIGATION_PATH,SET_NAVIGATION_PATH,every,getHistoryState],initializeLiveStory_->[ADD_TO_ACTIONS_ALLOWLIST,DOM_UPDATE,UI_STATE,DESKTOP_PANELS],onNoPreviousPage_->[dict,ADVANCEMENT_MODE,CAN_SHOW_PREVIOUS_PAGE_HELP],maybeLoadStoryEducation_->[extensionsFor],layoutCallback->[resolve,isBrowserSupported,TOGGLE_SUPPORTED_BROWSER],switchTo_->[DESKTOP_PANELS,setState,isAd,shift,isAutoAdvance,CURRENT_PAGE_INDEX,removeAttributeInMutate,TOGGLE_AD,ADVANCE_TO_ADS,VISITED,SET_ADVANCEMENT_MODE,UI_STATE,NOT_ACTIVE,CHANGE_PAGE,PAUSED_STATE,beforeVisible,PLAYING,element,length,resolve,unqueueStepInRAF,AD_SHOWING,TOGGLE_ACCESS,setAttributeInMutate],pause_->[NOT_ACTIVE,INACTIVE,TOGGLE_PAUSED,MUTED_STATE,PAUSED_STATE],triggerActiveEventForPage_->[actionServiceForDoc,HIGH],isLandscapeSupported_->[SUPPORTS_LANDSCAPE],getElementDistance->[getDistance],getMaxMediaElementCounts->[min,VIDEO,AUDIO],onAdStateUpdate_->[MUTED_STATE],setOrientationAttribute_->[ORIENTATION],setThemeColor_->[dev,content,name,computedStyle],getInitialPageId_->[lastItem,NAVIGATION_PATH,getHistoryState,parseQueryString,id],onPausedStateUpdate_->[PLAYING,PAUSED],registerAndPreloadBackgroundAudio_->[upgradeBackgroundAudio,childElement,LOAD_END,tagName],initializeStandaloneStory_->[classList],initializeListeners_->[STORY_UNMUTED,setAllowlist,NEXT_PAGE,AD_STATE,PREVIOUS_PAGE,MUTED_STATE,getMode,NO_NEXT_PAGE,PAGE_PROGRESS,STORY_MUTED,BOOKEND_STATE,STORY_IS_MUTED,stopPropagation,endsWith,MOBILE,preventDefault,UI_STATE,DISPATCH_ACTION,CAN_SHOW_AUDIO_UI,NO_PREVIOUS_PAGE,getState,NEXT,ADVANCEMENT_MODE,REPLAY,SIDEBAR_STATE,PAUSED_STATE,parseQueryString,getDetail,ACTIONS_ALLOWLIST,STORY_ADVANCEMENT_MODE,actionServiceForDoc,SUPPORTED_BROWSER_STATE,SWITCH_PAGE,debounce,slice],getUIType_->[DESKTOP_PANELS,VERTICAL,MOBILE,DESKTOP_FULLBLEED],openOpacityMask_->[dev,toggle],insertPage->[setAttribute,RETURN_TO,PUBLIC_ADVANCE_TO,isAd,ADVANCE_TO,AUTO_ADVANCE_TO,dev,CAN_INSERT_AUTOMATIC_AD,element,id,isExperimentOn],initializeBookend_->[dict,whenUpgradedToCustomElement,getImpl,createElementWithAttributes],isActualPage_->[element,escapeCssSelectorIdent],setDesktopPositionAttributes_->[element,escapeCssSelectorIdent,removeAttribute,getPreviousPageId,DESKTOP_POSITION,scopedQuerySelectorAll,prototype,getNextPageId,forEach,push],isLayoutSupported->[CONTAINER],onSidebarStateUpdate_->[CLOSE,HIGH,actionServiceForDoc,TOGGLE_SIDEBAR,OPEN,execute],initializeStoryPlayer_->[extensionsFor],initializePageIds_->[SET_PAGE_IDS,toArray,user,length,id,map],initializeListenersForDev_->[getMode,getDetail,DEV_LOG_ENTRIES_AVAILABLE],getPageById->[devAssert],maybeLockScreenOrientation_->[mozLockOrientation,dev,message,lockOrientation,msLockOrientation],hideBookend_->[TOGGLE_BOOKEND],forceRepaintForSafari_->[DESKTOP_PANELS,toggle,UI_STATE],onKeyDown_->[BOOKEND_STATE,RTL_STATE,RIGHT_ARROW,key,LEFT_ARROW,SET_ADVANCEMENT_MODE,MANUAL_ADVANCE],initializePages_->[all,ADD_TO_ACTIONS_ALLOWLIST,prototype,getImpl,isExperimentOn],resume_->[TOGGLE_PAUSED,MUTED_STATE],upgradeCtaAnchorTagsForTracking_->[element,scopedQuerySelectorAll,setAttribute,prototype],getPageDistanceMapHelper_->[getAdjacentPageIds],updatePausedIcon_->[TOGGLE_STORY_HAS_PLAYBACK_UI,scopedQuerySelector],validateConsent_->[tagName,indexOf,user,childElementByTag,removeChild,forEach,length,childElements],onSelectPage_->[VIEWER_SELECT_PAGE,SET_ADVANCEMENT_MODE],onResize->[TOGGLE_UI,MOBILE,TOGGLE_VIEWPORT_WARNING],initializeStoryAccess_->[hasAttribute,areFirstAuthorizationsCompleted,removeAttribute,user,accessServiceForDocOrNull,onApplyAuthorizations],replay_->[then,NOT_ACTIVE,BOOKEND_STATE,removeAttributeInMutate,dev,NEXT,VISITED,SET_NAVIGATION_PATH,PLAYING],onAccessApplyAuthorizations_->[element,TOGGLE_ACCESS,NEXT],onNoNextPage_->[dict,ADVANCEMENT_MODE],lockBody_->[setImportantStyles,documentElement,body],maybeTriggerViewportWarning_->[TOGGLE_PAUSED,PAUSED_STATE,TOGGLE_VIEWPORT_WARNING,VIEWPORT_WARNING_STATE],initializeStyles_->[length],rewriteStyles_->[textContent,isExperimentOn],whenPagesLoaded_->[DESKTOP_PANELS,all,filter,LOAD_END,element,UI_STATE],updateAudioIcon_->[TOGGLE_STORY_HAS_BACKGROUND_AUDIO,TOGGLE_STORY_HAS_AUDIO],constructor->[getLocalizationService,timerFor,forElement,getStoreService,platformFor,TOGGLE_RTL,isRTL,getVariableService,for,viewerForDoc,getAnalyticsService,createPseudoLocale],isSwipeLargeEnoughForHint_->[abs],next_->[next,devAssert],addPage->[isAd],showBookend_->[TOGGLE_BOOKEND],hasBookend->[components,resolve,CAN_SHOW_BOOKEND,MOBILE,UI_STATE],buildCallback->[setAttribute,nodeType,then,TEXT_NODE,resolve,childNodes,NEXT,TOGGLE_UI,SIDEBAR_STATE,TOGGLE_CAN_SHOW_BOOKEND,GO_TO_PAGE,forEach,historyForDoc,SET_ADVANCEMENT_MODE,isExperimentOn],getPagesByDistance_->[indexOf,isExperimentOn,NAVIGATION_PATH,keys],onSupportedBrowserStateUpdate_->[dev,TOGGLE_PAUSED,PAUSED_STATE],toggleElementsOnBookend_->[DESKTOP_PANELS,resetStyles,scopedQuerySelectorAll,prototype,setImportantStyles,UI_STATE],previous_->[previous,devAssert],updateNavigationPath_->[NEXT,pop,NAVIGATION_PATH,setHistoryState,SET_NAVIGATION_PATH,length,PREVIOUS,push],performTapNavigation_->[DESKTOP_PANELS,NEXT,PREVIOUS,SET_ADVANCEMENT_MODE,UI_STATE,MANUAL_ADVANCE],preloadPagesByDistance_->[forEach,setDistance],getPageIndexById->[findIndex,user,element],initializeOpacityMask_->[HIGH,dev,actionServiceForDoc,classList,addEventListener,toggle,execute],installGestureRecognizers_->[HIDDEN,INTERACTIVE_COMPONENT_STATE,state,BOOKEND_STATE,SYSTEM_UI_IS_VISIBLE_STATE,CAN_SHOW_NAVIGATION_OVERLAY_HINT,get,data,event,ACCESS_STATE,SIDEBAR_STATE,onGesture],pauseStoryUntilConsentIsResolved_->[getConsentPolicyState,then,TOGGLE_PAUSED],initializeSidebar_->[TOGGLE_HAS_SIDEBAR,ADD_TO_ACTIONS_ALLOWLIST],layoutStory_->[setState,then,all,NOT_ACTIVE,shouldShowStoryUrlInfo,NEXT,user,build,CAN_SHOW_PAGINATION_BUTTONS,getHistoryState,BOOKEND_ACTIVE,whenUpgradedToCustomElement,whenBuilt,ATTACHMENT_PAGE_ID],getPageIndex->[findIndex],markStoryAsLoaded_->[dict,INI_LOAD,STORY_LOADED,dispatch],getNextPage->[getNextPageId],getPageContainingElement_->[findIndex,element,closest],BaseElement],VIDEO,registerServiceForDoc,extension,AUDIO,registerElement] | This function is called when the user clicks on a story page. It will build the system Checks if a page is built and if so builds it. | The viewer should always be defined at this point. This is dangerous because it means that `infoDialog` would be false if the viewer is not defined, without any error message. If you want to satisfy the compiler, please use `devAssert()`. |
@@ -528,4 +528,5 @@ public class RStudioGinModule extends AbstractGinModule
{
bind(Widget.class).annotatedWith(Names.named(name)).to(clazz);
}
+ //private final StudioClientApplicationConstants constants_ = GWT.create(StudioClientApplicationConstants.class);
}
| [RStudioGinModule->[bindTab->[to],bindPane->[to],configure->[install,to,bindTab,build,asEagerSingleton,in,bindPane]]] | Bind a pane with the given name to the given class. | Not used, remove. |
@@ -624,3 +624,18 @@ function yoast_wpseo_self_deactivate() {
}
}
}
+
+/**
+ * Excludes vendor directories from php-compatibility-checker.
+ *
+ * @since 9.4
+ *
+ * @param array $ignored Array of ignored directories/files.
+ *
+ * @return array Array of ignored directories/files.
+ */
+function yoast_wpseo_phpcompat_whitelist( $ignored ) {
+ $ignored[] = '*/wordpress-seo/vendor*';
+
+ return $ignored;
+}
| [_wpseo_activate->[install,manage_notification,schedule_flush,add,activate_hooks],_wpseo_deactivate->[remove],wpseo_init->[register_hooks,load],wpseo_init_rest_api->[register,initialize],wpseo_network_activate_deactivate->[prepare,get_col],register_hooks] | Yoast - WordPress self - deactivate. | This needs to use the `plugin_dir_path` or `WPSEO_PATH` as there is no guarantee that the Plugin is installed in the `wordpress-seo` directory. I would prefer to have the `vendor` and `vendor_prefixed` as separate entries for clarity. |
@@ -91,9 +91,7 @@ func (f *Fetcher) request(r io.Reader, err error) ([]byte, error) {
}
result, err := ioutil.ReadAll(resp.Body)
- if resp.StatusCode == http.StatusMultipleChoices {
- return nil, errors.Wrap(errors.New(string(result)), ErrMsgMultipleChoices)
- } else if resp.StatusCode > http.StatusMultipleChoices {
+ if resp.StatusCode >= http.StatusBadRequest {
return nil, errors.New(string(result))
}
if err != nil {
| [request->[New,Close,Send,Wrap,ReadAll],Fetch->[ToReader,request,fetchAndAdd],NewLogger] | request sends a request to the Kibana API and reads the response. | Did this change in Kibana so the check is not necessary anymore? |
@@ -48,6 +48,7 @@ abstract class BasePageDocumentType extends AbstractStructureBehaviorType
'allow_delete' => true,
]
);
+ $builder->add('segment', TextType::class);
$builder->add('redirectType', IntegerType::class);
$builder->add('redirectTarget', DocumentObjectType::class);
$builder->add('redirectExternal', TextType::class);
| [BasePageDocumentType->[buildForm->[add,setAttribute],configureOptions->[setRequired]]] | Builds the form for a specific node. | Would be handled in excerpt extension instead of here if moved to excerpt. |
@@ -192,13 +192,7 @@ describe HelpController do
end
it 'has rudimentary spam protection' do
- post :contact, { :contact => {
- :name => 'Vinny Vanilli',
- :email => 'vinny@localhost',
- :subject => 'Why do I have such an ace name?',
- :comment => 'I AM A SPAMBOT',
- :message => "You really should know!!!\n\nVinny" },
- :submitted_contact_form => 1 }
+ post :contact, params: { :contact => { :name => 'Vinny Vanilli', :email => 'vinny@localhost', :subject => 'Why do I have such an ace name?', :comment => 'I AM A SPAMBOT', :message => "You really should know!!!\n\nVinny" }, :submitted_contact_form => 1 }
expect(response).to redirect_to(frontpage_path)
| [create,let,be,describe,join,it,prepend_view_path,to,pro_contact_email,root,before,post,contact_email,require,cookies,include,dirname,maximum,with_feature_enabled,match,id,deliveries,redirect_to,context,get,url_title,eq,render_template,clear,raise_error,expand_path] | get all contact messages submission_contact_form - submitted_contact_form 1 - > redirect to frontpage. | Line is too long. [259/80] |
@@ -2240,7 +2240,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
@Restricted(NoExternalUse.class)
public Object getTarget() {
if (!SKIP_PERMISSION_CHECK) {
- Jenkins.get().checkPermission(Jenkins.ADMINISTER);
+ Jenkins.get().checkPermission(Jenkins.SYSTEM_READ);
}
return this;
}
| [PluginManager->[createDefault->[create],doPlugins->[getDisplayName],install->[start,install,getPlugin],dynamicLoad->[dynamicLoad],getPlugin->[getPlugin,getPlugins],PluginUpdateMonitor->[ifPluginOlderThenReport->[getPlugin]],addDependencies->[addDependencies],start->[run],loadDetachedPlugins->[loadPluginsFromWar],getPluginVersion->[getPluginVersion],loadPluginsFromWar->[loadPluginsFromWar],PluginCycleDependenciesMonitor->[isActivated->[getPlugins]],doPrevalidateConfig->[getPlugin],getPlugins->[getPlugin,getPlugins],stop->[stop],doInstallNecessaryPlugins->[prevalidateConfig],prevalidateConfig->[getPlugin],disablePlugins->[getPlugin],doCheckUpdatesServer->[start],create->[doCreate],parseRequestedPlugins->[resolveEntity->[resolveEntity]],initTasks->[run->[]]]] | Get the target object. | Use the solution in the large Overall/Manage PR instead, please. |
@@ -237,7 +237,7 @@ namespace DynamoPythonTests
var completionProvider = new IronPythonCompletionProvider();
completionProvider.UpdateImportedTypes(str);
- Assert.AreEqual(1, completionProvider.ImportedTypes.Count);
+ Assert.AreEqual(2, completionProvider.ImportedTypes.Count);
Assert.IsTrue(completionProvider.ImportedTypes.ContainsKey("System"));
}
| [CodeCompletionTests->[CanMatchImportSystemAndLoadLibraryAndWithComment->[UpdateImportedTypes,AreEqual,Count,IsTrue,ContainsKey],CanFindAllTypeImports->[ContainsKey,FindAllTypeImportStatements,AreEqual,IsTrue],CanFindTypeSpecificAutodeskImportsSingleTypeSingleLine->[ContainsKey,IsTrue,AreEqual,FindTypeSpecificImportStatements],CanFindTypeSpecificImportsSingleTypeSingleLine->[ContainsKey,IsTrue,AreEqual,FindTypeSpecificImportStatements],CanMatchBasicDictVarSingleLine->[dictRegex,AreEqual,Count,IsTrue,ContainsKey,FindVariableStatementWithRegex],CanMatchComplexDictVarMultiLine->[dictRegex,AreEqual,Count,IsTrue,ContainsKey,FindVariableStatementWithRegex],CanMatchComplexDictVarSingleLine->[dictRegex,AreEqual,Count,IsTrue,ContainsKey,FindVariableStatementWithRegex],CanImportSystemLibraryAndGetCompletionData->[GetCompletionData,Any,Count,AreEqual,IsTrue,Select,ContainsKey,Text],CanFindSystemCollectionsAssignmentAndType->[VariableTypes,UpdateImportedTypes,AreEqual,IsTrue,ContainsKey,UpdateVariableTypes],CanImportLibrary->[UpdateImportedTypes,AreEqual,Count,IsTrue,ContainsKey],CanMatchAllVariableTypes->[FindAllVariables,AreEqual,Count,Item3],CanMatchAllVariablesSingleLine->[FindAllVariables,AreEqual,Count,Item3],CanGetCompletionDataForArrayListVariable->[GetCompletionData,Length,AreNotEqual],CanMatchBasicImportStatementMultiLine->[AreEqual,Count,IsTrue,ContainsKey,FindBasicImportStatements],CanMatchBasicImportStatement->[AreEqual,Count,IsTrue,ContainsKey,FindBasicImportStatements],CanFindTypeSpecificImportsMultipleTypesSingleLine->[ContainsKey,IsTrue,AreEqual,FindTypeSpecificImportStatements],CanMatchBasicNumVarSingleLine->[doubleRegex,AreEqual,Count,IsTrue,ContainsKey,FindVariableStatementWithRegex],RunAfterAllTests->[ResolveAssembly,AssemblyResolve],CanIdentifyVariableTypeAndGetCompletionData->[GetCompletionData,Length,AreNotEqual],CanMatchBasicArrayVarSingleLine->[AreEqual,Count,IsTrue,ContainsKey,arrayRegex,FindVariableStatementWithRegex],DoesntMatchBadVariable->[FindVariableStatementWithRegex,dictRegex,AreEqual,Count],CanMatchImportSystemLibraryWithComment->[FindBasicImportStatements,AreEqual,Count],CanImportSystemCollectionsLibraryAndGetCompletionData->[GetCompletionData,Any,Count,AreEqual,IsTrue,Select,Length,Text],VerifyIronPythonLoadedAssemblies->[Contains,FullName,GetAssemblies,StartsWith,Fail,Add],CanFindDifferentTypesOfImportsAndLoad->[ContainsVariable,UpdateImportedTypes,AreEqual,Count,IsTrue],CanMatchIntSingleLine->[intRegex,AreEqual,Count,IsTrue,ContainsKey,FindVariableStatementWithRegex],DuplicateCallsToImportShouldBeFine->[UpdateImportedTypes,AreEqual,Count,IsTrue,ContainsKey],SetupPythonTests->[AssemblyResolve,Combine,Location,logger,GetDirectoryName,ResolveAssembly]]] | Imports the system type if it is not imported. | what are the other types? |
@@ -116,6 +116,12 @@ namespace Dynamo.Models
EngineController.NodeDeleted(node);
}
+ protected override void ResetWorkspaceCore()
+ {
+ // Reset Run Automatic option to false on resetting the workspace
+ DynamicRunEnabled = false;
+ }
+
private void LibraryLoaded(object sender, LibraryServices.LibraryLoadedEventArgs e)
{
// Mark all nodes as dirty so that AST for the whole graph will be
| [HomeWorkspaceModel->[Clear->[Clear],OnNodesModified->[OnNodesModified],ResetEngine->[LibraryLoaded,OnNodesModified],Dispose->[Dispose],OnNodeRemoved->[OnNodeRemoved]]] | Override this method to mark all nodes as dirty so that they are regenerated. | Hi @aparajit-pratap, the reason this is added now is because we want no-auto run by default? What if you don't set this? |
@@ -59,9 +59,6 @@ def manager_init(spinner=None):
if params.get("Passive") is None:
raise Exception("Passive must be set to continue")
- if EON:
- update_apks()
-
os.umask(0) # Make sure we can create files with 777 permissions
# Create folders needed for msgq
| [main->[manager_cleanup,manager_thread,manager_init,manager_prepare],main] | Initialize a new nagios manager. Register a device with the Dongle. | I _think_ we can also get rid of the umask (and all other 777 permissions) since everything runs under the same user now. |
@@ -88,6 +88,9 @@ static int pvk2key_decode(void *vctx, OSSL_CORE_BIO *cin, int selection,
void *key = NULL;
int ok = 0;
+ if (in == NULL)
+ goto end;
+
ctx->selection = selection;
if ((selection == 0
| [void->[OPENSSL_free,ossl_rsa_set0_libctx,PROV_LIBCTX_OF],pvk2key_ctx_st->[OPENSSL_zalloc],int->[ERR_clear_last_mark,OSSL_PARAM_construct_utf8_string,OSSL_PARAM_construct_octet_string,ossl_pw_set_ossl_passphrase_cb,ERR_GET_LIB,data_cb,ERR_peek_last_error,adjust_key,PROV_LIBCTX_OF,ERR_GET_REASON,export,ossl_bio_new_from_core_bio,OSSL_PARAM_construct_int,ossl_prov_get_keymgmt_export,read_private_key,OSSL_PARAM_construct_end,memset,BIO_free,free_key],IMPLEMENT_MS] | This is a private key2key decoding method. It is called by OSSL2_ if key not found in ctx ctx -> desc. | just return 0 here please |
@@ -113,14 +113,11 @@ module GobiertoBudgets
return 0 if total_income == 0
total_expense = 0
- (1..4).each do |code|
+ (1..5).each do |code|
total_expense += get_expense_budget_line(year, code)
end
- value = (total_income - total_expense + get_expense_budget_line(year, 9))
-
- return nil if value == 0
- ((value / total_income) * 100).round(2)
+ return (total_income - total_expense - get_expense_budget_line(year, 9)).round(2)
end
def debt_level(year = nil)
| [SiteStats->[total_budget_executed_percentage->[total_budget_executed,total_budget],debt_level->[debt],latest_available->[has_data?],has_available?->[has_data?]]] | This method calculates the net sensitivity of a single in a given year. | Redundant return detected. |
@@ -195,7 +195,7 @@ class Exchange(object):
try:
markets = self._api.load_markets()
self._load_async_markets()
- return markets
+ return markets # prbly not necessary to return anything anymore
except ccxt.BaseError as e:
logger.warning('Unable to initialize markets. Reason: %s', e)
return {}
| [retrier->[wrapper->[wrapper]],Exchange->[cancel_order->[cancel_order],get_trades_for_order->[exchange_has],create_order->[symbol_amount_prec,symbol_price_prec,create_order],buy->[create_order,dry_run_order],sell->[create_order,dry_run_order],_load_markets->[_load_async_markets],stoploss_limit->[symbol_price_prec,create_order,dry_run_order]],retrier_async->[wrapper->[wrapper]]] | Load all available markets. | no it's not... it's not used anywhere (apart from tests) so we should be fine. |
@@ -326,6 +326,9 @@ class PageConfig {
* Debug logger, only log message if #swg.log=1
* @param {...*} var_args [decription]
*/
+
+/* eslint-disable */
+
function debugLog(var_args) {
if (/swg.debug=1/.test(self.location.hash)) {
const logArgs = Array.prototype.slice.call(arguments, 0);
| [PageConfigResolver->[resolveConfig->[resolve],constructor->[resolveDoc],check->[reject,debugLog]],TypeChecker->[checkArray->[forEach,replace,includes],toArray_->[isArray],checkString->[split]],GlobalDoc->[isReady->[isDocumentReady],whenReady->[whenDocumentReady],constructor->[document]],MetaParser->[check->[toLowerCase,getMetaTag]],JsonLdParser->[valueArray_->[isArray],bool_->[toLowerCase],tryExtractConfig_->[length,tryParseJson,textContent],check->[hasNextNodeInDocumentOrder,length,test,textContent]],PageConfig->[constructor->[indexOf,substring]],MicrodataParser->[discoverProductId_->[getAttribute,querySelectorAll,indexOf,textContent,closest,parentElement],tryExtractConfig_->[getAttribute,prototype],discoverAccess_->[getAttribute,toLowerCase,querySelectorAll,textContent],isValidElement_->[parentNode,hasAttribute,getAttribute]],onDocumentReady,onDocumentState,join,removeEventListener,opt_onFailed,addEventListener,location,isArray,apply,parentNode,prototype,log,parseJson,getAttribute,parse,unshift,callback,stateFn,getReadyState,nextSibling,querySelector] | Gets the label of a given . Replies if an element has a next node in the document order. | Instead of this, I believe you can add this file to `.eslintignore` |
@@ -3605,12 +3605,6 @@ void ByteCodeGenerator::EmitScopeList(ParseNode *pnode, ParseNode *breakOnBodySc
this->EmitOneFunction(pnode);
this->EndEmitFunction(pnode);
-
- if (paramScope && !paramScope->GetCanMergeWithBodyScope())
- {
- Assert(this->GetCurrentScope() == paramScope);
- PopScope(); // Pop the param scope
- }
}
pnode = pnode->sxFnc.pnodeNext;
break;
| [No CFG could be retrieved] | Emit functions that are not in the body scope. finds the next pnode in the tree of scopes. | Why are you not "pushing" the paramscope in the StartEmitFunction (line 3579) - then it will be consistent and easy to read. |
@@ -814,8 +814,10 @@ add_addr_info(struct sockaddr_storage *service, socklen_t *addrlen, AVal *host,
*socket_error = WSANO_DATA;
#elif __FreeBSD__
*socket_error = ENOATTR;
-#else
+#elif defined(ENODATA)
*socket_error = ENODATA;
+#else
+ *socket_error = EAFNOSUPPORT;
#endif
RTMP_Log(RTMP_LOGERROR, "Could not resolve server '%s': no valid address found", hostname);
| [No CFG could be retrieved] | Get the network address information for a given host and port. Connect to a server in the network. | Why is this not special cased to openBSD? |
@@ -0,0 +1,18 @@
+# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ==============================================================================
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
| [No CFG could be retrieved] | No Summary Found. | i *think* this file can be empty (but check other contrib/../python/ directories) |
@@ -1,7 +1,9 @@
#!/usr/bin/env ruby
+require 'rails-html-sanitizer'
+
class I18nExtractor
ERB_TAG = /<%(.*?)%>/
- HTML_TAG = /<(.*?)>/
+ HTML_TAG = /<[^>]*>|<\/[^>]*>|[^>]*\/>|\".+">|">|<\w+(.+|)|.+="(.+)|"/
SEPERATOR = '_@@@_'
SKIP_TAGS = [[/<script/i,/<\/script>/i],[/<%/,/%>/],[/<style/i,/\/style>/i]]
| [I18nExtractor->[in_script_block?->[in_script_block?]],extract] | Initialize a new object with a filename and stack. | just noting the new behavior - because we're requiring a gem from the bundled set - this script now requires `bundle exec bin/untranslated_erb` where it used to be pure ruby. It's not a problem, just a change (and if we have or create instructions published on how to use this to find translation opportunities, that needs to be included/updated). |
@@ -235,7 +235,8 @@ def parse_type_comment(type_comment: str,
ignored: Optional[List[str]] = parse_type_ignore_tag(tag)
if ignored is None:
if errors is not None:
- errors.report(line, column, INVALID_TYPE_IGNORE, code=codes.SYNTAX)
+ err_msg = message_registry.INVALID_TYPE_IGNORE
+ errors.report(line, column, err_msg.value, code=err_msg.code)
else:
raise SyntaxError
else:
| [parse_type_string->[parse_type_comment],parse_type_comment->[parse_type_ignore_tag,ast3_parse],stringify_name->[stringify_name],TypeConverter->[visit_UnaryOp->[invalid_type,visit],visit_Num->[numeric_type],visit_Str->[parse_type_string],visit_Index->[visit],visit_Attribute->[invalid_type,visit],_extract_argument_name->[fail],visit_Subscript->[invalid_type,visit,translate_expr_list],translate_argument_list->[visit],visit_raw_str->[parse_type_comment],visit_Name->[convert_column],visit_Constant->[parse_type_string,invalid_type],translate_expr_list->[visit],visit_BinOp->[invalid_type,visit,convert_column],visit_Slice->[invalid_type],visit_Call->[invalid_type,parent,visit,fail],visit_Tuple->[translate_expr_list,convert_column],visit_List->[translate_argument_list],visit->[invalid_type]],parse->[ast3_parse],ASTConverter->[visit_IfExp->[visit,set_line],visit_Str->[set_line],visit_Delete->[visit,translate_expr_list,set_line],visit_AsyncWith->[translate_type_comment,visit,as_required_block,set_line],translate_opt_expr_list->[visit],visit_Raise->[visit,set_line],visit_While->[as_block,visit,as_required_block,set_line],visit_If->[as_block,visit,as_required_block,set_line],visit_Pass->[set_line],do_func_def->[fail,note,translate_expr_list,as_required_block,set_line,in_method_scope,ast3_parse,is_no_type_check_decorator],visit_BinOp->[from_operator,visit,set_line],visit_Await->[visit,set_line],visit_ClassDef->[visit,translate_expr_list,as_required_block],visit_AugAssign->[from_operator,visit,set_line],visit_Dict->[translate_opt_expr_list,translate_expr_list,set_line],visit_YieldFrom->[visit,set_line],visit_BoolOp->[translate_expr_list],visit_AsyncFor->[as_block,as_required_block,set_line,translate_type_comment,visit],visit_With->[translate_type_comment,visit,as_required_block,set_line],visit_Assign->[translate_type_comment,visit,translate_expr_list,set_line],visit_JoinedStr->[translate_expr_list,set_line],visit_Index->[visit],visit_Match->[fail],visit_Ellipsis->[set_line],visit_ImportFrom->[translate_module_id,set_line],visit_Import->[translate_module_id,set_line],visit_NamedExpr->[visit,set_line],as_block->[translate_stmt_list,set_line],visit_Try->[as_block,visit,as_required_block,set_line],visit_Lambda->[as_required_block,transform_args,set_line],visit_List->[visit,set_line],translate_expr_list->[translate_opt_expr_list],group->[group,set_line],visit_Compare->[from_comp_operator,translate_expr_list,set_line],visit_DictComp->[visit,translate_expr_list,set_line],fail_arg->[fail],visit_Expr->[visit,set_line],visit_Continue->[set_line],visit_Starred->[visit,set_line],visit_FormattedValue->[visit,set_line],visit_ExtSlice->[translate_expr_list],visit_Subscript->[visit,set_line],visit_Yield->[visit,set_line],visit_NameConstant->[set_line],visit_AnnAssign->[visit,set_line],visit_GeneratorExp->[visit,translate_expr_list,set_line],visit_Return->[visit,set_line],visit_Bytes->[set_line],visit_Constant->[set_line],make_argument->[translate_type_comment,visit,fail],visit_For->[as_block,as_required_block,set_line,translate_type_comment,visit],visit_Tuple->[translate_expr_list,set_line],visit_ListComp->[set_line],translate_type_comment->[parse_type_comment],visit_Break->[set_line],visit_Nonlocal->[set_line],visit_Global->[set_line],visit_Set->[translate_expr_list,set_line],visit_UnaryOp->[visit,set_line],visit_Num->[set_line],visit_Attribute->[visit,set_line],visit_SetComp->[set_line],visit_Assert->[visit,set_line],visit_Module->[translate_stmt_list,parse_type_ignore_tag,fail,fix_function_overloads],visit_Name->[set_line],visit_Slice->[visit],as_required_block->[translate_stmt_list,set_line],visit_Call->[visit,translate_expr_list,set_line],translate_stmt_list->[get_lineno,visit,translate_stmt_list]]] | Parse type portion of a type comment. | can we refactor `report` to also work with `ErroCode` instances? |
@@ -245,10 +245,12 @@ class ParDoTest(unittest.TestCase):
class TypeHintsTest(unittest.TestCase):
def test_bad_types(self):
- p = TestPipeline()
+ # [START type_hints_missing_define_numbers]
+ p = TestPipeline(
+ options=TypeOptions.from_dictionary({'pipeline_type_check': True})
+ )
evens = None # pylint: disable=unused-variable
- # [START type_hints_missing_define_numbers]
numbers = p | beam.Create(['1', '2', '3'])
# [END type_hints_missing_define_numbers]
| [ParDoTest->[test_pardo->[ComputeWordLengthFn],test_pardo_side_input_dofn->[FilterUsingLength],test_pardo_yield->[ComputeWordLengthFn]],PTransformTest->[test_composite->[ComputeWordLengths]],CombineTest->[test_custom_average->[AverageFn],test_setting_timestamp->[AddTimestampDoFn->[process->[extract_timestamp_from_log_entry]],AddTimestampDoFn]],TypeHintsTest->[test_bad_types->[MyTransform,FilterEvensDoFn],test_deterministic_key->[parse_player_and_score->[Player],PlayerCoder->[decode->[Player]]]],SnippetsTest->[test_construct_pipeline->[get_output,create_temp_file],test_pipeline_options_remote->[_run_test_pipeline_for_options],test_model_composite_transform_example->[get_output,create_temp_file],test_examples_wordcount_debugging->[get_output,create_temp_file],test_model_co_group_by_key_tuple->[get_output,create_temp_file],DummyWriteTransform->[WriteDoFn->[process->[encode]],expand->[WriteDoFn]],test_pipeline_options_command_line->[_run_test_pipeline_for_options],_run_test_pipeline_for_options->[get_output,create_temp_file],test_model_pcollection->[get_output,create_temp_file],test_model_custom_sink->[SimpleKV],test_model_multiple_pcollections_flatten->[get_output,create_temp_file],test_model_join_using_side_inputs->[get_output,create_temp_file],test_examples_wordcount->[get_output,create_temp_file],test_model_textio->[get_output,create_temp_file],DummyReadTransform->[expand->[ReadDoFn],ReadDoFn->[finish_bundle->[decode]]],test_model_pipelines->[get_output,create_temp_file],test_model_textio_compressed->[create_temp_file],test_pipeline_logging->[get_output,create_temp_file],test_model_group_by_key->[get_output,create_temp_file],test_model_multiple_pcollections_partition->[get_output,create_temp_file],test_pipeline_options_local->[_run_test_pipeline_for_options]]] | Test for bad types. missing - object - > missing - object - > missing - object - > missing - object. | Remove this line. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.