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

Allow configuring exclude via configuration file #120

Closed
tuukkamustonen opened this issue Sep 26, 2022 · 4 comments · Fixed by #137
Closed

Allow configuring exclude via configuration file #120

tuukkamustonen opened this issue Sep 26, 2022 · 4 comments · Fixed by #137
Labels
C: stakeholder Relates to docformatter stakeholder requested behavior P: enhancement Feature that is outside the scope of PEP 257 S: merged Closed with work merged to repository
Milestone

Comments

@tuukkamustonen
Copy link

The code seems to work so that defaults from a configuration file are loaded before initializing the argument parser, and then using the loaded values as defaults.

However, exclude variable is loaded among others, but it's not used as argument parsing default.

Add it the same way as other.

@github-actions github-actions bot added the fresh This is a new issue label Sep 26, 2022
@weibullguy weibullguy added P: enhancement Feature that is outside the scope of PEP 257 C: stakeholder Relates to docformatter stakeholder requested behavior and removed fresh This is a new issue labels Sep 26, 2022
@weibullguy weibullguy added the V: minor Bumps the minor version label Dec 16, 2022
@weibullguy weibullguy added this to the v1.6.0 milestone Dec 16, 2022
@weibullguy weibullguy added the S: merged Closed with work merged to repository label Dec 29, 2022
@keshavgaddhyan
Copy link

keshavgaddhyan commented Jan 16, 2023

Hello,

I am not able to use the exclude flag as an option from config file.

[tool:docformatter] recursive = true wrap-summaries = 79 wrap-descriptions = 79 pre-summary-newline = true make-summary-multi-line = true exclude = ["order/"]

I want to exclude the directory order inside my project diapason.

The command I am running is docformatter --config /home/kgaddhyan/PycharmProjects/diapason/setup.cfg diapason

Could you please help provide an example of how we can do this?

@weibullguy
Copy link
Member

@keshavgaddhyan what version of docformatter are you using?

@keshavgaddhyan
Copy link

@weibullguy I am using 1.5.1.

I am fine to exclude the files using the CLI command directly as well instead of reading from config file. However, it does not seem to be working. The python project name is diapason and order is a folder inside it. Could you perhaps give me an example of how can i do this?

@weibullguy
Copy link
Member

@keshavgaddhyan using the configuration file for the exclude statement is not released yet. If you want to use it, you'd need to install from the github repository:

pip install git+https://github.com/PyCQA/docformatter.git@master

From the CLI, this should do the trick:

docformatter -r --exclude "order" diapason

@weibullguy weibullguy removed the V: minor Bumps the minor version label Jan 19, 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 S: merged Closed with work merged to repository
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants