Merge pull request #3454 from YYun-D/doc_modify

Fix `bytearray` and `bytes` docs
This commit is contained in:
Jeong YunWon
2021-11-21 13:58:34 +09:00
committed by GitHub
3 changed files with 0 additions and 22 deletions

View File

@@ -1753,8 +1753,6 @@ class AssortedBytesTest(unittest.TestCase):
self.assertEqual(bytes(b"abc") < b"ab", False)
self.assertEqual(bytes(b"abc") <= b"ab", False)
# TODO: RUSTPYTHON
@unittest.expectedFailure
@test.support.requires_docstrings
def test_doc(self):
self.assertIsNotNone(bytearray.__doc__)

View File

@@ -35,17 +35,6 @@ use crate::{
use bstr::ByteSlice;
use std::mem::size_of;
/// "bytearray(iterable_of_ints) -> bytearray\n\
/// bytearray(string, encoding[, errors]) -> bytearray\n\
/// bytearray(bytes_or_buffer) -> mutable copy of bytes_or_buffer\n\
/// bytearray(int) -> bytes array of size given by the parameter initialized with null bytes\n\
/// bytearray() -> empty bytes array\n\n\
/// Construct a mutable bytearray object from:\n \
/// - an iterable yielding integers in range(256)\n \
/// - a text string encoded using the specified encoding\n \
/// - a bytes or a buffer object\n \
/// - any object implementing the buffer API.\n \
/// - an integer";
#[pyclass(module = false, name = "bytearray")]
#[derive(Debug, Default)]
pub struct PyByteArray {

View File

@@ -23,15 +23,6 @@ use bstr::ByteSlice;
use std::mem::size_of;
use std::ops::Deref;
/// "bytes(iterable_of_ints) -> bytes\n\
/// bytes(string, encoding[, errors]) -> bytes\n\
/// bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer\n\
/// bytes(int) -> bytes object of size given by the parameter initialized with null bytes\n\
/// bytes() -> empty bytes object\n\nConstruct an immutable array of bytes from:\n \
/// - an iterable yielding integers in range(256)\n \
/// - a text string encoded using the specified encoding\n \
/// - any object implementing the buffer API.\n \
/// - an integer";
#[pyclass(module = false, name = "bytes")]
#[derive(Clone, Debug)]
pub struct PyBytes {