Skip to content

Commit

Permalink
lint: add missing __future__ annotations imort to support `| None…
Browse files Browse the repository at this point in the history
…` syntax compat
  • Loading branch information
Bastien Vallet committed Dec 26, 2024
1 parent 6379126 commit afbc4a6
Show file tree
Hide file tree
Showing 20 changed files with 37 additions and 4 deletions.
2 changes: 2 additions & 0 deletions graph/graph.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import matplotlib
import matplotlib.pyplot as plt
import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions hwbench/bench/benchmarks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import datetime
import time
from datetime import timedelta
Expand Down
2 changes: 2 additions & 0 deletions hwbench/bench/engine.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import abc
import pathlib

Expand Down
2 changes: 2 additions & 0 deletions hwbench/engines/stressng.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import re

from ..bench.benchmark import ExternalBench
Expand Down
2 changes: 2 additions & 0 deletions hwbench/engines/stressng_stream.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import re
from typing import Any

Expand Down
2 changes: 2 additions & 0 deletions hwbench/environment/cpu.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from .cpu_cores import CPU_CORES
from .cpu_info import CPU_INFO
from .numa import NUMA
Expand Down
2 changes: 2 additions & 0 deletions hwbench/environment/cpu_cores.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import pathlib

from ..utils.external import External
Expand Down
2 changes: 2 additions & 0 deletions hwbench/environment/mock.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from .hardware import Hardware
from .vendors.mock import MockVendor

Expand Down
2 changes: 2 additions & 0 deletions hwbench/environment/turbostat.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import os
import re
import subprocess
Expand Down
2 changes: 2 additions & 0 deletions hwbench/environment/vendors/bmc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import functools
import os.path
import pathlib
Expand Down
2 changes: 2 additions & 0 deletions hwbench/environment/vendors/dell/dell.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import cast

from ....bench.monitoring_structs import (
Expand Down
2 changes: 2 additions & 0 deletions hwbench/environment/vendors/hpe/hpe.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import logging
import pathlib
import re
Expand Down
2 changes: 2 additions & 0 deletions hwbench/environment/vendors/mock.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import cast

from ...bench.monitoring_structs import (
Expand Down
7 changes: 3 additions & 4 deletions hwbench/environment/vendors/pdu.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from ...bench.monitoring_structs import (
Power,
PowerContext,
)
from __future__ import annotations

from ...bench.monitoring_structs import Power, PowerContext
from ...utils import helpers as h
from .monitoring_device import MonitoringDevice

Expand Down
Empty file.
2 changes: 2 additions & 0 deletions hwbench/environment/vendors/pdus/raritan.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from ....bench.monitoring_structs import Power, PowerContext
from ....utils import helpers as h
from ..pdu import PDU
Expand Down
2 changes: 2 additions & 0 deletions hwbench/environment/vendors/vendor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import configparser
import os
from abc import ABC, abstractmethod
Expand Down
Empty file added hwbench/tests/__init__.py
Empty file.
2 changes: 2 additions & 0 deletions hwbench/utils/archive.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import errno
import io
import os
Expand Down
2 changes: 2 additions & 0 deletions hwbench/utils/helpers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import datetime
import logging
import sys
Expand Down

0 comments on commit afbc4a6

Please sign in to comment.