Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

robotidy screws up the syntax in python files #227

Closed
DetachHead opened this issue Nov 9, 2021 · 1 comment · Fixed by #228
Closed

robotidy screws up the syntax in python files #227

DetachHead opened this issue Nov 9, 2021 · 1 comment · Fixed by #228

Comments

@DetachHead
Copy link
Contributor

DetachHead commented Nov 9, 2021

before:

def foo() -> None:
    if True:
        ...

command:

robotidy main.py

after:

def foo() -> None:
    if True:
...

i think robotidy should throw an error when you attempt to run it on a python file.

use case: i have vscode configured to run robotidy when saving .robot files, however there seems to be an issue with the extension i use where it sometimes attempts to run it on the wrong file (Gruntfuggly/triggertaskonsave#24), which means robotidy sometimes incorrectly runs on .py files

@bhirsz
Copy link
Member

bhirsz commented Nov 9, 2021

Thanks for the report - yeah it's not expected behaviour. You already found the place where robotidy takes care of paths in your attached PR -> we should update logic here so files provided from cli are also checked against our exclude/include options.

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

Successfully merging a pull request may close this issue.

2 participants