Comments (6)
please spend a few minutes and search the issue tracker next time
from pyupgrade.
I looked at the issue tracker prior to posting this and have since looked.
Searching for the terms of type
generic
3.12
695
parameter
and looking at all open issues - this is the closest issue I can find: #836
It's entirely possible I am still missing this - but short of looking through all the closed issues in the repo - I'm not sure how to find the answer here. If nothing else - linking to the answer here would help someone else who might use the same search terms as me.
from pyupgrade.
why not 695 ?
from pyupgrade.
ah you did find the duplicate -- great! next time do that first so you don't even need to waste both of our time opening an issue about it
from pyupgrade.
Are you saying that the issue I am raising here is a duplicate of #836? That issue is about the new type alias syntax - I am talking about generics (there is overlap, but not complete).
As in this:
def max[T](args: Iterable[T]) -> T:
...
class list[T]:
def __getitem__(self, index: int, /) -> T:
...
def append(self, element: T) -> None:
...
This seems to me a distinct concern and feature from what is discussed in 836
from pyupgrade.
yes it is an exact duplicate
from pyupgrade.
Related Issues (20)
- Feature request: `--keep-format` HOT 2
- --keep-runtime-typing not respected when using --py310-plus HOT 2
- Automatically remove try-except blocks. HOT 2
- Rewriting to `yield from` may introduce type errors when using pyright HOT 2
- Recognize and replace `if sys.version_info[0]` blocks HOT 4
- How to check the version of `pyupgrade`? HOT 2
- Check for "import imp" and replace with import importlib as imp? HOT 1
- Is there a python API to call pyupgrade? HOT 2
- Formatting bug? Triple-quote changed to 2x triple-quote HOT 10
- type error when change Union operator to "| operator
- type error when change "Union" operator to "|" operator HOT 1
- Remove imports for pep 585 HOT 1
- Add a documentation ? HOT 1
- Read-only mode HOT 1
- if sys.version_info blocks without an else get rewritten via the pre-commit hook HOT 7
- multi-line exception with duplicate BaseException and comments gives invalid code
- Don't replace string type annotations when module is only imported with TYPE_CHECKING HOT 2
- "".join(shlex.quote(...) ...) to shlex.join(...) is too eager HOT 1
- Improve documentation of supported arguments HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyupgrade.