Skip to content

Commit

Permalink
update lint config
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Jan 20, 2025
1 parent d0b4bb4 commit 7c6f993
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
[build-system]
requires = ["setuptools>=46.4", "wheel", "cython", "numpy"]

[tool.mypy]
no_strict_optional = true
ignore_missing_imports = true

[tool.isort]
profile = "black"
known_first_party = ["rio_tiler_mvt"]
known_third_party = ["rasterio", "vtzero", "shapely"]
default_section = "THIRDPARTY"

[tool.ruff]
line-length = 90

[tool.ruff.lint]
select = [
"D1", # pydocstyle errors
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # flake8
"C", # flake8-comprehensions
"B", # flake8-bugbear
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"B905", # ignore zip() without an explicit strict= parameter, only support with python >3.10
"B028",
]

[tool.ruff.lint.mccabe]
max-complexity = 12
32 changes: 0 additions & 32 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,3 @@ replace = __version__ = "{new_version}"

[metadata]
version = attr: rio_tiler_mvt.__version__

[mypy]
no_strict_optional = True
ignore_missing_imports = True

[tool:isort]
profile = black
known_first_party = rio_tiler_mvt
known_third_party = rasterio,vtzero,shapely
default_section = THIRDPARTY

[tool.ruff]
line-length = 90

[tool.ruff.lint]
select = [
"D1", # pydocstyle errors
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # flake8
"C", # flake8-comprehensions
"B", # flake8-bugbear
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"B905", # ignore zip() without an explicit strict= parameter, only support with python >3.10
"B028",
]

[tool.ruff.lint.mccabe]
max-complexity = 12
2 changes: 1 addition & 1 deletion tests/test_mvt.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_pixels_encoder():
assert len(mvt.layers) == 1

# Test bad feature type
with pytest.raises(Exception):
with pytest.raises(Exception): # noqa: B017
pixels_encoder(tile, mask, feature_type="somethingelse")


Expand Down

0 comments on commit 7c6f993

Please sign in to comment.