Skip to content

Commit

Permalink
[SEDONA-552] Enable Python lint rule E741 (#1387)
Browse files Browse the repository at this point in the history
E741 - Do not use variables named 'I', 'O', or 'l'

https://www.flake8rules.com/rules/E741.html
  • Loading branch information
jbampton committed Apr 30, 2024
1 parent 5fabc23 commit 872ecf3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/linters/ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
4 changes: 2 additions & 2 deletions python/sedona/utils/geometry_serde_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 872ecf3

Please sign in to comment.