anti-cf 1.0.1__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {anti_cf-1.0.1 → anti_cf-1.0.2}/PKG-INFO +1 -1
- {anti_cf-1.0.1 → anti_cf-1.0.2}/pyproject.toml +16 -1
- {anti_cf-1.0.1 → anti_cf-1.0.2}/src/anti_cf/_persistent_session.py +2 -1
- {anti_cf-1.0.1 → anti_cf-1.0.2}/README.md +0 -0
- {anti_cf-1.0.1 → anti_cf-1.0.2}/src/anti_cf/__init__.py +0 -0
- {anti_cf-1.0.1 → anti_cf-1.0.2}/src/anti_cf/_constants.py +0 -0
- {anti_cf-1.0.1 → anti_cf-1.0.2}/src/anti_cf/_flaresolverr.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "anti_cf"
|
3
|
-
version = "1.0.
|
3
|
+
version = "1.0.2"
|
4
4
|
description = "Anti-CloudFlare package"
|
5
5
|
authors = ["Steven Van Ingelgem <steven@vaningelgem.be>"]
|
6
6
|
license = "MIT"
|
@@ -14,6 +14,7 @@ requests = "*"
|
|
14
14
|
|
15
15
|
[tool.poetry.group.dev.dependencies]
|
16
16
|
pytest-cov = "*"
|
17
|
+
coverage = ">=7.2.0"
|
17
18
|
pytest-mock = "*"
|
18
19
|
ruff = "*"
|
19
20
|
|
@@ -119,3 +120,17 @@ strict = true
|
|
119
120
|
|
120
121
|
[tool.ruff.lint.per-file-ignores]
|
121
122
|
"tests/**/*.py" = ["D100", "D103", "B018", "FBT001"]
|
123
|
+
|
124
|
+
[tool.coverage.run]
|
125
|
+
branch = true
|
126
|
+
|
127
|
+
[tool.coverage.report]
|
128
|
+
exclude_also = [
|
129
|
+
"if TYPE_CHECKING:",
|
130
|
+
"if _HAS_CACHE:",
|
131
|
+
# Don't complain if non-runnable code isn't run:
|
132
|
+
"if __name__ == .__main__.:",
|
133
|
+
|
134
|
+
# Don't complain about abstract methods, they aren't run:
|
135
|
+
"@(abc\\.)?abstractmethod",
|
136
|
+
]
|
@@ -6,6 +6,7 @@ from typing import TYPE_CHECKING, ClassVar
|
|
6
6
|
|
7
7
|
import fake_useragent
|
8
8
|
from logprise import logger
|
9
|
+
from requests import HTTPError
|
9
10
|
|
10
11
|
from ._constants import CACHE_PATH, DEFAULT_TIMEOUT, FLARESOLVERR_PROXY
|
11
12
|
from ._flaresolverr import ensure_flaresolverr_running, get_flaresolverr_settings
|
@@ -16,7 +17,7 @@ try:
|
|
16
17
|
_HAS_CACHE = True
|
17
18
|
logger.info("Using CachedSession for persistent session")
|
18
19
|
except ImportError:
|
19
|
-
from requests import
|
20
|
+
from requests import Session
|
20
21
|
|
21
22
|
_HAS_CACHE = False
|
22
23
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|