eric7/DebugClients/Python/coverage/disposition.py

branch
eric7
changeset 8775
0802ae193343
parent 8312
800c432b34c8
child 8929
fcca2fa618bf
equal deleted inserted replaced
8774:d728227e8ebb 8775:0802ae193343
2 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt 2 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
3 3
4 """Simple value objects for tracking what to do with files.""" 4 """Simple value objects for tracking what to do with files."""
5 5
6 6
7 class FileDisposition(object): 7 class FileDisposition:
8 """A simple value type for recording what to do with a file.""" 8 """A simple value type for recording what to do with a file."""
9 pass 9 pass
10 10
11 11
12 # FileDisposition "methods": FileDisposition is a pure value object, so it can 12 # FileDisposition "methods": FileDisposition is a pure value object, so it can
27 27
28 28
29 def disposition_debug_msg(disp): 29 def disposition_debug_msg(disp):
30 """Make a nice debug message of what the FileDisposition is doing.""" 30 """Make a nice debug message of what the FileDisposition is doing."""
31 if disp.trace: 31 if disp.trace:
32 msg = "Tracing %r" % (disp.original_filename,) 32 msg = f"Tracing {disp.original_filename!r}"
33 if disp.original_filename != disp.source_filename:
34 msg += f" as {disp.source_filename!r}"
33 if disp.file_tracer: 35 if disp.file_tracer:
34 msg += ": will be traced by %r" % disp.file_tracer 36 msg += ": will be traced by %r" % disp.file_tracer
35 else: 37 else:
36 msg = "Not tracing %r: %s" % (disp.original_filename, disp.reason) 38 msg = f"Not tracing {disp.original_filename!r}: {disp.reason}"
37 return msg 39 return msg

eric ide

mercurial