Display drules with automatic priorities #18

Merged
root merged 2 commits from pastk-display-auto-priorities into master 2023-08-18 21:01:11 +00:00
Owner
No description provided.
vng (Migrated from github.com) reviewed 2023-08-17 01:09:04 +00:00
@ -280,29 +274,30 @@ def load_priorities(prio_range, path, classif, compress = False):
prio_ranges[prio_range]['priorities'][prio_id] = int(step * (base_idx + idx))
vng (Migrated from github.com) commented 2023-08-17 01:08:40 +00:00

How it can be not a string?

How it can be not a string?
@ -341,37 +336,65 @@ def dump_priorities(prio_range, path, maxzoom):
with open(get_priorities_filename(prio_range, path), 'w') as outfile:
vng (Migrated from github.com) commented 2023-08-17 01:05:04 +00:00

How it should be interpreted?

A and B or C and D and ...

A and (B or C) and D
(A and B) or (C and D)
?

Please, put braces here and split this gigantic if on smaller conditions with intermediate vars.

How it should be interpreted? ``` A and B or C and D and ... ``` A and (B or C) and D (A and B) or (C and D) ? Please, put braces here and split this gigantic if on smaller conditions with intermediate vars.
vng (Migrated from github.com) commented 2023-08-17 01:06:49 +00:00

Should be "is not None" ?

Should be "is not None" ?
pastk reviewed 2023-08-17 05:15:32 +00:00
@ -280,29 +274,30 @@ def load_priorities(prio_range, path, classif, compress = False):
prio_ranges[prio_range]['priorities'][prio_id] = int(step * (base_idx + idx))
Author
Owner

it can be a tuple for cases when auto_comment is passed along

it can be a tuple for cases when auto_comment is passed along
pastk reviewed 2023-08-17 13:11:24 +00:00
@ -280,29 +274,30 @@ def load_priorities(prio_range, path, classif, compress = False):
prio_ranges[prio_range]['priorities'][prio_id] = int(step * (base_idx + idx))
Author
Owner

I've changed the func's signature to make it more explicit.

I've changed the func's signature to make it more explicit.
pastk reviewed 2023-08-17 13:18:35 +00:00
Author
Owner

fixed

fixed
pastk reviewed 2023-08-17 13:29:29 +00:00
@ -341,37 +336,65 @@ def dump_priorities(prio_range, path, maxzoom):
with open(get_priorities_filename(prio_range, path), 'w') as outfile:
Author
Owner

fixed

fixed
vng (Migrated from github.com) reviewed 2023-08-18 13:15:27 +00:00
vng (Migrated from github.com) commented 2023-08-18 13:13:39 +00:00

Again, (X or Y and Z) is undefined for me ..
Put braces here.
BTW, how python interpret this?

Again, (X or Y and Z) is undefined for me .. Put braces here. BTW, how python interpret this?
pastk reviewed 2023-08-18 13:17:28 +00:00
Author
Owner

In all programming languages that I know and has a precedence over or.

In all programming languages that I know `and` has a precedence over `or`.
Sign in to join this conversation.
No description provided.