ci: update pyupgrade
This commit is contained in:
parent
fefd9ac2e2
commit
adf30693a9
17 changed files with 27 additions and 17 deletions
|
|
@ -21,7 +21,7 @@ repos:
|
|||
- id: debug-statements
|
||||
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.34.0
|
||||
rev: v3.9.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: ['--py310-plus']
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ import os
|
|||
import re
|
||||
import unicodedata
|
||||
import warnings
|
||||
from typing import TYPE_CHECKING, Any, Callable, Literal, Optional, TypeAlias, overload
|
||||
from collections.abc import Callable
|
||||
from typing import TYPE_CHECKING, Any, Literal, Optional, TypeAlias, overload
|
||||
|
||||
import click
|
||||
from werkzeug.local import Local, release_local
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: MIT. See LICENSE
|
||||
from collections.abc import Sequence
|
||||
from datetime import timedelta
|
||||
from typing import Optional, Sequence
|
||||
from typing import Optional
|
||||
|
||||
import frappe
|
||||
import frappe.defaults
|
||||
|
|
|
|||
|
|
@ -8,9 +8,10 @@ import random
|
|||
import re
|
||||
import string
|
||||
import traceback
|
||||
from collections.abc import Iterable, Sequence
|
||||
from contextlib import contextmanager, suppress
|
||||
from time import time
|
||||
from typing import Any, Iterable, Sequence
|
||||
from typing import Any
|
||||
|
||||
from pypika.dialects import MySQLQueryBuilder, PostgreSQLQueryBuilder
|
||||
from pypika.terms import Criterion, NullValue
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# MIT License. See license.txt
|
||||
|
||||
import operator
|
||||
from typing import Callable
|
||||
from collections.abc import Callable
|
||||
|
||||
import frappe
|
||||
from frappe.database.utils import NestedSetHierarchy
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
import hashlib
|
||||
import json
|
||||
import time
|
||||
from typing import Any, Generator, Iterable
|
||||
from collections.abc import Generator, Iterable
|
||||
from typing import Any
|
||||
|
||||
from werkzeug.exceptions import NotFound
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
import datetime
|
||||
import re
|
||||
from typing import TYPE_CHECKING, Callable, Optional
|
||||
from collections.abc import Callable
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
from collections.abc import Callable
|
||||
from enum import Enum
|
||||
from importlib import import_module
|
||||
from typing import Any, Callable, get_type_hints
|
||||
from typing import Any, get_type_hints
|
||||
|
||||
from pypika.queries import Column, QueryBuilder
|
||||
from pypika.terms import PseudoColumn
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: MIT. See LICENSE
|
||||
|
||||
from collections.abc import Callable
|
||||
from datetime import datetime
|
||||
from functools import wraps
|
||||
from typing import Callable
|
||||
|
||||
from werkzeug.wrappers import Response
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import json
|
|||
import re
|
||||
import time
|
||||
from collections import Counter
|
||||
from typing import Callable
|
||||
from collections.abc import Callable
|
||||
|
||||
import sqlparse
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from typing import Callable
|
||||
from collections.abc import Callable
|
||||
|
||||
import frappe
|
||||
from frappe.model import child_table_fields
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import copy
|
|||
import datetime
|
||||
import signal
|
||||
import unittest
|
||||
from collections.abc import Sequence
|
||||
from contextlib import contextmanager
|
||||
from typing import Sequence
|
||||
|
||||
import frappe
|
||||
from frappe.model.base_document import BaseDocument
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import sys
|
|||
import traceback
|
||||
from collections import deque
|
||||
from collections.abc import (
|
||||
Callable,
|
||||
Container,
|
||||
Generator,
|
||||
Iterable,
|
||||
|
|
@ -20,7 +21,7 @@ from collections.abc import (
|
|||
)
|
||||
from email.header import decode_header, make_header
|
||||
from email.utils import formataddr, parseaddr
|
||||
from typing import Any, Callable, Literal
|
||||
from typing import Any, Literal
|
||||
from urllib.parse import quote, urlparse
|
||||
|
||||
from redis.exceptions import ConnectionError
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@ import os
|
|||
import socket
|
||||
import time
|
||||
from collections import defaultdict
|
||||
from collections.abc import Callable
|
||||
from functools import lru_cache
|
||||
from typing import Any, Callable, NoReturn
|
||||
from typing import Any, NoReturn
|
||||
from uuid import uuid4
|
||||
|
||||
import redis
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
import json
|
||||
from collections import defaultdict
|
||||
from collections.abc import Callable
|
||||
from datetime import datetime, timedelta
|
||||
from functools import wraps
|
||||
from typing import Callable
|
||||
|
||||
import frappe
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
import base64
|
||||
import json
|
||||
from typing import TYPE_CHECKING, Callable
|
||||
from collections.abc import Callable
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import frappe
|
||||
import frappe.utils
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
from collections.abc import Callable
|
||||
from functools import lru_cache, wraps
|
||||
from inspect import _empty, isclass, signature
|
||||
from types import EllipsisType
|
||||
from typing import Callable, ForwardRef, TypeVar, Union
|
||||
from typing import ForwardRef, TypeVar, Union
|
||||
|
||||
from frappe.exceptions import FrappeTypeError
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue