I tried to implement a method for selecting methods (DIM, NORMAL, BRIGHT) from the Style class.

That in turn from the package colorama.

But however, the Style is underlined in red.

Error: [pylint] E1102:Style.(DIM/NORMAL/BRIGHT) is not callable

Code:

 if type == "dim": Style.DIM() elif type == "normal": Style.NORMAL() elif type == "bright": Style.BRIGHT() 

    1 answer 1

    Judging by the error E1102:Style.(DIM/NORMAL/BRIGHT) is not callable elements DIM/NORMAL/BRIGHT are not functions and they do not have a __call__ method, so the brackets () not needed.

    If you look at the colorama example , you can see that the elements from Style are used without () :

     from colorama import Fore, Back, Style print(Fore.RED + 'some red text') print(Back.GREEN + 'and with a green background') print(Style.DIM + 'and in dim text') print(Style.RESET_ALL) print('back to normal now')