Skip to content

Commit

Permalink
Replace Bunch with SimpleNamespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Sep 8, 2023
1 parent e9e4b62 commit cb255a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 2 additions & 6 deletions jaraco/develop/repo.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import urllib.parse
import types

from build.util import project_wheel_metadata as load_metadata
from jaraco.collections import ItemsAsAttributes


class Bunch(dict, ItemsAsAttributes):
pass


def get_project_metadata():
_md = load_metadata('.')
url = _md['Home-page']
version = _md['Version']
project = urllib.parse.urlparse(url).path.strip('/')
return Bunch(locals())
return types.SimpleNamespace(**locals())
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ python_requires = >=3.9
install_requires =
jaraco.ui
jaraco.context
jaraco.collections
keyring
autocommand
requests-toolbelt
Expand Down

0 comments on commit cb255a5

Please sign in to comment.