Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Formatting is not preserved #7

Closed
jugmac00 opened this issue Jan 15, 2022 · 1 comment · Fixed by #11
Closed

Formatting is not preserved #7

jugmac00 opened this issue Jan 15, 2022 · 1 comment · Fixed by #11

Comments

@jugmac00
Copy link

-        self.assertTrue(
-            "Rejected:\n"
-            "Launchpad failed to process the upload path '~name16/ubuntu':\n\n"
-            "unicode PPA name: áří is disabled.\n\n"
-            "It is likely that you have a configuration problem with "
-            "dput/dupload.\n"
-            "Please check the documentation at "
-            "https://help.launchpad.net/Packaging/PPA/Uploading and update "
-            "your configuration.\n\n"
-            "Further error processing not possible because of a critical "
-            "previous error." in body)
+        self.assertIn(
+            "Rejected:\nLaunchpad failed to process the upload path '~name16/ubuntu':\n\nunicode PPA name: áří is disabled.\n\nIt is likely that you have a configuration problem with dput/dupload.\nPlease check the documentation at https://help.launchpad.net/Packaging/PPA/Uploading and update your configuration.\n\nFurther error processing not possible because of a critical previous error.",
+            body
+        )

Using pre-commit, applying black after teyit would probably fix this, though.

@isidentical
Copy link
Owner

Thanks for the report @jugmac00. We have an internal sanity check that ensures that the retrieved part of the call argument (in this case the long string) is a valid python code as is, but seems like that was broken for indented multi-line expressions such as implicit string concatenation. I've now fixed it at the refactor, isidentical/refactor#19. And will bump the bundled refactor version at teyit.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants