Skip to content

Commit

Permalink
undo tox.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrinux committed Oct 2, 2018
1 parent 1697d46 commit 4f3059b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
11 changes: 1 addition & 10 deletions py3status/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,6 @@ def create_output_modules(self):
output_modules[name]['module'] = self.modules[name]
output_modules[name]['type'] = 'py3status'
output_modules[name]['color'] = self.mappings_color.get(name)
output_modules[name]['short_format'] = self.mappings_short_format.get(name)
# i3status modules
for name in i3modules:
if name not in output_modules:
Expand All @@ -917,7 +916,6 @@ def create_output_modules(self):
output_modules[name]['module'] = i3modules[name]
output_modules[name]['type'] = 'i3status'
output_modules[name]['color'] = self.mappings_color.get(name)
output_modules[name]['short_format'] = self.mappings_short_format.get(name)

self.output_modules = output_modules

Expand All @@ -935,30 +933,23 @@ def create_mappings(self, config):
color = None
mappings[name] = color

short_format = self.get_config_attribute(name, 'short_format')
if hasattr(short_format, 'none_setting'):
short_format = None
mappings[name] = short_format

# Store mappings for later use.
self.mappings_color = mappings
self.mappings_short_format = mappings

def process_module_output(self, module):
"""
Process the output for a module and return a json string representing it.
Color processing occurs here.
Shortened text 'short_text' processing occurs here.
"""
outputs = module['module'].get_latest()
color = module['color']
short_format = module['short_format']

for output in outputs:
if color:
# Color: substitute the config defined color
if "color" not in output:
output["color"] = color

# Create the json string output.
return ",".join([dumps(x) for x in outputs])

Expand Down
4 changes: 0 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ skip_missing_interpreters = True
[testenv]
skip_install = True
deps =
coverage
pytest
pytest-flake8
commands =
pytest --flake8
coverage erase
coverage run --omit=**/__init__.py --source=modules -m py.test
coverage report

[testenv:py36]
skip_install = True
Expand Down

0 comments on commit 4f3059b

Please sign in to comment.