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

Commit7594a7e

Browse files
committed
Make GlobalConfig more Sphinx-friendly
1 parent51b0871 commit7594a7e

File tree

2 files changed

+27
-19
lines changed

2 files changed

+27
-19
lines changed

‎docs/source/testgres.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ testgres.backup
1717
:undoc-members:
1818
:show-inheritance:
1919

20+
testgres.config
21+
---------------
22+
23+
..automodule::testgres.config
24+
:members:
25+
:undoc-members:
26+
:show-inheritance:
27+
:member-order: groupwise
28+
2029
testgres.connection
2130
-------------------
2231

‎testgres/config.py

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,39 @@
1414
classGlobalConfig(object):
1515
"""
1616
Global configuration object which allows user to override default settings.
17-
18-
Attributes:
19-
cache_initdb: shall we use cached initdb instance?
20-
cached_initdb_dir: path to a temp directory for cached initdb.
21-
cached_initdb_unique: shall we give new node a unique system id?
22-
23-
cache_pg_config: shall we cache pg_config results?
24-
25-
temp_dir: path to temp dir containing nodes with default 'base_dir'.
26-
27-
use_python_logging: enable python logging subsystem (see logger.py).
28-
error_log_lines: N of log lines to be shown in exceptions (0=inf).
29-
30-
node_cleanup_full: shall we remove EVERYTHING (including logs)?
31-
node_cleanup_on_good_exit: remove base_dir on nominal __exit__().
32-
node_cleanup_on_bad_exit: remove base_dir on __exit__() via exception.
33-
34-
NOTE: attributes must not be callable or begin with __.
3517
"""
18+
# NOTE: attributes must not be callable or begin with __.
3619

3720
cache_initdb=True
38-
_cached_initdb_dir=None
21+
""" shall we use cached initdb instance? """
22+
3923
cached_initdb_unique=False
24+
""" shall we give new node a unique system id? """
4025

4126
cache_pg_config=True
27+
""" shall we cache pg_config results? """
4228

4329
use_python_logging=False
30+
""" enable python logging subsystem (see logger.py). """
31+
4432
error_log_lines=20
33+
""" N of log lines to be shown in exceptions (0=inf). """
4534

4635
node_cleanup_full=True
36+
""" shall we remove EVERYTHING (including logs)? """
37+
4738
node_cleanup_on_good_exit=True
39+
""" remove base_dir on nominal __exit__(). """
40+
4841
node_cleanup_on_bad_exit=False
42+
""" remove base_dir on __exit__() via exception. """
43+
44+
_cached_initdb_dir=None
45+
""" underlying class attribute for cached_initdb_dir property """
4946

5047
@property
5148
defcached_initdb_dir(self):
49+
""" path to a temp directory for cached initdb. """
5250
returnself._cached_initdb_dir
5351

5452
@cached_initdb_dir.setter
@@ -60,6 +58,7 @@ def cached_initdb_dir(self, value):
6058

6159
@property
6260
deftemp_dir(self):
61+
""" path to temp dir containing nodes with default 'base_dir'. """
6362
returntempfile.tempdir
6463

6564
@temp_dir.setter

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp