Repository: asottile/covdefaults (language: python)

Issue:
coverage 6.x: might not need site-packages excludes ?



Discussion / hints:

Fix patch:
diff --git a/README.md b/README.md
index ba411e1..281cd5a 100644
--- a/README.md
+++ b/README.md
@@ -46,10 +46,8 @@ plugins = ["covdefaults"]
 branch = True
 source = .
 omit =
-    */.tox/*
     */__main__.py
     */setup.py
-    */venv*/*
 ```
 
 ### `[coverage:report]`
@@ -144,11 +142,11 @@ to the defaults provided by `covdefaults`.
 
 ```ini
 [covdefaults]
-subtract_omit = */.tox/*
+subtract_omit = */__main__.py
 ```
 
-this will result in `*/.tox/*` not being `omit`ted (`*/.tox/*` is among the
-defaults provided by `covdefaults`).
+this will result in `*/__main__.py` not being `omit`ted (`*/__main__.py` is
+among the defaults provided by `covdefaults`).
 
 #### `run:source`
 
diff --git a/covdefaults.py b/covdefaults.py
index dde93de..57cd55e 100644
--- a/covdefaults.py
+++ b/covdefaults.py
@@ -34,7 +34,7 @@ def _plat_impl_pragmas():  # type: () -> List[str]
     ('report:skip_covered', True),
 )
 EXTEND = (
-    ('run:omit', ['*/.tox/*', '*/__main__.py', '*/setup.py', '*/venv*/*']),
+    ('run:omit', ['*/__main__.py', '*/setup.py']),
     (
         'report:exclude_lines',
         [
diff --git a/setup.cfg b/setup.cfg
index d0e2043..12d10c7 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -24,7 +24,7 @@ classifiers =
 [options]
 py_modules = covdefaults
 install_requires =
-    coverage>=4.5
+    coverage>=6.0.2
 python_requires = >=3.6.1
 
 [bdist_wheel]


Test patch:
diff --git a/tests/covdefaults_test.py b/tests/covdefaults_test.py
index f7e480c..05388c1 100644
--- a/tests/covdefaults_test.py
+++ b/tests/covdefaults_test.py
@@ -51,21 +51,17 @@ def test_extends_existing_omit():
     cfg.set_option('run:omit', ['pre_commit/resources/*'])
     configure(cfg)
     assert cfg.get_option('run:omit') == [
-        '*/.tox/*',
         '*/__main__.py',
         '*/setup.py',
-        '*/venv*/*',
         'pre_commit/resources/*',
     ]
 
 
 def test_subtract_omit():
     cfg = CoverageConfig()
-    covdefaults.CovDefaults(subtract_omit='*/.tox/*').configure(cfg)
+    covdefaults.CovDefaults(subtract_omit='*/__main__.py').configure(cfg)
     assert cfg.get_option('run:omit') == [
-        '*/__main__.py',
         '*/setup.py',
-        '*/venv*/*',
     ]