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

Update module import script #1654

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

otis01
Copy link

@otis01 otis01 commented Dec 30, 2022

Currently, running brownie run scripts/deploy.py fails when the path to the project has a . in it.

The following path

/Users/john.doe/Projects/Chainlink

Gets converted to

Users.john.doe.Projects.Chainlink

Which fails because it thinks that john and doe are two directories. Using the above method fixes this error.

What I did

Add an import_module script that works regardless of the path.

How I did it

Using "/" instead if "." in the path string.

How to verify it

Run it locally in a path that has a . in it.

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have updated the documentation
  • I have added an entry to the changelog

Currently, running `brownie run scripts/deploy.py` fails when the path to the project has a `.` in it.

The following path
```
/Users/john.doe/Projects/Chainlink
```

Gets converted to
```
Users.john.doe.Projects.Chainlink
```
Which fails because it thinks that `john` and `doe` are two directories.
Using the above method fixes this error.
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