diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2020-06-20 15:35:05 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2020-06-20 15:56:19 -0500 |
| commit | b3fb6aae1201faca1238b3c79e5e95ba57282bf1 (patch) | |
| tree | 7842799bea968299dcf4e2cdb66807cecff8310d /README.md | |
| parent | Revert Python 3.5 support (diff) | |
| download | config-file-b3fb6aae1201faca1238b3c79e5e95ba57282bf1.zip | |
Add more type hints to ConfigFile and lint all files
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -11,7 +11,7 @@ ## About Config File -The Config File project is designed to allow you to easily manipulate your +The Config File project is designed to allow you to easily manipulate your configuration files with the same simple API whether they are in INI, JSON, YAML, or TOML. For the time being, it only supports INI and JSON. @@ -49,7 +49,7 @@ from config_file import ConfigFile ORIGINAL_CONFIG_PATH = Path("~/some-project/some-other-config-file.ini") CONFIG_PATH = Path("~/some-project/config.ini") -# Our path can be a string or a Path object. +# Our path can be a string or a Path object. # The "~" will be automatically expanded to the full path for us. config = ConfigFile(CONFIG_PATH) @@ -66,7 +66,7 @@ print(config.get("section")) print(config.get("section", parse_types=True)) >>> {'first_key': 5, 'second_key': 'blah', 'third_key': True} -# Sometimes we want to retrieve a key but don't know whether or not +# Sometimes we want to retrieve a key but don't know whether or not # it will be set. In that case, we can set a default. print(config.get("section.unknown", default=False)) >>> False @@ -96,7 +96,7 @@ print(config.restore_original(original_file_path=ORIGINAL_CONFIG_PATH)) >>> True # Otherwise, a config.original.ini file will automatically be looked for in the -# current directory (because our configuration file we passed in was +# current directory (because our configuration file we passed in was # named config.ini). print(config.restore_original()) >>> True |