Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit06ce6e2

Browse files
committed
fix ProcessProxy's __repr__() according to guidelines
1 parent71e487e commit06ce6e2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎testgres/node.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,17 @@ class ProcessProxy(object):
7575
ptype: instance of ProcessType
7676
"""
7777

78-
def__init__(self,process):
78+
def__init__(self,process,ptype=None):
7979
self.process=process
80-
self.ptype=ProcessType.from_process(process)
80+
self.ptype=ptypeorProcessType.from_process(process)
8181

8282
def__getattr__(self,name):
8383
returngetattr(self.process,name)
8484

8585
def__repr__(self):
86-
return'{} : {}'.format(str(self.ptype),repr(self.process))
86+
return'{}(ptype={}, process={})'.format(self.__class__.__name__,
87+
str(self.ptype),
88+
repr(self.process))
8789

8890

8991
classPostgresNode(object):
@@ -980,9 +982,7 @@ def replicate(self, name=None, slot=None, **kwargs):
980982
backup=self.backup(**kwargs)
981983

982984
# transform backup into a replica
983-
returnbackup.spawn_replica(name=name,
984-
destroy=True,
985-
slot=slot)
985+
returnbackup.spawn_replica(name=name,destroy=True,slot=slot)
986986

987987
defcatchup(self,dbname=None,username=None):
988988
"""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp