pony icon indicating copy to clipboard operation
pony copied to clipboard

Compiled query code uses the source as the filename, confusing tools

Open nedbat opened this issue 3 years ago • 1 comments

Coverage.py has an issue about phantom code when using PonyORM: https://github.com/nedbat/coveragepy/issues/1136

The problem arises because of this line:

code = compile(src, src, 'eval')

This compiles src, but uses src as the filename also. This causes coverage.py to think there is a file with that name.

A common convention for synthetic filenames is to use angle brackets, and to indicate something about the origin. I can make a pull request to update this line if that's OK.

nedbat avatar Mar 19 '21 10:03 nedbat

#594 is a simple fix.

nedbat avatar Mar 19 '21 10:03 nedbat