Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

(PTC-W0048) if statements can be merged #58

Closed
pybash1 opened this issue Jul 26, 2021 · 2 comments · Fixed by #60
Closed

(PTC-W0048) if statements can be merged #58

pybash1 opened this issue Jul 26, 2021 · 2 comments · Fixed by #60
Assignees
Labels
bug Something isn't working enhancement New feature or request good first issue Issue is good for new contributors
Projects
Milestone

Comments

@pybash1
Copy link
Owner

pybash1 commented Jul 26, 2021

Description

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:

if condition1:
    if condition2:
        dosomething()

Preferred:

if condition1 and condition2:
       dosomething()

Exception: DeepSource would not …

Occurrences

There is 1 occurrence of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/pybash1/py_everything/issue/PTC-W0048/occurrences/

@pybash1 pybash1 added bug Something isn't working enhancement New feature or request good first issue Issue is good for new contributors labels Jul 26, 2021
@pybash1 pybash1 added this to To Do in Bug Tracker via automation Jul 26, 2021
@pybash1 pybash1 added this to the Bugs milestone Jul 26, 2021
@metamorphic-spyware
Copy link
Collaborator

working on this

@pybash1
Copy link
Owner Author

pybash1 commented Jul 26, 2021

Yes good..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request good first issue Issue is good for new contributors
Projects
Development

Successfully merging a pull request may close this issue.

2 participants