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

Wildcard warning fix #2064

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jboero
Copy link

@jboero jboero commented Mar 11, 2024

No longer suggests using wildcards when you've used wildcards.

@pep8speaks
Copy link

pep8speaks commented Mar 11, 2024

Hello @jboero! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 606:17: E128 continuation line under-indented for visual indent
Line 607:17: E128 continuation line under-indented for visual indent

Comment last updated at 2024-03-27 11:42:25 UTC

@jboero
Copy link
Author

jboero commented Mar 13, 2024

Hi @pep8speaks not sure if you're a bot or human but the code works fine for me. The not '*' in text is valid.

@m-blaha
Copy link
Member

m-blaha commented Mar 13, 2024

Yeah, it works. But according to PEP 8 the syntax should be '*' not in args[0].

@MarkBenjamin
Copy link

A suggestion:

        if not matches:
            if args[0].startswith("*/"):
                raise dnf.exceptions.Error(_('No matches found.'))
            raise dnf.exceptions.Error(_('No matches found. If searching for a file, '
                                         'try specifying the full path or using a '
                                         'wildcard prefix ("*/") at the beginning.'))

@jboero
Copy link
Author

jboero commented Mar 27, 2024

Wildcards don't technically need to be at the front though. Hmm let me try the original suggestion first.

@jboero
Copy link
Author

jboero commented Mar 27, 2024

These failures look like false negatives to me now. The behaviour affects test expectations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants