File tree Expand file tree Collapse file tree 4 files changed +9
-15
lines changed
Expand file tree Collapse file tree 4 files changed +9
-15
lines changed Original file line number Diff line number Diff line change 2020
2121sys .path .insert (0 , os .path .abspath (".." ))
2222
23- import stagpy
23+ from stagpy . config import Config
2424
2525html_theme = "sphinx_rtd_theme"
2626
9393 """
9494 )
9595 )
96- for sec_fld in fields (stagpy .conf ):
96+ stagpy_conf = Config .default_ ()
97+ for sec_fld in fields (stagpy_conf ):
9798 sec_name = sec_fld .name
9899 fid .write (
99100 dedent (
107108 """ .format (sec_name )
108109 )
109110 )
110- section = getattr (stagpy . conf , sec_name )
111+ section = getattr (stagpy_conf , sec_name )
111112 for fld in fields (section ):
112113 opt = fld .name
113114 entry = section .meta_ (opt ).entry
Original file line number Diff line number Diff line change 1212 commits since the last stable version and the last commit hash. If you
1313 made modifications to the code that are not committed yet, the date of
1414 the last modification appears in the ``'.dYYYYMMDD' `` segment.
15-
16- .. data :: conf
17-
18- Global :class: `loam.manager.ConfigurationManager ` instance, holding
19- configuration options.
Original file line number Diff line number Diff line change 2020import sys
2121import typing
2222
23- from . import config
24-
2523if typing .TYPE_CHECKING :
2624 from typing import Any , NoReturn
2725
@@ -60,9 +58,5 @@ def sigint_handler(*_: Any) -> NoReturn:
6058except ImportError :
6159 __version__ = "unknown"
6260
63- conf = config .Config .default_ ()
64- if config .CONFIG_LOCAL .is_file ():
65- conf .update_from_file_ (config .CONFIG_LOCAL )
66-
6761if not DEBUG :
6862 signal .signal (signal .SIGINT , _PREV_INT )
Original file line number Diff line number Diff line change @@ -12,7 +12,11 @@ def main() -> None:
1212 if not DEBUG :
1313 signal .signal (signal .SIGINT , sigint_handler )
1414 warnings .simplefilter ("ignore" )
15- from . import args , conf , error
15+ from . import args , config , error
16+
17+ conf = config .Config .default_ ()
18+ if config .CONFIG_LOCAL .is_file ():
19+ conf .update_from_file_ (config .CONFIG_LOCAL )
1620
1721 try :
1822 args .parse_args (conf )(conf )
You can’t perform that action at this time.
0 commit comments