Skip to content

Made - #53

Open
maniospas wants to merge 3 commits into
abdelrahman0w:mainfrom
maniospas:main
Open

Made#53
maniospas wants to merge 3 commits into
abdelrahman0w:mainfrom
maniospas:main

Conversation

@maniospas

Copy link
Copy Markdown

Added the ability to toggle whether function definitions should be walked or not (maybe class definitions can also be skipped for speedup in the last case?).

Default behavior is to not check for imports within functions, as these do not necessarily create errors. This behavior can be enabled with -t or --strict as flags.

It was not very clear to me how I should write proper tests and check that the changes do not break anything else (the repo was a bit messy there). Only for convenience, I created a directory tests/test_func_imports and added there my testing scenario:

pip install -e .
cd tests
cd test_func_imports
ouro 
ouro -strict

P.S. For testing: ouro tests/test_func_imports wasn't working for me from the top level (I imagine it was considering this as a file?). Similarly, it would have been nice to get an error if a file does not exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant