pull/451/head
c-w-m 3 years ago
parent 9459ca7711
commit 88cc67c2ad

@ -5,9 +5,9 @@ ARG VARIANT="3.10-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
# CA Certificate using a script that read the files from the ./certs directory
COPY certs/. /usr/local/share/ca-certificates/
ENV NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/my_company.pem
RUN sudo update-ca-certificates
#COPY certs/. /usr/local/share/ca-certificates/
#ENV NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/my_company.pem
#RUN sudo update-ca-certificates
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
@ -53,3 +53,7 @@ RUN rm -rf /tmp/pip-tmp
# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
# [Optional] Uncomment this line to install sqlite.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends sqlite3

@ -47,8 +47,7 @@
// dev project package installation as `develop` (i.e., instant availability of changes)
//"postCreateCommand": "python setup.py develop", # FAILS unable to write, raise to sudo
//"postCreateCommand": "sudo python setup.py develop",
//"postCreateCommand": "sudo pip3 --trusted-host pypi.org --trusted-host files.pythonhosted.org --disable-pip-version-check --no-cache-dir install -e .",
"postCreateCommand": "sudo python setup.py develop",
"postCreateCommand": "sudo pip3 --trusted-host pypi.org --trusted-host files.pythonhosted.org --disable-pip-version-check --no-cache-dir install -e .",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",

@ -15,19 +15,26 @@
"certifi",
"cffi",
"configfile",
"covdefaults",
"Cython",
"datamodel",
"dateutil",
"debugpy",
"defusedxml",
"devcontainer",
"devop",
"distlib",
"docstrings",
"docutils",
"dotenv",
"éçäγλνπ",
"entrypoints",
"esbonio",
"filelock",
"fonttools",
"genutils",
"hétérogénéité",
"idat",
"idna",
"iniconfig",
"inorout",
@ -68,6 +75,7 @@
"pycparser",
"pydantic",
"pydocstyle",
"pyenchant",
"pyflakes",
"pygments",
"pylance",
@ -83,6 +91,7 @@
"pyyaml",
"pyzmq",
"rootdir",
"ruamel",
"scipy",
"seaborn",
"setuptools",
@ -90,18 +99,28 @@
"soupsieve",
"sqlalchemy",
"Stmts",
"struc",
"tbump",
"terminado",
"testenv",
"testpath",
"testpaths",
"testutil",
"toolsai",
"traitlets",
"typeshed",
"ujson",
"urllib",
"virtualenv",
"vsclint",
"vspdo",
"wcwidth",
"webencodings",
"xdist",
"xfailed",
"yapf"
"yapf",
"الأَبْجَدِيَ",
"العَرَبِيَ"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,

@ -1,227 +0,0 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Manual Validation Testing\n",
"\n",
"Here are the basic validation tests you can perform in a terminal or here from a Jupyter notebook. \n",
"Basic `mypy`, `flake8`, and `pytest` commands and results. These test can also be fond in `tox.ini` were they are run against Python 3.9 and 3.10.\n",
"\n",
"---\n",
"\n",
"## `pytest` \n",
"\n",
"__~45.6 seconds to run__\n",
"\n",
"Run all the `/tests` to make sure the code is behaving as expected.\n",
"\n",
">Note: Remember to add tests if new behavior is added"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1m============================= test session starts ==============================\u001b[0m\n",
"platform linux -- Python 3.10.2, pytest-7.1.1, pluggy-1.0.0\n",
"rootdir: /workspaces/yamllint\n",
"plugins: anyio-3.5.0, env-0.6.2\n",
"collected 356 items \u001b[0m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\u001b[1m\n",
"\n",
"tests/test_cli.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 7%]\u001b[0m\n",
"tests/test_config.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 12%]\u001b[0m\n",
"tests/test_linter.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 14%]\u001b[0m\n",
"tests/test_module.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 16%]\u001b[0m\n",
"tests/test_parser.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 16%]\u001b[0m\n",
"tests/test_spec_examples.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 29%]\n",
"\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 42%]\u001b[0m\n",
"tests/test_syntax_errors.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 44%]\u001b[0m\n",
"tests/test_yamllint_directives.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 47%]\u001b[0m\n",
"tests/rules/test_braces.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 50%]\u001b[0m\n",
"tests/rules/test_brackets.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 52%]\u001b[0m\n",
"tests/rules/test_colons.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 55%]\u001b[0m\n",
"tests/rules/test_commas.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 57%]\u001b[0m\n",
"tests/rules/test_comments.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 61%]\u001b[0m\n",
"tests/rules/test_comments_indentation.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 62%]\u001b[0m\n",
"tests/rules/test_common.py \u001b[32m.\u001b[0m\u001b[32m [ 63%]\u001b[0m\n",
"tests/rules/test_document_end.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 64%]\u001b[0m\n",
"tests/rules/test_document_start.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 65%]\u001b[0m\n",
"tests/rules/test_empty_lines.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 67%]\u001b[0m\n",
"tests/rules/test_empty_values.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 72%]\u001b[0m\n",
"tests/rules/test_hyphens.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 73%]\u001b[0m\n",
"tests/rules/test_indentation.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 84%]\n",
"\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 85%]\u001b[0m\n",
"tests/rules/test_key_duplicates.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 86%]\u001b[0m\n",
"tests/rules/test_key_ordering.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 89%]\u001b[0m\n",
"tests/rules/test_line_length.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 91%]\u001b[0m\n",
"tests/rules/test_new_line_at_end_of_file.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 92%]\u001b[0m\n",
"tests/rules/test_new_lines.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 93%]\u001b[0m\n",
"tests/rules/test_octal_values.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 94%]\u001b[0m\n",
"tests/rules/test_quoted_strings.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 97%]\u001b[0m\n",
"tests/rules/test_trailing_spaces.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [ 98%]\u001b[0m\n",
"tests/rules/test_truthy.py \u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m [100%]\u001b[0m\n",
"\n",
"\u001b[32m============================= \u001b[32m\u001b[1m356 passed\u001b[0m\u001b[32m in 44.09s\u001b[0m\u001b[32m =============================\u001b[0m\n"
]
}
],
"source": [
"!cd .. && pytest tests"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"## `flake8` \n",
"\n",
"__~ 2.9 seconds to run__\n",
"\n",
"Run `flake8` on both the `/src` and `/tests` to identify:\n",
"\n",
"- coding style (PEP8)\n",
"- programming errors (like “library imported but unused” and “Undefined name”)\n",
"- cyclomatic complexity\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"!flake8 ../yamllint"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"!flake8 ../tests"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"## `mypy` \n",
"\n",
"__~ 2.9 seconds to run__\n",
"\n",
"Run `mypy` on both the `/src` to identify\"\n",
"\n",
"- missing static type passing between methods"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"../yamllint/parser.py:17: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/linter.py:19: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/truthy.py:125: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/quoted_strings.py:120: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/octal_values.py:76: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/line_length.py:101: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/key_ordering.py:86: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/key_duplicates.py:57: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/empty_values.py:78: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/document_start.py:75: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/document_end.py:85: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/common.py:19: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/indentation.py:203: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/hyphens.py:79: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/comments_indentation.py:78: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/commas.py:105: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/colons.py:82: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/brackets.py:137: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/braces.py:136: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"../yamllint/rules/braces.py:136: \u001b[34mnote:\u001b[m Hint: \u001b[m\u001b[1m\"python3 -m pip install types-PyYAML\"\u001b[m\u001b[m\n",
"../yamllint/rules/braces.py:136: \u001b[34mnote:\u001b[m (or run \u001b[m\u001b[1m\"mypy --install-types\"\u001b[m to install all missing stub packages)\u001b[m\n",
"../yamllint/rules/braces.py:136: \u001b[34mnote:\u001b[m See \u001b[4mhttps://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports\u001b[m\u001b[m\n",
"../yamllint/config.py:19: \u001b[1m\u001b[31merror:\u001b[m Skipping analyzing \u001b[m\u001b[1m\"pathspec\"\u001b[m: module is installed, but missing library stubs or py.typed marker\u001b[m\n",
"../yamllint/config.py:20: \u001b[1m\u001b[31merror:\u001b[m Library stubs not installed for \u001b[m\u001b[1m\"yaml\"\u001b[m (or incompatible with Python 3.10)\u001b[m\n",
"\u001b[1m\u001b[31mFound 21 errors in 20 files (checked 29 source files)\u001b[m\n"
]
}
],
"source": [
"!mypy ../yamllint"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"## `tox` \n",
"\n",
"__~ 12 minutes and 35 seconds to run__ the first time because each virtual environment has to be\n",
"created. On the second run the time is __~ 3 minutes and 47 seconds to run__ \n",
"\n",
"Run `tox` to do all of the above again for multiple Python versions. The results are piped into a markdown file that you can inspect and update with your notes."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# this project doesn't have a tox (yet)\n",
"#!cd .. && sudo tox > tox_run.md"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---"
]
}
],
"metadata": {
"interpreter": {
"hash": "949777d72b0d2535278d3dc13498b2535136f6dfe0678499012e853ee9abcab1"
},
"kernelspec": {
"display_name": "Python 3.10.2 64-bit",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.2"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}

@ -0,0 +1,848 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Tox Prototype\n",
"\n",
"Before running [`tox.ini`](../tox.ini) with a matrix of tests vs Python versions it is wise to manually run the same testing in your development environment.\n",
"\n",
"## Development Environment\n",
"\n",
"The recommended development (__dev__) environment:\n",
"\n",
"- Python 3.10\n",
"- requirements_dev.txt # must have\n",
"- requirements_user.txt # nice to have\n",
" - requirements-test-min.txt # benchmark (do this from tox)\n",
" - requirements-test.txt # testing (do this from tox)\n",
"\n",
"> Note: The [`Dockfile`](../.devcontainer/Dockerfile) loads all three of these `requirements-*.txt` files into the [`devcontianer`](../.devcontainer/devcontainer.json)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"## [`tox.ini`](../tox.ini)\n",
"\n",
"This is a 'developers' version with the following perspective:\n",
"\n",
"- py39 only\n",
" - use this notebook to manually check py310\n",
" - no plan to support py38 or earlier\n",
"\n",
"---\n",
"\n",
"## Test: `pytest` and `coverage`\n",
"\n",
"__[testenv]__\n",
"\n",
"Looking for broken code to the extent necessary for development.\n",
"\n",
"Minimal Requirements:\n",
"\n",
"- fix all broken tests\n",
"- create new tests to cover new behavior\n",
"- maintain ~40% at all times during development"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Python 3.10.2\n",
"Coverage.py, version 6.3.2 with C extension\n",
"Full documentation is at https://coverage.readthedocs.io\n",
"pytest 7.1.1\n"
]
}
],
"source": [
"# versions used for testing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! python --version\n",
"! coverage --version\n",
"! pytest --version"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1m============================= test session starts ==============================\u001b[0m\n",
"platform linux -- Python 3.10.2, pytest-7.1.1, pluggy-1.0.0\n",
"benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)\n",
"rootdir: /workspaces/vsclint, configfile: pyproject.toml, testpaths: tests\n",
"plugins: typeguard-2.13.3, anyio-3.5.0, forked-1.4.0, cov-3.0.0, xdist-2.5.0, profiling-1.7.0, benchmark-3.4.1, timeout-2.1.0, env-0.6.2\n",
"collected 1 item \u001b[0m\n",
"\n",
"tests/test_cli.py \u001b[32m.\u001b[0m\u001b[32m [100%]\u001b[0m\n",
"\n",
"\u001b[32m============================== \u001b[32m\u001b[1m1 passed\u001b[0m\u001b[32m in 0.15s\u001b[0m\u001b[32m ===============================\u001b[0m\n"
]
}
],
"source": [
"# pytest only ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && pytest tests"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1m============================= test session starts ==============================\u001b[0m\n",
"platform linux -- Python 3.10.2, pytest-7.1.1, pluggy-1.0.0\n",
"benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)\n",
"rootdir: /workspaces/vsclint, configfile: pyproject.toml, testpaths: tests\n",
"plugins: typeguard-2.13.3, anyio-3.5.0, forked-1.4.0, cov-3.0.0, xdist-2.5.0, profiling-1.7.0, benchmark-3.4.1, timeout-2.1.0, env-0.6.2\n",
"collected 1 item \u001b[0m\n",
"\n",
"tests/test_cli.py \u001b[32m.\u001b[0m\u001b[32m [100%]\u001b[0m\n",
"\n",
"---------- coverage: platform linux, python 3.10.2-final-0 -----------\n",
"Name Stmts Miss Cover\n",
"---------------------------------------------\n",
"src/vsclint/__init__.py 0 0 100%\n",
"src/vsclint/cli.py 19 7 63%\n",
"tests/__init__.py 2 0 100%\n",
"tests/common.py 14 0 100%\n",
"tests/test_cli.py 39 0 100%\n",
"---------------------------------------------\n",
"TOTAL 74 7 91%\n",
"\n",
"\n",
"\u001b[32m============================== \u001b[32m\u001b[1m1 passed\u001b[0m\u001b[32m in 0.27s\u001b[0m\u001b[32m ===============================\u001b[0m\n"
]
}
],
"source": [
"# pytest and coverage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && pytest --cov"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"## Linters: `flake8`, `isort`, `black`, and `twine`\n",
"\n",
"__[testenv:linters]__\n",
"\n",
"Lint - Readability and style enforcement.\n",
"\n",
"Minimal Requirements:\n",
"\n",
"- fix all warnings"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Python 3.10.2\n",
"4.0.1 (flake8-bugbear: 22.3.23, flake8-docstrings: 1.6.0, pydocstyle: 6.1.1,\n",
"flake8_typing_imports: 1.12.0, mccabe: 0.6.1, naming: 0.12.1, pycodestyle:\n",
"2.8.0, pyflakes: 2.4.0) CPython 3.10.2 on Linux\n",
"\n",
" _ _\n",
" (_) ___ ___ _ __| |_\n",
" | |/ _/ / _ \\/ '__ _/\n",
" | |\\__ \\/\\_\\/| | | |_\n",
" |_|\\___/\\___/\\_/ \\_/\n",
"\n",
" isort your imports, so you don't have to.\n",
"\n",
" VERSION 5.10.1\n",
"\n",
"\u001b[0mblack, 22.3.0 (compiled: yes)\n",
"twine version 4.0.0 (importlib-metadata: 4.11.3, keyring: 23.5.0, pkginfo:\n",
"1.8.2, requests: 2.27.1, requests-toolbelt: 0.9.1, urllib3: 1.26.9)\n"
]
}
],
"source": [
"# versions used for testing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! python --version\n",
"! flake8 --version\n",
"! isort --version\n",
"! black --version\n",
"! twine --version"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"### `flake8`"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"# flake8 all ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && flake8 src/vsclint tests setup.py"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"# flake8 src/vsclint ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && flake8 src/vsclint"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"# flake8 tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && flake8 tests"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"# flake8 setup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && flake8 setup.py"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"### `isort`"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[0m"
]
}
],
"source": [
"# isort all ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && isort --check-only --df src/vsclint tests setup.py"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[0m"
]
}
],
"source": [
"# isort src/vsclint ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && isort --check-only --df src/vsclint"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[0m"
]
}
],
"source": [
"# isort tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && isort --check-only --df tests"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[0m"
]
}
],
"source": [
"# isort setup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && isort --check-only --df setup.py"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"### `black`"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[0m"
]
}
],
"source": [
"# isort all ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && isort --check-only --df src/vsclint tests setup.py"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[0m"
]
}
],
"source": [
"# isort src/vsclint ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && isort --check-only --df src/vsclint"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[0m"
]
}
],
"source": [
"# isort tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && isort --check-only --df tests"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[0m"
]
}
],
"source": [
"# isort setup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && isort --check-only --df setup.py"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"### `twine`"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[31mERROR \u001b[0m InvalidDistribution: Cannot find file (or expand pattern): \n",
" '.tox/dist/*' \n"
]
}
],
"source": [
"# twine check dist/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && twine check .tox/dist/*"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"#! check-manifest # needs `apt-get install python3-venv`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"## Fixers: `isort`, `black`, and `mypy`\n",
"\n",
"__[testenv:fixers]__\n",
"\n",
"Fix - Readability and style enforcement.\n",
"\n",
"Minimal Requirements:\n",
"\n",
"- fix all warnings\n",
"- gradual typing"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Python 3.10.2\n",
"black, 22.3.0 (compiled: yes)\n",
"\n",
" _ _\n",
" (_) ___ ___ _ __| |_\n",
" | |/ _/ / _ \\/ '__ _/\n",
" | |\\__ \\/\\_\\/| | | |_\n",
" |_|\\___/\\___/\\_/ \\_/\n",
"\n",
" isort your imports, so you don't have to.\n",
"\n",
" VERSION 5.10.1\n",
"\n",
"\u001b[0mmypy 0.942\n",
"mypy-extensions==0.4.3\n",
"types-PyYAML==6.0.5\n"
]
}
],
"source": [
"# versions used for testing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! python --version\n",
"! black --version\n",
"! isort --version\n",
"! mypy --version\n",
"! pip freeze | grep mypy-extensions\n",
"! pip freeze | grep types-PyYAML\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"### `isort`"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[0m"
]
}
],
"source": [
"# isort all ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && isort src/vsclint/ tests/ setup.py"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"### `black`"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"black, 22.3.0 (compiled: yes)\n",
"\u001b[1mAll done! ✨ 🍰 ✨\u001b[0m\n",
"\u001b[34m10 files \u001b[0mleft unchanged.\n"
]
}
],
"source": [
"# black all ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd ..&& black --version && black src/vsclint/ tests/ setup.py"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"## `mypy` \n",
"\n",
"Run `mypy` on the `/src` and `tests`\n",
"\n",
"- gradual typing"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1m\u001b[32mSuccess: no issues found in 6 source files\u001b[m\n"
]
}
],
"source": [
"# mypy src/vsclint ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd ../src && mypy vsclint"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1m\u001b[32mSuccess: no issues found in 3 source files\u001b[m\n"
]
}
],
"source": [
"# mypy tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && mypy tests"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Full check on type hinting."
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"vsclint/config.py:18: \u001b[1m\u001b[31merror:\u001b[m Function is missing a type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def __init__(self, content=None, file=None):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:34: \u001b[1m\u001b[31merror:\u001b[m Call to untyped function \u001b[m\u001b[1m\"parse\"\u001b[m in typed context \n",
"\u001b[m\u001b[33m[no-untyped-call]\u001b[m\n",
"\u001b[2;90m self.parse(content)\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:35: \u001b[1m\u001b[31merror:\u001b[m Call to untyped function \u001b[m\u001b[1m\"validate\"\u001b[m in typed\n",
"context \u001b[m\u001b[33m[no-untyped-call]\u001b[m\n",
"\u001b[2;90m self.validate()\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:37: \u001b[1m\u001b[31merror:\u001b[m Function is missing a type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def is_file_ignored(self, filepath):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:41: \u001b[1m\u001b[31merror:\u001b[m Function is missing a type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def is_yaml_file(self, filepath):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:45: \u001b[1m\u001b[31merror:\u001b[m Function is missing a type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def enabled_rules(self, filepath):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:49: \u001b[1m\u001b[31merror:\u001b[m Cannot determine type of \u001b[m\u001b[1m\"rules\"\u001b[m \u001b[m\u001b[33m[has-type]\u001b[m\n",
"\u001b[2;90m for id, val in self.rules.items()\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:58: \u001b[1m\u001b[31merror:\u001b[m Function is missing a type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def extend(self, base_config):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:62: \u001b[1m\u001b[31merror:\u001b[m Cannot determine type of \u001b[m\u001b[1m\"rules\"\u001b[m \u001b[m\u001b[33m[has-type]\u001b[m\n",
"\u001b[2;90m for rule in self.rules:\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:64: \u001b[1m\u001b[31merror:\u001b[m Cannot determine type of \u001b[m\u001b[1m\"rules\"\u001b[m \u001b[m\u001b[33m[has-type]\u001b[m\n",
"\u001b[2;90m isinstance(self.rules[rule], dict)\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:65: \u001b[1m\u001b[31merror:\u001b[m Cannot determine type of \u001b[m\u001b[1m\"rules\"\u001b[m \u001b[m\u001b[33m[has-type]\u001b[m\n",
"\u001b[2;90m and rule in base_config.rules\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:66: \u001b[1m\u001b[31merror:\u001b[m Cannot determine type of \u001b[m\u001b[1m\"rules\"\u001b[m \u001b[m\u001b[33m[has-type]\u001b[m\n",
"\u001b[2;90m and base_config.rules[rule] is not False\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:68: \u001b[1m\u001b[31merror:\u001b[m Cannot determine type of \u001b[m\u001b[1m\"rules\"\u001b[m \u001b[m\u001b[33m[has-type]\u001b[m\n",
"\u001b[2;90m base_config.rules[rule].update(self.rules[rule])\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:70: \u001b[1m\u001b[31merror:\u001b[m Cannot determine type of \u001b[m\u001b[1m\"rules\"\u001b[m \u001b[m\u001b[33m[has-type]\u001b[m\n",
"\u001b[2;90m base_config.rules[rule] = self.rules[rule]\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:72: \u001b[1m\u001b[31merror:\u001b[m Cannot determine type of \u001b[m\u001b[1m\"rules\"\u001b[m \u001b[m\u001b[33m[has-type]\u001b[m\n",
"\u001b[2;90m self.rules = base_config.rules\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:77: \u001b[1m\u001b[31merror:\u001b[m Function is missing a type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def parse(self, raw_content):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:98: \u001b[1m\u001b[31merror:\u001b[m Call to untyped function\n",
"\u001b[m\u001b[1m\"get_extended_config_file\"\u001b[m in typed context \u001b[m\u001b[33m[no-untyped-call]\u001b[m\n",
"\u001b[2;90m path = get_extended_config_file(conf[\"extends\"])\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:99: \u001b[1m\u001b[31merror:\u001b[m Call to untyped function \u001b[m\u001b[1m\"VscLintConfig\"\u001b[m in typed\n",
"context \u001b[m\u001b[33m[no-untyped-call]\u001b[m\n",
"\u001b[2;90m base = VscLintConfig(file=path)\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:101: \u001b[1m\u001b[31merror:\u001b[m Call to untyped function \u001b[m\u001b[1m\"extend\"\u001b[m in typed\n",
"context \u001b[m\u001b[33m[no-untyped-call]\u001b[m\n",
"\u001b[2;90m self.extend(base)\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:133: \u001b[1m\u001b[31merror:\u001b[m Function is missing a return type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def validate(self):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:133: \u001b[34mnote:\u001b[m Use \u001b[m\u001b[1m\"-> None\"\u001b[m if function does not return a value\u001b[m\n",
"vsclint/config.py:143: \u001b[1m\u001b[31merror:\u001b[m Call to untyped function \u001b[m\u001b[1m\"validate_rule_conf\"\u001b[m in\n",
"typed context \u001b[m\u001b[33m[no-untyped-call]\u001b[m\n",
"\u001b[2;90m self.rules[id] = validate_rule_conf(rule, self.rules[id])\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:146: \u001b[1m\u001b[31merror:\u001b[m Function is missing a type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def validate_rule_conf(rule, conf):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"vsclint/config.py:234: \u001b[1m\u001b[31merror:\u001b[m Function is missing a type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def get_extended_config_file(name):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"\u001b[1m\u001b[31mFound 23 errors in 1 file (checked 6 source files)\u001b[m\n"
]
}
],
"source": [
"# mypy --config-file ../mypy_full_check.ini -p vsclint ~~~~~~~~~~~~~~~~~~\n",
"! cd ../src && mypy --config-file ../mypy_full_check.ini -p vsclint"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"tests/common.py:6: \u001b[1m\u001b[31merror:\u001b[m Function is missing a type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def build_temp_workspace(files):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"tests/test_cli.py:17: \u001b[1m\u001b[31merror:\u001b[m Function is missing a type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def __init__(self, case):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"tests/test_cli.py:22: \u001b[1m\u001b[31merror:\u001b[m Function is missing a type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def __enter__(self):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"tests/test_cli.py:29: \u001b[1m\u001b[31merror:\u001b[m Function is missing a type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def __exit__(self, *exc_info):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"tests/test_cli.py:36: \u001b[1m\u001b[31merror:\u001b[m Function is missing a return type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def returncode(self):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"tests/test_cli.py:47: \u001b[1m\u001b[31merror:\u001b[m Function is missing a return type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def setUpClass(cls):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"tests/test_cli.py:47: \u001b[34mnote:\u001b[m Use \u001b[m\u001b[1m\"-> None\"\u001b[m if function does not return a value\u001b[m\n",
"tests/test_cli.py:51: \u001b[1m\u001b[31merror:\u001b[m Call to untyped function \u001b[m\u001b[1m\"build_temp_workspace\"\u001b[m in\n",
"typed context \u001b[m\u001b[33m[no-untyped-call]\u001b[m\n",
"\u001b[2;90m cls.wd = build_temp_workspace(\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"tests/test_cli.py:89: \u001b[1m\u001b[31merror:\u001b[m Function is missing a return type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def tearDownClass(cls):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"tests/test_cli.py:89: \u001b[34mnote:\u001b[m Use \u001b[m\u001b[1m\"-> None\"\u001b[m if function does not return a value\u001b[m\n",
"tests/test_cli.py:95: \u001b[1m\u001b[31merror:\u001b[m Function is missing a return type annotation \n",
"\u001b[m\u001b[33m[no-untyped-def]\u001b[m\n",
"\u001b[2;90m def test_run_version(self):\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"tests/test_cli.py:95: \u001b[34mnote:\u001b[m Use \u001b[m\u001b[1m\"-> None\"\u001b[m if function does not return a value\u001b[m\n",
"tests/test_cli.py:97: \u001b[1m\u001b[31merror:\u001b[m Call to untyped function \u001b[m\u001b[1m\"RunContext\"\u001b[m in typed\n",
"context \u001b[m\u001b[33m[no-untyped-call]\u001b[m\n",
"\u001b[2;90m with RunContext(self) as ctx:\u001b[m\n",
"\u001b[31m ^\u001b[m\n",
"\u001b[1m\u001b[31mFound 10 errors in 2 files (checked 3 source files)\u001b[m\n"
]
}
],
"source": [
"# mypy --config-file mypy_full_check.ini -p tests ~~~~~~~~~~~~~~~~~~~~~~~\n",
"! cd .. && mypy --config-file mypy_full_check.ini -p tests"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"## [`tox.ini`](../tox.ini)\n",
"\n",
"OK, if everything in the above testing is 'good' then your ready to run a full tox matrix.\n",
"\n",
">Note: The full `tox` matrix can take alot of time so only run this when you are ready to push changes to the repository."
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
"ready_to_recreate_and_run_tox = True # set to True when your ready\n",
"if ready_to_recreate_and_run_tox:\n",
" # force recreation of virtual environments (-r or --recreate)\n",
" ! cd .. && sudo tox -r > tox_run_r.md"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"ready_to_run_tox = True # set to True when your ready\n",
"if ready_to_run_tox:\n",
" # use existing virtual environment (only build if not present)\n",
" ! cd .. && sudo tox > tox_run.md"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---"
]
}
],
"metadata": {
"interpreter": {
"hash": "949777d72b0d2535278d3dc13498b2535136f6dfe0678499012e853ee9abcab1"
},
"kernelspec": {
"display_name": "Python 3.10.2 64-bit",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.2"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}

@ -0,0 +1,599 @@
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Files or directories to be skipped. They should be base names, not
# paths.
ignore=CVS
# Add files or directories matching the regex patterns to the ignore-list. The
# regex matches against paths and can be in Posix or Windows format.
ignore-paths=
# Files or directories matching the regex patterns are skipped. The regex
# matches against base names, not paths.
ignore-patterns=^\.#
# Pickle collected data for later comparisons.
persistent=yes
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=
pylint.extensions.check_elif,
pylint.extensions.bad_builtin,
pylint.extensions.docparams,
pylint.extensions.for_any_all,
pylint.extensions.set_membership,
pylint.extensions.code_style,
pylint.extensions.overlapping_exceptions,
pylint.extensions.typing,
pylint.extensions.redefined_variable_type,
pylint.extensions.comparison_placement,
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
jobs=1
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-allow-list=
# Minimum supported python version
py-version = 3.6.2
# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
# complex, nested conditions.
limit-inference-results=100
# Specify a score threshold to be exceeded before program exits with error.
fail-under=10.0
# Return non-zero exit code if any of these messages/categories are detected,
# even if score is above --fail-under value. Syntax same as enable. Messages
# specified are enabled, while categories only check already-enabled messages.
fail-on=
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
confidence=
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=
use-symbolic-message-instead,
useless-suppression,
fixme
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once).You can also use "--disable=all" to
# disable everything first and then re-enable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=
attribute-defined-outside-init,
duplicate-code,
invalid-name,
missing-docstring,
protected-access,
too-few-public-methods,
# handled by black
format
[REPORTS]
# Set the output format. Available formats are text, parseable, colorized, msvs
# (visual studio) and html. You can also give a reporter class, eg
# mypackage.mymodule.MyReporterClass.
output-format=text
# Tells whether to display a full report or only the messages
reports=no
# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables 'fatal', 'error', 'warning', 'refactor', 'convention'
# and 'info', which contain the number of messages in each category, as
# well as 'statement', which is the total number of statements analyzed. This
# score is used by the global evaluation report (RP0004).
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details
#msg-template=
# Activate the evaluation score.
score=yes
[LOGGING]
# Logging modules to check that the string format arguments are in logging
# function parameter format
logging-modules=logging
# The type of string formatting that logging methods do. `old` means using %
# formatting, `new` is for `{}` formatting.
logging-format-style=old
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX,TODO
# Regular expression of note tags to take in consideration.
#notes-rgx=
[SIMILARITIES]
# Minimum lines number of a similarity.
min-similarity-lines=4
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes
# Ignore imports when computing similarities.
ignore-imports=no
# Signatures are removed from the similarity computation
ignore-signatures=no
[VARIABLES]
# Tells whether we should check for unused import in __init__ files.
init-import=no
# A regular expression matching the name of dummy variables (i.e. expectedly
# not used).
dummy-variables-rgx=_$|dummy
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid defining new builtins when possible.
additional-builtins=
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,_cb
# Tells whether unused global variables should be treated as a violation.
allow-global-unused-variables=yes
# List of names allowed to shadow builtins
allowed-redefined-builtins=
# Argument names that match this expression will be ignored. Default to name
# with leading underscore.
ignored-argument-names=_.*
# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=100
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
# List of optional constructs for which whitespace checking is disabled
no-space-check=trailing-comma,dict-separator
# Maximum number of lines in a module
max-module-lines=2000
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=
[BASIC]
# Good variable names which should always be accepted, separated by a comma
good-names=i,j,k,ex,Run,_
# Good variable names regexes, separated by a comma. If names match any regex,
# they will always be accepted
good-names-rgxs=
# Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,baz,toto,tutu,tata
# Bad variable names regexes, separated by a comma. If names match any regex,
# they will always be refused
bad-names-rgxs=
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Include a hint for the correct naming format with invalid-name
include-naming-hint=no
# Naming style matching correct function names.
function-naming-style=snake_case
# Regular expression matching correct function names
function-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming hint for function names
function-name-hint=[a-z_][a-z0-9_]{2,30}$
# Naming style matching correct variable names.
variable-naming-style=snake_case
# Regular expression matching correct variable names
variable-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming hint for variable names
variable-name-hint=[a-z_][a-z0-9_]{2,30}$
# Naming style matching correct constant names.
const-naming-style=UPPER_CASE
# Regular expression matching correct constant names
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
# Naming hint for constant names
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
# Naming style matching correct attribute names.
attr-naming-style=snake_case
# Regular expression matching correct attribute names
attr-rgx=[a-z_][a-z0-9_]{2,}$
# Naming hint for attribute names
attr-name-hint=[a-z_][a-z0-9_]{2,}$
# Naming style matching correct argument names.
argument-naming-style=snake_case
# Regular expression matching correct argument names
argument-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming hint for argument names
argument-name-hint=[a-z_][a-z0-9_]{2,30}$
# Naming style matching correct class attribute names.
class-attribute-naming-style=any
# Regular expression matching correct class attribute names
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
# Naming hint for class attribute names
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
# Naming style matching correct class constant names.
class-const-naming-style=UPPER_CASE
# Regular expression matching correct class constant names. Overrides class-
# const-naming-style.
#class-const-rgx=
# Naming style matching correct inline iteration names.
inlinevar-naming-style=any
# Regular expression matching correct inline iteration names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
# Naming hint for inline iteration names
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
# Naming style matching correct class names.
class-naming-style=PascalCase
# Regular expression matching correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$
# Naming hint for class names
class-name-hint=[A-Z_][a-zA-Z0-9]+$
# Naming style matching correct module names.
module-naming-style=snake_case
# Regular expression matching correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
# Naming hint for module names
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
# Naming style matching correct method names.
method-naming-style=snake_case
# Regular expression matching correct method names
method-rgx=[a-z_][a-z0-9_]{2,}$
# Naming hint for method names
method-name-hint=[a-z_][a-z0-9_]{2,}$
# Regular expression which can overwrite the naming style set by typevar-naming-style.
#typevar-rgx=
# Regular expression which should only match function or class names that do
# not require a docstring. Use ^(?!__init__$)_ to also check __init__.
no-docstring-rgx=__.*__
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1
# List of decorators that define properties, such as abc.abstractproperty.
property-classes=abc.abstractproperty
[TYPECHECK]
# Tells whether missing members accessed in mixin class should be ignored.
# A class is considered mixin if its name matches the mixin-class-rgx option.
ignore-mixin-members=yes
# Regex pattern to define which classes are considered mixins if ignore-mixin-
# members is set to 'yes'
mixin-class-rgx=.*MixIn
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis). It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=SQLObject, optparse.Values, thread._local, _thread._local
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=REQUEST,acl_users,aq_parent,argparse.Namespace
# List of decorators that create context managers from functions, such as
# contextlib.contextmanager.
contextmanager-decorators=contextlib.contextmanager
# Tells whether to warn about missing members when the owner of the attribute
# is inferred to be None.
ignore-none=yes
# This flag controls whether pylint should warn about no-member and similar
# checks whenever an opaque object is returned when inferring. The inference
# can return multiple potential results while evaluating a Python object, but
# some branches might not be evaluated, which results in partial inference. In
# that case, it might be useful to still emit no-member and other checks for
# the rest of the inferred objects.
ignore-on-opaque-inference=yes
# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
missing-member-hint=yes
# The minimum edit distance a name should have in order to be considered a
# similar match for a missing member name.
missing-member-hint-distance=1
# The total number of similar names that should be taken in consideration when
# showing a hint for a missing member.
missing-member-max-choices=1
[SPELLING]
# Spelling dictionary name. Available dictionaries: none. To make it working
# install python-enchant package.
spelling-dict=
# List of comma separated words that should not be checked.
spelling-ignore-words=
# List of comma separated words that should be considered directives if they
# appear and the beginning of a comment and should not be checked.
spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
# A path to a file that contains private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words to indicated private dictionary in
# --spelling-private-dict-file option instead of raising a message.
spelling-store-unknown-words=no
# Limits count of emitted suggestions for spelling mistakes.
max-spelling-suggestions=4
[DESIGN]
# Maximum number of arguments for function / method
max-args=10
# Maximum number of locals for function / method body
max-locals=25
# Maximum number of return / yield for function / method body
max-returns=11
# Maximum number of branch for function / method body
max-branches=27
# Maximum number of statements in function / method body
max-statements=100
# Maximum number of parents for a class (see R0901).
max-parents=7
# List of qualified class names to ignore when counting class parents (see R0901).
ignored-parents=
# Maximum number of attributes for a class (see R0902).
max-attributes=11
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
# Maximum number of public methods for a class (see R0904).
max-public-methods=25
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5
# List of regular expressions of class ancestor names to
# ignore when counting public methods (see R0903).
exclude-too-few-public-methods=
[CLASSES]
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,__new__,setUp,__post_init__
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=mcs
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,_fields,_replace,_source,_make
# Warn about protected attribute access inside special methods
check-protected-access-in-special-methods=no
[IMPORTS]
# List of modules that can be imported at any level, not just the top level
# one.
allow-any-import-level=
# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no
# Analyse import fallback blocks. This can be used to support both Python 2 and
# 3 compatible code, which means that the block might have code that exists
# only in one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks=no
# Deprecated modules which should not be used, separated by a comma
deprecated-modules=regsub,TERMIOS,Bastion,rexec
# Create a graph of every (i.e. internal and external) dependencies in the
# given file (report RP0402 must not be disabled)
import-graph=
# Create a graph of external dependencies in the given file (report RP0402 must
# not be disabled)
ext-import-graph=
# Create a graph of internal dependencies in the given file (report RP0402 must
# not be disabled)
int-import-graph=
# Force import order to recognize a module as part of the standard
# compatibility libraries.
known-standard-library=
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant
# Couples of modules and preferred modules, separated by a comma.
preferred-modules=
[EXCEPTIONS]
# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
[TYPING]
# Set to ``no`` if the app / library does **NOT** need to support runtime
# introspection of type annotations. If you use type annotations
# **exclusively** for type checking of an application, you're probably fine.
# For libraries, evaluate if some users what to access the type hints at
# runtime first, e.g., through ``typing.get_type_hints``. Applies to Python
# versions 3.7 - 3.9
runtime-typing = no
[DEPRECATED_BUILTINS]
# List of builtins function names that should not be used, separated by a comma
bad-functions=map,input
[REFACTORING]
# Maximum number of nested blocks for function / method body
max-nested-blocks=5
# Complete name of functions that never returns. When checking for
# inconsistent-return-statements if a never returning function is called then
# it will be considered as an explicit return statement and no message will be
# printed.
never-returning-functions=sys.exit,argparse.parse_error
[STRING]
# This flag controls whether inconsistent-quotes generates a warning when the
# character used as a quote delimiter is used inconsistently within a module.
check-quote-consistency=no
# This flag controls whether the implicit-str-concat should generate a warning
# on implicit string concatenation in sequences defined over several lines.
check-str-concat-over-line-jumps=no
[CODE_STYLE]
# Max line length for which to sill emit suggestions. Used to prevent optional
# suggestions which would get split by a code formatter (e.g., black). Will
# default to the setting for ``max-line-length``.
#max-line-length-suggestions=

@ -6,11 +6,10 @@
# none
# ~~~~~~~ setup.cfg ~~~~~~~
sphinx
flake8
pathspec >= 0.5.3
pyyaml
setuptools
Sphinx~=4.5.0
flake8~=4.0.1
pathspec~=0.9.0
PyYAML~=6.0
# ~~~~~~~ pyproject.toml ~~~~~~~
# none
@ -25,11 +24,11 @@ setuptools
# none
# ~~~~~~~ future use ~~~~~~~
tox==3.24.5
GitPython==3.1.27
covdefaults>=2.2
coverage
distlib
pytest
pytest-env
re-assert
tox~=3.24.5
GitPython~=3.1.27
covdefaults~=2.2.0
coverage~=6.3.2
distlib~=0.3.4
pytest~=7.1.1
pytest-env~=0.6.2
re-assert~=1.1.0

@ -1,25 +1,31 @@
# user devcontainer convenience
# ~~~~~~~ vscode extensions support ~~~~~~~
esbonio~=0.10.2
# ~~~~~~~ project demo ~~~~~~~
datamodel-code-generator
orjson==3.6.7
pydantic==1.9.0
SQLAlchemy==1.4.33
ruamel.yaml
typing==3.7.4.3
ujson==5.1.0
datamodel-code-generator~=0.11.15
orjson~=3.6.7
pydantic~=1.8.2
SQLAlchemy~=1.4.33
ruamel.yaml~=0.17.21
typing~=3.7.4.3
ujson~=5.1.0
MonkeyType~=22.2.0
typeshed-client~=2.0.4
pyre-check~=0.9.10
# ~~~~~~~ awesome development ~~~~~~~
beautifulsoup4==4.10.0
Cython==0.29.26;sys_platform!='win32'
devtools==0.8.0
openpyxl==3.0.9
pandas==1.4.1
python-dotenv==0.19.2
typing-extensions==4.0.1
XlsxWriter==3.0.3
beautifulsoup4~=4.10.0
Cython~=0.29.26;sys_platform!='win32'
devtools~=0.8.0
openpyxl~=3.0.9
pandas~=1.4.1
python-dotenv~=0.19.2
typing-extensions~=4.0.1
XlsxWriter~=3.0.3
# ~~~~~~~ notebooks & visualization ~~~~~~~
ipykernel==6.11.0
jupyterlab==3.3.2
matplotlib==3.5.1
seaborn==0.11.2
ipykernel~=6.11.0
jupyterlab~=3.3.2
matplotlib~=3.5.1
seaborn~=0.11.2

Loading…
Cancel
Save