Skip to content

Support .toml configuration format with --config flag#249

Merged
fsouza merged 2 commits intoPyCQA:mainfrom
bricker:bcr/2304/configfile-arg-toml-support
Apr 17, 2023
Merged

Support .toml configuration format with --config flag#249
fsouza merged 2 commits intoPyCQA:mainfrom
bricker:bcr/2304/configfile-arg-toml-support

Conversation

@bricker
Copy link
Copy Markdown
Contributor

@bricker bricker commented Apr 16, 2023

Fixes #193

Adds support for a TOML-formatted configuration file when using the --config command line argument.

Currently, passing a TOML file into the --config argument results in this error:

autoflake --config ./path/to/pyproject.toml test_me.py

#  File "[...]/.local/share/pyenv/versions/3.11.2/lib/python3.11/configparser.py", line 1132, in _read
#    raise e
# configparser.ParsingError: Source contains parsing errors: PosixPath('./path/to/pyproject.toml')

Copy link
Copy Markdown
Collaborator

@fsouza fsouza left a comment

Choose a reason for hiding this comment

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

Thank you!

@fsouza fsouza merged commit 780b44f into PyCQA:main Apr 17, 2023
fsouza added a commit that referenced this pull request Apr 18, 2023
This introduced a breaking change (#251).

This reverts commit 780b44f.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--config does not work with project.toml

2 participants