Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Consolidate `else`/`if` conditional logic

Đang mở
#49 0 bình luận 1 reaction 1 người được giao Xem trên GitHub

@sadielbartholomew đang làm issue này rồi.

Từ ngày 10/4/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

code hygiene

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.

Ngôn ngữ chính
Python
Star
21
Fork
11
Merge trung bình
7 giờ 11 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NCAS-CMS/cf-plot

Tất cả issue của NCAS-CMS/cf-plot

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.