Skip to content

fix: import json in leafmap/download.py - #1393

Open
herniqeu wants to merge 1 commit into
opengeos:masterfrom
herniqeu:fix/import-json
Open

herniqeu wants to merge 1 commit into
opengeos:masterfrom
herniqeu:fix/import-json

Conversation

@herniqeu

@herniqeu herniqeu commented Nov 1, 2026 •

Copy link
Copy Markdown

Problema

leafmap/download.py usa json na linha 246, mas json nao e importado no arquivo: a execucao para com NameError: name 'json' is not defined.

Correcao

import json junto dos imports existentes, sem mexer em mais nada.

Verificacao

pyflakes no arquivo:

  • antes: undefined name 'json'
  • depois: aviso some (rodado no patch antes de abrir o PR)

Summary by CodeRabbit

  • Chores
    • This update includes a small internal maintenance change. There are no changes to user-visible features, workflows, or outputs, and no changes to the app’s public functionality. Existing behavior remains unchanged. No new capabilities or fixes are included in this release.

download.py reads/writes JSON but does not import json.

Verified with pyflakes: undefined name 'json' no longer reported.

Signed-off-by: Henrique Godoy <95002561+herniqeu@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 10f40e37-1f4f-4ad2-9dbc-cbbff6543725
Commits

Reviewing files that changed from the base of the PR and between 5f7839c and c5db4cb.

Files selected for processing: 1
  • leafmap/download.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The change adds an import for Python’s json module in leafmap/download.py. No executable behavior or public declarations change.

Changes: Download module

Layer / File(s) Summary
Add JSON import
leafmap/download.py
The module imports Python’s json module. No executable behavior changes.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Suggested reviewers: giswqs

Merge Risk: Minimal · up to c5db4

The import addresses the reported missing module reference. No actionable merge-blocking risk remains; merge after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: importing json in leafmap/download.py to fix the reported NameError.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit spots a new import in place,
And gives the download module space.
No behavior shifts, no paths anew,
Just json joining the module crew.
The rabbit hops along, pleased too.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant