Skip to content

Commit 7eebf89

Browse files
committed
fix: update dependency installation commands in lint workflow and improve proxy environment variable handling
1 parent 8cc2ebc commit 7eebf89

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
python-version: "3.9"
1818
- name: Install dependencies
19-
run: pip install --upgrade pip black
19+
run: pip install --no-cache-dir black==24.10.0
2020
- name: Run black
2121
run: black --check --diff --verbose .
2222
isort:
@@ -28,7 +28,7 @@ jobs:
2828
with:
2929
python-version: "3.9"
3030
- name: Install dependencies
31-
run: pip install --upgrade pip isort[colors]
31+
run: pip install --no-cache-dir "isort[colors]==6.1.0"
3232
- name: Run isort
3333
run: isort --check-only --diff --verbose .
3434
flake8:
@@ -40,7 +40,7 @@ jobs:
4040
with:
4141
python-version: "3.9"
4242
- name: Install dependencies
43-
run: pip install --upgrade pip flake8
43+
run: pip install --no-cache-dir flake8==7.3.0
4444
- name: Run flake8
4545
run: flake8 --verbose .
4646
mypy:
@@ -52,6 +52,6 @@ jobs:
5252
with:
5353
python-version: "3.9"
5454
- name: Install dependencies
55-
run: pip install --upgrade pip mypy pydantic
55+
run: pip install --no-cache-dir mypy==1.15.0 pydantic
5656
- name: Run mypy
5757
run: mypy --install-types --non-interactive ./src

src/pytmv1/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ def __init__(
7676
"User-Agent": f"{self._appname}-{USERAGENT_SUFFIX}/{__version__}",
7777
}
7878
self._proxies: Optional[Dict[str, str]] = _proxy(
79-
os.getenv("HTTP_PROXY"), os.getenv("HTTPS_PROXY")
79+
os.getenv("HTTP_PROXY") or os.getenv("http_proxy"),
80+
os.getenv("HTTPS_PROXY") or os.getenv("https_proxy"),
8081
)
8182

8283
@result

tests/unit/test_core.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
__version__,
2727
)
2828
from pytmv1 import core as core_m
29-
from pytmv1 import result
29+
from pytmv1 import (
30+
result,
31+
)
3032
from pytmv1.core import API_VERSION, USERAGENT_SUFFIX, Core
3133
from pytmv1.exception import (
3234
ParseModelError,

0 commit comments

Comments
 (0)