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

branch
eric7
changeset 8764
18c69de2292f
parent 8318
962bce857696
child 8881
54e42bc2437a
equal deleted inserted replaced
8763:a99f822a3da7 8764:18c69de2292f
47 "os.readlink('foo') should be replaced by foo_path.readlink()"), 47 "os.readlink('foo') should be replaced by foo_path.readlink()"),
48 "P111": QCoreApplication.translate( 48 "P111": QCoreApplication.translate(
49 "PathlibChecker", 49 "PathlibChecker",
50 "os.stat('foo') should be replaced by foo_path.stat() or " 50 "os.stat('foo') should be replaced by foo_path.stat() or "
51 "foo_path.owner() or foo_path.group()"), 51 "foo_path.owner() or foo_path.group()"),
52 "P112": QCoreApplication.translate(
53 "PathlibChecker",
54 "os.listdir(path='foo') should be replaced by foo_path.iterdir()"),
55 "P113": QCoreApplication.translate(
56 "PathlibChecker",
57 "os.link('bar', 'foo') should be replaced by"
58 " foo_path.hardlink_to('bar')"),
59 "P114": QCoreApplication.translate(
60 "PathlibChecker",
61 "os.symlink('bar', 'foo') should be replaced by"
62 " foo_path.symlink_to('bar')"),
52 63
53 "P201": QCoreApplication.translate( 64 "P201": QCoreApplication.translate(
54 "PathlibChecker", 65 "PathlibChecker",
55 "os.path.abspath('foo') should be replaced by foo_path.resolve()"), 66 "os.path.abspath('foo') should be replaced by foo_path.resolve()"),
56 "P202": QCoreApplication.translate( 67 "P202": QCoreApplication.translate(
87 "os.path.samefile('foo', 'bar') should be replaced by " 98 "os.path.samefile('foo', 'bar') should be replaced by "
88 "foo_path.samefile(bar_path)"), 99 "foo_path.samefile(bar_path)"),
89 "P212": QCoreApplication.translate( 100 "P212": QCoreApplication.translate(
90 "PathlibChecker", 101 "PathlibChecker",
91 "os.path.splitext('foo.bar') should be replaced by foo_path.suffix"), 102 "os.path.splitext('foo.bar') should be replaced by foo_path.suffix"),
103 "P213": QCoreApplication.translate(
104 "PathlibChecker",
105 "os.path.relpath('/bar/foo', start='bar') should be replaced by "
106 "foo_path.relative_to('/bar')"),
92 107
93 "P301": QCoreApplication.translate( 108 "P301": QCoreApplication.translate(
94 "PathlibChecker", 109 "PathlibChecker",
95 "open('foo') should be replaced by Path('foo').open()"), 110 "open('foo') should be replaced by Path('foo').open()"),
96 111

eric ide

mercurial