Giter Club home page Giter Club logo

pyspector's People

Contributors

estollnitz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

littlelinghome

pyspector's Issues

Attempt to locate source code for objects, not just modules/classes/functions

Currently, pyspector can locate source code for modules, classes, and functions (at least those that are not built-in), but it can't locate source code for objects. We could attempt to locate objects declared within modules or classes by searching within the source file of the containing module or class.

Try to resolve reStructuredText interpreted text as links to related modules, classes, and functions

Docstrings written using reStructuredText often contain interpreted text (in backquotes) that refers to related modules, classes, and functions. We currently use the code role for interpreted text that has no specified role, because otherwise we'd display lots of hyperlinks that don't resolve to actual items.

Examples of interpreted text with no specified role that should be hyperlinked:

  • docutils.SettingsSpec: `docutils.frontend.OptionParser`
  • matplotlib.pyplot.Annotation: `.Text`
  • matplotlib.pyplot.box: `~matplotlib.axes.Axes`
  • numpy.linalg.det: `numpy.linalg`

See numpy.amin for several more examples, some of which should be hyperlinked, and others which should not.

Offer to open module when following a link to an as-yet unloaded item

When the user clicks on a link in documentation or in the class inheritance hierarchy, the corresponding item may be a member of a module that isn't currently being inspected. If that's the case, the current implementation does nothing and the link appears broken. Instead, we should ask the user whether they want to load and inspect that module, or perhaps just go ahead and do it without asking.

Fix color syntax highlighting for `#` within strings

The current implementation of PythonSyntaxHighlighter treats everything after a # character as a comment, even if that character is part of a string. Instead, it should only consider the # character as the start of a comment if it appears outside a string. I'm not sure if this is achievable using a syntax highlighter based entirely on regular expressions.

Open PythonSyntaxHighlighter in pyspector to see an example near the top of the file.

Improve performance of module inspection

Module inspection may be slow because it re-analyzes classes that are included in multiple other classes. PyQt5.QtWidgets is one example that seems to have a lot of redundancy.

Back/forward navigation

Remember the sequence of items that the user selects in the tree view. Provide buttons and keyboard shortcuts to navigate forward and backward through this history.

Fix color syntax highlighting for escape sequences within comments

The current implementation of PythonSyntaxHighlighter applies a distinct color to escape sequences like \n, regardless of where they appear in the file. Escape sequences that appear within comments should not be colored this way. I'm not sure if this is possible within a syntax highlighter based solely on regular expressions.

Open PythonSyntaxHighlighter in pyspector to see an example near the top of the file.

Add support for triple-backquote code examples in reStructuredText

The current reStructuredText-to-HTML conversion doesn't switch to code mode for examples surrounded by triple-backquotes. For example, see tensorflow.Tensor, where the documentation view displays ```python at the start of an example and ``` at the end, with incorrect formatting in between.

Show progress while inspecting modules

Inspecting modules at startup (or when new modules are added) takes a while. The UI is blocked during these operations. We should at least show progress, and perhaps allow the user to cancel.

Remember window positions and sizes

We should store the position and size of the main window and the module selection dialog in the user's config file, so that they get restored the next time the application is run.

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.