diff -r 349308e84eeb -r 772103b14c18 eric6/QScintilla/Editor.py --- a/eric6/QScintilla/Editor.py Mon Apr 12 19:05:23 2021 +0200 +++ b/eric6/QScintilla/Editor.py Mon Apr 12 19:21:40 2021 +0200 @@ -688,16 +688,12 @@ if not bindName and line0.startswith("#!"): # #! marker detection - if "python3" in line0: - bindName = "dummy.py" - self.filetype = "Python3" - elif "python" in line0: - bindName = "dummy.py" - self.filetype = "Python3" - elif "pypy3" in line0: - bindName = "dummy.py" - self.filetype = "Python3" - elif "pypy" in line0: + if ( + "python3" in line0 or + "python" in line0 or + "pypy3" in line0 or + "pypy" in line0 + ): bindName = "dummy.py" self.filetype = "Python3" elif ("/bash" in line0 or "/sh" in line0): @@ -5042,11 +5038,10 @@ self.__acTimer.start() else: self.__autoComplete(auto, context) - elif not auto: - self.autoCompleteQScintilla() elif ( - self.autoCompletionSource() != - QsciScintilla.AutoCompletionSource.AcsNone + not auto or + (self.autoCompletionSource() != + QsciScintilla.AutoCompletionSource.AcsNone) ): self.autoCompleteQScintilla() @@ -7901,13 +7896,10 @@ """ if self.__spellCheckStringsOnly: if ( - self.__fileNameExtension in - Preferences.getEditor("FullSpellCheckExtensions") - ): - return True - elif ( - not self.__fileNameExtension and - Preferences.getEditor("FullSpellCheckUnknown") + (self.__fileNameExtension in + Preferences.getEditor("FullSpellCheckExtensions")) or + (not self.__fileNameExtension and + Preferences.getEditor("FullSpellCheckUnknown")) ): return True else: