Skip to content

Simplify by removing unnecessary class dummy #1320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Simplify by removing unnecessary class dummy #1320

wants to merge 1 commit into from

Conversation

jdufresne
Copy link
Contributor

Was simply an alias of class object(). Use that instead.

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass with this change (including linting)?
  • Does travis tests pass with this change (enable it first in your forked repo and wait for the travis build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

Was simply an alias of class object(). Use that instead.
@codecov-io
Copy link

codecov-io commented Apr 10, 2020

Codecov Report

Merging #1320 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1320      +/-   ##
==========================================
- Coverage   92.82%   92.81%   -0.01%     
==========================================
  Files          19       19              
  Lines        6533     6530       -3     
==========================================
- Hits         6064     6061       -3     
  Misses        469      469              
Impacted Files Coverage Δ
redis/utils.py 64.28% <ø> (-4.47%) ⬇️
redis/lock.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98242bb...2db61af. Read the comment docs.

@andymccurdy
Copy link
Contributor

The dummy class exists because instances of object prevent attribute assignment. The line immediately following assigns to the token attribute of the object. That will fail on an instance of object.

@jdufresne
Copy link
Contributor Author

Thanks for pointing this out. I did not know about this aspect of object() classes.

I added a test that would have caught this earlier in #1326

@jdufresne jdufresne closed this Apr 11, 2020
@jdufresne jdufresne deleted the dummy branch April 11, 2020 20:17
@andymccurdy
Copy link
Contributor

Perfect, thanks.

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.

3 participants