typesentry icon indicating copy to clipboard operation
typesentry copied to clipboard

AttributeError: type object 'Counter' has no attribute '__args__'

Open Filco306 opened this issue 4 years ago • 0 comments

Hello! This package is amazing to improve code quality!

However, I am getting an issue when using it. I have the follow function:

from typing import List
from .utils import typed # As in the example
from collections import Counter

def sample_function(s : List[Counter]):
   ....

When I use it, I get AttributeError: type object 'Counter' has no attribute '__args__'. Am I using the type hinting in the wrong way?

Thank you!

Filco306 avatar Feb 16 '21 11:02 Filco306