* [gentoo-catalyst] [PATCH] lint: stop using old-style classes
@ 2015-10-06 3:48 Mike Frysinger
2015-10-06 6:39 ` Brian Dolbec
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2015-10-06 3:48 UTC (permalink / raw
To: gentoo-catalyst
Everyone has moved away from these in the python world.
---
.pylintrc | 2 +-
catalyst/builder.py | 2 +-
catalyst/config.py | 2 +-
catalyst/lock.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.pylintrc b/.pylintrc
index 7b42caf..5fdbb1f 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -37,7 +37,7 @@ load-plugins=
# unidiomatic-typecheck -- convert to isinstance
# redefined-outer-name -- clean up code to not do this
# <all the ones after redefined-outer-name in the list>
-disable=missing-docstring, too-many-lines, locally-enabled, locally-disabled, too-few-public-methods, too-many-public-methods, too-many-return-statements, too-many-branches, too-many-arguments, too-many-function-args, too-many-locals, too-many-statements, too-many-instance-attributes, fixme, broad-except, bad-whitespace, bad-continuation, invalid-name, line-too-long, pointless-string-statement, unused-wildcard-import, unidiomatic-typecheck, redefined-outer-name, attribute-defined-outside-init, bad-indentation, bare-except, global-statement, global-variable-not-assigned, import-error, mixed-indentation, multiple-statements, no-self-use, redefined-builtin, reimported, relative-import, superfluous-parens, super-init-not-called, unused-argument, unused-import, unused-variable, wildcard-import, bad-builtin, no-init
+disable=missing-docstring, too-many-lines, locally-enabled, locally-disabled, too-few-public-methods, too-many-public-methods, too-many-return-statements, too-many-branches, too-many-arguments, too-many-function-args, too-many-locals, too-many-statements, too-many-instance-attributes, fixme, broad-except, bad-whitespace, bad-continuation, invalid-name, line-too-long, pointless-string-statement, unused-wildcard-import, unidiomatic-typecheck, redefined-outer-name, attribute-defined-outside-init, bad-indentation, bare-except, global-statement, global-variable-not-assigned, mixed-indentation, multiple-statements, no-self-use, redefined-builtin, reimported, relative-import, superfluous-parens, super-init-not-called, unused-argument, unused-import, unused-variable, wildcard-import, bad-builtin, no-init, unreachable
[REPORTS]
diff --git a/catalyst/builder.py b/catalyst/builder.py
index ad27d78..3ba86c8 100644
--- a/catalyst/builder.py
+++ b/catalyst/builder.py
@@ -1,5 +1,5 @@
-class generic:
+class generic(object):
def __init__(self,myspec):
self.settings=myspec
diff --git a/catalyst/config.py b/catalyst/config.py
index 5d74dce..48d9c12 100644
--- a/catalyst/config.py
+++ b/catalyst/config.py
@@ -2,7 +2,7 @@
import re
from catalyst.support import CatalystError
-class ParserBase:
+class ParserBase(object):
filename = ""
lines = None
diff --git a/catalyst/lock.py b/catalyst/lock.py
index 9f954eb..c031258 100644
--- a/catalyst/lock.py
+++ b/catalyst/lock.py
@@ -24,7 +24,7 @@ class LockInUse(Exception):
print
-class LockDir:
+class LockDir(object):
locking_method=fcntl.flock
lock_dirs_in_use=[]
die_on_failed_lock=True
--
2.5.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-catalyst] [PATCH] lint: stop using old-style classes
2015-10-06 3:48 [gentoo-catalyst] [PATCH] lint: stop using old-style classes Mike Frysinger
@ 2015-10-06 6:39 ` Brian Dolbec
0 siblings, 0 replies; 2+ messages in thread
From: Brian Dolbec @ 2015-10-06 6:39 UTC (permalink / raw
To: gentoo-catalyst
On Mon, 5 Oct 2015 23:48:23 -0400
Mike Frysinger <vapier@gentoo.org> wrote:
> Everyone has moved away from these in the python world.
> ---
> .pylintrc | 2 +-
> catalyst/builder.py | 2 +-
> catalyst/config.py | 2 +-
> catalyst/lock.py | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/.pylintrc b/.pylintrc
> index 7b42caf..5fdbb1f 100644
> --- a/.pylintrc
> +++ b/.pylintrc
> @@ -37,7 +37,7 @@ load-plugins=
> # unidiomatic-typecheck -- convert to isinstance
> # redefined-outer-name -- clean up code to not do this
> # <all the ones after redefined-outer-name in the list>
> -disable=missing-docstring, too-many-lines, locally-enabled,
> locally-disabled, too-few-public-methods, too-many-public-methods,
> too-many-return-statements, too-many-branches, too-many-arguments,
> too-many-function-args, too-many-locals, too-many-statements,
> too-many-instance-attributes, fixme, broad-except, bad-whitespace,
> bad-continuation, invalid-name, line-too-long,
> pointless-string-statement, unused-wildcard-import,
> unidiomatic-typecheck, redefined-outer-name,
> attribute-defined-outside-init, bad-indentation, bare-except,
> global-statement, global-variable-not-assigned, import-error,
> mixed-indentation, multiple-statements, no-self-use,
> redefined-builtin, reimported, relative-import, superfluous-parens,
> super-init-not-called, unused-argument, unused-import,
> unused-variable, wildcard-import, bad-builtin, no-init
> +disable=missing-docstring, too-many-lines, locally-enabled,
> locally-disabled, too-few-public-methods, too-many-public-methods,
> too-many-return-statements, too-many-branches, too-many-arguments,
> too-many-function-args, too-many-locals, too-many-statements,
> too-many-instance-attributes, fixme, broad-except, bad-whitespace,
> bad-continuation, invalid-name, line-too-long,
> pointless-string-statement, unused-wildcard-import,
> unidiomatic-typecheck, redefined-outer-name,
> attribute-defined-outside-init, bad-indentation, bare-except,
> global-statement, global-variable-not-assigned, mixed-indentation,
> multiple-statements, no-self-use, redefined-builtin, reimported,
> relative-import, superfluous-parens, super-init-not-called,
> unused-argument, unused-import, unused-variable, wildcard-import,
> bad-builtin, no-init, unreachable [REPORTS] diff --git
> a/catalyst/builder.py b/catalyst/builder.py index ad27d78..3ba86c8
> 100644 --- a/catalyst/builder.py +++ b/catalyst/builder.py @@ -1,5
> +1,5 @@ -class generic: +class generic(object): def
> __init__(self,myspec): self.settings=myspec diff --git
> a/catalyst/config.py b/catalyst/config.py index 5d74dce..48d9c12
> 100644 --- a/catalyst/config.py +++ b/catalyst/config.py @@ -2,7 +2,7
> @@ import re from catalyst.support import CatalystError -class
> ParserBase: +class ParserBase(object): filename = "" lines = None
> diff --git a/catalyst/lock.py b/catalyst/lock.py index
> 9f954eb..c031258 100644 --- a/catalyst/lock.py +++ b/catalyst/lock.py
> @@ -24,7 +24,7 @@ class LockInUse(Exception): print -class LockDir:
> +class LockDir(object): locking_method=fcntl.flock
> lock_dirs_in_use=[]
> die_on_failed_lock=True
it's good.
--
Brian Dolbec <dolsen>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-06 6:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-06 3:48 [gentoo-catalyst] [PATCH] lint: stop using old-style classes Mike Frysinger
2015-10-06 6:39 ` Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox