Skip to content

Conversation

Copy link

Copilot AI commented Oct 30, 2025

The documentation showed impresso = impresso.connect(), which shadows the module name and prevents access to module-level exports like DateRange, AND, and OR.

Changes

  • Function docstring: Updated connect() example from impresso = connect() to client = connect()
  • Documentation: Changed all code examples in docs/preparing_queries.md and docs/resources.md to use client variable
  • Example notebooks: Updated all 7 notebooks in examples/notebooks/ to use the new pattern

Before/After

# Before - shadows the module
from impresso import connect
impresso = connect()
impresso.search.find(...)  # Can't use impresso.DateRange anymore

# After - keeps module accessible  
from impresso import connect
client = connect()
client.search.find(...)  # Can still use impresso.DateRange, impresso.AND, etc.
Original prompt

This section details on the original issue you should resolve

<issue_title>Use client instead of impresso in documentation</issue_title>
<issue_description>As ChatGPT puts it:

Shadowing the module name like
import impresso
impresso = impresso.connect()
technically works, but it’s a bad idea.
• You lose access to the impresso module (no impresso.DateRange, no help(impresso) on the module).
• It breaks introspection and autocomplete.
• It can cause subtle bugs, especially in dynamic/reloading environments.
• It’s confusing for anyone reading or maintaining the code.
✅ Better:
import impresso
client = impresso.connect()
Keeps everything accessible and clear. (edited) </issue_description>

<agent_instructions>Change impresso.connect to client.connect in the documentation </agent_instructions>

Comments on the Issue (you are @copilot in this section)

@caiocmello I made this change in all datalab notebooks already.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ariable

Co-authored-by: danieleguido <1181642+danieleguido@users.noreply.github.com>
Copilot AI changed the title [WIP] Update documentation to use client instead of impresso Use client instead of impresso in documentation to avoid module shadowing Oct 30, 2025
Copilot AI requested a review from danieleguido October 30, 2025 10:38
@danieleguido danieleguido requested a review from theorm October 30, 2025 10:40
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.

Use client instead of impresso in documentation

2 participants