Python Forum

Full Version: can't assign to literal error in pycharm
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
class Flee(Action):
    def __init__(self, method: object, name: object, hotkey: object, kwargs: object) -> object:
        """

        :rtype: object
        """
        super().__init__(method, name, hotkey, kwargs)
        super().__init(method=player.Player.)not, name= "Flee", hotkey= 'f')
Can't assign to literal on line 6
You should provide fully-runnable code that reproduces the issue. You should leave out things like the docstring (and maybe even the annotations, especially if they're just object) to keep it as minimal as possible.

Also, on line 8 that's clearly not legal syntax.
try backing your triple quotation marks back to your object on line 5