NCAS-CMS / NCAS-CMS/cf-plot

Consolidate `else`/`if` conditional logic

Open
#49 0 comments 1 reaction 1 assignee View on GitHub

@sadielbartholomew is already working on this.

Since Apr 10, 2024.

code hygiene
Dominant language
Python
Stars
21
Forks
11
Avg merge
7h 11m
Merged PRs (30d)
1

Description

There are lots of locations in the code I have noticed where the conditional if/else logic can be streamlined or improved, so it flows more intuitively and reduces the need for extra levels of indentation, etc.

This is both in the sense of direct small-scale conversions, for example, there is a whole similar block that can be reduced with elif statements here:

https://github.com/NCAS-CMS/cf-plot/blob/efe94c7551a08dac1b5af56e77d06f504c0657ea/cfplot/cfplot.py#L8967-L8990

as well as larger-scale changes to the conditional structure. All of which should not change the behaviour of the code in any way, only its implementation, to make it easier to work with and develop on top of.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.