diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4873ef3..0d1fe2b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,13 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.2 + rev: v0.3.3 hooks: - id: ruff args: [ --fix ] - id: ruff-format - repo: https://github.com/RobertCraigie/pyright-python - rev: v1.1.351 + rev: v1.1.354 hooks: - id: pyright diff --git a/documentation/reference/layeredimage/io/common.md b/documentation/reference/layeredimage/io/common.md index 1109aef..58fd39c 100644 --- a/documentation/reference/layeredimage/io/common.md +++ b/documentation/reference/layeredimage/io/common.md @@ -11,7 +11,7 @@ ## blendModeLookup -[Show source in common.py:14](../../../../layeredimage/io/common.py#L14) +[Show source in common.py:15](../../../../layeredimage/io/common.py#L15) Get the blendmode from a lookup table. @@ -29,7 +29,7 @@ def blendModeLookup( ## expandLayer -[Show source in common.py:44](../../../../layeredimage/io/common.py#L44) +[Show source in common.py:45](../../../../layeredimage/io/common.py#L45) #### Arguments @@ -58,7 +58,7 @@ def expandLayer( ## expandLayersToCanvas -[Show source in common.py:26](../../../../layeredimage/io/common.py#L26) +[Show source in common.py:27](../../../../layeredimage/io/common.py#L27) Return layers and throw a warning if the image has groups. diff --git a/documentation/reference/layeredimage/io/gif.md b/documentation/reference/layeredimage/io/gif.md index 47de04e..77566da 100644 --- a/documentation/reference/layeredimage/io/gif.md +++ b/documentation/reference/layeredimage/io/gif.md @@ -10,7 +10,7 @@ ## openLayer_GIF -[Show source in gif.py:13](../../../../layeredimage/io/gif.py#L13) +[Show source in gif.py:14](../../../../layeredimage/io/gif.py#L14) Open a .gif file into a layered image. @@ -28,7 +28,7 @@ def openLayer_GIF(file: str) -> LayeredImage: ... ## saveLayer_GIF -[Show source in gif.py:31](../../../../layeredimage/io/gif.py#L31) +[Show source in gif.py:32](../../../../layeredimage/io/gif.py#L32) Save a layered image as .gif. diff --git a/documentation/reference/layeredimage/io/index.md b/documentation/reference/layeredimage/io/index.md index 1e5fdb1..8709267 100644 --- a/documentation/reference/layeredimage/io/index.md +++ b/documentation/reference/layeredimage/io/index.md @@ -13,7 +13,7 @@ ## exportFlatImage -[Show source in __init__.py:114](../../../../layeredimage/io/__init__.py#L114) +[Show source in __init__.py:115](../../../../layeredimage/io/__init__.py#L115) Export the layered image to a unilayer image file. @@ -31,7 +31,7 @@ def exportFlatImage(fileName: str, layeredImage: LayeredImage) -> None: ... ## extNotRecognised -[Show source in __init__.py:26](../../../../layeredimage/io/__init__.py#L26) +[Show source in __init__.py:27](../../../../layeredimage/io/__init__.py#L27) Output the file extension not recognised error. @@ -45,7 +45,7 @@ def extNotRecognised(fileName: str) -> None: ... ## openLayerImage -[Show source in __init__.py:35](../../../../layeredimage/io/__init__.py#L35) +[Show source in __init__.py:36](../../../../layeredimage/io/__init__.py#L36) Open a layer image file into a layer image object. @@ -79,7 +79,7 @@ def openLayerImage(file: str | Path) -> LayeredImage: ... ## saveLayerImage -[Show source in __init__.py:76](../../../../layeredimage/io/__init__.py#L76) +[Show source in __init__.py:77](../../../../layeredimage/io/__init__.py#L77) Save a layered image to a file. diff --git a/documentation/reference/layeredimage/io/layered.md b/documentation/reference/layeredimage/io/layered.md index 777778f..bd5bbc5 100644 --- a/documentation/reference/layeredimage/io/layered.md +++ b/documentation/reference/layeredimage/io/layered.md @@ -15,7 +15,7 @@ ## _saveLayer_LAYERED -[Show source in layered.py:104](../../../../layeredimage/io/layered.py#L104) +[Show source in layered.py:105](../../../../layeredimage/io/layered.py#L105) Save a layered image as .layered. @@ -35,7 +35,7 @@ def _saveLayer_LAYERED( ## grabLayer_LAYERED -[Show source in layered.py:82](../../../../layeredimage/io/layered.py#L82) +[Show source in layered.py:83](../../../../layeredimage/io/layered.py#L83) Grab an image from .layered. @@ -55,7 +55,7 @@ def grabLayer_LAYERED( ## openLayer_LAYERED -[Show source in layered.py:20](../../../../layeredimage/io/layered.py#L20) +[Show source in layered.py:21](../../../../layeredimage/io/layered.py#L21) Open a .layered file into a layered image. @@ -73,7 +73,7 @@ def openLayer_LAYERED(file: str) -> LayeredImage: ... ## openLayer_LAYEREDC -[Show source in layered.py:141](../../../../layeredimage/io/layered.py#L141) +[Show source in layered.py:142](../../../../layeredimage/io/layered.py#L142) Open a .layeredc file into a layered image. @@ -91,7 +91,7 @@ def openLayer_LAYEREDC(file: str) -> LayeredImage: ... ## saveLayer_LAYERED -[Show source in layered.py:99](../../../../layeredimage/io/layered.py#L99) +[Show source in layered.py:100](../../../../layeredimage/io/layered.py#L100) Save a layered image as .layered. @@ -109,7 +109,7 @@ def saveLayer_LAYERED(fileName: str, layeredImage: LayeredImage) -> None: ... ## saveLayer_LAYEREDC -[Show source in layered.py:146](../../../../layeredimage/io/layered.py#L146) +[Show source in layered.py:147](../../../../layeredimage/io/layered.py#L147) Save a layeredc image as .layered. @@ -127,7 +127,7 @@ def saveLayer_LAYEREDC(fileName: str, layeredImage: LayeredImage) -> None: ... ## writeImage_LAYERED -[Show source in layered.py:126](../../../../layeredimage/io/layered.py#L126) +[Show source in layered.py:127](../../../../layeredimage/io/layered.py#L127) Write an image to the archive. diff --git a/documentation/reference/layeredimage/io/lsr.md b/documentation/reference/layeredimage/io/lsr.md index 6ee7cdd..e2a9809 100644 --- a/documentation/reference/layeredimage/io/lsr.md +++ b/documentation/reference/layeredimage/io/lsr.md @@ -10,7 +10,7 @@ ## openLayer_LSR -[Show source in lsr.py:12](../../../../layeredimage/io/lsr.py#L12) +[Show source in lsr.py:13](../../../../layeredimage/io/lsr.py#L13) Open a .lsr file into a layered image. @@ -28,7 +28,7 @@ def openLayer_LSR(file: str) -> LayeredImage: ... ## saveLayer_LSR -[Show source in lsr.py:37](../../../../layeredimage/io/lsr.py#L37) +[Show source in lsr.py:38](../../../../layeredimage/io/lsr.py#L38) Save a layered image as .lsr. diff --git a/documentation/reference/layeredimage/io/ora.md b/documentation/reference/layeredimage/io/ora.md index c6be9db..cdf0839 100644 --- a/documentation/reference/layeredimage/io/ora.md +++ b/documentation/reference/layeredimage/io/ora.md @@ -11,7 +11,7 @@ ## addLayer_ORA -[Show source in ora.py:129](../../../../layeredimage/io/ora.py#L129) +[Show source in ora.py:130](../../../../layeredimage/io/ora.py#L130) Update the project with a shiny new layer. @@ -25,7 +25,7 @@ def addLayer_ORA(project: Any, layer: Any, blendLookup: dict[BlendType, str]) -> ## openLayer_ORA -[Show source in ora.py:15](../../../../layeredimage/io/ora.py#L15) +[Show source in ora.py:16](../../../../layeredimage/io/ora.py#L16) Open an .ora file into a layered image. @@ -43,7 +43,7 @@ def openLayer_ORA(file: str) -> LayeredImage: ... ## saveLayer_ORA -[Show source in ora.py:85](../../../../layeredimage/io/ora.py#L85) +[Show source in ora.py:86](../../../../layeredimage/io/ora.py#L86) Save a layered image as .ora. diff --git a/documentation/reference/layeredimage/io/pdn.md b/documentation/reference/layeredimage/io/pdn.md index fb73ebc..fd31e01 100644 --- a/documentation/reference/layeredimage/io/pdn.md +++ b/documentation/reference/layeredimage/io/pdn.md @@ -10,7 +10,7 @@ ## openLayer_PDN -[Show source in pdn.py:15](../../../../layeredimage/io/pdn.py#L15) +[Show source in pdn.py:16](../../../../layeredimage/io/pdn.py#L16) Open a .pdn file into a layered image. @@ -28,7 +28,7 @@ def openLayer_PDN(file: str) -> LayeredImage: ... ## saveLayer_PDN -[Show source in pdn.py:54](../../../../layeredimage/io/pdn.py#L54) +[Show source in pdn.py:55](../../../../layeredimage/io/pdn.py#L55) Save a layered image as .pdn. diff --git a/documentation/reference/layeredimage/io/psd.md b/documentation/reference/layeredimage/io/psd.md index 502a930..f2f2488 100644 --- a/documentation/reference/layeredimage/io/psd.md +++ b/documentation/reference/layeredimage/io/psd.md @@ -10,7 +10,7 @@ ## openLayer_PSD -[Show source in psd.py:14](../../../../layeredimage/io/psd.py#L14) +[Show source in psd.py:15](../../../../layeredimage/io/psd.py#L15) Open a .psd file into a layered image. @@ -28,7 +28,7 @@ def openLayer_PSD(file: str) -> LayeredImage: ... ## saveLayer_PSD -[Show source in psd.py:84](../../../../layeredimage/io/psd.py#L84) +[Show source in psd.py:85](../../../../layeredimage/io/psd.py#L85) Save a layered image as .psd. diff --git a/documentation/reference/layeredimage/io/tiff.md b/documentation/reference/layeredimage/io/tiff.md index b760076..ba66ad9 100644 --- a/documentation/reference/layeredimage/io/tiff.md +++ b/documentation/reference/layeredimage/io/tiff.md @@ -10,7 +10,7 @@ ## openLayer_TIFF -[Show source in tiff.py:13](../../../../layeredimage/io/tiff.py#L13) +[Show source in tiff.py:14](../../../../layeredimage/io/tiff.py#L14) Open a .tiff or a .tif file into a layered image. @@ -28,7 +28,7 @@ def openLayer_TIFF(file: str) -> LayeredImage: ... ## saveLayer_TIFF -[Show source in tiff.py:52](../../../../layeredimage/io/tiff.py#L52) +[Show source in tiff.py:53](../../../../layeredimage/io/tiff.py#L53) Save a layered image as .tiff or .tif. diff --git a/documentation/reference/layeredimage/io/webp.md b/documentation/reference/layeredimage/io/webp.md index 9f502f9..b10119a 100644 --- a/documentation/reference/layeredimage/io/webp.md +++ b/documentation/reference/layeredimage/io/webp.md @@ -10,7 +10,7 @@ ## openLayer_WEBP -[Show source in webp.py:13](../../../../layeredimage/io/webp.py#L13) +[Show source in webp.py:14](../../../../layeredimage/io/webp.py#L14) Open a .webp file into a layered image. @@ -28,7 +28,7 @@ def openLayer_WEBP(file: str) -> LayeredImage: ... ## saveLayer_WEBP -[Show source in webp.py:27](../../../../layeredimage/io/webp.py#L27) +[Show source in webp.py:28](../../../../layeredimage/io/webp.py#L28) Save a layered image as .webp. diff --git a/documentation/reference/layeredimage/io/xcf.md b/documentation/reference/layeredimage/io/xcf.md index ac00353..c7693c4 100644 --- a/documentation/reference/layeredimage/io/xcf.md +++ b/documentation/reference/layeredimage/io/xcf.md @@ -10,7 +10,7 @@ ## openLayer_XCF -[Show source in xcf.py:14](../../../../layeredimage/io/xcf.py#L14) +[Show source in xcf.py:15](../../../../layeredimage/io/xcf.py#L15) Open an .xcf file into a layered image. @@ -28,7 +28,7 @@ def openLayer_XCF(file: str) -> LayeredImage: ... ## saveLayer_XCF -[Show source in xcf.py:134](../../../../layeredimage/io/xcf.py#L134) +[Show source in xcf.py:135](../../../../layeredimage/io/xcf.py#L135) Save a layered image as .xcf. diff --git a/documentation/reference/layeredimage/layeredimage.md b/documentation/reference/layeredimage/layeredimage.md index 65fe085..8af7b84 100644 --- a/documentation/reference/layeredimage/layeredimage.md +++ b/documentation/reference/layeredimage/layeredimage.md @@ -22,7 +22,7 @@ ## LayeredImage -[Show source in layeredimage.py:13](../../../layeredimage/layeredimage.py#L13) +[Show source in layeredimage.py:14](../../../layeredimage/layeredimage.py#L14) A representation of a layered image such as an ora. @@ -40,7 +40,7 @@ class LayeredImage: ### LayeredImage().__repr__ -[Show source in layeredimage.py:47](../../../layeredimage/layeredimage.py#L47) +[Show source in layeredimage.py:48](../../../layeredimage/layeredimage.py#L48) Get the string representation. @@ -52,7 +52,7 @@ def __repr__(self) -> str: ... ### LayeredImage().__str__ -[Show source in layeredimage.py:51](../../../layeredimage/layeredimage.py#L51) +[Show source in layeredimage.py:52](../../../layeredimage/layeredimage.py#L52) Get the string representation. @@ -64,7 +64,7 @@ def __str__(self) -> str: ... ### LayeredImage().addLayerOrGroup -[Show source in layeredimage.py:68](../../../layeredimage/layeredimage.py#L68) +[Show source in layeredimage.py:69](../../../layeredimage/layeredimage.py#L69) Add a LayerOrGroup. @@ -76,7 +76,7 @@ def addLayerOrGroup(self, layerOrGroup: Layer | Group) -> None: ... ### LayeredImage().extractGroups -[Show source in layeredimage.py:124](../../../layeredimage/layeredimage.py#L124) +[Show source in layeredimage.py:125](../../../layeredimage/layeredimage.py#L125) Extract the groups from the image. @@ -88,7 +88,7 @@ def extractGroups(self) -> list[Group]: ... ### LayeredImage().extractLayers -[Show source in layeredimage.py:93](../../../layeredimage/layeredimage.py#L93) +[Show source in layeredimage.py:94](../../../layeredimage/layeredimage.py#L94) Extract the layers from the image. @@ -100,7 +100,7 @@ def extractLayers(self) -> list[Layer]: ... ### LayeredImage().getFlattenLayers -[Show source in layeredimage.py:81](../../../layeredimage/layeredimage.py#L81) +[Show source in layeredimage.py:82](../../../layeredimage/layeredimage.py#L82) Return an image for all flattened layers. @@ -112,7 +112,7 @@ def getFlattenLayers(self) -> Image.Image: ... ### LayeredImage().getLayerOrGroup -[Show source in layeredimage.py:64](../../../layeredimage/layeredimage.py#L64) +[Show source in layeredimage.py:65](../../../layeredimage/layeredimage.py#L65) Get a LayerOrGroup. @@ -124,7 +124,7 @@ def getLayerOrGroup(self, index: int) -> Layer | Group: ... ### LayeredImage().insertLayerOrGroup -[Show source in layeredimage.py:72](../../../layeredimage/layeredimage.py#L72) +[Show source in layeredimage.py:73](../../../layeredimage/layeredimage.py#L73) Insert a LayerOrGroup at a specific index. @@ -136,7 +136,7 @@ def insertLayerOrGroup(self, layerOrGroup: Layer | Group, index: int) -> None: . ### LayeredImage().json -[Show source in layeredimage.py:58](../../../layeredimage/layeredimage.py#L58) +[Show source in layeredimage.py:59](../../../layeredimage/layeredimage.py#L59) Get the object as a dict. @@ -148,7 +148,7 @@ def json(self) -> dict[str, Any]: ... ### LayeredImage().removeLayerOrGroup -[Show source in layeredimage.py:76](../../../layeredimage/layeredimage.py#L76) +[Show source in layeredimage.py:77](../../../layeredimage/layeredimage.py#L77) Remove a LayerOrGroup at a specific index. @@ -160,7 +160,7 @@ def removeLayerOrGroup(self, index: int) -> None: ... ### LayeredImage().updateGroups -[Show source in layeredimage.py:132](../../../layeredimage/layeredimage.py#L132) +[Show source in layeredimage.py:133](../../../layeredimage/layeredimage.py#L133) Update the groups from the image. @@ -172,7 +172,7 @@ def updateGroups(self) -> None: ... ### LayeredImage().updateLayers -[Show source in layeredimage.py:120](../../../layeredimage/layeredimage.py#L120) +[Show source in layeredimage.py:121](../../../layeredimage/layeredimage.py#L121) Update the layers from the image. @@ -186,7 +186,7 @@ def updateLayers(self) -> None: ... ## render -[Show source in layeredimage.py:137](../../../layeredimage/layeredimage.py#L137) +[Show source in layeredimage.py:138](../../../layeredimage/layeredimage.py#L138) Flatten a layer or group on to an image of what has already been flattened. diff --git a/documentation/reference/layeredimage/layergroup.md b/documentation/reference/layeredimage/layergroup.md index ae453cb..323ce5e 100644 --- a/documentation/reference/layeredimage/layergroup.md +++ b/documentation/reference/layeredimage/layergroup.md @@ -16,7 +16,7 @@ ## Group -[Show source in layergroup.py:123](../../../layeredimage/layergroup.py#L123) +[Show source in layergroup.py:124](../../../layeredimage/layergroup.py#L124) A representation of an image group. @@ -43,7 +43,7 @@ class Group(LayerGroup): ### Group().json -[Show source in layergroup.py:172](../../../layeredimage/layergroup.py#L172) +[Show source in layergroup.py:173](../../../layeredimage/layergroup.py#L173) Get the object as a dict. @@ -57,7 +57,7 @@ def json(self) -> dict[str, Any]: ... ## Layer -[Show source in layergroup.py:70](../../../layeredimage/layergroup.py#L70) +[Show source in layergroup.py:71](../../../layeredimage/layergroup.py#L71) A representation of an image layer. @@ -83,7 +83,7 @@ class Layer(LayerGroup): ### Layer().json -[Show source in layergroup.py:110](../../../layeredimage/layergroup.py#L110) +[Show source in layergroup.py:111](../../../layeredimage/layergroup.py#L111) Get the object as a dict. @@ -97,7 +97,7 @@ def json(self) -> dict[str, Any]: ... ## LayerGroup -[Show source in layergroup.py:10](../../../layeredimage/layergroup.py#L10) +[Show source in layergroup.py:11](../../../layeredimage/layergroup.py#L11) A representation of an image layer or group. @@ -119,7 +119,7 @@ class LayerGroup: ### LayerGroup().__repr__ -[Show source in layergroup.py:50](../../../layeredimage/layergroup.py#L50) +[Show source in layergroup.py:51](../../../layeredimage/layergroup.py#L51) Get the string representation. @@ -131,7 +131,7 @@ def __repr__(self) -> str: ... ### LayerGroup().__str__ -[Show source in layergroup.py:54](../../../layeredimage/layergroup.py#L54) +[Show source in layergroup.py:55](../../../layeredimage/layergroup.py#L55) Get the string representation. @@ -143,7 +143,7 @@ def __str__(self) -> str: ... ### LayerGroup().json -[Show source in layergroup.py:58](../../../layeredimage/layergroup.py#L58) +[Show source in layergroup.py:59](../../../layeredimage/layergroup.py#L59) Get the object as a dict. diff --git a/layeredimage/__init__.py b/layeredimage/__init__.py index 420323e..5b21ade 100644 --- a/layeredimage/__init__.py +++ b/layeredimage/__init__.py @@ -1,2 +1 @@ -"""Use this module to read, and write to a number of layered image formats. -""" +"""Use this module to read, and write to a number of layered image formats.""" diff --git a/layeredimage/io/__init__.py b/layeredimage/io/__init__.py index d2c1ad4..a4321aa 100644 --- a/layeredimage/io/__init__.py +++ b/layeredimage/io/__init__.py @@ -1,4 +1,5 @@ """Do file io.""" + from __future__ import annotations from pathlib import Path diff --git a/layeredimage/io/common.py b/layeredimage/io/common.py index f558017..fc848d2 100644 --- a/layeredimage/io/common.py +++ b/layeredimage/io/common.py @@ -1,4 +1,5 @@ """Do file io - Common Operations for file readers/writers.""" + from __future__ import annotations from typing import Any diff --git a/layeredimage/io/gif.py b/layeredimage/io/gif.py index 53b1890..e8c2875 100644 --- a/layeredimage/io/gif.py +++ b/layeredimage/io/gif.py @@ -1,4 +1,5 @@ """Do file io - GIF.""" + from __future__ import annotations from PIL import Image diff --git a/layeredimage/io/layered.py b/layeredimage/io/layered.py index 58dfc66..a651abe 100644 --- a/layeredimage/io/layered.py +++ b/layeredimage/io/layered.py @@ -1,4 +1,5 @@ """Do file io - LAYERED(C).""" + from __future__ import annotations import io diff --git a/layeredimage/io/lsr.py b/layeredimage/io/lsr.py index d45aac9..a053a4f 100644 --- a/layeredimage/io/lsr.py +++ b/layeredimage/io/lsr.py @@ -1,4 +1,5 @@ """Do file io - LSR.""" + from __future__ import annotations from pathlib import Path diff --git a/layeredimage/io/ora.py b/layeredimage/io/ora.py index 1255203..ce4ec3c 100644 --- a/layeredimage/io/ora.py +++ b/layeredimage/io/ora.py @@ -1,4 +1,5 @@ """Do file io - ORA.""" + from __future__ import annotations from typing import Any diff --git a/layeredimage/io/pdn.py b/layeredimage/io/pdn.py index 143d3c4..08161dc 100644 --- a/layeredimage/io/pdn.py +++ b/layeredimage/io/pdn.py @@ -1,4 +1,5 @@ """Do file io - PDN.""" + from __future__ import annotations from blendmodes.blend import BlendType diff --git a/layeredimage/io/psd.py b/layeredimage/io/psd.py index 67aa990..e751c10 100644 --- a/layeredimage/io/psd.py +++ b/layeredimage/io/psd.py @@ -1,4 +1,5 @@ """Do file io - PSD.""" + from __future__ import annotations from blendmodes.blend import BlendType diff --git a/layeredimage/io/tiff.py b/layeredimage/io/tiff.py index cc0d370..9f1dc2a 100644 --- a/layeredimage/io/tiff.py +++ b/layeredimage/io/tiff.py @@ -1,4 +1,5 @@ """Do file io - TIFF.""" + from __future__ import annotations from PIL import Image diff --git a/layeredimage/io/webp.py b/layeredimage/io/webp.py index e3423c5..826f0dc 100644 --- a/layeredimage/io/webp.py +++ b/layeredimage/io/webp.py @@ -1,4 +1,5 @@ """Do file io - WEBP.""" + from __future__ import annotations from PIL import Image diff --git a/layeredimage/io/xcf.py b/layeredimage/io/xcf.py index cc4aa1b..1f64620 100644 --- a/layeredimage/io/xcf.py +++ b/layeredimage/io/xcf.py @@ -1,4 +1,5 @@ """Do file io - XCF.""" + from __future__ import annotations from blendmodes.blend import BlendType diff --git a/layeredimage/layeredimage.py b/layeredimage/layeredimage.py index c88b47e..dad4c75 100644 --- a/layeredimage/layeredimage.py +++ b/layeredimage/layeredimage.py @@ -1,4 +1,5 @@ """LayeredImage class.""" + from __future__ import annotations from typing import Any diff --git a/layeredimage/layergroup.py b/layeredimage/layergroup.py index 7bae4b6..7745a6e 100644 --- a/layeredimage/layergroup.py +++ b/layeredimage/layergroup.py @@ -1,4 +1,5 @@ """Base class.""" + from __future__ import annotations from typing import Any diff --git a/pyproject.toml b/pyproject.toml index abe9591..38ef52e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,11 +34,11 @@ loguru = "<2,>=0.7.2" [tool.poetry.group.dev.dependencies] imgcompare = "^2.0.1" -pytest = "^8.0.2" +pytest = "^8.1.1" handsdown = "^2.1.0" -coverage = "^7.4.3" +coverage = "^7.4.4" ruff = "^0.2.2" -pyright = "^1.1.351" +pyright = "^1.1.354" [build-system] requires = ["poetry-core"] @@ -52,30 +52,35 @@ target-version = "py38" [tool.ruff.lint] select = ["ALL"] ignore = [ - "ANN101", # type annotation for self in method - "COM812", # enforce trailing comma + "ANN101", # type annotation for self in method + "COM812", # enforce trailing comma "D2", # pydocstyle formatting - "N", # pep8 naming - "PLR09", # pylint refactor too many - "TCH", # type check blocks - "W191" # ignore this to allow tabs + "ISC001", + "N", # pep8 naming + "PLR09", # pylint refactor too many + "TCH", # type check blocks + "W191" # ignore this to allow tabs ] fixable = ["ALL"] - [tool.ruff.lint.per-file-ignores] "**/{tests,docs,tools}/*" = ["D", "S101", "E402"] +[tool.ruff.lint.flake8-tidy-imports] +ban-relative-imports = "all" # Disallow all relative imports. + [tool.ruff.format] indent-style = "tab" docstring-code-format = true line-ending = "lf" - [tool.pyright] venvPath = "." venv = ".venv" +[tool.coverage.run] +branch = true + [tool.tox] legacy_tox_ini = """ [tox] diff --git a/tests/test_main.py b/tests/test_main.py index a9e22ce..e08d752 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,4 +1,4 @@ -"""Test module """ +"""Test module""" from __future__ import annotations