Skip to content

Commit c650928

Browse files
authored
Merge pull request #418 from nschloe/fix
delete more useless files
2 parents 27a163a + 5106e88 commit c650928

File tree

7 files changed

+9
-25
lines changed

7 files changed

+9
-25
lines changed

.pylintrc

Lines changed: 0 additions & 15 deletions
This file was deleted.

.setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ project_urls =
1111
long_description = file: README.md
1212
long_description_content_type = text/markdown
1313
license = MIT
14+
license_files = LICENSE
1415
platforms = any
1516
classifiers =
1617
Development Status :: 4 - Beta

test/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def print_tree(obj, indent=""):
1212
"""Recursively prints the tree structure of the matplotlib object.
1313
"""
1414
if isinstance(obj, matplotlib.text.Text):
15-
print(indent, type(obj).__name__, '("{}")'.format(obj.get_text()))
15+
print(indent, type(obj).__name__, f'("{obj.get_text()}")')
1616
else:
1717
print(indent, type(obj).__name__)
1818

@@ -43,7 +43,7 @@ def assert_equality(
4343
plt.close()
4444

4545
this_dir = os.path.dirname(os.path.abspath(__file__))
46-
with open(os.path.join(this_dir, filename), "r", encoding="utf-8") as f:
46+
with open(os.path.join(this_dir, filename), encoding="utf-8") as f:
4747
reference = f.read()
4848
assert reference == code, _unidiff_output(code, reference)
4949

tikzplotlib/_cleanfigure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ def _pixelate(x, y, xToPix, yToPix):
911911
)
912912
mask_sorted = np.concatenate([np.array([True]).reshape((-1,)), m], axis=0)
913913

914-
mask = np.ones((x.shape)) == 0
914+
mask = np.ones(x.shape) == 0
915915
mask[id_orig] = mask_sorted
916916
mask[0] = True
917917
mask[-1] = True

tikzplotlib/_legend.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def draw_legend(data, obj):
1111
texts = []
1212
children_alignment = []
1313
for text in obj.texts:
14-
texts.append("{}".format(text.get_text()))
15-
children_alignment.append("{}".format(text.get_horizontalalignment()))
14+
texts.append(f"{text.get_text()}")
15+
children_alignment.append(f"{text.get_horizontalalignment()}")
1616

1717
# Get the location.
1818
# http://matplotlib.org/api/legend_api.html
@@ -39,7 +39,7 @@ def draw_legend(data, obj):
3939

4040
legend_style = [
4141
# https://github.com/matplotlib/matplotlib/issues/15764#issuecomment-557823370
42-
"fill opacity={}".format(obj.get_frame().get_alpha()),
42+
f"fill opacity={obj.get_frame().get_alpha()}",
4343
"draw opacity=1",
4444
"text opacity=1",
4545
]

tikzplotlib/_text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def draw_text(data, obj):
6363
properties.append(anchor)
6464
data, col, _ = _color.mpl_color2xcolor(data, converter.to_rgb(obj.get_color()))
6565
properties.append(f"text={col}")
66-
properties.append("rotate={:.1f}".format(obj.get_rotation()))
66+
properties.append(f"rotate={obj.get_rotation():.1f}")
6767

6868
if obj.get_style() == "italic":
6969
style.append("\\itshape")
@@ -247,7 +247,7 @@ def _bbox(bbox, data, properties, scaling):
247247
inner_sep = bbox_style.pad * data["font size"]
248248
properties.append(f"inner sep={inner_sep:{ff}}pt")
249249
if bbox.get_alpha():
250-
properties.append("fill opacity={}".format(bbox.get_alpha()))
250+
properties.append(f"fill opacity={bbox.get_alpha()}")
251251
# Rounded boxes
252252
if isinstance(bbox_style, mpl.patches.BoxStyle.Round):
253253
properties.append("rounded corners")

0 commit comments

Comments
 (0)