You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add optional to arguments that are optional
* Add Optional type hint in all places where arguments are optional
* Update some to use | syntax rather than Optional
* Fix some more type formatting for Optional
---------
Co-authored-by: Riccardo Magliocchetti <[email protected]>
Copy file name to clipboardExpand all lines: exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
+5-2
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,8 @@
11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
Copy file name to clipboardExpand all lines: exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/metric_exporter/__init__.py
+15-13
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,12 @@
11
11
# See the License for the specific language governing permissions and
12
12
# limitations under the License.
13
13
14
+
from __future__ importannotations
15
+
14
16
fromdataclassesimportreplace
15
17
fromloggingimportgetLogger
16
18
fromosimportenviron
17
-
fromtypingimportDict, Iterable, List, Optional, Tuple, Union
Copy file name to clipboardExpand all lines: exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py
+12-11
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@
10
10
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
# See the License for the specific language governing permissions and
12
12
# limitations under the License.
13
+
from __future__ importannotations
13
14
14
15
importgzip
15
16
importlogging
@@ -23,7 +24,6 @@
23
24
Dict,
24
25
List,
25
26
Mapping,
26
-
Optional,
27
27
Sequence,
28
28
)
29
29
@@ -101,16 +101,17 @@ class OTLPMetricExporter(MetricExporter, OTLPMetricExporterMixin):
0 commit comments