Skip to content

add support for reading doc8 config from pyproject.toml file#49

Merged
ssbarnea merged 3 commits intoPyCQA:masterfrom
swaldhoer:add-pyproject-support
Nov 27, 2020
Merged

add support for reading doc8 config from pyproject.toml file#49
ssbarnea merged 3 commits intoPyCQA:masterfrom
swaldhoer:add-pyproject-support

Conversation

@swaldhoer
Copy link
Contributor

This pull request

  • adds support for reading a doc8 configuration from a pyproject.toml file and
  • removes deprecated function readfp by read_file

Details:

  • Reading from ini-files has not been changed, except for removing the deprecated function call to a non-deprecated one
  • The pyproject.toml file is only taken into account if the toml package is available.
  • If a configuration file is passed as argument and the path is not a file, it is ignored and warning is printed. No other configuration files are taken into account, therefore the default configuratoin is used.

@swaldhoer swaldhoer changed the title add support for reading docconfig from pyproject.toml file add support for reading doc8 config from pyproject.toml file Sep 26, 2020
@swaldhoer
Copy link
Contributor Author

This Pull Request is WIP, as the pyproject configurations is not parsed into the exact same object as from the ini file.

@ssbarnea ssbarnea added the stale Not updated in long time, will be closed soon. label Oct 10, 2020
Copy link
Member

@ssbarnea ssbarnea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will also need some testing. Also it would a good idea to covert to draft if is not ready for reviews.

@swaldhoer swaldhoer marked this pull request as draft October 11, 2020 09:23
@swaldhoer
Copy link
Contributor Author

swaldhoer commented Oct 11, 2020

This will also need some testing. Also it would a good idea to covert to draft if is not ready for reviews.

I will add tests, that make sure that the configuration dict ist the same for the current configuation files and pyproject.toml

@ssbarnea ssbarnea marked this pull request as ready for review November 27, 2020 12:56
@ssbarnea ssbarnea added enhancement This issue/PR relates to a feature request. and removed stale Not updated in long time, will be closed soon. labels Nov 27, 2020
@ssbarnea ssbarnea merged commit 431faf9 into PyCQA:master Nov 27, 2020
@swaldhoer
Copy link
Contributor Author

erm why did this get merged? This implementation is not complaint with the current implemtation of how the *.doc8 is parsed.

In my opinion the way how *.doc8 is parsed is bad and it should be parsed the way it is done in this merge request. But this would be a breaking change. So this is something that needs to be discussed.

@swaldhoer swaldhoer deleted the add-pyproject-support branch January 10, 2021 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This issue/PR relates to a feature request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants