Merged
Conversation
This offers us a generic way to drill down the config values and return only relevant sections if desired.
Since it's a `toml` file we can inherit from `TomlParser` and delegate parsing the file to the parent class.
This name better reflects the style of a `pyproject.toml` file
This will be used to open config files to pass to config parsers
871af05 to
e7ed6a2
Compare
Using a file stream for the config parsers means we can separate concerns more and have the parsers only responsible for parsing a file stream, as opposed to opening and file and then parsing it.
We're not opening any files now in this parser so we can remove this catch
e7ed6a2 to
17b3bd3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for using file streams in the config parsers, rather than
passing in file paths. This means the config parsers are only responsible for
parsing the file contents, rather than opening the file and then parsing the
content. This also allows us to move integration tests for the parsers (since
they depended on the filesystem) to unit tests as we can now pass in in-memory
file streams to the config parsers.
section_keytoTomlParserPyprojectParser