Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #229

Merged
merged 3 commits into from
Aug 20, 2024
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
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