Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added global config pyproject.toml #52 #65

Closed
wants to merge 30 commits into from

Conversation

dabauxi
Copy link
Contributor

@dabauxi dabauxi commented Dec 28, 2020

This should resolve the following issues raised in #52 (comment)
pylint findings were suppressed.

  • Running docformatter with no options doesn't work like it used to. It ought to print out a help message, but now it outputs a badly formatted line. I'd prefer the new functionality not degrade the existing use cases.
  • The linters (pydocstyle, pycodestyle, etc.) don't pass . The pylint findings could be suppressed if you want though. Run make to see the errors.

dabauxi and others added 28 commits May 19, 2020 15:37
@coveralls
Copy link

coveralls commented Dec 28, 2020

Coverage Status

Coverage decreased (-0.2%) to 99.306% when pulling de8cf6c on etimoz:global-config into 99099d5 on myint:master.

@PhilReinhold
Copy link

It would be great to have this merged. The ability to configure docformatter from a project file (even better pyproject.toml, which is existing for anyone using black) is critical when trying to use it as part of project contribution standards.

@ruohola
Copy link

ruohola commented Mar 30, 2021

Any update on this?

@fmigneault
Copy link

I would like to know if there is an update on this?
Also, is it possible to provide a --config option to pass another path?
I don't think the enforced config_args = _read_config("pyproject.toml") is the best approach, as it does not even allow using the .docformatter.example.ini.

@dabauxi
Copy link
Contributor Author

dabauxi commented Apr 15, 2021

Unfortunately I can't provide any update either when this gets merged.

Yes, I provided the option now to specify a path to the config via the --config argument which should give more flexibility. When the config path is provided via the cmd line it does not look for any other config files. However, passing additional arguments via the command line should have priority over the config.

The old .docformatter.example.ini file I missed to remove, shouldn't be there in the first place as this should support PEP-518.

@fmigneault
Copy link

@etimoz
Thanks for the quick update. I'm looking forward to this integration in a near future.

@rbowden91
Copy link

Currently, _merge_run_options seems to blow away all config options for me? The command line args all have default values (e.g., with no flags passed at the command line, args.recursive is False). So even if I specify recursive = true in pyproject.toml, _merge_run_options prioritizes the command line arguments (and their defaults), and so merged_args['recursive'] is always False. Unless I specify -r at the command-line, which defeats the purpose.

@dabauxi
Copy link
Contributor Author

dabauxi commented May 24, 2021

@rbowden91 you are right thanks. will look into it and fix it asap!

@weibullguy weibullguy added the S: duplicate Closed as a duplicate issue or PR label Jul 29, 2022
@weibullguy
Copy link
Member

Closing as duplicate to already merged #77.

@weibullguy weibullguy closed this Jul 29, 2022
@weibullguy weibullguy added P: enhancement Feature that is outside the scope of PEP 257 C: stakeholder Relates to docformatter stakeholder requested behavior labels Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: stakeholder Relates to docformatter stakeholder requested behavior P: enhancement Feature that is outside the scope of PEP 257 S: duplicate Closed as a duplicate issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants