Basementup commited on
Commit
cbce902
·
verified ·
1 Parent(s): e461750

PoC critical-read fixes: loss cross-refs only where narrower, which/who for creditor, readable capacity notes, invective facts not pleaded, URL-safe aliases

Browse files
Files changed (1) hide show
  1. poc.py +3 -3
poc.py CHANGED
@@ -893,7 +893,7 @@ def build(data):
893
  kinds.append(lab[k])
894
  paras = sorted(doc.breach_para[k] for k in under if k in doc.breach_para)
895
  doc.breach_para['s75'] = doc.para(f'The Claimant has a claim against {SU.n} in respect of ' + (join_list(kinds) if kinds else doc.need('misrepresentation and/or breach of contract')) +
896
- (f', as pleaded at {ref_txt(paras)}' if paras else '') + f'. By section 75(1) of the 1974 Act, the Claimant has a like claim against {CR.n}, who is jointly and severally liable with {SU.n} to the Claimant.')
897
  if 'misrep' in causes or 'deceit' in causes:
898
  doc.para(f'Further, the Representations were made in antecedent negotiations conducted by {SU.n}{(" (acting by " + maker_n + ")") if maker_n and maker_n != SU.n else ""} in relation to a transaction financed by a debtor-creditor-supplier agreement within section 12(b) or (c) of the 1974 Act. By section 56(1)(c) and (2) of the 1974 Act, they are deemed to have been made by {SU.n} as agent of {CR.n} as well as in its actual capacity.')
899
  s75r = refs({'s75'})
@@ -1111,7 +1111,7 @@ def build(data):
1111
  uniform = len({frozenset(c for c in doc.caus_para if applies(k_, c)) for _w, _v, _r, k_ in losses}) == 1
1112
  for what, v, raw, keys in losses:
1113
  back = sorted({doc.caus_para[c] for c in doc.caus_para if applies(keys, c)})
1114
- suffix = f' ({ref_txt(back)})' if (keys and 'all' not in keys and back and not uniform) else ''
1115
  if v is not None:
1116
  total += v; nq += 1
1117
  items.append(f'{clause(what)}: {fmt_money(v)}{suffix}')
@@ -1615,7 +1615,7 @@ def notes_text(doc, data, stray, bad_cases):
1615
  for c in getattr(doc, 'causes', []):
1616
  a = ag[c]
1617
  out.append(f' {c}: ' + ', '.join(f'{ORD[i]} Defendant ({rows[i][0]})' for i in a['idxs'] if i < len(rows)) +
1618
- (f'; capacities: ' + '; '.join(f'{k} {ORD[m_] if m_ is not None else ""} {ORD[n_]}'.replace(' ', ' ') for k, m_, n_ in a['caps']) if a['caps'] else ''))
1619
  om = getattr(doc, 'omitted', [])
1620
  if om:
1621
  out += ['', 'FACTS TAGGED "omit" (not pleaded, kept for your records)']
 
893
  kinds.append(lab[k])
894
  paras = sorted(doc.breach_para[k] for k in under if k in doc.breach_para)
895
  doc.breach_para['s75'] = doc.para(f'The Claimant has a claim against {SU.n} in respect of ' + (join_list(kinds) if kinds else doc.need('misrepresentation and/or breach of contract')) +
896
+ (f', as pleaded at {ref_txt(paras)}' if paras else '') + f'. By section 75(1) of the 1974 Act, the Claimant has a like claim against {CR.n}, {'which' if CR.pr[0] == 'it' else 'who'} is jointly and severally liable with {SU.n} to the Claimant.')
897
  if 'misrep' in causes or 'deceit' in causes:
898
  doc.para(f'Further, the Representations were made in antecedent negotiations conducted by {SU.n}{(" (acting by " + maker_n + ")") if maker_n and maker_n != SU.n else ""} in relation to a transaction financed by a debtor-creditor-supplier agreement within section 12(b) or (c) of the 1974 Act. By section 56(1)(c) and (2) of the 1974 Act, they are deemed to have been made by {SU.n} as agent of {CR.n} as well as in its actual capacity.')
899
  s75r = refs({'s75'})
 
1111
  uniform = len({frozenset(c for c in doc.caus_para if applies(k_, c)) for _w, _v, _r, k_ in losses}) == 1
1112
  for what, v, raw, keys in losses:
1113
  back = sorted({doc.caus_para[c] for c in doc.caus_para if applies(keys, c)})
1114
+ suffix = f' ({ref_txt(back)} only)' if (keys and 'all' not in keys and back and not uniform and back != cps) else ''
1115
  if v is not None:
1116
  total += v; nq += 1
1117
  items.append(f'{clause(what)}: {fmt_money(v)}{suffix}')
 
1615
  for c in getattr(doc, 'causes', []):
1616
  a = ag[c]
1617
  out.append(f' {c}: ' + ', '.join(f'{ORD[i]} Defendant ({rows[i][0]})' for i in a['idxs'] if i < len(rows)) +
1618
+ (f'; capacities: ' + '; '.join({'pers': f'{ORD[n_]} Defendant personally liable', 'vic': f'{ORD[m_] if m_ is not None else ""} Defendant vicariously liable for {ORD[n_]} Defendant', 'agent': f'{ORD[n_]} Defendant as agent of {ORD[m_] if m_ is not None else ""} Defendant'}[k] for k, m_, n_ in a['caps']) if a['caps'] else ''))
1619
  om = getattr(doc, 'omitted', [])
1620
  if om:
1621
  out += ['', 'FACTS TAGGED "omit" (not pleaded, kept for your records)']