summaryrefslogtreecommitdiff
path: root/coverage/config.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-11-27 08:43:14 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-11-27 08:43:14 -0500
commit32f87fbe9997e95f9b8837a4c449c9a32c9b1842 (patch)
tree495602d96b1198805d9c017ae8c59e310fcfbcba /coverage/config.py
parent3bb3e5192f1f77faa433635c18835f1e085a99ac (diff)
downloadpython-coveragepy-git-32f87fbe9997e95f9b8837a4c449c9a32c9b1842.tar.gz
Avoid flags in regexes we combine
These regexes get piped together with other regexes, and flags not at the beginning of the regex raise DeprecationWarnings. Also, I'm not sure what the flag will do when combined with the other regexes. Also also, do people really use upper-case pragmas? --HG-- extra : amend_source : 0123e985b9ddba0a7ef18276816a05bdb3f8d170
Diffstat (limited to 'coverage/config.py')
-rw-r--r--coverage/config.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/coverage/config.py b/coverage/config.py
index 6750b793..ad3efa91 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -122,12 +122,12 @@ class HandyConfigParser(configparser.RawConfigParser):
# The default line exclusion regexes.
DEFAULT_EXCLUDE = [
- r'(?i)#\s*pragma[:\s]?\s*no\s*cover',
+ r'#\s*(pragma|PRAGMA)[:\s]?\s*(no|NO)\s*(cover|COVER)',
]
# The default partial branch regexes, to be modified by the user.
DEFAULT_PARTIAL = [
- r'(?i)#\s*pragma[:\s]?\s*no\s*branch',
+ r'#\s*(pragma|PRAGMA)[:\s]?\s*(no|NO)\s*(branch|BRANCH)',
]
# The default partial branch regexes, based on Python semantics.