Skip to content

Commit a3f4c34

Browse files
committed
make format
1 parent 3ca97f0 commit a3f4c34

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

linodecli/configuration/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ def plugin_get_value(self, key):
211211
# TODO: this is more of an argparsing function than it is a config function
212212
# might be better to move this to argparsing during refactor and just have
213213
# configuration return defaults or keys or something
214-
def update(self, namespace, allowed_defaults): #pylint: disable=too-many-branches
214+
def update(
215+
self, namespace, allowed_defaults
216+
): # pylint: disable=too-many-branches
215217
"""
216218
This updates a Namespace (as returned by ArgumentParser) with config values
217219
if they aren't present in the Namespace already.

tests/unit/configuration.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,17 @@ def test_update(self):
181181
parser.add_argument("--plugin-testplugin-testkey")
182182
ns = parser.parse_args(["--testkey", "testvalue"])
183183

184-
conf.username = 'tester'
185-
conf.config.add_section('tester')
186-
conf.config.set('tester', 'token', 'testtoken')
187-
conf.config.set('tester', 'newkey', 'newvalue')
188-
conf.config.set('tester', 'authorized_users', 'tester')
189-
conf.config.set('tester', 'plugin-testplugin-testkey', 'plugin-value')
190-
allowed_defaults = {'newkey', 'authorized_users', 'plugin-testplugin-testkey'}
184+
conf.username = "tester"
185+
conf.config.add_section("tester")
186+
conf.config.set("tester", "token", "testtoken")
187+
conf.config.set("tester", "newkey", "newvalue")
188+
conf.config.set("tester", "authorized_users", "tester")
189+
conf.config.set("tester", "plugin-testplugin-testkey", "plugin-value")
190+
allowed_defaults = {
191+
"newkey",
192+
"authorized_users",
193+
"plugin-testplugin-testkey",
194+
}
191195

192196
f = io.StringIO()
193197
with contextlib.redirect_stdout(f):

0 commit comments

Comments
 (0)