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

Running symbex with no arguments does nothing but pauses for ages #14

Closed
simonw opened this issue Jun 19, 2023 · 4 comments
Closed

Running symbex with no arguments does nothing but pauses for ages #14

simonw opened this issue Jun 19, 2023 · 4 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Jun 19, 2023

It recursively reads in every Python file it can find, but then scans them for no symbols and hence doesn't produce any output.

It shouldn't do all of that work for nothing.

It should probably display help.

@simonw simonw added bug Something isn't working enhancement New feature or request labels Jun 19, 2023
@simonw
Copy link
Owner Author

simonw commented Jun 19, 2023

Actually I think the solution is to say that symbols are required unless -s is specified.

@simonw
Copy link
Owner Author

simonw commented Jun 19, 2023

Got this working:

 % symbex
Usage: symbex [OPTIONS] [SYMBOLS]...
Try 'symbex --help' for help.

Error: Invalid value: Either provide symbols to search for or use -s/--signatures

@simonw
Copy link
Owner Author

simonw commented Jun 19, 2023

I want it to show help instead, this seems unfriendly.

@simonw
Copy link
Owner Author

simonw commented Jun 19, 2023

Yes this feels much nicer:

% symbex
Usage: symbex [OPTIONS] [SYMBOLS]...

  Find symbols in Python code and print the code for them.

  Example usage:

      # Search current directory and subdirectories
      symbex my_function MyClass
  
      # Search using a wildcard
      symbex 'test_*'

@simonw simonw closed this as completed in b002482 Jun 19, 2023
simonw added a commit that referenced this issue Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant