Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Type annotation and f-strings errors: Unexpected token of type "OP" encounted. #61

Open
grenki opened this issue Dec 19, 2019 · 1 comment

Comments

@grenki
Copy link

grenki commented Dec 19, 2019

example:

@attr.s
class A:
     b: int = attr.ib()

a = 2
log.warning(f'a: {a}')

Do you have python 3.6+ support?

Maybe issue caused by environment. I use pipenv environment, and tool reports "The python binary is potentially unsafe"

Thank you for this awesome tool :)

@mlangkabel
Copy link
Contributor

Hi @grenki, I am very sorry for the late reply. Can you tell us what operating system you are using to run Sourcetrail?

As far as I know, the Python indexer uses the Python version of the Python environment that is configured in your Sourcetrail project settings. If nothing is configured, the environment will be auto detected. You can try to specify a Python 3.6 environment explicitly.

I tried to index the code snippet you provided and it worked without any errors for Sourcetrail 2019.4.102

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

No branches or pull requests

2 participants