Skip to content

Commit

Permalink
Merge pull request #22270 from mrclary/saveas
Browse files Browse the repository at this point in the history
PR: Remove a non-ascii file extension from QFileDialog filter
  • Loading branch information
dalthviz authored Jul 22, 2024
2 parents 42925e3 + d2b4ca5 commit 5c23422
Showing 1 changed file with 11 additions and 2 deletions.
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))
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

0 comments on commit 5c23422

Please sign in to comment.