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

black.InvalidInput: Cannot parse: 1:0: #pylint: disable when its the first line in the file #63

Closed
markddavidoff opened this issue Aug 27, 2020 · 3 comments
Labels
question Further information is requested

Comments

@markddavidoff
Copy link

markddavidoff commented Aug 27, 2020

Getting the following error trying to run darker on a bunch of files when a git revision is specified with -r:

black.InvalidInput: Cannot parse: 1:0: #pylint: disable=missing-docstring, invalid-name, too-few-public-methods, too-many-lines

to : darker -r <revision> filepath

when the first line in the file is

#pylint: disable=missing-docstring, invalid-name, too-few-public-methods, too-many-lines
@markddavidoff
Copy link
Author

actually looking into it more, after removing that line, it still seems to error out, perhaps its the line in the revision?

@akaihola
Copy link
Owner

akaihola commented Sep 2, 2020

Thanks @markddavidoff,

black.InvalidInput: Cannot parse: 1:0: #pylint: disable=missing-docstring, invalid-name, too-few-public-methods, too-many-lines

doesn't look like an error from Darker itself, but from Black.

Do you think you could come up with a minimal example to reproduce this?

Also, what was the error when you removed the first line in the file?

What about if you use a different Black version?

@akaihola akaihola added the question Further information is requested label Sep 2, 2020
@markddavidoff
Copy link
Author

can't repro anymore, lets close this.

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

No branches or pull requests

2 participants