diff --git a/docs/conf.py b/docs/conf.py index 1528f97..b19f5b4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,7 +14,8 @@ html_theme = "alabaster" __location__ = os.path.join( - os.getcwd(), os.path.dirname(inspect.getfile(inspect.currentframe())) # type: ignore + os.getcwd(), + os.path.dirname(inspect.getfile(inspect.currentframe())), # type: ignore ) diff --git a/minimalkv/_boto.py b/minimalkv/_boto.py index 8ab3116..5abbc58 100644 --- a/minimalkv/_boto.py +++ b/minimalkv/_boto.py @@ -7,8 +7,11 @@ def _get_s3bucket( create_if_missing=True, ): # TODO: Write docstring. - from boto.s3.connection import S3ResponseError # type: ignore - from boto.s3.connection import OrdinaryCallingFormat, S3Connection + from boto.s3.connection import ( # type: ignore + OrdinaryCallingFormat, + S3Connection, + S3ResponseError, + ) s3_connection_params = { "aws_access_key_id": access_key, diff --git a/pyproject.toml b/pyproject.toml index 4d5e3c6..eea2c98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,11 +37,16 @@ minimalkv = ["py.typed"] [tool.ruff] line-length = 88 -target-version = "py310" +target-version = "py38" [tool.ruff.lint] ignore = ["E203", "E266", "E501", "C901", "D104", "D100"] -select = ["B", "C", "E", "F", "W", "B9", "D"] +select = ["B", "C", "E", "F", "W", "B9", "D", "I"] + +[tool.ruff.lint.isort] +force-wrap-aliases = true +combine-as-imports = true +known-first-party = ["minimalkv"] [tool.ruff.per-file-ignores] "tests/*" = ["D101", "D102", "D103", "E402"] @@ -53,14 +58,7 @@ convention = "numpy" [tool.ruff.format] quote-style = "double" - -[tool.isort] -multi_line_output = 3 -include_trailing_comma = true -line_length = 88 -known_first_party = "minimalkv" -skip_glob = '\.eggs/*,\.git/*,\.venv/*,build/*,dist/*' -default_section = 'THIRDPARTY' +indent-style = "space" [tool.mypy] python_version = 3.8 diff --git a/tests/test_filesystem_store.py b/tests/test_filesystem_store.py index d8350ad..1901b0e 100644 --- a/tests/test_filesystem_store.py +++ b/tests/test_filesystem_store.py @@ -3,9 +3,11 @@ import tempfile from io import BytesIO from unittest.mock import Mock -from urllib.parse import quote as url_quote -from urllib.parse import unquote as url_unquote -from urllib.parse import urlparse +from urllib.parse import ( + quote as url_quote, + unquote as url_unquote, + urlparse, +) import pytest from basic_store import BasicStore diff --git a/tests/test_get_store_from_url.py b/tests/test_get_store_from_url.py index e1a072e..25a3cc8 100644 --- a/tests/test_get_store_from_url.py +++ b/tests/test_get_store_from_url.py @@ -2,8 +2,10 @@ import pytest -from minimalkv._get_store import get_store -from minimalkv._get_store import get_store_from_url as get_store_from_url_new +from minimalkv._get_store import ( + get_store, + get_store_from_url as get_store_from_url_new, +) from minimalkv._hstores import HDictStore from minimalkv._key_value_store import KeyValueStore from minimalkv._urls import url2dict