diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c820ab1..6651fc9 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -33,7 +33,7 @@ Install the project in editable mode: pip install -e . ``` -Install formatter, linter and test system: `pip install black~=21.4b0 flake8 mypy pytest pytest-cov`. +Install formatter, linter and test system: `pip install black flake8 mypy pytest pytest-cov`. Be sure to enable Git hooks: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6fa008b..42962ac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install black~=21.4b0 flake8 pytest + pip install black flake8 pytest pip install -r requirements.txt pip install . - name: Check code style with Black @@ -41,7 +41,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install black~=21.4b0 flake8 pytest + pip install black flake8 pytest pip install -r requirements.txt pip install . - name: Check code style with Black diff --git a/doc/contributing.moi b/doc/contributing.moi index 3fb155d..62951bd 100644 --- a/doc/contributing.moi +++ b/doc/contributing.moi @@ -30,7 +30,7 @@ Install the project in editable mode: \code {pip install -e .} {shell} -Install formatter, linter and test system\: \m {pip install black~=21.4b0 flake8 mypy pytest pytest-cov}. +Install formatter, linter and test system\: \m {pip install black flake8 mypy pytest pytest-cov}. Be sure to enable Git hooks: diff --git a/map_machine/geometry/flinger.py b/map_machine/geometry/flinger.py index b8f541a..5f0065c 100644 --- a/map_machine/geometry/flinger.py +++ b/map_machine/geometry/flinger.py @@ -38,7 +38,7 @@ def osm_zoom_level_to_pixels_per_meter( function allows any non-negative float value :param equator_length: celestial body equator length in meters """ - return 2.0 ** zoom_level / equator_length * 256.0 + return 2.0**zoom_level / equator_length * 256.0 class Flinger: @@ -56,7 +56,7 @@ class Flinger: :param equator_length: celestial body equator length in meters """ self.geo_boundaries: BoundaryBox = geo_boundaries - self.ratio: float = 2.0 ** zoom_level * 256.0 / 360.0 + self.ratio: float = 2.0**zoom_level * 256.0 / 360.0 self.size: np.ndarray = self.ratio * ( pseudo_mercator(self.geo_boundaries.max_()) - pseudo_mercator(self.geo_boundaries.min_()) diff --git a/map_machine/slippy/tile.py b/map_machine/slippy/tile.py index b9f2b20..36ec15a 100644 --- a/map_machine/slippy/tile.py +++ b/map_machine/slippy/tile.py @@ -55,7 +55,7 @@ class Tile: :param zoom_level: zoom level in OpenStreetMap terminology """ lat_rad: np.ndarray = np.radians(coordinates[0]) - scale: float = 2.0 ** zoom_level + scale: float = 2.0**zoom_level x: int = int((coordinates[1] + 180.0) / 360.0 * scale) y: int = int((1.0 - np.arcsinh(np.tan(lat_rad)) / np.pi) / 2.0 * scale) return cls(x, y, zoom_level) @@ -66,7 +66,7 @@ class Tile: Code from https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames """ - scale: float = 2.0 ** self.zoom_level + scale: float = 2.0**self.zoom_level lon_deg: float = self.x / scale * 360.0 - 180.0 lat_rad: float = np.arctan(np.sinh(np.pi * (1 - 2 * self.y / scale))) lat_deg: np.ndarray = np.degrees(lat_rad)