From ed7b1cd3d7c8d36c4dcfa55326a10ccc4b6ad777 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sat, 6 Jun 2020 14:33:06 -0700 Subject: [PATCH] Add some no-cover pragmas on functions that don't need tests. --- borgmatic/hooks/cronhub.py | 4 +++- borgmatic/hooks/cronitor.py | 4 +++- borgmatic/hooks/healthchecks.py | 4 +++- borgmatic/hooks/pagerduty.py | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/borgmatic/hooks/cronhub.py b/borgmatic/hooks/cronhub.py index 3b95d3e4c..e0c496897 100644 --- a/borgmatic/hooks/cronhub.py +++ b/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. ''' diff --git a/borgmatic/hooks/cronitor.py b/borgmatic/hooks/cronitor.py index c1687708c..aa3e4fffc 100644 --- a/borgmatic/hooks/cronitor.py +++ b/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. ''' diff --git a/borgmatic/hooks/healthchecks.py b/borgmatic/hooks/healthchecks.py index 72ea943d1..ceeee2571 100644 --- a/borgmatic/hooks/healthchecks.py +++ b/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. diff --git a/borgmatic/hooks/pagerduty.py b/borgmatic/hooks/pagerduty.py index 01033c625..770934713 100644 --- a/borgmatic/hooks/pagerduty.py +++ b/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. '''