-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to fstring where it is possible
- Loading branch information
Showing
11 changed files
with
41 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
__email__ = '[email protected]' | ||
|
||
|
||
ACTIONS_PATH = 'from QuickOSM.core.actions import Actions;' | ||
ACTIONS_PATH = 'from QuickOSM.core.actions import Actions\n' | ||
ACTIONS_VISIBILITY = [ | ||
Visibility.Canvas.value, | ||
Visibility.Feature.value, | ||
|
@@ -98,7 +98,7 @@ def add_actions(layer: QgsVectorLayer, keys: list): | |
QgsAction.GenericPython, | ||
link, | ||
(ACTIONS_PATH | ||
+ 'Actions.run("{link}","[% "{link}" %]")'.format(link=link)), | ||
+ f'Actions.run("{link}","[% "{link}" %]")'), | ||
image, | ||
False, | ||
link, | ||
|
@@ -132,8 +132,7 @@ def add_relaunch_action(layer: QgsVectorLayer, layer_name: str = ""): | |
reload = QgsAction( | ||
QgsAction.GenericPython, | ||
title, | ||
ACTIONS_PATH + 'Actions.run_reload(layer_name="{layer_name}")'.format( | ||
layer_name=layer_name), | ||
ACTIONS_PATH + f'Actions.run_reload(layer_name="{layer_name}")', | ||
'', | ||
False, | ||
title, | ||
|
@@ -233,9 +232,7 @@ def run_sketch_line(network: str, ref: str): | |
level=Qgis.Warning, | ||
duration=7) | ||
else: | ||
url = ( | ||
'http://www.overpass-api.de/api/sketch-line?' | ||
'network={network}&ref={ref}').format(network=network, ref=ref) | ||
url = f'http://www.overpass-api.de/api/sketch-line?network={network}&ref={ref}' | ||
open_webpage(url) | ||
|
||
@staticmethod | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters