Skip to content
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

Remove Python 2.x code? #813

Closed
edreamleo opened this issue Jun 25, 2024 · 1 comment
Closed

Remove Python 2.x code? #813

edreamleo opened this issue Jun 25, 2024 · 1 comment

Comments

@edreamleo
Copy link
Contributor

edreamleo commented Jun 25, 2024

The latest readme says "[pyflakes] supports all active versions of Python: 3.8+".

Yet checker.py contains the following counter function:

def counter(items):
    """
    Simplest required implementation of collections.Counter. Required as 2.6
    does not have Counter in collections.
    """
    results = {}
    for item in items:
        results[item] = results.get(item, 0) + 1
    return results

Why is this function necessary?

@asottile
Copy link
Member

it still works and nobody has bothered to remove it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants