Some fixes for flake8
This commit is contained in:
parent
e68bae6409
commit
b1fecebd53
|
@ -1,7 +1,6 @@
|
|||
# vim:fileencoding=utf-8:noet
|
||||
|
||||
from __future__ import absolute_import
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
|
|
|
@ -56,7 +56,7 @@ class ConfigLoader(MultiRunnedThread):
|
|||
'''Register any function that will be called with given key each
|
||||
interval seconds (interval is defined at __init__). Its result is then
|
||||
passed to ``function``, but only if the result is true.
|
||||
|
||||
|
||||
:param function condition_function:
|
||||
Function which will be called each ``interval`` seconds. All
|
||||
exceptions from it will be ignored.
|
||||
|
@ -79,7 +79,6 @@ class ConfigLoader(MultiRunnedThread):
|
|||
:param set removed_functions:
|
||||
Set of functions previously passed to ``.register()`` method.
|
||||
'''
|
||||
removes = []
|
||||
with self.lock:
|
||||
for path, functions in list(self.watched.items()):
|
||||
functions -= removed_functions
|
||||
|
@ -127,7 +126,6 @@ class ConfigLoader(MultiRunnedThread):
|
|||
function(path)
|
||||
with self.lock:
|
||||
for key, functions in list(self.missing.items()):
|
||||
remove = False
|
||||
for condition_function, function in list(functions):
|
||||
try:
|
||||
path = condition_function(key)
|
||||
|
|
|
@ -18,8 +18,10 @@ from powerline.lib.humanize_bytes import humanize_bytes
|
|||
from powerline.theme import requires_segment_info
|
||||
from collections import namedtuple
|
||||
|
||||
|
||||
cpu_count = None
|
||||
|
||||
|
||||
@requires_segment_info
|
||||
def hostname(pl, segment_info, only_if_ssh=False, exclude_domain=False):
|
||||
'''Return the current hostname.
|
||||
|
|
|
@ -6,7 +6,6 @@ from tests import TestCase
|
|||
from tests.lib import replace_item
|
||||
from tests.lib.config_mock import swap_attributes, get_powerline, pop_events
|
||||
from copy import deepcopy
|
||||
from threading import Lock
|
||||
|
||||
|
||||
config = {
|
||||
|
|
Loading…
Reference in New Issue