Skip to content

Strip prefix in attr_matches result#13943

Merged
Carreau merged 1 commit intoipython:mainfrom
krassowski:fix-attr_matches-prefix
Feb 13, 2023
Merged

Strip prefix in attr_matches result#13943
Carreau merged 1 commit intoipython:mainfrom
krassowski:fix-attr_matches-prefix

Conversation

@krassowski
Copy link
Copy Markdown
Member

@krassowski krassowski commented Feb 12, 2023

Fixes #13935

Reasoning behind implementation chosen:

  • a.b.c prefix in a.b.c.<tab> needs to be preserved as otherwise the completer will replace it with completion rather than appending (so we cannot just use .suffix, we need to use a.b.c.suffix here)
  • as in the issue we cannot use a b.suffix but need to use b.suffix or .suffix
  • d['a b'] prefix cannot be split using space splitting so we need to tokenize
  • however, we can do either a[0].suffix or .suffix

@Carreau Carreau added this to the 8.11 milestone Feb 13, 2023
@Carreau Carreau added this pull request to the merge queue Feb 13, 2023
@Carreau
Copy link
Copy Markdown
Member

Carreau commented Feb 13, 2023

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ipython==8.8.0 has weird tab completion bug

2 participants