Skip to content

Commit

Permalink
Converted old string formatting to fstrings (#90)
Browse files Browse the repository at this point in the history
* Converted old string formatting to fstrings

* Fixed quotation marks

* Slightly changed multiline expressions

* Passed black and flake8

* Reverted some strings to .format()

* Updated string in model.py

* Updated whats_new.rst

* Updated versioneer and _version

* Fixed whats_new.rst

* Fixed minor issues

- Updated strings that have not been caught the first time
- Merged strings that were separated in the same Line
- Referenced PR instead of issue in doc/whats_new.rst

* Fix errors shown as a tuple
  • Loading branch information
Raphael Lange authored and benbovy committed Jan 10, 2020
1 parent 1d995b4 commit 25a250c
Show file tree
Hide file tree
Showing 12 changed files with 150 additions and 163 deletions.
12 changes: 6 additions & 6 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,30 @@
import sys
import os

print("python exec:", sys.executable)
print("sys.path:", sys.path)
print(f"python exec: {sys.executable}")
print(f"sys.path: {sys.path}")
try:
import numpy

print("numpy: %s, %s" % (numpy.__version__, numpy.__file__))
print(f"numpy: {numpy.__version__}, {numpy.__file__}")
except ImportError:
print("no numpy")
try:
import attr

print("attr: %s, %s" % (attr.__version__, attr.__file__))
print(f"attr: {attr.__version__}, {attr.__file__}")
except ImportError:
print("no attr")
try:
import xarray

print("xarray: %s, %s" % (xarray.__version__, xarray.__file__))
print(f"xarray: {xarray.__version__}, {xarray.__file__}")
except ImportError:
print("no xarray")

import xsimlab

print("xsimlab: %s, %s" % (xsimlab.__version__, xsimlab.__file__))
print(f"xsimlab: {xsimlab.__version__}, {xsimlab.__file__}")

# -- General configuration ------------------------------------------------

Expand Down
2 changes: 2 additions & 0 deletions doc/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Enhancements
to :func:`xarray.Dataset.xsimlab.run`.
- More consistent dictionary format for output variables in the xarray
extension (:issue:`85`).
- %-formatting and str.format() code has been converted into formatted string
literals (f-strings) (:issue:`90`).

Bug fixes
~~~~~~~~~
Expand Down

0 comments on commit 25a250c

Please sign in to comment.