Some fixes for flake8

This commit is contained in:
ZyX 2013-04-06 18:55:41 +04:00
parent e68bae6409
commit b1fecebd53
4 changed files with 3 additions and 5 deletions

View File

@ -1,7 +1,6 @@
# vim:fileencoding=utf-8:noet
from __future__ import absolute_import
import json
import os
import sys
import logging

View File

@ -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)

View File

@ -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.

View File

@ -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 = {