Skip to content

Commit 7fc7eee

Browse files
committed
💄 beautify the setup.py
1 parent b2b770e commit 7fc7eee

File tree

5 files changed

+13
-19
lines changed

5 files changed

+13
-19
lines changed

templates/setup.py.jj2

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
{% endif %}
2525
{% endfor %}
2626
{% block header %}
27-
'''
27+
"""
2828
Template by pypi-mobans
29-
'''
29+
"""
3030

3131
{% endblock %}
3232
import os
@@ -165,16 +165,16 @@ CLASSIFIERS = [
165165
"Programming Language :: Python :: 3.6",
166166
{% endif %}
167167

168-
{% if min_python_version <= ["3","7"] %}
168+
{%- if min_python_version <= ["3","7"] %}
169169
"Programming Language :: Python :: 3.7",
170170
{% endif %}
171171

172-
{% if min_python_version <= ["3","8"] %}
172+
{%- if min_python_version <= ["3","8"] %}
173173
"Programming Language :: Python :: 3.8",
174174
{% endif %}
175175

176-
{%block additional_classifiers%}
177-
{%endblock %}
176+
{% block additional_classifiers%}
177+
{% endblock %}
178178
]
179179

180180
{%macro handle_complex_dependency(complex_one) -%}

tests/fixtures/setup.py.output

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env python3
22

3-
'''
3+
"""
44
Template by pypi-mobans
5-
'''
5+
"""
66

77
import os
88
import sys
@@ -55,9 +55,7 @@ CLASSIFIERS = [
5555
"Programming Language :: Python :: 3.4",
5656
"Programming Language :: Python :: 3.5",
5757
"Programming Language :: Python :: 3.6",
58-
5958
"Programming Language :: Python :: 3.7",
60-
6159
"Programming Language :: Python :: 3.8",
6260

6361
]

tests/fixtures/setup_use_markers_false.py.output

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env python3
22

3-
'''
3+
"""
44
Template by pypi-mobans
5-
'''
5+
"""
66

77
import os
88
import sys
@@ -55,9 +55,7 @@ CLASSIFIERS = [
5555
"Programming Language :: Python :: 3.4",
5656
"Programming Language :: Python :: 3.5",
5757
"Programming Language :: Python :: 3.6",
58-
5958
"Programming Language :: Python :: 3.7",
60-
6159
"Programming Language :: Python :: 3.8",
6260

6361
]

tests/fixtures/setup_use_markers_true.py.output

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env python3
22

3-
'''
3+
"""
44
Template by pypi-mobans
5-
'''
5+
"""
66

77
import os
88
import sys
@@ -55,9 +55,7 @@ CLASSIFIERS = [
5555
"Programming Language :: Python :: 3.4",
5656
"Programming Language :: Python :: 3.5",
5757
"Programming Language :: Python :: 3.6",
58-
5958
"Programming Language :: Python :: 3.7",
60-
6159
"Programming Language :: Python :: 3.8",
6260

6361
]

tests/test_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def test_setup_use_markers_true():
2323
yaml = YAML(typ='safe')
2424
context = yaml.load(content)
2525
rendered = get_rendered_file(filename, context)
26-
print(rendered)
2726
expected = get_file_content('setup_use_markers_true.py.output')
2827
assert expected == rendered
2928

@@ -35,5 +34,6 @@ def test_setup_use_markers_false():
3534
yaml = YAML(typ='safe')
3635
context = yaml.load(content)
3736
rendered = get_rendered_file(filename, context)
37+
print(rendered)
3838
expected = get_file_content('setup_use_markers_false.py.output')
3939
assert expected == rendered

0 commit comments

Comments
 (0)