From e329347267d677f393fd27ad058c27b941046be9 Mon Sep 17 00:00:00 2001 From: James Hodgkinson Date: Mon, 20 Mar 2023 10:39:56 +1000 Subject: [PATCH] bumping to 0.1.6 for dependencies, replacing pylint with ruff --- .github/workflows/pylint.yml | 4 ++-- examples/dump.py | 2 +- pygoodwe/__init__.py | 1 - pyproject.toml | 28 +++++++++++++++------------- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 084aae8..0bbe5d3 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -21,5 +21,5 @@ jobs: run: | python -m pip install --quiet --no-cache-dir --upgrade poetry poetry install - poetry run pylint $(basename $(pwd) | sed -E 's/-/_/g') - poetry run pylint tests/ + poetry run ruff $(basename $(pwd) | sed -E 's/-/_/g') + poetry run ruff tests/ diff --git a/examples/dump.py b/examples/dump.py index 379782d..7d5041f 100644 --- a/examples/dump.py +++ b/examples/dump.py @@ -4,7 +4,7 @@ from config import args from pygoodwe import API -def main(): +def main() -> None: """ dumps the raw data """ goodwe = API( system_id=args.get('gw_station_id', '1'), diff --git a/pygoodwe/__init__.py b/pygoodwe/__init__.py index 1ec174d..0623a7e 100644 --- a/pygoodwe/__init__.py +++ b/pygoodwe/__init__.py @@ -3,7 +3,6 @@ from datetime import date, datetime import json -from json.decoder import JSONDecodeError import logging import os from pathlib import Path diff --git a/pyproject.toml b/pyproject.toml index d55b057..91a688a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pygoodwe" -version = "0.1.5" +version = "0.1.6" description = "A command line tool and python library to query the GOODWE SEMS Portal APIs." authors = ["James Hodgkinson "] license = "MIT" @@ -20,6 +20,17 @@ keywords = [ ] readme = "README.md" +[tool.poetry.group.dev.dependencies] +ruff = "^0.0.257" +types-requests = "^2.28.11" +pytest = "^7.1.3" +mypy = "^1.0" +black = "^23.1.0" +pylint-pytest = "^1.1.2" +mkdocs = "^1.4.2" +mkdocs-material = "^9.0.2" +mkdocstrings = "^0.20.0" +mkdocstrings-python = "^0.8.0" [project.urls] documentation = "https://yaleman.github.io/pygoodwe/" @@ -31,18 +42,6 @@ repository = "https://github.com/yaleman/pygoodwe" python = "^3.8" requests = "^2.28.1" -[tool.poetry.dev-dependencies] -types-requests = "^2.28.11" -pylint = "^2.15.5" -pytest = "^7.1.3" -mypy = "^1.0" -black = "^23.1.0" -pylint-pytest = "^1.1.2" -mkdocs = "^1.4.2" -mkdocs-material = "^9.0.2" -mkdocstrings = "^0.20.0" -mkdocstrings-python = "^0.8.0" - [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" @@ -51,3 +50,6 @@ build-backend = "poetry.core.masonry.api" disable="W0511" max-line-length=150 load-plugins="pylint_pytest" + +[tool.ruff] +line-length=150