Delete unused code

This commit is contained in:
Ivan Habunek 2023-12-04 18:46:45 +01:00
parent eaaa14cfc2
commit b9d0c1f7c2
No known key found for this signature in database
GPG Key ID: F5F0623FF5EBCB3D
1 changed files with 0 additions and 37 deletions

View File

@ -127,17 +127,6 @@ def editor_input(editor: str, initial_text: str):
return f.read().split(EDITOR_DIVIDER)[0].strip()
def read_char(values, default):
values = [v.lower() for v in values]
while True:
value = input().lower()
if value == "":
return default
if value in values:
return value
def delete_tmp_status_file():
try:
os.unlink(_tmp_status_path())
@ -166,32 +155,6 @@ def drop_empty_values(data: Dict) -> Dict:
return {k: v for k, v in data.items() if v is not None}
def args_get_instance(instance, scheme, default=None):
if not instance:
return default
if scheme == "http":
_warn_scheme_deprecated()
if instance.startswith("http"):
return instance.rstrip("/")
else:
return f"{scheme}://{instance}"
def _warn_scheme_deprecated():
from toot.output import print_err
print_err("\n".join([
"--disable-https flag is deprecated and will be removed.",
"Please specify the instance as URL instead.",
"e.g. instead of writing:",
" toot instance unsafehost.com --disable-https",
"instead write:",
" toot instance http://unsafehost.com\n"
]))
def urlencode_url(url):
parsed_url = urlparse(url)