Skip to content

Commit e8ea414

Browse files
authored
Figure.histogram and pygmt.info: Remove parameter 'table', use 'data' instead (#1975)
1 parent 89100c9 commit e8ea414

File tree

3 files changed

+1
-27
lines changed

3 files changed

+1
-27
lines changed

pygmt/src/histogram.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,10 @@
22
Histogram - Create a histogram
33
"""
44
from pygmt.clib import Session
5-
from pygmt.helpers import (
6-
build_arg_string,
7-
deprecate_parameter,
8-
fmt_docstring,
9-
kwargs_to_strings,
10-
use_alias,
11-
)
5+
from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias
126

137

148
@fmt_docstring
15-
@deprecate_parameter("table", "data", "v0.5.0", remove_version="v0.7.0")
169
@use_alias(
1710
A="horizontal",
1811
B="frame",

pygmt/src/info.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@
66
from pygmt.helpers import (
77
GMTTempFile,
88
build_arg_string,
9-
deprecate_parameter,
109
fmt_docstring,
1110
kwargs_to_strings,
1211
use_alias,
1312
)
1413

1514

1615
@fmt_docstring
17-
@deprecate_parameter("table", "data", "v0.5.0", remove_version="v0.7.0")
1816
@use_alias(
1917
C="per_column",
2018
I="spacing",

pygmt/tests/test_info.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,6 @@ def test_info():
3131
assert output == expected_output
3232

3333

34-
def test_info_deprecate_table_to_data():
35-
"""
36-
Make sure that the old parameter "table" is supported and it reports a
37-
warning.
38-
"""
39-
with pytest.warns(expected_warning=FutureWarning) as record:
40-
output = info(table=POINTS_DATA) # pylint: disable=no-value-for-parameter
41-
expected_output = (
42-
f"{POINTS_DATA}: N = 20 "
43-
"<11.5309/61.7074> "
44-
"<-2.9289/7.8648> "
45-
"<0.1412/0.9338>\n"
46-
)
47-
assert output == expected_output
48-
assert len(record) == 1 # check that only one warning was raised
49-
50-
5134
@pytest.mark.parametrize(
5235
"table",
5336
[

0 commit comments

Comments
 (0)