brownie
brownie copied to clipboard
added __version__ attribute to brownie for issue #1575
What I did
Added a version attribute to brownie.
Related issue: #1575
How I did it
Imported version from _config.py in init.py
How to verify it
(yt-fork-env) ryanjsfx@MB-145 brownie-ryanjsfx % python3 Python 3.8.9 (default, Jul 19 2021, 09:37:30) [Clang 13.0.0 (clang-1300.0.27.3)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import brownie brownie.version != None True
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
Not that it fails tox -e lint
due to:
brownie/__init__.py:7:1: F401 'brownie._config.__version__' imported but unused
ERROR: InvocationError for command /Users/ryanjsfx/Documents/brownie-ryanjsfx/.tox/lint/bin/flake8 brownie tests (exited with code 1)
```___________________________________ summary ____________________________________
ERROR: lint: commands failed
Although it's not supposed to be used...¯\_(ツ)_/¯
I prob need to include a test case and update docs but in case you all don't want this included (or tackled from a different angle) I thought I should just submit the PR now :)
Although it's not supposed to be used...¯_(ツ)_/¯
You need to add it to __all__
.