38 from eric7.SystemUtilities import DesktopUtilities, OSUtilities |
38 from eric7.SystemUtilities import DesktopUtilities, OSUtilities |
39 from eric7.UI.Info import Program, Version |
39 from eric7.UI.Info import Program, Version |
40 |
40 |
41 |
41 |
42 def __showwarning( |
42 def __showwarning( |
43 message, category, filename, lineno, file=None, line="" # noqa: U100 |
43 message, category, filename, lineno, file=None, line=None # noqa: U100 |
44 ): |
44 ): |
45 """ |
45 """ |
46 Module function to raise a SyntaxError for a SyntaxWarning. |
46 Module function to raise a SyntaxError for a SyntaxWarning. |
47 |
47 |
48 @param message warning object |
48 @param message warning object |
51 @type SyntaxWarning |
51 @type SyntaxWarning |
52 @param filename name of the file causing the warning |
52 @param filename name of the file causing the warning |
53 @type str |
53 @type str |
54 @param lineno line number causing the warning |
54 @param lineno line number causing the warning |
55 @type int |
55 @type int |
56 @param file file to write the warning message to (ignored) |
56 @param file file to write the warning message to (unused) |
57 @type file |
57 @type file |
58 @param line line causing the warning (ignored) |
58 @param line line causing the warning (unused) |
59 @type int |
59 @type int |
60 @exception err exception of type SyntaxError |
60 @exception err exception of type SyntaxError |
61 """ |
61 """ |
62 if category is SyntaxWarning: |
62 if category is SyntaxWarning: |
63 err = SyntaxError(str(message)) |
63 err = SyntaxError(str(message)) |