Nested if statements can be collapsed into a single if statement by separating their condition using and operator. Merging collapsible if statements increases the code's readability. ### Not preferred: python if condition1: if condition2: dosomething() ### Preferred: python if condition1 and condition2: dosomething() ### Exception: DeepSource would not …
Occurrences
There are 6 occurrences of this issue in the repository.
Description
Nested
if
statements can be collapsed into a singleif
statement by separating their condition usingand
operator. Merging collapsibleif
statements increases the code's readability. ### Not preferred:python if condition1: if condition2: dosomething()
### Preferred:python if condition1 and condition2: dosomething()
### Exception: DeepSource would not …Occurrences
There are 6 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/mikeysan/retweet_anything/issue/PTC-W0048/occurrences/