Skip to content

Commit 23bea43

Browse files
committed
Revert "Change pylint warnings to use symbolic names"
This reverts commit c348440.
1 parent c348440 commit 23bea43

4 files changed

Lines changed: 16 additions & 9 deletions

File tree

restic/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
from restic.internal import version as internal_version
1818

1919
# Ignore warnings about naming of globals.
20-
# pylint: disable-next-line=invalid-name
20+
# pylint: disable=C0103
2121
binary_path = 'restic'
2222

2323
# Global flags
2424
# Ignore warnings about naming of globals.
25-
# pylint: disable-next-line=invalid-name
25+
# pylint: disable=C0103
2626
repository = None
2727
password_file = None
2828
use_cache = True

restic/internal/find_test.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ def test_find_matches_single_result_in_single_snapshot(self, mock_execute):
2222
[{"matches":[{"path":"/dummyfile","permissions":"-rw-r--r--","type":"file","mode":420,"mtime":"2022-01-01T10:00:00.000000000-07:00","atime":"2022-01-01T10:00:00.000000000-07:00","ctime":"2022-01-01T10:00:00.000000000-07:00","uid":10000,"gid":10000,"user":"user","group":"group","device_id":10000,"size":1024,"links":1}],"hits":1,"snapshot":"f589421bafdae95f5be5eea6285074b7ddc54aa0ffd1ad606f74d1e6207d20a3"}]
2323
'''.strip()
2424

25-
# pylint: disable-next=line-too-long
25+
# Ignore complaint about too long of a line.
26+
# pylint: disable=C0301
2627
self.assertEqual([{
2728
'matches': [{
2829
'path': '/dummyfile',
@@ -53,7 +54,8 @@ def test_find_matches_multiple_results_in_single_snapshot(
5354
[{"matches":[{"path":"/dummyfile1","permissions":"-rw-r--r--","type":"file","mode":420,"mtime":"2022-01-01T10:00:00.000000000-07:00","atime":"2022-01-01T10:00:00.000000000-07:00","ctime":"2022-01-01T10:00:00.000000000-07:00","uid":10000,"gid":10000,"user":"user","group":"group","device_id":10000,"size":1024,"links":1},{"path":"/dummyfile2","permissions":"-rw-r--r--","type":"file","mode":420,"mtime":"2022-01-01T10:00:00.000000000-07:00","atime":"2022-01-01T10:00:00.000000000-07:00","ctime":"2022-01-01T10:00:00.000000000-07:00","uid":10000,"gid":10000,"user":"user","group":"group","device_id":10000,"size":1024,"links":1}],"hits":2,"snapshot":"f589421bafdae95f5be5eea6285074b7ddc54aa0ffd1ad606f74d1e6207d20a3"}]
5455
'''.strip()
5556

56-
# pylint: disable-next=line-too-long
57+
# Ignore complaint about too long of a line.
58+
# pylint: disable=C0301
5759
self.assertEqual([{
5860
'matches': [{
5961
'path': '/dummyfile1',
@@ -99,7 +101,8 @@ def test_find_matches_multiple_results_in_multiple_snapshots(
99101
[{"matches":[{"path":"/dummyfile1","permissions":"-rw-r--r--","type":"file","mode":420,"mtime":"2022-01-01T10:00:00.000000000-07:00","atime":"2022-01-01T10:00:00.000000000-07:00","ctime":"2022-01-01T10:00:00.000000000-07:00","uid":10000,"gid":10000,"user":"user","group":"group","device_id":10000,"size":1024,"links":1}],"hits":1,"snapshot":"f589421bafdae95f5be5eea6285074b7ddc54aa0ffd1ad606f74d1e6207d20a3"},{"matches":[{"path":"/dummyfile2","permissions":"-rw-r--r--","type":"file","mode":420,"mtime":"2022-01-01T10:00:00.000000000-07:00","atime":"2022-01-01T10:00:00.000000000-07:00","ctime":"2022-01-01T10:00:00.000000000-07:00","uid":10000,"gid":10000,"user":"user","group":"group","device_id":10000,"size":1024,"links":1}],"hits":1,"snapshot":"g589421bafdae95f5be5eea6285074b7ddc54aa0ffd1ad606f74d1e6207d20a3"}]
100102
'''.strip()
101103

102-
# pylint: disable-next=line-too-long
104+
# Ignore complaint about too long of a line.
105+
# pylint: disable=C0301
103106
self.assertEqual([{
104107
'matches': [{
105108
'path': '/dummyfile1',

restic/internal/forget_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ def test_forget_specific_snapshot_and_keep_daily(self, mock_execute):
168168

169169
@mock.patch.object(forget.command_executor, 'execute')
170170
def test_parses_result_json(self, mock_execute):
171-
# pylint: disable-next=line-too-long
171+
# Ignore complaint about too long of a line.
172+
# pylint: disable=C0301
172173
mock_execute.return_value = """
173174
[{"tags": null, "host": "ecb5551395ae", "paths": ["/tmp/tmp6ew1vzp2/mydata.txt"], "keep": [{"time": "2021-03-16T00:10:37.015657013Z", "tree": "4483c2c6c1386abb9f47497cf108bab19e09c42430d32cd640a4f6f97137841f", "paths": ["/tmp/tmp6ew1vzp2/mydata.txt"], "hostname": "ecb5551395ae", "username": "circleci", "uid": 3434, "gid": 3434, "id": "3f6de49c6461ffd42900a204655708a3e136a3814abe298c07f27e412e2b6a43", "short_id": "3f6de49c"}], "remove": null, "reasons": [{"snapshot": {"time": "2021-03-16T00:10:37.015657013Z", "tree": "4483c2c6c1386abb9f47497cf108bab19e09c42430d32cd640a4f6f97137841f", "paths": ["/tmp/tmp6ew1vzp2/mydata.txt"], "hostname": "ecb5551395ae", "username": "circleci", "uid": 3434, "gid": 3434}, "matches": ["daily snapshot"], "counters": {"daily": 4}}]}]
174175
""".strip()
@@ -225,7 +226,8 @@ def test_parses_result_json(self, mock_execute):
225226

226227
@mock.patch.object(forget.command_executor, 'execute')
227228
def test_parses_result_json_and_ignores_text_afterwards(self, mock_execute):
228-
# pylint: disable-next=line-too-long
229+
# Ignore complaint about too long of a line.
230+
# pylint: disable=C0301
229231
mock_execute.return_value = """
230232
[{"tags": null, "host": "ecb5551395ae", "paths": ["/tmp/tmp6ew1vzp2/mydata.txt"], "keep": [{"time": "2021-03-16T00:10:37.015657013Z", "tree": "4483c2c6c1386abb9f47497cf108bab19e09c42430d32cd640a4f6f97137841f", "paths": ["/tmp/tmp6ew1vzp2/mydata.txt"], "hostname": "ecb5551395ae", "username": "circleci", "uid": 3434, "gid": 3434, "id": "3f6de49c6461ffd42900a204655708a3e136a3814abe298c07f27e412e2b6a43", "short_id": "3f6de49c"}], "remove": null, "reasons": [{"snapshot": {"time": "2021-03-16T00:10:37.015657013Z", "tree": "4483c2c6c1386abb9f47497cf108bab19e09c42430d32cd640a4f6f97137841f", "paths": ["/tmp/tmp6ew1vzp2/mydata.txt"], "hostname": "ecb5551395ae", "username": "circleci", "uid": 3434, "gid": 3434}, "matches": ["daily snapshot"], "counters": {"daily": 4}}]}]
231233
loading indexes...

restic/internal/snapshots_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ def test_snapshots_parses_result_json(self, mock_execute):
101101
]
102102
""".strip()
103103

104-
# pylint: disable-next=line-too-long
104+
# Ignore complaint about too long of a line.
105+
# pylint: disable=C0301
105106
self.assertEqual([{
106107
'group_key': {
107108
'hostname': 'ace809d23440',
@@ -174,7 +175,8 @@ def test_snapshots_parses_multiple_snapshots_json(self, mock_execute):
174175
]
175176
""".strip()
176177

177-
# pylint: disable-next=line-too-long
178+
# Ignore complaint about too long of a line.
179+
# pylint: disable=C0301
178180
self.assertEqual([{
179181
'group_key': {
180182
'hostname': '3099758ccbd9',

0 commit comments

Comments
 (0)