Skip to content

Commit

Permalink
Prohibit commented code (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
KapJI committed Feb 22, 2021
1 parent 64eaea6 commit 04051cd
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 9 deletions.
30 changes: 29 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -43,6 +43,7 @@ flake8-bugbear = "^20.11.1"
flake8-use-fstring = "^1.1"
flake8-copyright = "^0.2.2"
vulture = "^2.3"
flake8-eradicate = "^1.0.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
7 changes: 2 additions & 5 deletions src/pathpicker/output.py
Expand Up @@ -35,14 +35,11 @@ def exec_composed_command(command: str, line_objs: List[LineMatch]) -> None:
edit_files(line_objs)
return

# decoded_command = command if isinstance(command, str) else command.decode()
decoded_command = command

logger.add_event("command_on_num_files", len(line_objs))
decoded_command = compose_command(decoded_command, line_objs)
command = compose_command(command, line_objs)
append_alias_expansion()
append_if_invalid(line_objs)
append_friendly_command(decoded_command)
append_friendly_command(command)
append_exit()


Expand Down
2 changes: 1 addition & 1 deletion src/tests/lib/curses_api.py
Expand Up @@ -13,7 +13,7 @@ class CursesForTest(CursesApiBase):
def __init__(self) -> None:
self.color_pairs = {}
self.current_color = (0, 0)
# the (0, 0) is hardcoded
# The (0, 0) is hardcoded.
self.color_pairs[0] = self.current_color

def use_default_colors(self) -> None:
Expand Down
3 changes: 1 addition & 2 deletions src/tests/test_parsing.py
Expand Up @@ -35,8 +35,7 @@ class ParsingTestCase(NamedTuple):
ParsingTestCase(".ssh/.gitignore", True, ".ssh/.gitignore"),
# For now, don't worry about matching the following case perfectly,
# simply because it's complicated.
# 'input': '~/.ssh/known_hosts',
# 'match': True,
# '~/.ssh/known_hosts', True, '~/.ssh/known_hosts'
ParsingTestCase(".ssh/known_hosts", True, ".ssh/known_hosts"),
# Arbitrarily ignore really short dot filenames
ParsingTestCase(".a", False),
Expand Down

0 comments on commit 04051cd

Please sign in to comment.