From d951fe0fb2ef9baec039e7f3447c28a1a9b825a4 Mon Sep 17 00:00:00 2001 From: James Paul Turner Date: Thu, 3 Aug 2023 12:53:04 +0100 Subject: [PATCH 1/4] Remove deprecated pytest-flake8. --- poetry.lock | 26 +++++--------------------- pyproject.toml | 1 - 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/poetry.lock b/poetry.lock index f84d65a..c3e4e2b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. +# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. [[package]] name = "attrs" @@ -918,9 +918,9 @@ files = [ [package.dependencies] numpy = [ + {version = ">=1.20.3", markers = "python_version < \"3.10\""}, {version = ">=1.21.0", markers = "python_version >= \"3.10\""}, {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, - {version = ">=1.20.3", markers = "python_version < \"3.10\""}, ] python-dateutil = ">=2.8.1" pytz = ">=2020.1" @@ -1088,22 +1088,6 @@ pytest = ">=4.6" [package.extras] testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] -[[package]] -name = "pytest-flake8" -version = "1.1.1" -description = "pytest plugin to check FLAKE8 requirements" -category = "dev" -optional = false -python-versions = "*" -files = [ - {file = "pytest-flake8-1.1.1.tar.gz", hash = "sha256:ba4f243de3cb4c2486ed9e70752c80dd4b636f7ccb27d4eba763c35ed0cd316e"}, - {file = "pytest_flake8-1.1.1-py2.py3-none-any.whl", hash = "sha256:e0661a786f8cbf976c185f706fdaf5d6df0b1667c3bcff8e823ba263618627e7"}, -] - -[package.dependencies] -flake8 = ">=4.0" -pytest = ">=7.0" - [[package]] name = "pytest-mock" version = "3.10.0" @@ -1138,12 +1122,12 @@ files = [ attrs = ">=19.0" filelock = ">=3.0" mypy = [ - {version = ">=0.780", markers = "python_version >= \"3.9\""}, {version = ">=0.700", markers = "python_version >= \"3.8\" and python_version < \"3.9\""}, + {version = ">=0.780", markers = "python_version >= \"3.9\""}, ] pytest = [ - {version = ">=6.2", markers = "python_version >= \"3.10\""}, {version = ">=4.6", markers = "python_version >= \"3.6\" and python_version < \"3.10\""}, + {version = ">=6.2", markers = "python_version >= \"3.10\""}, ] [[package]] @@ -1423,4 +1407,4 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "459913b54660cd442123b8b434415ca2622045d6125136170579ba0779352af5" +content-hash = "af576e4419638482506402599a635077cc829198fb7c83cbaeedf47d32ac76fd" diff --git a/pyproject.toml b/pyproject.toml index 97c495c..8256795 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,6 @@ PyYAML = "^6.0" [tool.poetry.dev-dependencies] pytest = "^7.2" pytest-cov = "^3.0.0" -pytest-flake8 = "^1.1.1" pytest-mypy = "^0.9.1" pytest-mock = "^3.7.0" isort = "^5.10.1" From eb7fb9a9a5e03e9cef86154945a3e532fecba62d Mon Sep 17 00:00:00 2001 From: James Paul Turner Date: Thu, 3 Aug 2023 13:08:50 +0100 Subject: [PATCH 2/4] Remove --flake8 from pytest command. --- README.md | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4157229..39066a6 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ dialect](https://specs.frictionlessdata.io/csv-dialect/) used and a [Table Schema](https://specs.frictionlessdata.io/table-schema/) specifying the contents of each column to aid the reading and interpretation of the data. -## Instalation +## Installation 'pycsvy' is available in PyPI therefore its installation is as easy as: diff --git a/setup.cfg b/setup.cfg index 8c152f1..52c4052 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,7 +8,7 @@ test = pytest [tool:pytest] addopts = - -v --flake8 --mypy -p no:warnings + -v --mypy -p no:warnings --cov=csvy --cov-report=html:reports/coverage/html --cov-report=xml:reports/coverage/coverage.xml --doctest-modules --ignore=docs/ From 3c98d222e2a09eab83e30d39a7687bcfb128d83a Mon Sep 17 00:00:00 2001 From: James Paul Turner Date: Thu, 3 Aug 2023 13:22:40 +0100 Subject: [PATCH 3/4] README: fix broken badge link. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 39066a6..586ffce 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![PyPI pyversions](https://img.shields.io/pypi/pyversions/pycsvy.svg)](https://pypi.python.org/pypi/pycsvy/) [![PyPI license](https://img.shields.io/pypi/l/pycsvy.svg)](https://pypi.python.org/pypi/pycsvy/) [![codecov](https://codecov.io/gh/ImperialCollegeLondon/pycsvy/branch/develop/graph/badge.svg?token=N03KYNUD18)](https://codecov.io/gh/ImperialCollegeLondon/pycsvy) -[![Codacy Badge](https://app.codacy.com/project/badge/Grade/8d1b791b315f4814a128d94483499561)](https://www.codacy.com/gh/ImperialCollegeLondon/pycsvy/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ImperialCollegeLondon/pycsvy&utm_campaign=Badge_Grade) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/8d1b791b315f4814a128d94483499561)](https://app.codacy.com/gh/ImperialCollegeLondon/pycsvy/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ImperialCollegeLondon/pycsvy&utm_campaign=Badge_Grade) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ImperialCollegeLondon/pycsvy/develop.svg)](https://results.pre-commit.ci/latest/github/ImperialCollegeLondon/pycsvy/develop) [![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-) From e34865404732683a753c9b79b143ef31bd80dc04 Mon Sep 17 00:00:00 2001 From: James Paul Turner Date: Thu, 3 Aug 2023 13:55:36 +0100 Subject: [PATCH 4/4] remove duplicate import. --- csvy/writers.py | 1 - 1 file changed, 1 deletion(-) diff --git a/csvy/writers.py b/csvy/writers.py index 3bb2033..34f7130 100644 --- a/csvy/writers.py +++ b/csvy/writers.py @@ -234,7 +234,6 @@ def write_csv( Returns: True if the writer worked, False otherwise. """ - import csv with open(filename, "a", newline="") as f: writer = csv.writer(f, **kwargs)