From patchwork Wed Nov 15 13:09:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Juraj_Linke=C5=A1?= X-Patchwork-Id: 134379 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 21A0843339; Wed, 15 Nov 2023 14:11:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B07240294; Wed, 15 Nov 2023 14:11:54 +0100 (CET) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by mails.dpdk.org (Postfix) with ESMTP id 2A25240285 for ; Wed, 15 Nov 2023 14:11:53 +0100 (CET) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-9c3aec5f326so166995566b.1 for ; Wed, 15 Nov 2023 05:11:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1700053913; x=1700658713; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U6/AvRBkllFQ+XgMDx3380G1DrnvTmtIBIE/1+tA3H8=; b=Oy8euVzdVDmXBE51sM2tjRomGEUAZFukMStD5znboNKBIlbFVdFf1dRyBS3M+kG+Yz mFBlhDCyXPheNThj1HnZ+j6t/uIptddehmz0vBPsBwtbMM3P+v4hj+3r/YWYwGXxNHZ2 5pJ/cLO1TPLy/vMOoxkW/LcVqUASbvW0SJJ+TpMCdgeO1MhkdkCp8l3qTZ+rI/5oVfvw BvUz37/UQmjXTHqcU8ONbaem3RrtubBldmdbFGbno2bD15hRL6cgYxT1Gq6qLO5ONvBS ZzQMT2a+p+Y8CxMmnkGoxqIMp0BSlfwa+qeWyqtNGLqOzBxeRYOrtKc+lehr9ckkyZbJ cA3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700053913; x=1700658713; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U6/AvRBkllFQ+XgMDx3380G1DrnvTmtIBIE/1+tA3H8=; b=iQ5EZswabEBKGcJmvfDsOO0KgEj3LywK64/+9+kYzfzvaQnXG3k970AYCLtz5DLXsX uyoTpwJe5WlgchBRGmC/A717LUT0G1BRlgDK4I6+qDruz+HZ1x/pE2zd9WwMpCtAfqUR L5SglHeX63HyWr7WnXtu9ncL+gf0n/SKKI0C8astBhESOwmwlrksVjKsUR43PGbdTWcs nNNy6CCvCrbGABhSYv9jVgHFmLuquSMQQfmhRHNocyoqtWWB//Wn5iBpwWSMsXGAHQGp q+4vqatgqaofc8w+HuDWaUjaGXUwm5eSQAZk+DFjvgjh3Eynn93jrapKc4vaB6sxHe8X 4FJA== X-Gm-Message-State: AOJu0Yyxj7QcHuz8a/qhgqcBQqcepcdmvzgrZjKa9/GqYu3rJxx6+PKS SbfVkE50OPeT04p0b8dPLpyN9g== X-Google-Smtp-Source: AGHT+IFp+kLpuF/aEMEp7qi3OrKxHwkTm94u5gzM+7fMioHrPLCdgITFbGbuejU3Cm6jVl1A5AwDKw== X-Received: by 2002:a17:907:7256:b0:9d5:96e7:5ae1 with SMTP id ds22-20020a170907725600b009d596e75ae1mr5607971ejc.12.1700053912839; Wed, 15 Nov 2023 05:11:52 -0800 (PST) Received: from jlinkes-PT-Latitude-5530.pantheon.local (81.89.53.154.host.vnet.sk. [81.89.53.154]) by smtp.gmail.com with ESMTPSA id tb16-20020a1709078b9000b009f2b7282387sm1011914ejc.46.2023.11.15.05.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 05:11:34 -0800 (PST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, jspewock@iol.unh.edu, probb@iol.unh.edu, paul.szczepanek@arm.com, yoan.picchi@foss.arm.com Cc: dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= Subject: [PATCH v7 02/21] dts: add docstring checker Date: Wed, 15 Nov 2023 14:09:40 +0100 Message-Id: <20231115130959.39420-3-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231115130959.39420-1-juraj.linkes@pantheon.tech> References: <20231108125324.191005-23-juraj.linkes@pantheon.tech> <20231115130959.39420-1-juraj.linkes@pantheon.tech> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Python docstrings are the in-code way to document the code. The docstring checker of choice is pydocstyle which we're executing from Pylama, but the current latest versions are not complatible due to [0], so pin the pydocstyle version to the latest working version. [0] https://github.com/klen/pylama/issues/232 Signed-off-by: Juraj Linkeš Reviewed-by: Yoan Picchi --- dts/poetry.lock | 12 ++++++------ dts/pyproject.toml | 6 +++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dts/poetry.lock b/dts/poetry.lock index f7b3b6d602..a734fa71f0 100644 --- a/dts/poetry.lock +++ b/dts/poetry.lock @@ -489,20 +489,20 @@ files = [ [[package]] name = "pydocstyle" -version = "6.3.0" +version = "6.1.1" description = "Python docstring style checker" optional = false python-versions = ">=3.6" files = [ - {file = "pydocstyle-6.3.0-py3-none-any.whl", hash = "sha256:118762d452a49d6b05e194ef344a55822987a462831ade91ec5c06fd2169d019"}, - {file = "pydocstyle-6.3.0.tar.gz", hash = "sha256:7ce43f0c0ac87b07494eb9c0b462c0b73e6ff276807f204d6b53edc72b7e44e1"}, + {file = "pydocstyle-6.1.1-py3-none-any.whl", hash = "sha256:6987826d6775056839940041beef5c08cc7e3d71d63149b48e36727f70144dc4"}, + {file = "pydocstyle-6.1.1.tar.gz", hash = "sha256:1d41b7c459ba0ee6c345f2eb9ae827cab14a7533a88c5c6f7e94923f72df92dc"}, ] [package.dependencies] -snowballstemmer = ">=2.2.0" +snowballstemmer = "*" [package.extras] -toml = ["tomli (>=1.2.3)"] +toml = ["toml"] [[package]] name = "pyflakes" @@ -837,4 +837,4 @@ jsonschema = ">=4,<5" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "0b1e4a1cb8323e17e5ee5951c97e74bde6e60d0413d7b25b1803d5b2bab39639" +content-hash = "3501e97b3dadc19fe8ae179fe21b1edd2488001da9a8e86ff2bca0b86b99b89b" diff --git a/dts/pyproject.toml b/dts/pyproject.toml index 6762edfa6b..3943c87c87 100644 --- a/dts/pyproject.toml +++ b/dts/pyproject.toml @@ -25,6 +25,7 @@ PyYAML = "^6.0" types-PyYAML = "^6.0.8" fabric = "^2.7.1" scapy = "^2.5.0" +pydocstyle = "6.1.1" [tool.poetry.group.dev.dependencies] mypy = "^0.961" @@ -39,10 +40,13 @@ requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.pylama] -linters = "mccabe,pycodestyle,pyflakes" +linters = "mccabe,pycodestyle,pydocstyle,pyflakes" format = "pylint" max_line_length = 88 # https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length +[tool.pylama.linter.pydocstyle] +convention = "google" + [tool.mypy] python_version = "3.10" enable_error_code = ["ignore-without-code"]