Skip to content

Commit

Permalink
Fix running CLI with join column for target data (#356)
Browse files Browse the repository at this point in the history
* Fix running CLI with join column for target data

* Pin pytest version to fix tox tests

* Ignore E704 errors raised by flake8 all of a sudden...

---------

Co-authored-by: Niels Nuyttens <[email protected]>
  • Loading branch information
michael-nml and nnansters authored Feb 2, 2024
1 parent 2af5e7b commit 718a898
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nannyml/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,6 @@ def _add_targets_to_analysis_data(
analysis_data: pd.DataFrame, target_data: pd.DataFrame, join_column: Optional[str]
) -> pd.DataFrame:
if join_column is not None:
return analysis_data.merge(target_data, on=target_data.join_column)
return analysis_data.merge(target_data, on=join_column)
else:
return analysis_data.join(target_data)
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[flake8]
max-line-length = 120
max-complexity = 18
ignore = E203, E266, W503
ignore = E203, E266, E704, W503
docstring-convention = google
per-file-ignores = __init__.py:F401
exclude = .git,
Expand Down Expand Up @@ -62,7 +62,7 @@ python =
[testenv]
allowlist_externals = pytest
deps =
pytest
pytest==6.2.5
pytest-cov
pytest-mock
pytest-lazy-fixture
Expand Down

0 comments on commit 718a898

Please sign in to comment.