Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-15155

Follow PEP 8 best practice in Python to check if a container is empty

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 3.6.0
    • None

    Description

      This is a good task for first time contributors to Kafka

      At release.py Line:94 and at Line:60, we don't follow PEP 8 [1] best practices.

      To check if a container or sequence (string, list, tuple) is empty, use if not val. Do not compare its length using if len(val) == 0

      [1] https://peps.python.org/pep-0008/#programming-recommendations#:~:text=if%20not%20seq

      Attachments

        Issue Links

          Activity

            People

              cxorm Yi-Sheng Lien
              divijvaidya Divij Vaidya
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: