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.
3 result = type(message)("")
6 # Don't merge multiline (e.g. triple-quoted) strings.
9 """SELECT xxxxxxxxxxxxxxxxxxxx(xxx)"""
10 """ FROM xxxxxxxxxxxxxxxx WHERE xxxxxxxxxx AND xxx <> xxxxxxxxxxxxxx()""")
12 # There was a bug where tuples were being identified as long strings.
13 long_tuple = ('Apple', 'Berry', 'Cherry', 'Dill', 'Evergreen', 'Fig',
14 'Grape', 'Harry', 'Iglu', 'Jaguar')
16 stupid_format_method_bug = "Some really long string that just so happens to be the {} {} to force the 'format' method to hang over the line length boundary. This is pretty annoying.".format("perfect", "length")
20 os.system("This is a regression test. xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxx.".format("xxxxxxxxxx", "xxxxxx", "xxxxxxxxxx"))
27 "xxx_xxxxxxxxxx(xxxxx={}, xxxx={}, xxxxx, xxxx_xxxx_xxxxxxxxxx={})".format(
28 xxxxx, xxxx, xxxx_xxxx_xxxxxxxxxx
40 "[{}]: xxx_xxxxxxxxxx(xxxxx={}, xxxx={}, xxxxx={}"
41 " xxxx_xxxx_xxxxxxxxxx={}, xxxx={})"
42 .format(xxxx._xxxxxxxxxxxxxx, xxxxx, xxxx, xxxx_xxxx_xxxxxxxxxx, xxxxxxx)
50 for (xxx_xxxx, _xxx_xxx, _xxx_xxxxx, xxx_xxxx) in xxxx:
52 assert ("x" in xxx) or (
54 ), "{0} xxxxxxx xx {1}, xxx {1} xx xxx xx xxxx xx xxx xxxx: xxx xxxx {2}".format(
55 xxx_xxxx, xxx, xxxxxx.xxxxxxx(xxx_xxx_xxxxx)
59 def disappearing_comment():
61 ( # xx -x xxxxxxx xx xxx xxxxxxx.
62 '{{xxx_xxxxxxxxxx_xxxxxxxx}} xxx xxxx'
66 if xxxxx.xx_xxxxxxxxxx
67 else ( # Disappearing Comment
68 "--xxxxxxx --xxxxxx=x --xxxxxx-xxxxx=xxxxxx"
69 " --xxxxxx-xxxx=xxxxxxxxxxx.xxx"
81 "@xxxxxx '{xxxx_xxx}\t' > {xxxxxx_xxxx}.xxxxxxx;"
82 "{xxxx_xxx} >> {xxxxxx_xxxx}.xxxxxxx 2>&1; xx=$$?;"
84 .format(xxxx_xxx=xxxx_xxxxxxx, xxxxxx_xxxx=xxxxxxx + "/" + xxxx_xxx_xxxx, x=xxx_xxxxx_xxxxx_xxx),
90 func_call_where_string_arg_has_method_call_and_bad_parens(
92 "A long string with {}. This string is so long that it is ridiculous. It can't fit on one line at alllll.".format("formatting")
96 func_call_where_string_arg_has_old_fmt_and_bad_parens(
98 "A long string with {}. This string is so long that it is ridiculous. It can't fit on one line at alllll." % "formatting"
102 func_call_where_string_arg_has_old_fmt_and_bad_parens(
104 "A long string with {}. This {} is so long that it is ridiculous. It can't fit on one line at alllll." % ("formatting", "string")
111 xxxx.xxxxxxx.xxxxx( ('xxxxxxxxxx xxxx xx xxxxxx(%x) xx %x xxxx xx xxx %x.xx'
115 + (' %.3f (%s) to %.3f (%s).\n'
117 xxxx.xxxxxxxxxxxxxx(xxxx.xxxxxxxxx),
119 xxxx.xxxxxxxxxxxxxx( xx)
127 "xx {xxxxxxxxxxx}/xxxxxxxxxxx.xxx xxxx.xxx && xxxxxx -x "
128 "\"xxxx xxxxxxx xxxxxx xxxx; xxxx xxxxxx_xxxxx xxxxxx xxxx; "
129 "xxxx.xxxx_xxxxxx(['xxxx.xxx'], xxxx.xxxxxxx().xxxxxxxxxx)\" "
139 "xx {xxxxxxxxxxx}/xxxxxxxxxxx.xxx xxxx.xxx && xxxxxx -x "
140 "xxxx, ('xxxxxxx xxxxxx xxxx, xxxx') xxxxxx_xxxxx xxxxxx xxxx; "
141 "xxxx.xxxx_xxxxxx(['xxxx.xxx'], xxxx.xxxxxxx().xxxxxxxxxx)\" "
147 xxxxxxx = { 'xx' : 'xxxx xxxxxxx xxxxxxxxx -x xxx -x /xxx/{0} -x xxx,xxx -xx {1} \
148 -xx {1} -xx xxx=xxx_xxxx,xxx_xx,xxx_xxx,xxx_xxxx,xxx_xx,xxx_xxx |\
149 xxxxxx -x xxxxxxxx -x xxxxxxxx -x',
150 'xx' : 'xxxx xxxxxxx xxxxxxxxx -x xxx -x /xxx/{0} -x xxx,xxx -xx {1} \
151 -xx {1} -xx xxx=xxx_xxxx_xxx_xxxx,xxx_xx_xxx_xxxx,xxx_xxxx_xxx_xxxx,\
152 xxx_xx_xxxx_xxxx,xxx_xxx_xxxx,xxx_xxx_xxxx xxxx=xxx | xxxxxx -x xxxxxxxx -x xxxxxxxx -x'
158 xxxxx_xxxxxxxxxxxx('xxx xxxxxx xxx xxxxxxxxx.xx xx xxxxxxxx. xxx xxxxxxxxxxxxx.xx xxxxxxx '
159 + 'xx xxxxxx xxxxxx xxxxxx xx xxxxxxx xxx xxx ${0} xx x xxxxxxxx xxxxx'.xxxxxx(xxxxxx_xxxxxx_xxx))
165 'xxxxxxxxxxxxxxx' : xxxxxx_xxxxx_xxxx,
166 # 'xxxxxxxxxxxxxxxxxxxxxxx'
167 # 'xxxxxxxxxxxxxxxxxxxxxx'
168 # 'xxxxxxxxxxxxxxxxxx'
169 # 'xxxxxxxxxxxxxxxxx'
170 'xxxxxxxxxx' : xxxxx_xxxxx,
174 def xxxx_xxx_xx_xxxxxxxxxx_xxxx_xxxxxxxxx(xxxx):
181 xxxxxx={'xxxxxx 1' : xxxxxx(xxxx='xxxxxx 1', xxxxxx=600.0)},
182 xxxxxxxx_xxxxxxx=0.0,
189 xxxxxx={'xxxxxx 1' : xxxxxx(xxxx='xxxxxx 1', xxxxxx=200.0)},
190 xxxxxxxx_xxxxxxx=0.0,
198 'xxxxx006': ['xxx-xxx xxxxx3xxxx1xx2xxxxxxxxxxxxxx0xx6xxxxxxxxxx2xxxxxx9xxxxxxxxxx0xxxxx1xxx2x/xx9xx6+x+xxxxxxxxxxxxxx4xxxxxxxxxxxxxxxxxxxxx43xxx2xx2x4x++xxx6xxxxxxxxx+xxxxx/xx9x+xxxxxxxxxxxxxx8x15xxxxxxxxxxxxxxxxx82xx/xxxxxxxxxxxxxx/x5xxxxxxxxxxxxxx6xxxxxx74x4/xxx4x+xxxxxxxxx2xxxxxxxx87xxxxx4xxxxxxxx3xx0xxxxx4xxx1xx9xx5xxxxxxx/xxxxx5xx6xx4xxxx1x/x2xxxxxxxxxxxx64xxxxxxx1x0xx5xxxxxxxxxxxxxx== xxxxx000 xxxxxxxxxx\n',
199 'xxx-xxx xxxxx3xxxx1xx2xxxxxxxxxxxxxx6xxxxxxxxxxxxxx9xxxxxxxxxxxxx3xxx9xxxxxxxxxxxxxxxx0xxxxxxxxxxxxxxxxx2xxxx2xxx6xxxxx/xx54xxxxxxxxx4xxx3xxxxxx9xx3xxxxx39xxxxxxxxx5xx91xxxx7xxxxxx8xxxxxxxxxxxxxxxx9xxx93xxxxxxxxxxxxxxxxx7xxx8xx8xx4/x1xxxxx1x3xxxxxxxxxxxxx3xxxxxx9xx4xx4x7xxxxxxxxxxxxx1xxxxxxxxx7xxxxxxxxxxxxxx4xx6xxxxxxxxx9xxx7xxxx2xxxxxxxxxxxxxxxxxxxxxx8xxxxxxxxxxxxxxxxxxxx6xx== xxxxx010 xxxxxxxxxx\n'],
200 'xxxxx016': ['xxx-xxx xxxxx3xxxx1xx2xxxxxxxxxxxxxx0xx6xxxxxxxxxx2xxxxxx9xxxxxxxxxx0xxxxx1xxx2x/xx9xx6+x+xxxxxxxxxxxxxx4xxxxxxxxxxxxxxxxxxxxx43xxx2xx2x4x++xxx6xxxxxxxxx+xxxxx/xx9x+xxxxxxxxxxxxxx8x15xxxxxxxxxxxxxxxxx82xx/xxxxxxxxxxxxxx/x5xxxxxxxxxxxxxx6xxxxxx74x4/xxx4x+xxxxxxxxx2xxxxxxxx87xxxxx4xxxxxxxx3xx0xxxxx4xxx1xx9xx5xxxxxxx/xxxxx5xx6xx4xxxx1x/x2xxxxxxxxxxxx64xxxxxxx1x0xx5xxxxxxxxxxxxxx== xxxxx000 xxxxxxxxxx\n',
201 'xxx-xxx xxxxx3xxxx1xx2xxxxxxxxxxxxxx6xxxxxxxxxxxxxx9xxxxxxxxxxxxx3xxx9xxxxxxxxxxxxxxxx0xxxxxxxxxxxxxxxxx2xxxx2xxx6xxxxx/xx54xxxxxxxxx4xxx3xxxxxx9xx3xxxxx39xxxxxxxxx5xx91xxxx7xxxxxx8xxxxxxxxxxxxxxxx9xxx93xxxxxxxxxxxxxxxxx7xxx8xx8xx4/x1xxxxx1x3xxxxxxxxxxxxx3xxxxxx9xx4xx4x7xxxxxxxxxxxxx1xxxxxxxxx7xxxxxxxxxxxxxx4xx6xxxxxxxxx9xxx7xxxx2xxxxxxxxxxxxxxxxxxxxxx8xxxxxxxxxxxxxxxxxxxx6xx== xxxxx010 xxxxxxxxxx\n']
206 'xxxx xxx xxxxxxxx_xxxx xx "xxxxxxxxxx".'
207 '\n xxx: xxxxxx xxxxxxxx_xxxx=xxxxxxxxxx'
208 ) # xxxx xxxxxxxxxx xxxx xx xxxx xx xxx xxxxxxxx xxxxxx xxxxx.
210 some_tuple = ("some string", "some string" " which should be joined")
212 some_commented_string = (
213 "This string is long but not so long that it needs hahahah toooooo be so greatttt" # This comment gets thrown to the top.
214 " {} that I just can't think of any more good words to say about it at"
215 " allllllllllll".format("ha") # comments here are fine
218 some_commented_string = (
219 "This string is long but not so long that it needs hahahah toooooo be so greatttt" # But these
220 " {} that I just can't think of any more good words to say about it at" # comments will stay
221 " allllllllllll".format("ha") # comments here are fine
224 lpar_and_rpar_have_comments = func_call( # LPAR Comment
225 "Long really ridiculous type of string that shouldn't really even exist at all. I mean commmme onnn!!!", # Comma Comment
229 f"sudo -E deluge-console info --detailed --sort-reverse=time_added "
230 f"{'' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
233 cmd_fstring = f"sudo -E deluge-console info --detailed --sort-reverse=time_added {'' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
235 cmd_fstring = f"sudo -E deluge-console info --detailed --sort-reverse=time_added {'{{}}' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
237 cmd_fstring = f"sudo -E deluge-console info --detailed --sort-reverse=time_added {{'' if ID is None else ID}} | perl -nE 'print if /^{field}:/'"
239 fstring = f"This string really doesn't need to be an {{{{fstring}}}}, but this one most certainly, absolutely {does}."
242 f"We have to remember to escape {braces}."
251 f"This string ({string_leaf.value}) appears to be pointless (i.e. has"
256 user_regex = _lazy_re_compile(
257 r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*\Z" # dot-atom
258 r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"\Z)', # quoted-string
262 user_regex = _lazy_re_compile(
263 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # dot-atom
264 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', # quoted-string
269 user_regex = _lazy_re_compile(
270 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # dot-atom
271 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', # quoted-string
278 if not hasattr(module, name):
280 "Could not find object %s in %s.\n"
281 "Please note that you cannot serialize things like inner "
282 "classes. Please move the object into the main module "
283 "body to use migrations.\n"
284 "For more information, see "
285 "https://docs.djangoproject.com/en/%s/topics/migrations/#serializing-values"
286 % (name, module_name, get_docs_version()))
291 if not hasattr(module, name):
293 "Could not find object %s in %s.\nPlease note that you cannot serialize things like inner classes. Please move the object into the main module body to use migrations.\nFor more information, see https://docs.djangoproject.com/en/%s/topics/migrations/#serializing-values"
294 % (name, module_name, get_docs_version()))
297 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
298 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
299 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
300 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
303 class Step(StepBase):
305 self.cmd = 'SR AAAA-CORRECT NAME IS {last_name} {first_name}{middle_name} {title}/P{passenger_association}'.format(
307 first_name=first_name,
308 middle_name=middle_name,
310 passenger_association=passenger_association,
313 xxxxxxx_xxxxxx_xxxxxxx = xxx(
317 '((x.aaaaaaaaa = "xxxxxx.xxxxxxxxxxxxxxxxxxxxx") || (x.xxxxxxxxx = "xxxxxxxxxxxx")) && '
318 # xxxxx xxxxxxxxxxxx xxxx xxx (xxxxxxxxxxxxxxxx) xx x xxxxxxxxx xx xxxxxx.
319 "(x.bbbbbbbbbbbb.xxx != "
320 '"xxx:xxx:xxx::cccccccccccc:xxxxxxx-xxxx/xxxxxxxxxxx/xxxxxxxxxxxxxxxxx") && '
326 if __name__ == "__main__":
327 for i in range(4, 8):
329 r"for pid in $(ps aux | grep paster | grep -v grep | grep '\-%d' | awk '{print $2}'); do kill $pid; done"
341 c_float(val[0][0] / val[0][1]).value
342 == c_float(value[0][0] / value[0][1]).value
343 ), "%s didn't roundtrip" % tag
345 class xxxxxxxxxxxxxxxxxxxxx(xxxx.xxxxxxxxxxxxx):
346 def xxxxxxx_xxxxxx(xxxx):
347 assert xxxxxxx_xxxx in [
348 x.xxxxx.xxxxxx.xxxxx.xxxxxx,
349 x.xxxxx.xxxxxx.xxxxx.xxxx,
350 ], ("xxxxxxxxxxx xxxxxxx xxxx (xxxxxx xxxx) %x xxx xxxxx" % xxxxxxx_xxxx)
354 ] = "test" # set some Thrift field to non-None in the struct aa bb cc dd ee
357 "asdf_hjkl_jkl": re.compile(
358 r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
362 RE_TWO_BACKSLASHES = {
363 "asdf_hjkl_jkl": re.compile(
364 r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
368 RE_THREE_BACKSLASHES = {
369 "asdf_hjkl_jkl": re.compile(
370 r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\\\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
374 # We do NOT split on f-string expressions.
375 print(f"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam. {[f'{i}' for i in range(10)]}")
376 x = f"This is a long string which contains an f-expr that should not split {{{[i for i in range(5)]}}}."
378 # The parens should NOT be removed in this case.
380 "my very long string that should get formatted if I'm careful to make sure it goes"
381 " over 88 characters which it has now"
384 # The parens should NOT be removed in this case.
386 "my very long string that should get formatted if I'm careful to make sure it goes over 88 characters which"
390 # The parens should NOT be removed in this case.
392 "my very long string"
393 " that should get formatted"
394 " if I'm careful to make sure"
395 " it goes over 88 characters which"
400 def _legacy_listen_examples():
402 " \"listen for the '%(event_name)s' event\"\n"
403 "\n # ... (event logic logic logic) ...\n"
413 for candidate in CANDIDATES:
415 "**{candidate.object_type} {candidate.rev}**"
416 " - {candidate.description}\n"
421 f"{f'{humanize_number(pos)}.': <{pound_len+2}} "
422 f"{balance: <{bal_len + 5}} "
423 f"<<{author.display_name}>>\n"
426 assert str(suffix_arr) == (
427 "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
428 "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
429 "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
431 assert str(suffix_arr) != (
432 "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
433 "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
434 "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
436 assert str(suffix_arr) <= (
437 "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
438 "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
439 "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
441 assert str(suffix_arr) >= (
442 "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
443 "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
444 "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
446 assert str(suffix_arr) < (
447 "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
448 "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
449 "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
451 assert str(suffix_arr) > (
452 "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
453 "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
454 "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
456 assert str(suffix_arr) in "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', 'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', 'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
457 assert str(suffix_arr) not in "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', 'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', 'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
459 f"1. Go to Google Developers Console and log in with your Google account."
460 "(https://console.developers.google.com/)"
461 "2. You should be prompted to create a new project (name does not matter)."
462 "3. Click on Enable APIs and Services at the top."
463 "4. In the list of APIs choose or search for YouTube Data API v3 and "
464 "click on it. Choose Enable."
465 "5. Click on Credentials on the left navigation bar."
466 "6. Click on Create Credential at the top."
467 '7. At the top click the link for "API key".'
468 "8. No application restrictions are needed. Click Create at the bottom."
469 "9. You now have a key to add to `{prefix}set api youtube api_key`"
472 f"1. Go to Google Developers Console and log in with your Google account."
473 "(https://console.developers.google.com/)"
474 "2. You should be prompted to create a new project (name does not matter)."
475 f"3. Click on Enable APIs and Services at the top."
476 "4. In the list of APIs choose or search for YouTube Data API v3 and "
477 "click on it. Choose Enable."
478 f"5. Click on Credentials on the left navigation bar."
479 "6. Click on Create Credential at the top."
480 '7. At the top click the link for "API key".'
481 "8. No application restrictions are needed. Click Create at the bottom."
482 "9. You now have a key to add to `{prefix}set api youtube api_key`"
485 f"1. Go to Google Developers Console and log in with your Google account."
486 "(https://console.developers.google.com/)"
487 "2. You should be prompted to create a new project (name does not matter)."
488 f"3. Click on Enable APIs and Services at the top."
489 "4. In the list of APIs choose or search for YouTube Data API v3 and "
490 "click on it. Choose Enable."
491 f"5. Click on Credentials on the left navigation bar."
492 "6. Click on Create Credential at the top."
493 '7. At the top click the link for "API key".'
494 "8. No application restrictions are needed. Click Create at the bottom."
495 f"9. You now have a key to add to `{prefix}set api youtube api_key`"
498 # It shouldn't matter if the string prefixes are capitalized.
500 F"{F'{humanize_number(pos)}.': <{pound_len+2}} "
501 F"{balance: <{bal_len + 5}} "
502 F"<<{author.display_name}>>\n"
506 F"We have to remember to escape {braces}."
511 welcome_to_programming = R"hello," R" world!"
513 fstring = F"f-strings definitely make things more {difficult} than they need to be for {{black}}. But boy they sure are handy. The problem is that some lines will need to have the 'f' whereas others do not. This {line}, for example, needs one."
515 x = F"This is a long string which contains an f-expr that should not split {{{[i for i in range(5)]}}}."
518 "\N{BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE VERTICAL BAR}\N{VARIATION SELECTOR-16}"
521 xxxxxx_xxx_xxxx_xx_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxx_xxxx_xxxxx = xxxx.xxxxxx.xxxxxxxxx.xxxxxxxxxxxxxxxxxxxx(
523 "x3_xxxxxxxx": "xxx3_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxxxxxx_xxxxxx_xxxxxxx",
527 # Regression test for https://github.com/psf/black/issues/3117.
529 "something_something":
530 r"Lorem ipsum dolor sit amet, an sed convenire eloquentiam \t"
531 r"signiferumque, duo ea vocibus consetetur scriptorem. Facer \t",
534 # Regression test for https://github.com/psf/black/issues/3459.
536 empty_str_as_first_split=''
537 f'xxxxxxx {xxxxxxxxxx} xxx xxxxxxxxxx xxxxx xxx xxx xx '
538 'xxxxx xxxxxxxxx xxxxxxx, xxx xxxxxxxxxxx xxx xxxxx. '
539 f'xxxxxxxxxxxxx xxxx xx xxxxxxxxxx. xxxxx: {x.xxx}',
540 empty_u_str_as_first_split=u''
541 f'xxxxxxx {xxxxxxxxxx} xxx xxxxxxxxxx xxxxx xxx xxx xx '
542 'xxxxx xxxxxxxxx xxxxxxx, xxx xxxxxxxxxxx xxx xxxxx. '
543 f'xxxxxxxxxxxxx xxxx xx xxxxxxxxxx. xxxxx: {x.xxx}',
546 # Regression test for https://github.com/psf/black/issues/3455.
548 "/this/is/a/very/very/very/very/very/very/very/very/very/very/long/key/without/spaces":
549 # And there is a comment before the value
550 ("item1", "item2", "item3"),
553 # Regression test for https://github.com/psf/black/issues/3506.
555 "With single quote: ' "
557 ' With double quote: " '
561 s = f'Lorem Ipsum is simply dummy text of the printing and typesetting industry:\'{my_dict["foo"]}\''
569 result = type(message)("")
572 # Don't merge multiline (e.g. triple-quoted) strings.
575 """SELECT xxxxxxxxxxxxxxxxxxxx(xxx)"""
576 """ FROM xxxxxxxxxxxxxxxx WHERE xxxxxxxxxx AND xxx <> xxxxxxxxxxxxxx()"""
580 # There was a bug where tuples were being identified as long strings.
594 stupid_format_method_bug = (
595 "Some really long string that just so happens to be the {} {} to force the 'format'"
596 " method to hang over the line length boundary. This is pretty annoying.".format(
605 "This is a regression test. xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx"
606 " xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx"
607 " xxxx.".format("xxxxxxxxxx", "xxxxxx", "xxxxxxxxxx")
615 "xxx_xxxxxxxxxx(xxxxx={}, xxxx={}, xxxxx, xxxx_xxxx_xxxxxxxxxx={})"
616 .format(xxxxx, xxxx, xxxx_xxxx_xxxxxxxxxx),
627 "[{}]: xxx_xxxxxxxxxx(xxxxx={}, xxxx={}, xxxxx={}"
628 " xxxx_xxxx_xxxxxxxxxx={}, xxxx={})".format(
629 xxxx._xxxxxxxxxxxxxx, xxxxx, xxxx, xxxx_xxxx_xxxxxxxxxx, xxxxxxx
638 for xxx_xxxx, _xxx_xxx, _xxx_xxxxx, xxx_xxxx in xxxx:
640 assert ("x" in xxx) or (xxx in xxx_xxx_xxxxx), (
641 "{0} xxxxxxx xx {1}, xxx {1} xx xxx xx xxxx xx xxx xxxx: xxx xxxx {2}"
642 .format(xxx_xxxx, xxx, xxxxxx.xxxxxxx(xxx_xxx_xxxxx))
647 def disappearing_comment():
649 ( # xx -x xxxxxxx xx xxx xxxxxxx.
650 "{{xxx_xxxxxxxxxx_xxxxxxxx}} xxx xxxx {} {{xxxx}} >&2".format(
652 if xxxxx.xx_xxxxxxxxxx
653 else ( # Disappearing Comment
654 "--xxxxxxx --xxxxxx=x --xxxxxx-xxxxx=xxxxxx"
655 " --xxxxxx-xxxx=xxxxxxxxxxx.xxx"
669 "@xxxxxx '{xxxx_xxx}\t' > {xxxxxx_xxxx}.xxxxxxx;"
670 "{xxxx_xxx} >> {xxxxxx_xxxx}.xxxxxxx 2>&1; xx=$$?;"
672 xxxx_xxx=xxxx_xxxxxxx,
673 xxxxxx_xxxx=xxxxxxx + "/" + xxxx_xxx_xxxx,
674 x=xxx_xxxxx_xxxxx_xxx,
682 func_call_where_string_arg_has_method_call_and_bad_parens(
683 "A long string with {}. This string is so long that it is ridiculous. It can't fit"
684 " on one line at alllll.".format("formatting"),
687 func_call_where_string_arg_has_old_fmt_and_bad_parens(
688 "A long string with {}. This string is so long that it is ridiculous. It can't fit"
689 " on one line at alllll." % "formatting",
692 func_call_where_string_arg_has_old_fmt_and_bad_parens(
693 "A long string with {}. This {} is so long that it is ridiculous. It can't fit on"
694 " one line at alllll." % ("formatting", "string"),
702 "xxxxxxxxxx xxxx xx xxxxxx(%x) xx %x xxxx xx xxx %x.xx"
703 % (len(self) + 1, xxxx.xxxxxxxxxx, xxxx.xxxxxxxxxx)
704 + " %.3f (%s) to %.3f (%s).\n"
707 xxxx.xxxxxxxxxxxxxx(xxxx.xxxxxxxxx),
709 xxxx.xxxxxxxxxxxxxx(xx),
718 "xx {xxxxxxxxxxx}/xxxxxxxxxxx.xxx xxxx.xxx && xxxxxx -x "
719 '"xxxx xxxxxxx xxxxxx xxxx; xxxx xxxxxx_xxxxx xxxxxx xxxx; '
720 "xxxx.xxxx_xxxxxx(['xxxx.xxx'], xxxx.xxxxxxx().xxxxxxxxxx)\" ",
729 "xx {xxxxxxxxxxx}/xxxxxxxxxxx.xxx xxxx.xxx && xxxxxx -x "
730 "xxxx, ('xxxxxxx xxxxxx xxxx, xxxx') xxxxxx_xxxxx xxxxxx xxxx; "
731 "xxxx.xxxx_xxxxxx(['xxxx.xxx'], xxxx.xxxxxxx().xxxxxxxxxx)\" ",
739 "xxxx xxxxxxx xxxxxxxxx -x xxx -x /xxx/{0} -x xxx,xxx -xx {1} -xx {1} -xx"
740 " xxx=xxx_xxxx,xxx_xx,xxx_xxx,xxx_xxxx,xxx_xx,xxx_xxx | xxxxxx -x xxxxxxxx -x"
744 "xxxx xxxxxxx xxxxxxxxx -x xxx -x /xxx/{0} -x xxx,xxx -xx {1} -xx {1} -xx"
745 " xxx=xxx_xxxx_xxx_xxxx,xxx_xx_xxx_xxxx,xxx_xxxx_xxx_xxxx,xxx_xx_xxxx_xxxx,xxx_xxx_xxxx,xxx_xxx_xxxx"
746 " xxxx=xxx | xxxxxx -x xxxxxxxx -x xxxxxxxx -x"
755 "xxx xxxxxx xxx xxxxxxxxx.xx xx xxxxxxxx. xxx xxxxxxxxxxxxx.xx"
757 + "xx xxxxxx xxxxxx xxxxxx xx xxxxxxx xxx xxx ${0} xx x xxxxxxxx xxxxx"
758 .xxxxxx(xxxxxx_xxxxxx_xxx)
766 "xxxxxxxxxxxxxxx": xxxxxx_xxxxx_xxxx,
767 # 'xxxxxxxxxxxxxxxxxxxxxxx'
768 # 'xxxxxxxxxxxxxxxxxxxxxx'
769 # 'xxxxxxxxxxxxxxxxxx'
770 # 'xxxxxxxxxxxxxxxxx'
771 "xxxxxxxxxx": xxxxx_xxxxx,
776 def xxxx_xxx_xx_xxxxxxxxxx_xxxx_xxxxxxxxx(xxxx):
783 xxxxxx={"xxxxxx 1": xxxxxx(xxxx="xxxxxx 1", xxxxxx=600.0)},
784 xxxxxxxx_xxxxxxx=0.0,
791 xxxxxx={"xxxxxx 1": xxxxxx(xxxx="xxxxxx 1", xxxxxx=200.0)},
792 xxxxxxxx_xxxxxxx=0.0,
804 " xxxxx3xxxx1xx2xxxxxxxxxxxxxx0xx6xxxxxxxxxx2xxxxxx9xxxxxxxxxx0xxxxx1xxx2x/xx9xx6+x+xxxxxxxxxxxxxx4xxxxxxxxxxxxxxxxxxxxx43xxx2xx2x4x++xxx6xxxxxxxxx+xxxxx/xx9x+xxxxxxxxxxxxxx8x15xxxxxxxxxxxxxxxxx82xx/xxxxxxxxxxxxxx/x5xxxxxxxxxxxxxx6xxxxxx74x4/xxx4x+xxxxxxxxx2xxxxxxxx87xxxxx4xxxxxxxx3xx0xxxxx4xxx1xx9xx5xxxxxxx/xxxxx5xx6xx4xxxx1x/x2xxxxxxxxxxxx64xxxxxxx1x0xx5xxxxxxxxxxxxxx=="
805 " xxxxx000 xxxxxxxxxx\n"
809 " xxxxx3xxxx1xx2xxxxxxxxxxxxxx6xxxxxxxxxxxxxx9xxxxxxxxxxxxx3xxx9xxxxxxxxxxxxxxxx0xxxxxxxxxxxxxxxxx2xxxx2xxx6xxxxx/xx54xxxxxxxxx4xxx3xxxxxx9xx3xxxxx39xxxxxxxxx5xx91xxxx7xxxxxx8xxxxxxxxxxxxxxxx9xxx93xxxxxxxxxxxxxxxxx7xxx8xx8xx4/x1xxxxx1x3xxxxxxxxxxxxx3xxxxxx9xx4xx4x7xxxxxxxxxxxxx1xxxxxxxxx7xxxxxxxxxxxxxx4xx6xxxxxxxxx9xxx7xxxx2xxxxxxxxxxxxxxxxxxxxxx8xxxxxxxxxxxxxxxxxxxx6xx=="
810 " xxxxx010 xxxxxxxxxx\n"
816 " xxxxx3xxxx1xx2xxxxxxxxxxxxxx0xx6xxxxxxxxxx2xxxxxx9xxxxxxxxxx0xxxxx1xxx2x/xx9xx6+x+xxxxxxxxxxxxxx4xxxxxxxxxxxxxxxxxxxxx43xxx2xx2x4x++xxx6xxxxxxxxx+xxxxx/xx9x+xxxxxxxxxxxxxx8x15xxxxxxxxxxxxxxxxx82xx/xxxxxxxxxxxxxx/x5xxxxxxxxxxxxxx6xxxxxx74x4/xxx4x+xxxxxxxxx2xxxxxxxx87xxxxx4xxxxxxxx3xx0xxxxx4xxx1xx9xx5xxxxxxx/xxxxx5xx6xx4xxxx1x/x2xxxxxxxxxxxx64xxxxxxx1x0xx5xxxxxxxxxxxxxx=="
817 " xxxxx000 xxxxxxxxxx\n"
821 " xxxxx3xxxx1xx2xxxxxxxxxxxxxx6xxxxxxxxxxxxxx9xxxxxxxxxxxxx3xxx9xxxxxxxxxxxxxxxx0xxxxxxxxxxxxxxxxx2xxxx2xxx6xxxxx/xx54xxxxxxxxx4xxx3xxxxxx9xx3xxxxx39xxxxxxxxx5xx91xxxx7xxxxxx8xxxxxxxxxxxxxxxx9xxx93xxxxxxxxxxxxxxxxx7xxx8xx8xx4/x1xxxxx1x3xxxxxxxxxxxxx3xxxxxx9xx4xx4x7xxxxxxxxxxxxx1xxxxxxxxx7xxxxxxxxxxxxxx4xx6xxxxxxxxx9xxx7xxxx2xxxxxxxxxxxxxxxxxxxxxx8xxxxxxxxxxxxxxxxxxxx6xx=="
822 " xxxxx010 xxxxxxxxxx\n"
829 xxx_xxx = ( # xxxx xxxxxxxxxx xxxx xx xxxx xx xxx xxxxxxxx xxxxxx xxxxx.
830 'xxxx xxx xxxxxxxx_xxxx xx "xxxxxxxxxx".\n xxx: xxxxxx xxxxxxxx_xxxx=xxxxxxxxxx'
834 some_tuple = ("some string", "some string which should be joined")
836 some_commented_string = ( # This comment gets thrown to the top.
837 "This string is long but not so long that it needs hahahah toooooo be so greatttt"
838 " {} that I just can't think of any more good words to say about it at"
839 " allllllllllll".format("ha") # comments here are fine
842 some_commented_string = (
843 "This string is long but not so long that it needs hahahah toooooo be so greatttt" # But these
844 " {} that I just can't think of any more good words to say about it at" # comments will stay
845 " allllllllllll".format("ha") # comments here are fine
848 lpar_and_rpar_have_comments = func_call( # LPAR Comment
849 "Long really ridiculous type of string that shouldn't really even exist at all. I"
850 " mean commmme onnn!!!", # Comma Comment
854 "sudo -E deluge-console info --detailed --sort-reverse=time_added "
855 f"{'' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
859 "sudo -E deluge-console info --detailed --sort-reverse=time_added"
860 f" {'' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
864 "sudo -E deluge-console info --detailed --sort-reverse=time_added"
865 f" {'{{}}' if ID is None else ID} | perl -nE 'print if /^{field}:/'"
869 "sudo -E deluge-console info --detailed --sort-reverse=time_added {'' if ID is"
870 f" None else ID}} | perl -nE 'print if /^{field}:/'"
874 "This string really doesn't need to be an {{fstring}}, but this one most"
875 f" certainly, absolutely {does}."
878 fstring = f"We have to remember to escape {braces}. Like {{these}}. But not {this}."
885 f"This string ({string_leaf.value}) appears to be pointless (i.e. has"
891 user_regex = _lazy_re_compile(
892 r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*\Z" # dot-atom
893 r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"\Z)', # quoted-string
899 user_regex = _lazy_re_compile(
900 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # dot-atom
901 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", # quoted-string
907 user_regex = _lazy_re_compile(
908 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # dot-atom
909 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", # quoted-string
917 if not hasattr(module, name):
919 "Could not find object %s in %s.\n"
920 "Please note that you cannot serialize things like inner "
921 "classes. Please move the object into the main module "
922 "body to use migrations.\n"
923 "For more information, see "
924 "https://docs.djangoproject.com/en/%s/topics/migrations/#serializing-values"
925 % (name, module_name, get_docs_version())
932 if not hasattr(module, name):
934 "Could not find object %s in %s.\nPlease note that you cannot"
935 " serialize things like inner classes. Please move the object into"
936 " the main module body to use migrations.\nFor more information,"
937 " see https://docs.djangoproject.com/en/%s/topics/migrations/#serializing-values"
938 % (name, module_name, get_docs_version())
943 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
944 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
945 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
946 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
950 class Step(StepBase):
953 "SR AAAA-CORRECT NAME IS {last_name} {first_name}{middle_name}"
954 " {title}/P{passenger_association}".format(
956 first_name=first_name,
957 middle_name=middle_name,
959 passenger_association=passenger_association,
964 xxxxxxx_xxxxxx_xxxxxxx = xxx(
968 '((x.aaaaaaaaa = "xxxxxx.xxxxxxxxxxxxxxxxxxxxx") || (x.xxxxxxxxx ='
969 ' "xxxxxxxxxxxx")) && '
970 # xxxxx xxxxxxxxxxxx xxxx xxx (xxxxxxxxxxxxxxxx) xx x xxxxxxxxx xx xxxxxx.
971 "(x.bbbbbbbbbbbb.xxx != "
972 '"xxx:xxx:xxx::cccccccccccc:xxxxxxx-xxxx/xxxxxxxxxxx/xxxxxxxxxxxxxxxxx") && '
978 if __name__ == "__main__":
979 for i in range(4, 8):
981 r"for pid in $(ps aux | grep paster | grep -v grep | grep '\-%d' | awk"
982 r" '{print $2}'); do kill $pid; done" % (i)
994 c_float(val[0][0] / val[0][1]).value
995 == c_float(value[0][0] / value[0][1]).value
996 ), "%s didn't roundtrip" % tag
999 class xxxxxxxxxxxxxxxxxxxxx(xxxx.xxxxxxxxxxxxx):
1000 def xxxxxxx_xxxxxx(xxxx):
1001 assert xxxxxxx_xxxx in [
1002 x.xxxxx.xxxxxx.xxxxx.xxxxxx,
1003 x.xxxxx.xxxxxx.xxxxx.xxxx,
1005 "xxxxxxxxxxx xxxxxxx xxxx (xxxxxx xxxx) %x xxx xxxxx" % xxxxxxx_xxxx
1009 value.__dict__[key] = (
1010 "test" # set some Thrift field to non-None in the struct aa bb cc dd ee
1013 RE_ONE_BACKSLASH = {
1014 "asdf_hjkl_jkl": re.compile(
1015 r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
1019 RE_TWO_BACKSLASHES = {
1020 "asdf_hjkl_jkl": re.compile(
1021 r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\\"
1022 r" )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
1026 RE_THREE_BACKSLASHES = {
1027 "asdf_hjkl_jkl": re.compile(
1028 r"(?<!([0-9]\ ))(?<=(^|\ ))([A-Z]+(\ )?|[0-9](\ )|[a-z](\\\ )){4,7}([A-Z]|[0-9]|[a-z])($|\b)(?!(\ ?([0-9]\ )|(\.)))"
1032 # We do NOT split on f-string expressions.
1034 "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam."
1035 f" {[f'{i}' for i in range(10)]}"
1038 "This is a long string which contains an f-expr that should not split"
1039 f" {{{[i for i in range(5)]}}}."
1042 # The parens should NOT be removed in this case.
1044 "my very long string that should get formatted if I'm careful to make sure it goes"
1045 " over 88 characters which it has now"
1048 # The parens should NOT be removed in this case.
1050 "my very long string that should get formatted if I'm careful to make sure it goes"
1051 " over 88 characters which it has now"
1054 # The parens should NOT be removed in this case.
1056 "my very long string"
1057 " that should get formatted"
1058 " if I'm careful to make sure"
1059 " it goes over 88 characters which"
1064 def _legacy_listen_examples():
1066 " \"listen for the '%(event_name)s' event\"\n"
1067 "\n # ... (event logic logic logic) ...\n"
1075 async def foo(self):
1077 for candidate in CANDIDATES:
1079 "**{candidate.object_type} {candidate.rev}**"
1080 " - {candidate.description}\n"
1085 f"{f'{humanize_number(pos)}.': <{pound_len+2}} "
1086 f"{balance: <{bal_len + 5}} "
1087 f"<<{author.display_name}>>\n"
1092 == "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
1093 "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
1094 "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
1098 != "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
1099 "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
1100 "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
1104 <= "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
1105 "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
1106 "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
1110 >= "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
1111 "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
1112 "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
1116 < "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
1117 "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
1118 "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
1122 > "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', "
1123 "'grykangaroo$', 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', "
1124 "'o$', 'oo$', 'roo$', 'rykangaroo$', 'ykangaroo$']"
1128 in "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', 'grykangaroo$',"
1129 " 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', 'o$', 'oo$', 'roo$', 'rykangaroo$',"
1134 not in "['$', 'angaroo$', 'angrykangaroo$', 'aroo$', 'garoo$', 'grykangaroo$',"
1135 " 'kangaroo$', 'ngaroo$', 'ngrykangaroo$', 'o$', 'oo$', 'roo$',"
1136 " 'rykangaroo$', 'ykangaroo$']"
1139 f"1. Go to Google Developers Console and log in with your Google account."
1140 f"(https://console.developers.google.com/)"
1141 f"2. You should be prompted to create a new project (name does not matter)."
1142 f"3. Click on Enable APIs and Services at the top."
1143 f"4. In the list of APIs choose or search for YouTube Data API v3 and "
1144 f"click on it. Choose Enable."
1145 f"5. Click on Credentials on the left navigation bar."
1146 f"6. Click on Create Credential at the top."
1147 f'7. At the top click the link for "API key".'
1148 f"8. No application restrictions are needed. Click Create at the bottom."
1149 f"9. You now have a key to add to `{{prefix}}set api youtube api_key`"
1152 f"1. Go to Google Developers Console and log in with your Google account."
1153 f"(https://console.developers.google.com/)"
1154 f"2. You should be prompted to create a new project (name does not matter)."
1155 f"3. Click on Enable APIs and Services at the top."
1156 f"4. In the list of APIs choose or search for YouTube Data API v3 and "
1157 f"click on it. Choose Enable."
1158 f"5. Click on Credentials on the left navigation bar."
1159 f"6. Click on Create Credential at the top."
1160 f'7. At the top click the link for "API key".'
1161 f"8. No application restrictions are needed. Click Create at the bottom."
1162 f"9. You now have a key to add to `{{prefix}}set api youtube api_key`"
1165 "1. Go to Google Developers Console and log in with your Google account."
1166 "(https://console.developers.google.com/)"
1167 "2. You should be prompted to create a new project (name does not matter)."
1168 "3. Click on Enable APIs and Services at the top."
1169 "4. In the list of APIs choose or search for YouTube Data API v3 and "
1170 "click on it. Choose Enable."
1171 "5. Click on Credentials on the left navigation bar."
1172 "6. Click on Create Credential at the top."
1173 '7. At the top click the link for "API key".'
1174 "8. No application restrictions are needed. Click Create at the bottom."
1175 f"9. You now have a key to add to `{prefix}set api youtube api_key`"
1178 # It shouldn't matter if the string prefixes are capitalized.
1180 f"{F'{humanize_number(pos)}.': <{pound_len+2}} "
1181 f"{balance: <{bal_len + 5}} "
1182 f"<<{author.display_name}>>\n"
1185 fstring = f"We have to remember to escape {braces}. Like {{these}}. But not {this}."
1187 welcome_to_programming = R"hello," R" world!"
1190 f"f-strings definitely make things more {difficult} than they need to be for"
1191 " {black}. But boy they sure are handy. The problem is that some lines will need"
1192 f" to have the 'f' whereas others do not. This {line}, for example, needs one."
1196 "This is a long string which contains an f-expr that should not split"
1197 f" {{{[i for i in range(5)]}}}."
1201 "\N{BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE VERTICAL BAR}\N{VARIATION SELECTOR-16}"
1204 xxxxxx_xxx_xxxx_xx_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxx_xxxx_xxxxx = xxxx.xxxxxx.xxxxxxxxx.xxxxxxxxxxxxxxxxxxxx(
1207 "xxx3_xxxxx_xxxxxxxx_xxxxxxxx_xxxxxxxxxx_xxxxxxxx_xxxxxx_xxxxxxx"
1212 # Regression test for https://github.com/psf/black/issues/3117.
1214 "something_something": (
1215 r"Lorem ipsum dolor sit amet, an sed convenire eloquentiam \t"
1216 r"signiferumque, duo ea vocibus consetetur scriptorem. Facer \t"
1220 # Regression test for https://github.com/psf/black/issues/3459.
1222 empty_str_as_first_split=(
1224 f"xxxxxxx {xxxxxxxxxx} xxx xxxxxxxxxx xxxxx xxx xxx xx "
1225 "xxxxx xxxxxxxxx xxxxxxx, xxx xxxxxxxxxxx xxx xxxxx. "
1226 f"xxxxxxxxxxxxx xxxx xx xxxxxxxxxx. xxxxx: {x.xxx}"
1228 empty_u_str_as_first_split=(
1230 f"xxxxxxx {xxxxxxxxxx} xxx xxxxxxxxxx xxxxx xxx xxx xx "
1231 "xxxxx xxxxxxxxx xxxxxxx, xxx xxxxxxxxxxx xxx xxxxx. "
1232 f"xxxxxxxxxxxxx xxxx xx xxxxxxxxxx. xxxxx: {x.xxx}"
1236 # Regression test for https://github.com/psf/black/issues/3455.
1238 "/this/is/a/very/very/very/very/very/very/very/very/very/very/long/key/without/spaces":
1239 # And there is a comment before the value
1240 ("item1", "item2", "item3"),
1243 # Regression test for https://github.com/psf/black/issues/3506.
1244 s = f"With single quote: ' {my_dict['foo']} With double quote: \" {my_dict['bar']}"
1247 "Lorem Ipsum is simply dummy text of the printing and typesetting"
1248 f" industry:'{my_dict['foo']}'"