Skip to content

Commit

Permalink
[Bot] pre-commit autoupdate (#617)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: huong-li-nguyen <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and huong-li-nguyen authored Aug 7, 2024
1 parent 50f2eb9 commit 6af04a7
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 10 deletions.
11 changes: 7 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ repos:
- id: prettier

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.13.0
rev: v2.14.0
hooks:
- id: pretty-format-toml
args: [--autofix]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.5.6
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black

Expand All @@ -67,6 +67,9 @@ repos:
additional_dependencies: ["bandit[toml]"]

- repo: https://github.com/pre-commit/mirrors-mypy
# Upgrade to v1.11.1 not possible as it doesn't seem compatible with pydantic<2 plugin.
# Similar issue with previous v.1.11.X versions: https://github.com/pydantic/pydantic/issues/10000
# We need to revert the changes from the pre-commit autoupdate for now.
rev: v1.10.1
hooks:
- id: mypy
Expand Down Expand Up @@ -103,7 +106,7 @@ repos:
args: ["--fix"]

- repo: https://github.com/errata-ai/vale
rev: v3.6.0
rev: v3.7.0
hooks:
- id: vale
args: [--config=.vale/.vale.ini]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.
Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨
- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Removed
- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Added
- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Changed
- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Deprecated
- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Fixed
- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Security
- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
2 changes: 1 addition & 1 deletion vizro-ai/src/vizro_ai/_vizro_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _get_chart_code(self, df: pd.DataFrame, user_input: str) -> str:
# TODO retained for some chat application integration, need deprecation handling
return self._run_plot_tasks(df, user_input, explain=False).code

def plot( # pylint: disable=too-many-arguments # noqa: PLR0913
def plot(
self,
df: pd.DataFrame,
user_input: str,
Expand Down
2 changes: 1 addition & 1 deletion vizro-ai/src/vizro_ai/chains/_llm_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def execute_chain(self, input_str: str):
class FunctionCallChain(VizroBaseChain, ABC):
"""LLM Chain with Function Calling."""

def __init__( # noqa: PLR0913
def __init__(
self,
llm: BaseChatModel,
raw_prompt: str,
Expand Down
1 change: 0 additions & 1 deletion vizro-ai/src/vizro_ai/utils/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def _display_markdown(code_snippet: str, biz_insights: str, code_explain: str) -
"""
try:
# pylint: disable=import-outside-toplevel
from IPython.display import Markdown, display
except Exception as exc:
raise ImportError("Please install IPython before proceeding in jupyter environment.") from exc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_instantiation(self):
def setup_method(self, fake_llm):
self.get_visual_code = GetVisualCode(llm=fake_llm)

def test_pre_process(self, chart_type, input_df, df_code_1, df_schema, df_sample): # noqa: PLR0913
def test_pre_process(self, chart_type, input_df, df_code_1, df_schema, df_sample):
_, partial_vars = self.get_visual_code._pre_process(chart_type=chart_type, df_code=df_code_1, df=input_df)
assert partial_vars == {
"chart_type": chart_type,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.
Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨
- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Removed
- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Added
- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Changed
- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Deprecated
- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Fixed
- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Security
- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def test_no_components(self):
],
indirect=True,
)
def test_all_action_loop_components( # pylint: disable=too-many-arguments # noqa: PLR0913
def test_all_action_loop_components(
self,
fundamental_components,
gateway_components,
Expand Down
2 changes: 1 addition & 1 deletion vizro-core/tests/unit/vizro/models/_action/test_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def test_get_callback_mapping_no_inputs_no_outputs(self, identity_action_functio
),
],
)
def test_get_callback_mapping_with_inputs_and_outputs( # pylint: disable=too-many-arguments
def test_get_callback_mapping_with_inputs_and_outputs(
self,
inputs_and_outputs,
identity_action_function,
Expand Down

0 comments on commit 6af04a7

Please sign in to comment.