File tree 5 files changed +8
-13
lines changed
5 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -2909,8 +2909,7 @@ def add_filtered_articles(
2909
2909
thr = a .get_object ().get ("/T" )
2910
2910
if thr is None :
2911
2911
continue
2912
- else :
2913
- thr = thr .get_object ()
2912
+ thr = thr .get_object ()
2914
2913
if thr .indirect_reference .idnum not in self ._id_translated [
2915
2914
id (reader )
2916
2915
] and fltr .search ((thr .get ("/I" , {})).get ("/Title" , "" )):
Original file line number Diff line number Diff line change @@ -336,8 +336,7 @@ def _clone(
336
336
del ignore_fields [x ]
337
337
del ignore_fields [x ]
338
338
continue
339
- else :
340
- ignore_fields [x ] -= 1 # type:ignore
339
+ ignore_fields [x ] -= 1 # type:ignore
341
340
x += 1
342
341
# First check if this is a chain list, we need to loop to prevent recur
343
342
if any (
@@ -567,7 +566,7 @@ def read_unsized_from_stream(
567
566
tok = read_non_whitespace (stream )
568
567
if tok == b"\x00 " :
569
568
continue
570
- elif tok == b"%" :
569
+ if tok == b"%" :
571
570
stream .seek (- 1 , 1 )
572
571
skip_over_comment (stream )
573
572
continue
Original file line number Diff line number Diff line change @@ -159,8 +159,7 @@ def extract_inline_DCT(stream: StreamType) -> bytes:
159
159
data_out += c
160
160
if c != b"\xff " :
161
161
continue
162
- else :
163
- notfirst = True
162
+ notfirst = True
164
163
c = stream .read (1 )
165
164
data_out += c
166
165
if c == b"\xff " :
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ def read_string_from_stream(
103
103
else :
104
104
txt .append (i )
105
105
continue
106
- elif tok in b"\n \r " :
106
+ if tok in b"\n \r " :
107
107
# This case is hit when a backslash followed by a line
108
108
# break occurs. If it's a multi-char EOL, consume the
109
109
# second character:
@@ -113,10 +113,9 @@ def read_string_from_stream(
113
113
# Then don't add anything to the actual string, since this
114
114
# line break was escaped:
115
115
continue
116
- else :
117
- msg = f"Unexpected escaped string: { tok .decode ('utf-8' ,'ignore' )} "
118
- logger_warning (msg , __name__ )
119
- txt .append (__BACKSLASH_CODE__ )
116
+ msg = f"Unexpected escaped string: { tok .decode ('utf-8' , 'ignore' )} "
117
+ logger_warning (msg , __name__ )
118
+ txt .append (__BACKSLASH_CODE__ )
120
119
txt .append (ord (tok ))
121
120
return create_string_object (bytes (txt ), forced_encoding )
122
121
Original file line number Diff line number Diff line change @@ -182,7 +182,6 @@ ignore = [
182
182
" RET504" , # Unnecessary assignment to `changelog` before `return`
183
183
" RET505" , # Unnecessary `else` after `return` statement
184
184
" RET506" , # Unnecessary `else` after `raise` statement
185
- " RET507" , # Unnecessary `else` after `continue` statement
186
185
" RUF001" , # Detect confusable Unicode-to-Unicode units. Introduces bugs
187
186
" RUF002" , # Detect confusable Unicode-to-Unicode units. Introduces bugs
188
187
" S101" , # Use of `assert` detected
You can’t perform that action at this time.
0 commit comments