Skip to content

Commit 09f0b3a

Browse files
pfparsonsadamreeve
andauthored
Apply suggestions from code review
Co-authored-by: Adam Reeve <[email protected]>
1 parent 58fcae3 commit 09f0b3a

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

python/pyarrow/_parquet_encryption.pyx

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ cdef class CryptoFactory(_Weakrefable):
433433
434434
filesystem : FileSystem, default None
435435
Used only when internal_key_material is set to False on
436-
EncryptionConfiguration. If nothinng passed, will be inferred
436+
EncryptionConfiguration. If None, the file system will be inferred
437437
based on parquet_file_path.
438438
439439
Returns
@@ -489,7 +489,7 @@ cdef class CryptoFactory(_Weakrefable):
489489
490490
filesystem : FileSystem, default None
491491
Used only when the parquet file uses external key material. If
492-
nothinng passed, will be inferred based on parquet_file_path.
492+
None, the file system will be inferred based on parquet_file_path.
493493
494494
Returns
495495
-------
@@ -533,7 +533,7 @@ cdef class CryptoFactory(_Weakrefable):
533533
self,
534534
KmsConnectionConfig kms_connection_config,
535535
parquet_file_path,
536-
FileSystem filesystem,
536+
FileSystem filesystem=None,
537537
double_wrapping = True,
538538
cache_lifetime_seconds = 600):
539539
""" Rotates master encryption keys for a Parquet file that uses
@@ -549,23 +549,17 @@ cdef class CryptoFactory(_Weakrefable):
549549
550550
filesystem : FileSystem, default None
551551
Used only when the parquet file uses external key material. If
552-
nothinng passed, will be inferred based on parquet_file_path.
552+
None, the file system will be inferred based on parquet_file_path.
553553
554554
double_wrapping : bool, default True
555-
In the single wrapping mode, decrypts data keys with old master
556-
keys, then encrypts them with new master keys. In the double
557-
wrapping mode, decrypts KEKs (key encryption keys) with old
558-
master keys, generates new KEKs and encrypts them with new master
559-
keys.
555+
In the single wrapping mode, encrypts data encryption keys with
556+
new master keys. In the double wrapping mode, generates new
557+
KEKs (key encryption keys) and uses these to encrypt the data keys,
558+
and encrypts the KEKs with the new master keys.
560559
561560
cache_lifetime_seconds : int or float, default 600
562561
During key rotation, KMS Client and Key Encryption Keys will be
563562
cached for this duration.
564-
565-
Returns
566-
-------
567-
file_decryption_properties : FileDecryptionProperties
568-
File decryption properties.
569563
"""
570564
cdef:
571565
c_string c_parquet_file_path
@@ -585,7 +579,7 @@ cdef class CryptoFactory(_Weakrefable):
585579
double_wrapping,
586580
cache_lifetime_seconds);
587581

588-
return check_status(status)
582+
check_status(status)
589583

590584
cdef inline shared_ptr[CPyCryptoFactory] unwrap(self):
591585
return self.factory
@@ -667,7 +661,7 @@ cdef class FileSystemKeyMaterialStore(_Weakrefable):
667661
Path to a parquet file using external key material.
668662
669663
filesystem : FileSystem, default None
670-
FileSystem where the parquet file is located. If nothinng passed,
664+
FileSystem where the parquet file is located. If None,
671665
will be inferred based on parquet_file_path.
672666
673667
Returns

0 commit comments

Comments
 (0)