Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ default_stages:

repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.2.0
rev: v4.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
Expand All @@ -31,8 +31,8 @@ repos:
- id: check-yaml
args: ["--unsafe"]

- repo: https://github.com/psf/black
rev: 25.1.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.1.0
hooks:
- id: black
types:
Expand All @@ -46,7 +46,7 @@ repos:
- python

- repo: https://github.com/pycqa/bandit
rev: 1.8.6
rev: 1.9.3
hooks:
- id: bandit
args: ["-ll"]
Expand Down
1 change: 0 additions & 1 deletion hashfields/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from hashfields import csv, hashing, __version__ as version


RESULT_SUCCESS = 0


Expand Down
1 change: 0 additions & 1 deletion pyinstaller_entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

from hashfields.main import main


if __name__ == "__main__":
main()
12 changes: 4 additions & 8 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@

@pytest.fixture
def csv_string_io():
return io.StringIO(
"""one,two,three
return io.StringIO("""one,two,three
1,2,3
a,b,c
true,false,true
2023-01-01,1974-02-28,2034-07-04"""
)
2023-01-01,1974-02-28,2034-07-04""")


@pytest.fixture
Expand All @@ -23,13 +21,11 @@ def csv_dataframe(csv_string_io):

@pytest.fixture
def psv_string_io():
return io.StringIO(
"""one|two|three
return io.StringIO("""one|two|three
1|2|3
a|b|c
true|false|true
2023-01-01|1974-02-28|2034-07-04"""
)
2023-01-01|1974-02-28|2034-07-04""")


@pytest.fixture
Expand Down
12 changes: 4 additions & 8 deletions tests/test_hashfields.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,23 +110,19 @@ def test_hashfields_dedupe(capfd, hashfields, source_file, expected_file):


def test_hashfields_readme(capfd, hashfields):
readme_input = normalize_output(
"""column1,column2,column3,column4
readme_input = normalize_output("""column1,column2,column3,column4
r1c1,r1c2,r1c3,r1c4
r2c1,r2c2,r2c3,r2c4
r3c1,r3c2,r3c3,r3c4
r4c1,r4c2,r4c3,r4c4
"""
).replace("\n", os.linesep)
""").replace("\n", os.linesep)

readme_output = normalize_output(
"""column2,column4
readme_output = normalize_output("""column2,column4
r1c2,fb66e41761a74ea0c042e1c226c04fa2ce1a1334d7063d86230d17f33f109b68
r2c2,6051c006caee661a6ccb390b8cf7a43230c5cd7b54861f7306a598b612f924b9
r3c2,7e32c53b7729f5dce7ac54232b7f2d93d6c78ed19fc8d096b0fde948f513e9dc
r4c2,f8d0624d128daf97c61ec28f4396e8f14be2ca2940d18fdf33e939cda9bd1824
"""
).replace("\n", os.linesep)
""").replace("\n", os.linesep)

subprocess.run(
[hashfields, "--alg", "sha256", "--drop", "column1", "column3", "--skip", "column2"],
Expand Down
Loading