532 "M502": QCoreApplication.translate( |
532 "M502": QCoreApplication.translate( |
533 "MiscellaneousChecker", |
533 "MiscellaneousChecker", |
534 "using .strip() with multi-character strings is misleading"), |
534 "using .strip() with multi-character strings is misleading"), |
535 "M503": QCoreApplication.translate( |
535 "M503": QCoreApplication.translate( |
536 "MiscellaneousChecker", |
536 "MiscellaneousChecker", |
537 """using 'hasattr(x, "__call__")' to test if 'x' is callable is""" |
537 "do not call assert False since python -O removes these calls"), |
538 """ unreliable"""), |
|
539 "M504": QCoreApplication.translate( |
538 "M504": QCoreApplication.translate( |
540 "MiscellaneousChecker", |
539 "MiscellaneousChecker", |
541 "'sys.maxint' is not defined in Python 3 - use 'sys.maxsize'"), |
540 "'sys.maxint' is not defined in Python 3 - use 'sys.maxsize'"), |
542 "M505": QCoreApplication.translate( |
541 "M505": QCoreApplication.translate( |
543 "MiscellaneousChecker", |
542 "MiscellaneousChecker", |
549 " use 'os.environ.clear()'"), |
548 " use 'os.environ.clear()'"), |
550 "M507": QCoreApplication.translate( |
549 "M507": QCoreApplication.translate( |
551 "MiscellaneousChecker", |
550 "MiscellaneousChecker", |
552 "loop control variable {0} not used within the loop body -" |
551 "loop control variable {0} not used within the loop body -" |
553 " start the name with an underscore"), |
552 " start the name with an underscore"), |
|
553 "M508": QCoreApplication.translate( |
|
554 "MiscellaneousChecker", |
|
555 "unncessary f-string"), |
|
556 "M509": QCoreApplication.translate( |
|
557 "MiscellaneousChecker", |
|
558 "cannot use 'self.__class__' as first argument of 'super()' call"), |
554 "M511": QCoreApplication.translate( |
559 "M511": QCoreApplication.translate( |
555 "MiscellaneousChecker", |
560 "MiscellaneousChecker", |
|
561 """using 'hasattr(x, "__call__")' to test if 'x' is callable is""" |
|
562 """ unreliable"""), |
|
563 "M512": QCoreApplication.translate( |
|
564 "MiscellaneousChecker", |
|
565 "do not call getattr with a constant attribute value"), |
|
566 "M513": QCoreApplication.translate( |
|
567 "MiscellaneousChecker", |
|
568 "do not call setattr with a constant attribute value"), |
|
569 "M521": QCoreApplication.translate( |
|
570 "MiscellaneousChecker", |
556 "Python 3 does not include '.iter*' methods on dictionaries"), |
571 "Python 3 does not include '.iter*' methods on dictionaries"), |
557 "M512": QCoreApplication.translate( |
572 "M522": QCoreApplication.translate( |
558 "MiscellaneousChecker", |
573 "MiscellaneousChecker", |
559 "Python 3 does not include '.view*' methods on dictionaries"), |
574 "Python 3 does not include '.view*' methods on dictionaries"), |
560 "M513": QCoreApplication.translate( |
575 "M523": QCoreApplication.translate( |
561 "MiscellaneousChecker", |
576 "MiscellaneousChecker", |
562 "'.next()' does not exist in Python 3"), |
577 "'.next()' does not exist in Python 3"), |
563 "M514": QCoreApplication.translate( |
578 "M524": QCoreApplication.translate( |
564 "MiscellaneousChecker", |
579 "MiscellaneousChecker", |
565 "'__metaclass__' does nothing on Python 3 -" |
580 "'__metaclass__' does nothing on Python 3 -" |
566 " use 'class MyClass(BaseClass, metaclass=...)'"), |
581 " use 'class MyClass(BaseClass, metaclass=...)'"), |
567 "M601": QCoreApplication.translate( |
582 "M601": QCoreApplication.translate( |
568 "MiscellaneousChecker", |
583 "MiscellaneousChecker", |