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

Support multi-line options in setup.cfg #97

Closed
asottile opened this issue Apr 3, 2021 · 7 comments
Closed

Support multi-line options in setup.cfg #97

asottile opened this issue Apr 3, 2021 · 7 comments

Comments

@asottile
Copy link
Member

asottile commented Apr 3, 2021

In GitLab by @Siebe on Apr 14, 2015, 24:06

When specifying excluded files in setup.cfg, all files need to be comma separated and on the same line. Version 2.3.0 is able to handle these comma separated files on multiple lines, version 2.4.0 isn't.

setup.cfg without multi-line:

[flake8]
exclude=spam,eggs,beans

setup.cfg with multi-line:

[flake8]
exclude=
    spam,
    eggs,
    beans

As an extra, the comma in the multi-line config is pretty useless. If it's possible, also make the comma optional.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @sigmavirus24 on Apr 14, 2015, 05:41

Could you please provide the full output from flake8 --version on 2.3.0 and 2.4.0?

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @Siebe on Apr 14, 2015, 06:14

2.3.0:

2.3.0 (pep8: 1.6.2, pyflakes: 0.8.1, mccabe: 0.3) CPython 2.7.9 on Linux

2.4.0:

2.4.0 (pep8: 1.5.7, pyflakes: 0.8.1, mccabe: 0.3) CPython 2.7.9 on Linux

Interesting that a newer version of flake8 uses an older version of pep8.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @sigmavirus24 on Apr 14, 2015, 06:31

That's documented in #51.

That aside, the config parsing is handled in pep8. This will regress with 1.6.3 (or whatever the pep8 maintainer actually releases).

This request should be made there.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @Siebe on Apr 14, 2015, 06:48

Since the config parsing works as expected when using pep8 1.6.2 and not with 1.5.7, I don't see the point in reporting an issue. The developers of pep8 will probably advise to upgrade.
flake8 2.4.0 uses an older version of pep8, so it seems like a regression at first, it actually is a downgrade. My guess is that flake8 should depend on a newer version of pep8 instead of an older version. If flake8 would depend on pep8 1.6.2 (or newer) the problem is solved. So I believe the issue should still be filed here.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @sigmavirus24 on Apr 14, 2015, 06:54

Please do some research into the issues described in #50 #37 and probably a few others (perhaps #48). The currently released branch of 1.6.x is very broken. We're restricting the version to give the best experience to the largest percentage of our users. If you want to use broken versions of pep8, pin to flake8 2.3.0. pep8 recently reverted the config changes they made which broke the 1.6.x series but they have not released a version that fixes the above mentioned issues.

We did not introduce any bugs. You should, therefore, be registering your complaints with the pep8 project.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @Siebe on Apr 14, 2015, 06:57

I see, point taken. Thanks for the explanation.

@asottile
Copy link
Member Author

asottile commented Apr 3, 2021

In GitLab by @sigmavirus24 on Mar 28, 2016, 14:22

mentioned in merge request !57

@asottile asottile closed this as completed Apr 3, 2021
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

No branches or pull requests

1 participant