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

Wrap signatures onto several lines when function len is over a treshold #831

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from

Commits on Oct 25, 2024

  1. Introduce ParsedDocstring.with_linker()/.with_tag()/.combine(). The w…

    …ill help to construct one parsed docstring from several parts.
    tristanlatr committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    dea121c View commit details
    Browse the repository at this point in the history
  2. Colorize the signature ourself.

    We mimic the Signature.__str__ method for the implementation but instead of returning a str we return a ParsedDocstring, which is far more convenient.
    
    This change fixes #801:
    - Parameters html are divided into .sig-param spans.
    - When the function is long enought an extra CSS class .expand-signature is added to the parent function-signature.
    - The first parameter 'cls' or 'self' of (class) methods is marked with the 'undocumented' CSS class, this way it's clearly not part of the API.
    - Add some CSS  to expand the signature of long functions when they have the focus only.
    tristanlatr committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    95f8f3d View commit details
    Browse the repository at this point in the history
  3. Some more adjustments. Make the self param always inline. Try to opti…

    …miza a little the _colorize_signature() function.
    tristanlatr committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    0b7c76e View commit details
    Browse the repository at this point in the history
  4. Add comment

    tristanlatr committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    188c410 View commit details
    Browse the repository at this point in the history
  5. Fix usage of cache

    tristanlatr committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    83d47f7 View commit details
    Browse the repository at this point in the history
  6. Fix usages of cache

    tristanlatr committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    ab1cdd1 View commit details
    Browse the repository at this point in the history
  7. Simplify with_linker() and with_tag(). These do not create new parsed…

    … docstrings they only update the local to_stan() method dynamically.
    tristanlatr committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    eca5ced View commit details
    Browse the repository at this point in the history
  8. Revert "Simplify with_linker() and with_tag(). These do not create ne…

    …w parsed docstrings they only update the local to_stan() method dynamically."
    
    This reverts commit eca5ced.
    tristanlatr committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    ff4269f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    914e01c View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    cdef965 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2024

  1. Fix mypy

    tristanlatr committed Oct 26, 2024
    Configuration menu
    Copy the full SHA
    2033d65 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5396396 View commit details
    Browse the repository at this point in the history
  3. Remove unused imports

    tristanlatr committed Oct 26, 2024
    Configuration menu
    Copy the full SHA
    282250b View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2024

  1. Better implementation of with_linker and with_tag inside a single sub…

    …class.
    
    Introduce ParsedDocstring.to_text().
    tristanlatr committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    6a4de9f View commit details
    Browse the repository at this point in the history
  2. First attempt to implement relatively smart Expand/Collapse signature…

    …s when overloads are overwhelming... This probably requires some more tweaks but it's still better than showing everything at once.
    tristanlatr committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    c0f93dc View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2024

  1. Simplify things: don't try to wrap overload signatures. Sphinx doesn'…

    …t try to do such things either...
    tristanlatr committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    da89d7c View commit details
    Browse the repository at this point in the history
  2. Get rid of the ParsedStanOnly by using parsed_text_with_css instead.

    Fix some cyclic imports issue as a drive-by change: model.Documentable was uncessarly runtime imported inside restructuredtext and epydoc parsers.
    tristanlatr committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    141b211 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a46a3a3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    40ac0a6 View commit details
    Browse the repository at this point in the history
  5. Fix various bugs in the implementation.

    also remove the summary caching on the parsed docstring side, this is unnecessary because it's already cahed in the documentable.
    tristanlatr committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    4172485 View commit details
    Browse the repository at this point in the history
  6. Fix pyflakes

    tristanlatr committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    7103ce5 View commit details
    Browse the repository at this point in the history
  7. Fix format_undocumented_summary returning a tuple of strings instead …

    …of a string.
    
    A some annotation.
    tristanlatr committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    eae961a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7c6c6eb View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    19400ff View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a3ebbdf View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2024

  1. Configuration menu
    Copy the full SHA
    cd257eb View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2024

  1. Get rid of the AnnotationLinker - drop the verbose messages when an a…

    …nnotation is ambiguous (pydoctor is not a checker).
    
    Get rid of ParsedDocstring.with_linker() this API did not make sens and was rather an anti-pattern.
    
    Replace that with a new parameter of colorize_pyval(is_annotation: bool). obj_reference nodes can now be created with the attribute 'is_annotation' in which case they will be resolved a little bit differently.
    tristanlatr committed Nov 16, 2024
    Configuration menu
    Copy the full SHA
    907792a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    977e5b5 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2024

  1. Change comment

    tristanlatr committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    91edc51 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b504c21 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2024

  1. Configuration menu
    Copy the full SHA
    25b5e62 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bd2de92 View commit details
    Browse the repository at this point in the history