Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly treat ObjectDescription._doc_field_type_map as an instance variable #6482

Commits on Jun 13, 2019

  1. Explicitly treat ObjectDescription._doc_field_type_map as an instance…

    … variable
    
    - Aims to address [issue sphinx-doc#6478](sphinx-doc#6478)
    
    - Left ObjectDescription._doc_field_type_map declaration alone and in place in
      case there are other factors at play that require it declared on the class.
    
    - In ObjectDescription constructor, explicitly set _doc_field_type_map's value
      as an instance variable.
    
    - This presumably needs to be built with every instantiation of an
      ObjectDescription or inheriting class, so we're not attempting to "define it
      once on a class and then use it"... that approach seems much harder to reason
      about and get correctly done (as was maybe demonstrated by the refactoring
      that lead to this problem in the linked-to issue).
    
    - Runs through the test suite clean locally except for an unrelated single test
      failure on an image_converter test, which also failed on the base branch
      before my changes here.
    ViktorHaag committed Jun 13, 2019
    Copy the full SHA
    3973e89 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    085ae2e View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2019

  1. mypy type annotations for methods added

    - type annotation for _process_type_map was incorrect; needed to document the
      positional argument for the method
    
    - __init__ method for ObjectDescription missing type annotation, so added
    ViktorHaag committed Jun 14, 2019
    Copy the full SHA
    d19dd1c View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2019

  1. Simplify to ensure we're lazily setting the instance field-type-map v…

    …ariable
    
    - We can more simply have ObjectDescription.get_field_type_map() make sure that
      it's going to lazily set the value of an instance variable, not the class
      variable, when it populates the field type map.
    ViktorHaag committed Jun 18, 2019
    Copy the full SHA
    6a05435 View commit details
    Browse the repository at this point in the history
  2. repair white space

    ViktorHaag committed Jun 18, 2019
    Copy the full SHA
    e9ee39d View commit details
    Browse the repository at this point in the history