Skip to content

Commit 8317269

Browse files
committed
black -l 120
1 parent 1d26f6a commit 8317269

File tree

4 files changed

+34
-33
lines changed

4 files changed

+34
-33
lines changed

mergin/client_push.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,14 @@ def _geodiff_changes_count(mp, diff_rel_path):
334334

335335
try:
336336
from pygeodiff import GeoDiff
337+
337338
return GeoDiff().changes_count(diff_abs)
338339
except Exception:
339340
pass
340341

341342
try:
342343
import geodiff # optional fallback
344+
343345
if hasattr(geodiff, "changes_count"):
344346
try:
345347
return geodiff.changes_count(diff_abs)
@@ -350,6 +352,7 @@ def _geodiff_changes_count(mp, diff_rel_path):
350352

351353
return None
352354

355+
353356
def push_project_cancel(job):
354357
"""
355358
To be called (from main thread) to cancel a job that has uploads in progress.

mergin/test/test_push_logging.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,14 @@ def fpath_meta(rel):
7878
mc=SimpleNamespace(post=fake_post),
7979
changes={
8080
"added": [],
81-
"updated": [{
82-
"path": modified.name,
83-
"size": file_size,
84-
"diff": {"path": diff_path.name, "size": diff_size},
85-
"chunks": [1],
86-
}],
81+
"updated": [
82+
{
83+
"path": modified.name,
84+
"size": file_size,
85+
"diff": {"path": diff_path.name, "size": diff_size},
86+
"chunks": [1],
87+
}
88+
],
8789
"removed": [],
8890
},
8991
tmp_dir=SimpleNamespace(cleanup=lambda: None),

scripts/update_version.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def replace_in_file(filepath, regex, sub):
7-
with open(filepath, 'r') as f:
7+
with open(filepath, "r") as f:
88
content = f.read()
99

1010
content_new = re.sub(regex, sub, content, flags=re.M)
@@ -15,14 +15,14 @@ def replace_in_file(filepath, regex, sub):
1515

1616
dir_path = os.path.dirname(os.path.realpath(__file__))
1717
parser = argparse.ArgumentParser()
18-
parser.add_argument('--version', help='version to replace')
18+
parser.add_argument("--version", help="version to replace")
1919
args = parser.parse_args()
2020
ver = args.version
2121
print("using version " + ver)
2222

2323
about_file = os.path.join(dir_path, os.pardir, "mergin", "version.py")
2424
print("patching " + about_file)
25-
replace_in_file(about_file, "__version__\s=\s\".*", "__version__ = \"" + ver + "\"")
25+
replace_in_file(about_file, '__version__\s=\s".*', '__version__ = "' + ver + '"')
2626

2727
setup_file = os.path.join(dir_path, os.pardir, "setup.py")
2828
print("patching " + setup_file)

setup.py

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,31 @@
44
from setuptools import setup, find_packages
55

66
setup(
7-
name='mergin-client',
8-
version='0.10.5',
9-
url='https://github.com/MerginMaps/python-api-client',
10-
license='MIT',
11-
author='Lutra Consulting Ltd.',
12-
author_email='info@merginmaps.com',
13-
description='Mergin Maps utils and client',
14-
long_description='Mergin Maps utils and client',
15-
7+
name="mergin-client",
8+
version="0.10.5",
9+
url="https://github.com/MerginMaps/python-api-client",
10+
license="MIT",
11+
author="Lutra Consulting Ltd.",
12+
author_email="info@merginmaps.com",
13+
description="Mergin Maps utils and client",
14+
long_description="Mergin Maps utils and client",
1615
packages=find_packages(),
17-
18-
platforms='any',
16+
platforms="any",
1917
install_requires=[
20-
'python-dateutil==2.8.2',
21-
'pygeodiff==2.0.4',
22-
'pytz==2022.1',
23-
'click==8.1.3',
18+
"python-dateutil==2.8.2",
19+
"pygeodiff==2.0.4",
20+
"pytz==2022.1",
21+
"click==8.1.3",
2422
],
25-
2623
entry_points={
27-
'console_scripts': ['mergin=mergin.cli:cli'],
24+
"console_scripts": ["mergin=mergin.cli:cli"],
2825
},
29-
3026
classifiers=[
31-
'Development Status :: 5 - Production/Stable',
32-
'Intended Audience :: Developers',
33-
'License :: OSI Approved :: MIT License',
34-
'Operating System :: OS Independent',
35-
'Programming Language :: Python :: 3'
27+
"Development Status :: 5 - Production/Stable",
28+
"Intended Audience :: Developers",
29+
"License :: OSI Approved :: MIT License",
30+
"Operating System :: OS Independent",
31+
"Programming Language :: Python :: 3",
3632
],
37-
package_data={'mergin': ['cert.pem']}
33+
package_data={"mergin": ["cert.pem"]},
3834
)

0 commit comments

Comments
 (0)