PEP-8 code style changes#1300
Open
bschoening wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR applies PEP 8–oriented formatting changes across the driver codebase (whitespace, indentation, docstring quoting, and comment cleanup), with a couple of small typo/wording fixes.
Changes:
- Normalizes whitespace/indentation and adds blank lines for readability across multiple modules.
- Updates docstrings/comments for consistency (e.g., triple-quoted docstrings, TODO spacing).
- Includes a few minor typo/wording corrections (e.g., “errro” → “error”, “useable” → “usable”).
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| cassandra/util.py | Import placement/spacing and docstring/comment formatting updates. |
| cassandra/timestamps.py | Adds a separating blank line before the first class definition. |
| cassandra/query.py | Adds spacing between functions; fixes TODO spacing; normalizes indentation in HostTargetingStatement. |
| cassandra/protocol.py | Adds a separating blank line before module-level constants. |
| cassandra/pool.py | Removes line-continuation backslashes in dict literals; fixes “usable” spelling. |
| cassandra/policies.py | Moves cassandra imports into the main import block; adds spacing before a class definition. |
| cassandra/murmur3.py | Adds a separating blank line before the optional C-extension import block. |
| cassandra/metrics.py | Re-indents scales.collection(...) call for readability/alignment. |
| cassandra/metadata.py | Reorders the optional murmur3 import block; minor formatting changes in string building and spacing. |
| cassandra/marshal.py | Adds blank lines and normalizes spacing in packing/unpacking helpers. |
| cassandra/encoder.py | Moves logger initialization to follow import grouping and normalizes indentation. |
| cassandra/cqltypes.py | Moves ipaddress import into the main import block; adds spacing and refines comments/line wrapping. |
| cassandra/connection.py | Removes stray semicolon; normalizes spacing in expressions and dict comprehensions; comment spacing cleanup. |
| cassandra/concurrent.py | Wraps long function signature and normalizes spacing between top-level defs. |
| cassandra/cluster.py | Normalizes spacing/indentation and slightly refines comments/docstrings. |
| cassandra/auth.py | Adds separating blank line before module alias/compat assignment. |
| cassandra/init.py | Adds separating blank lines; fixes a typo in an exception docstring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
291
to
+293
| def __lt__(self, other): | ||
| return ((self.address, self.port, self._server_name) < | ||
| (other.address, other.port, self._server_name)) | ||
| return ((self.address, self.port, self._server_name) | ||
| < (other.address, other.port, self._server_name)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mostly whitespace fixes for PEP-8