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

@@ -16,7 +16,7 @@
# under the License.
import re
from typing import List, Optional
from typing import Optional
from pgsanity.pgsanity import check_string
@@ -32,8 +32,8 @@ class PostgreSQLValidator(BaseSQLValidator): # pylint: disable=too-few-public-m
@classmethod
def validate(
cls, sql: str, schema: Optional[str], database: Database
) -> List[SQLValidationAnnotation]:
annotations: List[SQLValidationAnnotation] = []
) -> list[SQLValidationAnnotation]:
annotations: list[SQLValidationAnnotation] = []
valid, error = check_string(sql, add_semicolon=True)
if valid:
return annotations