GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CI,TYP: Bump mypy to 1.4.1 by charris · Pull Request #24541 · numpy/numpy

CI,TYP: Bump mypy to 1.4.1 #24541

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.

Sign up for GitHub

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
charris merged 7 commits into numpy:maintenance/1.26.x from charris:backport-23764
Aug 25, 2023

Uh oh!

There was an error while loading. Please reload this page.

Merged

CI,TYP: Bump mypy to 1.4.1 #24541

Changes from 1 commit
Commits
Show all changes
7 commits
Select commit Hold shift + click to select a range
63f4d5d
CI,TYP: Bump mypy to 1.3.0
BvB93 Apr 24, 2023
5428852
TYP: Improve function-based annotations with `typing.Concatenate`
BvB93 May 15, 2023
95f0a43
CI: Avoid overriding `MYPYPATH`
BvB93 May 17, 2023
800edbb
TYP: Bump mypy to 1.5.1
BvB93 Aug 23, 2023
bfa0681
TYP: Lower the mypy pin to 1.4.1
BvB93 Aug 23, 2023
864e3b7
TYP,TST: Adapt the typing test suite to mypy >=1.4 changes
BvB93 Aug 23, 2023
929039f
TYP: guard `typing_extensions` usage for <py310, add it back in envir…
rgommers Aug 24, 2023
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
TYP: Improve function-based annotations with typing.Concatenate
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@BvB93 @charris
BvB93 authored and charris committed Aug 25, 2023
commit 5428852cd78680e47f194cd2d8d562144d3b9d3b

There are no files selected for viewing

21 changes: 13 additions & 8 deletions 21 numpy/lib/shape_base.pyi
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import sys
from collections.abc import Callable, Sequence
from typing import TypeVar, Any, overload, SupportsIndex, Protocol

if sys.version_info >= (3, 10):
from typing import ParamSpec, Concatenate
else:
from typing_extensions import ParamSpec, Concatenate

from numpy import (
generic,
integer,
Expand Down Expand Up @@ -28,6 +34,7 @@ from numpy._typing import (

from numpy.core.shape_base import vstack

_P = ParamSpec("_P")
_SCT = TypeVar("_SCT", bound=generic)

# The signatures of `__array_wrap__` and `__array_prepare__` are the same;
Expand Down Expand Up @@ -73,23 +80,21 @@ def put_along_axis(
axis: None | int,
) -> None: ...

# TODO: Use PEP 612 `ParamSpec` once mypy supports `Concatenate`
# xref python/mypy#8645
@overload
def apply_along_axis(
func1d: Callable[..., _ArrayLike[_SCT]],
func1d: Callable[Concatenate[NDArray[Any], _P], _ArrayLike[_SCT]],
axis: SupportsIndex,
arr: ArrayLike,
*args: Any,
**kwargs: Any,
*args: _P.args,
**kwargs: _P.kwargs,
) -> NDArray[_SCT]: ...
@overload
def apply_along_axis(
func1d: Callable[..., ArrayLike],
func1d: Callable[Concatenate[NDArray[Any], _P], ArrayLike],
axis: SupportsIndex,
arr: ArrayLike,
*args: Any,
**kwargs: Any,
*args: _P.args,
**kwargs: _P.kwargs,
) -> NDArray[Any]: ...

def apply_over_axes(
Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.