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

PR: Remove a non-ascii file extension from QFileDialog filter #22270

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions spyder/config/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,16 @@ def _get_pygments_extensions():
lexer_exts = [le for le in lexer_exts if not le.endswith('_*')]
extensions = extensions + list(lexer_exts) + list(other_exts)

return sorted(list(set(extensions)))
extensions = list(set(extensions))

# A non-ascii file extension causes issues for macOS
# See spyder-ide/spyder#22248
try:
extensions.remove('.' + chr(128293))
dalthviz marked this conversation as resolved.
Show resolved Hide resolved
except ValueError:
pass

return sorted(extensions)


#==============================================================================
Expand Down Expand Up @@ -155,7 +164,7 @@ def get_edit_extensions():
supported by the Editor
"""
edit_filetypes = get_edit_filetypes()
return _get_extensions(edit_filetypes)+['']
return _get_extensions(edit_filetypes)


#==============================================================================
Expand Down
Loading