Skip to content

Conversation

@yangyulely
Copy link
Contributor

Key Improve:

  1. Added DEFAULT_NEO4J_PORT to avoid magic numbers.
  2. Improved readability in get_uri by separating encryption scheme logic.
  3. Changed get_client to _create_driver for clarity (private method as it's internal).
  4. Kept essential logging (URI) but removed unnecessary ones.
  5. Simplified session parameter handling using a conditional dictionary.
  6. Used consistent line breaks and spacing for better readability.
  7. Maintained type hints for better IDE support and clarity.
  8. Preserved existing error handling structure while streamlining logic.

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@potiuk potiuk merged commit 9ebb801 into apache:main Aug 25, 2025
73 checks passed
@potiuk
Copy link
Member

potiuk commented Aug 25, 2025

Nice!

@yangyulely yangyulely deleted the optimize_neo4j_provider branch August 26, 2025 11:15
mangal-vairalkar pushed a commit to mangal-vairalkar/airflow that referenced this pull request Aug 30, 2025
* Optimize the neo4j provider hook

* Improve code of neo4j hooks

* Add hook name

* Fix docs lint
nothingmin pushed a commit to nothingmin/airflow that referenced this pull request Sep 2, 2025
* Optimize the neo4j provider hook

* Improve code of neo4j hooks

* Add hook name

* Fix docs lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants