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

-n/--no-file option for suppressing the # File: lines #28

Closed
simonw opened this issue Jun 21, 2023 · 1 comment
Closed

-n/--no-file option for suppressing the # File: lines #28

simonw opened this issue Jun 21, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Jun 21, 2023

a --no-file option to suppress output of the # File: lines.

Those can have shortcuts of -i for --imports and -n for --no-file - so if you want to apply both (and just get the imports) you can then do this:

symbex -d symbex -in

Split from:

@simonw simonw added the enhancement New feature or request label Jun 21, 2023
@simonw
Copy link
Owner Author

simonw commented Jun 21, 2023

Pretty neat:

symbex -in -d symbex
# from .lib import find_symbol_nodes
def find_symbol_nodes(code: str, filename: str, symbols: Iterable[str]) -> List[Tuple[(AST, Optional[str])]]

# from .lib import code_for_node
def code_for_node(code: str, node: AST, class_name: str, signatures: bool, docstrings: bool) -> Tuple[(str, int)]

@simonw simonw closed this as completed in 0ebb6be Jun 21, 2023
simonw added a commit that referenced this issue Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant