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

branch
eric7
changeset 9595
2bd590c40309
parent 9576
be9f8e7e42e0
child 9653
e67609152c5e
equal deleted inserted replaced
9594:bd9550caf22f 9595:2bd590c40309
261 "Redundant exception types in 'except ({0}){1}:'. Write 'except {2}{1}:'," 261 "Redundant exception types in 'except ({0}){1}:'. Write 'except {2}{1}:',"
262 " which catches exactly the same exceptions.", 262 " which catches exactly the same exceptions.",
263 ), 263 ),
264 "M515": QCoreApplication.translate( 264 "M515": QCoreApplication.translate(
265 "MiscellaneousChecker", 265 "MiscellaneousChecker",
266 "Pointless comparison. This comparison does nothing but waste CPU instructions." 266 "Result of comparison is not used. This line doesn't do anything. Did you"
267 " Either prepend 'assert' or remove it.", 267 " intend to prepend it with assert?",
268 ), 268 ),
269 "M516": QCoreApplication.translate( 269 "M516": QCoreApplication.translate(
270 "MiscellaneousChecker", 270 "MiscellaneousChecker",
271 "Cannot raise a literal. Did you intend to return it or raise an Exception?", 271 "Cannot raise a literal. Did you intend to return it or raise an Exception?",
272 ), 272 ),
277 " assert for a more specific exception (builtin or custom), use" 277 " assert for a more specific exception (builtin or custom), use"
278 " 'assertRaisesRegex', or use the context manager form of 'assertRaises'.", 278 " 'assertRaisesRegex', or use the context manager form of 'assertRaises'.",
279 ), 279 ),
280 "M518": QCoreApplication.translate( 280 "M518": QCoreApplication.translate(
281 "MiscellaneousChecker", 281 "MiscellaneousChecker",
282 "Found useless expression. Either assign it to a variable or remove it.", 282 "Found useless expression. Consider either assigning it to a variable or"
283 " removing it.",
283 ), 284 ),
284 "M519": QCoreApplication.translate( 285 "M519": QCoreApplication.translate(
285 "MiscellaneousChecker", 286 "MiscellaneousChecker",
286 "Use of 'functools.lru_cache' or 'functools.cache' on methods can lead to" 287 "Use of 'functools.lru_cache' or 'functools.cache' on methods can lead to"
287 " memory leaks. The cache may retain instance references, preventing garbage" 288 " memory leaks. The cache may retain instance references, preventing garbage"
307 "Function definition does not bind loop variable '{0}'.", 308 "Function definition does not bind loop variable '{0}'.",
308 ), 309 ),
309 "M524": QCoreApplication.translate( 310 "M524": QCoreApplication.translate(
310 "MiscellaneousChecker", 311 "MiscellaneousChecker",
311 "{0} is an abstract base class, but it has no abstract methods. Remember to" 312 "{0} is an abstract base class, but it has no abstract methods. Remember to"
312 " use '@abstractmethod', '@abstractclassmethod' and/or '@abstractproperty'" 313 " use the @abstractmethod decorator, potentially in conjunction with"
313 " decorators.", 314 " @classmethod, @property and/or @staticmethod.",
314 ), 315 ),
315 "M525": QCoreApplication.translate( 316 "M525": QCoreApplication.translate(
316 "MiscellaneousChecker", 317 "MiscellaneousChecker",
317 "Exception '{0}' has been caught multiple times. Only the first except will be" 318 "Exception '{0}' has been caught multiple times. Only the first except will be"
318 " considered and all other except catches can be safely removed.", 319 " considered and all other except catches can be safely removed.",
320 ),
321 "M526": QCoreApplication.translate(
322 "MiscellaneousChecker",
323 "Star-arg unpacking after a keyword argument is strongly discouraged,"
324 " because it only works when the keyword parameter is declared after all"
325 " parameters supplied by the unpacked sequence, and this change of ordering can"
326 " surprise and mislead readers.",
327 ),
328 "M527": QCoreApplication.translate(
329 "MiscellaneousChecker",
330 "{0} is an empty method in an abstract base class, but has no abstract"
331 " decorator. Consider adding @abstractmethod.",
319 ), 332 ),
320 "M581": QCoreApplication.translate("MiscellaneousChecker", "unncessary f-string"), 333 "M581": QCoreApplication.translate("MiscellaneousChecker", "unncessary f-string"),
321 "M582": QCoreApplication.translate( 334 "M582": QCoreApplication.translate(
322 "MiscellaneousChecker", 335 "MiscellaneousChecker",
323 "cannot use 'self.__class__' as first argument of 'super()' call", 336 "cannot use 'self.__class__' as first argument of 'super()' call",
446 "M513": ["Exception"], 459 "M513": ["Exception"],
447 "M514": ["OSError, IOError", " as err", "OSError"], 460 "M514": ["OSError, IOError", " as err", "OSError"],
448 "M523": ["x"], 461 "M523": ["x"],
449 "M524": ["foobar"], 462 "M524": ["foobar"],
450 "M525": ["OSError"], 463 "M525": ["OSError"],
464 "M527": ["foo"],
451 "M601": ["%s"], 465 "M601": ["%s"],
452 "M621": [5], 466 "M621": [5],
453 "M622": ["foo"], 467 "M622": ["foo"],
454 "M631": [5], 468 "M631": [5],
455 "M632": ["foo"], 469 "M632": ["foo"],

eric ide

mercurial