Skip to content
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

introduce AbstractConnection so that UnixDomainSocketConnection can call super().__init__ #2588

Merged
merged 2 commits into from
Mar 16, 2023

Conversation

woutdenolf
Copy link
Contributor

@woutdenolf woutdenolf commented Feb 11, 2023

Pull Request check-list

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

  • Does $ tox pass with this change (including linting)?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action 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)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

Motivation: changes to Connection.__init__ are easily forgotten to be applied also to UnixDomainSocketConnection.__init__ (for example #2570 and #2377) which leads to issues like #2581.

Before this MR

class Connection:
    ...

class UnixDomainSocketConnection(Connection):
    def __init__(...):
        # does not call super().__init__(...)

After this MR

class AbstractConnection:
    ...

class Connection(AbstractConnection):
    def __init__(...):
        ...
        super().__init__(...)

class UnixDomainSocketConnection(AbstractConnection):
    def __init__(...):
        ...
        super().__init__(...)

@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2023

Codecov Report

Base: 92.31% // Head: 92.26% // Decreases project coverage by -0.06% ⚠️

Coverage data is based on head (2df7b6d) compared to base (6c708c2).
Patch coverage: 78.26% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2588      +/-   ##
==========================================
- Coverage   92.31%   92.26%   -0.06%     
==========================================
  Files         115      115              
  Lines       29744    29729      -15     
==========================================
- Hits        27459    27429      -30     
- Misses       2285     2300      +15     
Impacted Files Coverage Δ
redis/connection.py 86.21% <78.26%> (-0.58%) ⬇️
tests/conftest.py 84.94% <0.00%> (-0.78%) ⬇️
tests/test_asyncio/test_search.py 98.29% <0.00%> (-0.35%) ⬇️
redis/asyncio/cluster.py 91.68% <0.00%> (-0.33%) ⬇️
tests/test_cluster.py 96.64% <0.00%> (-0.33%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@woutdenolf woutdenolf marked this pull request as ready for review February 11, 2023 10:50
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