[Git][debian-gis-team/josm-installer][master] 3 commits: Fix flake8 'E275 missing whitespace after keyword' issues. (closes: #1021288)
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Wed Oct 5 04:47:56 BST 2022
Bas Couwenberg pushed to branch master at Debian GIS Project / josm-installer
Commits:
a43602d0 by Bas Couwenberg at 2022-10-05T05:35:01+02:00
Fix flake8 'E275 missing whitespace after keyword' issues. (closes: #1021288)
- - - - -
6909643e by Bas Couwenberg at 2022-10-05T05:40:39+02:00
Change alignment of closing parenthesis.
- - - - -
3c6e66e1 by Bas Couwenberg at 2022-10-05T05:40:52+02:00
Set distribution to unstable.
- - - - -
2 changed files:
- debian/changelog
- josm-installer.py
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+josm-installer (0.0.2+svn18515) unstable; urgency=medium
+
+ * Fix flake8 'E275 missing whitespace after keyword' issues.
+ (closes: #1021288)
+ * Change alignment of closing parenthesis.
+
+ -- Bas Couwenberg <sebastic at debian.org> Wed, 05 Oct 2022 05:40:40 +0200
+
josm-installer (0.0.1+svn18515) unstable; urgency=medium
* Updated linux directory to r18515.
=====================================
josm-installer.py
=====================================
@@ -13,36 +13,36 @@ args = None
def sanity_check(jar_dir, josm_symlink):
if not os.path.exists(jar_dir):
print(
- "JAR directory does not exist: %s" % jar_dir,
- file=sys.stderr,
- )
+ "JAR directory does not exist: %s" % jar_dir,
+ file=sys.stderr,
+ )
return False
if not os.access(jar_dir, os.W_OK):
print(
- "JAR directory is not writable: %s" % jar_dir,
- file=sys.stderr,
- )
+ "JAR directory is not writable: %s" % jar_dir,
+ file=sys.stderr,
+ )
return False
if not os.path.isdir(jar_dir):
print(
- "JAR directory is not a directory: %s" % jar_dir,
- file=sys.stderr,
- )
+ "JAR directory is not a directory: %s" % jar_dir,
+ file=sys.stderr,
+ )
return False
- if(
+ if (
os.path.lexists(josm_symlink) and
not os.path.islink(josm_symlink)
- ):
+ ):
print(
- "JOSM symlink is not a symlink: %s" % josm_symlink,
- file=sys.stderr,
- )
+ "JOSM symlink is not a symlink: %s" % josm_symlink,
+ file=sys.stderr,
+ )
return False
@@ -51,9 +51,9 @@ def sanity_check(jar_dir, josm_symlink):
def josm_installer():
josm_symlink = os.path.join(
- args.jar_dir,
- 'josm.jar',
- )
+ args.jar_dir,
+ 'josm.jar',
+ )
if not sanity_check(args.jar_dir, josm_symlink):
sys.exit(1)
@@ -64,9 +64,9 @@ def josm_installer():
variant = 'tested'
version_url = (
- 'https://josm.openstreetmap.de/'
- 'wiki/TestedVersion?format=txt'
- )
+ 'https://josm.openstreetmap.de/'
+ 'wiki/TestedVersion?format=txt'
+ )
jar_url = 'https://josm.openstreetmap.de/josm-%s.jar' % variant
@@ -77,11 +77,11 @@ def josm_installer():
if args.latest:
local_file = os.path.join(
- args.jar_dir,
- 'josm-%s.jar' % (
- variant,
- ),
- )
+ args.jar_dir,
+ 'josm-%s.jar' % (
+ variant,
+ ),
+ )
else:
if args.debug:
print("GET %s" % version_url)
@@ -89,7 +89,8 @@ def josm_installer():
r = s.get(version_url)
if r.status_code != requests.codes.ok:
- print("Error: Request failed: %s (%s %s)" % (
+ print(
+ "Error: Request failed: %s (%s %s)" % (
version_url,
r.status_code,
r.reason,
@@ -104,18 +105,19 @@ def josm_installer():
version = r.text
local_file = os.path.join(
- args.jar_dir,
- 'josm-%s-%s.jar' % (
- variant,
- version,
- ),
- )
+ args.jar_dir,
+ 'josm-%s-%s.jar' % (
+ variant,
+ version,
+ ),
+ )
download = True
if os.path.exists(local_file) and not args.latest:
if args.verbose:
- print("JOSM %s already downloaded: %s" % (
+ print(
+ "JOSM %s already downloaded: %s" % (
'%s %s' % (variant, version),
local_file,
)
@@ -127,7 +129,7 @@ def josm_installer():
if not download:
sys.exit(0)
- if(
+ if (
(
os.path.exists(local_file) and
not os.access(local_file, os.W_OK)
@@ -136,7 +138,7 @@ def josm_installer():
not os.path.exists(local_file) and
not os.access(os.path.dirname(local_file), os.W_OK)
)
- ):
+ ):
print("Error: Cannot write: %s" % local_file, file=sys.stderr)
sys.exit(1)
@@ -146,7 +148,8 @@ def josm_installer():
r = s.get(jar_url)
if r.status_code != requests.codes.ok:
- print("Error: Request failed: %s (%s %s)" % (
+ print(
+ "Error: Request failed: %s (%s %s)" % (
version_url,
r.status_code,
r.reason,
@@ -175,40 +178,40 @@ def main():
global args
default = {
- 'jar-dir': '/usr/share/josm',
- }
+ 'jar-dir': '/usr/share/josm',
+ }
parser = argparse.ArgumentParser()
parser.add_argument(
- '-J', '--jar-dir',
- metavar='<PATH>',
- action='store',
- help='Path to store JAR file (default: %s)' % (
- default['jar-dir'],
- ),
- default=default['jar-dir'],
- )
+ '-J', '--jar-dir',
+ metavar='<PATH>',
+ action='store',
+ help='Path to store JAR file (default: %s)' % (
+ default['jar-dir'],
+ ),
+ default=default['jar-dir'],
+ )
parser.add_argument(
- '-L', '--latest',
- action='store_true',
- help='Install latest instead of tested',
- )
+ '-L', '--latest',
+ action='store_true',
+ help='Install latest instead of tested',
+ )
parser.add_argument(
- '-f', '--force',
- action='store_true',
- help='Force download',
- )
+ '-f', '--force',
+ action='store_true',
+ help='Force download',
+ )
parser.add_argument(
- '-d', '--debug',
- action='store_true',
- help='Enable debug output',
- )
+ '-d', '--debug',
+ action='store_true',
+ help='Enable debug output',
+ )
parser.add_argument(
- '-v', '--verbose',
- action='store_true',
- help='Enable verbose output',
- )
+ '-v', '--verbose',
+ action='store_true',
+ help='Enable verbose output',
+ )
args = parser.parse_args()
View it on GitLab: https://salsa.debian.org/debian-gis-team/josm-installer/-/compare/20c618952545a067b855d444b6d28b03dc385e85...3c6e66e1c273b2575881d1b135a4f8f9eaff8291
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/josm-installer/-/compare/20c618952545a067b855d444b6d28b03dc385e85...3c6e66e1c273b2575881d1b135a4f8f9eaff8291
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20221005/a6c75ae5/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list