Skip to content

Commit 1acf3f4

Browse files
committed
skpkg: docformatter
1 parent fb7d421 commit 1acf3f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+258
-255
lines changed

src/diffpy/structure/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
# See LICENSE.rst for license information.
1313
#
1414
##############################################################################
15-
16-
"""
17-
Crystal structure container and parsers for structure formats.
15+
"""Crystal structure container and parsers for structure formats.
1816
1917
Classes related to the structure of materials:
2018
* Atom

src/diffpy/structure/_legacy_importer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
# See LICENSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
"""
17-
Support import of old camel-case module names with DeprecationWarning.
15+
"""Support import of old camel-case module names with
16+
DeprecationWarning.
1817
1918
The imported camel-case modules are aliases for the current module
2019
instances. Their `__name__` attributes are thus all in lower-case.
@@ -61,6 +60,7 @@ def find_spec(self, fullname, path=None, target=None):
6160

6261
class MapRenamedStructureModule(importlib.abc.Loader):
6362
"""Loader for old camel-case module names.
63+
6464
Import the current module and alias it under the old name.
6565
"""
6666

src/diffpy/structure/apps/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@
1212
# See LICENSE_DANSE.txt for license information.
1313
#
1414
##############################################################################
15-
1615
"""Script applications that use the `diffpy.structure` package."""

src/diffpy/structure/apps/anyeye.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
# See LICENSE_DANSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
"""
17-
Anyeye view structure file in atomeye.
15+
"""Anyeye view structure file in atomeye.
1816
1917
Usage: ``anyeye [options] strufile``
2018
@@ -65,7 +63,8 @@
6563

6664

6765
def usage(style=None):
68-
"""Show usage info, for ``style=="brief"`` show only first 2 lines."""
66+
"""Show usage info, for ``style=="brief"`` show only first 2
67+
lines."""
6968
import os.path
7069

7170
myname = os.path.basename(sys.argv[0])
@@ -175,7 +174,7 @@ def cleanUp(pd):
175174

176175

177176
def parseFormula(formula):
178-
"""Parse chemical formula and return a list of elements"""
177+
"""Parse chemical formula and return a list of elements."""
179178
# remove all blanks
180179
formula = re.sub(r"\s", "", formula)
181180
if not re.match("^[A-Z]", formula):

src/diffpy/structure/apps/transtru.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See LICENSE_DANSE.txt for license information.
1313
#
1414
##############################################################################
15-
1615
"""Translate structure file to different format.
1716
1817
Usage: ``transtru INFMT..OUTFMT strufile``
@@ -44,7 +43,8 @@
4443

4544

4645
def usage(style=None):
47-
"""Show usage info, for ``style=="brief"`` show only first 2 lines."""
46+
"""Show usage info, for ``style=="brief"`` show only first 2
47+
lines."""
4848
import os.path
4949

5050
myname = os.path.basename(sys.argv[0])

src/diffpy/structure/atom.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
# See LICENSE_DANSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
"""
17-
Provide class Atom for managing properties of an atom in structure model.
18-
"""
15+
"""Provide class Atom for managing properties of an atom in structure
16+
model."""
1917

2018
import numpy
2119

@@ -176,7 +174,8 @@ def msdLat(self, vl):
176174
return msd
177175

178176
def msdCart(self, vc):
179-
"""Calculate mean square displacement along the Cartesian vector.
177+
"""Calculate mean square displacement along the Cartesian
178+
vector.
180179
181180
Parameters
182181
----------
@@ -252,7 +251,8 @@ def __copy__(self, target=None):
252251

253252
@property
254253
def xyz_cartn(self):
255-
"""numpy.ndarray: Atom position in absolute Cartesian coordinates.
254+
"""numpy.ndarray: Atom position in absolute Cartesian
255+
coordinates.
256256
257257
This is computed from fractional coordinates `xyz` and the
258258
current `lattice` setup. Assignment to *xyz_cartn* or
@@ -301,7 +301,8 @@ def anisotropy(self, value):
301301

302302
@property
303303
def U(self):
304-
"""numpy.ndarray : The 3x3 matrix of anisotropic atomic displacements.
304+
"""numpy.ndarray : The 3x3 matrix of anisotropic atomic
305+
displacements.
305306
306307
For isotropic displacements (when `anisotropy` is ``False``)
307308
assignment to *U* uses only the first ``Unew[0, 0]`` element
@@ -537,7 +538,8 @@ def __setitem__(self, idx, value):
537538
return
538539

539540
def __array_wrap__(self, out_arr, context=None, return_scalar=None):
540-
"""Ensure math operations on this type yield standard numpy array."""
541+
"""Ensure math operations on this type yield standard numpy
542+
array."""
541543
return out_arr.view(numpy.ndarray)
542544

543545

src/diffpy/structure/expansion/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See LICENSE_DANSE.txt for license information.
1313
#
1414
##############################################################################
15-
1615
"""Methods and classes for manipulating `Structure` instances.
1716
1817
Package content:

src/diffpy/structure/expansion/makeellipsoid.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See LICENSE_DANSE.txt for license information.
1313
#
1414
##############################################################################
15-
1615
"""Make a spheroid nanoparticle from a template structure."""
1716

1817
from math import ceil
@@ -42,8 +41,7 @@ def makeSphere(S, radius):
4241

4342

4443
def makeEllipsoid(S, a, b=None, c=None):
45-
"""
46-
Cut a `Structure` out of another one.
44+
"""Cut a `Structure` out of another one.
4745
4846
Parameters
4947
----------

src/diffpy/structure/expansion/shapeutils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See LICENSE_DANSE.txt for license information.
1313
#
1414
##############################################################################
15-
1615
"""Utilities for making shapes."""
1716

1817

src/diffpy/structure/expansion/supercell_mod.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@
1212
# See LICENSE_DANSE.txt for license information.
1313
#
1414
##############################################################################
15-
16-
"""This module contains functions for simple `Structure` manipulation."""
15+
"""This module contains functions for simple `Structure`
16+
manipulation."""
1717

1818
import numpy
1919

2020
from diffpy.structure import Atom, Structure
2121

2222

2323
def supercell(S, mno):
24-
"""
25-
Perform supercell expansion for a `Structure`.
24+
"""Perform supercell expansion for a `Structure`.
2625
2726
New `lattice` parameters are multiplied and fractional coordinates
2827
divided by corresponding multiplier. New `Atoms` are grouped with

0 commit comments

Comments
 (0)