diff --git a/myhdl/_always.py b/myhdl/_always.py index 4cd806e8..fde8315c 100644 --- a/myhdl/_always.py +++ b/myhdl/_always.py @@ -41,7 +41,7 @@ _error.NrOfArgs = "decorated function should not have arguments" _error.DecNrOfArgs = "decorator should have arguments" -def _getSigdict(sigs, symdict): +def _get_sigdict(sigs, symdict): """Lookup signals in caller namespace and return sigdict Lookup signals in then namespace of a caller. This is used to add @@ -73,7 +73,7 @@ def always(*args): sigargs.append(arg.sig) elif not isinstance(arg, delay): raise AlwaysError(_error.DecArgType) - sigdict = _getSigdict(sigargs, callinfo.symdict) + sigdict = _get_sigdict(sigargs, callinfo.symdict) def _always_decorator(func): if not isinstance(func, FunctionType): @@ -111,20 +111,20 @@ class _Always(_Instantiator): bt = None break # now set waiter class - W = _Waiter + w = _Waiter if bt is delay: - W = _DelayWaiter + w = _DelayWaiter elif len(self.senslist) == 1: if bt is _Signal: - W = _SignalWaiter + w = _SignalWaiter elif bt is _WaiterList: - W = _EdgeWaiter + w = _EdgeWaiter else: if bt is _Signal: - W = _SignalTupleWaiter + w = _SignalTupleWaiter elif bt is _WaiterList: - W = _EdgeTupleWaiter - return W + w = _EdgeTupleWaiter + return w def genfunc(self): senslist = self.senslist diff --git a/myhdl/_always_seq.py b/myhdl/_always_seq.py index 0e525c27..056279c3 100644 --- a/myhdl/_always_seq.py +++ b/myhdl/_always_seq.py @@ -26,7 +26,7 @@ from types import FunctionType from myhdl import AlwaysError, intbv from myhdl._util import _isGenFunc from myhdl._Signal import _Signal, _WaiterList, _isListOfSigs -from myhdl._always import _Always, _getSigdict +from myhdl._always import _Always, _get_sigdict from myhdl._instance import _getCallInfo # evacuate this later @@ -70,7 +70,7 @@ def always_seq(edge, reset): reset._read = True reset._used = True sigargs.append(reset) - sigdict = _getSigdict(sigargs, callinfo.symdict) + sigdict = _get_sigdict(sigargs, callinfo.symdict) def _always_seq_decorator(func): if not isinstance(func, FunctionType): @@ -104,7 +104,7 @@ class _AlwaysSeq(_Always): func, senslist, callinfo=callinfo, sigdict=sigdict) if self.inouts: - raise AlwaysSeqError(_error.SigAugAssign, v.inouts) + raise AlwaysSeqError(_error.SigAugAssign, self.inouts) if self.embedded_func: raise AlwaysSeqError(_error.EmbeddedFunction) @@ -129,7 +129,7 @@ class _AlwaysSeq(_Always): def reset_vars(self): for v in self.varregs: # only intbv's for now - n, reg, init = v + _, reg, init = v reg._val = init def genfunc_reset(self): diff --git a/myhdl/_block.py b/myhdl/_block.py index 35cb5489..04644c3c 100644 --- a/myhdl/_block.py +++ b/myhdl/_block.py @@ -28,7 +28,7 @@ import myhdl from myhdl import BlockError, BlockInstanceError, Cosimulation from myhdl._instance import _Instantiator from myhdl._util import _flatten -from myhdl._extractHierarchy import (_MemInfo, _makeMemInfo, +from myhdl._extractHierarchy import (_makeMemInfo, _UserVerilogCode, _UserVhdlCode) from myhdl._Signal import _Signal, _isListOfSigs @@ -128,7 +128,7 @@ class _Block(object): raise BlockError(_error.ArgType) if isinstance(inst, (_Block, _Instantiator)): if not inst.modctxt: - raise BlockError(_error.InstanceError % (self.mod.name, inst.callername)) + raise BlockError(_error.InstanceError % (self.name, inst.callername)) def _updateNamespaces(self): # dicts to keep track of objects used in Instantiator objects diff --git a/myhdl/_compat.py b/myhdl/_compat.py index 64a38f7e..cdb7c06b 100644 --- a/myhdl/_compat.py +++ b/myhdl/_compat.py @@ -1,3 +1,5 @@ +#pylint: disable=all + import sys import types diff --git a/myhdl/_concat.py b/myhdl/_concat.py index a9a7d74d..dda5accd 100644 --- a/myhdl/_concat.py +++ b/myhdl/_concat.py @@ -17,6 +17,8 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# pylint: disable=redefined-builtin + """ module with the concat function. """ diff --git a/myhdl/_visitors.py b/myhdl/_visitors.py index 2e041245..fdbd6d17 100644 --- a/myhdl/_visitors.py +++ b/myhdl/_visitors.py @@ -1,3 +1,5 @@ +#pylint: disable=invalid-name + import ast from myhdl._intbv import intbv diff --git a/pylintrc b/pylintrc index e31aa453..f3cec68c 100644 --- a/pylintrc +++ b/pylintrc @@ -39,9 +39,9 @@ load-plugins= # no Warning level messages displayed, use"--disable=all --enable=classes # --disable=W" #disable= -#disabled for now: no docstring, no __init__, protected member access, -#too few public methods -disable=C0111, W0232, W0212, R0903 +#disabled for now +disable=missing-docstring,no-init,protected-access,too-few-public-methods, + old-style-class, too-many-branches, redefined-builtin [REPORTS] @@ -170,10 +170,10 @@ const-rgx=(([a-zA-Z_][a-zA-Z0-9_]*)|(__.*__))$ class-rgx=[A-Z_][a-zA-Z0-9]+$ # Regular expression which should only match correct function names -function-rgx=[a-z_][a-z0-9_]{2,30}$ +function-rgx=[a-z_][a-zA-Z0-9_]{2,30}$ # Regular expression which should only match correct method names -method-rgx=[a-z_][a-z0-9_]{2,30}$ +method-rgx=[a-z_][a-zA-Z0-9_]{2,30}$ # Regular expression which should only match correct instance attribute names attr-rgx=[a-z_][a-z0-9_]{2,30}$ @@ -210,7 +210,7 @@ docstring-min-length=-1 [DESIGN] # Maximum number of arguments for function / method -max-args=5 +max-args=7 # Argument names that match this expression will be ignored. Default to name # with leading underscore @@ -232,7 +232,7 @@ max-statements=50 max-parents=7 # Maximum number of attributes for a class (see R0902). -max-attributes=7 +max-attributes=13 # Minimum number of public methods for a class (see R0903). min-public-methods=2