corteva / rioxarray

geospatial xarray extension powered by rasterio
https://corteva.github.io/rioxarray
Other
525 stars 83 forks source link

LNT: code complexity #52

Open snowman2 opened 5 years ago

snowman2 commented 5 years ago
$ radon cc --min B rioxarray --total-average
rioxarray/rioxarray.py
    M 1080:4 RasterArray.to_raster - B
    M 697:4 RasterArray.reproject - B
    M 861:4 RasterArray.clip_box - B
    M 290:4 XRasterBase.write_crs - B
    M 529:4 RasterArray.nodata - B
    M 562:4 RasterArray.resolution - B
    M 603:4 RasterArray._check_dimensions - B
    M 1172:4 RasterDataset.crs - B
    M 223:4 XRasterBase.crs - B
    M 922:4 RasterArray.clip - B
rioxarray/_io.py
    F 197:0 open_rasterio - E
    M 60:4 RasterioArrayWrapper._get_indexer - B
    M 118:4 RasterioArrayWrapper._getitem - B
    F 176:0 _parse_tags - B

70 blocks (classes, functions, methods) analyzed.
Average complexity: A (3.5714285714285716)

http://radon.readthedocs.org/en/latest/index.html https://www.codacy.com/

snowman2 commented 3 years ago
snowman2 commented 3 years ago
python -m pylint rioxarray
************* Module rioxarray.raster_array
rioxarray/raster_array.py:602:4: R1260: 'clip_box' is too complex. The McCabe rating is 11 (too-complex)
************* Module rioxarray.raster_writer
rioxarray/raster_writer.py:37:0: R1260: '_write_metatata_to_raster' is too complex. The McCabe rating is 13 (too-complex)
************* Module rioxarray._io
rioxarray/_io.py:707:0: R1260: 'open_rasterio' is too complex. The McCabe rating is 21 (too-complex)

-------------------------------------------------------------------
Your code has been rated at 9.98/10 (previous run: 10.00/10, -0.02)
snowman2 commented 3 years ago

https://github.com/rubik/xenon