Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (wcxve#49)
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.4.1 → v0.4.2](astral-sh/ruff-pre-commit@v0.4.1...v0.4.2)
- [github.com/astral-sh/ruff-pre-commit: v0.4.1 → v0.4.2](astral-sh/ruff-pre-commit@v0.4.1...v0.4.2)

* fix: code style

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: xuewc <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and wcxve authored Apr 30, 2024
1 parent cdb8a8c commit c165670
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ repos:
- id: end-of-file-fixer
exclude_types: [json, binary]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.1"
rev: "v0.4.2"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.1"
rev: "v0.4.2"
hooks:
- id: ruff-format
- repo: https://github.com/kynan/nbstripout
Expand Down
4 changes: 2 additions & 2 deletions src/elisa/models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ def __new__(metacls, name, bases, dct, **kwargs) -> ComponentMeta:
]
sig1 += ['latex: str | None = None']

params = '{%s}' % ', '.join(f"'{i[0]}': {i[0]}" for i in config)
params = '{' + ', '.join(f"'{i[0]}': {i[0]}" for i in config) + '}'

# signature of super().__init__ method
sig2 = [f'params={params}', 'latex=latex']
Expand Down Expand Up @@ -1064,7 +1064,7 @@ def __init__(self, params: dict, latex: str | None):
self._id = hex(id(self))[2:]

if latex is None:
latex = r'\mathrm{%s}' % self.__class__.__name__
latex = rf'\mathrm{{{self.__class__.__name__}}}'
self.latex = latex

self._name = self.__class__.__name__
Expand Down

0 comments on commit c165670

Please sign in to comment.