Skip to content

Conversation

@stefanv
Copy link
Member

@stefanv stefanv commented Aug 15, 2024

Partially addresses #226

image

@betatim
Copy link

betatim commented Aug 16, 2024

Looks interesting. Certainly worth exploring and using a bit. For short commands it'll be great to see the source, for ones with a long implementation the "it is defined here xxx" is a good idea! Can we make it the actual file path instead? I'd have to think for a second or two to figure out how to open the file corresponding to the module path (or what ever it is called).

Another random thought: should the line "the blah command is defined in foo" appear at the end of the print out? Was thinking that if the command's code is too long for me to want to view it in the terminal "as is", then probably the top has scrolled off the screen as well. So putting the pointer at the end would make it easier to discover. Or maybe if the code is more than X lines (bike shed incoming :D) just display "This command is quite long, read its full source by opening xxxx in an editor"?

@stefanv stefanv added the type: Enhancement New feature or request label Aug 27, 2024
@stefanv
Copy link
Member Author

stefanv commented Aug 27, 2024

@betatim The file location is now printed, and it appears after the code.

@stefanv stefanv marked this pull request as ready for review September 5, 2024 19:03
@stefanv stefanv merged commit b46b178 into scientific-python:main Sep 5, 2024
@jarrodmillman jarrodmillman added this to the 0.12 milestone Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants