Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
  • Loading branch information
mrclary and ccordoba12 authored Jan 21, 2025
1 parent 66a8f00 commit def6dae
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions spyder/plugins/pythonpath/widgets/pathmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,20 @@ def export_pythonpath(self):
return

user_paths = self.get_user_paths()
active_user_paths = OrderedDict({p: v for p, v in user_paths.items() if v})
new_user_paths = OrderedDict({p: v for p, v in user_paths.items() if not v})
active_user_paths = OrderedDict(
{p: v for p, v in user_paths.items() if v}
)
new_user_paths = OrderedDict(
{p: v for p, v in user_paths.items() if not v}
)

system_paths = self.get_system_paths()
active_system_paths = OrderedDict({p: v for p, v in system_paths.items() if v})
inactive_system_paths = OrderedDict({p: v for p, v in system_paths.items() if not v})
active_system_paths = OrderedDict(
{p: v for p, v in system_paths.items() if v}
)
inactive_system_paths = OrderedDict(
{p: v for p, v in system_paths.items() if not v}
)

# Desired behavior is active_user | active_system, but Python 3.8 does
# not support | operator for OrderedDict.
Expand Down Expand Up @@ -435,7 +443,8 @@ def update_paths(
system_paths=None,
prioritize=None
):
"""Update path attributes.
"""
Update path attributes.
These attributes should only be set in this method and upon activating
the dialog. They should remain fixed while the dialog is active and are
Expand Down

0 comments on commit def6dae

Please sign in to comment.