1. 19 Dec, 2022 2 commits
    • Jérome Perrin's avatar
      *: rewrite with lib2to3.fixes.fix_asserts and ad-hoc assertin · 2e366054
      Jérome Perrin authored
      The add-hoc assertin filter:
      
      --
      
      from typing import List
      
      import lib2to3
      
      from lib2to3.fixer_base import BaseFix
      from lib2to3.fixer_util import Comma, Name
      
      class FixAssertIn(BaseFix):
      
        PATTERN = """
            power< any+ trailer< '.' meth=("assertTrue" | "assertFalse")>
            trailer< '('
              comparison< (needle=any ( comp_op<'not' 'in'> | 'in' ) haystack=any) >
            ')' > >
        """
      
        def transform(self, node: lib2to3.pytree.Node,
                      results: List[lib2to3.pytree.Base]):
      
          needle = results['needle']
          haystack = results['haystack']
          meth = results["meth"][0]
      
          method_map = {True: 'assertIn', False: 'assertNotIn'}
          method_in = meth.value == 'assertTrue'
          if 'not' in str(needle.parent.children[1]):
            method_in = not method_in
          meth.replace(Name(method_map[method_in], prefix=meth.prefix))
      
          needle.parent.children = [needle, Comma(), haystack]
      2e366054
    • Jérome Perrin's avatar
      ERP5TypeTestCase: backport python3 assertion method names · b990a75a
      Jérome Perrin authored
      so that we can run 2to3.fix_assert
      b990a75a
  2. 18 Dec, 2022 2 commits
  3. 16 Dec, 2022 3 commits
  4. 13 Dec, 2022 1 commit
  5. 12 Dec, 2022 2 commits
  6. 09 Dec, 2022 2 commits
    • Jérome Perrin's avatar
      gadget_html_viewer: only set a border for tables with border=1 attribute · ac0ad881
      Jérome Perrin authored
      gadget_html_viewer had styles to add a border for tables, so that they
      look similar to tables added in CKEditor. One problem is that all tables
      had borders, because HTML emails are often using tables to position the
      content, when viewing an Mail Message from ERP5 back office interface
      we could see all the borders, which looked a bit ugly.
      
      These changes bring back a behavior closer to default style sheet of
      browsers: tables have no border by default, but a rule is added to
      emulate the rendering of border="1" attributes, so that tables edited
      with CKEditor have borders and look the same in the editor or in the
      html viewer.
      ac0ad881
    • Jérome Perrin's avatar
  7. 08 Dec, 2022 1 commit
  8. 07 Dec, 2022 1 commit
  9. 06 Dec, 2022 6 commits
  10. 01 Dec, 2022 1 commit
    • Jérome Perrin's avatar
      stripe: change module columns · 95d449eb
      Jérome Perrin authored
      Remove title, we don't need title and reference, because title is
      acquired from reference, so they have the same value.
      
      Add Causality, it can be useful for example to search in the module.
      
      Add "more columns" for all properties from the view of a stripe session
      95d449eb
  11. 29 Nov, 2022 1 commit
  12. 28 Nov, 2022 8 commits
  13. 21 Nov, 2022 8 commits
  14. 17 Nov, 2022 2 commits