mirror of
https://github.com/lilydjwg/nvchecker
synced 2024-12-18 12:45:00 +00:00
Merge pull request #220 from alexfikl/port-platformdirs
Port from deprecated appdirs to platformdirs
This commit is contained in:
commit
e71dd309e7
2
.github/workflows/mypy.yaml
vendored
2
.github/workflows/mypy.yaml
vendored
@ -18,7 +18,7 @@ jobs:
|
||||
${{ runner.os }}-${{ env.cache-name }}-
|
||||
${{ runner.os }}-cache-pip-
|
||||
- name: Install deps
|
||||
run: pip3 install -U tornado pytest pytest-asyncio pytest-httpbin flaky structlog tomli aiohttp httpx mypy awesomeversion
|
||||
run: pip3 install -U tornado pytest pytest-asyncio pytest-httpbin flaky structlog tomli platformdirs aiohttp httpx mypy awesomeversion
|
||||
- name: Run mypy for --install-types
|
||||
run: PATH=$HOME/.local/bin:$PATH mypy --namespace-packages --explicit-package-bases nvchecker nvchecker_source tests
|
||||
continue-on-error: true
|
||||
|
2
.github/workflows/tests.yaml
vendored
2
.github/workflows/tests.yaml
vendored
@ -45,7 +45,7 @@ jobs:
|
||||
sudo apt install -y libcurl4-openssl-dev
|
||||
# werkzeug is pinned for httpbin compatibility https://github.com/postmanlabs/httpbin/issues/673
|
||||
- name: Install Python deps
|
||||
run: pip install -U ${{ matrix.deps }} pytest pytest-asyncio pytest-httpbin flaky structlog tomli appdirs lxml 'werkzeug<2.1' awesomeversion
|
||||
run: pip install -U ${{ matrix.deps }} pytest pytest-asyncio pytest-httpbin flaky structlog tomli platformdirs lxml 'werkzeug<2.1' awesomeversion
|
||||
- name: Decrypt keys
|
||||
env:
|
||||
KEY: ${{ secrets.KEY }}
|
||||
|
@ -24,7 +24,7 @@ This is the version 2.0 branch. For the old version 1.x, please switch to the ``
|
||||
Dependency
|
||||
----------
|
||||
- Python 3.7+
|
||||
- Python library: structlog, tomli, appdirs
|
||||
- Python library: structlog, tomli, platformdirs
|
||||
- One of these Python library combinations (ordered by preference):
|
||||
|
||||
* tornado + pycurl
|
||||
|
@ -1,6 +1,6 @@
|
||||
tomli
|
||||
structlog
|
||||
appdirs
|
||||
platformdirs
|
||||
tornado>=6
|
||||
sphinx>=3.2
|
||||
# <5 has strange bottom margins for p, and no list indicators
|
||||
|
@ -18,7 +18,7 @@ This is the version 2.0 branch. For the old version 1.x, please switch to the ``
|
||||
Dependency
|
||||
----------
|
||||
- Python 3.7+
|
||||
- Python library: structlog, tomli, appdirs
|
||||
- Python library: structlog, tomli, platformdirs
|
||||
- One of these Python library combinations (ordered by preference):
|
||||
|
||||
* tornado + pycurl
|
||||
|
3
mypy.ini
3
mypy.ini
@ -18,8 +18,5 @@ ignore_missing_imports = True
|
||||
[mypy-pytest_httpbin]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-appdirs]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-lxml]
|
||||
ignore_missing_imports = True
|
||||
|
@ -22,7 +22,7 @@ import json
|
||||
|
||||
import structlog
|
||||
import tomli
|
||||
import appdirs
|
||||
import platformdirs
|
||||
|
||||
from .lib import nicelogger
|
||||
from . import slogconf
|
||||
@ -40,7 +40,7 @@ from . import httpclient
|
||||
logger = structlog.get_logger(logger_name=__name__)
|
||||
|
||||
def get_default_config() -> str:
|
||||
confdir = appdirs.user_config_dir(appname='nvchecker')
|
||||
confdir = platformdirs.user_config_dir(appname='nvchecker')
|
||||
file = os.path.join(confdir, 'nvchecker.toml')
|
||||
return file
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user