Skip to content

Commit

Permalink
python: conform to pylint 1.6 requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
trws committed Dec 29, 2016
1 parent 0875e9b commit 5234827
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 16 deletions.
2 changes: 0 additions & 2 deletions src/bindings/python/flux/__init__.py
Expand Up @@ -13,5 +13,3 @@
'sec',
'constants',
'Flux', ]


3 changes: 1 addition & 2 deletions src/bindings/python/flux/constants.py
@@ -1,8 +1,8 @@
"""Global constants for the flux interface"""

from flux._core import lib
import sys
import re
from flux._core import lib

MOD = sys.modules[__name__]
# Inject enum/define names matching ^FLUX_[A-Z_]+$ into module
Expand All @@ -14,4 +14,3 @@
ALL_LIST.append(k)

__all__ = ALL_LIST

2 changes: 1 addition & 1 deletion src/bindings/python/flux/core/watchers.py
@@ -1,5 +1,5 @@
from flux.core.inner import raw, ffi
import abc
from flux.core.inner import raw, ffi

__all__ = ['TimerWatcher', 'FDWatcher']

Expand Down
4 changes: 2 additions & 2 deletions src/bindings/python/flux/kvs.py
@@ -1,8 +1,8 @@
from _kvs import ffi, lib
from flux.wrapper import Wrapper, WrapperPimpl
import json
import collections
import errno
from flux._kvs import ffi, lib
from flux.wrapper import Wrapper, WrapperPimpl


class KVSWrapper(Wrapper):
Expand Down
12 changes: 7 additions & 5 deletions src/bindings/python/flux/kz.py
@@ -1,9 +1,10 @@
from _kz import ffi, lib
from flux.wrapper import Wrapper, WrapperPimpl
import errno
import os
import sys

from flux._kz import ffi, lib
from flux.wrapper import Wrapper, WrapperPimpl


class KZWrapper(Wrapper):
# This empty class accepts new methods, preventing accidental overloading
Expand All @@ -24,7 +25,7 @@ def generic_write(stream, string):

@ffi.callback('kz_ready_f')
def kz_stream_handler(kz_handle, arg):
del kz_handle # unused
del kz_handle # unused
(stream, prefix, handle) = ffi.from_handle(arg)
buf = ffi.new('char *[1]')
while True:
Expand Down Expand Up @@ -65,7 +66,7 @@ def attach(flux_handle,


def detach(flux_handle, key):
del flux_handle # unused
del flux_handle # unused
(_, _, handle) = KZWATCHES.pop(key, None)
return RAW.close(handle)

Expand Down Expand Up @@ -124,7 +125,8 @@ def __init__(self,
raise ValueError(
"flux_handle must be a valid Flux object or handle must be a "
"valid kvsdir cdata pointer")
self.pimpl = self.InnerWrapper(flux_handle, name, flags, handle, prefix)
self.pimpl = self.InnerWrapper(
flux_handle, name, flags, handle, prefix)

def __enter__(self):
"""Allow this to be used as a context manager"""
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/python/flux/message.py
@@ -1,8 +1,8 @@
import json
from flux.wrapper import Wrapper, WrapperPimpl
from flux.core.inner import ffi, lib, raw
from flux.core.watchers import Watcher
import flux.constants
import json

__all__ = ['Message',
'MessageWatcher',
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/python/flux/rpc.py
@@ -1,7 +1,7 @@
import json
from flux.wrapper import Wrapper, WrapperPimpl
from flux.core.inner import ffi, lib, raw
import flux.constants
import json


class RPC(WrapperPimpl):
Expand Down
4 changes: 2 additions & 2 deletions src/bindings/python/flux/wrapper.py
Expand Up @@ -230,9 +230,9 @@ def check_handle(self, name, fun_type):
else:
if self.filter_match:
raise AttributeError(
"Flux Wrapper object {}" +
"Flux Wrapper object " + str(self) +
"masks function {} type: {} match: {}".format(
self, name, fun_type, self.match))
name, fun_type, self.match))
return False

def check_wrap(self, fun, name):
Expand Down

0 comments on commit 5234827

Please sign in to comment.