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

Comma placement wonky when comment block between code and comma #472

Closed
madig opened this issue Aug 22, 2018 · 4 comments
Closed

Comma placement wonky when comment block between code and comma #472

madig opened this issue Aug 22, 2018 · 4 comments
Labels
F: comments The syntactic kind. Not in the language grammar, always on our minds. Best bugs. help wanted Extra attention is needed T: enhancement New feature or request

Comments

@madig
Copy link
Contributor

madig commented Aug 22, 2018

Operating system: Windows 10 1803 x64
Python version: 3.6.5
Black version: 18.6b4
Does also happen on master: Yes.

The following __init__ parameter list uses funky formatting that places commas on the next line instead of where they should be: https://github.com/googlefonts/fontbakery/blob/master/Lib/fontbakery/reporters/terminal.py#L174

This gets reformatted as

    def __init__(
        self,
        print_progress=True,
        stdout=sys.stdout,
        structure_threshold=None,
        usecolor=True,
        unicorn=True
        # a tuple of structural statuses to be skipped
        # e.g. (STARTSECTION, ENDSECTION)
        ,
        skip_status_report=None,
        **kwd,
    ):

The comma should probably be moved before the comment block... Weird corner case, yeah, but I thought I should report it.

@madig madig changed the title Comma detection wonky when comment block between code and comma Comma placement wonky when comment block between code and comma Aug 22, 2018
@zsol zsol added the T: bug Something isn't working label Aug 22, 2018
@ambv ambv added T: enhancement New feature or request and removed T: bug Something isn't working labels Sep 26, 2018
@ambv
Copy link
Collaborator

ambv commented Sep 26, 2018

It's not a bug, it's a feature request. The input looks like this:

class TerminalProgress(FontbakeryReporter):
  def __init__(self, print_progress=True
                   , stdout=sys.stdout
                   , structure_threshold=None
                   , usecolor=True
                   , unicorn=True
                     # a tuple of structural statuses to be skipped
                     # e.g. (STARTSECTION, ENDSECTION)
                   , skip_status_report=None
                   , **kwd):

I'm not even mad, I'm impressed.

@ambv ambv added the help wanted Extra attention is needed label May 7, 2019
@areebahmed04
Copy link

Hi @ambv, Can I work on this?

@JelleZijlstra
Copy link
Collaborator

@areebahmed04 contributions are welcome!

@JelleZijlstra JelleZijlstra added the F: comments The syntactic kind. Not in the language grammar, always on our minds. Best bugs. label May 30, 2021
@JelleZijlstra
Copy link
Collaborator

This feels like a special case of #379.

@JelleZijlstra JelleZijlstra closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: comments The syntactic kind. Not in the language grammar, always on our minds. Best bugs. help wanted Extra attention is needed T: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants