unasync icon indicating copy to clipboard operation
unasync copied to clipboard

Add "# This file was automatically generated from ..." to generated code

Open pquentin opened this issue 7 years ago • 4 comments

This was originally https://github.com/python-trio/urllib3/issues/35

pquentin avatar Dec 05 '18 11:12 pquentin

One issue about this is that it's going to change all line numbers by one, which will impair debugging because it makes it harder to read sync tracebacks as if they were from the async code.

Since those generated files only end up in the installed package, is it important to add this comment? I'm not sure.

pquentin avatar Mar 21 '19 13:03 pquentin

@pquentin

If the issue is actual: why not to add this lines at the end of the file? It would keep the line numbers...

cdeler avatar Oct 09 '20 18:10 cdeler

@cdeler I can confirm now that keeping the line numbers is really important.

Adding this comment at the end is an interesting idea! I'm not sure who's going to see a line added at the bottom, but it doesn't hurt.

I'd accept a pull request that does that.

Thank you for your comment.

pquentin avatar Oct 09 '20 18:10 pquentin

Let me try :-) It sounds interesting

cdeler avatar Oct 09 '20 18:10 cdeler