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

Black deletes comment #2946

Closed
mangelozzi opened this issue Mar 22, 2022 · 1 comment
Closed

Black deletes comment #2946

mangelozzi opened this issue Mar 22, 2022 · 1 comment
Labels
F: comments The syntactic kind. Not in the language grammar, always on our minds. Best bugs. F: fmtskip fmt: skip implementation R: duplicate This issue or pull request already exists T: bug Something isn't working

Comments

@mangelozzi
Copy link

Black v22.1.0

The comment # IP6 address can look very different due to zero padding dissppears after black formatting.

Playground link

Options

--line-length=88
--safe

Input

class DnsEntries(ScriptSection):
    @classmethod
    def main(cls):
        Cmd.verify("Record 1: IP4 address", Cfg.IP4, result)
        # IP6 address can look very different due to zero padding
        ip6 = Cmd.run(['dig', '-t', 'AAAA', Cfg.DOMAIN, '+short'], text=True, capture_output=True).stdout.strip()  # fmt: skip

Output

class DnsEntries(ScriptSection):
    @classmethod
    def main(cls):
        Cmd.verify("Record 1: IP4 address", Cfg.IP4, result)
        ip6 = Cmd.run(['dig', '-t', 'AAAA', Cfg.DOMAIN, '+short'], text=True, capture_output=True).stdout.strip()  # fmt: skip

Expected

class DnsEntries(ScriptSection):
    @classmethod
    def main(cls):
        Cmd.verify("Record 1: IP4 address", Cfg.IP4, result)
        # IP6 address can look very different due to zero padding
        ip6 = Cmd.run(['dig', '-t', 'AAAA', Cfg.DOMAIN, '+short'], text=True, capture_output=True).stdout.strip()  # fmt: skip
@felix-hilden felix-hilden added T: bug Something isn't working F: comments The syntactic kind. Not in the language grammar, always on our minds. Best bugs. F: fmtskip fmt: skip implementation labels Mar 22, 2022
@felix-hilden
Copy link
Collaborator

I believe this is a duplicate of #2339, so let's continue the discussion there!

@felix-hilden felix-hilden added the R: duplicate This issue or pull request already exists label Mar 22, 2022
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. F: fmtskip fmt: skip implementation R: duplicate This issue or pull request already exists T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants