mirror of
https://github.com/ModOrganizer2/modorganizer-basic_games.git
synced 2026-07-27 14:07:29 -07:00
Add tox configuration and Github action for linting.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
name: linters
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
python-version: [3.8]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install tox
|
||||
- name: Test with tox
|
||||
run: tox -e py38-lint
|
||||
+2
-1
@@ -1,2 +1,3 @@
|
||||
.mypy_cache
|
||||
__pycache__
|
||||
__pycache__
|
||||
.tox
|
||||
@@ -7,4 +7,18 @@ extend-ignore =
|
||||
|
||||
[mypy]
|
||||
warn_return_any = True
|
||||
warn_unused_configs = True
|
||||
warn_unused_configs = True
|
||||
|
||||
[tox:tox]
|
||||
skipsdist = true
|
||||
envlist = py38-lint
|
||||
|
||||
[testenv:py36-lint]
|
||||
skip_install = true
|
||||
deps =
|
||||
black
|
||||
flake8
|
||||
flake8-black
|
||||
commands =
|
||||
black --check --diff setup.py deel tests
|
||||
flake8 deel tests
|
||||
+3
-1
@@ -27,7 +27,9 @@ class LibraryFolder:
|
||||
self.games = []
|
||||
for filename in os.listdir(os.path.join(path, "steamapps")):
|
||||
if filename.startswith("appmanifest"):
|
||||
with open(os.path.join(path, "steamapps", filename), "r", encoding="utf-8") as fp:
|
||||
with open(
|
||||
os.path.join(path, "steamapps", filename), "r", encoding="utf-8"
|
||||
) as fp:
|
||||
i, n = None, None
|
||||
for line in fp:
|
||||
line = line.strip()
|
||||
|
||||
Reference in New Issue
Block a user