瀏覽代碼

Add some no-cover pragmas on functions that don't need tests.

Dan Helfman 5 年之前
父節點
當前提交
ed7b1cd3d7
共有 4 個文件被更改,包括 12 次插入4 次删除
  1. 3 1
      borgmatic/hooks/cronhub.py
  2. 3 1
      borgmatic/hooks/cronitor.py
  3. 3 1
      borgmatic/hooks/healthchecks.py
  4. 3 1
      borgmatic/hooks/pagerduty.py

+ 3 - 1
borgmatic/hooks/cronhub.py

@@ -13,7 +13,9 @@ MONITOR_STATE_TO_CRONHUB = {
 }
 
 
-def initialize_monitor(ping_url, config_filename, monitoring_log_level, dry_run):
+def initialize_monitor(
+    ping_url, config_filename, monitoring_log_level, dry_run
+):  # pragma: no cover
     '''
     No initialization is necessary for this monitor.
     '''

+ 3 - 1
borgmatic/hooks/cronitor.py

@@ -13,7 +13,9 @@ MONITOR_STATE_TO_CRONITOR = {
 }
 
 
-def initialize_monitor(ping_url, config_filename, monitoring_log_level, dry_run):
+def initialize_monitor(
+    ping_url, config_filename, monitoring_log_level, dry_run
+):  # pragma: no cover
     '''
     No initialization is necessary for this monitor.
     '''

+ 3 - 1
borgmatic/hooks/healthchecks.py

@@ -65,7 +65,9 @@ def format_buffered_logs_for_payload():
     return payload
 
 
-def initialize_monitor(ping_url_or_uuid, config_filename, monitoring_log_level, dry_run):
+def initialize_monitor(
+    ping_url_or_uuid, config_filename, monitoring_log_level, dry_run
+):  # pragma: no cover
     '''
     Add a handler to the root logger that stores in memory the most recent logs emitted. That
     way, we can send them all to Healthchecks upon a finish or failure state.

+ 3 - 1
borgmatic/hooks/pagerduty.py

@@ -12,7 +12,9 @@ logger = logging.getLogger(__name__)
 EVENTS_API_URL = 'https://events.pagerduty.com/v2/enqueue'
 
 
-def initialize_monitor(integration_key, config_filename, monitoring_log_level, dry_run):
+def initialize_monitor(
+    integration_key, config_filename, monitoring_log_level, dry_run
+):  # pragma: no cover
     '''
     No initialization is necessary for this monitor.
     '''