Skip to content

Commit

Permalink
chore: switch to ruff-format (#663)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii authored Nov 1, 2023
1 parent fe7752f commit 00696f8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
6 changes: 1 addition & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,12 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace

- repo: https://github.com/psf/black-pre-commit-mirror
rev: "23.10.1"
hooks:
- id: black

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.3"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.6.1"
Expand Down
1 change: 1 addition & 0 deletions plumbum/cli/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def show_pil_double(self, im):

class ShowImageApp(cli.Application):
"Display an image on the terminal"

double = cli.Flag(
["-d", "--double"], help="Double resolution (looks good only with some fonts)"
)
Expand Down
3 changes: 2 additions & 1 deletion plumbum/cli/switches.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ def __init__(
argname=VALUE,
**kwargs,
):
self.__doc__ = "Sets an attribute" # to prevent the help message from showing SwitchAttr's docstring
# Setting to prevent the help message from showing SwitchAttr's docstring
self.__doc__ = "Sets an attribute"
if default and argtype is not None:
defaultmsg = _("; the default is {0}").format(default)
if "help" in kwargs:
Expand Down
4 changes: 1 addition & 3 deletions plumbum/typed_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ class CSV(_BaseVar):
a list of objects of type ``type`` (``str`` by default).
"""

def __init__(
self, name, default=NO_DEFAULT, type=str, separator=","
): # pylint:disable=redefined-builtin
def __init__(self, name, default=NO_DEFAULT, type=str, separator=","): # pylint:disable=redefined-builtin
super().__init__(name, default=default)
self.type = type
self.separator = separator
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ ignore = [
"PT004",
"PT011", # TODO: add match parameter
"RUF012", # ClassVar required if mutable
"ISC001", # conflicts with formatter
]
flake8-unused-arguments.ignore-variadic-names = true

Expand Down

0 comments on commit 00696f8

Please sign in to comment.