Skip to content

Rich comparison operators, hashing fix#129

Merged
pjbull merged 2 commits intomasterfrom
jyq-sort
Mar 6, 2021
Merged

Rich comparison operators, hashing fix#129
pjbull merged 2 commits intomasterfrom
jyq-sort

Conversation

@jayqi
Copy link
Copy Markdown
Member

@jayqi jayqi commented Mar 6, 2021

  • Adds rich comparison operators, which enables use with sorted
  • Fixes a bug with __hash__. This was previously hashing the bound method __repr__ (and not the string output of __repr__) and so gave a unique hash for every instance of a cloud path.

@jayqi jayqi requested a review from pjbull March 6, 2021 00:53
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2021

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 6, 2021

Codecov Report

Merging #129 (91fec52) into master (a19902e) will increase coverage by 0.2%.
The diff coverage is 100.0%.

@@           Coverage Diff            @@
##           master    #129     +/-   ##
========================================
+ Coverage    91.8%   92.0%   +0.2%     
========================================
  Files          19      19             
  Lines        1050    1066     +16     
========================================
+ Hits          964     981     +17     
+ Misses         86      85      -1     
Impacted Files Coverage Δ
cloudpathlib/cloudpath.py 90.9% <100.0%> (+0.6%) ⬆️

Copy link
Copy Markdown
Member

@pjbull pjbull left a comment

Choose a reason for hiding this comment

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

Nice!

@pjbull pjbull merged commit 0eed4e9 into master Mar 6, 2021
@pjbull pjbull deleted the jyq-sort branch March 6, 2021 01:09
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.

2 participants