Skip to content

Commit

Permalink
Merge pull request #92 from WilliamJamieson/feature/use_flynt
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Apr 18, 2023
2 parents cfe96d7 + 6b01759 commit c8f61b1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
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

0 comments on commit c8f61b1

Please sign in to comment.