Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#229)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.7 → v0.6.1](astral-sh/ruff-pre-commit@v0.5.7...v0.6.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Ruff ignore stata

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Richard Preen <rpreen@gmail.com>
  • Loading branch information
pre-commit-ci[bot] and rpreen authored Aug 20, 2024
1 parent 0f72525 commit 501a647
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ repos:

# Ruff, the Python auto-correcting linter/formatter written in Rust
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
rev: v0.6.1
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand Down
7 changes: 3 additions & 4 deletions notebooks/acro_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
"outputs": [],
"source": [
"import os\n",
"import sys\n",
"import pandas as pd\n",
"import numpy as np"
"\n",
"import pandas as pd"
]
},
{
Expand All @@ -36,7 +35,7 @@
"metadata": {},
"outputs": [],
"source": [
"from acro import ACRO, add_constant, add_to_acro"
"from acro import ACRO"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions notebooks/acro_demo_v2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"outputs": [],
"source": [
"import os\n",
"import sys\n",
"import pandas as pd\n",
"import numpy as np"
"\n",
"import numpy as np\n",
"import pandas as pd"
]
},
{
Expand All @@ -36,7 +36,7 @@
"metadata": {},
"outputs": [],
"source": [
"from acro import ACRO, add_constant, add_to_acro"
"from acro import ACRO"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions notebooks/test-nursery.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"outputs": [],
"source": [
"import os\n",
"import sys\n",
"import pandas as pd\n",
"import numpy as np"
"\n",
"import numpy as np\n",
"import pandas as pd"
]
},
{
Expand Down
7 changes: 4 additions & 3 deletions notebooks/test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
"source": [
"import os\n",
"import sys\n",
"import pandas as pd\n",
"import numpy as np"
"\n",
"import numpy as np\n",
"import pandas as pd"
]
},
{
Expand All @@ -47,7 +48,7 @@
},
"outputs": [],
"source": [
"from acro import ACRO, acro_tables, add_constant, utils"
"from acro import ACRO, add_constant, utils"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ lint.select = [

exclude = [
"__init__.py",
"stata/*",
]

lint.ignore = [
Expand Down
12 changes: 6 additions & 6 deletions stata/test_stata_acro_ado.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
}
],
"source": [
"import acro\n",
"from acro import utils\n",
"from acro import stata_config\n",
"import pandas as pd\n",
"from acro import acro_stata_parser\n",
"from importlib import reload\n",
"\n",
"import pandas as pd\n",
"import pytest\n",
"\n",
"import acro\n",
"from acro import acro_stata_parser, stata_config\n",
"\n",
"reload(acro_stata_parser)"
]
},
Expand Down Expand Up @@ -644,7 +644,7 @@
"outputs": [],
"source": [
"def test_stata_exclusion_in_context(mydata):\n",
" \"\"\"tests that the subsetting code gets called properly from table handler\"\"\"\n",
" \"\"\"Tests that the subsetting code gets called properly from table handler\"\"\"\n",
" # if condition\n",
" correct1 = (\n",
" \"------------------|\\n\"\n",
Expand Down
4 changes: 2 additions & 2 deletions test/test_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
PATH: str = "RES_PYTEST"


@pytest.fixture()
@pytest.fixture
def data() -> pd.DataFrame:
"""Load test data."""
path = os.path.join("data", "test_data.dta")
data = pd.read_stata(path)
return data


@pytest.fixture()
@pytest.fixture
def acro() -> ACRO:
"""Initialise ACRO."""
return ACRO(suppress=True)
Expand Down
2 changes: 1 addition & 1 deletion test/test_stata17_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# return ACRO()


@pytest.fixture()
@pytest.fixture
def data() -> pd.DataFrame:
"""Load test data."""
path = os.path.join("data", "test_data.dta")
Expand Down
2 changes: 1 addition & 1 deletion test/test_stata_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# return ACRO()


@pytest.fixture()
@pytest.fixture
def data() -> pd.DataFrame:
"""Load test data."""
path = os.path.join("data", "test_data.dta")
Expand Down

0 comments on commit 501a647

Please sign in to comment.