All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
9 # resolve_to_config_type,
10 # DEFAULT_TYPE_ATTRIBUTES,
22 # resolve_to_config_type,
23 # DEFAULT_TYPE_ATTRIBUTES,
25 from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
26 MyLovelyCompanyTeamProjectComponent # NOT DRY
28 from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
29 MyLovelyCompanyTeamProjectComponent as component # DRY
33 result = 1 # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
36 1 # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
40 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # aaa
43 result = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # aaa
76 # The type: ignore exception only applies to line length, not
77 # other types of formatting.
79 "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", # type: ignore
80 "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa"
85 @pytest.mark.parametrize(
86 ("post_data", "message"),
88 # metadata_version errors.
91 "None is an invalid value for Metadata-Version. Error: This field is"
93 " https://packaging.python.org/specifications/core-metadata"
96 {"metadata_version": "-1"},
97 "'-1' is an invalid value for Metadata-Version. Error: Unknown Metadata"
99 " https://packaging.python.org/specifications/core-metadata"
103 {"metadata_version": "1.2"},
104 "'' is an invalid value for Name. Error: This field is required. see"
105 " https://packaging.python.org/specifications/core-metadata"
108 {"metadata_version": "1.2", "name": "foo-"},
109 "'foo-' is an invalid value for Name. Error: Must start and end with a"
110 " letter or numeral and contain only ascii numeric and '.', '_' and"
111 " '-'. see https://packaging.python.org/specifications/core-metadata"
115 {"metadata_version": "1.2", "name": "example"},
116 "'' is an invalid value for Version. Error: This field is required. see"
117 " https://packaging.python.org/specifications/core-metadata"
120 {"metadata_version": "1.2", "name": "example", "version": "dog"},
121 "'dog' is an invalid value for Version. Error: Must start and end with"
122 " a letter or numeral and contain only ascii numeric and '.', '_' and"
123 " '-'. see https://packaging.python.org/specifications/core-metadata"
127 def test_fails_invalid_post_data(
128 self, pyramid_config, db_request, post_data, message
132 square = Square(4) # type: Optional[Square]
134 # Regression test for https://github.com/psf/black/issues/3756.
137 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" # aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
141 ( # aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
142 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" # aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
148 from .config import (
152 ConfigTypeAttributes,
156 # resolve_to_config_type,
157 # DEFAULT_TYPE_ATTRIBUTES,
161 from .config import (
165 ConfigTypeAttributes,
169 # resolve_to_config_type,
170 # DEFAULT_TYPE_ATTRIBUTES,
172 from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
173 MyLovelyCompanyTeamProjectComponent, # NOT DRY
175 from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
176 MyLovelyCompanyTeamProjectComponent as component, # DRY
180 result = 1 # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
182 result = 1 # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
185 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
189 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
200 a[-1], # type: ignore
202 c = call(0.0123, 0.0456, 0.0789, 0.0123, 0.0789, a[-1]) # type: ignore
213 a[-1], # type: ignore
216 # The type: ignore exception only applies to line length, not
217 # other types of formatting.
224 "aaaaaaaa", # type: ignore
235 @pytest.mark.parametrize(
236 ("post_data", "message"),
238 # metadata_version errors.
242 "None is an invalid value for Metadata-Version. Error: This field"
244 " https://packaging.python.org/specifications/core-metadata"
248 {"metadata_version": "-1"},
250 "'-1' is an invalid value for Metadata-Version. Error: Unknown"
251 " Metadata Version see"
252 " https://packaging.python.org/specifications/core-metadata"
257 {"metadata_version": "1.2"},
259 "'' is an invalid value for Name. Error: This field is required."
260 " see https://packaging.python.org/specifications/core-metadata"
264 {"metadata_version": "1.2", "name": "foo-"},
266 "'foo-' is an invalid value for Name. Error: Must start and end"
267 " with a letter or numeral and contain only ascii numeric and '.',"
269 " https://packaging.python.org/specifications/core-metadata"
274 {"metadata_version": "1.2", "name": "example"},
276 "'' is an invalid value for Version. Error: This field is required."
277 " see https://packaging.python.org/specifications/core-metadata"
281 {"metadata_version": "1.2", "name": "example", "version": "dog"},
283 "'dog' is an invalid value for Version. Error: Must start and end"
284 " with a letter or numeral and contain only ascii numeric and '.',"
286 " https://packaging.python.org/specifications/core-metadata"
291 def test_fails_invalid_post_data(
292 self, pyramid_config, db_request, post_data, message
296 square = Square(4) # type: Optional[Square]
298 # Regression test for https://github.com/psf/black/issues/3756.
300 ( # aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
301 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
305 ( # aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
306 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" # aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa