We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What is the issue? There is no command to transform the written code with CLY?! in a single file that can later be executed with
curl path/to/file/in/github | python -
What do you suggest? Implement this feature.
The text was updated successfully, but these errors were encountered:
first ideas
import ast from collections import namedtuple Import = namedtuple("Import", ["module", "name", "alias"]) def get_imports(path): imports = [] with open(path) as fh: root = ast.parse(fh.read(), path) for node in ast.walk(root): if isinstance(node, ast.Import): module = [] elif isinstance(node, ast.ImportFrom): if node.module: module = node.module.split('.') else: module = [] for _ in range(node.level): module.insert(0, ".") else: continue for n in node.names: imports.append(Import(module, n.name.split('.'), n.asname)) return imports
Sorry, something went wrong.
mateusoliveira43
No branches or pull requests
What is the issue?
There is no command to transform the written code with CLY?! in a single file that can later be executed with
What do you suggest?
Implement this feature.
The text was updated successfully, but these errors were encountered: