Skip to content

Commit

Permalink
format all (#4885)
Browse files Browse the repository at this point in the history
  • Loading branch information
RMeli authored Jan 8, 2025
1 parent 5eef341 commit 263bbe6
Show file tree
Hide file tree
Showing 12 changed files with 949 additions and 692 deletions.
48 changes: 31 additions & 17 deletions package/MDAnalysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@
"""

__all__ = ['Universe', 'Writer',
'AtomGroup', 'ResidueGroup', 'SegmentGroup']
__all__ = ["Universe", "Writer", "AtomGroup", "ResidueGroup", "SegmentGroup"]

import logging
import warnings
Expand All @@ -161,10 +160,11 @@
logger = logging.getLogger("MDAnalysis.__init__")

from .version import __version__

try:
from .authors import __authors__
except ImportError:
logger.info('Could not find authors.py, __authors__ will be empty.')
logger.info("Could not find authors.py, __authors__ will be empty.")
__authors__ = []

# Registry of Readers, Parsers and Writers known to MDAnalysis
Expand All @@ -178,16 +178,23 @@
_SELECTION_WRITERS: Dict = {}
_CONVERTERS: Dict = {}
# Registry of TopologyAttributes
_TOPOLOGY_ATTRS: Dict = {} # {attrname: cls}
_TOPOLOGY_TRANSPLANTS: Dict = {} # {name: [attrname, method, transplant class]}
_TOPOLOGY_ATTRNAMES: Dict = {} # {lower case name w/o _ : name}
_TOPOLOGY_ATTRS: Dict = {} # {attrname: cls}
_TOPOLOGY_TRANSPLANTS: Dict = (
{}
) # {name: [attrname, method, transplant class]}
_TOPOLOGY_ATTRNAMES: Dict = {} # {lower case name w/o _ : name}
_GUESSERS: Dict = {}

# custom exceptions and warnings
from .exceptions import (
SelectionError, NoDataError, ApplicationError, SelectionWarning,
MissingDataWarning, ConversionWarning, FileFormatWarning,
StreamWarning
SelectionError,
NoDataError,
ApplicationError,
SelectionWarning,
MissingDataWarning,
ConversionWarning,
FileFormatWarning,
StreamWarning,
)

from .lib import log
Expand All @@ -197,8 +204,9 @@
del logging

# only MDAnalysis DeprecationWarnings are loud by default
warnings.filterwarnings(action='once', category=DeprecationWarning,
module='MDAnalysis')
warnings.filterwarnings(
action="once", category=DeprecationWarning, module="MDAnalysis"
)


from . import units
Expand All @@ -213,11 +221,17 @@

from .due import due, Doi, BibTeX

due.cite(Doi("10.25080/majora-629e541a-00e"),
description="Molecular simulation analysis library",
path="MDAnalysis", cite_module=True)
due.cite(Doi("10.1002/jcc.21787"),
description="Molecular simulation analysis library",
path="MDAnalysis", cite_module=True)
due.cite(
Doi("10.25080/majora-629e541a-00e"),
description="Molecular simulation analysis library",
path="MDAnalysis",
cite_module=True,
)
due.cite(
Doi("10.1002/jcc.21787"),
description="Molecular simulation analysis library",
path="MDAnalysis",
cite_module=True,
)

del Doi, BibTeX
2 changes: 1 addition & 1 deletion package/MDAnalysis/lib/distances.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def self_distance_array(
for j in range(i + 1, n):
dist[i, j] = dist[j, i] = d[k]
k += 1
.. versionchanged:: 0.13.0
Added *backend* keyword.
.. versionchanged:: 0.19.0
Expand Down
Loading

0 comments on commit 263bbe6

Please sign in to comment.