Skip to content

Commit 0b02c56

Browse files
Remove annotations from __future__ when not needed
Most of the annotations from __future__ are no longer needed, except for the cases where there are circular dependencies, forward references, or when the type hint is used inside the class itself. Signed-off-by: Daniel Zullo <[email protected]>
1 parent 65bb386 commit 0b02c56

39 files changed

+5
-41
lines changed

benchmarks/timeseries/periodic_feature_extractor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
implementation.
1010
"""
1111

12-
from __future__ import annotations
1312

1413
import asyncio
1514
import collections.abc

benchmarks/timeseries/ringbuffer_memusage.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
"""Memory allocation benchmark for the ringbuffer."""
55

6-
from __future__ import annotations
76

87
import argparse
98
import tracemalloc

benchmarks/timeseries/ringbuffer_serialization.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
"""Benchmarks the serialization of the `OrderedRingBuffer` class."""
55

6-
from __future__ import annotations
76

87
import fnmatch
98
import os

examples/battery_pool.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
"""Script with an example how to use BatteryPool."""
55

6-
from __future__ import annotations
76

87
import asyncio
98
import logging

src/frequenz/sdk/_internal/_asyncio.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
"""General purpose async tools."""
55

6-
from __future__ import annotations
76

87
import asyncio
98
from abc import ABC

src/frequenz/sdk/actor/_resampling.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
"""An actor to resample microgrid component metrics."""
55

6-
from __future__ import annotations
76

87
import asyncio
98
import dataclasses

src/frequenz/sdk/actor/power_distributing/_battery_pool_status.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
33
"""Class that stores pool of batteries and manage them."""
44

5-
from __future__ import annotations
65

76
import asyncio
87
import logging

src/frequenz/sdk/actor/power_distributing/_battery_status.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
33
"""Class to return battery status."""
44

5-
from __future__ import annotations
65

76
import asyncio
87
import logging

src/frequenz/sdk/actor/power_distributing/power_distributing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
Purpose of this actor is to keep SoC level of each component at the equal level.
1212
"""
1313

14-
from __future__ import annotations
1514

1615
import asyncio
1716
import logging

src/frequenz/sdk/actor/power_distributing/request.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
33
"""Definition of the user request."""
44

5-
from __future__ import annotations
65

76
import dataclasses
87
from collections import abc

0 commit comments

Comments
 (0)