Skip to content

Commit 6e9a4f2

Browse files
authored
Merge pull request #55 from olehermanse/continuation
cfengine format: Refactored code, added type hints and docstrings, expanded tests, and fixed small issues
2 parents a61cdd5 + 08d626b commit 6e9a4f2

File tree

7 files changed

+1369
-304
lines changed

7 files changed

+1369
-304
lines changed

src/cfengine_cli/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def deploy() -> int:
5050
return r
5151

5252

53-
def _format_filename(filename, line_length, check):
53+
def _format_filename(filename: str, line_length: int, check: bool) -> int:
5454
if filename.startswith("./."):
5555
return 0
5656
if filename.endswith(".json"):
@@ -60,7 +60,7 @@ def _format_filename(filename, line_length, check):
6060
raise UserError(f"Unrecognized file format: {filename}")
6161

6262

63-
def _format_dirname(directory, line_length, check):
63+
def _format_dirname(directory: str, line_length: int, check: bool) -> int:
6464
ret = 0
6565
for filename in find(directory, extension=".json"):
6666
ret |= _format_filename(filename, line_length, check)

0 commit comments

Comments
 (0)