Skip to content

Commit 0b6e55c

Browse files
authored
Add reStructuredText markup classifier. (#46)
* Add reStructuredText markup classifier. * Fix black formatting. * Sorting is case-sensitive.
1 parent 3053d71 commit 0b6e55c

File tree

2 files changed

+34
-7
lines changed

2 files changed

+34
-7
lines changed

src/trove_classifiers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,7 @@
732732
"Topic :: Text Processing :: Markup :: SGML",
733733
"Topic :: Text Processing :: Markup :: VRML",
734734
"Topic :: Text Processing :: Markup :: XML",
735+
"Topic :: Text Processing :: Markup :: reStructuredText",
735736
"Topic :: Utilities",
736737
"Typing :: Typed",
737738
}

tests/test_classifiers.py

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
@pytest.mark.parametrize(
77
"classifiers, deprecated_classifiers",
88
[
9-
({"Foo :: Bar", "Foo :: Bar :: Baz",}, {}),
9+
(
10+
{
11+
"Foo :: Bar",
12+
"Foo :: Bar :: Baz",
13+
},
14+
{},
15+
),
1016
({"Foo :: Bar"}, {"Biz :: Baz": ["Foo :: Bar"]}),
1117
],
1218
)
@@ -17,15 +23,23 @@ def test_success(classifiers, deprecated_classifiers):
1723
@pytest.mark.parametrize(
1824
"classifiers, deprecated_classifiers, expected",
1925
[
20-
({"Foo", "Foo :: Bar"}, {}, "Top-level classifier 'Foo' is invalid",),
26+
(
27+
{"Foo", "Foo :: Bar"},
28+
{},
29+
"Top-level classifier 'Foo' is invalid",
30+
),
2131
({"Foo :: Bar :: Baz"}, {}, "Classifier 'Foo :: Bar' is missing"),
2232
(
23-
{"Foo :: Bar",},
33+
{
34+
"Foo :: Bar",
35+
},
2436
{"Biz :: Baz": ["Bing :: Bang"]},
2537
"Classifier 'Bing :: Bang' does not exist",
2638
),
2739
(
28-
{"Foo :: Bar",},
40+
{
41+
"Foo :: Bar",
42+
},
2943
{"Foo :: Bar": []},
3044
"Classifier 'Foo :: Bar' in both valid and deprecated classifiers",
3145
),
@@ -43,9 +57,21 @@ def test_success(classifiers, deprecated_classifiers):
4357
{},
4458
"Classifiers starting or ending with whitespace are invalid",
4559
),
46-
({"Foo: :: Bar"}, {}, "Classifiers containing ':' are invalid",),
47-
({"Foo :: B:ar"}, {}, "Classifiers containing ':' are invalid",),
48-
({"Foo :: Bar: Baz"}, {}, "Classifiers containing ':' are invalid",),
60+
(
61+
{"Foo: :: Bar"},
62+
{},
63+
"Classifiers containing ':' are invalid",
64+
),
65+
(
66+
{"Foo :: B:ar"},
67+
{},
68+
"Classifiers containing ':' are invalid",
69+
),
70+
(
71+
{"Foo :: Bar: Baz"},
72+
{},
73+
"Classifiers containing ':' are invalid",
74+
),
4975
],
5076
)
5177
def test_failure(classifiers, deprecated_classifiers, expected):

0 commit comments

Comments
 (0)