diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml new file mode 100644 index 0000000..9a9b083 --- /dev/null +++ b/.github/workflows/linters.yml @@ -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 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 572b38d..aff9647 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .mypy_cache -__pycache__ \ No newline at end of file +__pycache__ +.tox \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 307726e..c8fe5f1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,4 +7,18 @@ extend-ignore = [mypy] warn_return_any = True -warn_unused_configs = True \ No newline at end of file +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 \ No newline at end of file diff --git a/steam_utils.py b/steam_utils.py index 5752be0..3f7ee96 100644 --- a/steam_utils.py +++ b/steam_utils.py @@ -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()