mirror of
https://github.com/kristoferssolo/kristofersxyz.git
synced 2025-10-21 18:30:34 +00:00
Added automatic linting
This commit is contained in:
parent
235a625012
commit
5be2ff50a1
23
.github/workflows/lint.yml
vendored
Normal file
23
.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
name: Lint
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
python-version: ["3.10"]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install tox tox-gh-actions
|
||||
- name: Lint with tox
|
||||
run: tox
|
||||
3
README.md
Normal file
3
README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Kristofers Solo website
|
||||
|
||||

|
||||
17
pyproject.toml
Normal file
17
pyproject.toml
Normal file
@ -0,0 +1,17 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=42.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.mypy]
|
||||
check_untyped_defs = true
|
||||
disallow_any_generics = true
|
||||
ignore_missing_imports = true
|
||||
mypy_path = "kristofersxyz"
|
||||
no_implicit_optional = true
|
||||
no_implicit_reexport = true
|
||||
show_error_codes = true
|
||||
strict_equality = true
|
||||
warn_redundant_casts = true
|
||||
warn_return_any = true
|
||||
warn_unreachable = true
|
||||
warn_unused_configs = true
|
||||
5
requirements_dev.txt
Normal file
5
requirements_dev.txt
Normal file
@ -0,0 +1,5 @@
|
||||
flake8==6.0.0
|
||||
mypy==0.991
|
||||
pytest-cov==4.0.0
|
||||
pytest==7.2.0
|
||||
tox==3.27.1
|
||||
32
setup.cfg
Normal file
32
setup.cfg
Normal file
@ -0,0 +1,32 @@
|
||||
[metadata]
|
||||
name = kristofersxyz
|
||||
description = Kristofers Solo website
|
||||
author = Kristofers Solo
|
||||
license = MIT
|
||||
license_files = LICENSE
|
||||
platforms = unix, linux, osx, cygwin, win32
|
||||
classifiers =
|
||||
Programming Language :: Python :: 3.10
|
||||
|
||||
[options]
|
||||
packages = kristofersxyz
|
||||
install_requires =
|
||||
Django>=4.1
|
||||
|
||||
python_requires = >=3.10
|
||||
package_dir = =.
|
||||
zip_safe = no
|
||||
|
||||
[options.extras_require]
|
||||
testing =
|
||||
flake8>=6.0.0
|
||||
mypy>=0.991
|
||||
pytest-cov>=4.0.0
|
||||
pytest>=7.2.0
|
||||
tox>=3.27.1
|
||||
|
||||
[options.package_data]
|
||||
detector = py.typed
|
||||
|
||||
[flake8]
|
||||
max-line-length = 160
|
||||
4
setup.py
Normal file
4
setup.py
Normal file
@ -0,0 +1,4 @@
|
||||
from setuptools import setup
|
||||
|
||||
if __name__ == "__main__":
|
||||
setup()
|
||||
25
tox.ini
Normal file
25
tox.ini
Normal file
@ -0,0 +1,25 @@
|
||||
[tox]
|
||||
minversion = 3.8.0
|
||||
envlist = py310, flake8, mypy
|
||||
isolated_build = true
|
||||
|
||||
[gh-actions]
|
||||
python =
|
||||
3.10: py310, mypy, flake8
|
||||
|
||||
[testenv]
|
||||
setenv =
|
||||
PYTHONPATH = {toxinidir}
|
||||
deps =
|
||||
-r{toxinidir}/requirements_dev.txt
|
||||
|
||||
[testenv:flake8]
|
||||
basepython = python3.10
|
||||
deps = flake8
|
||||
commands = flake8 kristofersxyz
|
||||
|
||||
[testenv:mypy]
|
||||
basepython = python3.10
|
||||
deps =
|
||||
-r{toxinidir}/requirements_dev.txt
|
||||
commands = mypy kristofersxyz
|
||||
Loading…
Reference in New Issue
Block a user