From 869033dc3970bb743df262bcba37c2f459c3b5ad Mon Sep 17 00:00:00 2001 From: Victor Zhou Date: Thu, 22 Aug 2019 16:42:50 -0700 Subject: [PATCH] Don't enforce coverage for untestable line To test this you would need to import an unused class into the module so that it's in `globals()`, and have the test know what class that is. Seems messy to me, and not worth what it would be testing. --- detect_secrets/plugins/common/initialize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detect_secrets/plugins/common/initialize.py b/detect_secrets/plugins/common/initialize.py index 44b516cdd..45998179f 100644 --- a/detect_secrets/plugins/common/initialize.py +++ b/detect_secrets/plugins/common/initialize.py @@ -158,7 +158,7 @@ def from_plugin_classname( klass = globals()[plugin_classname] # Make sure the instance is a BasePlugin type, before creating it. - if not issubclass(klass, BasePlugin): + if not issubclass(klass, BasePlugin): # pragma: no cover raise TypeError try: