Utilities/InternalServices.py

branch
BgService
changeset 3177
5af61402d74d
parent 3173
1fb284abe46e
child 3209
c5432abceb25
equal deleted inserted replaced
3174:86047f5f4155 3177:5af61402d74d
81 @param line number where the error occured (int) 81 @param line number where the error occured (int)
82 @param index the column where the error occured (int) 82 @param index the column where the error occured (int)
83 @param code the part of the code where the error occured (str) 83 @param code the part of the code where the error occured (str)
84 @param error the name of the error (str) 84 @param error the name of the error (str)
85 @param warnings a list of strings containing the warnings 85 @param warnings a list of strings containing the warnings
86 (marker, file name, line number, message) 86 (marker, file name, line number, col, message, list(msg_args))
87 """ 87 """
88 for warning in warnings: 88 for warning in warnings:
89 # Translate messages 89 # Translate messages
90 msg_args = warning.pop() 90 msg_args = warning.pop()
91 translated = QApplication.translate( 91 translated = QApplication.translate(
92 'py3Flakes', warning[3]).format(*msg_args) 92 'py3Flakes', warning[4]).format(*msg_args)
93 # Avoid leading "u" at Python2 unicode strings 93 # Avoid leading "u" at Python2 unicode strings
94 if translated.startswith("u'"): 94 if translated.startswith("u'"):
95 translated = translated[1:] 95 translated = translated[1:]
96 warning[3] = translated.replace(" u'", " '") 96 warning[4] = translated.replace(" u'", " '")
97 97
98 self.syntaxChecked.emit( 98 self.syntaxChecked.emit(
99 fn, nok, fname, line, index, code, error, warnings) 99 fn, nok, fname, line, index, code, error, warnings)

eric ide

mercurial