Skip to content

Commit

Permalink
Backport pre-commit from branch 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Nov 20, 2023
1 parent fc624e5 commit 22a83e1
Show file tree
Hide file tree
Showing 12 changed files with 589 additions and 449 deletions.
43 changes: 42 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,45 @@ repos:
args:
- --rcfile=.pylintrc-mandatory
additional_dependencies: *pylint_deps

- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
- --expand-star-imports
- --ignore-init-module-imports
- --in-place
- --remove-all-unused-imports
- --remove-duplicate-keys
- --remove-unused-variables
# - repo: https://github.com/psf/black
# rev: 22.3.0
# hooks:
# - id: black
# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: v2.1.2
# hooks:
# - id: prettier
# name: prettier (with plugin-xml)
# additional_dependencies:
# - "prettier@2.1.2"
# - "@prettier/plugin-xml@0.12.0"
# args:
# - --plugin=@prettier/plugin-xml
# files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
hooks:
- id: pyupgrade
args:
- --keep-percent-format
- --py36-plus
# - repo: https://github.com/PyCQA/isort
# rev: 5.12.0
# language_version: python3.8
# hooks:
# - id: isort
# name: isort except __init__.py
# args:
# - --settings=.
# exclude: /__init__\.py$
1 change: 0 additions & 1 deletion base_geoengine/doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# serve to show the default.

import sys
import imp
import os
import sphinx_bootstrap_theme

Expand Down
2 changes: 1 addition & 1 deletion base_geoengine/geo_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def get_edit_info_for_geo_column(self, column):
'default_extent': view.default_extent or DEFAULT_EXTENT,
'default_zoom': view.default_zoom,
}
logger.debug("Parameters for geo field {}:\n{}".format(column, res))
logger.debug(f"Parameters for geo field {column}:\n{res}")
return res

@api.model
Expand Down
2 changes: 1 addition & 1 deletion base_geoengine/geo_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def geo_search(model, domain=None, geo_domain=None, offset=0,
return []


class GeoOperator(object):
class GeoOperator:

def __init__(self, geo_field):
self.geo_field = geo_field
Expand Down
1 change: 0 additions & 1 deletion base_geoengine/geo_view/geo_raster_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,3 @@ def _compute_is_wmts(self):
@api.onchange('raster_type')
def onchange_set_wmts_options(self):
""" Abstract method for WMTS modules to set default options """
pass
Loading

0 comments on commit 22a83e1

Please sign in to comment.