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: Normalize file paths for correct handling of filenames for static code analysis #14305

Merged
merged 1 commit into from Nov 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion spyder/plugins/pylint/widgets/pylintgui.py
Expand Up @@ -267,7 +267,7 @@ def get_filename(self):
def set_filename(self, filename):
"""Set filename without performing code analysis."""
filename = to_text_string(filename) # filename is a QString instance

filename = osp.normpath(filename) # Normalize path for Windows
# Don't try to reload saved analysis for filename, if filename
# is the one currently displayed.
# Fixes spyder-ide/spyder#13347
Expand Down Expand Up @@ -323,6 +323,7 @@ def save_history(self):
list_save_files = []
for f in self.curr_filenames:
if _('untitled') not in f:
filename = osp.normpath(f)
list_save_files.append(f)
self.curr_filenames = list_save_files[:self.top_max_entries]
self.parent.set_option('history_filenames', self.curr_filenames)
Expand Down