Skip to content

Commit 6a27183

Browse files
authored
Add linting to keep consistency (#120)
* linting the project according to ruff, added config to pyproject.toml
1 parent 1eb8de6 commit 6a27183

52 files changed

Lines changed: 2236 additions & 1157 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pyproject.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,39 @@ dynamic = ["version"]
2727
homepage = "https://github.com/hobuinc/silvimetric"
2828
repository = "https://github.com/hobuinc/silvimetric"
2929

30+
[tool.ruff]
31+
line-length = 80
32+
exclude = [
33+
".git",
34+
".github",
35+
".mypy_cache",
36+
".vscode",
37+
"build",
38+
"docs"
39+
]
40+
41+
[tool.ruff.format]
42+
quote-style = "single"
43+
indent-style = "space"
44+
docstring-code-format = true
45+
46+
[tool.ruff.lint]
47+
select=[
48+
"A",
49+
"B",
50+
"E",
51+
"F",
52+
"ISC",
53+
"RUF"
54+
]
55+
56+
[tool.ruff.lint.pycodestyle]
57+
max-line-length = 80
58+
59+
[tool.ruff.lint.per-file-ignores]
60+
"__init__.py" = ["E402", "F401"]
61+
"**/{tests,docs,tools}/*" = ["E402"]
62+
3063
[tool.setuptools]
3164
package-dir = {"" = "src"}
3265

src/silvimetric/__init__.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@
44
from .resources.extents import Extents
55
from .resources.storage import Storage
66
from .resources.metric import Metric
7-
from .resources.metrics import grid_metrics, l_moments, percentiles, statistics, all_metrics
8-
from .resources.metrics import product_moments
7+
from .resources.metrics import (
8+
grid_metrics,
9+
l_moments,
10+
percentiles,
11+
statistics,
12+
all_metrics,
13+
product_moments,
14+
)
915
from .resources.taskgraph import Graph
1016
from .resources.log import Log
1117
from .resources.data import Data
1218
from .resources.attribute import Attribute, Pdal_Attributes, Attributes
13-
from .resources.config import StorageConfig, ShatterConfig, ExtractConfig
14-
from .resources.config import ApplicationConfig
19+
from .resources.config import (
20+
StorageConfig,
21+
ShatterConfig,
22+
ExtractConfig,
23+
ApplicationConfig,
24+
)
1525

1626
from .commands.shatter import shatter
1727
from .commands.extract import extract

0 commit comments

Comments
 (0)