You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example code in the Development documentation page throws an error for me with yamllint 1.35.1 running on Python 3.12:
$ python3
Python 3.12.4 (main, Jul 13 2024, 16:37:48) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import yamllint
>>> yaml_config = yamllint.config.YamlLintConfig("extends: default")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'yamllint' has no attribute 'config'
Since yamllint version 0.5.2 (in 2016, just after yamllint was created)
this example in documentation doesn't work. Indeed, commit dbbecb5
(which aimed to solve another problem) removed the ability to import
yamllint submodules directly.
This commit makes it clearer inside documentation.
Fixes#698
That's true, I confirm this inconsistency in the development section of documentation. It has been the case since 2016 and commit dbbecb5 (just after yamllint was created) to solve another problem.
I propose to fix the documentation to use import yamllint.config instead of import yamllint: #699.
Since yamllint version 0.5.2 (in 2016, just after yamllint was created)
this example in documentation doesn't work. Indeed, commit dbbecb5
(which aimed to solve another problem) removed the ability to import
yamllint submodules directly.
This commit makes it clearer inside documentation.
Fixes#698
The example code in the Development documentation page throws an error for me with yamllint 1.35.1 running on Python 3.12:
it will work if I amend the import statement:
The documentation seems Pythonic, so perhaps there's a misconfiguration somewhere?
The text was updated successfully, but these errors were encountered: