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

fix: resolve configuration file precedence issue #252

Closed
wants to merge 2 commits into from
Closed

fix: resolve configuration file precedence issue #252

wants to merge 2 commits into from

Conversation

paduszyk
Copy link

The package searches its configuration in some standard config files following a strict order:

  1. pyproject.toml
  2. setup.cfg
  3. tox.ini

That's great as enables variety of config schemes. The problem is that the searching loop is broken when it finds the file, not the actual configuration in it. So, if you want to define configuration in setup.cfg, but have other tool (e.g., black in my case) configured in pyproject.toml (or even if you define project metadata in that file, following PEP 621), docformatter does not see the desired settings.

In this PR, I propose a simple update of configuration.Configurater class constructor to resolve this issue.

@weibullguy weibullguy added P: enhancement Feature that is outside the scope of PEP 257 C: stakeholder Relates to docformatter stakeholder requested behavior labels Jul 11, 2023
Copy link
Member

@weibullguy weibullguy left a comment

Choose a reason for hiding this comment

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

There needs to be some tests for the new functionality.

@weibullguy weibullguy added the U: low A relatively low urgency issue label Jul 11, 2023
@paduszyk paduszyk closed this by deleting the head repository Nov 4, 2023
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 U: low A relatively low urgency issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants