This repository was archived by the owner on Jun 7, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -1244,7 +1244,7 @@ Yet another is that there is an internal error. The internal error message is:
12441244 //once all coaches are done, update div
12451245 Promise . allSettled ( results ) . then ( ( promises ) => {
12461246 for ( let p of promises ) {
1247- if ( p . status === 'fulfilled' && p . value != null ) {
1247+ if ( p . status === 'fulfilled' && p . value !== null && p . value . trim ( ) !== "" ) {
12481248 let checkDiv = document . createElement ( "div" ) ;
12491249 checkDiv . classList . add ( "python_check_results" ) ;
12501250 let checkPre = checkDiv . appendChild ( document . createElement ( "pre" ) ) ;
Original file line number Diff line number Diff line change @@ -26,11 +26,16 @@ export default class PyflakesCoach {
2626 //new pyflakes returns "file:line:col: error"
2727 //handle either
2828 const cleaner = / [ ^ . ] * .p y : ( \d + ) : ( \d + ) : ? ( .* ) / i;
29- let lineParts = line . match ( cleaner )
29+ let lineParts = line . match ( cleaner ) ; //[1]: line, [2]: col, [3]: error
3030
31- message += $ . i18n ( "msd_pyflakes_coach_line" ) + lineParts [ 1 ] + ": " + lineParts [ 3 ] + "\n" ;
32- message += codeLines [ lineParts [ 1 ] - 1 ] + "\n" ;
33- message += " " . repeat ( lineParts [ 2 ] - 1 ) + "^\n" ;
31+ //for now, filter messages about star imports
32+ if ( ! lineParts [ 3 ] . includes ( "defined from star imports" )
33+ && ! lineParts [ 3 ] . includes ( "*' used; unable to detect undefined names" ) )
34+ {
35+ message += $ . i18n ( "msd_pyflakes_coach_line" ) + lineParts [ 1 ] + ": " + lineParts [ 3 ] + "\n" ;
36+ message += codeLines [ lineParts [ 1 ] - 1 ] + "\n" ;
37+ message += " " . repeat ( lineParts [ 2 ] - 1 ) + "^\n" ;
38+ }
3439 } else {
3540 message += line + "\n" ;
3641 }
You can’t perform that action at this time.
0 commit comments