src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/translations.py

branch
eric7
changeset 10510
fa7b8ebfbe13
parent 10439
21c28b0f9e41
child 10639
757bfe32983f
equal deleted inserted replaced
10509:094ab8028423 10510:fa7b8ebfbe13
282 ), 282 ),
283 ## Bugbear 283 ## Bugbear
284 "M501": QCoreApplication.translate( 284 "M501": QCoreApplication.translate(
285 "MiscellaneousChecker", 285 "MiscellaneousChecker",
286 "Do not use bare 'except:', it also catches unexpected events like memory" 286 "Do not use bare 'except:', it also catches unexpected events like memory"
287 " errors, interrupts, system exit, and so on. Prefer 'except Exception:'." 287 " errors, interrupts, system exit, and so on. Prefer excepting specific"
288 " If you're sure what you're doing, be explicit and write" 288 " exceptions. If you're sure what you're doing, be explicit and write"
289 " 'except BaseException:'.", 289 " 'except BaseException:'.",
290 ), 290 ),
291 "M502": QCoreApplication.translate( 291 "M502": QCoreApplication.translate(
292 "MiscellaneousChecker", 292 "MiscellaneousChecker",
293 "Python does not support the unary prefix increment", 293 "Python does not support the unary prefix increment",
359 "(if using 'assertRaises'), or add the 'match' keyword argument (if " 359 "(if using 'assertRaises'), or add the 'match' keyword argument (if "
360 "using 'pytest.raises'), or use the context manager form with a target.", 360 "using 'pytest.raises'), or use the context manager form with a target.",
361 ), 361 ),
362 "M518": QCoreApplication.translate( 362 "M518": QCoreApplication.translate(
363 "MiscellaneousChecker", 363 "MiscellaneousChecker",
364 "Found useless expression. Consider either assigning it to a variable or" 364 "Found useless {0} expression. Consider either assigning it to a variable or"
365 " removing it.", 365 " removing it.",
366 ), 366 ),
367 "M519": QCoreApplication.translate( 367 "M519": QCoreApplication.translate(
368 "MiscellaneousChecker", 368 "MiscellaneousChecker",
369 "Use of 'functools.lru_cache' or 'functools.cache' on methods can lead to" 369 "Use of 'functools.lru_cache' or 'functools.cache' on methods can lead to"
452 " confusion due to unintuitive argument positions.", 452 " confusion due to unintuitive argument positions.",
453 ), 453 ),
454 "M535": QCoreApplication.translate( 454 "M535": QCoreApplication.translate(
455 "MiscellaneousChecker", 455 "MiscellaneousChecker",
456 "Static key in dict comprehension: {0!r}.", 456 "Static key in dict comprehension: {0!r}.",
457 ),
458 "M536": QCoreApplication.translate(
459 "MiscellaneousChecker",
460 "Don't except 'BaseException' unless you plan to re-raise it.",
461 ),
462 "M537": QCoreApplication.translate(
463 "MiscellaneousChecker",
464 "Class '__init__' methods must not return or yield and any values.",
465 ),
466 "M538": QCoreApplication.translate(
467 "MiscellaneousChecker",
468 "Editing a loop's mutable iterable often leads to unexpected results/bugs.",
457 ), 469 ),
458 ## Bugbear++ 470 ## Bugbear++
459 "M581": QCoreApplication.translate( 471 "M581": QCoreApplication.translate(
460 "MiscellaneousChecker", 472 "MiscellaneousChecker",
461 "unncessary f-string", 473 "unncessary f-string",
629 "M217": ["foo"], 641 "M217": ["foo"],
630 ## Bugbear 642 ## Bugbear
631 "M507": ["x"], 643 "M507": ["x"],
632 "M513": ["Exception"], 644 "M513": ["Exception"],
633 "M514": ["OSError, IOError", " as err", "OSError"], 645 "M514": ["OSError, IOError", " as err", "OSError"],
646 "M518": ["List"],
634 "M523": ["x"], 647 "M523": ["x"],
635 "M524": ["foobar"], 648 "M524": ["foobar"],
636 "M525": ["OSError"], 649 "M525": ["OSError"],
637 "M527": ["foo"], 650 "M527": ["foo"],
638 "M533": ["foo"], 651 "M533": ["foo"],

eric ide

mercurial