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

[fmt] Format all #4885

Merged
merged 1 commit into from
Jan 8, 2025
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
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.")

Check warning on line 167 in package/MDAnalysis/__init__.py

View check run for this annotation

Codecov / codecov/patch

package/MDAnalysis/__init__.py#L167

Added line #L167 was not covered by tests
__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
Loading