mirror of https://github.com/pyodide/pyodide.git
MAINT Update pre-commit config (#2890)
This commit is contained in:
parent
f15b99d663
commit
9d874d588b
|
@ -22,13 +22,15 @@ repos:
|
|||
- id: isort
|
||||
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: "v2.34.0"
|
||||
rev: "v2.37.1"
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
name: pyupgrade
|
||||
args: ["--py310-plus"]
|
||||
exclude: docs
|
||||
|
||||
- repo: https://github.com/hadialqattan/pycln
|
||||
rev: "v1.3.5"
|
||||
rev: "v2.0.4"
|
||||
hooks:
|
||||
- id: pycln
|
||||
args: [--config=pyproject.toml]
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from collections import UserDict
|
||||
from collections.abc import Iterable
|
||||
from dataclasses import astuple, dataclass
|
||||
from typing import Any, Iterable
|
||||
from typing import Any
|
||||
|
||||
from packaging.utils import canonicalize_name
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
from typing import Any, Callable
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
|
||||
import pytest
|
||||
from pyodide_test_runner import run_in_pyodide
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import re
|
||||
from collections.abc import Iterable, Iterator
|
||||
from pathlib import Path
|
||||
from textwrap import dedent # for doctests
|
||||
from typing import Iterable, Iterator
|
||||
|
||||
|
||||
def prepare_doctest(x: str) -> list[str]:
|
||||
|
|
|
@ -12,13 +12,14 @@ import os
|
|||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from collections.abc import Iterable
|
||||
from functools import total_ordering
|
||||
from graphlib import TopologicalSorter
|
||||
from pathlib import Path
|
||||
from queue import PriorityQueue, Queue
|
||||
from threading import Lock, Thread
|
||||
from time import perf_counter, sleep
|
||||
from typing import Any, Iterable
|
||||
from typing import Any
|
||||
|
||||
from . import common
|
||||
from .buildpkg import needs_rebuild
|
||||
|
|
|
@ -15,12 +15,13 @@ import subprocess
|
|||
import sys
|
||||
import sysconfig
|
||||
import textwrap
|
||||
from collections.abc import Generator, Iterator
|
||||
from contextlib import contextmanager
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from textwrap import dedent
|
||||
from types import TracebackType
|
||||
from typing import Any, Generator, Iterator, NoReturn, TextIO
|
||||
from typing import Any, NoReturn, TextIO
|
||||
from urllib import request
|
||||
|
||||
from . import pywasmcross
|
||||
|
|
|
@ -3,8 +3,8 @@ import functools
|
|||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from collections.abc import Generator, Iterable, Iterator, Mapping
|
||||
from pathlib import Path
|
||||
from typing import Generator, Iterable, Iterator, Mapping
|
||||
|
||||
import tomli
|
||||
from packaging.tags import Tag, compatible_tags, cpython_tags
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
from collections.abc import Iterator
|
||||
from pathlib import Path
|
||||
from typing import Any, Iterator
|
||||
from typing import Any
|
||||
|
||||
# TODO: support more complex types for validation
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@ import os
|
|||
import shutil
|
||||
import sys
|
||||
import traceback
|
||||
from collections.abc import Mapping
|
||||
from itertools import chain
|
||||
from pathlib import Path
|
||||
from typing import Mapping
|
||||
|
||||
from build import BuildBackendException, ConfigSettingsType, ProjectBuilder
|
||||
from build.__main__ import (
|
||||
|
|
|
@ -43,9 +43,10 @@ import re
|
|||
import shutil
|
||||
import subprocess
|
||||
from collections import namedtuple
|
||||
from collections.abc import Iterable, Iterator, MutableMapping
|
||||
from contextlib import contextmanager
|
||||
from tempfile import TemporaryDirectory
|
||||
from typing import Any, Iterable, Iterator, Literal, MutableMapping, NoReturn
|
||||
from typing import Any, Literal, NoReturn
|
||||
|
||||
from pyodide_build import common
|
||||
from pyodide_build._f2c_fixes import fix_f2c_input, fix_f2c_output, scipy_fixes
|
||||
|
|
|
@ -2,8 +2,9 @@ import ast
|
|||
import pickle
|
||||
import sys
|
||||
from base64 import b64decode, b64encode
|
||||
from collections.abc import Callable, Collection
|
||||
from copy import deepcopy
|
||||
from typing import Any, Callable, Collection
|
||||
from typing import Any
|
||||
|
||||
import pytest
|
||||
|
||||
|
|
|
@ -7,11 +7,12 @@ A library of helper utilities for connecting Python to the browser environment.
|
|||
import ast
|
||||
import builtins
|
||||
import tokenize
|
||||
from collections.abc import Generator
|
||||
from copy import deepcopy
|
||||
from io import StringIO
|
||||
from textwrap import dedent
|
||||
from types import CodeType
|
||||
from typing import Any, Generator, Literal
|
||||
from typing import Any, Literal
|
||||
|
||||
|
||||
def should_quiet(source: str) -> bool:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
from collections.abc import Callable, Iterable
|
||||
from io import IOBase
|
||||
from typing import Any, Callable, Iterable
|
||||
from typing import Any
|
||||
|
||||
# All docstrings for public `core` APIs should be extracted from here. We use
|
||||
# the utilities in `docstring.py` and `docstring.c` to format them
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import sys
|
||||
from collections.abc import Sequence
|
||||
from importlib.abc import Loader, MetaPathFinder
|
||||
from importlib.machinery import ModuleSpec
|
||||
from importlib.util import spec_from_loader
|
||||
from types import ModuleType
|
||||
from typing import Any, Sequence
|
||||
from typing import Any
|
||||
|
||||
|
||||
class JsFinder(MetaPathFinder):
|
||||
|
|
|
@ -4,11 +4,12 @@ import re
|
|||
import shutil
|
||||
import sysconfig
|
||||
import tarfile
|
||||
from collections.abc import Iterable
|
||||
from importlib.machinery import EXTENSION_SUFFIXES
|
||||
from pathlib import Path
|
||||
from site import getsitepackages
|
||||
from tempfile import NamedTemporaryFile
|
||||
from typing import IO, Any, Iterable, Literal
|
||||
from typing import IO, Any, Literal
|
||||
from zipfile import ZipFile
|
||||
|
||||
from ._core import IN_BROWSER, JsProxy, to_js
|
||||
|
|
|
@ -5,6 +5,7 @@ import sys
|
|||
import traceback
|
||||
from asyncio import Future, ensure_future
|
||||
from codeop import CommandCompiler, Compile, _features # type: ignore[attr-defined]
|
||||
from collections.abc import Callable, Generator
|
||||
from contextlib import (
|
||||
ExitStack,
|
||||
_RedirectStream,
|
||||
|
@ -15,7 +16,7 @@ from contextlib import (
|
|||
from platform import python_build, python_version
|
||||
from tokenize import TokenError
|
||||
from types import TracebackType
|
||||
from typing import Any, Callable, Generator, Literal
|
||||
from typing import Any, Literal
|
||||
|
||||
from _pyodide._base import CodeRunner, ReturnMode, should_quiet
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
from typing import Any, Callable
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
|
||||
from .._core import IN_BROWSER, JsProxy, create_once_callable, create_proxy
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@ import contextvars
|
|||
import sys
|
||||
import time
|
||||
import traceback
|
||||
from typing import Any, Callable
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
|
||||
from ._core import IN_BROWSER, create_once_callable
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import re
|
||||
from collections.abc import Sequence
|
||||
from textwrap import dedent
|
||||
from typing import Any, Sequence
|
||||
from typing import Any
|
||||
|
||||
import pytest
|
||||
from pyodide_test_runner import run_in_pyodide
|
||||
|
|
|
@ -8,7 +8,7 @@ import pathlib
|
|||
import re
|
||||
from ast import Str
|
||||
from collections import namedtuple
|
||||
from typing import Callable
|
||||
from collections.abc import Callable
|
||||
|
||||
CORE_VERSION_REGEX = r"(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)"
|
||||
|
||||
|
|
Loading…
Reference in New Issue