Merge ~rgildein/charm-homer-dashboard:bug1987139 into charm-homer-dashboard:master

Proposed by Robert Gildein
Status: Merged
Approved by: Eric Chen
Approved revision: 0663c0148b93b8ac0a6c0e458f3c8590fe3ed1c5
Merged at revision: fa7afb0fa9ca954c4439304532bac186d7755850
Proposed branch: ~rgildein/charm-homer-dashboard:bug1987139
Merge into: charm-homer-dashboard:master
Diff against target: 73 lines (+14/-5)
4 files modified
dev/null (+0/-0)
src/charm.py (+7/-4)
tests/unit/test_charm.py (+3/-1)
tox.ini (+4/-0)
Reviewer Review Type Date Requested Status
Eric Chen Approve
BootStack Reviewers Pending
Review via email: mp+428662@code.launchpad.net

Commit message

fix lint tests

fixes: #1987139

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Eric Chen (eric-chen) :
review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision fa7afb0fa9ca954c4439304532bac186d7755850

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/charm.py b/src/charm.py
2index 0377838..8ce8626 100755
3--- a/src/charm.py
4+++ b/src/charm.py
5@@ -14,13 +14,16 @@ application-dashboard relation.
6
7 import logging
8 import os
9-import yaml
10+from subprocess import CalledProcessError, check_call
11+
12 from ops.charm import CharmBase
13 from ops.framework import StoredState
14 from ops.main import main
15 from ops.model import ActiveStatus
16-from ops.model import ModelError, BlockedStatus, MaintenanceStatus
17-from subprocess import check_call, CalledProcessError
18+from ops.model import BlockedStatus, MaintenanceStatus, ModelError
19+
20+import yaml
21+
22
23 APACHE_ROOT_DIR = "/var/www/html/"
24 APACHE_ASSETS_DIR = APACHE_ROOT_DIR + "assets/"
25@@ -35,7 +38,7 @@ class HomerDashboardCharm(CharmBase):
26
27 _stored = StoredState()
28
29- def __init__(self, *args):
30+ def __init__(self, *args): # noqa
31 super().__init__(*args)
32 self.framework.observe(self.on.install, self._on_install)
33 self.framework.observe(self.on.start, self._on_start)
34diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py
35deleted file mode 100644
36index e69de29..0000000
37--- a/tests/unit/__init__.py
38+++ /dev/null
39diff --git a/tests/unit/test_charm.py b/tests/unit/test_charm.py
40index a7e4268..dabc8fc 100644
41--- a/tests/unit/test_charm.py
42+++ b/tests/unit/test_charm.py
43@@ -6,12 +6,14 @@
44 import unittest
45 from unittest.mock import Mock
46 from unittest.mock import patch
47-import yaml
48
49 from charm import HomerDashboardCharm
50
51 from ops.testing import Harness
52
53+import yaml
54+
55+
56 HOMER_TEST_CONFIG = "tests/unit/test_config.yml"
57
58
59diff --git a/tox.ini b/tox.ini
60index b238d2b..733439f 100644
61--- a/tox.ini
62+++ b/tox.ini
63@@ -35,6 +35,10 @@ deps =
64 flake8-colors
65
66 [flake8]
67+ignore =
68+ D100
69+ D101
70+ D102
71 exclude =
72 .git,
73 __pycache__,

Subscribers

People subscribed via source and target branches

to all changes: