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

False negative for TC003 long message not detected #31

Open
Pierre-Sassoulas opened this issue Sep 21, 2021 · 2 comments
Open

False negative for TC003 long message not detected #31

Pierre-Sassoulas opened this issue Sep 21, 2021 · 2 comments
Assignees
Labels
bug Something isn't working hacktoberfest help wanted Extra attention is needed

Comments

@Pierre-Sassoulas
Copy link

Hello again :)

The following code is not raising a TC003 but I think it should:

import numpy as np


def check_a_b(a: np.ndarray, b: np.ndarray) -> None:
    if len(a) != len(b):
        raise ValueError(
            "cezczeczeczecezczeczecnezklcnzelkczkenclkzecnzeklck"
            f"({len(a)})zedenzcklzelkcnzelcknzeklcnzelkncklzeckl"
            f"({len(b)})dzekckezncknzecklnzeklczkelcklzencknzeck"
        )
@guilatrova
Copy link
Owner

Thanks for reporting! I'll take a look and fix this scenario as soon as I have time 🙏

@guilatrova guilatrova added the bug Something isn't working label Sep 22, 2021
@guilatrova guilatrova added help wanted Extra attention is needed hacktoberfest labels Oct 3, 2021
@rodrigogiraoserrao
Copy link
Contributor

I was coming here to raise this issue as well.
I managed to realise that TC003 isn't raised with f-strings.

I also found out that it doesn't appear to issue a TC003 when it's just one long “word”.

So, the following is flagged with TC003:

raise ValueError("01234567890123456789 12345678901234567890123456789")

But none of these two are:

raise ValueError("01234567890123456789012345678901234567890123456789")
raise ValueError(f"01234567890123456789 12345678901234567890123456789")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants