Skip to content
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

Fixing typos in strings #147

Merged
merged 1 commit into from
Dec 15, 2022
Merged
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
14 changes: 7 additions & 7 deletions urlextract/urlextract_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@ def extract_localhost(self, enable: bool):
"""
Set if 'localhost' will be extracted as URL from text

:param bool enable: True if localhost' should be extracted
:param bool enable: True if 'localhost' should be extracted
False otherwise
"""
self._extract_localhost = enable

@property
def ignore_list(self) -> Set[str]:
"""
Returns set of URLs on ignore list
Set of URLs to be ignored (not returned) while extracting from text

:return: Returns set of ignored URLs
:rtype: set(str)
Expand Down Expand Up @@ -218,7 +218,7 @@ def load_ignore_list(self, file_name):
@property
def permit_list(self):
"""
Returns set of URLs that can be processed
Set of URLs that can be processed

:return: Returns set of URLs that can be processed
:rtype: set(str)
Expand Down Expand Up @@ -264,7 +264,7 @@ def update(self):
def update_when_older(self, days: int) -> bool:
"""
Update TLD list cache file if the list is older than
number of days given in parameter `days` or if does not exist.
number of days given in parameter `days` or if it does not exist.

:param int days: number of days from last change
:return: True if update was successful, False otherwise
Expand Down Expand Up @@ -482,7 +482,7 @@ def _complete_url(
# get only dot+tld+one_char and compare
extended_tld = complete_url[len(complete_url) - len(tld) - 1 :]
if extended_tld in temp_tlds:
# We do not want o change found URL
# We do not want to change found URL
if not extended_tld.endswith("/"):
complete_url = complete_url[:-1]

Expand Down Expand Up @@ -745,7 +745,7 @@ def _remove_enclosure_from_url(self, text_url: str, tld_pos: int, tld: str) -> s

# Get valid domain when we have input as: example.com)/path
# we assume that if there is enclosure character after TLD it is
# the end URL it self therefore we remove the rest
# the end URL itself therefore we remove the rest
after_tld_pos = tld_pos + len(tld)
if after_tld_pos < len(new_url):
if new_url[after_tld_pos] in enclosure_map.values():
Expand Down Expand Up @@ -962,7 +962,7 @@ def wrapper_urlextract_cli(*args, **kwargs):
except Exception:
print(
"Error: An unexpected error occurred. "
"If you can not resolve this issue please report it to: "
"If you can't resolve this issue please report it to: "
"https://github.com/lipoja/URLExtract/issues "
"and help us improve urlextract!",
file=sys.stderr,
Expand Down