eric7/Plugins/CheckerPlugins/CodeStyleChecker/PathLib/translations.py

branch
eric7
changeset 8764
18c69de2292f
parent 8318
962bce857696
child 8881
54e42bc2437a
--- a/eric7/Plugins/CheckerPlugins/CodeStyleChecker/PathLib/translations.py	Tue Nov 09 19:33:55 2021 +0100
+++ b/eric7/Plugins/CheckerPlugins/CodeStyleChecker/PathLib/translations.py	Tue Nov 09 19:34:26 2021 +0100
@@ -49,6 +49,17 @@
         "PathlibChecker",
         "os.stat('foo') should be replaced by foo_path.stat() or "
         "foo_path.owner() or foo_path.group()"),
+    "P112": QCoreApplication.translate(
+        "PathlibChecker",
+        "os.listdir(path='foo') should be replaced by foo_path.iterdir()"),
+    "P113": QCoreApplication.translate(
+        "PathlibChecker",
+        "os.link('bar', 'foo') should be replaced by"
+        " foo_path.hardlink_to('bar')"),
+    "P114": QCoreApplication.translate(
+        "PathlibChecker",
+        "os.symlink('bar', 'foo') should be replaced by"
+        " foo_path.symlink_to('bar')"),
     
     "P201": QCoreApplication.translate(
         "PathlibChecker",
@@ -89,6 +100,10 @@
     "P212": QCoreApplication.translate(
         "PathlibChecker",
         "os.path.splitext('foo.bar') should be replaced by foo_path.suffix"),
+    "P213": QCoreApplication.translate(
+        "PathlibChecker",
+        "os.path.relpath('/bar/foo', start='bar') should be replaced by "
+        "foo_path.relative_to('/bar')"),
     
     "P301": QCoreApplication.translate(
         "PathlibChecker",

eric ide

mercurial