Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions py3status/modules/arch_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ class Py3status:
format = None
hide_if_zero = False

class Meta:
deprecated = {"remove": [{"param": "include_aur", "msg": "obsolete"}]}

def post_config_hook(self):
helper = {
"pacman": self.py3.check_commands(["checkupdates"]),
Expand Down
11 changes: 0 additions & 11 deletions py3status/modules/backlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,6 @@ class Py3status:
hide_when_unavailable = False
low_tune_threshold = 0

class Meta:
deprecated = {
"rename": [
{
"param": "device_path",
"new": "device",
"msg": "obsolete parameter use `device`",
}
]
}

def post_config_hook(self):
try:
bus = dbus.SystemBus()
Expand Down
31 changes: 0 additions & 31 deletions py3status/modules/battery_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,37 +142,6 @@ class Py3status:
threshold_degraded = 30
threshold_full = 100

class Meta:
deprecated = {
"format_fix_unnamed_param": [
{
"param": "format",
"placeholder": "percent",
"msg": "{} should not be used in format use `{percent}`",
}
],
"substitute_by_value": [
{
"param": "mode",
"value": "ascii_bar",
"substitute": {"param": "format", "value": "{ascii_bar}"},
"msg": 'obsolete parameter use `format = "{ascii_bar}"`',
},
{
"param": "mode",
"value": "text",
"substitute": {"param": "format", "value": "Battery: {percent}"},
"msg": 'obsolete parameter use `format = "{percent}"`',
},
{
"param": "show_percent_with_blocks",
"value": True,
"substitute": {"param": "format", "value": "{icon} {percent}%"},
"msg": 'obsolete parameter use `format = "{icon} {percent}%"`',
},
],
}

def post_config_hook(self):
self.last_known_status = ""
# Guess mode if not set
Expand Down
17 changes: 0 additions & 17 deletions py3status/modules/deadbeef.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,6 @@ class Py3status:
replacements = None
sleep_timeout = 20

class Meta:
deprecated = {
"remove": [{"param": "delimiter", "msg": "obsolete parameter"}],
"rename_placeholder": [
{
"placeholder": "elapsed",
"new": "playback_time",
"format_strings": ["format"],
},
{
"placeholder": "tracknum",
"new": "tracknumber",
"format_strings": ["format"],
},
],
}

def post_config_hook(self):
if not self.py3.check_commands("deadbeef"):
raise Exception(STRING_NOT_INSTALLED)
Expand Down
16 changes: 0 additions & 16 deletions py3status/modules/dpms.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,6 @@ class Py3status:
icon_off = "DPMS"
icon_on = "DPMS"

class Meta:
deprecated = {
"rename": [
{
"param": "format_on",
"new": "icon_on",
"msg": "obsolete parameter use `icon_on`",
},
{
"param": "format_off",
"new": "icon_off",
"msg": "obsolete parameter use `icon_off`",
},
]
}

def post_config_hook(self):
self.color_on = self.py3.COLOR_ON or self.py3.COLOR_GOOD
self.color_off = self.py3.COLOR_OFF or self.py3.COLOR_BAD
Expand Down
11 changes: 0 additions & 11 deletions py3status/modules/dropboxd_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,6 @@ class Py3status:
status_off = "isn't running"
status_on = "Up to date"

class Meta:
deprecated = {
"format_fix_unnamed_param": [
{
"param": "format",
"placeholder": "status",
"msg": "{} should not be used in format use `{status}`",
}
]
}

def post_config_hook(self):
if not self.py3.check_commands("dropbox-cli"):
raise Exception(STRING_NOT_INSTALLED)
Expand Down
24 changes: 0 additions & 24 deletions py3status/modules/file_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,30 +68,6 @@ class Py3status:
paths = None
thresholds = [(0, "bad"), (1, "good")]

class Meta:
deprecated = {
"rename": [
{
"param": "format_available",
"new": "icon_available",
"msg": "obsolete parameter use `icon_available`",
},
{
"param": "format_unavailable",
"new": "icon_unavailable",
"msg": "obsolete parameter use `icon_unavailable`",
},
{
"param": "path",
"new": "paths",
"msg": "obsolete parameter use `paths`",
},
],
"rename_placeholder": [
{"placeholder": "paths", "new": "path", "format_strings": ["format"]}
],
}

def post_config_hook(self):
if not self.paths:
raise Exception(STRING_NO_PATHS)
Expand Down
11 changes: 0 additions & 11 deletions py3status/modules/getjson.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,6 @@ class Py3status:
url = None
username = None

class Meta:
deprecated = {
"rename": [
{
"param": "timeout",
"new": "request_timeout",
"msg": "obsolete parameter use `request_timeout`",
}
]
}

def post_config_hook(self):
if not self.url:
raise Exception(STRING_ERROR)
Expand Down
16 changes: 0 additions & 16 deletions py3status/modules/imap.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,6 @@ class Py3status:
use_idle = None
user = None

class Meta:
deprecated = {
"rename": [
{
"param": "new_mail_color",
"new": "color_new_mail",
"msg": "obsolete parameter use `color_new_mail`",
},
{
"param": "imap_server",
"new": "server",
"msg": "obsolete parameter use `server`",
},
]
}

def post_config_hook(self):
# class variables:
self.mail_count = NO_DATA_YET
Expand Down
10 changes: 0 additions & 10 deletions py3status/modules/mpris.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,16 +394,6 @@ class Py3status:
state_play = "\u25b7"
state_stop = "\u25a1"

class Meta:
deprecated = {
'remove': [
{
'param': 'player_hide_non_canplay',
'msg': 'obsolete because we now hide all non canplay players',
},
],
}

def post_config_hook(self):
self.replacements_init = self.py3.get_replacements_list(self.format)
self._name_owner_change_match = None
Expand Down
15 changes: 0 additions & 15 deletions py3status/modules/net_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,6 @@ class Py3status:
thresholds = [(0, "bad"), (1024, "degraded"), (1024 * 1024, "good")]
unit = "B/s"

class Meta:
def deprecate_function(config):
# support old thresholds
precision = config.get("precision", 1)
padding = 3 + 1 + precision + 1 + 5
format_value = r"[\?min_length={padding} {{value:.{precision}f}} {{unit}}]".format(
padding=padding, precision=precision
)
return {"format_value": format_value}

deprecated = {
"function": [{"function": deprecate_function}],
"remove": [{"param": "precision", "msg": "obsolete, use format_value instead"}],
}

def post_config_hook(self):
# parse some configuration parameters
if not isinstance(self.interfaces, list):
Expand Down
38 changes: 0 additions & 38 deletions py3status/modules/netdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,44 +52,6 @@ class Py3status:
}

class Meta:
def deprecate_function(config):
return {
"thresholds": {
"down": [
(0, "bad"),
(config.get("low_speed", 30), "degraded"),
(config.get("med_speed", 60), "good"),
],
"total": [
(0, "good"),
(config.get("low_traffic", 400), "degraded"),
(config.get("med_traffic", 700), "bad"),
],
}
}

deprecated = {
"function": [{"function": deprecate_function}],
"remove": [
{
"param": "low_speed",
"msg": "obsolete, set using thresholds parameter",
},
{
"param": "med_speed",
"msg": "obsolete, set using thresholds parameter",
},
{
"param": "low_traffic",
"msg": "obsolete, set using thresholds parameter",
},
{
"param": "med_traffic",
"msg": "obsolete, set using thresholds parameter",
},
],
}

update_config = {
"update_placeholder_format": [
{
Expand Down
16 changes: 0 additions & 16 deletions py3status/modules/online_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,6 @@ class Py3status:
timeout = 2
url = "https://www.google.com"

class Meta:
deprecated = {
"rename": [
{
"param": "format_online",
"new": "icon_on",
"msg": "obsolete parameter use `icon_on`",
},
{
"param": "format_offline",
"new": "icon_off",
"msg": "obsolete parameter use `icon_off`",
},
]
}

def post_config_hook(self):
self.color_on = self.py3.COLOR_ON or self.py3.COLOR_GOOD
self.color_off = self.py3.COLOR_OFF or self.py3.COLOR_BAD
Expand Down
11 changes: 0 additions & 11 deletions py3status/modules/pomodoro.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,6 @@ class Py3status:
timer_long_break = 15 * 60
timer_pomodoro = 25 * 60

class Meta:
deprecated = {
"rename": [
{
"param": "max_breaks",
"new": "pomodoros",
"msg": "obsolete parameter use `pomodoros`",
}
]
}

def post_config_hook(self):
self._initialized = False

Expand Down
16 changes: 0 additions & 16 deletions py3status/modules/process_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,6 @@ class Py3status:
icon_on = "●"
process = None

class Meta:
deprecated = {
"rename": [
{
"param": "format_running",
"new": "icon_on",
"msg": "obsolete parameter use `icon_on`",
},
{
"param": "format_not_running",
"new": "icon_off",
"msg": "obsolete parameter use `icon_off`",
},
]
}

def post_config_hook(self):
if not self.process:
raise Exception(STRING_ERROR)
Expand Down
8 changes: 0 additions & 8 deletions py3status/modules/screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ class Py3status:
upload_server = None
upload_user = None

class Meta:
deprecated = {
"remove": [
{"param": "push", "msg": "obsolete"},
{"param": "cache_timeout", "msg": "obsolete"},
]
}

def post_config_hook(self):
self.shot_data = {}
self.save_path = Path(self.save_path).expanduser()
Expand Down
Loading