Giter Club home page Giter Club logo

Comments (5)

mottosso avatar mottosso commented on August 21, 2024

It's currently formatted (or linted, rather) using pylint and pyflake.

What inconsistency have you found? :)

from cmdx.

monkeez avatar monkeez commented on August 21, 2024

I did a test running it through Black:

monkeez@a5238ba

Some things it picked up where single quotes for strings in the protected decorator, condensing some function calls to single lines, single indents for nested arguments.

A lot of things are personal preference really, just thought I'd raise it as an option :)

from cmdx.

mottosso avatar mottosso commented on August 21, 2024

Commented on a few things in your commit. The main challenge I see is keeping both linters and Black happy. The secondary challenge is that clearly Black cannot make decisions about some of the things I commented about, like readability and newlines. So we would need to add exclusions either globally or line-by-line.

I'd say "pass".

Black is better suited with more chefs in the kitchen, or when the head-chef cannot keep consistent. I'd argue neither of those is the case here? I take readability and code communication very seriously. So instead of a one-size-fits-all solution like Black, my bet is on submitting an issue or PR with a specific section of code that does not read well, and address is head-on.

Those single-quote for example is a good example of an improvement, a PR would be lovely.

from cmdx.

monkeez avatar monkeez commented on August 21, 2024

Yeah, the only way to ignore sections in the formatter is to add comments, then you're ending up with a whole new mess.

cmdx has been very easy for me to read on the whole, the only formatting that kind of bothers me is the big levels on indentation in the Plug class:

image

Though I don't know of a better way to format it.

from cmdx.

mottosso avatar mottosso commented on August 21, 2024

Mm, agreed. Also cannot think of an improvement.

from cmdx.

Related Issues (20)

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.