Skip to content

Commit 58001d7

Browse files
authored
Remove future statements (#3194)
* remove future statements * add commented out pyupgrade * add py3-only & keep-percent to pyupgrade config * add isort to commented out hooks * add a couple of items to isort config
1 parent 5b36e80 commit 58001d7

File tree

13 files changed

+19
-22
lines changed

13 files changed

+19
-22
lines changed

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,16 @@ repos:
1010
rev: v2.2.3
1111
hooks:
1212
- id: flake8
13+
# run these occasionally, ref discussion https://github.com/pydata/xarray/pull/3194
14+
# - repo: https://github.com/asottile/pyupgrade
15+
# rev: v1.22.1
16+
# hooks:
17+
# - id: pyupgrade
18+
# args:
19+
# - "--py3-only"
20+
# # remove on f-strings in Py3.7
21+
# - "--keep-percent-format"
22+
# - repo: https://github.com/timothycrosley/isort
23+
# rev: 4.3.21-2
24+
# hooks:
25+
# - id: isort

asv_bench/benchmarks/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import, division, print_function
2-
31
import itertools
42

53
import numpy as np

asv_bench/benchmarks/dataarray_missing.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import, division, print_function
2-
31
import pandas as pd
42

53
import xarray as xr

asv_bench/benchmarks/dataset_io.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import, division, print_function
2-
31
import os
42

53
import numpy as np

asv_bench/benchmarks/indexing.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import, division, print_function
2-
31
import numpy as np
42
import pandas as pd
53

asv_bench/benchmarks/interp.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import, division, print_function
2-
31
import numpy as np
42
import pandas as pd
53

asv_bench/benchmarks/reindexing.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import, division, print_function
2-
31
import numpy as np
42

53
import xarray as xr

asv_bench/benchmarks/rolling.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import, division, print_function
2-
31
import numpy as np
42
import pandas as pd
53

asv_bench/benchmarks/unstacking.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import, division, print_function
2-
31
import numpy as np
42

53
import xarray as xr

doc/conf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
14-
from __future__ import absolute_import, division, print_function
14+
1515

1616
import datetime
1717
import os
@@ -262,11 +262,11 @@
262262

263263
latex_elements = {
264264
# The paper size ('letterpaper' or 'a4paper').
265-
#'papersize': 'letterpaper',
265+
# 'papersize': 'letterpaper',
266266
# The font size ('10pt', '11pt' or '12pt').
267-
#'pointsize': '10pt',
267+
# 'pointsize': '10pt',
268268
# Additional stuff for the LaTeX preamble.
269-
#'preamble': '',
269+
# 'preamble': '',
270270
}
271271

272272
# Grouping the document tree into LaTeX files. List of tuples

doc/gallery/plot_cartopy_facetgrid.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
.. _this discussion: https://github.com/pydata/xarray/issues/1397#issuecomment-299190567
1515
""" # noqa
1616

17-
from __future__ import division
1817

1918
import cartopy.crs as ccrs
2019
import matplotlib.pyplot as plt

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ exclude=
3030
doc
3131

3232
[isort]
33+
default_section=THIRDPARTY
34+
known_first_party=xarray
3335
multi_line_output=3
3436
include_trailing_comma=True
3537
force_grid_wrap=0

versioneer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@
277277
278278
"""
279279

280-
from __future__ import print_function
281280

282281
import errno
283282
import json

0 commit comments

Comments
 (0)