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

Sat, 26 Apr 2025 12:34:32 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 26 Apr 2025 12:34:32 +0200
branch
eric7
changeset 11240
c48c615c04a3
parent 11150
73d80859079c
permissions
-rw-r--r--

MicroPython
- Added a configuration option to disable the support for the no longer produced Pimoroni Pico Wireless Pack.

8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
11090
f5f5f5803935 Updated copyright for 2025.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10439
diff changeset
3 # Copyright (c) 2020 - 2025 Detlev Offenbach <detlev@die-offenbachs.de>
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 """
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 Module implementing message translations for the code style plugin messages
8187
7bfee4d12551 Corrected some module descriptions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8166
diff changeset
9 (pathlib part).
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 """
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
8318
962bce857696 Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8312
diff changeset
12 from PyQt6.QtCore import QCoreApplication
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 _pathlibMessages = {
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
15 "P-101": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 "PathlibChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
17 "os.chmod('foo', 0o444) should be replaced by foo_path.chmod(0o444)",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
18 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
19 "P-102": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
20 "PathlibChecker", "os.mkdir('foo') should be replaced by foo_path.mkdir()"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
21 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
22 "P-103": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 "PathlibChecker",
9576
be9f8e7e42e0 Corrected some 'wrong' string quotes caused by the Black line merging.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
24 "os.makedirs('foo/bar') should be replaced by bar_path.mkdir(parents=True)",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
25 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
26 "P-104": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 "PathlibChecker",
9576
be9f8e7e42e0 Corrected some 'wrong' string quotes caused by the Black line merging.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
28 "os.rename('foo', 'bar') should be replaced by foo_path.rename(Path('bar'))",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
29 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
30 "P-105": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 "PathlibChecker",
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 "os.replace('foo', 'bar') should be replaced by "
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
33 "foo_path.replace(Path('bar'))",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
34 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
35 "P-106": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
36 "PathlibChecker", "os.rmdir('foo') should be replaced by foo_path.rmdir()"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
37 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
38 "P-107": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
39 "PathlibChecker", "os.remove('foo') should be replaced by foo_path.unlink()"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
40 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
41 "P-108": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
42 "PathlibChecker", "os.unlink('foo'') should be replaced by foo_path.unlink()"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
43 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
44 "P-109": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
45 "PathlibChecker", "os.getcwd() should be replaced by Path.cwd()"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
46 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
47 "P-110": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
48 "PathlibChecker", "os.readlink('foo') should be replaced by foo_path.readlink()"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
49 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
50 "P-111": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 "PathlibChecker",
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 "os.stat('foo') should be replaced by foo_path.stat() or "
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
53 "foo_path.owner() or foo_path.group()",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
54 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
55 "P-112": QCoreApplication.translate(
8764
18c69de2292f Upgraded the pathlib checker to support additional replacements.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
56 "PathlibChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
57 "os.listdir(path='foo') should be replaced by foo_path.iterdir()",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
58 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
59 "P-113": QCoreApplication.translate(
8764
18c69de2292f Upgraded the pathlib checker to support additional replacements.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
60 "PathlibChecker",
9576
be9f8e7e42e0 Corrected some 'wrong' string quotes caused by the Black line merging.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
61 "os.link('bar', 'foo') should be replaced by foo_path.hardlink_to('bar')",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
62 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
63 "P-114": QCoreApplication.translate(
8764
18c69de2292f Upgraded the pathlib checker to support additional replacements.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
64 "PathlibChecker",
9576
be9f8e7e42e0 Corrected some 'wrong' string quotes caused by the Black line merging.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
65 "os.symlink('bar', 'foo') should be replaced by foo_path.symlink_to('bar')",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
66 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
67 "P-201": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 "PathlibChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
69 "os.path.abspath('foo') should be replaced by foo_path.resolve()",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
70 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
71 "P-202": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 "PathlibChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
73 "os.path.exists('foo') should be replaced by foo_path.exists()",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
74 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
75 "P-203": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 "PathlibChecker",
9576
be9f8e7e42e0 Corrected some 'wrong' string quotes caused by the Black line merging.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
77 "os.path.expanduser('~/foo') should be replaced by foo_path.expanduser()",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
78 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
79 "P-204": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
80 "PathlibChecker", "os.path.isdir('foo') should be replaced by foo_path.is_dir()"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
81 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
82 "P-205": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 "PathlibChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
84 "os.path.isfile('foo') should be replaced by foo_path.is_file()",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
85 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
86 "P-206": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 "PathlibChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
88 "os.path.islink('foo') should be replaced by foo_path.is_symlink()",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
89 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
90 "P-207": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 "PathlibChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
92 "os.path.isabs('foo') should be replaced by foo_path.is_absolute()",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
93 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
94 "P-208": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 "PathlibChecker",
9576
be9f8e7e42e0 Corrected some 'wrong' string quotes caused by the Black line merging.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
96 "os.path.join('foo', 'bar') should be replaced by foo_path / 'bar'",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
97 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
98 "P-209": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 "PathlibChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
100 "os.path.basename('foo/bar') should be replaced by bar_path.name",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
101 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
102 "P-210": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 "PathlibChecker",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
104 "os.path.dirname('foo/bar') should be replaced by bar_path.parent",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
105 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
106 "P-211": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 "PathlibChecker",
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 "os.path.samefile('foo', 'bar') should be replaced by "
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
109 "foo_path.samefile(bar_path)",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
110 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
111 "P-212": QCoreApplication.translate(
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 "PathlibChecker",
11150
73d80859079c Code Style Checkers
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
113 "os.path.splitext('foo.bar') should be replaced by foo_path.stem and"
73d80859079c Code Style Checkers
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11147
diff changeset
114 " foo_path.suffix",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
115 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
116 "P-213": QCoreApplication.translate(
8764
18c69de2292f Upgraded the pathlib checker to support additional replacements.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
117 "PathlibChecker",
18c69de2292f Upgraded the pathlib checker to support additional replacements.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
118 "os.path.relpath('/bar/foo', start='bar') should be replaced by "
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
119 "foo_path.relative_to('/bar')",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
120 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
121 "P-301": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
122 "PathlibChecker", "open('foo') should be replaced by Path('foo').open()"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
123 ),
11147
dee6e106b4d3 Modified the code style checker such, that the issue category and issue number are separated by a '-' to make up the issue code (e.g E-901).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 11090
diff changeset
124 "P-401": QCoreApplication.translate(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
125 "PathlibChecker", "py.path.local is in maintenance mode, use pathlib instead"
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
126 ),
8166
bd5cd5858503 Code Style Checker
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 }

eric ide

mercurial