Skip to content

Commit d0aba9c

Browse files
committed
Merge remote-tracking branch 'upstream/3.x' into find_in_files_bar
Merge!
2 parents b33dbf9 + 67857dd commit d0aba9c

File tree

11 files changed

+310
-41
lines changed

11 files changed

+310
-41
lines changed

Diff for: continuous_integration/circle/test-qt5.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ export PATH="$HOME/miniconda/bin:$PATH"
44
source activate test
55

66
# We use container 3 to test with pip
7-
if [ "$CIRCLE_NODE_INDEX" != "3" ]; then
7+
if [ "$CIRCLE_NODE_INDEX" = "0" ]; then
8+
# Skip Python 2.7 for now because it's failing frequently
9+
# and randomly at different places.
10+
exit 0
11+
elif [ "$CIRCLE_NODE_INDEX" != "3" ]; then
812
conda install -q qt=5.* pyqt=5.* qtconsole matplotlib
913
else
1014
pip install -q pyqt5

Diff for: spyder/app/mainwindow.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,10 @@ def create_edit_action(text, tr_text, icon):
925925
else:
926926
tut_action = None
927927

928+
shortcuts_action = create_action(self, _("Shortcuts Summary"),
929+
shortcut="Meta+F1",
930+
triggered=self.show_shortcuts_dialog)
931+
928932
#----- Tours
929933
self.tour = tour.AnimatedTour(self)
930934
self.tours_menu = QMenu(_("Interactive tours"))
@@ -946,7 +950,8 @@ def trigger(i=i, self=self): # closure needed!
946950

947951
self.tours_menu.addActions(self.tour_menu_actions)
948952

949-
self.help_menu_actions = [doc_action, tut_action, self.tours_menu,
953+
self.help_menu_actions = [doc_action, tut_action, shortcuts_action,
954+
self.tours_menu,
950955
MENU_SEPARATOR, report_action, dep_action,
951956
self.check_updates_action, support_action,
952957
MENU_SEPARATOR]
@@ -2622,6 +2627,12 @@ def apply_shortcuts(self):
26222627
for index in sorted(toberemoved, reverse=True):
26232628
self.shortcut_data.pop(index)
26242629

2630+
@Slot()
2631+
def show_shortcuts_dialog(self):
2632+
from spyder.widgets.shortcutssummary import ShortcutsSummaryDialog
2633+
dlg = ShortcutsSummaryDialog(None)
2634+
dlg.exec_()
2635+
26252636
# -- Open files server
26262637
def start_open_files_server(self):
26272638
self.open_files_server.setsockopt(socket.SOL_SOCKET,

Diff for: spyder/config/main.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@
389389
'editor/rotate kill ring': 'Shift+Meta+Y',
390390
'editor/kill previous word': 'Meta+Backspace',
391391
'editor/kill next word': 'Meta+D',
392-
'editor/start of document': 'Ctrl+Up',
393-
'editor/end of document': 'Ctrl+Down',
392+
'editor/start of document': 'Ctrl+Home',
393+
'editor/end of document': 'Ctrl+End',
394394
'editor/undo': 'Ctrl+Z',
395395
'editor/redo': 'Ctrl+Shift+Z',
396396
'editor/cut': 'Ctrl+X',
@@ -424,6 +424,8 @@
424424
'editor/close file 2': "Ctrl+F4",
425425
'editor/run cell': RUN_CELL_SHORTCUT,
426426
'editor/run cell and advance': RUN_CELL_AND_ADVANCE_SHORTCUT,
427+
'editor/go to next cell': 'Ctrl+Down',
428+
'editor/go to previous cell': 'Ctrl+Up',
427429
'editor/re-run last cell': RE_RUN_LAST_CELL_SHORTCUT,
428430
# -- In plugins/editor.py
429431
'editor/show/hide outline': "Ctrl+Alt+O",
@@ -657,7 +659,7 @@
657659
# or if you want to *rename* options, then you need to do a MAJOR update in
658660
# version, e.g. from 3.0.0 to 4.0.0
659661
# 3. You don't need to touch this value if you're just adding a new option
660-
CONF_VERSION = '33.1.0'
662+
CONF_VERSION = '33.2.0'
661663

662664
# Main configuration instance
663665
try:

Diff for: spyder/locale/fr/LC_MESSAGES/spyder.po

+35-28
Original file line numberDiff line numberDiff line change
@@ -94,23 +94,23 @@ msgstr "&Fichier"
9494

9595
#: spyder/app/mainwindow.py:576 spyder/plugins/editor.py:1373
9696
msgid "File toolbar"
97-
msgstr "Barre d'outil fichiers"
97+
msgstr "Barre d'outils fichiers"
9898

9999
#: spyder/app/mainwindow.py:580 spyder/plugins/editor.py:1386
100100
msgid "&Edit"
101101
msgstr "&Édition"
102102

103103
#: spyder/app/mainwindow.py:581 spyder/plugins/editor.py:1383
104104
msgid "Edit toolbar"
105-
msgstr "Barre d'outil édition"
105+
msgstr "Barre d'outils édition"
106106

107107
#: spyder/app/mainwindow.py:585 spyder/plugins/editor.py:1387
108108
msgid "&Search"
109109
msgstr "&Recherche"
110110

111111
#: spyder/app/mainwindow.py:586 spyder/plugins/editor.py:1375
112112
msgid "Search toolbar"
113-
msgstr "Barre d'outil de recherche"
113+
msgstr "Barre d'outils de recherche"
114114

115115
#: spyder/app/mainwindow.py:590 spyder/plugins/editor.py:1388
116116
msgid "Sour&ce"
@@ -127,15 +127,15 @@ msgstr "E&xécution"
127127

128128
#: spyder/app/mainwindow.py:596 spyder/plugins/editor.py:1379
129129
msgid "Run toolbar"
130-
msgstr "Barre d'outil exécution"
130+
msgstr "Barre d'outils exécution"
131131

132132
#: spyder/app/mainwindow.py:600 spyder/plugins/editor.py:750
133133
msgid "&Debug"
134134
msgstr "&Déboguer"
135135

136136
#: spyder/app/mainwindow.py:601 spyder/plugins/editor.py:1381
137137
msgid "Debug toolbar"
138-
msgstr "Barre d'outil de débogage"
138+
msgstr "Barre d'outils de débogage"
139139

140140
#: spyder/app/mainwindow.py:605
141141
msgid "C&onsoles"
@@ -241,7 +241,7 @@ msgstr "Mode plein écran"
241241

242242
#: spyder/app/mainwindow.py:757
243243
msgid "Main toolbar"
244-
msgstr "Barre d'outil principale"
244+
msgstr "Barre d'outils principale"
245245

246246
#: spyder/app/mainwindow.py:766
247247
msgid ""
@@ -410,7 +410,7 @@ msgstr "Afficher les barres d'outils"
410410

411411
#: spyder/app/mainwindow.py:1068
412412
msgid "Attached console window (debugging)"
413-
msgstr "Invite de commandes attaché (débogage)"
413+
msgstr "Invite de commandes attachée (débogage)"
414414

415415
#: spyder/app/mainwindow.py:1254 spyder/plugins/projects.py:247
416416
#: spyder/widgets/explorer.py:639 spyder/widgets/explorer.py:744
@@ -433,7 +433,7 @@ msgid ""
433433
"result in bugs. Please be sure that any found bugs are not the direct result "
434434
"of missing dependencies, prior to reporting a new issue."
435435
msgstr ""
436-
"<b>Spyder manque certaines dépendances</b><br><br><tt>%s</tt><br><b>Veuillez "
436+
"<b>Il manque certaines dépendances</b><br><br><tt>%s</tt><br><b>Veuillez "
437437
"les installer pour éviter ce message </b><br><br></i>Remarque</i>: Spyder "
438438
"pourrait fonctionner sans certaines de ces dépendances, mais pour avoir une "
439439
"bonne expérience lors de l'utilisation de Spyder nous <i>fortement</i> vous "
@@ -542,7 +542,7 @@ msgstr "Mises à jour de Spyder"
542542

543543
#: spyder/app/mainwindow.py:2758 spyder/plugins/configdialog.py:819
544544
msgid "Check for updates on startup"
545-
msgstr "Vérifier le mises à jour au démarrage"
545+
msgstr "Vérifier les mises à jour au démarrage"
546546

547547
#: spyder/app/mainwindow.py:2780
548548
msgid ""
@@ -552,6 +552,12 @@ msgid ""
552552
"please wait until new conda packages are available and use <code>conda</"
553553
"code> to perform the update.<hr>"
554554
msgstr ""
555+
"<hr><b>IMPORTANT:</b> il semble que vous utilisiez Spyder avec "
556+
"<b>Anaconda/Miniconda</b>. Il est <b>fortement</b> conseillé de ne pas "
557+
"recourir à <code>pip</code> pour le mettre à jour, puisqu'il est probable "
558+
"que cela casse votre installation.<br><br>À la place, il est suggéré de "
559+
"simplement attendre la disponibilité de nouveaux paquets conda avant "
560+
"d'utiliser <code>conda</code> pour effectuer la mise à jour.<hr>"
555561

556562
#: spyder/app/mainwindow.py:2790
557563
msgid ""
@@ -561,7 +567,7 @@ msgid ""
561567
"please refer to our <a href=\"%s\">Installation</a> instructions."
562568
msgstr ""
563569
"<b>Spyder %s est disponible!</b> <br><br>Utiliser le gestionnaire de paquets "
564-
"pour mettre Spyder à ou consultez le <a href=\"%s\">site</a> pour "
570+
"pour mettre à jour Spyder, consultez le <a href=\"%s\">site</a> pour "
565571
"télécharger le programme directement. <br><br>Si vous ne savez pas comment "
566572
"procéder pour mettre Spyder à jour, veuillez consulter notre <a href=\"%s"
567573
"\">documentation</a>."
@@ -649,9 +655,9 @@ msgid ""
649655
"the code.<br><br>You can also set debug breakpoints in the line number area, "
650656
"by doing a double click next to a non-empty line."
651657
msgstr ""
652-
"Dans ce volet, vous pouvez écrire le code Python avant de l'évaluer. Vous "
658+
"Dans ce volet, vous pouvez écrire du code Python avant de l'évaluer. Vous "
653659
"pouvez obtenir des suggestions et des complétions de code automatiques "
654-
"pendant l'écriture, en appuyant sur la touche <b>Tab</ b> située à côté d'un "
660+
"pendant l'écriture, en appuyant sur la touche <b>Tab</ b> à la suite d'un "
655661
"texte donné. Spyder affiche des avertissements et des erreurs de syntaxe. "
656662
"Ils peuvent vous aider à détecter les problèmes potentiels avant d'exécuter "
657663
"le code. <br> <br> Vous pouvez également définir des points d'arrêt de "
@@ -697,7 +703,7 @@ msgid ""
697703
msgstr ""
698704
"Dans ce volet, vous pouvez visualiser et éditer les variables générées lors "
699705
"de l'exécution d'un programme, ou celles entrées directement dans une des "
700-
"consoles Spyder. Comme vous pouvez le voir, l'Explorateur de variables "
706+
"consoles Spyder. Comme vous pouvez le voir, l'explorateur de variables "
701707
"affiche les variables générées au cours de la dernière étape de la visite "
702708
"interactive. En faisant un double-clic sur l'une d'elles, une nouvelle "
703709
"fenêtre s'ouvre, où vous pouvez inspecter et modifier leur contenu."
@@ -715,13 +721,13 @@ msgid ""
715721
"consoles are also connected to that pane, and that the Variable Explorer "
716722
"only shows the variables of the currently focused console."
717723
msgstr ""
718-
"Vous pouvez également exécuter votre code sur une console Python. Ces "
724+
"Vous pouvez également exécuter votre code dans une console Python. Ces "
719725
"consoles sont utiles car elles vous permettent d'exécuter un fichier dans "
720726
"une console dédiée uniquement à celui-ci. Pour sélectionner ce comportement, "
721727
"appuyez sur la touche <b>F6</b>. <br><br>En appuyant sur le bouton ci-"
722-
"dessous, puis En se concentrant sur l'Explorateur de variables, vous "
728+
"dessous, puis en retournant sur l'explorateur de variables, vous "
723729
"remarquerez que les consoles Python sont également connectées à ce volet et "
724-
"que l'Explorateur de variables ne montre que les variables de la console "
730+
"que l'explorateur de variables ne montre que les variables de la console "
725731
"actuellement sélectionnée."
726732

727733
#: spyder/app/tour.py:195 spyder/plugins/help.py:485 spyder/plugins/help.py:929
@@ -737,9 +743,10 @@ msgid ""
737743
"has some documentation associated with it, it will be displayed here."
738744
msgstr ""
739745
"Ce volet affiche la documentation des fonctions, classes, méthodes ou "
740-
"modules que vous utilisez actuellement dans l'Editeur ou dans les Consoles. "
741-
"<br><br>Pour l'utiliser, vous devez appuyer sur <b>Ctrl + I</ b> D'un objet. "
742-
"Si cet objet possède une documentation associée, il sera affiché ici."
746+
"modules que vous utilisez actuellement dans l'éditeur ou dans les consoles. "
747+
"<br><br>Pour l'utiliser, vous devez appuyer sur <b>Ctrl + I</ b> devant un "
748+
"objet. Si cet objet possède une documentation associée, cette dernière sera "
749+
"affichée ici."
743750

744751
#: spyder/app/tour.py:206
745752
msgid "The File Explorer"
@@ -756,7 +763,7 @@ msgstr ""
756763
"Ce volet vous permet de naviguer dans les répertoires et les fichiers "
757764
"présents dans votre ordinateur. <br><br> Vous pouvez également ouvrir l'un "
758765
"de ces fichiers avec l'application correspondante, en double-cliquant "
759-
"dessus. Une exception à cette règle: les fichiers texte sont toujours "
766+
"dessus. Une exception à cette règle : les fichiers texte sont toujours "
760767
"ouverts dans l'éditeur Spyder."
761768

762769
#: spyder/app/tour.py:217
@@ -804,7 +811,7 @@ msgid ""
804811
"Update LANGUAGE_CODES (inside config/base.py) if a new translation has been "
805812
"added to Spyder"
806813
msgstr ""
807-
"Mettre à jour LANGUAGE_CODES (à l'intérieur de config/ base.py) si une "
814+
"Mettre à jour LANGUAGE_CODES (à l'intérieur de config/base.py) si une "
808815
"nouvelle traduction a été ajoutée à Spyder"
809816

810817
#: spyder/config/ipython.py:23
@@ -1058,7 +1065,7 @@ msgstr ""
10581065

10591066
#: spyder/plugins/configdialog.py:863
10601067
msgid "Enable high DPI scaling"
1061-
msgstr "Activer la mise à l'échèle pour les écrans à haute résolution"
1068+
msgstr "Activer la mise à l'échelle pour les écrans à haute résolution"
10621069

10631070
#: spyder/plugins/configdialog.py:865
10641071
msgid "Set this for high DPI displays"
@@ -3105,7 +3112,7 @@ msgstr "Toujours afficher %s lors de la première exécution d'un script"
31053112

31063113
#: spyder/plugins/runconfig.py:44
31073114
msgid "Clear all variables before execution (IPython consoles)"
3108-
msgstr ""
3115+
msgstr "Effacer toutes les variables avant l'exécution (consoles IPython)"
31093116

31103117
#: spyder/plugins/runconfig.py:166 spyder/plugins/runconfig.py:486
31113118
msgid "General settings"
@@ -3200,14 +3207,14 @@ msgid ""
32003207
"(Press 'Tab' once to switch focus between the shortcut entry \n"
32013208
"and the buttons below it)"
32023209
msgstr ""
3203-
"Ecrivez le nouveau raccourci et sélectionnez 'OK':\n"
3210+
"Écrivez le nouveau raccourci et sélectionnez 'OK':\n"
32043211
"(Appuyez sur la touche 'Tab' une fois pour changer de focus entre l'entrée "
32053212
"de raccourci\n"
32063213
"et les boutons ci-dessous)"
32073214

32083215
#: spyder/plugins/shortcuts.py:140
32093216
msgid "Current shortcut:"
3210-
msgstr "Raccourci actuelle :"
3217+
msgstr "Raccourci actuel :"
32113218

32123219
#: spyder/plugins/shortcuts.py:142
32133220
msgid "New shortcut:"
@@ -3219,7 +3226,7 @@ msgstr "Raccourci clavier: {0}"
32193226

32203227
#: spyder/plugins/shortcuts.py:276
32213228
msgid "Please introduce a different shortcut"
3222-
msgstr "Merci de utiliser un raccourci clavier différent"
3229+
msgstr "Merci d'utiliser un raccourci clavier différent"
32233230

32243231
#: spyder/plugins/shortcuts.py:313
32253232
msgid "The new shorcut conflicts with:"
@@ -3229,7 +3236,7 @@ msgstr "Le nouveau raccourci "
32293236
msgid ""
32303237
"A compound sequence can have {break} a maximum of 4 subsequences.{break}"
32313238
msgstr ""
3232-
"A compound sequence can have {break} a maximum of 4 subsequences.{break}"
3239+
"Une séquence composée peut avoir {break} au plus 4 sous-séquences.{break}"
32333240

32343241
#: spyder/plugins/shortcuts.py:329
32353242
msgid "Invalid key entered"
@@ -3266,7 +3273,7 @@ msgstr "Raccourcis clavier"
32663273

32673274
#: spyder/plugins/shortcuts.py:791
32683275
msgid "Search: "
3269-
msgstr "Rechercher:"
3276+
msgstr "Rechercher :"
32703277

32713278
#: spyder/plugins/shortcuts.py:792
32723279
msgid "Reset to default values"

Diff for: spyder/utils/codeanalysis.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
#==============================================================================
2525
# Pyflakes/pep8 code analysis
2626
#==============================================================================
27-
TASKS_PATTERN = r"(^|#)[ ]*(TODO|FIXME|XXX|HINT|TIP|@todo)([^#]*)"
27+
TASKS_PATTERN = r"(^|#)[ ]*(TODO|FIXME|XXX|HINT|TIP|@todo|" \
28+
r"HACK|BUG|OPTIMIZE|!!!|\?\?\?)([^#]*)"
2829

2930
#TODO: this is a test for the following function
3031
def find_tasks(source_code):

Diff for: spyder/utils/tests/test_programs.py

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
INVALID_INTERPRETER = os.path.join(home_dir, 'miniconda', 'bin', 'ipython')
2828

2929

30+
@flaky(max_runs=10)
3031
@pytest.mark.skipif(os.name == 'nt' or os.environ.get('CI', None) is None,
3132
reason='gets stuck on Windows and fails sometimes locally') # FIXME
3233
def test_run_python_script_in_terminal(tmpdir, qtbot):

Diff for: spyder/widgets/editor.py

+24-4
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,14 @@ def create_shortcuts(self):
627627
context="Editor",
628628
name="run cell and advance",
629629
parent=self)
630+
go_to_next_cell = config_shortcut(self.advance_cell,
631+
context="Editor",
632+
name="go to next cell",
633+
parent=self)
634+
go_to_previous_cell = config_shortcut(lambda: self.advance_cell(reverse=True),
635+
context="Editor",
636+
name="go to previous cell",
637+
parent=self)
630638
re_run_last_cell = config_shortcut(self.re_run_last_cell,
631639
context="Editor",
632640
name="re-run last cell",
@@ -638,7 +646,7 @@ def create_shortcuts(self):
638646
save_all, save_as, close_all, prev_edit_pos, prev_cursor,
639647
next_cursor, zoom_in_1, zoom_in_2, zoom_out, zoom_reset,
640648
close_file_1, close_file_2, run_cell, run_cell_and_advance,
641-
re_run_last_cell]
649+
go_to_next_cell, go_to_previous_cell, re_run_last_cell]
642650

643651
def get_shortcut_data(self):
644652
"""
@@ -2031,14 +2039,26 @@ def run_cell(self):
20312039
def run_cell_and_advance(self):
20322040
"""Run current cell and advance to the next one"""
20332041
self.run_cell()
2042+
self.advance_cell()
2043+
2044+
def advance_cell(self, reverse=False):
2045+
"""Advance to the next cell.
2046+
2047+
reverse = True --> go to previous cell.
2048+
"""
2049+
if not reverse:
2050+
move_func = self.get_current_editor().go_to_next_cell
2051+
else:
2052+
move_func = self.get_current_editor().go_to_previous_cell
2053+
20342054
if self.focus_to_editor:
2035-
self.get_current_editor().go_to_next_cell()
2055+
move_func()
20362056
else:
20372057
term = QApplication.focusWidget()
2038-
self.get_current_editor().go_to_next_cell()
2058+
move_func()
20392059
term.setFocus()
20402060
term = QApplication.focusWidget()
2041-
self.get_current_editor().go_to_next_cell()
2061+
move_func()
20422062
term.setFocus()
20432063

20442064
def re_run_last_cell(self):

0 commit comments

Comments
 (0)