Skip to content

DOC: Fix to lzma.LZMAFile #30010

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

Merged
merged 5 commits into from
Dec 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions pandas/compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ def is_platform_32bit() -> bool:

def _import_lzma():
"""
Attempts to import the lzma module.
Importing the `lzma` module.
Warns
-----
When the lzma module is not available.
When the `lzma` module is not available.
"""
try:
import lzma
Expand All @@ -119,22 +119,22 @@ def _import_lzma():

def _get_lzma_file(lzma):
"""
Attempting to get the lzma.LZMAFile class.
Importing the `LZMAFile` class from the `lzma` module.
Returns
-------
class
The lzma.LZMAFile class.
The `LZMAFile` class from the `lzma` module.
Raises
------
RuntimeError
If the module lzma was not imported correctly, or didn't exist.
If the `lzma` module was not imported correctly, or didn't exist.
"""
if lzma is None:
raise RuntimeError(
"lzma module not available. "
"A Python re-install with the proper "
"dependencies might be required to solve this issue."
"A Python re-install with the proper dependencies, "
"might be required to solve this issue."
)
return lzma.LZMAFile