GithubHelp home page GithubHelp logo

python-pydetector's People

Contributors

creachadair avatar juanjux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-pydetector's Issues

The "SameLineNoops" pseudo-ast element can be child of several nodes

Currently a trailing comment pseudo-node will be added as child of all elements in that same line. While this is technically correct (its a trailing comment of all elements in that line) its also wasteful. Make a cache of trailing comments storing the line of the comment to avoid duplicates.

Add a "just open with python 2 or 3" test

This have to be disabled by default because it could be dangeous. It would be nice to also find a way to avoid the interpreters running main (maybe with a third proxy module importing the one being tested).

Remove position workarounds, just use what the native AST/tokenizer provides

From the meeting about this matter on the Language Analysis planning:

For nodes without a token (e. g. grouping nodes like "arguments" or "aliases"):

  • If the node doesn't have StartPosition in the native AST it won't have it either in the UAST.
  • Nodes without token but with position in the native AST will have exactly that StartPosition in the UAST and no EndPosition (since we can't extract it from the tokenizer).

Nodes with a token:

  • The EndPosition will be the one of the token. E. g. functions' EndPosition will be the position of the last character of the name, not the end position of the last child, as stated in the documentation.
  • When a node with a token have different positions in the native AST and the tokenizer, the last one will be used since it has proved to be more reliable (e. g. the a.b.c.d case).
  • No workarounds will be applied to positions that an issue reporter consider wrong if they're wrong in the tokenizer and/or native AST.

Divide the astexport.py module between pydetector and the driver

In the meeting planning we decided to split the functionality in the current pydetector.astexport.py module between the retrieval of the native AST data structure unmodified (but for the right Python version) in pydetector and the visitor + noop extractor + position updater in python-driver, reusing the data returned from pydetector to avoid doing a double parsing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.