Skip to content

Commit 6f73ada

Browse files
committed
CLN: Remove unnecessary sys.version_info checks
1 parent e3698dc commit 6f73ada

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

pandas/tests/io/formats/test_to_csv.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class TestToCSV:
1313
@pytest.mark.xfail(
14-
(3, 6, 5) > sys.version_info >= (3, 5),
14+
(3, 6, 5) > sys.version_info,
1515
reason=("Python csv library bug (see https://bugs.python.org/issue32255)"),
1616
)
1717
def test_to_csv_with_single_column(self):

versioneer.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* https://github.com/warner/python-versioneer
99
* Brian Warner
1010
* License: Public Domain
11-
* Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, and pypy
11+
* Compatible With: python3.5+, and pypy
1212
* [![Latest Version]
1313
(https://pypip.in/version/versioneer/badge.svg?style=flat)
1414
](https://pypi.org/project/versioneer/)
@@ -464,9 +464,10 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False):
464464
if verbose:
465465
print("unable to find command, tried %s" % (commands,))
466466
return None
467+
467468
stdout = p.communicate()[0].strip()
468-
if sys.version_info[0] >= 3:
469-
stdout = stdout.decode()
469+
stdout = stdout.decode()
470+
470471
if p.returncode != 0:
471472
if verbose:
472473
print("unable to run %s (error)" % dispcmd)
@@ -561,9 +562,10 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False):
561562
if verbose:
562563
print("unable to find command, tried %%s" %% (commands,))
563564
return None
565+
564566
stdout = p.communicate()[0].strip()
565-
if sys.version_info[0] >= 3:
566-
stdout = stdout.decode()
567+
stdout = stdout.decode()
568+
567569
if p.returncode != 0:
568570
if verbose:
569571
print("unable to run %%s (error)" %% dispcmd)

0 commit comments

Comments
 (0)