Skip to content

Commit d879c41

Browse files
committed
minor updates
1 parent 890feca commit d879c41

File tree

9 files changed

+124
-137
lines changed

9 files changed

+124
-137
lines changed

.github/workflows/dependabot.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818

1919
jobs:
2020
run:
21-
name: Update requirements.txt
21+
name: Update requirements.txt and lock file
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@v4
@@ -29,8 +29,10 @@ jobs:
2929
poetry-version: ${{ env.POETRY_VERSION }}
3030
python-version: ${{ env.PYTHON_VERSION }}
3131
install-dependencies: false
32-
- name: Run poetry export
33-
run: poetry export -f requirements.txt --output requirements.txt --without-hashes
32+
- name: Update dependencies
33+
run: |
34+
poetry lock --no-update
35+
poetry export -f requirements.txt --output requirements.txt --without-hashes
3436
- uses: stefanzweifel/git-auto-commit-action@v5
3537
with:
3638
commit_message: Update requirements.txt

.markdownlint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ default: true
33

44
# MD013/line-length - Line length
55
MD013:
6-
line_length: 120
6+
line_length: 130
77
tables: false
88

99
# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
- id: check-added-large-files
1414

1515
- repo: https://github.com/ambv/black
16-
rev: 23.12.1
16+
rev: 24.1.1
1717
hooks:
1818
- id: black
1919
args: [--line-length, '130', --target-version, py38]
@@ -42,7 +42,7 @@ repos:
4242
args: [--autofix]
4343

4444
- repo: https://github.com/igorshubovych/markdownlint-cli
45-
rev: v0.38.0
45+
rev: v0.39.0
4646
hooks:
4747
- id: markdownlint
4848
args: [--fix]

Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
clean:
2-
rm -rf .venv
3-
rm -rf .pytest_cache
4-
rm -rf .tox
5-
rm -rf .mypy_cache
2+
rm -rf .venv .pytest_cache .tox .mypy_cache dist build
63

74
install:
85
poetry install
@@ -24,8 +21,7 @@ tox:
2421
tox
2522

2623
executable:
27-
rm -r ./build ||:
28-
rm -r ./dist ||:
24+
rm -rf ./build ./dist
2925
poetry run pyinstaller ./scanner.spec
3026
cp ./config.sample.ini ./dist/config.ini
3127
zip -j ./dist/scanner.zip ./dist/*

RELEASE_CHECKLIST.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

poetry.lock

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
anyio==4.2.0 ; python_version >= "3.9" and python_version < "3.13"
22
apprise==1.7.2 ; python_version >= "3.9" and python_version < "3.13"
33
cachetools==5.3.2 ; python_version >= "3.9" and python_version < "3.13"
4-
certifi==2023.11.17 ; python_version >= "3.9" and python_version < "3.13"
4+
certifi==2024.2.2 ; python_version >= "3.9" and python_version < "3.13"
55
charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "3.13"
66
click==8.1.7 ; python_version >= "3.9" and python_version < "3.13"
77
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and (sys_platform == "win32" or platform_system == "Windows")

tgtg_scanner/__main__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434

3535
SYS_PLATFORM = platform.system()
3636
IS_WINDOWS = SYS_PLATFORM.lower() in {"windows", "cygwin"}
37-
IS_EXECUTABLE = getattr(sys, "_MEIPASS", False)
37+
IS_EXECUTABLE = getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS")
3838
PROG_PATH = Path(sys.executable).parent if IS_EXECUTABLE else Path(os.getcwd())
3939
IS_DOCKER = os.environ.get("DOCKER", "False").lower() in {"true", "1", "t", "y", "yes"}
40-
LOGS_PATH = os.environ.get("LOGS_PATH", PROG_PATH)
40+
LOGS_PATH = Path(os.environ.get("LOGS_PATH", PROG_PATH))
4141

4242

4343
def main():
@@ -130,6 +130,7 @@ def main():
130130
logging.root.addHandler(stream_handler)
131131

132132
# Define file formatter and handler
133+
args.log_file.parent.mkdir(parents=True, exist_ok=True)
133134
file_handler = logging.FileHandler(args.log_file, mode="w", encoding="utf-8")
134135
file_formatter = logging.Formatter(
135136
fmt=("[%(asctime)s][%(name)s][%(filename)s:%(funcName)s:%(lineno)d][%(levelname)s] %(message)s"),

0 commit comments

Comments
 (0)