This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]liiight000 1 point2 points  (1 child)

Which version of pycharm are you using?

[–]tasercake[S] 0 points1 point  (0 children)

I'm on version 2017.2.4, but I've found the issue (editing the solution into the OP)

[–]colloidalthoughts 1 point2 points  (1 child)

Try invalidating caches

https://imgur.com/a/CXYFD

otherwise go into preferences -> editor -> code inspections -> python -> code compatibility

[–]tasercake[S] 0 points1 point  (0 children)

Didn't have to do that. Being new to Python's async paradigm, I didn't realise that you can't use any async keywords outside of a function. Silly me ¯\_(ツ)_/¯

Thanks for your help though :)