Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Allow empty filters - "is not None" #14

Merged
merged 1 commit into from
Jan 1, 2023
Merged

Conversation

jrebiffe
Copy link
Contributor

@jrebiffe jrebiffe commented Dec 31, 2022

Corrects the issue #13 : changes the Get and Get Config keywords to avoid ignoring filter_criteria when filter_criteria doesnot contain any child.
Additionally:

  • Complies with PEP8, Programmer Recommandation, bullet 2 (line 1102) which states "Also, beware of writing if x when you really mean if x is not None"; and Google section 2.14.4 bullet 2 "Always use if foo is None: (or is not None) to check for a None value."
  • Remove the FutureWarning raised by LXML, which appear for any filter. (only if use_lxml=True) due to bool method of the class Element of LXML.

* Correct the <get> and <get-config> operations to avoid ignoring filter_criteria when it doesnot contain any child
* make it PEP8 Programmer Recommandation (line 1102) and Google section 2.14.4
* Remove the FutureWarning raised by LXML, which appear for any filter. (only if `use_lxml=True`) due to __bool__ method of the class Element of LXML.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants