Skip to content

Bump various test dependencies #11249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
version: "0.1.9" # must match .pre-commit-config.yaml and requirements-test.txt
version: "0.1.11" # must match .pre-commit-config.yaml and requirements-test.txt

flake8:
name: Lint with Flake8
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: black
language_version: python3.10
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9 # must match requirements-tests.txt and tests.yml
rev: v0.1.11 # must match requirements-tests.txt and tests.yml
hooks:
- id: ruff
args: [--exit-non-zero-on-fix, --fix-only]
Expand All @@ -26,7 +26,7 @@ repos:
additional_dependencies:
- "flake8-bugbear==23.12.2" # must match requirements-tests.txt
- "flake8-noqa==1.3.2" # must match requirements-tests.txt
- "flake8-pyi==23.11.0" # must match requirements-tests.txt
- "flake8-pyi==24.1.0" # must match requirements-tests.txt
types: [file]
types_or: [python, pyi]

Expand Down
4 changes: 2 additions & 2 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ black==23.12.1 # must match .pre-commit-config.yaml
flake8==6.1.0 # must match .pre-commit-config.yaml
flake8-bugbear==23.12.2 # must match .pre-commit-config.yaml
flake8-noqa==1.3.2 # must match .pre-commit-config.yaml
flake8-pyi==23.11.0 # must match .pre-commit-config.yaml
flake8-pyi==24.1.0 # must match .pre-commit-config.yaml
mypy==1.8.0
pre-commit-hooks==4.5.0 # must match .pre-commit-config.yaml
pytype==2023.12.18; platform_system != "Windows" and python_version < "3.12"
ruff==0.1.9 # must match .pre-commit-config.yaml and tests.yml
ruff==0.1.11 # must match .pre-commit-config.yaml and tests.yml

# Libraries used by our various scripts.
aiohttp==3.9.1
Expand Down
14 changes: 13 additions & 1 deletion stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,19 @@ from typing import ( # noqa: Y022
overload,
type_check_only,
)
from typing_extensions import Concatenate, Literal, LiteralString, ParamSpec, Self, TypeAlias, TypeGuard, TypeVarTuple, deprecated

# we can't import `Literal` from typing or mypy crashes: see #11247
from typing_extensions import ( # noqa: Y023
Concatenate,
Literal,
LiteralString,
ParamSpec,
Self,
TypeAlias,
TypeGuard,
TypeVarTuple,
deprecated,
)

if sys.version_info >= (3, 9):
from types import GenericAlias
Expand Down
2 changes: 1 addition & 1 deletion stubs/openpyxl/openpyxl/xml/_functions_overloads.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class _HasText(Protocol):
class _HasAttrib(Protocol):
attrib: Iterable[Any] # AnyOf[dict[str, str], Iterable[tuple[str, str]]]

class _HasTagAndGet(_HasTag, _HasGet[_T_co], Protocol[_T_co]): ...
class _HasTagAndGet(_HasTag, _HasGet[_T_co], Protocol[_T_co]): ... # noqa: Y046
class _HasTagAndText(_HasTag, _HasText, Protocol): ... # noqa: Y046
class _HasTagAndTextAndAttrib(_HasTag, _HasText, _HasAttrib, Protocol): ... # noqa: Y046

Expand Down
7 changes: 5 additions & 2 deletions stubs/protobuf/google/protobuf/internal/containers.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from collections.abc import Callable, Iterable, Iterator, MutableMapping, Sequence
from typing import Any, SupportsIndex, TypeVar, overload
from typing import Any, Protocol, SupportsIndex, TypeVar, overload

from google.protobuf.descriptor import Descriptor
from google.protobuf.internal.message_listener import MessageListener
from google.protobuf.internal.python_message import GeneratedProtocolMessageType
from google.protobuf.internal.type_checkers import _ValueChecker
from google.protobuf.message import Message

_T = TypeVar("_T")
Expand All @@ -13,6 +12,10 @@ _ScalarV = TypeVar("_ScalarV", bound=bool | int | float | str | bytes)
_MessageV = TypeVar("_MessageV", bound=Message)
_M = TypeVar("_M")

class _ValueChecker(Protocol[_T]):
def CheckValue(self, proposed_value: _T) -> _T: ...
def DefaultValue(self) -> _T: ...

class BaseContainer(Sequence[_T]):
def __init__(self, message_listener: MessageListener) -> None: ...
def __len__(self) -> int: ...
Expand Down
6 changes: 1 addition & 5 deletions stubs/protobuf/google/protobuf/internal/type_checkers.pyi
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
from typing import Generic, Protocol, TypeVar
from typing import Generic, TypeVar

_T = TypeVar("_T")

class _ValueChecker(Protocol[_T]):
def CheckValue(self, proposed_value: _T) -> _T: ...
def DefaultValue(self) -> _T: ...

class TypeChecker(Generic[_T]):
def __init__(self, *acceptable_types: _T): ...
def CheckValue(self, proposed_value: _T) -> _T: ...
Expand Down