Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies and pre-commit hooks #1848

Merged
merged 8 commits into from
Oct 21, 2023
Merged

Commits on Oct 20, 2023

  1. Update dependencies

    rytilahti committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    458a90b View commit details
    Browse the repository at this point in the history
  2. Update pre-commit hooks

    rytilahti committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    1696598 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    28e568e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d6bf65e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6e43b7c View commit details
    Browse the repository at this point in the history
  6. Disable doc8 for now due to doc8, docutils, myst_parser issues

    Traceback (most recent call last):
      File "<frozen runpy>", line 198, in _run_module_as_main
      File "<frozen runpy>", line 88, in _run_code
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/doc8/__main__.py", line 20, in <module>
        sys.exit(main.main())
                 ^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/doc8/main.py", line 534, in main
        result = doc8(args)
                 ^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/doc8/main.py", line 409, in doc8
        error_counts = validate(args, files, result=result)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/doc8/main.py", line 271, in validate
        for line_num, code, message in c.report_iter(f):
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/doc8/checks.py", line 131, in report_iter
        for error in parsed_file.errors:
                     ^^^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/doc8/parser.py", line 46, in errors
        self._errors = rl.lint(self.contents, filepath=self.filename)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/restructuredtext_lint/lint.py", line 72, in lint
        reader.parser.parse(content, document)
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/parsers/rst/__init__.py", line 184, in parse
        self.statemachine.run(inputlines, document, inliner=self.inliner)
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 169, in run
        results = StateMachineWS.run(self, input_lines, input_offset,
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/statemachine.py", line 233, in run
        context, next_state, result = self.check_line(
                                      ^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/statemachine.py", line 445, in check_line
        return method(match, context, next_state)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 2357, in explicit_markup
        self.explicit_list(blank_finish)
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 2382, in explicit_list
        newline_offset, blank_finish = self.nested_list_parse(
                                       ^^^^^^^^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 316, in nested_list_parse
        state_machine.run(block, input_offset, memo=self.memo,
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 195, in run
        results = StateMachineWS.run(self, input_lines, input_offset)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/statemachine.py", line 233, in run
        context, next_state, result = self.check_line(
                                      ^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/statemachine.py", line 445, in check_line
        return method(match, context, next_state)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 2660, in explicit_markup
        nodelist, blank_finish = self.explicit_construct(match)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 2367, in explicit_construct
        return method(self, expmatch)
               ^^^^^^^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 2104, in directive
        return self.run_directive(
               ^^^^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/parsers/rst/states.py", line 2154, in run_directive
        result = directive_instance.run()
                 ^^^^^^^^^^^^^^^^^^^^^^^^
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/docutils/parsers/rst/directives/misc.py", line 193, in run
        parser.parse('\n'.join(include_lines), document)
      File "<precommit cache dir>/reponpelfppa/py_env-python3/lib/python3.11/site-packages/myst_parser/parsers/sphinx_.py", line 58, in parse
        config: MdParserConfig = document.settings.env.myst_config
                                 ^^^^^^^^^^^^^^^^^^^^^
    AttributeError: 'Values' object has no attribute 'env'
    rytilahti committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    8ef8837 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2023

  1. Disable docformatter for now

    Storing example responses in docstrings is dumb, but there is no nice way
    to keep it on while avoiding formatting that makes them incomprehensible like:
    
    -        """
    -        Response of Yeelight Dual Control Module
    -        {
    -            'id': 1,
    -            'result': [
    -                {'did': 'switch_1_state', 'siid': 2, 'piid': 1, 'code': 0, 'value': False},
    -                {'did': 'switch_1_default_state', 'siid': 2, 'piid': 2, 'code': 0, 'value': True},
    -                {'did': 'switch_1_off_delay', 'siid': 2, 'piid': 3, 'code': 0, 'value': 300},
    -                {'did': 'switch_2_state', 'siid': 3, 'piid': 1, 'code': 0, 'value': False},
    -                {'did': 'switch_2_default_state', 'siid': 3, 'piid': 2, 'code': 0, 'value': False},
    -                {'did': 'switch_2_off_delay', 'siid': 3, 'piid': 3, 'code': 0, 'value': 0},
    -                {'did': 'interlock', 'siid': 4, 'piid': 1, 'code': 0, 'value': False},
    -                {'did': 'flex_mode', 'siid': 4, 'piid': 2, 'code': 0, 'value': True},
    -                {'did': 'rc_list', 'siid': 4, 'piid': 2, 'code': 0, 'value': '[{"mac":"9db0eb4124f8","evtid":4097,"pid":339,"beaconkey":"3691bc0679eef9596bb63abf"}]'},
    -            ]
    -        }
    -        """
    +        """Response of Yeelight Dual Control Module { 'id': 1, 'result': [ {'did':
    +        'switch_1_state', 'siid': 2, 'piid': 1, 'code': 0, 'value': False}, {'did':
    +        'switch_1_default_state', 'siid': 2, 'piid': 2, 'code': 0, 'value': True},
    +        {'did': 'switch_1_off_delay', 'siid': 2, 'piid': 3, 'code': 0, 'value': 300},
    +        {'did': 'switch_2_state', 'siid': 3, 'piid': 1, 'code': 0, 'value': False},
    +        {'did': 'switch_2_default_state', 'siid': 3, 'piid': 2, 'code': 0, 'value':
    +        False}, {'did': 'switch_2_off_delay', 'siid': 3, 'piid': 3, 'code': 0, 'value':
    +        0}, {'did': 'interlock', 'siid': 4, 'piid': 1, 'code': 0, 'value': False},
    +        {'did': 'flex_mode', 'siid': 4, 'piid': 2, 'code': 0, 'value': True}, {'did':
    +        'rc_list', 'siid': 4, 'piid': 2, 'code': 0, 'value': '[{"mac":"9db0eb4124f8","ev
    +        tid":4097,"pid":339,"beaconkey":"3691bc0679eef9596bb63abf"}]'}, ] }"""
    
    Somewhat related to PyCQA/docformatter#144
    rytilahti committed Oct 21, 2023
    Configuration menu
    Copy the full SHA
    1273404 View commit details
    Browse the repository at this point in the history
  2. Disable docformatter for ci

    rytilahti committed Oct 21, 2023
    Configuration menu
    Copy the full SHA
    500efa1 View commit details
    Browse the repository at this point in the history