Skip to content

Commit

Permalink
Merge pull request #639 from mit-ll-responsible-ai/formatting
Browse files Browse the repository at this point in the history
black 2024 formatting
  • Loading branch information
rsokl authored Jan 27, 2024
2 parents f885daf + 794adff commit 90ed207
Show file tree
Hide file tree
Showing 29 changed files with 220 additions and 372 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[flake8]
extend-ignore = F811,D1,D205,D209,D213,D400,D401,D999,D202,E203,E501,W503,E721,F403,F405
extend-ignore = F811,D1,D205,D209,D213,D400,D401,D999,D202,E203,E501,W503,E721,F403,F405,E701
exclude = .git,__pycache__,docs/*,old,build,dis,tests/annotations/*, tests/test_py310.py
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
repos:
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 24.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ description = Applies auto-flake (e.g. remove unsused imports), black, and isort
skip_install=true
deps =
autoflake
black
isort
black==24.1.0
isort==5.13.2
commands =
autoflake --recursive --in-place --remove-duplicate-keys --remove-unused-variables src/ tests/
isort src/ tests/
Expand All @@ -262,9 +262,9 @@ description = Ensures that source materials code and docs and test suite adhere
formatting and code-quality standards.
skip_install=true
basepython=python3.10
deps=black
isort
flake8
deps=black==24.1.0
isort==5.13.2
flake8==7.0.0
pytest
codespell
commands=
Expand Down
21 changes: 7 additions & 14 deletions src/hydra_zen/_hydra_overloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,41 +48,35 @@ class _TightBind: # pragma: no cover


@overload
def instantiate(config: _TightBind, *args: Any, **kwargs: Any) -> Any:
...
def instantiate(config: _TightBind, *args: Any, **kwargs: Any) -> Any: ...


@overload
def instantiate(
config: InstOrType[ConfigPath], *args: Any, **kwargs: Any
) -> pathlib.Path:
...
) -> pathlib.Path: ...


@overload
def instantiate(
config: InstOrType[ConfigComplex], *args: Any, **kwargs: Any
) -> complex:
...
) -> complex: ...


@overload
def instantiate(config: InstOrType[Just[T]], *args: Any, **kwargs: Any) -> T:
...
def instantiate(config: InstOrType[Just[T]], *args: Any, **kwargs: Any) -> T: ...


@overload
def instantiate(
config: InstOrType[IsPartial[Callable[..., T]]], *args: Any, **kwargs: Any
) -> Partial[T]:
...
) -> Partial[T]: ...


@overload
def instantiate(
config: InstOrType[Builds[Callable[..., T]]], *args: Any, **kwargs: Any
) -> T:
...
) -> T: ...


@overload
Expand All @@ -98,8 +92,7 @@ def instantiate(
],
*args: Any,
**kwargs: Any,
) -> Any:
...
) -> Any: ...


def instantiate(config: Any, *args: Any, **kwargs: Any) -> Any:
Expand Down
6 changes: 2 additions & 4 deletions src/hydra_zen/_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ def launch(
job_name: str = ...,
with_log_configuration: bool = ...,
**override_kwargs: OverrideValues,
) -> JobReturn:
...
) -> JobReturn: ...


@overload
Expand All @@ -188,8 +187,7 @@ def launch(
job_name: str = ...,
with_log_configuration: bool = ...,
**override_kwargs: OverrideValues,
) -> Any:
...
) -> Any: ...


def launch(
Expand Down
Loading

0 comments on commit 90ed207

Please sign in to comment.