342 " warnings module uses a stacklevel of 1 by default. This will only show a" |
342 " warnings module uses a stacklevel of 1 by default. This will only show a" |
343 " stack trace for the line on which the warn method is called." |
343 " stack trace for the line on which the warn method is called." |
344 " It is therefore recommended to use a stacklevel of 2 or" |
344 " It is therefore recommended to use a stacklevel of 2 or" |
345 " greater to provide more information to the user.", |
345 " greater to provide more information to the user.", |
346 ), |
346 ), |
347 "M529":QCoreApplication.translate( |
347 "M529": QCoreApplication.translate( |
348 "MiscellaneousChecker", |
348 "MiscellaneousChecker", |
349 "Using 'except ():' with an empty tuple does not handle/catch " |
349 "Using 'except ():' with an empty tuple does not handle/catch " |
350 "anything. Add exceptions to handle.", |
350 "anything. Add exceptions to handle.", |
351 ), |
351 ), |
352 "M530":QCoreApplication.translate( |
352 "M530": QCoreApplication.translate( |
353 "MiscellaneousChecker", |
353 "MiscellaneousChecker", |
354 "Except handlers should only be names of exception classes", |
354 "Except handlers should only be names of exception classes", |
355 ), |
355 ), |
356 "M531":QCoreApplication.translate( |
356 "M531": QCoreApplication.translate( |
357 "MiscellaneousChecker", |
357 "MiscellaneousChecker", |
358 "Using the generator returned from 'itertools.groupby()' more than once" |
358 "Using the generator returned from 'itertools.groupby()' more than once" |
359 " will do nothing on the second usage. Save the result to a list, if the" |
359 " will do nothing on the second usage. Save the result to a list, if the" |
360 " result is needed multiple times.", |
360 " result is needed multiple times.", |
361 ), |
361 ), |
362 "M532":QCoreApplication.translate( |
362 "M532": QCoreApplication.translate( |
363 "MiscellaneousChecker", |
363 "MiscellaneousChecker", |
364 "Possible unintentional type annotation (using ':'). Did you mean to" |
364 "Possible unintentional type annotation (using ':'). Did you mean to" |
365 " assign (using '=')?", |
365 " assign (using '=')?", |
366 ), |
366 ), |
367 "M533":QCoreApplication.translate( |
367 "M533": QCoreApplication.translate( |
368 "MiscellaneousChecker", |
368 "MiscellaneousChecker", |
369 "Sets should not contain duplicate items. Duplicate items will be replaced" |
369 "Sets should not contain duplicate items. Duplicate items will be replaced" |
370 " with a single item at runtime.", |
370 " with a single item at runtime.", |
371 ), |
371 ), |
372 "M581": QCoreApplication.translate("MiscellaneousChecker", "unncessary f-string"), |
372 "M581": QCoreApplication.translate("MiscellaneousChecker", "unncessary f-string"), |