--- /dev/null
+---
+name: lint
+
+"on":
+ push: {}
+
+permissions:
+ contents: read
+
+jobs:
+ lint:
+ runs-on: [ubuntu-latest]
+
+ env:
+ SKIP_VENV: 1
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Fetch master (for incremental diff, lint filter mask)
+ run: git fetch origin master
+
+ - name: Reload Cache / pip
+ uses: actions/setup-python@v5
+ with:
+ python-version: 3
+ cache: "pip" # caching pip dependencies
+ cache-dependency-path: "**/*requirements*.txt"
+ update-environment: false
+
+ - name: Install requirements
+ run: |
+ pip install -r requirements.txt
+ pip install -r .requirements-lint.txt
+
+ # NOTE: pytest is needed to lint the folder: "tests/"
+ # pip install -r requirements-test.txt
+
+ - name: Lint
+ run: make lint
--- /dev/null
+[MASTER]
+
+fail-under=9.5
+
+
+[MESSAGES CONTROL]
+
+disable=
+ fixme,
+ consider-using-f-string,
+ missing-module-docstring,
+ missing-function-docstring,
+ too-many-arguments,
+ too-many-positional-arguments,
+ too-many-instance-attributes,
+ too-many-branches,
+ too-many-statements,
--- /dev/null
+[tool:pytest]
+# See: https://docs.pytest.org/en/7.1.x/reference/customize.html
+testpaths =
+ tests
+
+[coverage:run]
+# See: https://coverage.readthedocs.io/en/7.2.2/config.html#run
+command_line = -m pytest
+source = ntclient
+
+[coverage:report]
+fail_under = 90.00
+precision = 2
+
+show_missing = True
+skip_empty = True
+skip_covered = True
+
+omit =
+ # Unlike the server & db, the CLI doesn't call the sql module.
+ # It directly imports the `build_ntsqlite()` function.
+ ntclient/ntsqlite/sql/__main__.py,
+
+exclude_lines =
+ pragma: no cover
+
+
+
+[pycodestyle]
+max-line-length = 88
+
+
+
+[flake8]
+per-file-ignores =
+ # Allow unused imports in __init__.py files
+ ; __init__.py:F401,
+
+max-line-length = 88
+
+ignore =
+ # line break before binary operator
+ W503,
+
+
+
+[isort]
+line_length = 88
+known_first_party = ntclient
+
+# See: https://copdips.com/2020/04/making-isort-compatible-with-black.html
+multi_line_output = 3
+include_trailing_comma = True
+
+
+
+[mypy]
+show_error_codes = True
+;show_error_context = True
+;pretty = True
+
+disallow_incomplete_defs = True
+disallow_untyped_defs = True
+disallow_untyped_calls = True
+disallow_untyped_decorators = True
+
+;strict_optional = True
+no_implicit_optional = True
+
+warn_return_any = True
+warn_redundant_casts = True
+warn_unreachable = True
+
+warn_unused_ignores = True
+warn_unused_configs = True
+warn_incomplete_stub = True
+
+# Our tests, they don't return a value typically