This is an automated email from the ASF dual-hosted git repository.

jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git


The following commit(s) were added to refs/heads/master by this push:
     new 872ecf396 [SEDONA-552] Enable Python lint rule `E741` (#1387)
872ecf396 is described below

commit 872ecf396cd4182a3f91c1c85235f7e65942b7a8
Author: John Bampton <[email protected]>
AuthorDate: Wed May 1 02:41:09 2024 +1000

    [SEDONA-552] Enable Python lint rule `E741` (#1387)
    
    E741 - Do not use variables named 'I', 'O', or 'l'
    
    https://www.flake8rules.com/rules/E741.html
---
 .github/linters/ruff.toml                     | 2 +-
 python/sedona/utils/geometry_serde_general.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/linters/ruff.toml b/.github/linters/ruff.toml
index 68c5cd334..6302db1e0 100644
--- a/.github/linters/ruff.toml
+++ b/.github/linters/ruff.toml
@@ -40,7 +40,7 @@ target-version = "py38"
 # Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
 # McCabe complexity (`C901`) by default.
 select = ["E4", "E7", "E9", "F"]
-ignore = ["E721", "E722", "E731", "E741", "F401", "F402", "F403", "F405", 
"F811", "F821", "F822", "F841", "F901"]
+ignore = ["E721", "E722", "E731", "F401", "F402", "F403", "F405", "F811", 
"F821", "F822", "F841", "F901"]
 
 # Allow fix for all enabled rules (when `--fix`) is provided.
 fixable = ["ALL"]
diff --git a/python/sedona/utils/geometry_serde_general.py 
b/python/sedona/utils/geometry_serde_general.py
index 9efd33eb1..243a1f1f6 100644
--- a/python/sedona/utils/geometry_serde_general.py
+++ b/python/sedona/utils/geometry_serde_general.py
@@ -379,11 +379,11 @@ def serialize_multi_linestring(geom: MultiLineString) -> 
bytes:
 
     coord_type = CoordinateType.type_of(geom)
     lines = [[list(coord) for coord in ls.coords] for ls in linestrings]
-    line_lengths = [len(l) for l in lines]
+    line_lengths = [len(line) for line in lines]
     num_coords = sum(line_lengths)
 
     header = generate_header_bytes(GeometryTypeID.MULTILINESTRING, coord_type, 
num_coords)
-    coord_data = array.array('d', [c for l in lines for coord in l for c in 
coord]).tobytes()
+    coord_data = array.array('d', [c for line in lines for coord in line for c 
in coord]).tobytes()
     num_lines = struct.pack('i', len(lines))
     structure_data = array.array('i', line_lengths).tobytes()
 

Reply via email to