Skip to content

Handle nodes that aren't leafy.#126

Merged
moomoohk merged 3 commits intoversion/2.xfrom
bug/not-quite-a-leaf
Jun 19, 2021
Merged

Handle nodes that aren't leafy.#126
moomoohk merged 3 commits intoversion/2.xfrom
bug/not-quite-a-leaf

Conversation

@calebcase
Copy link
Collaborator

This relates to:

#119

And incorporates some of the changes from:

#120
#122
#123

This relates to:

#119

And incorporates some of the changes from:

#120
#122
#123
@calebcase calebcase force-pushed the bug/not-quite-a-leaf branch from 1944646 to a8e7a95 Compare March 29, 2020 20:57
@akesterson akesterson changed the base branch from master to version/2.0 March 29, 2020 21:17
@akesterson akesterson changed the base branch from version/2.0 to version/2.x March 29, 2020 22:11
try:
return leaf(thing) or len(thing) == 0
except:
return false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Typo: this should be False not false. The fact that the tests pass mean this path isn't getting hit.
  2. I recommend catching TypeError instead of a bare except:, as a bare except will also mask exceptions thrown by the interpreter due to syntax errors, block keyboard interrupts, etc.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, the linter apparently needs adjusted. It was configured to catch these at one point.

@wsantos
Copy link

wsantos commented Apr 21, 2020

@calebcase can you push the fix ? what do we need to get this merged ? I've merged this to my fork if you guys want to use until this get merged, https://github.com/wsantos/dpath-python

@dargueta
Copy link

This PR is still broken though; see my comments above

@wsantos
Copy link

wsantos commented Apr 30, 2020

So what is the plan to get this done @dargueta @calebcase ?

@dargueta
Copy link

@calebcase hasn't fixed the bug I found so we can't do anything with it until they're done.

@moomoohk
Copy link
Collaborator

moomoohk commented Jul 7, 2020

Hi. I can't really use this library without a fix for this issue. If this PR is abandoned should I open another one? Will it get reviewed and merged?
Any other alternatives in the meanwhile?

@dargueta
Copy link

dargueta commented Jul 7, 2020

If this PR is abandoned should I open another one?

There have been four already; really it's up to @calebcase to fix the bug in this PR and @akesterson to merge it. @akesterson you may be able to modify this PR yourself since you're the owner.

@moomoohk
Copy link
Collaborator

moomoohk commented Jul 8, 2020

Looking forward to seeing this fix merged then. In the meantime I'm using @wsantos's fork

@akesterson
Copy link
Collaborator

Blocked by #136

@calebcase
Copy link
Collaborator Author

@moomoohk I'm going to abandon this, but it might be worth incorporating it in another PR.

@calebcase calebcase closed this Apr 6, 2021
@moomoohk
Copy link
Collaborator

Hi everyone. I'm reopening this PR for review and merging.

@moomoohk moomoohk reopened this Jun 15, 2021
Copy link
Collaborator

@bigsablept bigsablept left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thanks for getting it ready!

@moomoohk moomoohk linked an issue Jun 19, 2021 that may be closed by this pull request
@moomoohk moomoohk merged commit 48a1701 into version/2.x Jun 19, 2021
@moomoohk moomoohk deleted the bug/not-quite-a-leaf branch June 19, 2021 22:33
@moomoohk
Copy link
Collaborator

Changes will be pushed to PyPI soon enough

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.

getting a non string attribute with no len is causing an error

6 participants