Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3796

Use decorator and methods to express properties

    XMLWordPrintableJSON

Details

    Description

      One of the issues preventing progress on AVRO-2921 is that it's difficult to add type hints to properties when they're expressed like this:

      class Thing:
          x = property(lambda self: self._x)

      as they often are in the python source code. So I would like to refactor all the cases where this occurs to the decorator style, like this

      class Thing:
          @property
          def x(self):
              return self._x

      This will make it easier to add type hints to these methods later on.

      Attachments

        Issue Links

          Activity

            People

              kojiromike Michael A. Smith
              kojiromike Michael A. Smith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m