Merge ~afreiberger/charm-nagios:blacken-20.10 into ~nagios-charmers/charm-nagios:master

Proposed by Drew Freiberger
Status: Merged
Approved by: Alvaro Uria
Approved revision: 2692b61b9e5eb76aba52382f4af2e2303e0ba529
Merged at revision: 8d258b4fa088974a3983985467b96ce335ef89d6
Proposed branch: ~afreiberger/charm-nagios:blacken-20.10
Merge into: ~nagios-charmers/charm-nagios:master
Diff against target: 14 lines (+1/-2)
1 file modified
hooks/common.py (+1/-2)
Reviewer Review Type Date Requested Status
Alvaro Uria Approve
Drew Freiberger Needs Resubmitting
Review via email: mp+392352@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alvaro Uria (aluria) wrote :

I've added a comment inline (minor issue re: a docstring).

OTOH, the official repo for lp:charm-nagios will have to be changed to lp:~llama-charmers/charm-nagios (I can do it after this MP is merged).

review: Needs Fixing
Revision history for this message
Drew Freiberger (afreiberger) wrote :

how, how'd this pass lint?

Revision history for this message
Drew Freiberger (afreiberger) wrote :

flake8 ignore list skipped these checks, which is why only black discovered it.

ignore = # TODO remove most of these
    D100,
    D101,
    D102,
    D103,
    D107,

I've updated to a proper docstring vs comment.

review: Needs Resubmitting
Revision history for this message
Alvaro Uria (aluria) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/hooks/common.py b/hooks/common.py
2index b320880..3cc1bbe 100644
3--- a/hooks/common.py
4+++ b/hooks/common.py
5@@ -104,8 +104,7 @@ def get_ip_and_hostname(remote_unit, relation_id=None):
6
7
8 def refresh_hostgroups(): # noqa:C901
9- """ Not the most efficient thing but since we're only
10- parsing what is already on disk here its not too bad """
11+ """Parse the on-disk hostgroups and regenerate, removing any old hosts."""
12 hosts = [x["host_name"] for x in Model.Host.objects.all if x["host_name"]]
13
14 hgroups = {}

Subscribers

People subscribed via source and target branches