-
Notifications
You must be signed in to change notification settings - Fork 46
/
pyproject.toml
242 lines (199 loc) · 7.09 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
[tool.poetry]
name = "TelegramExplorer"
version = "0.3.0"
description = "Telegram Explorer"
authors = ["Th3 0bservator <th30bservator@gmail.com>"]
maintainers = [
"Th3 0bservator <th30bservator@gmail.com>"
]
license = "Apache-2.0"
readme = "README.md"
homepage = "https://github.com/guibacellar/TEx"
repository = "https://github.com/guibacellar/TEx"
documentation = "https://telegramexplorer.readthedocs.io/en/latest/"
keywords = [
"CyberSecurity",
"Investigation",
"OSINT",
"OpenSourceIntelligence",
"Tool"
]
classifiers = [
'Environment :: Console',
'Intended Audience :: Information Technology',
'License :: Freely Distributable',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.8',
'Topic :: Security',
'Topic :: Utilities',
'Topic :: Software Development :: Build Tools',
'Topic :: Software Development :: Libraries :: Python Modules',
]
packages = [
{ include = "TEx", from="." },
]
include = [
"pyproject.toml",
".README.md"
]
exclude = [".tox", "venv", "dist"]
# Requirements
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
poetry-core = ">=1.6.1,<2"
poetry-plugin-export = "^1.4.0"
build = "^0.10.0"
Telethon = "1.29.2"
cryptg = ">=0.2.post4"
telethon-cryptg = ">=0.0.4"
SQLAlchemy = ">=2.0.19,<2.1"
aiosqlite = ">=0.19.0"
Jinja2 = ">=3.0.3"
pytz = ">=2023.3"
urllib3 = ">=1.26.8"
requests = ">=2.31.0,<3"
cachetools = ">=5.3.1,<6"
toml = ">=0.10.2"
tox = "^4.10.0"
discord-webhook = {extras = ["async"], version=">=1.3.0,<2"}
aiofiles = "23.2.1"
types-aiofiles = "23.2.0.0"
python-socks = "2.4.3"
async-timeout = "4.0.3"
elasticsearch = {extras = ["async"], version = "8.10.0"}
pydantic = "2.4.2"
pytesseract = "0.3.10"
[tool.poetry.dev-dependencies]
pytest = ">=7.4.0"
tox = ">=4.7.0"
coverage = ">=7.3.0"
mypy = ">=1.4.1"
astroid = ">=2.15.6"
pep8-naming = ">=0.13.3"
types-pytz = ">=2023.3.0.0"
types-requests = ">=2.31.0.2"
types-cachetools = ">=5.3.0.6"
types-toml = ">=0.10.8.7"
mkdocs = ">=1.5.3,<2"
mkdocs-material = ">=9.4.2,<10"
ruff = "0.0.292"
parameterized = "0.9.0"
pandas = "2.0.3"
lxml = ">=4.9.3,<5"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
backend = "poetry.core.masonry.api"
[tool.ruff]
target-version = "py38"
select = [
"F", # Pyflakes
"E", "W", # pycodestyle
"D", # pydocstyle
"PL", # Pylint
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"ERA", # eradicate
"TRY", # tryceratops
"FLY", # flynt
"FIX", "TD", "YTT", "ARG", "INT",
"TCH", "TID", "SIM", "SLOT", "SLF",
"RET", "RSE", "Q", "PT", "UP",
"PYI", "T20", "PIE", "INP", "G",
"ICN", "ISC", "FA", "EXE", "EM",
"PYI", "T10", "DTZ", "C4", "COM",
"A", "B", "BLE", "S", "ASYNC",
"ANN", "PTH", # All Flake 8 Modules
"C90" # mccabe
]
unfixable = []
exclude = [".venv", "tests", "runner.py", "__init__.py", "__main__.py"]
ignore = [
"TCH003", # Conflicts \o/
"ANN101", # Don't make any sense
"G004", # Logging with fString provides more legibilidade
"UP006", # TO BE ENABLED AFTER CHANGE MIN PYTHON VERSION TO 3.10 - Use `list` instead of `List` for type annotation
"UP007", # TO BE ENABLED AFTER CHANGE MIN PYTHON VERSION TO 3.10 - Use `X | Y` for type annotations
"PTH100", "PTH102", "PTH103", "PTH107", "PTH109", "PTH110", "PTH122", "PTH118", "PTH119", "PTH123", # Technical Debt - Reserved for Future Refactory - Requires wExtensive Tests
]
# Same as Black.
line-length = 200
show-fixes = true
[tool.ruff.per-file-ignores]
[tool.ruff.pydocstyle]
convention = "pep257"
[tool.ruff.pylint]
max-args=7
max-branches=12
max-public-methods=20
max-returns=6
max-statements=50
[tool.ruff.flake8-unused-arguments]
ignore-variadic-names = false
[tool.ruff.flake8-type-checking]
exempt-modules = [
"sqlalchemy",
"TEx",
"telethon",
"_hashlib",
"aiofiles"
]
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.flake8-self]
extend-ignore-names = ["TBD"]
[tool.ruff.flake8-quotes]
avoid-escape = true
docstring-quotes = "double"
inline-quotes = "single"
multiline-quotes = "double"
[tool.ruff.flake8-import-conventions]
[tool.ruff.flake8-import-conventions.aliases]
# Declare the default aliases.
numpy = "np"
pandas = "pd"
seaborn = "sns"
scipy = "sp"
[tool.ruff.flake8-implicit-str-concat]
allow-multiline = true
[tool.ruff.flake8-errmsg]
max-string-length = 20
[tool.ruff.flake8-builtins]
builtins-ignorelist = ["id"]
[tool.ruff.flake8-annotations]
allow-star-arg-any = false
ignore-fully-untyped = false
mypy-init-return = false
suppress-dummy-args = false
suppress-none-returning = false
[tool.ruff.extend-per-file-ignores]
"TEx/core/media_handler.py" = ["S324"]
"TEx/core/media_download_handling/do_nothing_media_downloader.py" = ["ARG002", "ARG004"]
"TEx/core/media_metadata_handling/do_nothing_media_handler.py" = ["ARG002", "ARG004"]
"TEx/exporter/pandas_rolling_exporter.py" = ["ARG002"]
"TEx/modules/data_structure_handler.py" = ["ARG002", "ARG004"]
"TEx/modules/database_handler.py" = ["ARG002", "ARG004"]
"TEx/modules/execution_configuration_handler.py" = ["ARG002", "ARG004"]
"TEx/modules/input_args_handler.py" = ["ARG002", "ARG004", "B009"]
"TEx/modules/state_file_handler.py" = ["ARG002", "ARG004"]
"TEx/finder/all_messages_finder.py" = ["ARG002"]
"TEx/notifier/notifier_base.py" = ["S324"]
"TEx/modules/telegram_connection_manager.py" = ["ARG002", "ARG004", "BLE001"]
"TEx/modules/telegram_groups_list.py" = ["ARG002", "ARG004"]
"TEx/modules/telegram_groups_scrapper.py" = ["ARG002", "ARG004", "ASYNC101", "TRY400"] # REMOVE AND FIX ASYNC101 AFTER UPGRADE TO PYTHON 3.10
"TEx/modules/telegram_maintenance/telegram_purge_old_data.py" = ["ARG002", "ARG004", "TRY400"]
"TEx/modules/telegram_messages_listener.py" = ["ARG002", "ARG004"]
"TEx/modules/telegram_messages_scrapper.py" = ["ARG002", "ARG004", "TRY400"]
"TEx/modules/telegram_report_generator/telegram_export_file_generator.py" = ["ARG002", "ARG004", "S324", "ASYNC101"] # REMOVE AND FIX ASYNC101 AFTER UPGRADE TO PYTHON 3.10
"TEx/modules/telegram_report_generator/telegram_export_text_generator.py" = ["ARG002", "ARG004", "S324"]
"TEx/modules/telegram_report_generator/telegram_html_report_generator.py" = ["ARG002", "ARG004", "S324"]
"TEx/modules/telegram_report_generator/telegram_report_sent_telegram.py" = ["ARG002", "ARG004", "S324"]
"TEx/core/ocr/ocr_engine_factory.py" = ["TRY003"]
"TEx/core/ocr/dummy_ocr_engine.py" = ["ARG002"]
"TEx/core/ocr/tesseract_ocr_engine.py" = ["TRY003"]
"TEx/database/db_manager.py" = ["ARG004"]
"TEx/modules/telegram_stats_generator.py" = ["ARG002", "ARG004"]
"TEx/modules/temp_file_manager.py" = ["ARG002", "ARG004"]