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

Add 'If' condition evaluation feature based on user input #590

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

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. Try fixing #174

    tristanlatr committed May 24, 2022
    Configuration menu
    Copy the full SHA
    56ef027 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0ad23b8 View commit details
    Browse the repository at this point in the history
  12. 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
  13. Merge branch 'visit-try-orelse-finalbody-and-if-orelse' into choose-T…

    …YPE_CHECKING-value-for-a-module
    tristanlatr committed May 24, 2022
    Configuration menu
    Copy the full SHA
    c87144d View commit details
    Browse the repository at this point in the history

Commits on May 25, 2022

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