Skip to content
Permalink
Browse files

You are correct, codacy

  • Loading branch information...
ralsina committed May 8, 2017
1 parent 22d981c commit 0e90117ffcb1ff4e782229f038a5aab5885aa020
Showing with 13 additions and 13 deletions.
  1. +13 −13 nikola/plugins/shortcode/emoji/__init__.py
@@ -15,24 +15,24 @@
LOGGER = utils.get_logger('scan_posts', utils.STDERR_HANDLER)


def _populate():
for fname in glob.glob(os.path.join(os.path.dirname(__file__), 'data', '*.json')):
with open(fname) as inf:
data = json.load(inf)
data = data[list(data.keys())[0]]
data = data[list(data.keys())[0]]
for item in data:
if item['key'] in TABLE:
LOGGER.warning('Repeated emoji {}'.format(item['key']))
else:
TABLE[item['key']] = item['value']


class Plugin(ShortcodePlugin):
"""Plugin for gist directive."""

name = "emoji"

def _populate(self):
for fname in glob.glob(os.path.join(os.path.dirname(__file__), 'data', '*.json')):
with open(fname) as inf:
data = json.load(inf)
data = data[list(data.keys())[0]]
data = data[list(data.keys())[0]]
for item in data:
if item['key'] in TABLE:
LOGGER.warning('Repeated emoji {}'.format(item['key']))
else:
TABLE[item['key']] = item['value']


def handler(self, name, filename=None, site=None, data=None, lang=None, post=None):
"""Create HTML for emoji."""
if not TABLE:

0 comments on commit 0e90117

Please sign in to comment.
You can’t perform that action at this time.