summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-11-21 09:36:12 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-11-21 09:36:12 -0500
commit8643f41bfe1fe7ab19184f30130ff1f95140eceb (patch)
tree41a8861b8a5c63912d3d0806449abe234c41057e
parent1ac09127438adac06de02172e4fad34d7b096be3 (diff)
downloadpython-coveragepy-git-8643f41bfe1fe7ab19184f30130ff1f95140eceb.tar.gz
refactor: super-nit-picky tweaks from mypy
-rw-r--r--coverage/execfile.py2
-rw-r--r--coverage/files.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/coverage/execfile.py b/coverage/execfile.py
index 2ee2f725..01ddd0cd 100644
--- a/coverage/execfile.py
+++ b/coverage/execfile.py
@@ -293,7 +293,7 @@ def make_code_from_pyc(filename):
# match or we won't run the file.
magic = fpyc.read(4)
if magic != PYC_MAGIC_NUMBER:
- raise NoCode(f"Bad magic number in .pyc file: {magic} != {PYC_MAGIC_NUMBER}")
+ raise NoCode(f"Bad magic number in .pyc file: {magic!r} != {PYC_MAGIC_NUMBER!r}")
date_based = True
if env.PYBEHAVIOR.hashed_pyc_pep552:
diff --git a/coverage/files.py b/coverage/files.py
index afb0dbf5..3cf87faa 100644
--- a/coverage/files.py
+++ b/coverage/files.py
@@ -137,9 +137,9 @@ if env.WINDOWS:
return actpath
else:
- def actual_path(filename):
+ def actual_path(path):
"""The actual path for non-Windows platforms."""
- return filename
+ return path
@contract(returns='unicode')