summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-01-03 13:02:49 -0500
committerNed Batchelder <ned@nedbatchelder.com>2022-01-03 13:02:49 -0500
commit69af2a71929c60f31f629b36b180a86df5ca0564 (patch)
treeb8fe241eac0a9fc1da3e44605562f9a27b08dcb2
parent16fd431b079a024750e1b2a4b693a5b80dcf1900 (diff)
downloadpython-coveragepy-git-69af2a71929c60f31f629b36b180a86df5ca0564.tar.gz
refactor: no need to special-case spec.origin == "namespace"
Namespace packages used to have this value, but that was changed in 3.7: https://bugs.python.org/issue32305
-rw-r--r--coverage/inorout.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/coverage/inorout.py b/coverage/inorout.py
index 2ab7d493..25943cb1 100644
--- a/coverage/inorout.py
+++ b/coverage/inorout.py
@@ -124,8 +124,7 @@ def file_and_path_for_module(modulename):
pass
else:
if spec is not None:
- if spec.origin != "namespace":
- filename = spec.origin
+ filename = spec.origin
path = list(spec.submodule_search_locations or ())
return filename, path