Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

CI: consider using black-only for format checking #661

Closed
karlch opened this issue Jul 12, 2023 · 0 comments · Fixed by #662
Closed

CI: consider using black-only for format checking #661

karlch opened this issue Jul 12, 2023 · 0 comments · Fixed by #662

Comments

@karlch
Copy link
Owner

karlch commented Jul 12, 2023

After merging #660, I noticed that black (in my pre-commit) still produced a diff, although pylint did not complain.

For consistency, it would be better to only use black for formatting, and disable all related pylint checks and possibly even remove pycodestyle.

Useful command:

black --check --diff

Sample output:

@@ -323,11 +323,11 @@

     ORDER_TYPES: Dict[str, Callable[..., Any]] = {
         "alphabetical": str,
         "natural": natural_sort,
         "recently-modified": os.path.getmtime,
-        "none": lambda x: 0
+        "none": lambda x: 0,
     }

     STR_ORDER_TYPES = "alphabetical", "natural"

     def __init__(
@@ -471,11 +471,11 @@

     size = ThumbnailSizeSetting("thumbnail.size", 128, desc="Size of thumbnails")
     save = BoolSetting(
         "thumbnail.save",
         True,
-        desc="Save new thumbnails to the disk in the shared icon cache for later use"
+        desc="Save new thumbnails to the disk in the shared icon cache for later use",
     )


 class slideshow:  # pylint: disable=invalid-name
     """Namespace for slideshow related settings."""
would reformat ~/Coding/VimivQt/vimiv/api/settings.py

Oh no! 💥 💔 💥
1 file would be reformatted, 92 files would be left unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant