Skip to content

Commit e63831e

Browse files
authored
CLN: Assorted (#51112)
* Remove unneeded filterwarning * Remove running _print_verions as script * Remove unneeded None typing * Remove RANDU_CHARS * Revert "Remove unneeded None typing" This reverts commit b63d948.
1 parent 78907e4 commit e63831e

File tree

3 files changed

+0
-31
lines changed

3 files changed

+0
-31
lines changed

pandas/_testing/_random.py

-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
from pandas._typing import NpDtype
66

77
RANDS_CHARS = np.array(list(string.ascii_letters + string.digits), dtype=(np.str_, 1))
8-
RANDU_CHARS = np.array(
9-
list("".join(map(chr, range(1488, 1488 + 26))) + string.digits),
10-
dtype=(np.unicode_, 1),
11-
)
128

139

1410
def rands_array(nchars, size, dtype: NpDtype = "O", replace: bool = True) -> np.ndarray:

pandas/tests/io/formats/test_format.py

-1
Original file line numberDiff line numberDiff line change
@@ -3461,7 +3461,6 @@ def test_filepath_or_buffer_arg(
34613461
assert_filepath_or_buffer_equals(expected)
34623462

34633463

3464-
@pytest.mark.filterwarnings("ignore::FutureWarning")
34653464
@pytest.mark.parametrize("method", ["to_string", "to_html", "to_latex"])
34663465
def test_filepath_or_buffer_bad_arg_raises(float_frame, method):
34673466
if method in ["to_latex"]: # uses styler implementation

pandas/util/_print_versions.py

-26
Original file line numberDiff line numberDiff line change
@@ -132,29 +132,3 @@ def show_versions(as_json: str | bool = False) -> None:
132132
print("")
133133
for k, v in deps.items():
134134
print(f"{k:<{maxlen}}: {v}")
135-
136-
137-
def main() -> int:
138-
from optparse import OptionParser
139-
140-
parser = OptionParser()
141-
parser.add_option(
142-
"-j",
143-
"--json",
144-
metavar="FILE",
145-
nargs=1,
146-
help="Save output as JSON into file, pass in '-' to output to stdout",
147-
)
148-
149-
(options, args) = parser.parse_args()
150-
151-
if options.json == "-":
152-
options.json = True
153-
154-
show_versions(as_json=options.json)
155-
156-
return 0
157-
158-
159-
if __name__ == "__main__":
160-
sys.exit(main())

0 commit comments

Comments
 (0)