Author SHA1 Message Date
klemek 15a937e39c chore: version 1.1.1
Python Lint CI / ruff (push) Successful in 2m30s
Python Lint CI / ruff-format-check (push) Successful in 3m3s
Python Lint CI / ty (push) Successful in 3m6s
2026-06-15 14:31:51 +02:00
klemek d1deaad03f fix: space in words
Python Lint CI / ruff (push) Has been cancelled
Python Lint CI / ruff-format-check (push) Has been cancelled
Python Lint CI / ty (push) Has been cancelled
2026-06-15 14:31:21 +02:00
4 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ class FactoryError(Exception):
class Factory: class Factory:
__slots__ = ["__found", "__tld_list", "__word_list", "logger", "__words"] __slots__ = ["__found", "__tld_list", "__word_list", "__words", "logger"]
def __init__(self, tld_list: TLDList, word_list: WordList, words: int) -> None: def __init__(self, tld_list: TLDList, word_list: WordList, words: int) -> None:
self.logger: logging.Logger = logging.getLogger(self.__class__.__name__) self.logger: logging.Logger = logging.getLogger(self.__class__.__name__)
@@ -71,7 +71,7 @@ class Factory:
tld_escaped = tld.replace(".", "") tld_escaped = tld.replace(".", "")
if word.endswith(tld_escaped) and len(word) > len(tld_escaped): if word.endswith(tld_escaped) and len(word) > len(tld_escaped):
domain = word[: -len(tld_escaped)] + "." + tld domain = word[: -len(tld_escaped)] + "." + tld
if domain not in self.__found: if "-." not in domain and domain not in self.__found:
self.__found.add(domain) self.__found.add(domain)
return domain return domain
return None return None
+4 -1
View File
@@ -22,7 +22,10 @@ class WordList:
self.logger.info("[%s] Loaded %d words", self.__name, len(self.words)) self.logger.info("[%s] Loaded %d words", self.__name, len(self.words))
def __escape_word(self, word: str) -> str: def __escape_word(self, word: str) -> str:
return unidecode.unidecode(word.strip()).lower() word = unidecode.unidecode(word.strip()).lower()
if " " in word:
return ""
return word
def close(self) -> None: def close(self) -> None:
pass pass
+1 -1
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "cool-domain" name = "cool-domain"
version = "1.1.0" version = "1.1.1"
description = "Add your description here" description = "Add your description here"
readme = "README.md" readme = "README.md"
requires-python = ">=3.14" requires-python = ">=3.14"
Generated
+1 -1
View File
@@ -54,7 +54,7 @@ wheels = [
[[package]] [[package]]
name = "cool-domain" name = "cool-domain"
version = "1.1.0" version = "1.1.1"
source = { editable = "." } source = { editable = "." }
dependencies = [ dependencies = [
{ name = "requests" }, { name = "requests" },