Skip to content

Commit a85a8b0

Browse files
committed
update lint config
1 parent d0b4bb4 commit a85a8b0

File tree

6 files changed

+35
-83
lines changed

6 files changed

+35
-83
lines changed

.github/workflows/ci.yml

+1-13
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
run: |
3434
python -m pip install --upgrade pip
3535
python -m pip install -e ".[test]"
36+
python -m pip install "vector-tile-base@git+https://github.com/mapbox/vector-tile-base.git"
3637
3738
- name: Run pre-commit
3839
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }}
@@ -68,23 +69,10 @@ jobs:
6869
python -m pip install --upgrade pip
6970
python -m pip install numpy cython wheel setuptools twine
7071
71-
- name: Set tag version
72-
id: tag
73-
run: |
74-
echo "version=${GITHUB_REF#refs/*/}"
75-
echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
76-
77-
- name: Set module version
78-
id: module
79-
run: |
80-
hatch --quiet version
81-
echo "version=$(python setup.py --version)" >> $GITHUB_OUTPUT
82-
8372
- name: Build sdist
8473
run: python setup.py sdist
8574

8675
- name: Build and publish
87-
if: ${{ steps.tag.outputs.version }} == ${{ steps.module.outputs.version}}
8876
env:
8977
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
9078
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

pyproject.toml

+32
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,34 @@
11
[build-system]
22
requires = ["setuptools>=46.4", "wheel", "cython", "numpy"]
3+
4+
[tool.mypy]
5+
no_strict_optional = true
6+
ignore_missing_imports = true
7+
8+
[tool.isort]
9+
profile = "black"
10+
known_first_party = ["rio_tiler_mvt"]
11+
known_third_party = ["rasterio", "vtzero", "shapely"]
12+
default_section = "THIRDPARTY"
13+
14+
[tool.ruff]
15+
line-length = 90
16+
17+
[tool.ruff.lint]
18+
select = [
19+
"D1", # pydocstyle errors
20+
"E", # pycodestyle errors
21+
"W", # pycodestyle warnings
22+
"F", # flake8
23+
"C", # flake8-comprehensions
24+
"B", # flake8-bugbear
25+
]
26+
ignore = [
27+
"E501", # line too long, handled by black
28+
"B008", # do not perform function calls in argument defaults
29+
"B905", # ignore zip() without an explicit strict= parameter, only support with python >3.10
30+
"B028",
31+
]
32+
33+
[tool.ruff.lint.mccabe]
34+
max-complexity = 12

setup.cfg

-32
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,3 @@ replace = __version__ = "{new_version}"
1616

1717
[metadata]
1818
version = attr: rio_tiler_mvt.__version__
19-
20-
[mypy]
21-
no_strict_optional = True
22-
ignore_missing_imports = True
23-
24-
[tool:isort]
25-
profile = black
26-
known_first_party = rio_tiler_mvt
27-
known_third_party = rasterio,vtzero,shapely
28-
default_section = THIRDPARTY
29-
30-
[tool.ruff]
31-
line-length = 90
32-
33-
[tool.ruff.lint]
34-
select = [
35-
"D1", # pydocstyle errors
36-
"E", # pycodestyle errors
37-
"W", # pycodestyle warnings
38-
"F", # flake8
39-
"C", # flake8-comprehensions
40-
"B", # flake8-bugbear
41-
]
42-
ignore = [
43-
"E501", # line too long, handled by black
44-
"B008", # do not perform function calls in argument defaults
45-
"B905", # ignore zip() without an explicit strict= parameter, only support with python >3.10
46-
"B028",
47-
]
48-
49-
[tool.ruff.lint.mccabe]
50-
max-complexity = 12

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
extra_reqs = {
1414
"test": [
15-
"vector-tile-base @ git+https://github.com/mapbox/vector-tile-base.git",
15+
# "vector-tile-base@git+https://github.com/mapbox/vector-tile-base.git",
1616
"protobuf==3.20.1",
1717
"rio-tiler>=2.0",
1818
"pytest",

tests/test_mvt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_pixels_encoder():
6464
assert len(mvt.layers) == 1
6565

6666
# Test bad feature type
67-
with pytest.raises(Exception):
67+
with pytest.raises(Exception): # noqa: B017
6868
pixels_encoder(tile, mask, feature_type="somethingelse")
6969

7070

tox.ini

-36
This file was deleted.

0 commit comments

Comments
 (0)