patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -78,7 +78,7 @@ func ValidateIdentityProvider(identityProvider api.IdentityProvider) ValidationR
} else {
switch provider := identityProvider.Provider.Object.(type) {
case (*api.RequestHeaderIdentityProvider):
- validationResults.AddErrors(ValidateRequestHeaderIdentityProvider(provider, identityProvider)...... | [Has,NewFieldInvalid,ReadSessionSecrets,NewStringSet,Error,Append,AddErrors,Sprintf,IsIdentityProviderType,ParseURL,List,Repeat,Insert,AddWarnings,Prefix,ValidateIdentityProviderName,IsPasswordAuthenticator,NewFieldRequired] | ValidateIdentityProvider validates the identity provider. | Let's get an issue open to track warnings and errors for authentication config interactions that probably won't work correctly. Two redirectors or a requestheader challenger and another challenger as a for instance. |
@@ -300,7 +300,7 @@ namespace System.Windows.Forms {
item.Site.Container.Remove(item);
}
- item.Menu = null;
+ item.Parent = null;
item.Dispose();
}
items = null;
| [Menu->[CloneMenu->[CloneMenu],MenuItemCollection->[IndexOf->[IndexOf],Clear->[Menu,ItemsChanged],Insert->[Add],Add->[Menu,Add,ItemsChanged],AddRange->[Add],RemoveAt->[Clear,Menu,ItemsChanged],Contains->[Contains],RemoveByKey->[IndexOfKey,RemoveAt,IsValidIndex],ArrayList->[Add],Remove->[Remove,Menu,RemoveAt]],DestroyMe... | Dispose of this menu item. | why was this changed? |
@@ -265,6 +265,7 @@ namespace System.Xml.Linq
{
get
{
+ Debug.Assert(name != null);
return name;
}
set
| [XElement->[ReplaceAttributes->[RemoveAttributes,ReplaceAttributes],Save->[Save],GetDeepHashCode->[GetDeepHashCode],DeepEquals->[AttributesEqual],ReadElementFromImpl->[AppendAttributeSkipNotify],WriteXml->[WriteTo],ReplaceAll->[ReplaceAll,RemoveAll]]] | - A property to check if an element has at least one child element. - This method returns the value of the in the form of a string. | why do we need to assert here? Should this be nullable with `[DisallowNull]`? |
@@ -40,7 +40,12 @@ public class ShibbolethIdPEntityIdAuthenticationServiceSelectionStrategy impleme
if (result.isPresent()) {
final String entityId = result.get();
LOGGER.debug("Located entity id [{}] from service authentication request at [{}]", entityId, service.getId());
- ... | [ShibbolethIdPEntityIdAuthenticationServiceSelectionStrategy->[resolveServiceFrom->[debug,isPresent,get,getEntityIdAsParameter,createService,getId],supports->[concat,isPresent,matches],getEntityIdAsParameter->[getValue,split,getMessage,of,error,isPresent,findFirst,getHttpServletRequestFromExternalWebflowContext,URIBuil... | Resolve service from authentication request. | Remove these. Use `AuditableExecution registeredServiceAccessStrategyEnforcer;` instead. |
@@ -132,10 +132,15 @@ class MetisTuner(Tuner):
self.x_types[idx] = 'range_continuous'
elif key_type == 'choice':
self.x_bounds[idx] = key_range
+
+ for key_value in key_range:
+ if (not isinstance(key_value, int)) and (... | [MetisTuner->[_selection->[_pack_output],generate_parameters->[_pack_output]]] | Update the self. x_bounds and self. x_types by the search_space Randomly choose a sequence of points. | actually this can be reduced to isinstance(key_value, [int, float]). But it does not matter. |
@@ -684,6 +684,7 @@ func CommitRepoAction(opts CommitRepoActionOptions) error {
After: opts.NewCommitID,
CompareURL: setting.AppURL + opts.Commits.CompareURL,
Commits: opts.Commits.ToAPIPayloadCommits(repo.HTMLURL()),
+ HeadCommit: getHeadCommit(repo, opts.NewCommitID),
Repo: apiRepo,
... | [GetRepoName->[loadRepo],ShortRepoName->[GetRepoName],GetRepoPath->[GetRepoName,GetRepoUserName],GetRepoLink->[GetRepoPath],GetIssueTitle->[GetIssueInfos],AvatarLink->[AvatarLink],ShortActUserName->[GetActUserName],GetIssueContent->[GetIssueInfos],GetActAvatar->[loadActUser],GetActFullName->[loadActUser],GetRepoUserNam... | PrepareWebhooks prepares webhooks for a repository. returns a list of objects that can be watched for changes. | Could we get the head PayloadCommit from APIPayLoadCommits ? |
@@ -1465,8 +1465,14 @@ class User < ActiveRecord::Base
def check_if_title_is_badged_granted
if title_changed? && !new_record? && user_profile
- badge_granted_title = title.present? && badges.where(allow_title: true, name: title).exists?
- user_profile.update_column(:badge_granted_title, badge_grante... | [User->[mature_staged?->[from_staged?],secure_category_ids->[admin?],unstage->[unstage],update_posts_read!->[visit_record_for,create_visit_record!,update_posts_read!],has_more_posts_than?->[post_count],username_available?->[normalize_username],post_count->[post_count],silence_reason->[silenced?],avatar_template->[defau... | Check if the title is badged granted by user and if so update the badge granted. | Super minor but you can do `badge_matching_title&.id` here instead of inline if. |
@@ -63,6 +63,17 @@ def calculate_class_abstract_status(typ: TypeInfo, is_stub_file: bool, errors: E
'note')
+def check_protocol_status(info: TypeInfo, errors: Errors) -> None:
+ """Check that all classes in MRO of a protocol are protocols"""
+ for type in info.bases:
+ if info.is_pr... | [calculate_class_abstract_status->[report->[report],report]] | Try to infer additional class variables. | Move this outside the for loop? It would probably be clearer and also a bit more efficient. |
@@ -37,6 +37,7 @@ evoked.plot_topomap(times, ch_type='mag')
# plot gradiometer data (plots the RMS for each pair of gradiometers)
evoked.plot_topomap(times, ch_type='grad')
-# add channel labels and title
+# plot magnetometer data as topomap at 1 time point : 100ms
+# and add channel labels and title
evoked.plot_t... | [plot_topomap,read_evokeds,print,arange,data_path] | Plot the RMS for each pair of gradiometers. | why not changing the default resolution? |
@@ -34,7 +34,10 @@ final class DdlDmlRequestValidators {
return false;
}
- if (sql.indexOf(";") != sql.lastIndexOf(";")) {
+ if (Arrays.stream(sql.split(QUOTED_STRING_OR_SEMICOLON))
+ .mapToInt(part -> part.split(";", -1).length - 1)
+ .sum() > 1
+ ) {
cf.completeExceptionall... | [DdlDmlRequestValidators->[validateExecuteStatementRequest->[KsqlClientException,indexOf,lastIndexOf,contains,completeExceptionally]]] | Checks if the given sequence number is valid for the given execute statement request. | nit: improve readability by pulling this logic out into a method called `containsMultipleStatements(sql)` (or similar). |
@@ -856,8 +856,8 @@ ds_cont_local_open(uuid_t pool_uuid, uuid_t cont_hdl_uuid, uuid_t cont_uuid,
rc = dtx_batched_commit_register(hdl);
if (rc != 0) {
D_ERROR("Failed to register the container "DF_UUID
- " to the DTX batched commit list: rc = %d\n",
- DP_UUID(cont_uuid), rc);
+ " to the DTX batched c... | [No CFG could be retrieved] | END of function dtx_resync find the nih object in the DSS. | (style) line over 80 characters |
@@ -5,6 +5,8 @@ from unittest import mock
from measurement.measures import Weight
from prices import Money, fixed_discount
+from saleor.core.prices import quantize_price
+
from ...core.notify_events import NotifyEventType
from ...discount import DiscountValueType
from ...order import notifications
| [test_send_confirmation_emails_without_addresses_for_order->[assert_called_once_with,create,get_customer_email,save,get_default_order_payload,add_variant_to_order,send_order_confirmation,count],test_send_email_order_refunded_by_app->[assert_called_once_with,get_customer_email,get_plugins_manager,get_default_order_paylo... | Test that get_custom_order_payload returns an order object with all the necessary data Order of tax and lines. | Let's use relative import as the rest of the imports |
@@ -57,7 +57,13 @@ class LayoutProvider(Model):
'''
- pass
+ @property
+ def node_coordinates(self):
+ return NodeCoordinates(layout= self)
+
+ @property
+ def edge_coordinates(self):
+ return EdgeCoordinates(layout= self)
class StaticLayoutProvider(LayoutProvider):
'''
| [from_networkx->[real_from_networkx,deprecated],StaticLayoutProvider->[Dict,Seq,Either],getLogger] | Efficiently assign a class to a node index in the cartesian space. | Whitespace after `=` should be removed. |
@@ -44,12 +44,10 @@ class ItemNormalizerTest extends \PHPUnit_Framework_TestCase
$contextBuilderProphecy = $this->prophesize(ContextBuilderInterface::class);
$resourceClassResolverProphecy->getResourceClass(['dummy'], 'Dummy')->willReturn(Dummy::class);
$propertyNameCollectionFactoryProphecy-... | [ItemNormalizerTest->[testSupportNormalization->[assertTrue,setDescription,assertFalse,prophesize,supportsNormalization,reveal,shouldBeCalled],testNormalize->[normalize,setSerializer,assertEquals,willReturn,willImplement,prophesize,setName,reveal,shouldBeCalled],testDontSupportDenormalization->[reveal,willReturn,prophe... | This method checks if the prophesize method does not support normalizer. This method prophesizes all items in the collection. | why did you drop this test? |
@@ -13,10 +13,13 @@ import (
type KID []byte
type KID2 []byte
+type KIDMapKey string
+type AlgoType int
+
type GenericKey interface {
GetKid() KID
GetFingerprintP() *PgpFingerprint
- GetAlgoType() int
+ GetAlgoType() AlgoType
SignToString([]byte) (string, *SigId, error)
Verify(string, []byte) (*SigId, erro... | [ToStrings->[String],EqKid->[Eq],MatchQuery->[ToShortIdString,String],Eq->[Eq],ToJsonw->[String],String->[String],MatchQuery] | libc - base64 - > string ToJsonw - returns a jsonw. Wrapper that wraps the given KID. | Great idea, also update `ComputedKeyInfos` to use this too. |
@@ -548,6 +548,18 @@ var managedResourcesShoot = sets.NewString(
metricsserver.ManagedResourceName,
)
+var managedResourcesSeed = sets.NewString(
+ etcd.Druid,
+ seedadmissioncontroller.Name,
+ common.ManagedResourceDependencyWatchdogEndpoint,
+ common.ManagedResourceDependencyWatchdogProbe,
+)
+
+var deploymentsS... | [CheckControlPlane->[checkRequiredDeployments,checkRequiredEtcds,checkDeployments,checkEtcds],CheckLoggingControlPlane->[checkRequiredStatefulSets,checkStatefulSets],CheckClusterNodes->[FailedCondition,checkNodes],CheckMonitoringControlPlane->[checkRequiredDeployments,checkRequiredStatefulSets,checkDeployments,checkSta... | makeHealthChecksLister returns a object that can be used to list and manage a health check onceBody returns a list of statesets that have a unique id. | There are more, why didn't you add them? `global-network-policies` `cluster-identity` `cluster-autoscaler` ... |
@@ -1166,6 +1166,12 @@ abstract class WPCOM_JSON_API_Endpoint {
if ( defined( 'IS_WPCOM' ) && IS_WPCOM && ! $is_jetpack ) {
$active_blog = get_active_blog_for_user( $ID );
$site_id = $active_blog->blog_id;
+ if ( $site_id > -1 ) {
+ $site_visible = (
+ -1 != $active_blog->public ||
+ ... | [No CFG could be retrieved] | Get the current blog ID. Get a single user object from the database. | Just a note that this function is not defined in Jetpack, but it is within the `IS_WPCOM` check. Text editors will not be happy, but it won't actually cause any errors. |
@@ -1119,7 +1119,7 @@ public class BigtableIO {
static void validateTableExists(BigtableConfig config, PipelineOptions options) {
if (config.getValidate()) {
- String tableId = config.getTableId();
+ String tableId = config.getTableId().get();
try {
checkArgument(
config.g... | [BigtableIO->[BigtableReader->[getFractionConsumed->[getFractionConsumed],getSplitPointsConsumed->[getSplitPointsConsumed],start->[start,createReader,makeByteKey],close->[close],advance->[makeByteKey,advance],splitAtFraction->[getRange,withStartKey,withEndKey],getRange],Write->[withProjectId->[build,getBigtableConfig],... | Checks whether the table exists in BigQuery. | Does it make sense to skip validation if any of the value providers are inaccessible? Otherwise users will always need to write withTable(myValueProvider).withoutValidation(); |
@@ -117,9 +117,11 @@ func (cs *ContainerService) setOrchestratorDefaults(isUpgrade, isScale bool) {
return
}
o := a.OrchestratorProfile
- o.OrchestratorVersion = common.GetValidPatchVersion(
- o.OrchestratorType,
- o.OrchestratorVersion, isUpdate, a.HasWindows())
+ if o.OrchestratorVersion == "" {
+ o.Orchest... | [SetPropertiesDefaults->[setLoadBalancerSkuDefaults]] | setOrchestratorDefaults sets the default values for the Orchestrator profile and the default This function is called to set the default values for all configuration options. This function is used to set the default values for all configuration options. | would this cause issue later if the existing version is not supported? Shouldn't we error out before calling this? |
@@ -332,11 +332,13 @@ void ERR_unload_strings(int lib, ERR_STRING_DATA *str)
}
}
CRYPTO_THREAD_unlock(err_string_lock);
+
+ return 1;
}
void err_free_strings_int(void)
{
- CRYPTO_THREAD_run_once(&err_string_init, do_err_strings_init);
+ RUN_ONCE(&err_string_init, do_err_strings_init);
... | [No CFG could be retrieved] | region System. Error - - - - - - - - - - - - - - - - - -. | Just return on error? |
@@ -246,8 +246,8 @@ class Grouping < ActiveRecord::Base
if user.has_accepted_grouping_for?(self.assignment_id) || user.hidden
nil
else
- member = StudentMembership.new(:user => user, :membership_status =>
- set_membership_status, :grouping => self)
+ member = StudentMembership.new(user: ... | [Grouping->[deletable_by?->[is_valid?],update_repository_permissions->[is_valid?],write_repo_permissions?->[repository_external_commits_only?],revoke_repository_permissions_for_membership->[write_repo_permissions?],remove_member->[membership_status],remove_rejected->[membership_status],assign_tas_by_csv->[add_tas_by_us... | Add a member to the group. | Align the elements of a hash literal if they span more than one line. |
@@ -0,0 +1,11 @@
+module UserSubscriptions
+ class SyncCounterCache
+ include Sidekiq::Worker
+
+ sidekiq_options queue: :default, retry: 10
+
+ def perform
+ UserSubscription.counter_culture_fix_counts only: %i[subscriber user_subscription_sourceable]
+ end
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | I see this triggered in the specs below but where in the production running code do we trigger this to run? |
@@ -203,10 +203,16 @@ func loadBranches(ctx *context.Context) []*Branch {
}
}
+ isMerged := false
+ if divergence.Ahead == 0 && divergence.Behind > 0 && ctx.Repo.Repository.DefaultBranch != branchName {
+ isMerged = true
+ }
+
branches[i] = &Branch{
Name: branchName,
Commit: ... | [CanWrite,Warn,CreateNewBranchFromCommit,PushUpdate,PathEscapeSegments,GetCommit,Redirect,AllowsPulls,DeleteBranch,GetBranchCommit,GetBranches,GetProtectedBranches,HTML,Error,GetErrMsg,NotFound,CanCreateBranch,LoadUser,LoadIssue,QueryInt64,GetDeletedBranchByID,JSON,HasError,Tr,ServerError,Contains,GetDeletedBranches,Cr... | GetProtectedBranches - returns a list of protected branches - returns nil if it s protected branch CreateBranch creates new branch in repository. | And I thought it again, maybe `divergence.Behind > 0` should be `divergence.Behind >= 0`? Consider a branch just merged to `master` and no new commits pushed to master. |
@@ -18,6 +18,12 @@
*/
#if defined(__STM32F1__) && !defined(HAVE_SW_SERIAL)
+#include "../../inc/MarlinConfig.h"
+#if HAS_TMC220x
+ #warning "Consider using SoftwareSerialM with HAVE_SW_SERIAL and appropriate SS_TIMER defined.
+ #error "Missing SoftwareSerial implementation"
+#endif
+
/**
* Empty class for Sof... | [No CFG could be retrieved] | Creates an empty which is a wrapper for the SoftwareSerial class. | missing the ending " |
@@ -267,6 +267,13 @@ public class JpaOperations {
bindParameters(jpaQuery, params);
return new PanacheQueryImpl(em, jpaQuery, findQuery, params);
}
+
+ @SuppressWarnings("rawtypes")
+ public static PanacheQuery<?> findAll(Class<?> entityClass, CriteriaQuery<?> criteriaQuery) {
+ ... | [JpaOperations->[streamAll->[stream],stream->[stream],findByIdOptional->[findById],update->[executeUpdate,update],executeUpdate->[paramCount,executeUpdate,createUpdateQuery,bindParameters],count->[count],exists->[count],setRollbackOnly->[setRollbackOnly],createCountQuery->[getEntityName],find->[find,bindParameters,getE... | Finds a entity by name and query. | I'm not sure if JPA objects should be part of the API, do you have an use case? |
@@ -100,10 +100,11 @@ public class PersistenceEntryStreamSupplier<K, V> implements AbstractLocalCacheS
});
Flowable<CacheEntry<K, V>> flowable = Flowable.fromPublisher(publisher)
.map(me -> (CacheEntry<K, V>) PersistenceUtil.convert(me, iceFactory));
- Iterable<CacheEntry<K, ... | [PersistenceEntryStreamSupplier->[buildStream->[tracef,filterKeySegments,getKey,stream,applyAsInt,convert,filter,iterator,contains,add,publishEntries,withFlags,spliterator,map],getLog,isTraceEnabled,lookupClass]] | Build a stream of entries from the cache. This method is called when the cache is not available. | I have to look closer, but this could explain a different issue we saw before. Good catch @pferraro |
@@ -37,14 +37,7 @@ import java.util.Set;
public class DoubleGreatestPostAggregator implements PostAggregator
{
- private static final Comparator COMPARATOR = new Comparator()
- {
- @Override
- public int compare(Object o, Object o1)
- {
- return ((Double) o).compareTo((Double) o1);
- }
- };
+ p... | [DoubleGreatestPostAggregator->[hashCode->[hashCode],getDependentFields->[getDependentFields],decorate->[DoubleGreatestPostAggregator],equals->[equals]]] | Compares two double values. | Please make the type of the field `Comparator<Number>`. Same in other similar places in this PR |
@@ -2167,11 +2167,8 @@ class Category(amo.models.OnChangeMixin, amo.models.ModelBase):
type = amo.ADDON_SLUGS[self.type]
except KeyError:
type = amo.ADDON_SLUGS[amo.ADDON_EXTENSION]
- if settings.MARKETPLACE and self.type == amo.ADDON_PERSONA:
- # TODO: Move Theme Re... | [Category->[flush_urls->[get_url_path]],AddonUser->[flush_urls->[flush_urls]],watch_disabled->[Addon],AddonManager->[valid_q->[q],top_free->[listed],top_paid->[listed],__init__->[__init__]],cleanup_upsell->[cleanup],Addon->[get_api_url->[get_url_path],__new__->[__new__],update_status->[logit],is_refunded->[get_purchase... | Returns the url path to the item. | this should just be removed, yes? it's for redirecting marketplace accesses of theme reviewer tools to AMO |
@@ -188,9 +188,9 @@ const ClientCommandFactory clientCommandFactoryTable[TOCLIENT_NUM_MSG_TYPES] =
null_command_factory, // 0x48
{ "TOCLIENT_HUDADD", 1, true }, // 0x49
{ "TOCLIENT_HUDRM", 1, true }, // 0x4a
- { "TOCLIENT_HUDCHANGE", 0, true }, // 0x4b
- { "TOCL... | [No CFG could be retrieved] | - - - - - - - - - - - - - - - - - - A list of all methods that can be accessed by the UI. | This is the change that fixes the linked issue. |
@@ -287,7 +287,7 @@ module Engine
"sym": "CS",
"value": 40,
"revenue": 10,
- "desc": "A corporation owning the CS may lay a tile on the CS's hex even if this hex is not connected to the corporations's railhead. This free tile placement is in addition to the corporation's normal tile placement.... | [No CFG could be retrieved] | Abilities for all special abilities. VersionInfo for a turn. | Since we're improving it "railhead" is never used elsewhere |
@@ -201,8 +201,10 @@ class TaskStatusManager(object):
if key in updatable_attributes:
task_status[key] = value
- TaskStatus.get_collection().save(task_status, safe=True)
- return task_status
+ task_status.save()
+ updated = TaskStatus.objects(task_id=task_id).... | [TaskStatusManager->[set_task_failed->[format_iso8601_datetime,utc_tz,update,now,get_collection],set_task_accepted->[update,get_collection],update_task_status->[items,MissingResource,get_collection],set_task_succeeded->[format_iso8601_datetime,utc_tz,update,now,get_collection],find_by_task_id->[get_collection],find_all... | Updates the status of the task with given task id. | I think this can be deleted entirely since a vanilla delete() will do the same thing. I don't understand why MissingResource would need to exist anymore. If something needs to be deleted and it already is deleted that is not an error. |
@@ -61,7 +61,7 @@ class KratosInternalAnalyzer( AnalyzerBaseClass ):
# response gradients
if communicator.isRequestingGradientOf(identifier):
response.CalculateGradient()
- communicator.reportGradient(identifier, response.GetShapeGradient())
+ com... | [KratosInternalAnalyzer->[FinalizeAfterOptimizationLoop->[Finalize,values],InitializeBeforeOptimizationLoop->[Initialize,values],__CreateResponseFunctions->[NameError,keys,response_settings,CreateResponseFunction,format,RuntimeError],AnalyzeDesignAndReportToCommunicator->[CalculateGradient,SetValue,reportGradient,isReq... | Analyzes the current design and reports it to the communicator. | What is the motivation to set the variable explicitly here? Isn't it more general if the variable that contains the sensitivity is not explicity set by the analyzer? |
@@ -210,8 +210,10 @@ func (o *TriggersOptions) Complete(f *clientcmd.Factory, cmd *cobra.Command, arg
Flatten()
output := kcmdutil.GetFlagString(cmd, "output")
- if len(output) != 0 {
- o.PrintObject = func(obj runtime.Object) error { return f.PrintObject(cmd, mapper, obj, o.Out) }
+ if len(output) > 0 {
+ o.P... | [Validate->[Errorf,count],Apply->[Join,Difference,DeepEqual,List,Insert,Errorf,NewString,HasAll],printTriggers->[NewWriter,Flush,Join,Fprintf,Sprintf],Complete->[NameString,ParseDockerImageReference,ContinueOnError,ClientMapperFunc,GetFlagString,ResourceTypeOrNameArgs,Errorf,count,DefaultNamespace,FilenameParam,Lookup,... | Complete completes the triggers options Filters objects that are not explicitly specified by the user. | I was not sure if there was a better way of approaching this, although this command has a function `printObjects` for cases where no `-o` option is specified, it still did not handle every outputFormat, such as `wide` without this update |
@@ -562,7 +562,8 @@ func (rm *resmon) Invoke(ctx context.Context, req *pulumirpc.InvokeRequest) (*pu
args, err := plugin.UnmarshalProperties(
req.GetArgs(), plugin.MarshalOptions{
- Label: label,
+ Label: label,
+ // RejectUnknowns: true // should we just fail fast here if we see unknowns?
Ke... | [ReadResource->[getDefaultProviderRef],handleRequest->[newRegisterDefaultProviderEvent],StreamInvoke->[StreamInvoke],Invoke->[Invoke],serve->[handleRequest],getDefaultProviderRef,serve] | Invoke invokes the resource identified by the given request. onfails is a callback that returns a nil response if the call fails. | I'd expect to reject unknowns here but I don't have a holistic picture of this option, unfortunately |
@@ -63,6 +63,16 @@ class Route
return $this->name;
}
+ public function updatePath(string $newPath): void
+ {
+ $this->path = $newPath;
+ }
+
+ public function getPath(): string
+ {
+ return $this->path;
+ }
+
public function addOption(string $key, $value): self
... | [No CFG could be retrieved] | Returns the name of the node. | Since it is also called `setParent` I would go with `setPath` as well, wouldn't you? |
@@ -593,6 +593,14 @@ def json_progress_bars(json=False):
def stdout_json_success(success=True, **kwargs):
result = {'success': success}
+
+ # this code reverts json output for plan back to previous behavior
+ # relied on by Anaconda Navigator and nb_conda
+ if 'LINK' in kwargs:
+ kwargs['LINK'... | [json_progress_bars->[json_progress_bars],create_prefix_spec_map_with_deps->[prefix_if_in_private_env],stdout_json_success->[stdout_json],prefix_if_in_private_env->[get_private_envs_json],pkg_if_in_private_env->[get_private_envs_json],NullCountAction->[__call__->[_ensure_value]],Completer->[__iter__->[get_items]],spec_... | Print a JSON representation of the node ID in the terminal. | here we're converting a `Dist` object back to a `str`, as it was in 4.2. |
@@ -92,11 +92,8 @@ public class TestOzoneFsHAURLs {
final String path = GenericTestUtils.getTempPath(omId);
java.nio.file.Path metaDirPath = java.nio.file.Paths.get(path, "om-meta");
conf.set(HddsConfigKeys.OZONE_METADATA_DIRS, metaDirPath.toString());
- conf.set(ScmConfigKeys.OZONE_SCM_CLIENT_ADDRESS... | [TestOzoneFsHAURLs->[shutdown->[shutdown],testWithQualifiedDefaultFS->[getHostFromAddress,getLeaderOMNodeAddr,getPortFromAddress],testOtherDefaultFS->[testWithDefaultFS]]] | Initialize the Ozone. Get a volume by name and create a bucket with a random number of random integers. | NIT: Can we move this to single line |
@@ -36,13 +36,15 @@ class CloudEvent(EventMixin): #pylint:disable=too-many-instance-attributes
"""Properties of an event published to an Event Grid topic using the CloudEvent 1.0 Schema.
All required parameters must be populated in order to send to Azure.
+ If data is of binary type, data_base64 can be... | [EventGridEvent->[__init__->[setdefault,super,uuid4,now]],EventMixin->[_from_json->[decode,loads,isinstance]],CustomEvent->[_update->[dict],__init__->[_update]],CloudEvent->[_from_generated->[dict,setdefault,cls,deserialize],_to_generated->[InternalCloudEvent,isinstance],__init__->[dict,uuid4,pop,update,str,now]]] | Creates a new CloudEvent object from a JSON object. The id and source must be unique for each distinct event. | as OOB discussion: we could add a note saying that `if data is of bytes type, we'll send it as data_base64 in the outgoing request.` By this we add clarity on what users should expect on the data of outgoing request e.g. request.get("data") is None, request.get("data_base64") has value. |
@@ -97,9 +97,9 @@ func (s *StacktraceFrame) applySourcemap(mapper sourcemap.Mapper, service Servic
sourcemapId := s.buildSourcemapId(service)
mapping, err := mapper.Apply(sourcemapId, s.Lineno, *s.Colno)
if err != nil {
- logp.Err(fmt.Sprintf("failed to apply sourcemap %s", err.Error()))
- e, issourcemapError :... | [buildSourcemapId->[CleanUrlPath],updateError->[Err,updateSmap],Transform->[setLibraryFrame,NewMapStrEnhancer,Add,setExcludeFromGrouping],setLibraryFrame->[MatchString],applySourcemap->[buildSourcemapId,updateError,Error,Sprintf,Apply,Err,updateSmap],setExcludeFromGrouping->[MatchString]] | applySourcemap applies the given sourcemap to the given service and returns the function that was. | what do you think about adding a `var logger = logp.NewLogger("stacktrace")` as a global near the top of the file here instead? similar to how we do in python |
@@ -1484,13 +1484,13 @@ RtpsUdpDataLink::RtpsReader::process_data_i(const RTPS::DataSubmessage& data,
} else if (writer->recvd_.contains(seq)) {
if (Transport_debug_level > 5) {
- GuidConverter writer(src);
- GuidConverter reader(id_);
+ GuidConverter wc(src);
+ GuidConverter r... | [No CFG could be retrieved] | DeliverHeldData - Deliver data from a channel to the channel. - - - - - - - - - - - - - - - - - -. | Could use `LogGuid` |
@@ -130,6 +130,18 @@ class InstallRequirement(object):
self.isolated = isolated
self.build_env = NoOpBuildEnvironment()
+ # pyproject.toml handling
+ self._pyproject_toml_loaded = False
+ self._pyproject_requires = None
+ self._pyproject_backend = None
+
+ # Are we... | [parse_editable->[_strip_extras],InstallRequirement->[from_path->[from_path],from_line->[_strip_extras],get_dist->[egg_info_path],install->[install_editable,prepend_root,move_wheel_files],uninstall->[check_if_exists],_correct_build_location->[build_location],move_wheel_files->[move_wheel_files],run_egg_info->[_correct_... | Initialize a new requirement object. Initialize a class. | It feels a little weird to me though really this is probably the best way to treat the 3-state situation here. |
@@ -91,8 +91,14 @@ class RawEDF(BaseRaw):
@verbose
def __init__(self, input_fname, montage, eog=None, misc=None,
- stim_channel=-1, annot=None, annotmap=None, exclude=(),
+ stim_channel=True, annot=None, annotmap=None, exclude=(),
preload=False, verbose=None... | [_get_info->[_update_redundant,all,any,max,where,warn,join,info,enumerate,RuntimeError,n_samps,_empty_info,int,min,_read_edf_header,zeros,range,list,append,logical_or,_check_stim_channel,len,isinstance,zip,float,isfinite,splitext,upper,NotImplementedError,logical_and,ones,_read_gdf_header,array],_check_stim_channel->[,... | Initialize the raw EDF object from a file. | The GDF event reading wasn't working in the last release anyway (fix within cycle), so I thought it's useless to make it -1 for 0.15. |
@@ -38,6 +38,17 @@ public class ExpiryTest extends MultiHotRodServersTest {
TestingUtil.replaceComponent(cacheManagers.get(0), TimeService.class, timeService, true);
}
+ @AfterMethod
+ public void after() {
+ try {
+ // https://bugzilla.redhat.com/show_bug.cgi?id=1279757
+ // https... | [ExpiryTest->[testGlobalExpiryPutAll->[expectExpiryAfterRequest],testGlobalExpiryPutAllWithFlag->[withFlags,expectExpiryAfterRequest],testGlobalExpiryReplace->[put,expectExpiryAfterRequest],createCacheManagers->[lifespan,replaceComponent,get,createHotRodServers,ControlledTimeService,hotRodCacheConfiguration,getDefaultC... | Create the hot - rood cache managers. | Maybe it would be better to add this to "throws" on method signature level? |
@@ -184,7 +184,7 @@ func New(cfg Config, clientConfig ingester_client.Config, limits *validation.Ove
replicationFactor.Set(float64(ingestersRing.ReplicationFactor()))
cfg.PoolConfig.RemoteTimeout = cfg.RemoteTimeout
- replicas, err := newClusterTracker(cfg.HATrackerConfig)
+ replicas, err := newClusterTracker(cfg... | [AllUserStats->[AllUserStats],MetricsForLabelMatchers->[forAllIngesters,MetricsForLabelMatchers],Push->[tokenForLabels,validateSeries,tokenForMetadata,checkSample],UserStats->[forAllIngesters,UserStats],Validate->[Validate],MetricsMetadata->[forAllIngesters,MetricsMetadata],LabelNames->[forAllIngesters,LabelNames],Regi... | New creates a new distributor instance. NewLifecycler creates a new instance of the lifecycler. | Why don't we pass the registerer here? |
@@ -858,6 +858,8 @@ class BigQueryBatchFileLoads(beam.PTransform):
of the load jobs would fail but not other. If any of them fails, then
copy jobs are not triggered.
"""
+ singleton_pc = p | "ImpulseLoadData" >> beam.Create([None])
+
# Load data using temp tables
trigger_loads_outp... | [WriteRecordsToFile->[process->[_make_new_file_writer]],BigQueryBatchFileLoads->[_write_files_with_auto_sharding->[_maybe_apply_user_trigger,WriteGroupedRecordsToFile],_write_files->[_maybe_apply_user_trigger,_ShardDestinations,WriteGroupedRecordsToFile],expand->[_write_files,_generate_job_name,_write_files_with_auto_s... | Load data to BigQuery. Trigger copy and load jobs. This function returns the destination load and copy job IDs for all the temp tables in the beam. | Would this break the improvement made in #13601 ? I can't tell when streaming pipelines can or cannot use FILE_LOADS. |
@@ -257,6 +257,9 @@ public class ContentManager {
// if a source has been DETACHED and we attach it again -> it gets back to original state (BUILT)
src.setState(BUILT);
}
+ project.removeSource(src);
+ project.addSource(src, position);
+ Co... | [ContentManager->[listProjects->[listProjects],lookupProjectSource->[lookupProjectSource]]] | This method is used to attach a source to a project. | When `position` is empty, it'll "move" the source to the 1st position. Is that the intention here? |
@@ -202,7 +202,7 @@ public class HoodieTableMetaClient implements Serializable {
/**
* Returns Marker folder path.
- *
+ *
* @param instantTs Instant Timestamp
* @return
*/
| [HoodieTableMetaClient->[initializeBootstrapDirsIfNotExists->[getHadoopConf,initializeBootstrapDirsIfNotExists,getFs],equals->[equals],getFs->[getFs],getMarkerFolderPath->[getTempFolderPath],getArchivePath->[getMetaPath],initTableType->[initTableType],getCommitTimeline->[getTableType,getCommitTimeline],reload->[HoodieT... | Returns the folder path where the marker files are stored. | unnecessary change, please revert? |
@@ -174,12 +174,10 @@ func (d *Dispatcher) deleteFilesIteratively(m *object.FileManager, ds *object.Da
return d.deleteVMFSFiles(m, ds, dsPath)
}
-func (d *Dispatcher) deleteVMFSFiles(m *object.FileManager, ds *object.Datastore, dsPath string) error {
+func (d *Dispatcher) deleteVMFSFiles(m *object.DatastoreFileMan... | [deleteVolumeStoreIfForced->[deleteDatastoreFiles],getSortedChildren->[getChildren]] | deleteFilesIteratively deletes all files in the given folder and all its children recursively. | Is the retry on certain failures on needed here? |
@@ -644,7 +644,15 @@ public class KubernetesClusterManagerImpl extends ManagerBase implements Kuberne
return response;
}
+ private void validateEndpointUrl() {
+ String csUrl = ApiServiceConfiguration.ApiServletPath.value();
+ if (csUrl == null || csUrl.contains("localhost")) {
+ ... | [KubernetesClusterManagerImpl->[getKubernetesClusterConfig->[logAndThrow],logAndThrow->[logTransitStateAndThrow],upgradeKubernetesCluster->[validateKubernetesClusterUpgradeParameters,logAndThrow],createKubernetesCluster->[validateKubernetesClusterCreateParameters,getKubernetesClusterNetworkIfMissing,getKubernetesServic... | This method returns a KubernetesClusterResponse with all the information in the specified cluster. Method to retrieve the details of a managed cluster. Get the service offering ID. This method checks if the given Kubernetes version is available for the given zone and if so checks Checks if the given service offering ID... | You may want to fix the typo? |
@@ -1462,3 +1462,5 @@ describe Assignment do
end
end
end
+
+
| [round,create,let,accepted_grouping_for,have_many,through,it,to,select,get_current_assignment,update_results_stats,each,marking_state,puts,context,clone_groupings_from,reload,and_return,be,match_array,to_csv,where,should,map,save!,today,drop,groupings,get_latest_result,due_date,id,once,not_to,save,class_name,new,add_cs... | end of Sequence. | Layout/TrailingBlankLines: 2 trailing blank lines detected. |
@@ -1,14 +1,6 @@
from typing import Dict
-from graphql.error import GraphQLError
-
-LACK_OF_CHANNEL_IN_FILTERING_MSG = (
- "You must provide a `channel` filter parameter to properly filter data."
-)
-
def get_channel_slug_from_filter_data(filter_data: Dict):
- channel_slug = filter_data.get("channel", None)... | [get_channel_slug_from_filter_data->[GraphQLError,get]] | Get the channel slug from filter data. | Are you sure about this? I mean, this can return literal string 'None' that will be used for filtering and `get_channel_slug_from_filter_data` is for ex. called in `filter_attributes_by_product_types` - this calls `product_qs = Product.objects.visible_to_user(requestor, channel_slug)` and that `is_visble_to_user` perfo... |
@@ -69,13 +69,13 @@ import org.apache.beam.sdk.values.KV;
@Experimental(Kind.FILESYSTEM)
public class FileSystems {
- public static final String DEFAULT_SCHEME = "default";
+ public static final String DEFAULT_SCHEME = "file";
private static final Pattern FILE_SCHEME_PATTERN =
Pattern.compile("(?<scheme... | [FileSystems->[matchResources->[match],copy->[copy],matchSingleFileSpec->[match],create->[create],matchNewResource->[matchNewResource],filterMissingFiles->[matchResources],delete->[delete],match->[match],rename->[rename],open->[open],verifySchemesAreUnique->[create]]] | Package private for testing purposes. This function checks if the resource id of a resource match result is correct. | Replace other usages of `"file"` with DEFAULT_SCHEME. |
@@ -30,6 +30,7 @@ define([
* @param {Property} [options.width=1.0] A numeric Property specifying the width in pixels.
* @param {Property} [options.show=true] A boolean Property specifying the visibility of the polyline.
* @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying t... | [No CFG could be retrieved] | Constructs a new instance of the PolylineGraphics class. followSurface - This method is called when a surface is following a surface. | We usually just do `[options.depthFailMaterial]` instead of `[options.depthFailMaterial=undefinded]` |
@@ -763,9 +763,12 @@ foreach ($ports as $port) {
}
}//end if
- // We don't care about statistics for skipped selective polling ports
if (!empty($port['skipped'])) {
- echo " $port_id skipped.";
+ // We don't care about statistics for skipped selective pollin... | [addDataset] | Parse description of the national network network network network network network network network network network network network Check if a given port is updated or not. | You could make this a d_echo() so it is only output when debug is enabled. |
@@ -168,7 +168,7 @@ func (e *DeviceKeygen) Push(ctx *Context, pargs *DeviceKeygenPushArgs) error {
ds = e.appendEncKey(ds, ctx, encSigner, eldestKID, pargs.User)
- var pukSigProducer libkb.AggSigProducer = nil
+ var pukSigProducer libkb.AggSigProducer // = nil
// PerUserKey does not use Delegator.
if e.G().... | [appendEldest->[Push],pushLKS->[generateClientHalfRecovery],Push->[EncryptionKey],appendSibkey->[Push],preparePerUserKeyBoxFromPaperkey->[EncryptionKey],appendEncKey->[Push]] | Push encrypts the new per - user key and appends it to the device s signing key This function is called when a sign - in request is received. | linter complained about this line |
@@ -74,7 +74,14 @@ class TwoFactorOptionsPresenter
def backup_code_option
policy = TwoFactorAuthentication::BackupCodePolicy.new(current_user)
- return [TwoFactorAuthentication::BackupCodeSelectionPresenter.new] if policy.available?
- []
+ if available_and_not_enabled?(policy)
+ [TwoFactorAuthen... | [TwoFactorOptionsPresenter->[no_factors_enabled?->[no_factors_enabled?]]] | Returns an array of backup code options that can be used to select a backup code. | `availabe_and_not_enabled?` should probably be a method on the policy |
@@ -3175,7 +3175,7 @@ func TestDefaultEnablePodSecurityPolicy(t *testing.T) {
MasterProfile: &MasterProfile{},
},
},
- expected: true,
+ expected: false,
},
{
name: "default",
| [EqualError,PutUint32,setTelemetryProfileDefaults,DeepEqual,Activate,NewStringResponse,Diff,HasMultipleNodes,IsManagedDisks,setOrchestratorDefaults,SetCustomCloudProfileEnvironment,BoolPtr,Error,RegisterResponder,New,Errorf,HasAvailabilityZones,Logf,Bool,IsVirtualMachineScaleSets,setAgentProfileDefaults,To4,setKubeletC... | TestDefaultEnablePodSecurityPolicy returns a Kubernetes config with the default orchestrator config. TestDefaultLoadBalancerSKU tests that the specified container service has the expected . | these UT changes reflect that `EnablePodSecurityPolicy` is now functionally deprecated |
@@ -26,6 +26,10 @@ class ScalaFmt(RewriteBase):
super(ScalaFmt, cls).register_options(register)
register('--configuration', advanced=True, type=file_option, fingerprint=True,
help='Path to scalafmt config file, if not specified default scalafmt config used')
+ register('--output-dir', advanc... | [ScalaFmtCheckFormat->[process_result->[format,TaskError]],ScalaFmtFormat->[process_result->[TaskError]],ScalaFmt->[invoke_tool->[list,extend,tool_classpath,get_options,join,runjava],implementation_version->[super],register_options->[register,register_jvm_tool,super,JarDependency]]] | Register scalafmt options. | While this will work for either subclass, this option only makes sense for the `ScalaFmtFormat` and `ScalaFixFix` subclasses, which actually rewrite things (and are the tasks installed in `fmt`). So a few semi-orthogonal things: 1. I think that you could make registering the option conditional on `sideeffecting = True`... |
@@ -210,9 +210,6 @@ func NewKubeletServer() *KubeletServer {
RootDirectory: defaultRootDir,
SyncFrequency: 10 * time.Second,
SystemContainer: "",
- ReconcileCIDR: true,
- KubeApiQps: 5.0,
- KubeApiBurst: 10,
}
}
| [Run->[UnsecuredKubeletConfig],createClientConfig->[authPathClientConfig,kubeconfigClientConfig],CreateAPIServerClientConfig->[createClientConfig],Run] | AddFlags adds flags related to kubelet to the specified FlagSet The flags passed to the command line interface are used to specify the options for the command line IPC namespace. The number of old containers to retain some disk space. | @clayton came from here, likely a gofmt thing? maybe? seems like a useless change. |
@@ -34,11 +34,12 @@ import threading
from apache_beam.metrics.cells import CounterCell, DistributionCell
+__all__ = [
+ 'MetricKey', 'MetricResult', 'MetricsEnvironment', 'MetricsContainer']
-class MetricKey(object):
- """
- Key used to identify instance of metric cell.
+class MetricKey(object):
+ """Key... | [ScopedMetricsContainer->[__exit__->[exit],__enter__->[enter],__init__->[container_stack]],_MetricsEnvironment->[container_stack->[set_container_stack],set_current_container->[set_container_stack],unset_current_container->[set_container_stack],current_container->[set_container_stack],set_metrics_supported->[set_contain... | Initializes the object with the given parameters. | Should these all be public? Likely not any of them? |
@@ -133,12 +133,10 @@ class UpgradeManager:
Upgrade procedure:
+ - Delete corrupted databases.
- Copy the old file to the latest version (e.g. copy version v16 as v18).
- In a transaction: Run every migration. Each migration must decide whether
to proceed or not.
- - If a single migratio... | [_run_upgrade_func->[update_version],UpgradeManager->[run->[get_db_version,_run_upgrade_func,_copy,get_file_lock,update_version,_backup_old_db]],UpgradeRecord] | Initialize a new object. | Just a note, another solution to the bug I introduced in the other PR, would be to instead of returning the `highest` version among the `.db`s, one can return the `previous` version, as the one `db` with a version that is lower then the current `RAIDEN_DB_VERSION` (this is the old behavior). I have not done this becaus... |
@@ -56,13 +56,13 @@ public interface AlertCondition {
Map<String, Object> getParameters();
- Integer getBacklog();
+ Integer getBacklogSize();
int getGrace();
String getTypeString();
- public interface CheckResult {
+ interface CheckResult {
boolean isTriggered();
... | [No CFG could be retrieved] | getParameters - Get the parameters of a single alert. | This is a breaking change which affects all existing alarm callbacks (and there are actually some plugins providing those), so I would not rename that method in the Graylog 1.x version line. |
@@ -825,7 +825,7 @@ func (h *Handler) GetEmptyRegion() ([]*core.RegionInfo, error) {
// ResetTS resets the ts with specified tso.
func (h *Handler) ResetTS(ts uint64) error {
- tsoAllocator := h.s.tsoAllocator
+ tsoAllocator, _ := h.s.tsoAllocatorManager.GetAllocator("global")
if tsoAllocator == nil {
return E... | [AddLabelScheduler->[AddScheduler],AddRandomMergeScheduler->[AddScheduler],GetHistory->[GetOperatorController,GetHistory],GetOperatorsOfKind->[GetOperators],GetSchedulerConfigHandler->[GetRaftCluster],GetHotReadRegions->[GetRaftCluster,GetHotReadRegions],GetHotBytesReadStores->[GetRaftCluster],AddAddPeerOperator->[GetO... | ResetTS resets the current TSO timestamp. | Why omit this error? |
@@ -304,7 +304,8 @@ export class SubscriptionService {
this.pageConfig_.getProductId(),
'Product id is null'
));
- this.platformStore_ = new PlatformStore(serviceIds);
+ this.platformStore_ = new PlatformStore(serviceIds,
+ this.platformConfig_['score']);
// TODO: Implement view... | [No CFG could be retrieved] | Delegates authentication to viewer Verify that the user has access to the given token. | Few lines here are clear duplicates of non-delegated case. See if you can factor it out. |
@@ -3,8 +3,11 @@ class RegistrationsController < Devise::RegistrationsController
def new
if user_signed_in?
- redirect_to dashboard_path
+ redirect_to root_path(signin: "true")
else
+ if URI(request.referer || "").host == URI(request.base_url).host
+ store_location_for(:user, reques... | [RegistrationsController->[new->[user_signed_in?,redirect_to],prepend_before_action]] | if the user is not logged in and there is a nag with this id redirect to. | Makes use of Devise's `store_location_for` to redirect the users back using the referer (if valid) |
@@ -621,8 +621,12 @@ prepare_segments(struct agg_merge_window *mw)
* segments (at most mw_lgc_cnt) and truncated segments (at most
* mw_phy_cnt).
*/
- D_ASSERT(mw->mw_lgc_cnt > 0);
+ D_ASSERT(mw->mw_lgc_cnt > 0 || mw->mw_rmv_cnt > 0);
D_ASSERT(mw->mw_phy_cnt > 0);
+ io->ic_seg_cnt = 0;
+ if (mw->mw_lgc_cnt =... | [No CFG could be retrieved] | return the first non - null object Generate coalesced segments according to visible logical entries. | Seems current code doesn't guarantee this now, what if a window has delete records only? And I see D_ASSERT(mw->mw_phy_cnt > 0) in other places of window flush code path. |
@@ -32,9 +32,6 @@ class PyIpython(PythonPackage):
depends_on('py-decorator', type=('build', 'run'))
depends_on('py-pexpect', type=('build', 'run'))
depends_on('py-backcall', type=('build', 'run'), when="^python@3.3:")
-
- depends_on('py-appnope', t... | [PyIpython->[int,depends_on,mac_ver,conflicts,version]] | Adds dependencies for all build - specific build - specific types. | I don't think this works, right? You can't use a `when=` that evaluates to True or False, it has to be a string, right? |
@@ -2792,6 +2792,12 @@ export default {
// Use the new stream or null if we failed to obtain it.
return useStream(tracks.find(track => track.getType() === mediaType) || null)
.then(() => {
+ ... | [No CFG could be retrieved] | check for new device and if video is not currently available and if audio or video is currently Determines whether or not the audio button should be enabled. | IMHO this seems a little bit dirty. Do you think we'll need this workaround permanently or you plan to remove it relatively soon? If we plan to remove it relatively soon I guess it is fine! Maybe another way to implement it is to store a flag which indicates if the default device is selected or not somewhere in the red... |
@@ -122,7 +122,12 @@ public class MixedAttribute implements Attribute {
@Override
public void addContent(ByteBuf buffer, boolean last) throws IOException {
if (attribute instanceof MemoryAttribute) {
- checkSize(attribute.length() + buffer.readableBytes());
+ try {
+ ... | [MixedAttribute->[duplicate->[duplicate],equals->[equals],getName->[getName],hashCode->[hashCode],retain->[retain],get->[get],retainedDuplicate->[retainedDuplicate],definedLength->[definedLength],copy->[copy],isCompleted->[isCompleted],compareTo->[compareTo],renameTo->[renameTo],replace->[replace],content->[content],ge... | Add content to the attribute. | Looks like `diskAttribute.addContent()` may throw below in which case we may not release the `buffer`. I would suggest put a `try-catch(Exception)` in these methods before we assign `buffer` to an instance variable. This will make sure we release for any unexpected errors. |
@@ -237,6 +237,7 @@ class Openmpi(AutotoolsPackage):
description='Enable MPI_THREAD_MULTIPLE support')
variant('cuda', default=False, description='Enable CUDA support')
variant('pmi', default=False, description='Enable PMI support')
+ variant('cxx', default=False, description='Enable C++ MPI b... | [Openmpi->[with_or_without_tm->[_tm_dir],with_or_without_verbs->[_verbs_dir],with_or_without_mxm->[_mxm_dir]]] | Patch Nagios to support a specific nagios object. Creates a new object. | These two options seem related (i.e. I would expect C++ exception support is there only if C++ bindings are there). Can you double check that and eventually merge the two into a multi-valued variant? |
@@ -71,9 +71,10 @@ public class BenchmarkInformationSchema
private final Map<String, String> queries = ImmutableMap.of(
"FULL_SCAN", "SELECT count(*) FROM information_schema.columns",
"LIKE_PREDICATE", "SELECT count(*) FROM information_schema.columns WHERE table_name LIKE 'tab... | [BenchmarkInformationSchema->[main->[BenchmarkData,setup,queryInformationSchema,tearDown]]] | Benchmarks a single column of a table. This is the main method that is called by the Hibernate query builder. | can you please share the results of `BenchmarkInformationSchema` before and after your changes? |
@@ -50,11 +50,9 @@ namespace Internal.Cryptography
hexOrder[j++] = ' ';
}
- uint digit = (uint)((sArray[i] & 0xf0) >> 4);
- hexOrder[j++] = s_hexValues[digit];
-
- digit = (uint)(sArray[i] & 0x0f);
- ... | [AsnFormatter->[EncodeHexString->[EncodeHexString]]] | EncodeHexString - Encode the hexadecimal value of the specified bytes. | Some unexpected spaces got inserted between the method name and the parentheses here. |
@@ -120,7 +120,7 @@ public class SqlPredicate {
CodeGenRunner codeGenRunner = new CodeGenRunner();
ExpressionMetadata
expressionEvaluator =
- codeGenRunner.buildCodeGenFromParseTree(filterExpression, schema);
+ codeGenRunner.buildCodeGenFromParseTree(filterExpression, schema, ksqlFuncti... | [SqlPredicate->[getStringKeyPredicate->[enforceFieldType,CodeGenRunner,getMessage,error,getUdfs,get,evaluate,buildCodeGenFromParseTree],getPredicate->[getWindowedKeyPredicate,getStringKeyPredicate],getWindowedKeyPredicate->[enforceFieldType,CodeGenRunner,getMessage,error,getUdfs,get,evaluate,buildCodeGenFromParseTree],... | This method returns a predicate that returns true if the key and row are windowed. | pass `KSqlFunctionRegistry` into constructor of `CodeGenRunner` ? |
@@ -338,3 +338,13 @@ def get_voucher_discount_for_order(order: Order) -> Money:
def match_orders_with_new_user(user: User) -> None:
Order.objects.confirmed().filter(user_email=user.email, user=None).update(user=user)
+
+
+def generate_invoice_pdf_for_order(invoice):
+ logo_path = static_finders.find("images/... | [restock_fulfillment_lines->[get_order_country],order_needs_automatic_fullfilment->[order_line_needs_automatic_fulfillment],update_order_prices->[recalculate_order],restock_order_lines->[get_order_country],add_variant_to_order->[get_order_country],get_voucher_discount_for_order->[get_products_voucher_discount_for_order... | Match orders with a new user. | What about people using custom media storage? |
@@ -50,7 +50,7 @@ class TestOpentelemetryWrapper:
with wrapped_span.span() as child:
assert child.span_instance.name == "span"
assert child.span_instance is tracer.get_current_span()
- assert child.span_instance.parent is wrapped_span.span_in... | [TestOpentelemetryWrapper->[test_no_span_passed_in_with_no_environ->[OpenTelemetrySpan,start_as_current_span,get_current_span],test_start_finish->[OpenTelemetrySpan,start_as_current_span,start,finish],test_change_context->[OpenTelemetrySpan,start_as_current_span,change_context,get_current_span],test_links_with_attribut... | Test that the span is not None. | parent is now always a span context since 0.7.1 |
@@ -1030,6 +1030,18 @@ func (server *Server) wireFrontendBackend(serverRoute *serverRoute, handler http
}
}
+ if len(serverRoute.replacePathRegex) > 0 {
+ log.Debug(serverRoute.replacePathRegex)
+ if sp := strings.SplitN(serverRoute.replacePathRegex, "$>", 2); len(sp) == 2 {
+ handler = &middlewares.ReplaceP... | [Stop->[Wait],stopLeadership->[Stop],prepareServer->[createTLSConfig],Close->[Stop,Close],loadConfig->[getRoundTripper,buildEntryPoints]] | wireFrontendBackend adds a handler to the frontend for the given route. | Could you remove debug logs? |
@@ -391,6 +391,9 @@ class TypeReplaceVisitor(SyntheticTypeVisitor[None]):
value_type.accept(self)
typ.fallback.accept(self)
+ def visit_raw_literal_type(self, t: RawLiteralType) -> None:
+ pass
+
def visit_literal_type(self, typ: LiteralType) -> None:
typ.fallback.accept(... | [NodeReplaceVisitor->[replace_statements->[fixup],process_type_info->[fixup_type,fixup],fixup_and_reset_typeinfo->[fixup],process_synthetic_type_info->[process_type_info]],fixup_var->[TypeReplaceVisitor],replacement_map_from_symbol_table->[replacement_map_from_symbol_table],TypeReplaceVisitor->[visit_instance->[fixup]]... | Visit a TypedDictType. | Maybe this should raise a runtime error, since we should never get here under normal conditions, right? |
@@ -274,7 +274,9 @@ class _VcfSource(filebasedsource.FileBasedSource):
try:
self._vcf_reader = vcf.Reader(fsock=self._create_generator())
except SyntaxError as e:
- raise ValueError('Invalid VCF header %s' % str(e))
+ raise ValueError('An exception was raised when reading header fro... | [_VcfSource->[_VcfRecordIterator->[_convert_to_variant_record->[Variant,VariantCall],next->[next],__init__->[read_records]]],ReadFromVcf->[__init__->[_VcfSource]]] | Initializes the object with the specified header lines and text. | Probably the error message should be reworded. With "Invalid ...:" somebody will expect to see the header after the colon not the exception. How about raise ValueError("An exception raised when reading header from VCF file %s: %s, self._file_name, traceback.format_exc(e))" ? |
@@ -601,7 +601,9 @@ $@"{nameof(UnregisterClassForTypeInternal)} arguments:
// LicenseContext
private readonly MethodInfo _setSavedLicenseKey;
+ [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.DefaultConstructor)]
private reado... | [LicenseInteropProxy->[GetLicInfo->[CreateInstance]],ComActivator->[LicenseClassFactory->[RequestLicKey->[RequestLicKey],CreateInstanceInner->[ValidateObjectIsMarshallableAsInterface,CreateAggregatedObject],GetLicInfo->[GetLicInfo]],GetClassFactoryForTypeInternal->[GetClassFactoryForType],Type->[IsLoggingEnabled,Log],B... | Creates a proxy object for the given license object. The CreateDesignContext method is called when the clrLicContext is created. | Can you help me understand what `DynamicallyAccessedMembers` indicates? Seems this is a field that is populated by reflection - I thought we had to annotate the members that were accessed by reflection. |
@@ -116,7 +116,7 @@ class ControlFlowGraph(object):
# NOTE: must sort the in_diff set for cases that get different cache var.
# FIXME(typhoonzero): maybe use a "sorted set" is better than this.
can_optimize = [
- x for x in sorted(list(in_diff))
+ x for x in in_diff
... | [memory_optimize->[memory_optimize,_get_cfgs],release_memory->[release_memory,_get_cfgs],ControlFlowGraph->[memory_optimize->[_update_graph,_fill_pool,_dataflow_analyze,compare_shape,_has_var,_find_var,_check_var_validity,_update_skip_opt_set],release_memory->[_get_diff,_dataflow_analyze,_check_var_validity,_update_ski... | Fill the pool with the missing cache for the i - th operation. | Why we must sort the vars here? |
@@ -145,7 +145,8 @@ static int i2d_x509_aux_internal(X509 *a, unsigned char **pp)
int length, tmplen;
unsigned char *start = pp != NULL ? *pp : NULL;
- OPENSSL_assert(pp == NULL || *pp != NULL);
+ if (!ossl_assert(pp == NULL || *pp != NULL))
+ return -1;
/*
* This might perturb *pp... | [No CFG could be retrieved] | Serialize a trusted X509 certificate to an AUX buffer. Serialize a trusted certificate to a buffer or just return the required buffer. | This seems to be redundant, because caller does all the checks. |
@@ -52,6 +52,11 @@ public class HashJoinSegmentStorageAdapter implements StorageAdapter
private final StorageAdapter baseAdapter;
private final List<JoinableClause> clauses;
+ // A reference to the last JoinFilterSplit created during a makeCursors call,
+ // saved and exposed so that tests can verify the filt... | [HashJoinSegmentStorageAdapter->[getMaxIngestedEventTime->[getMaxIngestedEventTime],makeCursors->[getAvailableDimensions,getAvailableMetrics,makeCursors],getColumnCapabilities->[getColumnCapabilities],getMaxTime->[getMaxTime],getColumnTypeName->[getColumnTypeName,getColumnCapabilities],getDimensionCardinality->[getDime... | Package private for testability. This method returns an unmodifiable collection of all available metrics. | Would you still need this if `JoinFilterAnalyzerTest` was created and had unit tests for `JoinFilterAnalyzer`? |
@@ -105,7 +105,8 @@ abstract class EnablementListView extends ListView<Item, Class<?>> {
if (getExtension() != null) {
BootstrapLogger.LOG.typeModifiedInAfterTypeDiscovery(getExtension(), c, REMOVE_OPERATION, getViewType());
}
- return getDelegate().removeAll(c);
+ // use im... | [EnablementListView->[retainAll->[retainAll,getExtension,getViewType],getPriority->[getPriority],EnablementListViewIterator->[next->[toView,next],previous->[previous,toView],set->[getPriority,getExtension,createSource,set,getViewType],remove->[getExtension,remove,getViewType],add->[createSource,getExtension,getViewType... | Remove all objects from the list. | Why don't you use `objectToItemIfNeeded()` here? |
@@ -380,7 +380,12 @@ class DataflowRunner(PipelineRunner):
# pylint: disable=wrong-import-order, wrong-import-position
from apache_beam import Flatten
if isinstance(transform_node.transform, Flatten):
- output_pcoll = transform_node.outputs[None]
+ from apache_beam.runners.p... | [_DataflowIterableAsMultimapSideInput->[__init__->[_side_input_data]],_DataflowIterableSideInput->[__init__->[_side_input_data]],DataflowRunner->[_get_encoded_output_coder->[_get_typehint_based_encoding],flatten_input_visitor->[FlattenInputVisitor],_add_singleton_step->[_get_side_input_encoding],run_Flatten->[_get_enco... | A visitor that replaces the element type for all input PCollections of a Flatten transform with. | If you want to use this, let's put it in a shared utils file. |
@@ -254,6 +254,14 @@ class ColumnDataSource(DataSource):
if len(lengths) > 1:
return str(self)
+
+class GeoJSONDataSource(DataSource):
+ geojson = JSON(help="""
+ GeoJSON that contains features for plotting. Currently GeoJSONDataSource can
+ only process a FeatureCollection or GeometryC... | [ColumnDataSource->[from_df->[_data_from_df],remove->[remove]]] | Check if there are any column lengths in the data. | Would be fairly simple to add a `class GeoJSON(JSON)` property that does some validation, makes sure that there are only GeometryCollection and FeatureCollection at top level, for instance. |
@@ -15,7 +15,7 @@ from superdesk.publish.odbc import ODBCPublishService
class ODBCTests(TestCase):
- subscribers = [{"_id": "1", "name": "Test", "can_send_takes_packages": False, "media_type": "media",
+ subscribers = [{"_id": "1", "name": "Test", "subscriber_type": SUBSCRIBER_TYPES.WIRE, "media_type": "medi... | [ODBCTests->[test_transmit->[find,ODBCPublishService,app_context,assertGreater,_transmit],setUp->[init_app,app_context,super,insert]]] | A file that is part of Superdesk. Initialize the object with the necessary properties. | Is `media_type` field still needed? |
@@ -331,7 +331,7 @@ fig.axes[0].tricontour(rr_vox[:, 2], rr_vox[:, 1], tris, rr_vox[:, 0],
# sphere, a given vertex in the source (sample) mesh can be mapped easily
# to the same location in the destination (fsaverage) mesh, and vice-versa.
-renderer_kwargs = dict(bgcolor='w', smooth_shading=False)
+renderer_kwargs... | [imshow_mri->[round,imshow,text,dict,subplots,Stroke,axhline,Normal,format,set,items,aff2axcodes,set_path_effects,suptitle,subplots_adjust,axvline],,round,max,imshow_mri,asarray,apply_trans,mesh,join,set_3d_view,show,quiver3d,dict,read_info,_get_renderer,range,get_vox2ras_tkr,load,sort,print,data_path,read_source_space... | Plots a BEM critical block in the MRI system. Reads the neccesary objects. | This is the one place we actually don't want smooth shading. Is there any way to disable it on this example? It makes it clear that the mesh is decimated quite a bit. Or maybe we should just use wireframes to make the point? WDYT? |
@@ -54,15 +54,13 @@ describe "When searching" do
expect(response.body).to include("FOI requests 1 to #{n} of about #{n}")
end
it "should correctly filter searches for users" do
- request_via_redirect("get", "/search/bob/users")
+ get "/search/bob/users"
expect(response.body).to include("One person... | [visit,create,describe,with_forgery_protection,eql,it,name,to,before,body,click_button,require,using_session,include,parse,dirname,request_via_redirect,fill_in,redirect_to,context,get,not_to,login,eq,expand_path] | Checks that the user s name is in frontpage and that the user s email is in One FOI request found. | Line is too long. [89/80] |
@@ -28,6 +28,13 @@ export default {
(/iPhone|iPod/.test(navigator.userAgent) || caps.isIpadOS) &&
!window.MSStream;
+ caps.isApple =
+ APPLE_NAVIGATOR_PLATFORMS.includes(navigator.platform) ||
+ (navigator.userAgentData &&
+ APPLE_USERAGENTDATA_PLATFORM.includes(
+ navigator... | [No CFG could be retrieved] | Determines if the capabilities are available. | I've added both properties in the event the deprecated one gets removed. |
@@ -62,8 +62,9 @@ public class GameObjectStreamData implements Externalizable {
return data.getProductionRuleList().getProductionRule(m_name);
case PRODUCTIONFRONTIER:
return data.getProductionFrontierList().getProductionFrontier(m_name);
+ default:
+ throw new IllegalStat... | [GameObjectStreamData->[readExternal->[readObject,readByte,values],getReference->[acquireReadLock,IllegalArgumentException,getPlayerID,getTerritory,IllegalStateException,releaseReadLock,getUnitType,getProductionRule,getProductionFrontier],writeExternal->[writeObject,writeByte,ordinal],IllegalArgumentException,getName]] | Get the reference of the object in the game data. | I changed `this` to `m_type` in the exception message because it seemed like a more useful piece of information to report. |
@@ -298,7 +298,7 @@ class HyperoptTools():
f"Objective: {results['loss']:.5f}")
@staticmethod
- def prepare_trials_columns(trials, legacy_mode: bool, has_drawdown: bool) -> str:
+ def prepare_trials_columns(trials, legacy_mode: bool, has_drawdown: bool) -> pd.DataFrame:
trials['... | [HyperoptTools->[try_export_params->[get_strategy_filename,export_params],load_filtered_results->[_read_results,_test_hyperopt_results_exist],get_result_table->[prepare_trials_columns]]] | Prepare trials columns. Returns trials with a sequence of trials with a sequence of trials with a sequence. | I think you should also type "trials" then ... to make it complete (that's why it wasn't captured as part of mypy in the first place). |
@@ -445,3 +445,12 @@ func DigestForFileAtPath(path string) (digest string, err error) {
digest = hex.EncodeToString(hasher.Sum(nil))
return
}
+
+// BoolString maps a bool to true and false strings (like "yes"
+// and "no"). For example: BoolString(b, "yes", "no").
+func BoolString(b bool, t, f string) string {
+... | [Readdir,Close,FieldsFunc,GetFilename,HasPrefix,GetLogFile,IsNotExist,Copy,Error,Stat,Format,MatchString,Unquote,Int,Warning,Sum,New,Errorf,OpenLogFile,MustCompile,NewScanner,TrimSpace,Text,Debug,Unix,Equal,Join,Current,Remove,ToLower,IsSpace,Read,DecodeString,Scan,Int64,Map,Split,Err,MkdirAll,Sprintf,WriteTo,NewInt,Op... | Get the digest of the node. | if returning a struct above, wouldn't need this |
@@ -35,7 +35,7 @@ func (sc *MeshCatalog) refreshCache() {
for _, provider := range sc.endpointsProviders {
// TODO (snchh) : remove this provider check once we have figured out the service account story for azure vms
if provider.GetID() != constants.AzureProviderName {
- glog.Infof("[catalog][%s] TEST Fin... | [refreshCache->[ListServicesForServiceAccount,Unlock,Infof,GetID,ServiceName,ListServices,V,String,Lock,ListServiceAccounts,Info,ListEndpointsForService]] | refreshCache refreshes the cache of all services and service accounts This function is called when a service account is found in the catalog. It will check if. | Seems like debug log, could you change this to `glog.V(level.Trace)...` |
@@ -327,8 +327,12 @@ func (am *MultitenantAlertmanager) transformConfig(userID string, amConfig *amco
if am.cfg.AutoSlackRoot != "" {
for _, r := range amConfig.Receivers {
for _, s := range r.SlackConfigs {
- if s.APIURL == autoSlackURL {
- s.APIURL = amconfig.Secret(am.cfg.AutoSlackRoot + "/" + userID... | [deleteUser->[Stop],setConfig->[createTemplatesFile,transformConfig],Stop->[Stop],ServeHTTP->[ServeHTTP]] | transformConfig takes a user ID and a configuration and transforms it into a Cortex configuration. | I suspect Weaveworks was the only user of this code and we've moved to just webhook, so we could remove it. |
@@ -5,7 +5,7 @@ module AuthenticationHelper
def authentication_available_providers
Authentication::Providers.available.map do |provider_name|
- Authentication::Providers.const_get(provider_name.to_s.titleize)
+ Authentication::Providers.const_get(provider_name.to_s.camelize)
end
end
| [display_registration_fallback?->[display_social_login?]] | Returns an array of authentication providers that are not configured in the system. | Maybe it's time we stop having a helper reach into the guts of another class and instead add a method like `Authentication::Providers.available_providers` that either gets wrapped by this helper or used directly. This would also have the benefit of being able to wrap up the `name.to_s.camelize` logic in a single place ... |
@@ -79,12 +79,15 @@ public abstract class Job {
Date dateFinished;
Status status;
+ static Logger LOGGER = LoggerFactory.getLogger(Job.class);
+
transient boolean aborted = false;
String errorMessage;
private transient Throwable exception;
private transient JobListener listener;
private long p... | [Job->[abort->[jobAbort],isTerminated->[isRunning,isReady,isPending],equals->[hashCode],isRunning->[isRunning],setException->[getStack],hashCode->[hashCode]]] | Job abstract class. This is a private method to allow subclasses to set the job id and status. | If there're no special usage of this field, let's remove it. Fields in Job.java, Paragraph.java and Note.java will be persisted into note.json. |
@@ -268,6 +268,13 @@ describe('BindExpression', () => {
}).to.throw(unsupportedFunctionError);
});
+ it('should support encodeURI and encodeURIComponent', () => {
+ expect(evaluate('encodeURI("http://www.google.com/s p a c e.html")'))
+ .to.equal('http://www.google.com/s%20p%20a%20c%20e.html');
+ ... | [No CFG could be retrieved] | Checks that a function is not destructive and not destructive. The following methods are used to test if the constructor and prototype properties are not null. | Nit: This test for `encodeURIComponent` tests the same functionality as the one for `encodeURI`. Recommend testing proper encoding for some of these chars: `; , / ? : @ & = + $ #` |
@@ -25,12 +25,13 @@ from pip._vendor.requests.utils import get_netrc_auth
from pip._vendor.six.moves import xmlrpc_client # type: ignore
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.six.moves.urllib import request as urllib_request
-from pip._vendor.urllib3.util import IS_PYOPENSS... | [PipSession->[__init__->[MultiDomainBasicAuth,SafeFileCache,InsecureHTTPAdapter,LocalFSAdapter,user_agent]],_download_url->[resp_read,written_chunks],MultiDomainBasicAuth->[_get_new_credentials->[_get_keyring_auth,_get_index_url],_get_url_and_credentials->[_get_new_credentials],_prompt_for_password->[_get_keyring_auth]... | Imports the given package. Get a single node from the system. | I'd move it to `src/pip/_internal/utils/compat.py`, just like `WINDOWS` |
@@ -230,7 +230,7 @@ vdev_elevator_switch(vdev_t *v, char *elevator)
static int
vdev_disk_open(vdev_t *v, uint64_t *psize, uint64_t *max_psize,
- uint64_t *ashift)
+ uint64_t *ashift, uint64_t *pshift)
{
struct block_device *bdev;
fmode_t mode = vdev_bdev_mode(spa_mode(v->vdev_spa));
| [No CFG could be retrieved] | Creates a new object. find the vdev in the partition table and if it is currently open and if it is. | After taking a look at this I wonder if we actually want to add this complexity. I'd forgotten this, but years ago we updated `vdev_disk_open()` on Linux to always return the physical sector size for the ashift when available instead of the logical size. Would it be reasonable to do the same thing on FreeBSD? |
@@ -48,6 +48,7 @@
******************************************************************************/
/* Core includes */
+#include <queue>
#include "emu.h"
#include "cpu/m68000/m68000.h"
#include "machine/terminal.h"
| [No CFG could be retrieved] | Model 50 - Model 70 - Model 74 - Model 74 - Model 74 - Model 74 - region ethernet log functions. | `#include` order should be PCH (emu.h), module header, project headers, framework headers, and standard library headers in that order. This helps avoid a lot of pitfalls. Please don't `#include` anything before the PCH in particular. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.