Skip to content

Commit

Permalink
chore: stop mypy from complaining about the Metric class (aws#20369)
Browse files Browse the repository at this point in the history
Fixes: aws#20219

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
kornicameister authored and wphilipw committed May 23, 2022
1 parent d075e49 commit d30cb99
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/@aws-cdk/aws-cloudwatch/lib/metric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ export class Metric implements IMetric {
/** Region which this metric comes from. */
public readonly region?: string;

/** Warnings attached to this metric. */
public readonly warnings?: string[];

constructor(props: MetricProps) {
this.period = props.period || cdk.Duration.minutes(5);
const periodSec = this.period.toSeconds();
Expand All @@ -295,6 +298,7 @@ export class Metric implements IMetric {
this.unit = props.unit;
this.account = props.account;
this.region = props.region;
this.warnings = undefined;
}

/**
Expand Down Expand Up @@ -889,4 +893,4 @@ function matchAll(x: string, re: RegExp): RegExpMatchArray[] {
ret.push(m);
}
return ret;
}
}

0 comments on commit d30cb99

Please sign in to comment.