Skip to content

Commit

Permalink
Merge pull request #28 from dschwoerer/isort
Browse files Browse the repository at this point in the history
Disable isort
  • Loading branch information
dschwoerer authored Dec 1, 2021
2 parents ae2440a + dfee46a commit 7ae347b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 38 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/black-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,20 @@ jobs:
with:
ref: ${{ github.head_ref }}

- name: Installing
- name: Installing black
run: |
sudo apt update -y
sudo apt -y install python3-pip python3-setuptools python3-wheel
pip3 install black isort
pip3 install black
- name: Version
run: |
python3 --version
$HOME/.local/bin/black --version
$HOME/.local/bin/isort --version
- name: Run black and isort
- name: Run black
run: |
$HOME/.local/bin/black . $(grep '^#!.*/bin/.*python.*$' . -Ir|cut -d: -f1)
$HOME/.local/bin/isort . $(grep '^#!.*/bin/.*python.*$' . -Ir|cut -d: -f1)
- uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
1 change: 0 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ allow_redefinition = True

warn_return_any = True
warn_unused_configs = True

25 changes: 8 additions & 17 deletions xemc3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,17 @@
from . import load, write
from .core.dataset import EMC3DatasetAccessor

# assert callable(load)
# assert callable(load.plates)


# # should be deprecated
# load.read_plate = _load.read_plate
# load.read_plate = _load.read_plate
# load.read_mappings = _load.read_mappings
# load.read_mapped = _load.read_mapped
# load.write_mapped = _load.write_mapped


try:
from importlib.metadata import \
PackageNotFoundError as _PackageNotFoundError
from importlib.metadata import version as _version # type: ignore
from importlib.metadata import ( # type: ignore
PackageNotFoundError as _PackageNotFoundError,
version as _version,
)
except ModuleNotFoundError:
from importlib_metadata import \
PackageNotFoundError as _PackageNotFoundError
from importlib_metadata import version as _version # type: ignore
from importlib_metadata import ( # type: ignore
PackageNotFoundError as _PackageNotFoundError,
version as _version,
)
try:
__version__ = _version(__name__)
except _PackageNotFoundError:
Expand Down
24 changes: 9 additions & 15 deletions xemc3/load/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@
import types as _types

# Actual implementation is in load.py
from ..core.load import \
get_plates as \
plates # Removed in 0.0.5; read_mappings as mappings,; read_mapped_nice as mapped,
from ..core.load import load_all as all
from ..core.load import load_any as any
from ..core.load import read_fort_file_pub as file
from ..core.load import read_mapped as mapped_raw
from ..core.load import read_plate_nice as plates_geom
from ..core.load import read_var as var

# write_magnetic_field as magnetic_field,
# write_locations as coordinates,
# write_plates_mag as plates_mag,
# write_mapped_nice as mapped,
# write_all_fortran as _write_all,
from ..core.load import (
get_plates as plates,
load_all as all,
load_any as any,
read_fort_file_pub as file,
read_mapped as mapped_raw,
read_plate_nice as plates_geom,
read_var as var,
)


class _any(_types.ModuleType):
Expand Down

0 comments on commit 7ae347b

Please sign in to comment.