Skip to content

Commit

Permalink
Add pep-8 naming ruff rule and make related fix
Browse files Browse the repository at this point in the history
  • Loading branch information
goodmami committed Nov 14, 2023
1 parent 1d2e8e0 commit af3b91f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions penman/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,25 +119,25 @@ def _check(g, model):
return 0


def _order_funcs(KEY_FUNCS):
def _order_funcs(key_funcs):

def split_arg(arg):
values = arg.split(',')
for value in values:
if value not in KEY_FUNCS:
if value not in key_funcs:
raise argparse.ArgumentTypeError(
'invalid choice: {!r} (choose from {})'
.format(value, ', '.join(map(repr, KEY_FUNCS))))
.format(value, ', '.join(map(repr, key_funcs))))
return values

return split_arg


def _make_sort_key(keys, model, KEY_FUNCS):
def _make_sort_key(keys, model, key_funcs):
kwargs = {}
funcs = []
for key in keys:
name = KEY_FUNCS[key]
name = key_funcs[key]
func = getattr(model, name, None)
if func is None:
kwargs[name] = True
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ select = [
"E", # pycodestyle errors
"I", # isort
"F", # Pyflakes
"N", # PEP-8 naming
"W", # pycodestyle warnings
]

Expand Down

0 comments on commit af3b91f

Please sign in to comment.