chore(pre-commit): Add pyupgrade and pycln hooks (#24197)

This commit is contained in:
John Bodley
2023-06-01 12:01:10 -07:00
committed by GitHub
parent 7d7ce63970
commit a4d5d7c6b9
448 changed files with 3084 additions and 3305 deletions

View File

@@ -24,8 +24,9 @@
# specific language governing permissions and limitations
# under the License.
from abc import ABC, abstractmethod
from collections.abc import Iterable
from dataclasses import dataclass
from typing import Any, Dict, Iterable, Optional
from typing import Any, Optional
from sqlalchemy.types import TypeEngine
@@ -33,14 +34,14 @@ from sqlalchemy.types import TypeEngine
@dataclass
class TableMetaData:
table_name: str
types: Optional[Dict[str, TypeEngine]]
types: Optional[dict[str, TypeEngine]]
@dataclass
class Table:
table_name: str
table_metadata: TableMetaData
data: Iterable[Dict[Any, Any]]
data: Iterable[dict[Any, Any]]
class TableMetaDataFactory(ABC):
@@ -48,6 +49,6 @@ class TableMetaDataFactory(ABC):
def make(self) -> TableMetaData:
...
def make_table(self, data: Iterable[Dict[Any, Any]]) -> Table:
def make_table(self, data: Iterable[dict[Any, Any]]) -> Table:
metadata = self.make()
return Table(metadata.table_name, metadata, data)