ci(github/lint): lint with tox environment `lint`

This commit is contained in:
D. Bohdan 2023-07-28 17:48:53 +00:00
parent dc571b8947
commit b09b1755e1
3 changed files with 32 additions and 32 deletions

View File

@ -1,12 +1,14 @@
# https://github.com/codespell-project/codespell#readme
# https://beta.ruff.rs
name: lint
on: [push, pull_request]
jobs:
codespell-and-ruff:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: pip install --user codespell[toml] ruff
- run: codespell --quiet-level 1
- run: ruff --format=github .
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry tox
- name: Lint with tox
run: |
tox run -e lint

47
poetry.lock generated
View File

@ -1,10 +1,9 @@
# This file is automatically @generated by Poetry and should not be changed by hand.
# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
[[package]]
name = "black"
version = "23.3.0"
description = "The uncompromising code formatter."
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -54,7 +53,6 @@ uvloop = ["uvloop (>=0.15.2)"]
name = "cbor2"
version = "5.4.6"
description = "CBOR (de)serializer with extensive tag support"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
@ -104,7 +102,6 @@ test = ["pytest", "pytest-cov"]
name = "click"
version = "8.1.4"
description = "Composable command line interface toolkit"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -115,11 +112,30 @@ files = [
[package.dependencies]
colorama = {version = "*", markers = "platform_system == \"Windows\""}
[[package]]
name = "codespell"
version = "2.2.5"
description = "Codespell"
optional = false
python-versions = ">=3.7"
files = [
{file = "codespell-2.2.5-py3-none-any.whl", hash = "sha256:efa037f54b73c84f7bd14ce8e853d5f822cdd6386ef0ff32e957a3919435b9ec"},
{file = "codespell-2.2.5.tar.gz", hash = "sha256:6d9faddf6eedb692bf80c9a94ec13ab4f5fb585aabae5f3750727148d7b5be56"},
]
[package.dependencies]
tomli = {version = "*", optional = true, markers = "python_version < \"3.11\" and extra == \"toml\""}
[package.extras]
dev = ["Pygments", "build", "chardet", "pytest", "pytest-cov", "pytest-dependency", "ruff", "tomli"]
hard-encoding-detection = ["chardet"]
toml = ["tomli"]
types = ["chardet (>=5.1.0)", "mypy", "pytest", "pytest-cov", "pytest-dependency"]
[[package]]
name = "colorama"
version = "0.4.3"
description = "Cross-platform colored terminal text."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
files = [
@ -131,7 +147,6 @@ files = [
name = "exceptiongroup"
version = "1.1.2"
description = "Backport of PEP 654 (exception groups)"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
@ -146,7 +161,6 @@ test = ["pytest (>=6)"]
name = "iniconfig"
version = "2.0.0"
description = "brain-dead simple config-ini parsing"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
@ -158,7 +172,6 @@ files = [
name = "mypy"
version = "1.4.1"
description = "Optional static typing for Python"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -205,7 +218,6 @@ reports = ["lxml"]
name = "mypy-extensions"
version = "1.0.0"
description = "Type system extensions for programs checked with the mypy type checker."
category = "dev"
optional = false
python-versions = ">=3.5"
files = [
@ -217,7 +229,6 @@ files = [
name = "packaging"
version = "23.1"
description = "Core utilities for Python packages"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
@ -229,7 +240,6 @@ files = [
name = "pathspec"
version = "0.11.1"
description = "Utility library for gitignore style pattern matching of file paths."
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -241,7 +251,6 @@ files = [
name = "platformdirs"
version = "3.8.1"
description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -257,7 +266,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-
name = "pluggy"
version = "0.13.1"
description = "plugin and hook calling mechanisms for python"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
files = [
@ -272,7 +280,6 @@ dev = ["pre-commit", "tox"]
name = "pytest"
version = "7.4.0"
description = "pytest: simple powerful testing with Python"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
@ -295,7 +302,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no
name = "python-dateutil"
version = "2.8.1"
description = "Extensions to the standard Python datetime module"
category = "main"
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
files = [
@ -310,7 +316,6 @@ six = ">=1.5"
name = "pyyaml"
version = "6.0"
description = "YAML parser and emitter for Python"
category = "main"
optional = false
python-versions = ">=3.6"
files = [
@ -360,7 +365,6 @@ files = [
name = "ruff"
version = "0.0.277"
description = "An extremely fast Python linter, written in Rust."
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -387,7 +391,6 @@ files = [
name = "six"
version = "1.15.0"
description = "Python 2 and 3 compatibility utilities"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
files = [
@ -399,7 +402,6 @@ files = [
name = "tomli"
version = "2.0.1"
description = "A lil' TOML parser"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
@ -411,7 +413,6 @@ files = [
name = "tomlkit"
version = "0.11.8"
description = "Style preserving TOML library"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
@ -423,7 +424,6 @@ files = [
name = "types-python-dateutil"
version = "2.8.19.13"
description = "Typing stubs for python-dateutil"
category = "dev"
optional = false
python-versions = "*"
files = [
@ -435,7 +435,6 @@ files = [
name = "types-pyyaml"
version = "6.0.12.10"
description = "Typing stubs for PyYAML"
category = "dev"
optional = false
python-versions = "*"
files = [
@ -447,7 +446,6 @@ files = [
name = "typing-extensions"
version = "4.7.1"
description = "Backported and Experimental Type Hints for Python 3.7+"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -459,7 +457,6 @@ files = [
name = "u-msgpack-python"
version = "2.8.0"
description = "A portable, lightweight MessagePack serializer and deserializer written in pure Python."
category = "main"
optional = false
python-versions = "*"
files = [
@ -470,4 +467,4 @@ files = [
[metadata]
lock-version = "2.0"
python-versions = "^3.8"
content-hash = "4dafe8f526222f1b5d5391244b25b85be6bd33866968ee13c9b6dfe5cc058c2f"
content-hash = "8001de7d9dc6a80c8a9f120b432d9b7030742cd6096c00aa35e5c418e14690b8"

View File

@ -35,6 +35,7 @@ ruff = "^0.0.277"
mypy = "^1.4.1"
types-python-dateutil = "^2.8.19.13"
types-pyyaml = "^6.0.12.10"
codespell = {extras = ["toml"], version = "^2.2.5"}
[build-system]
requires = ["poetry-core>=1.0"]