False positives from pyflakes with Python 3.13.2

Can any one explain why, with this code…

from typing import List, Tuple
from enum import Enum

class DominantColor(Enum):
    RED = "red"
    GREEN = "green"
    BLUE = "blue"

all_colors: List[Tuple[int, int, int]] = []

I am getting 2 pyflakes errors on the from typing import List, Tuple line, namely:
pyflakes: 'typing.List' imported but unused and…
pyflakes: 'typing.Tuple' imported but unused.

This is actually a much larger program, but this is the smallest code extract that still demonstrates the warning.

I note with some amusement that on the PyFlakes page at PyPi.org, it says…
Pyflakes makes a simple promise: it will never complain about style, and it will try very, very hard to never emit false positives.

It’s probably a side effect of Python 3.13 doing its defer type hints magic . Have you tried just updating pyflakes? They’ve surely addressed this by now (I can’t reproduce your issue at least).

Thanks for the reply! I’ve already run python3.13 -m pip install pyflakes but to no avail. It doesn’t stop me working, but I’ll freely admit that it bothers me more than it should :wink:

Do you think the editor I’m using might make a difference? I’m using Zed editor, from https://zed.dev

What about python3.13 -m pip install --upgrade pyflakes?

I thought I had done that already, but I tried it again, and then re-entered Zed, and the warnings seem to have gone. Thanks so much :folded_hands: