From 910f372c6a51520abc9678ff1408829ff24ad985 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 20:34:10 +0000 Subject: [PATCH 1/9] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v3.2.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v3.2.0...v4.5.0) - [github.com/PyCQA/isort: 5.10.1 → 5.13.2](https://github.com/PyCQA/isort/compare/5.10.1...5.13.2) - [github.com/psf/black: 22.8.0 → 24.3.0](https://github.com/psf/black/compare/22.8.0...24.3.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index babfc0e..298e18c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,16 +1,16 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: v4.5.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/psf/black - rev: 22.8.0 + rev: 24.3.0 hooks: - id: black From 99f45e8d148afc21e78bbb3be34541a0ae994904 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 20:34:17 +0000 Subject: [PATCH 2/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_optimizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py index 32e335c..1c141f0 100644 --- a/tests/test_optimizer.py +++ b/tests/test_optimizer.py @@ -10,7 +10,7 @@ def test_optimize(): assert week == 4 df_opt = ffbot.optimize(df, week, TEAM, POSITIONS) desired_df_opt = """ Add Drop Total points Discounted points VOR -0 Player 200 (WR) +0 Player 200 (WR) 1 1723.27 420.2 515.9 2 Player 221 (TE) 6.11 0.58 -19.01 3 Player 143 (DEF) Player 101 (QB) -10.41 2.33 -16.19 From 4ef306b90f06f54bfc964d3b7a8f50dacca46d85 Mon Sep 17 00:00:00 2001 From: Alex Marvin Date: Mon, 18 Mar 2024 22:54:11 -0500 Subject: [PATCH 3/9] Disables black formatter for desired output to include whitespace --- tests/test_optimizer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py index 1c141f0..b726bcb 100644 --- a/tests/test_optimizer.py +++ b/tests/test_optimizer.py @@ -9,8 +9,9 @@ def test_optimize(): df, week = ffbot.load(SCRAPER_FILE) assert week == 4 df_opt = ffbot.optimize(df, week, TEAM, POSITIONS) + # fmt: off desired_df_opt = """ Add Drop Total points Discounted points VOR -0 Player 200 (WR) +0 Player 200 (WR) 1 1723.27 420.2 515.9 2 Player 221 (TE) 6.11 0.58 -19.01 3 Player 143 (DEF) Player 101 (QB) -10.41 2.33 -16.19 @@ -19,5 +20,6 @@ def test_optimize(): 6 Player 135 (K) Player 59 (RB) 9.26 0.37 -39.68 7 Player 90 (WR) - Waivers (Jan 2) 9.45 3.23 17.22 8 Player 132 (WR) 0.0 0.0 0.0 -9 Player 129 (QB) - Free Agent Player 174 (WR) 14.53 0.85 11.16""" # noqa: W291 +9 Player 129 (QB) - Free Agent Player 174 (WR) 14.53 0.85 11.16""" + # fmt: on assert df_opt.to_string() == desired_df_opt From 4ba740d76be91fe67b7db80bb5b6a74878a0798c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 03:54:19 +0000 Subject: [PATCH 4/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_optimizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py index b726bcb..fe689a2 100644 --- a/tests/test_optimizer.py +++ b/tests/test_optimizer.py @@ -11,7 +11,7 @@ def test_optimize(): df_opt = ffbot.optimize(df, week, TEAM, POSITIONS) # fmt: off desired_df_opt = """ Add Drop Total points Discounted points VOR -0 Player 200 (WR) +0 Player 200 (WR) 1 1723.27 420.2 515.9 2 Player 221 (TE) 6.11 0.58 -19.01 3 Player 143 (DEF) Player 101 (QB) -10.41 2.33 -16.19 From 23deacdc40085ee734e6d3346f3037a77b59d59a Mon Sep 17 00:00:00 2001 From: Alex Marvin Date: Mon, 18 Mar 2024 22:56:34 -0500 Subject: [PATCH 5/9] Re-adds whitespace --- tests/test_optimizer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py index fe689a2..cf81d00 100644 --- a/tests/test_optimizer.py +++ b/tests/test_optimizer.py @@ -11,7 +11,7 @@ def test_optimize(): df_opt = ffbot.optimize(df, week, TEAM, POSITIONS) # fmt: off desired_df_opt = """ Add Drop Total points Discounted points VOR -0 Player 200 (WR) +0 Player 200 (WR) 1 1723.27 420.2 515.9 2 Player 221 (TE) 6.11 0.58 -19.01 3 Player 143 (DEF) Player 101 (QB) -10.41 2.33 -16.19 @@ -20,6 +20,6 @@ def test_optimize(): 6 Player 135 (K) Player 59 (RB) 9.26 0.37 -39.68 7 Player 90 (WR) - Waivers (Jan 2) 9.45 3.23 17.22 8 Player 132 (WR) 0.0 0.0 0.0 -9 Player 129 (QB) - Free Agent Player 174 (WR) 14.53 0.85 11.16""" +9 Player 129 (QB) - Free Agent Player 174 (WR) 14.53 0.85 11.16""" # noqa: W291 # fmt: on assert df_opt.to_string() == desired_df_opt From c0627b9120c9f98adda6abf43a042c9daeb9e684 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 03:56:47 +0000 Subject: [PATCH 6/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_optimizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py index cf81d00..77463d9 100644 --- a/tests/test_optimizer.py +++ b/tests/test_optimizer.py @@ -11,7 +11,7 @@ def test_optimize(): df_opt = ffbot.optimize(df, week, TEAM, POSITIONS) # fmt: off desired_df_opt = """ Add Drop Total points Discounted points VOR -0 Player 200 (WR) +0 Player 200 (WR) 1 1723.27 420.2 515.9 2 Player 221 (TE) 6.11 0.58 -19.01 3 Player 143 (DEF) Player 101 (QB) -10.41 2.33 -16.19 From 1078fa0dd2ac1b249df4884a0a32b8bef3b75856 Mon Sep 17 00:00:00 2001 From: Alex Marvin Date: Mon, 18 Mar 2024 23:09:55 -0500 Subject: [PATCH 7/9] Exclude Python files from pre-commit, as black already removes trailing whitespace --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 298e18c..81b62ea 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,6 +3,7 @@ repos: rev: v4.5.0 hooks: - id: trailing-whitespace + exclude_types: [python] - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files From e8c3bbd8a3b1fdeb89fecb8d61618e3edddeda51 Mon Sep 17 00:00:00 2001 From: Alex Marvin Date: Mon, 18 Mar 2024 23:10:18 -0500 Subject: [PATCH 8/9] Re-adds whitespace --- tests/test_optimizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py index 77463d9..cf81d00 100644 --- a/tests/test_optimizer.py +++ b/tests/test_optimizer.py @@ -11,7 +11,7 @@ def test_optimize(): df_opt = ffbot.optimize(df, week, TEAM, POSITIONS) # fmt: off desired_df_opt = """ Add Drop Total points Discounted points VOR -0 Player 200 (WR) +0 Player 200 (WR) 1 1723.27 420.2 515.9 2 Player 221 (TE) 6.11 0.58 -19.01 3 Player 143 (DEF) Player 101 (QB) -10.41 2.33 -16.19 From 9073bffb70c4ae4015eba1039cfd8d0e067cc09b Mon Sep 17 00:00:00 2001 From: Alex Marvin Date: Mon, 18 Mar 2024 23:11:38 -0500 Subject: [PATCH 9/9] Removes fmt flags, as noqa covers it --- tests/test_optimizer.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py index cf81d00..32e335c 100644 --- a/tests/test_optimizer.py +++ b/tests/test_optimizer.py @@ -9,7 +9,6 @@ def test_optimize(): df, week = ffbot.load(SCRAPER_FILE) assert week == 4 df_opt = ffbot.optimize(df, week, TEAM, POSITIONS) - # fmt: off desired_df_opt = """ Add Drop Total points Discounted points VOR 0 Player 200 (WR) 1 1723.27 420.2 515.9 @@ -21,5 +20,4 @@ def test_optimize(): 7 Player 90 (WR) - Waivers (Jan 2) 9.45 3.23 17.22 8 Player 132 (WR) 0.0 0.0 0.0 9 Player 129 (QB) - Free Agent Player 174 (WR) 14.53 0.85 11.16""" # noqa: W291 - # fmt: on assert df_opt.to_string() == desired_df_opt