GithubHelp home page GithubHelp logo

flake8 support about tox-ini-fmt HOT 4 CLOSED

tox-dev avatar tox-dev commented on June 4, 2024
flake8 support

from tox-ini-fmt.

Comments (4)

jugmac00 avatar jugmac00 commented on June 4, 2024

All possible options for flake8: 🙈
https://flake8.pycqa.org/en/latest/user/options.html

from tox-ini-fmt.

gaborbernat avatar gaborbernat commented on June 4, 2024

We don't have to support all out of box 🤔 maybe a few common ones just first and iterate on it.

from tox-ini-fmt.

jugmac00 avatar jugmac00 commented on June 4, 2024

I gave this a shot and it kinda works, but once again there is this "comment" topic.

While #42 is about deleted comments, when parsing one of my production tox.ini files with a flake8 section I encountered the problem of inline comments. Allowed or not ( tox-dev/tox#50 ), they work for third party tools.

[flake8]
ignore =
    W504, # line break after binary operator
quiet = 1

Whereas the comment in theConfigParser._read function says inline comments get stripped, this one does not:
https://github.com/python/cpython/blob/96a60ae90c291d94c058c80351fa38b6d73eda92/Lib/configparser.py#L567

(Update -> we do not set an inline-comment-prefix and so it defaults to None)

(Pdb++) parser[section_name]
<Section: flake8>
(Pdb++) parser[section_name].items()
ItemsView(<Section: flake8>)
(Pdb++) list(parser[section_name].items())
[('ignore', '\nW504, # line break after binary operator')]

So, before going down the rabbithole and debugging ConfigParser itself...

What's your take on the whole comment story?

from tox-ini-fmt.

gaborbernat avatar gaborbernat commented on June 4, 2024

These nowadays should live within pyproject.toml so this will be a won't do.

from tox-ini-fmt.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.