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

Apply flynt #92

Merged
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
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ repos:
additional_dependencies:
- tomli

- repo: https://github.com/ikamensh/flynt/
rev: '0.78'
hooks:
- id: flynt
exclude: "src/stpipe/extern/.*"

- repo: https://github.com/asottile/pyupgrade
rev: 'v3.3.1'
hooks:
Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Add spell checking through the ``codespell`` tool. [#81]
- Drop support for Python 3.8 [#93]
- Remove ``stdatamodels`` dependency, as it is no longer used. [#91]
- Add ``flynt`` string update checking tool. [#92]

0.4.6 (2023-03-27)
==================
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ force-exclude = '''
)
'''

[tool.flynt]
exclude = ["src/stpipe/extern/*"]

[tool.codespell]
skip="*.pdf,*.fits,*.asdf,.tox,build,./tags,.git,docs/_build"
# ignore-words-list="""
Expand Down
8 changes: 3 additions & 5 deletions tests/test_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ def clean_up_logging():
def test_configuration(tmpdir):
logfilename = tmpdir.join("output.log")

configuration = """
configuration = f"""
[.]
handler = file:{}
handler = file:{logfilename}
break_level = ERROR
level = WARNING
format = '%(message)s'
""".format(
logfilename
)
"""

fd = io.StringIO()
fd.write(configuration)
Expand Down