Skip to content

Plugin info update #176

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

Merged
merged 8 commits into from
Jan 12, 2017
Prev Previous commit
Next Next commit
Changed PluginInfo.__init__ to call super instead of looping through …
…kwargs to add items to the dictionary.
  • Loading branch information
satoon101 committed Dec 11, 2016
commit 9a7827a66af33e4f1cd1bc9b45c0460984ec3507
6 changes: 2 additions & 4 deletions addons/source-python/packages/source-python/plugins/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def __init__(self, verbose_name=None, author=None, description=None,
attributes to appear in the plugin listing, update
:attr:`display_in_listing`.
"""
super().__init__(**kwargs)
self._verbose_name = verbose_name
self.author = author
self.description = description
Expand All @@ -70,15 +71,12 @@ def __init__(self, verbose_name=None, author=None, description=None,
# ('test1.start_vote', 'Permission to start a vote.')]
self.permissions = [] if permissions is None else permissions
self.public_convar = public_convar

self.display_in_listing = [] if display_in_listing is None else display_in_listing

# A reference to its LoadedPlugin instance. Will be set by the
# LoadedPlugin instance itself
self.plugin = None

for key, value in kwargs.items():
self[key] = value

def _create_public_convar(self):
"""Create a public convar if :attr:`public_convar` is set to True."""
Expand Down