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

Visit Try 'orelse', 'finalbody' and 'handlers' and If 'orelse' #589

Merged
merged 47 commits into from
Sep 25, 2024

Commits on May 23, 2022

  1. Add a test

    tristanlatr committed May 23, 2022
    Configuration menu
    Copy the full SHA
    6f2e374 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2022

  1. Configuration menu
    Copy the full SHA
    0c50517 View commit details
    Browse the repository at this point in the history
  2. Since the new NodeVisitor class, all the node are not visited as befo…

    …re. The older visitor relied on generic_visit() to be recursive. Where the provided generic_visit() is not recursive anymore, and moreover not called automatically when visiting unknow nodes! So what I'm saying here is that since #576 have been merged, we're not visiting the statements inside the 'orelse' field of Try and If nodes, same goes for 'finalbody' and 'handlers'.
    
    This commit fixes that issue. The rationale is now the following: All statements in the 'orelse' block of IF nodes and statements in the except handlers of TRY nodes that would override a name already defined in the main 'body' (or TRY 'orelse' or 'finalbody') are ignored.
    
    Meaning that in the context of the code below, 'ssl' would resolve to 'twisted.internet.ssl':
    
    try:
        from twisted.internet import ssl as _ssl
    except ImportError:
        ssl = None
    else:
        ssl = _ssl
    tristanlatr committed May 24, 2022
    Configuration menu
    Copy the full SHA
    7d40873 View commit details
    Browse the repository at this point in the history
  3. fix tests

    tristanlatr committed May 24, 2022
    Configuration menu
    Copy the full SHA
    ae6582f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3bd4407 View commit details
    Browse the repository at this point in the history
  5. Fix typo

    tristanlatr committed May 24, 2022
    Configuration menu
    Copy the full SHA
    8613422 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9a02722 View commit details
    Browse the repository at this point in the history
  7. Revert ignoring 'If.orelse' and 'Try.handler' in functions and methods.

    Properly add support for that to override_guard() function instead.
    tristanlatr committed May 24, 2022
    Configuration menu
    Copy the full SHA
    7ad998f View commit details
    Browse the repository at this point in the history
  8. Fix mypy

    tristanlatr committed May 24, 2022
    Configuration menu
    Copy the full SHA
    bd90f2b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    39ca9a3 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0ad23b8 View commit details
    Browse the repository at this point in the history
  11. Merge branch 'visit-try-orelse-finalbody-and-if-orelse' of github.com…

    …:twisted/pydoctor into visit-try-orelse-finalbody-and-if-orelse
    tristanlatr committed May 24, 2022
    Configuration menu
    Copy the full SHA
    a5314c9 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2022

  1. Update docs/source/codedoc.rst

    Co-authored-by: Glyph <glyph@twistedmatrix.com>
    tristanlatr and glyph authored Jun 11, 2022
    Configuration menu
    Copy the full SHA
    d4fb2be View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d38659e View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2022

  1. Configuration menu
    Copy the full SHA
    9cfb06a View commit details
    Browse the repository at this point in the history
  2. Typos

    tristanlatr committed Jul 14, 2022
    Configuration menu
    Copy the full SHA
    db51139 View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2022

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

Commits on Jun 5, 2023

  1. Configuration menu
    Copy the full SHA
    8c61bc1 View commit details
    Browse the repository at this point in the history
  2. Refactor

    tristanlatr committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    312b301 View commit details
    Browse the repository at this point in the history
  3. Fix ambiguous ref

    tristanlatr committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    872ec07 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    505e113 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a100a16 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2023

  1. Simplify the visitors

    tristanlatr committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    0ea5b7c View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2023

  1. Configuration menu
    Copy the full SHA
    5a259d2 View commit details
    Browse the repository at this point in the history
  2. Simplifications

    tristanlatr committed Jun 9, 2023
    Configuration menu
    Copy the full SHA
    52d0713 View commit details
    Browse the repository at this point in the history
  3. refactor _ignore_name()

    tristanlatr committed Jun 9, 2023
    Configuration menu
    Copy the full SHA
    99b8205 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2023

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

Commits on Jan 20, 2024

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

Commits on Jan 21, 2024

  1. Configuration menu
    Copy the full SHA
    f9022f3 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'visit-try-orelse-finalbody-and-if-orelse' of github.com…

    …:twisted/pydoctor into visit-try-orelse-finalbody-and-if-orelse
    tristanlatr committed Jan 21, 2024
    Configuration menu
    Copy the full SHA
    3d3b730 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

  1. Fix one mypy error.

    The visitors still needs a refactor.
    tristanlatr committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    d393249 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2024

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

Commits on Jul 6, 2024

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

Commits on Sep 16, 2024

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

Commits on Sep 20, 2024

  1. Use two subclass of tree pruning exception in order to also skip exte…

    …nsions when desired. The naming is not the best at the moment but it passes the tests...
    tristanlatr committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    8f82e87 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0650c35 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. Refactor the visitor extension pattern and ensure the extension funct…

    …ionality stays the same
    tristanlatr committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    8bcfb56 View commit details
    Browse the repository at this point in the history
  2. Fix python directive

    tristanlatr committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    b3957fc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3189f7c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9f576de View commit details
    Browse the repository at this point in the history
  5. Remove unused import

    tristanlatr authored Sep 24, 2024
    Configuration menu
    Copy the full SHA
    ecfa367 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. update test comments

    tristanlatr committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    6acffaf View commit details
    Browse the repository at this point in the history
  2. Add readme entry

    tristanlatr committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    e96b927 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'visit-try-orelse-finalbody-and-if-orelse' of github.com…

    …:twisted/pydoctor into visit-try-orelse-finalbody-and-if-orelse
    tristanlatr committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    6a542ed View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2235f98 View commit details
    Browse the repository at this point in the history
  5. Merge branch 'visit-try-orelse-finalbody-and-if-orelse' of github.com…

    …:twisted/pydoctor into visit-try-orelse-finalbody-and-if-orelse
    tristanlatr committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    fdc2755 View commit details
    Browse the repository at this point in the history
  6. Fix rst

    tristanlatr committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    0278320 View commit details
    Browse the repository at this point in the history