Skip to content

Commit f179610

Browse files
committed
run pre-commit on code
1 parent a3f7ec3 commit f179610

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

tests/test_helpers.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import pytest
2-
31
from tests.helpers import check_existence_of_output_csv_file_and_compare_with_gold_standard
4-
52
from tests.paths import DIR_WITH_TEST_FILES
63
from tinybear.csv_xls import write_csv
74

tests/test_json_toml_yaml.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22

33
from tests.paths import DIR_WITH_TEST_FILES
44
from tinybear.exceptions import ParsingError
5-
from tinybear.json_toml_yaml import (
6-
check_yaml_file,
7-
read_json_toml_yaml,
8-
)
5+
from tinybear.json_toml_yaml import check_yaml_file, read_json_toml_yaml
96

107

118
def test_check_yaml_file_passes_with_valid_data():

tinybear/_paths.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from pathlib import Path
22

3-
DEFAULT_INPUT_DIR = Path('..') / 'input'
3+
DEFAULT_INPUT_DIR = Path("..") / "input"
44

5-
DEFAULT_OUTPUT_DIR = Path('..') / 'output'
5+
DEFAULT_OUTPUT_DIR = Path("..") / "output"
66
if not DEFAULT_OUTPUT_DIR.exists():
77
DEFAULT_OUTPUT_DIR.mkdir()

tinybear/docx.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import mammoth
55

6-
from tinybear._paths import DEFAULT_OUTPUT_DIR, DEFAULT_INPUT_DIR
6+
from tinybear._paths import DEFAULT_INPUT_DIR, DEFAULT_OUTPUT_DIR
77

88
logging.basicConfig(level=logging.INFO)
99

@@ -19,7 +19,9 @@
1919
"""
2020

2121

22-
def convert_one_to_html(path_to_file: Path, output_dir: Path = DEFAULT_OUTPUT_DIR, print_html: bool = True) -> Path:
22+
def convert_one_to_html(
23+
path_to_file: Path, output_dir: Path = DEFAULT_OUTPUT_DIR, print_html: bool = True
24+
) -> Path:
2325

2426
with path_to_file.open(mode="rb") as docx_file:
2527
result = mammoth.convert_to_html(docx_file, style_map=STYLE_MAP)
@@ -36,11 +38,15 @@ def convert_one_to_html(path_to_file: Path, output_dir: Path = DEFAULT_OUTPUT_DI
3638
return output_path
3739

3840

39-
def convert_all(input_dir: Path = DEFAULT_INPUT_DIR, output_dir: Path = DEFAULT_OUTPUT_DIR, print_html: bool = True) -> None:
41+
def convert_all(
42+
input_dir: Path = DEFAULT_INPUT_DIR,
43+
output_dir: Path = DEFAULT_OUTPUT_DIR,
44+
print_html: bool = True,
45+
) -> None:
4046
for file in input_dir.glob("*.doc*"):
4147
logging.info(f"Converting {file.name}")
4248
convert_one_to_html(path_to_file=file, output_dir=output_dir, print_html=print_html)
4349

4450

45-
if __name__ == '__main__':
51+
if __name__ == "__main__":
4652
convert_all()

0 commit comments

Comments
 (0)